Compare commits
	
		
			3 Commits
		
	
	
		
			8d9f1d7280
			...
			8375b86499
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 8375b86499 | |||
| 62696009b2 | |||
| 46a6927de9 | 
							
								
								
									
										3
									
								
								App.vue
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								App.vue
									
									
									
									
									
								
							| @ -3,7 +3,7 @@ import tabBar from "./util/tabbar"; | |||||||
| 
 | 
 | ||||||
| export default { | export default { | ||||||
|   onLaunch: function() { |   onLaunch: function() { | ||||||
|     uni.setStorageSync("token",'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJRCI6MCwiT3BlbklkIjoib01qYXY2eFFjQUttUW1ZUTFXV20zOXlCQUZ4byIsIk5pY2tOYW1lIjoiIiwiVGVsTnVtIjoiMTgyMDUwNTI2MjciLCJBdmF0YXIiOiIiLCJJRE51bSI6IiIsImV4cCI6MTY5NTQzNjEwMSwiaXNzIjoibWFsbCJ9.qYzFMtoOOBuawYDTl7iuwlTTz7Fakhr8657PjxWhQ8I') |     // uni.setStorageSync("token",'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJRCI6MCwiT3BlbklkIjoib01qYXY2eFFjQUttUW1ZUTFXV20zOXlCQUZ4byIsIk5pY2tOYW1lIjoiIiwiVGVsTnVtIjoiMTgyMDUwNTI2MjciLCJBdmF0YXIiOiIiLCJJRE51bSI6IiIsImV4cCI6MTY5NTQzNjEwMSwiaXNzIjoibWFsbCJ9.qYzFMtoOOBuawYDTl7iuwlTTz7Fakhr8657PjxWhQ8I') | ||||||
|     uni.hideTabBar(); |     uni.hideTabBar(); | ||||||
|     uni.setStorageSync("tabBar", tabBar); |     uni.setStorageSync("tabBar", tabBar); | ||||||
|   }, |   }, | ||||||
| @ -28,5 +28,4 @@ export default { | |||||||
| .u-border-top { | .u-border-top { | ||||||
|   border: none !important; |   border: none !important; | ||||||
| } | } | ||||||
| 
 |  | ||||||
| </style> | </style> | ||||||
|  | |||||||
| @ -1,6 +1,8 @@ | |||||||
| import login from "./login"; | import login from "./login"; | ||||||
| import deposit from "./deposit"; | import deposit from "./deposit"; | ||||||
|  | import mine from "./mine"; | ||||||
| export default { | export default { | ||||||
|   login, |   login, | ||||||
|   deposit, |   deposit, | ||||||
|  |   mine, | ||||||
| }; | }; | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ | |||||||
|  */ |  */ | ||||||
| export default { | export default { | ||||||
|   config: { |   config: { | ||||||
|     baseUrl: "http://192.168.88.175:9021", |     baseUrl: "http://172.16.100.93:8017", //"http://172.16.100.93:8017", //"http://192.168.88.175:9021",
 | ||||||
|     header: { |     header: { | ||||||
|       "Content-Type": "application/json;charset=UTF-8", |       "Content-Type": "application/json;charset=UTF-8", | ||||||
|       // 'Content-Type':'application/x-www-form-urlencoded'
 |       // 'Content-Type':'application/x-www-form-urlencoded'
 | ||||||
|  | |||||||
							
								
								
									
										34
									
								
								http/mine.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								http/mine.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,34 @@ | |||||||
|  | import http from "./interface"; | ||||||
|  | 
 | ||||||
|  | const infoOrders = () => { | ||||||
|  |   return http.request({ | ||||||
|  |     url: "/api/warehouse/static/info", | ||||||
|  |     method: "POST", | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  | const info = () => { | ||||||
|  |   return http.request({ | ||||||
|  |     url: "/api/wxuser/info", | ||||||
|  |     method: "POST", | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  | // 更新信息
 | ||||||
|  | const update = (data) => { | ||||||
|  |   return http.request({ | ||||||
|  |     url: "/api/wxuser/update", | ||||||
|  |     method: "POST", | ||||||
|  |     data, | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  | const logout = () => { | ||||||
|  |   return http.request({ | ||||||
|  |     url: "/api/wxuser/remove", | ||||||
|  |     method: "POST", | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  | export default { | ||||||
|  |   infoOrders, | ||||||
|  |   info, | ||||||
|  |   update, | ||||||
|  |   logout, | ||||||
|  | }; | ||||||
| @ -8,9 +8,9 @@ | |||||||
|         <image src="@/static/image/write.png" mode="scaleToFill" style="width: 63rpx;height: 62rpx" /> |         <image src="@/static/image/write.png" mode="scaleToFill" style="width: 63rpx;height: 62rpx" /> | ||||||
|         <view style="color: #fff;margin-top:10rpx">填写下单</view> |         <view style="color: #fff;margin-top:10rpx">填写下单</view> | ||||||
|       </view> |       </view> | ||||||
|       <view class="order-item" style="background:#76C458 ;"> |       <view class="order-item" style="background:#76C458;" @click.stop="scanOrder"> | ||||||
|         <image src="@/static/image/scan.png" mode="scaleToFill" style="width: 57rpx;height: 57rpx" /> |         <image src="@/static/image/scan.png" mode="scaleToFill" style="width: 57rpx;height: 57rpx" /> | ||||||
|         <view style="color: #fff;margin-top:10rpx" @click="scanOrder">扫码下单</view> |         <view style="color: #fff;margin-top:10rpx">扫码下单</view> | ||||||
|       </view> |       </view> | ||||||
|     </view> |     </view> | ||||||
|     <view class="list"> |     <view class="list"> | ||||||
| @ -83,7 +83,7 @@ export default { | |||||||
|   display: flex; |   display: flex; | ||||||
|   flex-direction: column; |   flex-direction: column; | ||||||
|   align-items: center; |   align-items: center; | ||||||
|   padding: 10rpx 30rpx 30rpx 30rpx; |   padding: 0 30rpx; | ||||||
| 
 | 
 | ||||||
|   .order { |   .order { | ||||||
|     width: 100%; |     width: 100%; | ||||||
|  | |||||||
| @ -7,7 +7,8 @@ | |||||||
|         open-type="getPhoneNumber" |         open-type="getPhoneNumber" | ||||||
|         @getphonenumber="getPhoneNumber" |         @getphonenumber="getPhoneNumber" | ||||||
|         color="transparent" |         color="transparent" | ||||||
|       >点击登录</u-button> |         text="点击登录" | ||||||
|  |       ></u-button> | ||||||
|     </view> |     </view> | ||||||
|     <!-- <view class="btn"> |     <!-- <view class="btn"> | ||||||
|       <u-button v-if="isLogoutShow" @click="login" color="transparent">点击登录</u-button> |       <u-button v-if="isLogoutShow" @click="login" color="transparent">点击登录</u-button> | ||||||
| @ -21,73 +22,88 @@ export default { | |||||||
|     return { |     return { | ||||||
|       code: "", |       code: "", | ||||||
|       openId: "", |       openId: "", | ||||||
|       isShow: true, |       isShow: false, | ||||||
|       isLogoutShow: true |       isNew: false | ||||||
|     }; |     }; | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     async getPhoneNumber(e) { |     async getPhoneNumber(e) { | ||||||
|       console.log(e); |  | ||||||
|       if (e.detail.errMsg == "getPhoneNumber:ok") { |       if (e.detail.errMsg == "getPhoneNumber:ok") { | ||||||
|         // 用户允许或去手机号 |         // 用户允许或去手机号 | ||||||
|         let res = await this.$api.login.getTel({ code: e.detail.code }); |         let res = await this.$api.login.getTel({ code: e.detail.code }); | ||||||
|         if (res.status == 0) { |         if (res.status == 0) { | ||||||
|           uni.setStorageSync("telNum", res.data.telNum); |           uni.setStorageSync("telNum", res.data.telNum); | ||||||
|           uni.redirectTo({ |           console.log(1231111111, this.isNew); | ||||||
|             url: "/pages/realName/realName" |           if (this.isNew) { | ||||||
|           }); |             uni.reLaunch({ | ||||||
|  |               url: "/pages/realName/realName" | ||||||
|  |             }); | ||||||
|  |           } else { | ||||||
|  |             uni.reLaunch({ | ||||||
|  |               url: "/pages/home/index" | ||||||
|  |             }); | ||||||
|  |           } | ||||||
|         } else { |         } else { | ||||||
|           this.$common.msgToast(res.msg); |           this.$common.msgToast(res.msg); | ||||||
|         } |         } | ||||||
|       } else { |       } else { | ||||||
|         this.$common.msgToast("请不要拒绝哟~重新点击登录"); |         this.$common.msgToast("请不要拒绝哟~重新点击登录"); | ||||||
|       } |       } | ||||||
|  |     }, | ||||||
|  |     //获取openId | ||||||
|  |     async getOpenId() { | ||||||
|  |       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) { | ||||||
|  |             this.isShow = true; | ||||||
|  |             this.isNew = res1.data.accountInfo.isNew; | ||||||
|  |             uni.setStorageSync("token", res1.data.token); | ||||||
|  |             // if (res1.data.accountInfo.isNew) { | ||||||
|  |             //   this.openId = res1.data.accountInfo.openId; | ||||||
|  |             //   uni.setStorageSync("token", res1.data.token); | ||||||
|  |             //   uni.reLaunch({ | ||||||
|  |             //     url: "/pages/realName/realName" | ||||||
|  |             //   }); | ||||||
|  |             // } else { | ||||||
|  |             //   uni.setStorageSync("token", res1.data.token); | ||||||
|  |             //   uni.reLaunch({ | ||||||
|  |             //     url: "/pages/home/index" | ||||||
|  |             //   }); | ||||||
|  |             // } | ||||||
|  |           } else { | ||||||
|  |             this.$common.msgToast(res1.msg); | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     // info判断用户是401就让他获取openId | ||||||
|  |     async info() { | ||||||
|  |       const res = await this.$api.mine.info(); | ||||||
|  |       if (res.status === 0) { | ||||||
|  |         if (res.data.isNew) { | ||||||
|  |           //登录未注册 | ||||||
|  |           uni.reLaunch({ | ||||||
|  |             url: "/pages/realName/realName" | ||||||
|  |           }); | ||||||
|  |         } else { | ||||||
|  |           //登录已注册 | ||||||
|  |           uni.reLaunch({ | ||||||
|  |             url: "/pages/home/index" | ||||||
|  |           }); | ||||||
|  |         } | ||||||
|  |       } else if (res.status === 401) { | ||||||
|  |         this.getOpenId(); | ||||||
|  |       } else { | ||||||
|  |         this.$common.msgToast(res.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() { |   onLoad() { | ||||||
|     uni.login({ |     this.info(); | ||||||
|       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); |  | ||||||
|           } else { |  | ||||||
|             uni.setStorageSync("token", res1.data.token); |  | ||||||
|             uni.redirectTo({ |  | ||||||
|               url: "/pages/home/index" |  | ||||||
|             }); |  | ||||||
|           } |  | ||||||
|         } else { |  | ||||||
|           this.$common.msgToast(res1.msg); |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
| </script> | </script> | ||||||
|  | |||||||
| @ -4,12 +4,12 @@ | |||||||
| <div class="mine" :style="{background:'url('+'../../static/bbj1@3x.png'+')'}"> | <div class="mine" :style="{background:'url('+'../../static/bbj1@3x.png'+')'}"> | ||||||
|   <div class="content1"> |   <div class="content1"> | ||||||
|     <div class="wrap1"> |     <div class="wrap1"> | ||||||
|       <div class="wrap1_1">203</div> |       <div class="wrap1_1">{{orderTotal}}</div> | ||||||
|       <div class="wrap1_2">当前订单总量</div> |       <div class="wrap1_2">当前订单总量</div> | ||||||
|     </div> |     </div> | ||||||
|     <div class="wrap2"></div> |     <div class="wrap2"></div> | ||||||
|     <div class="wrap3"> |     <div class="wrap3"> | ||||||
|       <div class="wrap3_1">19</div> |       <div class="wrap3_1">{{validContractDays}}</div> | ||||||
|       <div class="wrap3_2">当前有效合同数</div> |       <div class="wrap3_2">当前有效合同数</div> | ||||||
|     </div> |     </div> | ||||||
|   </div> |   </div> | ||||||
| @ -20,13 +20,13 @@ | |||||||
|       </div> |       </div> | ||||||
|       <div class="wrap1_2"> |       <div class="wrap1_2"> | ||||||
|         <div class="wrap1_2_1"> |         <div class="wrap1_2_1"> | ||||||
|           <div class="wrap1_2_1_1">某某某</div> |           <div class="wrap1_2_1_1">{{nickName}}</div> | ||||||
|           <div class="wrap1_2_1_2">已实名</div> |           <div class="wrap1_2_1_2">已实名</div> | ||||||
|         </div> |         </div> | ||||||
|         <div class="wrap1_2_2">178273938123</div> |         <div class="wrap1_2_2">{{telNum}}</div> | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
|     <div class="wrap2"> |     <div class="wrap2" @click="goSet" > | ||||||
|       <div class="wrap2_1"> |       <div class="wrap2_1"> | ||||||
|         <image src="../../static/zu609@3x.png"></image> |         <image src="../../static/zu609@3x.png"></image> | ||||||
|       </div> |       </div> | ||||||
| @ -44,7 +44,44 @@ export default { | |||||||
|   onLoad() { |   onLoad() { | ||||||
|     uni.hideTabBar() |     uni.hideTabBar() | ||||||
|   }, |   }, | ||||||
|   components: {tabbar} |   components: {tabbar}, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       orderTotal:0, | ||||||
|  |       validContractDays:0, | ||||||
|  |       nickName:'', | ||||||
|  |       telNum:'' | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   onLoad(){ | ||||||
|  |     this.infoOrders() | ||||||
|  |     this.info() | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     async infoOrders(){ | ||||||
|  |       const res = await this.$api.mine.infoOrders() | ||||||
|  |       if(res.status === 0){ | ||||||
|  |         this.orderTotal = res.data.totalCount | ||||||
|  |         this.validContractDays = res.data.nowCount | ||||||
|  |       }else{ | ||||||
|  |         this.$common.msgToast(res.msg); | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     async info(){ | ||||||
|  |       const res = await this.$api.mine.info() | ||||||
|  |       if(res.status === 0){ | ||||||
|  |         this.nickName = res.data.user.nickName | ||||||
|  |         this.telNum = res.data.user.telNum | ||||||
|  |       }else{ | ||||||
|  |         this.$common.msgToast(res.msg); | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     goSet(){ | ||||||
|  |       uni.navigateTo({ | ||||||
|  |          url: '/pages/mine/set-up' | ||||||
|  |       }); | ||||||
|  |     } | ||||||
|  |   }, | ||||||
| } | } | ||||||
| </script> | </script> | ||||||
| <style scoped lang="scss"> | <style scoped lang="scss"> | ||||||
|  | |||||||
| @ -1,76 +1,141 @@ | |||||||
| <template> | <template> | ||||||
| <div class="set-up" > |   <div class="set-up"> | ||||||
|   <title-block title="设置"> |     <title-block title="设置"> | ||||||
|     <template #left> |       <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"></image></div> |         <div> | ||||||
|     </template> |           <image style="width: 112rpx;height: 52rpx" | ||||||
|   </title-block> |           src="https://cdns.fontree.cn/fonchain-main/prod/image/default/artwork/785cf885-c4c9-44b3-8155-4b39988c7ef8.png" @click="back"> | ||||||
|   <div class="content2"> |           </image> | ||||||
|     <div class="wrap1"> |  | ||||||
|       <image src="../../static/06@3x.png"></image> |  | ||||||
|     </div> |  | ||||||
|     <div class="wrap2"> |  | ||||||
|       <div class="wrap2_1">恢复默认头像</div> |  | ||||||
|       <div class="wrap2_2">更换头像</div> |  | ||||||
|     </div> |  | ||||||
|   </div> |  | ||||||
|   <div class="content3"> |  | ||||||
|     <div class="wrap1"> |  | ||||||
|       <div class="wrap1_1"> |  | ||||||
|         <div class="wrap1_1_1">画作编号</div> |  | ||||||
|         <div class="wrap1_1_2"></div> |  | ||||||
|         <div class="wrap1_1_3"> |  | ||||||
|           <input placeholder-style="color: #939393;font-size: 24rpx;"  placeholder="画作编号" /> |  | ||||||
|         </div> |         </div> | ||||||
|         <div class="wrap1_1_4"></div> |       </template> | ||||||
|  |     </title-block> | ||||||
|  |     <div class="content2"> | ||||||
|  |       <div class="wrap1"> | ||||||
|  |         <image :src="user.avatar ? user.avatar:'https://cdns.fontree.cn/fonchain-main/prod/image/407e7c22-eb62-411e-957b-b6c296fde530/artwork/814ac246-e1eb-49fe-beee-dd53aaf5d309.png'" mode="scaleToFill"></image> | ||||||
|       </div> |       </div> | ||||||
|       <div class="wrap1_1"> |       <div class="wrap2"> | ||||||
|         <div class="wrap1_1_1">画作名称</div> |         <div class="wrap2_1" @click="backDafult">恢复默认头像</div> | ||||||
|         <div class="wrap1_1_2"></div> |         <u-upload :fileList="fileList" name="1" multiple :maxCount="1" @afterRead="changeAvatar"> | ||||||
|         <div class="wrap1_1_3"> |           <view style="width:348rpx;height:56rpx;margin-top:20rpx"> | ||||||
|           <input placeholder-style="color: #939393;font-size: 24rpx;"  placeholder="画作名称" /> |             <u-button text="更换头像" shape="circle" class="size" color="#76C458"></u-button> | ||||||
|         </div> |           </view> | ||||||
|         <div class="wrap1_1_4"></div> |         </u-upload> | ||||||
|       </div> |  | ||||||
|       <div class="wrap1_1"> |  | ||||||
|         <div class="wrap1_1_1">画家名称</div> |  | ||||||
|         <div class="wrap1_1_2"></div> |  | ||||||
|         <div class="wrap1_1_3"> |  | ||||||
|           <input placeholder-style="color: #939393;font-size: 24rpx;"  placeholder="画家名称" /> |  | ||||||
|         </div> |  | ||||||
|         <div class="wrap1_1_4"> |  | ||||||
|         </div> |  | ||||||
|       </div> |  | ||||||
|       <div class="wrap1_1"> |  | ||||||
|         <div class="wrap1_1_1">画作平尺数</div> |  | ||||||
|         <div class="wrap1_1_2"></div> |  | ||||||
|         <div class="wrap1_1_3"> |  | ||||||
|           <input placeholder-style="color: #939393;font-size: 24rpx;"  placeholder="画作平尺数" /> |  | ||||||
|         </div> |  | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
|     <div class="wrap2"></div> |     <div class="content3"> | ||||||
|  |       <div class="wrap1"> | ||||||
|  |         <div class="wrap1_1"> | ||||||
|  |           <div class="wrap1_1_1">姓名</div> | ||||||
|  |           <div class="wrap1_1_2">{{ user.nickName }}</div> | ||||||
|  |           <div class="wrap1_1_3"> | ||||||
|  |             <view></view> | ||||||
|  |           </div> | ||||||
|  |           <div class="wrap1_1_4"></div> | ||||||
|  |         </div> | ||||||
|  |         <div class="wrap1_1"> | ||||||
|  |           <div class="wrap1_1_1">身份证号码</div> | ||||||
|  |           <div class="wrap1_1_2">{{ user.iDNum }}</div> | ||||||
|  |           <div class="wrap1_1_3"> | ||||||
|  |             <view></view> | ||||||
|  |           </div> | ||||||
|  |           <div class="wrap1_1_4"></div> | ||||||
|  |         </div> | ||||||
|  |         <div class="wrap1_1"> | ||||||
|  |           <div class="wrap1_1_1">手机号</div> | ||||||
|  |           <div class="wrap1_1_2">{{ user.telNum }}</div> | ||||||
|  |           <div class="wrap1_1_3"> | ||||||
|  |             <view></view> | ||||||
|  |           </div> | ||||||
|  |         </div> | ||||||
|  |       </div> | ||||||
|  |       <div class="wrap2"></div> | ||||||
|  |     </div> | ||||||
|  |     <div class="content4"> | ||||||
|  |       <div class="wrap1" @click="logout">注销账号</div> | ||||||
|  |       <div class="wrap2" @click="quit">退出登录</div> | ||||||
|  |     </div> | ||||||
|   </div> |   </div> | ||||||
|   <div class="content4"> |  | ||||||
|     <div class="wrap1">注销账号</div> |  | ||||||
|     <div class="wrap2">退出登录</div> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| </template> | </template> | ||||||
| <script> | <script> | ||||||
|  | import http from "@/http/api"; | ||||||
| export default { | export default { | ||||||
|   name: "set-up", |   name: "set-up", | ||||||
|   data(){ |   data() { | ||||||
|     return{ |     return { | ||||||
|       statusBarHeight:uni.getSystemInfoSync().statusBarHeight+10 |       user: {} | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   onLoad() { | ||||||
|  |     this.info() | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     async info() { | ||||||
|  |       const res = await this.$api.mine.info() | ||||||
|  |       if (res.status === 0) { | ||||||
|  |         this.user = res.data.user | ||||||
|  |       } else { | ||||||
|  |         this.$common.msgToast(res.msg); | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     changeAvatar(file) { | ||||||
|  |       console.log(file) | ||||||
|  |       this.uploadFilePromise(file.file[0].url); | ||||||
|  |     }, | ||||||
|  |     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); | ||||||
|  |             this.updateInfo({ | ||||||
|  |               avatar: res.data.data.path, | ||||||
|  |             }); | ||||||
|  |           }, | ||||||
|  |         }); | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |    async updateInfo(data){ | ||||||
|  | 			let res = await this.$api.mine.update(data); | ||||||
|  | 			if (res.status === 0) { | ||||||
|  |         this.$common.msgToast('修改成功'); | ||||||
|  | 				this.info(); | ||||||
|  | 			} else { | ||||||
|  | 				    this.$common.msgToast(res.msg); | ||||||
|  | 			} | ||||||
|  |     }, | ||||||
|  |     backDafult() { | ||||||
|  | 			this.updateInfo({ | ||||||
|  | 				avatar: "https://cdns.fontree.cn/fonchain-main/prod/image/407e7c22-eb62-411e-957b-b6c296fde530/artwork/814ac246-e1eb-49fe-beee-dd53aaf5d309.png", | ||||||
|  | 			}); | ||||||
|  | 		}, | ||||||
|  |     quit(){ | ||||||
|  |       uni.clearStorageSync(); | ||||||
|  |       uni.navigateTo({ | ||||||
|  |         url: '/pages/login/login' | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |    async logout(){ | ||||||
|  | 			let res = await this.$api.mine.logout(); | ||||||
|  | 			if (res.status === 0) { | ||||||
|  |         this.$common.msgToast('注销成功'); | ||||||
|  | 				this.quit(); | ||||||
|  | 			} else { | ||||||
|  | 				    this.$common.msgToast(res.msg); | ||||||
|  | 			} | ||||||
|  |     }, | ||||||
|  |     back(){ | ||||||
|  |       uni.navigateBack({ | ||||||
|  |          delta: 2 | ||||||
|  |       }); | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   mounted(){ |  | ||||||
|   } |  | ||||||
| } | } | ||||||
| </script> | </script> | ||||||
| <style scoped lang="scss"> | <style scoped lang="scss"> | ||||||
| .set-up{ | .set-up { | ||||||
|   background-image: url("https://cdns.fontree.cn/fonchain-main/prod/image/default/artwork/4fdc9a0f-d72a-46b6-a04d-ed56d5465213.png"); |   background-image: url("https://cdns.fontree.cn/fonchain-main/prod/image/default/artwork/4fdc9a0f-d72a-46b6-a04d-ed56d5465213.png"); | ||||||
|   position: relative; |   position: relative; | ||||||
|   box-sizing: border-box; |   box-sizing: border-box; | ||||||
| @ -80,13 +145,15 @@ export default { | |||||||
|   background-size: cover; |   background-size: cover; | ||||||
|   width: 100vw; |   width: 100vw; | ||||||
|   height: 100vh; |   height: 100vh; | ||||||
|   .content4{ | 
 | ||||||
| left: 50%; |   .content4 { | ||||||
|  |     left: 50%; | ||||||
|     transform: translateX(-50%); |     transform: translateX(-50%); | ||||||
|     bottom: 104rpx; |     bottom: 104rpx; | ||||||
|     position: absolute; |     position: absolute; | ||||||
|     display: flex; |     display: flex; | ||||||
|     .wrap2{ | 
 | ||||||
|  |     .wrap2 { | ||||||
|       margin-left: 38rpx; |       margin-left: 38rpx; | ||||||
|       color: #fff; |       color: #fff; | ||||||
|       display: flex; |       display: flex; | ||||||
| @ -98,7 +165,8 @@ left: 50%; | |||||||
|       height: 56rpx; |       height: 56rpx; | ||||||
|       background: #3E3E3E; |       background: #3E3E3E; | ||||||
|     } |     } | ||||||
|     .wrap1{ | 
 | ||||||
|  |     .wrap1 { | ||||||
|       color: #fff; |       color: #fff; | ||||||
|       display: flex; |       display: flex; | ||||||
|       justify-content: center; |       justify-content: center; | ||||||
| @ -110,21 +178,24 @@ left: 50%; | |||||||
|       background: #ED6666; |       background: #ED6666; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   .content2{ | 
 | ||||||
|  |   .content2 { | ||||||
|     margin-top: 60rpx; |     margin-top: 60rpx; | ||||||
|     display: flex; |     display: flex; | ||||||
|     align-items: center; |     align-items: center; | ||||||
|     justify-content: center; |     justify-content: center; | ||||||
|     .wrap1{ | 
 | ||||||
|       image{ |     .wrap1 { | ||||||
|  |       image { | ||||||
|         height: 154rpx; |         height: 154rpx; | ||||||
|         width: 154rpx; |         width: 154rpx; | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|     .wrap2{ | 
 | ||||||
|  |     .wrap2 { | ||||||
|       margin-left: 42rpx; |       margin-left: 42rpx; | ||||||
| 
 | 
 | ||||||
|       .wrap2_2{ |       .wrap2_2 { | ||||||
|         margin-top: 20rpx; |         margin-top: 20rpx; | ||||||
|         display: flex; |         display: flex; | ||||||
|         justify-content: center; |         justify-content: center; | ||||||
| @ -136,31 +207,35 @@ left: 50%; | |||||||
|         background: #76C458; |         background: #76C458; | ||||||
|         border-radius: 40rpx; |         border-radius: 40rpx; | ||||||
|       } |       } | ||||||
| .wrap2_1{ | 
 | ||||||
|   display: flex; |       .wrap2_1 { | ||||||
|   justify-content: center; |         display: flex; | ||||||
|   align-items: center; |         justify-content: center; | ||||||
|   width: 348rpx; |         align-items: center; | ||||||
|   height: 56rpx; |         width: 348rpx; | ||||||
|   color: #fff; |         height: 56rpx; | ||||||
|   font-size: 32rpx; |         color: #fff; | ||||||
|   background: #000; |         font-size: 32rpx; | ||||||
|   border-radius: 40rpx; |         background: #000; | ||||||
| } |         border-radius: 40rpx; | ||||||
|  |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   .content3{ |   .content3 { | ||||||
|     margin-top: 60rpx; |     margin-top: 60rpx; | ||||||
|     .wrap1{ | 
 | ||||||
|  |     .wrap1 { | ||||||
|       border: 1rpx dashed #DFE9F0; |       border: 1rpx dashed #DFE9F0; | ||||||
|       background-color: #fff; |       background-color: #fff; | ||||||
|       .wrap1_1{ | 
 | ||||||
|  |       .wrap1_1 { | ||||||
|         position: relative; |         position: relative; | ||||||
|         height: 114rpx; |         height: 114rpx; | ||||||
|         display: flex; |         display: flex; | ||||||
|         align-items: center; |         align-items: center; | ||||||
|         .wrap1_1_4{ | 
 | ||||||
|  |         .wrap1_1_4 { | ||||||
|           left: 50%; |           left: 50%; | ||||||
|           transform: translateX(-50%); |           transform: translateX(-50%); | ||||||
|           bottom: 0; |           bottom: 0; | ||||||
| @ -169,14 +244,18 @@ left: 50%; | |||||||
|           width: 636rpx; |           width: 636rpx; | ||||||
|           border-bottom: 0.5px solid #626262; |           border-bottom: 0.5px solid #626262; | ||||||
|         } |         } | ||||||
|         .wrap1_1_2{ | 
 | ||||||
|  |         .wrap1_1_2 { | ||||||
|           margin-right: 36rpx; |           margin-right: 36rpx; | ||||||
|           width: 0; |           width: 0; | ||||||
|           height: 66rpx; |           height: 66rpx; | ||||||
|           border-left: 0.5px solid #626262; |           border-left: 0.5px solid #626262; | ||||||
| 
 |           line-height: 66rpx; | ||||||
|  |           width: 100%; | ||||||
|  |           padding-left: 20rpx; | ||||||
|         } |         } | ||||||
|         .wrap1_1_1{ | 
 | ||||||
|  |         .wrap1_1_1 { | ||||||
|           width: 210rpx; |           width: 210rpx; | ||||||
|           padding-left: 32rpx; |           padding-left: 32rpx; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -7,7 +7,7 @@ | |||||||
|             <view class="head"> |             <view class="head"> | ||||||
|                 <view style="display:flex; align-items: center;"> |                 <view style="display:flex; align-items: center;"> | ||||||
|                     <view class="title">注册手机号</view> |                     <view class="title">注册手机号</view> | ||||||
|                     <view :style="{ fontSize: '18rpx' }">*实名认证失败</view> |                     <!-- <view :style="{ fontSize: '18rpx' }">*实名认证失败</view> --> | ||||||
|                     <!-- <view>*实名认证成功</view> --> |                     <!-- <view>*实名认证成功</view> --> | ||||||
|                 </view> |                 </view> | ||||||
|                 <view style="color:#7FA770;font-size:24rpx;margin-left:36rpx">此实名仅用于注册该小程序</view> |                 <view style="color:#7FA770;font-size:24rpx;margin-left:36rpx">此实名仅用于注册该小程序</view> | ||||||
| @ -59,6 +59,17 @@ | |||||||
|                     <u-icon name="checkmark-circle" color="#fff"></u-icon> |                     <u-icon name="checkmark-circle" color="#fff"></u-icon> | ||||||
|                 </view> |                 </view> | ||||||
|             </view> |             </view> | ||||||
|  |             <view class="face"> | ||||||
|  |                 <view class="faceTitle">法大大认证</view> | ||||||
|  |                 <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"> | ||||||
|  |                     <view style="color: #fff;margin-right:10rpx">认证成功</view> | ||||||
|  |                     <u-icon name="checkmark-circle" color="#fff"></u-icon> | ||||||
|  |                 </view> --> | ||||||
|  |             </view> | ||||||
|             <view class="agreement"> |             <view class="agreement"> | ||||||
|                 <u-checkbox-group v-model="checked" iconPlacement="left" placement="row" inactiveColor="#76C458"> |                 <u-checkbox-group v-model="checked" iconPlacement="left" placement="row" inactiveColor="#76C458"> | ||||||
|                     <u-checkbox name="yes" shape="circle" activeColor="#76C458"></u-checkbox> |                     <u-checkbox name="yes" shape="circle" activeColor="#76C458"></u-checkbox> | ||||||
| @ -90,12 +101,15 @@ export default { | |||||||
|         }; |         }; | ||||||
|     }, |     }, | ||||||
|     onLoad(options) { |     onLoad(options) { | ||||||
|         this.video = options.tempVideoPath; |         if(options.tempVideoPath){ | ||||||
|         this.isfinish = JSON.parse(options.isfinish)||false |             this.isfinish = JSON.parse(options.isfinish)||false | ||||||
|         this.name =  uni.getStorageSync("info").name |             this.video = options.tempVideoPath; | ||||||
|         this.num = uni.getStorageSync("info").num |            this.uploadFilePromise(options.tempVideoPath,'video') | ||||||
|         this.fileList = uni.getStorageSync("info").fileList |         } | ||||||
|         this.fileList2 = uni.getStorageSync("info").fileList2 |         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") |         uni.removeStorageSync("info") | ||||||
|     }, |     }, | ||||||
|     methods: { |     methods: { | ||||||
| @ -142,7 +156,7 @@ export default { | |||||||
|                 realIDImgB: this.fileList2[0]?.url |                 realIDImgB: this.fileList2[0]?.url | ||||||
|             }}) |             }}) | ||||||
|             if (res.status === 0) { |             if (res.status === 0) { | ||||||
|                 uni.navigateTo({ |                 uni.switchTab({ | ||||||
|                     url: '/pages/home/index' |                     url: '/pages/home/index' | ||||||
|                 }); |                 }); | ||||||
|             }else{ |             }else{ | ||||||
| @ -203,15 +217,20 @@ export default { | |||||||
|                 fileListLen++ |                 fileListLen++ | ||||||
|             } |             } | ||||||
|         }, |         }, | ||||||
|         uploadFilePromise(url) { |         uploadFilePromise(url,type=null) { | ||||||
|  |             console.log(url) | ||||||
|             return new Promise((resolve) => { |             return new Promise((resolve) => { | ||||||
|                 uni.uploadFile({ |                 uni.uploadFile({ | ||||||
|                     url: http.baseUrl + "/api/wxuser/uploadpic", |                     url: http.baseUrl + "/api/wxuser/uploadpic", | ||||||
|                     filePath: url, |                     filePath: url, | ||||||
|                     name: "file", |                     name: "file", | ||||||
|                     success: (res) => { |                     success: (res) => { | ||||||
|  |                         console.log(9999999999999999999,res) | ||||||
|                         res.data = JSON.parse(res.data); |                         res.data = JSON.parse(res.data); | ||||||
|                         resolve(res.data.data.path); |                         resolve(res.data.data.path); | ||||||
|  |                         if(type ==='video'){ | ||||||
|  |                             this.video = res.data.data.path | ||||||
|  |                         } | ||||||
|                     }, |                     }, | ||||||
|                 }); |                 }); | ||||||
|             }); |             }); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user