Compare commits
	
		
			No commits in common. "8d9f1d72806c624144ac5a4246e2be42afc0489d" and "adea57afd7b01da1a9042b1f43d1c544b8eadba4" have entirely different histories.
		
	
	
		
			8d9f1d7280
			...
			adea57afd7
		
	
		
| @ -1,3 +0,0 @@ | ||||
| export default { | ||||
|   baseUrl: "http://192.168.88.175:9021", | ||||
| }; | ||||
| @ -1,12 +0,0 @@ | ||||
| import http from "./interface"; | ||||
| 
 | ||||
| // 地点
 | ||||
| export const address = () => { | ||||
|   return http.request({ | ||||
|     url: "/api/warehouse/address", | ||||
|     method: "POST", | ||||
|   }); | ||||
| }; | ||||
| export default { | ||||
|   address, | ||||
| }; | ||||
| @ -1,6 +1,4 @@ | ||||
| import login from "./login"; | ||||
| import deposit from "./deposit"; | ||||
| export default { | ||||
|   login, | ||||
|   deposit, | ||||
| }; | ||||
|  | ||||
| @ -60,7 +60,7 @@ export default { | ||||
|             response = newResponse; | ||||
|           } | ||||
|         } | ||||
|         if (response.data?.status === 401) { | ||||
|         if (response.data.status === 401) { | ||||
|           let curPage = getCurrentPages(); | ||||
|           let route = curPage[curPage.length - 1].route; //获取当前页面的路由
 | ||||
|           if (route !== "pages/login/login") { | ||||
|  | ||||
| @ -1,31 +1,5 @@ | ||||
| import http from "./interface"; | ||||
| 
 | ||||
| // openId
 | ||||
| export const login = (data) => { | ||||
|   return http.request({ | ||||
|     url: "/api/wxuser/openid", | ||||
|     method: "POST", | ||||
|     data, | ||||
|   }); | ||||
| }; | ||||
| // 获取手机号
 | ||||
| export const getTel = (data) => { | ||||
|   return http.request({ | ||||
|     url: "/api/wxuser/get/telnum", | ||||
|     method: "POST", | ||||
|     data, | ||||
|   }); | ||||
| }; | ||||
| // 注册
 | ||||
| export const register = (data) => { | ||||
|   return http.request({ | ||||
|     url: "/api/wxuser/register", | ||||
|     method: "POST", | ||||
|     data, | ||||
|   }); | ||||
| }; | ||||
| export default { | ||||
|   login, | ||||
|   getTel, | ||||
|   register, | ||||
| }; | ||||
| // 登录
 | ||||
| 
 | ||||
| export default {}; | ||||
|  | ||||
| @ -16,9 +16,9 @@ | ||||
|         <cover-image src="@/static/image/camera.png" style="width: 600rpx; height: 600rpx"></cover-image> | ||||
|       </camera> | ||||
| 
 | ||||
|       <view class="time"> | ||||
|       <view class="time" v-if="isAnimate"> | ||||
|         <view class="dot"></view> | ||||
|         <u-count-down :time="5 * 1000" format="ss" ref="countDown" v-if="isAnimate"></u-count-down> | ||||
|         <u-count-down :time="5 * 1000" format="ss" ref="countDown"></u-count-down> | ||||
|       </view> | ||||
|       <view style="width:284rpx;"> | ||||
|         <u-button | ||||
| @ -29,7 +29,7 @@ | ||||
|           @touchend="stopRecord" | ||||
|         ></u-button> | ||||
|         <view style="margin-top: 20rpx;"> | ||||
|           <u-button text="确认" shape="circle" color="#76C458" @click="back"></u-button> | ||||
|           <u-button text="确认" shape="circle" color="#76C458"></u-button> | ||||
|         </view> | ||||
|       </view> | ||||
|     </view> | ||||
| @ -42,8 +42,7 @@ export default { | ||||
|     return { | ||||
|       ctx: null, | ||||
|       isAnimate: false, | ||||
|       tempVideoPath: "", | ||||
|       data: {} | ||||
|       tempVideoPath: "" | ||||
|     }; | ||||
|   }, | ||||
|   onLoad() { | ||||
| @ -53,14 +52,15 @@ export default { | ||||
|     startRecord() { | ||||
|       this.ctx.startRecord({ | ||||
|         success: res => { | ||||
|           console.log(123123); | ||||
|           this.isAnimate = true; | ||||
|           console.log(this.$refs); | ||||
|           this.$refs.countDown.start(); | ||||
|           setTimeout(() => { | ||||
|             this.ctx.stopRecord({ | ||||
|               success: res => { | ||||
|                 console.log("自动停止录像", res); | ||||
|                 this.tempVideoPath = res.tempVideoPath; | ||||
|                 this.isAnimate = false; | ||||
|                 this.$refs.countDown.reset(); | ||||
|               } | ||||
|             }); | ||||
|           }, 5000); | ||||
| @ -84,15 +84,6 @@ export default { | ||||
|           }); | ||||
|         } | ||||
|       }); | ||||
|     }, | ||||
|     back() { | ||||
|       uni.navigateTo({ | ||||
|         url: | ||||
|           "/pages/realName/realName?tempVideoPath=" + | ||||
|           this.tempVideoPath + | ||||
|           "&isfinish=" + | ||||
|           !!this.tempVideoPath | ||||
|       }); | ||||
|     } | ||||
|   } | ||||
| }; | ||||
|  | ||||
| @ -2,7 +2,7 @@ | ||||
|   <div class="order-details"> | ||||
|     <title-block title="寄存画作"> | ||||
|       <template #left> | ||||
|         <div> <image style="width: 112rpx;height: 52rpx" src="https://cdns.fontree.cn/fonchain-main/prod/image/default/artwork/785cf885-c4c9-44b3-8155-4b39988c7ef8.png" @click="back"></image></div> | ||||
|         <div> <image style="width: 112rpx;height: 52rpx" src="https://cdns.fontree.cn/fonchain-main/prod/image/default/artwork/785cf885-c4c9-44b3-8155-4b39988c7ef8.png"></image></div> | ||||
|       </template> | ||||
|     </title-block> | ||||
|     <div class="content2"> | ||||
| @ -197,12 +197,6 @@ export default { | ||||
|       day, | ||||
|       value: [9999, month - 1, day - 1], | ||||
|       visible: true, | ||||
|       url:''//二维码扫码的结果用户发起请求的body体 | ||||
|     } | ||||
|   }, | ||||
|   onLoad(e) { | ||||
|     if(e){ | ||||
|       this.url = e.url | ||||
|     } | ||||
|   }, | ||||
|   mounted(){ | ||||
| @ -218,9 +212,6 @@ export default { | ||||
|     }, | ||||
|     changeData(e){ | ||||
|       this.data=[e.detail.value[0]+1990,e.detail.value[1]+1,e.detail.value[2]+1] | ||||
|     }, | ||||
|     back(){ | ||||
|       uni.navigateBack({ delta: 2 }) | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -2,8 +2,8 @@ | ||||
| 
 | ||||
| <template> | ||||
|   <view :style="{background:'url('+'../../static/bbj1@3x.png'+')'}" class="main"> | ||||
|     <title-block style="flex-shrink: 0;width: 100%" title="寄存"></title-block> | ||||
|     <view class="order" @click="goConsignmen"> | ||||
|     <view class="title">寄存</view> | ||||
|     <view class="order"> | ||||
|       <view class="order-item"> | ||||
|         <image src="@/static/image/write.png" mode="scaleToFill" style="width: 63rpx;height: 62rpx" /> | ||||
|         <view style="color: #fff;margin-top:10rpx">填写下单</view> | ||||
| @ -16,12 +16,14 @@ | ||||
|     <view class="list"> | ||||
|       <view style="color: #76C458">目前可用寄存仓库地址</view> | ||||
|       <u-divider :dashed="true" lineColor="#4E964D"></u-divider> | ||||
|       <view v-for="(item,index) in addressList" :key="item.ID"> | ||||
|         <view class="list-item"> | ||||
|           <view>{{item.address}}</view> | ||||
|           <view>剩余{{item.deletedAt}}位置</view> | ||||
|         </view> | ||||
|         <u-divider :dashed="true" lineColor="#4E964D" v-if="index !== addressList.length-1"></u-divider> | ||||
|       <view class="list-item"> | ||||
|         <view>目前可用地址某某某地区</view> | ||||
|         <view>剩余200位置</view> | ||||
|       </view> | ||||
|       <u-divider :dashed="true" lineColor="#4E964D"></u-divider> | ||||
|       <view class="list-item"> | ||||
|         <view>目前可用地址某某某地区</view> | ||||
|         <view>剩余200位置</view> | ||||
|       </view> | ||||
|     </view> | ||||
|     <tabbar :current="0"></tabbar> | ||||
| @ -35,17 +37,9 @@ export default { | ||||
|   onLoad() { | ||||
|     uni.hideTabBar(); | ||||
|   }, | ||||
|   onShow() { | ||||
|     this.getAddress(); | ||||
|   }, | ||||
|   components: { | ||||
|     tabbar | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       addressList: [] | ||||
|     }; | ||||
|   }, | ||||
|   methods: { | ||||
|     scanOrder() { | ||||
|       uni.scanCode({ | ||||
| @ -53,25 +47,8 @@ export default { | ||||
|         success: res => { | ||||
|           console.log("条码类型:" + res.scanType); | ||||
|           console.log("条码内容:" + res.result); | ||||
|           uni.navigateTo({ | ||||
|             url: "/pages/consignment-painting/index?url=" + res.result | ||||
|           }); | ||||
|         } | ||||
|       }); | ||||
|     }, | ||||
|     async getAddress() { | ||||
|       const res = await this.$api.deposit.address(); | ||||
|       console.log(res); | ||||
|       if (res.status === 0) { | ||||
|         this.addressList = res.data.data; | ||||
|       } else { | ||||
|         this.$common.msgToast(res.msg); | ||||
|       } | ||||
|     }, | ||||
|     goConsignmen() { | ||||
|       uni.navigateTo({ | ||||
|         url: "/pages/consignment-painting/index" | ||||
|       }); | ||||
|     } | ||||
|   } | ||||
| }; | ||||
| @ -83,8 +60,12 @@ export default { | ||||
|   display: flex; | ||||
|   flex-direction: column; | ||||
|   align-items: center; | ||||
|   padding: 10rpx 30rpx 30rpx 30rpx; | ||||
| 
 | ||||
|   padding: 30rpx; | ||||
|   .title { | ||||
|     margin-top: 40rpx; | ||||
|     color: #4e964d; | ||||
|     font-size: 32rpx; | ||||
|   } | ||||
|   .order { | ||||
|     width: 100%; | ||||
|     margin-top: 40rpx; | ||||
|  | ||||
| @ -1,17 +1,13 @@ | ||||
| <template> | ||||
|   <view class="main"> | ||||
|     <image src="@/static/image/logo.png" mode="scaleToFill" class="logo" /> | ||||
|     <view class="btn"> | ||||
|       <u-button | ||||
|         v-if="isShow" | ||||
|         open-type="getPhoneNumber" | ||||
|         @getphonenumber="getPhoneNumber" | ||||
|         color="transparent" | ||||
|       >点击登录</u-button> | ||||
|     </view> | ||||
|     <!-- <view class="btn"> | ||||
|       <u-button v-if="isLogoutShow" @click="login" color="transparent">点击登录</u-button> | ||||
|     </view>--> | ||||
|     <button | ||||
|       class="btn" | ||||
|       v-if="isShow" | ||||
|       open-type="getPhoneNumber" | ||||
|       @getphonenumber="getPhoneNumber" | ||||
|     >点击登录</button> | ||||
|     <button class="btn" v-if="isLogoutShow" @click="login">点击登录</button> | ||||
|   </view> | ||||
| </template> | ||||
| 
 | ||||
| @ -21,84 +17,85 @@ export default { | ||||
|     return { | ||||
|       code: "", | ||||
|       openId: "", | ||||
|       isShow: true, | ||||
|       isLogoutShow: true | ||||
|       isShow: false, | ||||
|       isLogoutShow: false | ||||
|     }; | ||||
|   }, | ||||
|   methods: { | ||||
|     async getPhoneNumber(e) { | ||||
|       console.log(e); | ||||
|       if (e.detail.errMsg == "getPhoneNumber:ok") { | ||||
|         // 用户允许或去手机号 | ||||
|         let res = await this.$api.login.getTel({ code: e.detail.code }); | ||||
|         let res = await this.$api.user.loginToken({ | ||||
|           wxPhoneCode: e.detail.code, | ||||
|           openid: this.openId | ||||
|         }); | ||||
|         if (res.status == 0) { | ||||
|           uni.setStorageSync("telNum", res.data.telNum); | ||||
|           uni.setStorageSync("token", res.data.token); | ||||
|           uni.redirectTo({ | ||||
|             url: "/pages/realName/realName" | ||||
|             url: "/pages/register/register" | ||||
|           }); | ||||
|         } else { | ||||
|           this.$common.msgToast(res.msg); | ||||
|         } | ||||
|       } else { | ||||
|         this.$common.msgToast("请不要拒绝哟~重新点击登录"); | ||||
|       } | ||||
|     }, | ||||
|     async login() { | ||||
|       // 获取code | ||||
|       uni.login({ | ||||
|         provider: "weixin", | ||||
|         success: async res => { | ||||
|           this.code = res.code; | ||||
|           let res1 = await this.$api.user.loginToken({ wxLoginCode: res.code }); | ||||
|           if (res1.status == 0) { | ||||
|             if (res1.data.code == 2) { | ||||
|               this.isShow = true; | ||||
|               this.openId = res1.data.openid; | ||||
|             } else { | ||||
|               uni.setStorageSync("token", res1.data.token); | ||||
|               uni.redirectTo({ | ||||
|                 url: "/pages/register/register" | ||||
|               }); | ||||
|             } | ||||
|           } else { | ||||
|             this.$common.msgToast(res1.msg); | ||||
|           } | ||||
|         } | ||||
|       }); | ||||
|     } | ||||
|     // async login() { | ||||
|     //   // 获取code | ||||
|     //   uni.login({ | ||||
|     //     provider: "weixin", | ||||
|     //     success: async res => { | ||||
|     //       console.log(res); | ||||
|     //       this.code = res.code; | ||||
|     //       let res1 = await this.$api.login.login({ code: res.code }); | ||||
|     //       if (res1.status == 0) { | ||||
|     //         this.isShow = true; | ||||
|     //         this.openId = res1.data.accountInfo.openId; | ||||
|     //         uni.setStorageSync("token", res1.data.token); | ||||
|     //         uni.redirectTo({ | ||||
|     //           url: "/pages/register/register" | ||||
|     //         }); | ||||
|     //       } else { | ||||
|     //         this.$common.msgToast(res1.msg); | ||||
|     //       } | ||||
|     //     } | ||||
|     //   }); | ||||
|     // } | ||||
|   }, | ||||
|   onLoad() { | ||||
|     uni.login({ | ||||
|       provider: "weixin", | ||||
|       success: async res => { | ||||
|         console.log("res.code", res.code); | ||||
|         this.code = res.code; | ||||
|         let res1 = await this.$api.login.login({ code: res.code }); | ||||
|         if (res1.status == 0) { | ||||
|           if (res1.data.accountInfo.isNew) { | ||||
|             this.isShow = true; | ||||
|             this.openId = res1.data.accountInfo.openId; | ||||
|             uni.setStorageSync("token", res1.data.token); | ||||
|     this.isLogoutShow = true; | ||||
|     if (!this.isLogoutShow) { | ||||
|       // 获取code | ||||
|       uni.login({ | ||||
|         provider: "weixin", | ||||
|         success: async res => { | ||||
|           this.code = res.code; | ||||
|           let res1 = await this.$api.user.loginToken({ wxLoginCode: res.code }); | ||||
|           if (res1.status == 0) { | ||||
|             if (res1.data.code == 2) { | ||||
|               this.isShow = true; | ||||
|               this.openId = res1.data.openid; | ||||
|             } else { | ||||
|               uni.setStorageSync("token", res1.data.token); | ||||
|               uni.redirectTo({ | ||||
|                 url: "/pages/register/register" | ||||
|               }); | ||||
|             } | ||||
|           } else { | ||||
|             uni.setStorageSync("token", res1.data.token); | ||||
|             uni.redirectTo({ | ||||
|               url: "/pages/home/index" | ||||
|             }); | ||||
|             this.$common.msgToast(res1.msg); | ||||
|           } | ||||
|         } else { | ||||
|           this.$common.msgToast(res1.msg); | ||||
|         } | ||||
|       } | ||||
|     }); | ||||
|       }); | ||||
|     } | ||||
|   } | ||||
| }; | ||||
| </script> | ||||
| 
 | ||||
| <style lang="scss" scoped> | ||||
| /deep/.u-button { | ||||
|   background: red; | ||||
| } | ||||
| .main { | ||||
|   background: url("https://cdns.fontree.cn/fonchain-main/prod/image/1381bd18-2f0c-49f1-84f6-d3eceb94f7a7/artwork/6ef00a09-f663-451d-ae0c-0d00cf4068c5.png"); | ||||
|   height: 100vh; | ||||
|   background: url("@/static/image/login-bg.png") no-repeat; | ||||
|   height: 100%; | ||||
|   display: flex; | ||||
|   justify-content: center; | ||||
|   align-items: center; | ||||
|  | ||||
| @ -1,36 +1,9 @@ | ||||
| 
 | ||||
| <template> | ||||
|   <view class="main"> | ||||
|     <image | ||||
|       src="@/static/image/payError.png" | ||||
|       mode="scaleToFill" | ||||
|       style="width:218rpx;height:54rpx;margin-top:150rpx" | ||||
|     /> | ||||
|     <view style="width:280rpx"> | ||||
|       <u-button color="#EB5F5F" text="返回支付界面" shape="circle" @click="backPay"></u-button> | ||||
|     </view> | ||||
|   </view> | ||||
| </template> | ||||
| <template></template> | ||||
| 
 | ||||
| <script> | ||||
| export default { | ||||
|   methods: { | ||||
|     backPay() { | ||||
|       uni.navigateBack({ delta: 2 }); | ||||
|     } | ||||
|   } | ||||
| }; | ||||
| export default {}; | ||||
| </script> | ||||
| 
 | ||||
| <style lang="scss" scoped> | ||||
| .main { | ||||
|   background: url("https://cdns.fontree.cn/fonchain-main/prod/image/407e7c22-eb62-411e-957b-b6c296fde530/artwork/31c15772-209f-4bf5-bad8-4956a1438a3a.png"); | ||||
|   height: 100vh; | ||||
|   box-sizing: border-box; | ||||
|   display: flex; | ||||
|   justify-content: space-around; | ||||
|   align-items: center; | ||||
|   padding: 32rpx; | ||||
|   flex-direction: column; | ||||
| } | ||||
| <style> | ||||
| </style> | ||||
| @ -1,5 +1,5 @@ | ||||
| <template> | ||||
|   <view class="main"> | ||||
|   <view class="main" :style="{background:'url('+'../../static/image/login-bg.png'+')'}"> | ||||
|     <image | ||||
|       src="@/static/image/paySuccess.png" | ||||
|       mode="scaleToFill" | ||||
| @ -64,7 +64,6 @@ export default {}; | ||||
| 
 | ||||
| <style lang="scss" scoped> | ||||
| .main { | ||||
|   background: url("https://cdns.fontree.cn/fonchain-main/prod/image/407e7c22-eb62-411e-957b-b6c296fde530/artwork/a8a522e0-ca12-4e1f-8c67-996cb5287f47.png"); | ||||
|   height: 100vh; | ||||
|   box-sizing: border-box; | ||||
|   display: flex; | ||||
|  | ||||
| @ -14,8 +14,9 @@ | ||||
|             </view> | ||||
|             <view class="info"> | ||||
|                 <view class="item"> | ||||
|                     <view class="name">姓名</view> | ||||
|                     <u--input placeholder="请输入姓名" border="none" v-model="name" @change="changeName"></u--input> | ||||
|                     <view class="name">手机号</view> | ||||
|                     <u--input placeholder="请输入手机号" border="none" v-model="phone" @change="changePhone" clearable | ||||
|                         type="number" @blur="checkPhone" @confirm="checkPhone"></u--input> | ||||
|                 </view> | ||||
|                 <view class="item"> | ||||
|                     <view class="name">身份证号</view> | ||||
| @ -28,8 +29,8 @@ | ||||
|                 <view style="display: flex;justify-content:space-between;margin-top:20rpx"> | ||||
|                     <view class="card"> | ||||
|                         <view> | ||||
|                             <u-upload :fileList="fileList" @afterRead="afterRead" @delete="deletePic" name="1" multiple | ||||
|                                 :maxCount="1" :width="'270rpx'" :height="'158rpx'" previewImage> | ||||
|                             <u-upload :fileList="fileList6" @afterRead="afterRead" @delete="deletePic" name="6" multiple | ||||
|                                 :maxCount="1" width="250" height="150"> | ||||
|                                 <image src="@/static/image/card.png" mode="scaleToFill" | ||||
|                                     style="width: 270rpx;height: 158rpx;"></image> | ||||
|                             </u-upload> | ||||
| @ -38,8 +39,8 @@ | ||||
|                     </view> | ||||
|                     <view class="card"> | ||||
|                         <view> | ||||
|                             <u-upload :fileList="fileList2" @afterRead="afterRead2" @delete="deletePic2" name="1" multiple | ||||
|                                 :maxCount="1" :width="'270rpx'" :height="'158rpx'"> | ||||
|                             <u-upload :fileList="fileList6" @afterRead="afterRead" @delete="deletePic" name="6" multiple | ||||
|                                 :maxCount="1" width="250" height="150"> | ||||
|                                 <image src="@/static/image/card2.png" mode="scaleToFill" | ||||
|                                     style="width: 270rpx;height: 158rpx;"></image> | ||||
|                             </u-upload> | ||||
| @ -50,14 +51,10 @@ | ||||
|             </view> | ||||
|             <view class="face"> | ||||
|                 <view class="faceTitle">人脸识别</view> | ||||
|                 <view class="recognition" @click="camera" v-if="!isfinish"> | ||||
|                 <view class="recognition"> | ||||
|                     <view style="color: #fff;margin-right:10rpx">前往认证</view> | ||||
|                     <u-icon name="arrow-right-double" color="#fff"></u-icon> | ||||
|                 </view> | ||||
|                 <view class="recognition" @click="camera" v-else> | ||||
|                     <view style="color: #fff;margin-right:10rpx">认证成功</view> | ||||
|                     <u-icon name="checkmark-circle" color="#fff"></u-icon> | ||||
|                 </view> | ||||
|             </view> | ||||
|             <view class="agreement"> | ||||
|                 <u-checkbox-group v-model="checked" iconPlacement="left" placement="row" inactiveColor="#76C458"> | ||||
| @ -68,168 +65,50 @@ | ||||
|                     </view> | ||||
|                 </u-checkbox-group> | ||||
|             </view> | ||||
|             <view style="width:284rpx;margin:20rpx auto"> | ||||
|                 <u-button text="完成注册" shape="circle" @click="completeRegistration" color="#76C458"></u-button> | ||||
|             </view> | ||||
|             <u-button text="完成注册" shape="circle" style="background-color: #76C458;width:284rpx;color:#fff" @click="completeRegistration"></u-button> | ||||
|         </view> | ||||
|     </view> | ||||
| </template> | ||||
| 
 | ||||
| <script> | ||||
| import http from "@/http/api"; | ||||
| export default { | ||||
|     data() { | ||||
|         return { | ||||
|             name: "", | ||||
|             phone: "", | ||||
|             num: "", | ||||
|             checked: [], | ||||
|             fileList: [], | ||||
|             fileList2: [], | ||||
|             video: '', | ||||
|             isfinish: false | ||||
|         }; | ||||
|     }, | ||||
|     onLoad(options) { | ||||
|         this.video = options.tempVideoPath; | ||||
|         this.isfinish = JSON.parse(options.isfinish)||false | ||||
|         this.name =  uni.getStorageSync("info").name | ||||
|         this.num = uni.getStorageSync("info").num | ||||
|         this.fileList = uni.getStorageSync("info").fileList | ||||
|         this.fileList2 = uni.getStorageSync("info").fileList2 | ||||
|         uni.removeStorageSync("info") | ||||
|     }, | ||||
|     methods: { | ||||
|         changeName(value) { | ||||
|             this.name = value; | ||||
|         changePhone(value) { | ||||
|             this.phone = value; | ||||
|         }, | ||||
|         checkPhone(event) { | ||||
|             if (event) { | ||||
|                 this.$common.vefTel(event); | ||||
|             } | ||||
|         }, | ||||
|         changeNum(value) { | ||||
|             this.num = value; | ||||
|         }, | ||||
|         camera() { | ||||
|             const data = { | ||||
|                 num: this.num, | ||||
|                 name: this.name, | ||||
|                 fileList: this.fileList, | ||||
|                 fileList2: this.fileList2 | ||||
|             } | ||||
|         completeRegistration(){ | ||||
|             if (!this.checked.length) return this.$common.msgToast("请阅读并勾选协议"); | ||||
|             uni.navigateTo({ | ||||
|                 url: '/pages/cameraContext/cameraContext' | ||||
|                  url: '/pages/cameraContext/cameraContext' | ||||
|             }); | ||||
|             uni.setStorageSync("info", data) | ||||
|         }, | ||||
|         async completeRegistration() { | ||||
|             if (!this.checked.length) return this.$common.msgToast("请阅读并勾选协议"); | ||||
|             if (!this.checked.length) return this.$common.msgToast("请阅读并勾选协议"); | ||||
|             if (!this.name) return this.$common.msgToast("请输入姓名"); | ||||
|             if (!this.num) return this.$common.msgToast("请输入身份证号"); | ||||
|             if (!this.fileList.length) return this.$common.msgToast("请上传身份证人面像"); | ||||
|             if (!this.fileList2.length) return this.$common.msgToast("请上传身份国徽面"); | ||||
|             if (!this.video) return this.$common.msgToast("请上传人脸识别视频"); | ||||
|             console.log({ | ||||
|                 telNum: uni.getStorageSync("telNum"), | ||||
|                 realNameIDName: this.num, | ||||
|                 realName: this.name, | ||||
|                 video: this.video, | ||||
|                 realIDImgA: this.fileList[0]?.url, | ||||
|                 realIDImgB: this.fileList2[0].url | ||||
|             }) | ||||
|             const res = await this.$api.login.register({user:{ | ||||
|                 telNum: uni.getStorageSync("telNum"), | ||||
|                 realNameIDName: this.num, | ||||
|                 realName: this.name, | ||||
|                 video: this.video, | ||||
|                 realIDImgA: this.fileList[0]?.url, | ||||
|                 realIDImgB: this.fileList2[0]?.url | ||||
|             }}) | ||||
|             if (res.status === 0) { | ||||
|                 uni.navigateTo({ | ||||
|                     url: '/pages/home/index' | ||||
|                 }); | ||||
|             }else{ | ||||
|                 this.$common.msgToast(res.msg) | ||||
|             } | ||||
| 
 | ||||
|         }, | ||||
|         // 删除图片 | ||||
|         deletePic(event) { | ||||
|             this[`fileList`].splice(event.index, 1) | ||||
|         }, | ||||
|         // 删除图片 | ||||
|         deletePic2(event) { | ||||
|             this[`fileList2`].splice(event.index, 1) | ||||
|         }, | ||||
|         // 新增图片 | ||||
|         async afterRead(event) { | ||||
|             // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式 | ||||
|             let lists = [].concat(event.file) | ||||
|             let fileListLen = this[`fileList`].length | ||||
|             lists.map((item) => { | ||||
|                 this[`fileList`].push({ | ||||
|                     ...item, | ||||
|                     status: 'uploading', | ||||
|                     message: '上传中' | ||||
|                 }) | ||||
|             }) | ||||
|             for (let i = 0; i < lists.length; i++) { | ||||
|                 const result = await this.uploadFilePromise(lists[i].url) | ||||
|                 let item = this[`fileList`][fileListLen] | ||||
|                 this[`fileList`].splice(fileListLen, 1, Object.assign(item, { | ||||
|                     status: 'success', | ||||
|                     message: '', | ||||
|                     url: result | ||||
|                 })) | ||||
|                 fileListLen++ | ||||
|             } | ||||
|         }, | ||||
|         async afterRead2(event) { | ||||
|             // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式 | ||||
|             let lists = [].concat(event.file) | ||||
|             let fileListLen = this[`fileList2`].length | ||||
|             lists.map((item) => { | ||||
|                 this[`fileList2`].push({ | ||||
|                     ...item, | ||||
|                     status: 'uploading', | ||||
|                     message: '上传中' | ||||
|                 }) | ||||
|             }) | ||||
|             for (let i = 0; i < lists.length; i++) { | ||||
|                 const result = await this.uploadFilePromise(lists[i].url) | ||||
|                 let item = this[`fileList2`][fileListLen] | ||||
|                 this[`fileList2`].splice(fileListLen, 1, Object.assign(item, { | ||||
|                     status: 'success', | ||||
|                     message: '', | ||||
|                     url: result | ||||
|                 })) | ||||
|                 fileListLen++ | ||||
|             } | ||||
|         }, | ||||
|         uploadFilePromise(url) { | ||||
|             return new Promise((resolve) => { | ||||
|                 uni.uploadFile({ | ||||
|                     url: http.baseUrl + "/api/wxuser/uploadpic", | ||||
|                     filePath: url, | ||||
|                     name: "file", | ||||
|                     success: (res) => { | ||||
|                         res.data = JSON.parse(res.data); | ||||
|                         resolve(res.data.data.path); | ||||
|                     }, | ||||
|                 }); | ||||
|             }); | ||||
|         }, | ||||
|         } | ||||
|     } | ||||
| }; | ||||
| </script> | ||||
| 
 | ||||
| <style lang="scss" scoped> | ||||
| /deep/.u-checkbox__icon-wrap--circle { | ||||
|     width: 25upx !important; | ||||
|     height: 25upx !important; | ||||
|   width: 25upx !important; | ||||
|   height: 25upx !important; | ||||
| } | ||||
| 
 | ||||
| /deep/ .u-checkbox-label--left { | ||||
|     margin-top: 20rpx; | ||||
|   margin-top: 20rpx; | ||||
| } | ||||
| 
 | ||||
| .main { | ||||
|     background: url("@/static/image/login-bg.png") no-repeat; | ||||
|     box-sizing: border-box; | ||||
| @ -345,7 +224,6 @@ export default { | ||||
|         .agreement { | ||||
|             font-size: 28rpx; | ||||
|             margin: 46rpx auto; | ||||
| 
 | ||||
|             .know { | ||||
|                 margin-top: 20upx; | ||||
|                 font-size: 28upx; | ||||
|  | ||||
| @ -54,15 +54,6 @@ export default { | ||||
|       isRight: false | ||||
|     }; | ||||
|   }, | ||||
|   watch: { | ||||
|     phone(newValue) { | ||||
|       if (this.determinePhone !== newValue) { | ||||
|         this.isTrue = true; | ||||
|       } else { | ||||
|         this.isTrue = false; | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     changePhone(value) { | ||||
|       this.phone = value; | ||||
| @ -82,14 +73,9 @@ export default { | ||||
|       } | ||||
|     }, | ||||
|     next() { | ||||
|       if (this.phone !== this.determinePhone) | ||||
|         return this.$common.msgToast("两次输入不一致"); | ||||
|       console.log(this.$common.vefTel(this.phone)); | ||||
|       if (this.$common.vefTel(this.phone)) { | ||||
|         uni.navigateTo({ | ||||
|           url: "/pages/realName/realName" | ||||
|         }); | ||||
|       } | ||||
|       uni.navigateTo({ | ||||
|         url: "/pages/realName/realName" | ||||
|       }); | ||||
|     } | ||||
|   } | ||||
| }; | ||||
|  | ||||
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 34 KiB | 
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 6.3 KiB | 
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 36 KiB | 
		Loading…
	
		Reference in New Issue
	
	Block a user