diff --git a/src/App.vue b/src/App.vue index b1bc072..7479990 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,5 @@ diff --git a/src/minePages/recharge/index.vue b/src/minePages/recharge/index.vue index 6b30482..94d30bb 100644 --- a/src/minePages/recharge/index.vue +++ b/src/minePages/recharge/index.vue @@ -51,11 +51,18 @@ - \ No newline at end of file diff --git a/src/minePages/userInfor/index.vue b/src/minePages/userInfor/index.vue index a913bb2..ea74bda 100644 --- a/src/minePages/userInfor/index.vue +++ b/src/minePages/userInfor/index.vue @@ -90,6 +90,7 @@ let genderName = ref('') let formdata = reactive({ + wuid:uni.getStorageSync('wxuid'), phoneNumber:'', //手机号 nickName:'', //用户昵称 avatarUrl:'', //用户头像 @@ -221,6 +222,9 @@ title: '保存成功', duration: 2000 }) + setTimeout(() => { + uni.navigateBack() + },2500) }) } }).catch(() => { diff --git a/src/pages.json b/src/pages.json index ee55bea..301a84a 100644 --- a/src/pages.json +++ b/src/pages.json @@ -98,12 +98,12 @@ "selectedIconPath": "static/img/tabbar/home.png", "text": "首页" }, - // { - // "pagePath":"pages/scanCode/index", - // "iconPath": "static/img/tabbar/saom.png", - // "selectedIconPath": "static/img/tabbar/saom.png", - // "text": "扫码换电" - // }, + { + "pagePath":"pages/scanCode/index", + "iconPath": "static/img/tabbar/saom.png", + "selectedIconPath": "static/img/tabbar/saom.png", + "text": "扫码换电" + }, { "pagePath": "pages/mine/index", "iconPath": "static/img/tabbar/wode.png", diff --git a/src/pages/home/index.vue b/src/pages/home/index.vue index 6310662..eb26030 100644 --- a/src/pages/home/index.vue +++ b/src/pages/home/index.vue @@ -28,12 +28,12 @@ {{username()}} - + - {{account.totalAmount?account.totalAmount:0}} + {{account.totalAmount?account.totalAmount/100:0}} 余额 @@ -152,6 +152,7 @@ import { getInfo, getaccou } from '@/utils/service' + let height = ref('') let islogin = ref(false) let PhoneNumber = ref('') @@ -198,7 +199,7 @@ onShow(() => { islogin.value = false PhoneNumber.value = '' covers.value = [] - hdzcode.value = '' + //hdzcode.value = '' imglist.value = [] showxy() } @@ -288,6 +289,7 @@ function getinfo(){ getInfo({ wuid:uni.getStorageSync('wxuid') }).then((rps:any) => { + uni.setStorageSync('userInfor',rps.data) userInfo.phoneNumber = rps.data.phoneNumber?rps.data.phoneNumber:'' userInfo.nickName = rps.data.nickName?rps.data.nickName:'' userInfo.avatarUrl = rps.data.avatarUrl?rps.data.avatarUrl:'' @@ -298,8 +300,8 @@ function getinfo(){ getaccou(uni.getStorageSync('wxuid')).then((rps:any) => { if(rps.data.records){ account.value = rps.data.records[0] - uni.setStorageSync('totalAmount', rps.data.records[0].totalAmount) //?? - uni.setStorageSync('walletCode', rps.data.records[0].code) //?? + uni.setStorageSync('totalAmount', rps.data.records[0].totalAmount) + uni.setStorageSync('walletCode', rps.data.records[0].code) } }) } @@ -323,7 +325,6 @@ function wdltip() { } function getdh() { - console.log(latitude.value,longitude.value) uni.openLocation({ latitude:latitude.value*1, longitude:longitude.value*1, diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue index ff8a2ac..907838f 100644 --- a/src/pages/mine/index.vue +++ b/src/pages/mine/index.vue @@ -10,7 +10,7 @@ - {{totalAmount}} + {{totalAmount/100}} 余额 @@ -177,6 +177,7 @@ import { ref,reactive } from 'vue' import { onShow } from '@dcloudio/uni-app' import { getInfo } from '@/utils/service' + let islogin = ref(false) let PhoneNumber = ref('') diff --git a/src/pages/scanCode/index.vue b/src/pages/scanCode/index.vue index fec63a0..a15382b 100644 --- a/src/pages/scanCode/index.vue +++ b/src/pages/scanCode/index.vue @@ -1,14 +1,15 @@