From 60bc78fe22bcbbc95185ef7635b1be069bf1b7b6 Mon Sep 17 00:00:00 2001 From: LGX <365820713@qq.com> Date: Fri, 2 Aug 2024 10:33:15 +0800 Subject: [PATCH] 1 --- api/request.js | 2 +- pages/face/face.vue | 16 +++++++++++++--- pages/index/index.vue | 28 +++++++++++++++++++++++----- pages/login/login.vue | 3 +-- pages/mendainlist/mendainlist.vue | 26 +++++++++++++++++++++++--- pages/user/index.vue | 25 ++++++++++++++++--------- 6 files changed, 77 insertions(+), 23 deletions(-) diff --git a/api/request.js b/api/request.js index 353e8cb..bd46084 100644 --- a/api/request.js +++ b/api/request.js @@ -1,5 +1,5 @@ import Vue from 'vue' -let baseUrl = 'https://bodybuilding.njrenzhou.cn/'; +let baseUrl = 'https://bodybuilding.bsdong.cn/'; //https://console-docs.apipost.cn/preview/077df998e6b8e954/a3d90a650bdbe292 Vue.prototype.$baseUrl = baseUrl; diff --git a/pages/face/face.vue b/pages/face/face.vue index 8ebc26f..0075479 100644 --- a/pages/face/face.vue +++ b/pages/face/face.vue @@ -15,7 +15,7 @@ - 跳过 + 跳过 拍摄 @@ -52,7 +52,7 @@ // this.$refs.popup.close('center') // var tjlist=[...this.yrenlianlist,...this.jqrllist] uni.uploadFile({ - url: 'https://bodybuilding.njrenzhou.cn/api/uploadFile', + url: 'https://bodybuilding.bsdong.cn/api/uploadFile', filePath:this.path, name: 'file', formData: { @@ -62,7 +62,14 @@ console.log('tjlist',JSON.parse(res.data)); var data=JSON.parse(res.data) this.$api.memberFace({face_id:data.data.file_id}).then(res=>{ - this.$refs.popup.close('center') + if(res.code=='200'){ + uni.showToast({ + icon: "none", + title: '上传成功', + duration: 3000 + }); + this.$refs.popup.close('center') + } }) } }); @@ -79,6 +86,9 @@ console.log(888,this); that.url = res.tempFilePaths[0]; that.yrenlianlist.push(that.url) + }, + fail() { + that.$refs.popup.close('center') } }); }, diff --git a/pages/index/index.vue b/pages/index/index.vue index 93aca60..636fd1b 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -4,9 +4,9 @@ {{city}} - + @@ -24,8 +24,11 @@ {{item.name}} - - {{item.address}} + + + {{item.address}} + + @@ -88,6 +91,20 @@ }, methods: { + handleNavigation(i) { + uni.openLocation({ + longitude:Number(i.longitude), + latitude:Number(i.latitude), + name:i.name, + address: i.address, + success: function(res) { + console.log('打开系统位置地图成功') + }, + fail: function(error) { + console.log(error) + } + }) + }, numberCheck(){ this.$api.numberCheck({number:this.number}).then(res=>{ if(res.data.code==200){ @@ -327,6 +344,7 @@ .mddz2 { margin-top: 32rpx; + display: flex; } .dz { @@ -358,7 +376,7 @@ .mddz { width: 643rpx; - height: 142rpx; + /* height: 142rpx; */ background: #FFFFFF; box-shadow: 0rpx 3rpx 9rpx 0rpx rgba(19, 14, 4, 0.08); border-radius: 20rpx; diff --git a/pages/login/login.vue b/pages/login/login.vue index 8435799..c51c478 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -73,7 +73,7 @@ console.log(123, e); if (e.detail.errMsg == 'getPhoneNumber:ok') { uni.request({ - url: 'https://bodybuilding.njrenzhou.cn/api/wxMinLogin', + url: 'https://bodybuilding.bsdong.cn/api/wxMinLogin', method: 'post', data: { code: this.wxcode, @@ -81,7 +81,6 @@ avatar:'' }, success: (res) => { - console.log(12344, res.data.code); if( res.data.code==200){ // 获得token完成登录 uni.setStorageSync('token', res.data.data.userToken) diff --git a/pages/mendainlist/mendainlist.vue b/pages/mendainlist/mendainlist.vue index d0f3584..82da521 100644 --- a/pages/mendainlist/mendainlist.vue +++ b/pages/mendainlist/mendainlist.vue @@ -10,16 +10,16 @@ - + {{item.name}} - + 地址:{{item.address}} - + @@ -49,6 +49,25 @@ } }, methods: { + handleNavigation(i) { + uni.openLocation({ + longitude:Number(i.longitude), + latitude:Number(i.latitude), + name:i.name, + address: i.address, + success: function(res) { + console.log('打开系统位置地图成功') + }, + fail: function(error) { + console.log(error) + } + }) + }, + makePhoneCall(e){ + uni.makePhoneCall({ + phoneNumber: e //仅为示例 + }); + }, xzmd(item){ if(this.isshouye!='shouye'){ var item=JSON.stringify(item) @@ -61,6 +80,7 @@ uni.navigateBack() }, storeList(page) { + this.mendainlist=[] this.$api.storeList({ page: page }).then(res => { diff --git a/pages/user/index.vue b/pages/user/index.vue index 42d53e2..fa46f5d 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -13,7 +13,7 @@ {{userxixin.nickname?userxixin.nickname:'微信用户'}} {{userxixin.mobile?userxixin.mobile:'暂无手机号'}} - 人脸录入 + {{userxixin.face_id!=0?'已认证':'人脸录入'}} @@ -40,7 +40,7 @@ - + @@ -61,7 +61,7 @@ chooseAvatar(e) { console.log(123, e); }, - + gengx() { uni.navigateTo({ url: "/pages/user/portrait/portrait" @@ -80,18 +80,25 @@ previous() { uni.navigateBack() }, - face() { - uni.navigateTo({ - url: "/pages/face/face" - }) + face(face_id) { + if (face_id != 0) { + uni.showToast({ + icon: "none", + title: '人脸已认证', + duration: 3000 + }); + } else { + uni.navigateTo({ + url: "/pages/face/face" + }) + } + } } }