448368749@qq.com před 4 roky
rodič
revize
fbd302232f

+ 8 - 8
src/pages.json

@@ -1,14 +1,6 @@
 {
   "pages": [
     {
-      "path": "pages/index/index",
-      "style": {
-        "navigationBarTitleText": "店铺首页",
-        "navigationBarTextStyle": "black",
-        "navigationBarBackgroundColor":"#ffcd00"
-      }
-    },
-    {
       "path": "pages/public/login",
       "style":{
         "navigationBarTitleText": "登录",
@@ -18,6 +10,14 @@
       }
     },
     {
+      "path": "pages/index/index",
+      "style": {
+        "navigationBarTitleText": "店铺首页",
+        "navigationBarTextStyle": "black",
+        "navigationBarBackgroundColor":"#ffcd00"
+      }
+    },
+    {
       "path": "pages/public/resetpassword",
       "style":{
         "navigationBarTitleText": "找回密码"

+ 69 - 338
src/pages/order/order.vue

@@ -3,62 +3,39 @@
   <view class="order">
     <view class="header-warp">
       <view class="header-search">
+        <view class="uni-list-cell">
+          <view class="uni-list-cell-db">
+            <picker @change="bindPickerChange" :value="index" :range="array">
+              <view class="uni-input">{{ array[index] }}</view>
+            </picker>
+            <image
+              src="../../static/images/garydownicon.png"
+              mode=""
+               class="icon"
+            ></image>
+          </view>
+        </view>
         <view class="search">
           <input
             type="text"
             placeholder-style="color:#a3a8a8;font-size:10px;"
-            placeholder="请输入订单号或手机号"
+            placeholder="请输入订单号或手机号、身份证号"
             class="cellphone"
-            v-model="params.buyPhone"
           />
-          <text class="txt" @tap="orderByNum">搜索</text>
+          <text class="txt">搜索</text>
         </view>
-      </view>
-      <view class="uni-list-cell">
-        <view class="uni-list-cell-db">
-          <picker
-            style="width: 100%; height: 100%;"
-            @change="bindPickerChange"
-            :value="index"
-            :range="shopArray"
-            range-key="name"
-          >
-            <view class="uni-input">{{ shopArray[index].name }}</view>
-          </picker>
-          <view class="icon-warp">
-            <image
-              src="../../static/images/moreicon.png"
-              class="iconRight"
-            ></image>
-          </view>
-        </view>
-      </view>
-      <view class="btn-time">
-        <uni-calendar
-          ref="calendar"
-          :insert="false"
-          :range="true"
-          :startDate="'2020-01-01'"
-          :endDate="date"
-          @confirm="confirm"
-        />
-        <view class="opentime" @tap="openTime">
-          <view class="start">{{ startdate ? startdate : date }}</view>
-          <text class="guo">至</text>
-          <view class="end">{{ enddate ? enddate : date }}</view>
-          <text class="sundate">共:{{ sunday }}天</text>
-        </view>
-        <view style="width: 19upx;">
+        <view class="btn-time">
           <image
-            src="../../static/images/moreicon.png"
-            class="iconRight"
+            src="../../static/images/timeIcon.png"
+            class="timeicon"
           ></image>
+          <text class="screen">按时间</text>
         </view>
       </view>
       <view class="header-bar">
         <view
           class="item"
-          @tap="changeTab(1, 'pay')"
+          @tap="changeTab(1)"
           :class="{ active: isactive === 1 }"
         >
           <view class="ordertype">已付款</view>
@@ -66,7 +43,7 @@
         </view>
         <view
           class="item"
-          @tap="changeTab(2, 'accomplish')"
+          @tap="changeTab(2)"
           :class="{ active: isactive === 2 }"
         >
           <view class="ordertype">已完成</view>
@@ -74,7 +51,7 @@
         </view>
         <view
           class="item"
-          @tap="changeTab(3, 'refundorder')"
+          @tap="changeTab(3)"
           :class="{ active: isactive === 3 }"
         >
           <view class="ordertype">退款</view>
@@ -83,275 +60,55 @@
         <view class="line"></view>
       </view>
     </view>
-    <view style="height: 352upx;"></view>
-
+    <view style="height: 192upx;"></view>
     <view class="order-content" v-if="isactive === 1">
-      <view
-        class="order-list"
-        @tap="todetail(item.ordersNo)"
-        v-for="(item, index) in orderList"
-        :key="index"
-      >
+      <view class="order-list" @tap='todetail'>
         <view class="order-title">
           <text class="ordernum"
-            >订单号:<text class="num">{{ item.ordersNo }}</text></text
+            >订单号:<text class="num">15648464184616</text></text
           >
-          <text class="ordertime">{{ item.orderTime.substring(11) }}</text>
+          <text class="ordertime">09:26</text>
         </view>
         <view class="order-detail">
-          <view class="name">{{ item.goodsName }}</view>
-          <view class="door"
-            >门店:<text class="message">{{ item.merchName }}</text></view
-          >
-          <view class="num"
-            >数量:<text class="message">{{ item.num }}</text></view
-          >
-          <view class="status"
-            >状态:<text class="message">{{ item.statusName }}</text></view
-          >
-          <view class="playtime"
-            >游玩时间:<text class="message">{{ item.palyTime }}</text></view
-          >
+          <view class="name">仙女山成人票</view>
+          <view class="door">门店:<text class="message">1</text></view>
+          <view class="num">门店:<text class="message">2</text></view>
+          <view class="status">门店:<text class="message">3</text></view>
+          <view class="playtime">门店:<text class="message">4</text></view>
         </view>
       </view>
     </view>
-    <view class="order-content" v-if="isactive === 2">
-      <view
-        class="order-list"
-        @tap="todetail(item.ordersNo)"
-        v-for="(item, index) in orderList"
-        :key="index"
-      >
-        <view class="order-title">
-          <text class="ordernum"
-            >订单号:<text class="num">{{ item.ordersNo }}</text></text
-          >
-          <text class="ordertime">{{ item.orderTime.substring(11) }}</text>
-        </view>
-        <view class="order-detail">
-          <view class="name">{{ item.goodsName }}</view>
-          <view class="door"
-            >门店:<text class="message">{{ item.merchName }}</text></view
-          >
-          <view class="num"
-            >数量:<text class="message">{{ item.num }}</text></view
-          >
-          <view class="status"
-            >状态:<text class="message">{{ item.statusName }}</text></view
-          >
-          <view class="playtime"
-            >游玩时间:<text class="message">{{ item.palyTime }}</text></view
-          >
-        </view>
-      </view>
-    </view>
-    <view class="order-content" v-if="isactive === 3">
-      <view
-        class="order-list"
-        @tap="todetail(item.ordersNo)"
-        v-for="(item, index) in orderList"
-        :key="index"
-      >
-        <view class="order-title">
-          <text class="ordernum"
-            >订单号:<text class="num">{{ item.ordersNo }}</text></text
-          >
-          <text class="ordertime">{{ item.orderTime.substring(11) }}</text>
-        </view>
-        <view class="order-detail">
-          <view class="name">{{ item.goodsName }}</view>
-          <view class="door"
-            >门店:<text class="message">{{ item.merchName }}</text></view
-          >
-          <view class="num"
-            >数量:<text class="message">{{ item.num }}</text></view
-          >
-          <view class="status"
-            >状态:<text class="message">{{ item.statusName }}</text></view
-          >
-          <view class="playtime"
-            >游玩时间:<text class="message">{{ item.palyTime }}</text></view
-          >
-        </view>
-      </view>
-    </view>
-
-    <uni-load-more :status="more"> </uni-load-more>
-    <rf-loading v-if="loading"></rf-loading>
-    <view style="height: 250upx;"></view>
   </view>
 </template>
 
 <script>
-import moment from '@/common/moment';
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import uniCalendar from '@/components/uni-calendar/uni-calendar.vue';
 export default {
   name: 'order',
-  components: { uniLoadMore, uniCalendar },
+  components: {},
   data() {
     //这里存放数据
     return {
-      loading: false,
-      shopArray: [{ name: '全部', id: '' }],
+      array: ['中国', '美国', '巴西', '日本'],
       index: 0,
-      shopID: 0,
       isactive: 1,
-      more: 'loading', // more  loading noMore
-
-      date: moment().format('YYYY-MM-DD'),
-      yesdate: moment().subtract(1, 'day').format('YYYY-MM-DD'),
-      dateArr: [],
-      // startdate: moment().subtract(1, 'day').format('YYYY-MM-DD'),
-      startdate: '',
-      enddate: '',
-      sunday: 0,
-
-      orderFlag: 'pay', // pay accomplish refundorder
-
-      soleStatus: 1, // 触底状态
-
-      orderList: [],
-      params: {
-        orderFlag: 'pay', // pay accomplish refundorder
-        pageNum: 1,
-        pageSize: 10,
-        ordersNo: '',
-        buyPhone: '',
-        shopId: '',
-        overTimeArray: [],
-      },
     };
   },
-
-  // 下拉刷新page.json中要配置
-  onPullDownRefresh() {
-    this.startdate = '';
-    this.enddate = '';
-    this.sunday = 0;
-    this.dateArr = [];
-    this.pageNum = 1;
-    this.orderbynumber = '';
-    this.getOrderList();
-  },
-  // 页面触底加载
-  onReachBottom() {
-    if (this.soleStatus === 1) {
-      if (this.more === 'noMore') {
-        return;
-      }
-      this.loadMoreList();
-    }
-  },
-  onLoad() {
-    this.getShopList();
-    this.getOrderList();
-  },
   //方法集合
   methods: {
-    // 打开日历
-    openTime() {
-      this.$refs.calendar.open();
-    },
-    // 确认时间后
-    confirm(e) {
-      this.more = 'loading';
-      this.loading = true;
-
-      this.startdate = e.range.before;
-      this.enddate = e.range.after;
-      this.sunday = e.range.data.length;
-
-      this.params.overTimeArray.push(this.startdate, this.enddate);
-
-      this.getOrderList();
+    bindPickerChange: function (e) {
+      console.log('picker发送选择改变,携带值为', e.target.value);
+      this.index = e.target.value;
     },
-
-    // 根据订单号或者手机号查询
-    orderByNum() {
-      this.more = 'loading';
-      let num = '';
-      const pattern = /^1[345678]\d{9}$/;
-      if (pattern.test(this.params.buyPhone)) {
-        num = this.params.buyPhone;
-        this.params.buyPhone = num;
-        this.params.ordersNo = '';
-        this.getOrderList();
-      } else {
-        this.params.buyPhone = '';
-        this.getOrderList();
-      }
-    },
-
-    // 商铺选择
-    bindPickerChange(e) {
-      this.more = 'loading';
-      this.index = e.detail.value;
-      this.params.shopId = this.shopArray[this.index].id;
-      this.getOrderList();
-    },
-
     // tab
-    changeTab(type, falg) {
-      this.more = 'loading';
-      this.params.pageNum = 1;
+    changeTab(type) {
       this.isactive = type;
-      this.params.orderFlag = falg;
-      this.getOrderList();
     },
+
     // 跳转详情
-    todetail(num) {
-      console.log(num);
-      uni.setStorageSync('order', num);
-      this.$mRouter.push({ route: '/pages/order/orderdetail' });
-    },
-    // 获取店铺列表
-    async getShopList() {
-      await this.$http.get('/homePage/getShopByMerId').then((res) => {
-        if (res.data && res.code === 200) {
-          let newarr = [{ name: '全部', id: '' }];
-          this.shopArray = newarr.concat(res.data);
-        }
-      });
-    },
-    // 订单列表
-    async getOrderList() {
-      this.soleStatus = 1;
-      this.orderList = [];
-      this.loading = true;
-      await this.$http
-        .post('/orders/proList', this.params)
-        .then(async (res) => {
-          console.log(res);
-          if (res.data.list.length > 0) {
-            this.orderList = res.data.list;
-            if (res.data.nextPage === 0) {
-              this.more = 'noMore';
-            }
-          } else {
-            this.more = 'noMore';
-          }
-          this.loading = false;
-        });
-    },
-    // 上拉加载
-    async loadMoreList() {
-      this.params.pageNum++;
-      await this.$http
-        .post('/orders/proList', this.params)
-        .then(async (res) => {
-          console.log(res);
-          if (res.data.list.length > 0) {
-            this.orderList = this.orderList.concat(res.data.list);
-            if (res.data.nextPage === 0) {
-              this.more = 'noMore';
-            }
-          } else {
-            this.more = 'noMore';
-            return;
-          }
-        });
-    },
+    todetail() {
+      console.log(1);
+      this.$mRouter.push({route: ""})
+    }
   },
 };
 </script>
@@ -366,8 +123,25 @@ export default {
     .header-search {
       display: flex;
       align-items: center;
+      .uni-list-cell {
+        width: 92upx;
+        .uni-list-cell-db {
+          height: 80upx;
+          font-size: 28upx;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          background-color: #fff;
+          color: #8f8f8f;
+          .icon {
+            width: 17upx;
+            height: 12upx;
+            margin-left: 10upx;
+          }
+        }
+      }
       .search {
-        width: 100%;
+        flex: 1;
         display: flex;
         align-items: center;
         height: 80upx;
@@ -392,64 +166,21 @@ export default {
           font-size: 28upx;
         }
       }
-    }
-    .uni-list-cell {
-      padding: 0 20upx;
-      border-bottom: 1px solid #f4f4f4;
-      .uni-list-cell-db {
-        height: 80upx;
-        font-size: 28upx;
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-        background-color: #fff;
-        color: #8f8f8f;
-        font-size: 30upx;
-      }
-      .uni-input {
-        height: 100%;
-        line-height: 80upx;
-      }
-      .icon-warp {
-        width: 19upx;
-        .iconRight {
-          width: 19upx;
-          height: 27upx;
-        }
-      }
-    }
-    .btn-time {
-      width: 100%;
-      height: 80upx;
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      border-bottom: 1px solid #f4f4f4;
-      padding: 0 20upx;
-      .opentime {
-        flex: 1;
+      .btn-time {
+        width: 130upx;
         display: flex;
         align-items: center;
-        color: #8f8f8f;
-        .start {
-          font-size: 30upx;
-        }
-        .guo {
-          padding: 0 45upx;
-          font-size: 32upx;
-        }
-        .end {
-          font-size: 30upx;
+        justify-content: center;
+        .timeicon {
+          width: 25upx;
+          height: 28upx;
         }
-        .sundate {
-          font-size: 28upx;
-          padding-left: 80upx;
+        .screen {
+          margin-left: 5upx;
+          font-size: 24upx;
+          color: #8f8f8f;
         }
       }
-      .iconRight {
-        width: 19upx;
-        height: 27upx;
-      }
     }
     .header-bar {
       display: flex;

+ 24 - 7
src/pages/public/confirmpassword.vue

@@ -6,10 +6,10 @@
 		></view>
 		<view class="title">找回密码</view>
 		<view class="input-item cellphone">
-			<input type="text" placeholder="请输入新密码" />
+			<input type="password" v-model="password" placeholder="请输入新密码" />
 		</view>
 		<view class="input-item imgcode">
-			<input type="text" class="inputcode" placeholder="请再次输入新密码" />
+			<input type="password" v-model="rePassword" class="inputcode" placeholder="请再次输入新密码" />
 		</view>
 		<view class="btn-warp">
 			<view class="btn" @tap="next">确认</view>
@@ -24,7 +24,8 @@ export default {
 	data() {
 		//这里存放数据
 		return {
-			codeImage: ''
+			password:'',
+			rePassword:''
 		};
 	},
 	//监控data中的数据变化
@@ -34,12 +35,28 @@ export default {
 	methods: {
 		// 返回上一页
 		navBack() {
-			this.$mRouter.back();
+			this.$mRouter.push({route: '/pages/public/resetpassword'})
 		},
-
 		// 确认进入下一步
-		next() {
-			console.log(3);
+		async next() {
+			await this.$http.post('/WxApplet/findPwd/finPwdSubmit', {
+				pwd:this.password,
+				newPwd:this.rePassword,
+				uuid:uni.getStorageSync('uuid')
+			}).then(async res => {
+				if(res.code == 200){
+					uni.showToast({
+						title: res.data,
+						icon: 'none'
+					});
+					this.$mRouter.push({ route: '/pages/public/login' });
+				}else{
+					uni.showToast({
+						title: res.msg,
+						icon: 'none'
+					});
+				}							
+			});
 		}
 	}
 };

+ 3 - 3
src/pages/public/login.vue

@@ -1,7 +1,7 @@
 <template>
   <view class="container">
     <!--顶部返回按钮-->
-    <text class="back-btn iconfont iconzuojiantou-up" @tap="navBack"></text>
+    <!-- <text class="back-btn iconfont iconzuojiantou-up" @tap="navBack"></text> -->
     <view class="login-title">
       <image
         class="logo"
@@ -103,7 +103,7 @@ export default {
     this.userInfo = uni.getStorageSync('wechatUserInfo');
 
     this.getCaptchaImage();
-     this.changeLogin(); 
+    //  this.changeLogin(); 
   },
   methods: { 
     //获取用户信息
@@ -280,7 +280,7 @@ page {
 }
 
 .container {
-  padding-top: 115px;
+  padding-top: 65px;
   position: relative;
   width: 100vw;
   overflow: hidden;

+ 144 - 17
src/pages/public/resetpassword.vue

@@ -6,15 +6,17 @@
 		></view>
 		<view class="title">找回密码</view>
 		<view class="input-item cellphone">
-			<input type="text" placeholder="请输入手机号" />
+			<input type="text" v-model="phone" placeholder="请输入手机号" />
 		</view>
 		<view class="input-item imgcode">
-			<input type="text" class="inputcode" placeholder="请输入图形验证码" />
+			<input type="text" v-model="codeImgInp" class="inputcode" placeholder="请输入图形验证码" />
 			<image class="gifimg" :src="codeImage" @tap="getimgcode"></image>
 		</view>
 		<view class="input-item sellcode">
-			<input type="text" class="inputcode" placeholder="请输入短信验证码" />
-			<view class="getcode" @tap="getsellcode">获取短信</view>
+			<input type="text" v-model="codeInp" class="inputcode" placeholder="请输入短信验证码" />
+			 <button @click="getCode" :disabled="disabled" class="getcode">
+                {{countdown}} <text v-show="timestatus">秒重获</text>
+            </button>
 		</view>
 		<view class="btn-warp">
 			<view class="btn" @tap="next">确认</view>
@@ -29,7 +31,15 @@ export default {
 	data() {
 		//这里存放数据
 		return {
-			codeImage: ''
+			codeImage: '',
+			phone:'',
+			codeImgInp:'',
+			codeInp:'',
+			countdown:'获取验证码',
+			disabled:false,
+			timestatus:false,
+			clear:'',
+			uuid:''
 		};
 	},
 	//监控data中的数据变化
@@ -41,25 +51,139 @@ export default {
 	methods: {
 		// 返回上一页
 		navBack() {
-			this.$mRouter.back();
+			// this.$mRouter.back();
+			this.$mRouter.push({route: '/pages/public/login'})
 		},
 		// 获取图形验证码
 		async getimgcode() {
 			// 获取验证码
-			await this.$http.get('captchaImage', {}).then(async res => {
+			await this.$http.get('/WxApplet/findPwd/captchaImage', {}).then(async res => {
 				console.log(res);
-				this.codeImage = 'data:image/gif;base64,' + res.data.img;
+				if(res.code === 200){
+					this.codeImage = 'data:image/gif;base64,' + res.data.img;
+					this.uuid = res.data.uuid
+				}else{
+					this.$mHelper.toast(res.msg);
+				}
+				
 			});
 		},
 		// 获取短信验证码
-		getsellcode() {
-			console.log(2);
+		async getsellcode() {
+			if(this.phone){
+				if(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phone)){
+					await this.$http.get('/WxApplet/findPwd/msgCode', {'phone':this.phone}).then(async res => {
+						if(res.code === 200){
+							this.$mHelper.toast('发送成功!');
+						}else{
+							this.$mHelper.toast(resata.msg);
+						}						
+					});
+				}else{
+					this.$mHelper.toast('请输入正确的手机号');
+				}
+			}else{
+				this.$mHelper.toast('请输入手机号');
+			}
+			
 		},
+
 		// 验证规则图片验证码和短信验证码成功后可以点击确认进入下一步
 
 		// 确认进入下一步
-		next() {
-			this.$mRouter.push({ route: '/pages/public/confirmpassword' });
+		async next() {
+			if(this.phone){
+				if(this.codeImgInp){
+					if(this.codeInp){
+						await this.$http.post('/WxApplet/findPwd/finPwdCheck', {
+							phone:this.phone,
+							captchaImage:this.codeImgInp,
+							msgCode:this.codeInp,
+							uuid:this.uuid
+						}).then(async res => {
+							console.log(res);	
+							if(res.code == 200){
+								uni.setStorageSync('uuid',res.data)
+								this.$mRouter.push({ route: '/pages/public/confirmpassword' });
+							}else{
+								uni.showToast({
+									title: res.msg,
+									icon: 'none'
+								});
+							}							
+						});
+					}else{
+						uni.showToast({
+							title: '请输入手机验证码',
+							icon: 'none'
+						});
+					}
+				}else{
+					uni.showToast({
+						title: '请输入图形验证码',
+						icon: 'none'
+					});
+				}
+			}else{
+				uni.showToast({
+					title: '请输入手机号码',
+					icon: 'none'
+				});
+			}
+						
+		},
+		 // 获取验证码
+		getCode(){
+			var that = this;
+			if(that.phone==''){
+				uni.showToast({
+					title: '请输入手机号码',
+					icon: 'none'
+				});
+			}else if(!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phone))){
+				uni.showToast({
+					title: '手机号码错误',
+					icon: 'none'
+				});
+			}else{
+				that.disabled = true;//禁用点击
+				that.$http.get('/WxApplet/findPwd/msgCode', {'phone':this.phone}).then(res => {
+					// console.log(res)
+					if(res.code === 200){
+						that.countdown = 60;
+						that.timestatus = true;
+						that.clear = setInterval(function(){
+							if(!that.countdown){                    
+								that.disabled = false;
+								that.timestatus = false;
+								that.countdown = '获取验证码';
+								clearInterval(that.clear);
+							}else{
+								--that.countdown;
+							}
+						},1000);
+					}else{
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						});
+					}
+					
+					console.log(that.countdown)
+				})				
+			}                
+		},
+		// 倒计时
+		countDown(){
+			var that = this;
+			if(!that.countdown){                    
+				that.disabled = false;
+				that.timestatus = false;
+				that.countdown = '获取验证码';
+				clearInterval(that.clear);
+			}else{
+				--that.countdown;
+			}
 		}
 	}
 };
@@ -68,7 +192,7 @@ export default {
 .resetpassword {
 	padding: 0 50upx;
 	.goback {
-		padding-top: 100upx;
+		padding-top: 60upx;
 		.backicon {
 			width: 24upx;
 			height: 43upx;
@@ -79,7 +203,7 @@ export default {
 		color: $titleColor;
 		background: url('../../static/images/passworddown.png') no-repeat left 82%;
 		background-size: 192upx 14upx;
-		margin-top: 65upx;
+		margin-top: 25upx;
 	}
 	.input-item {
 		height: 95upx;
@@ -106,11 +230,14 @@ export default {
 			right: 0;
 			top: 0;
 			width: 180upx;
-			height: 95upx;
-			font-size: 35upx;
+			height: 85upx;
 			color: #999999;
 			text-align: center;
-			line-height: 95upx;
+			line-height: 85upx;
+			outline: none;
+			border: none;
+			font-size: 24upx;
+			background: transparent;
 		}
 	}
 	.cellphone {