From c40033ed5c42a9b53865a2006d68e2246f448e90 Mon Sep 17 00:00:00 2001 From: cjb <646858191@qq.com> Date: Sat, 22 Mar 2025 17:35:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 2 +- src/main.ts | 4 +- src/manifest.json | 10 +- src/minePages/account/index.vue | 20 ++-- src/minePages/order/index.vue | 2 +- src/minePages/payment/index.vue | 115 +++++++++++++----- src/minePages/recharge/index.vue | 16 ++- src/minePages/reserlist/index.vue | 191 +++++++++++++++++++++--------- src/minePages/userInfor/index.vue | 4 + src/pages.json | 12 +- src/pages/home/index.vue | 15 +-- src/pages/mine/index.vue | 3 +- src/pages/scanCode/index.vue | 21 ++-- src/utils/request.ts | 4 +- src/utils/service.ts | 21 +++- 15 files changed, 302 insertions(+), 138 deletions(-) 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 @@