From 030f0e0771f9825cead8c9a7d13ad337c0614642 Mon Sep 17 00:00:00 2001 From: ywk <317226901@qq.com> Date: Mon, 14 Apr 2025 09:44:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(mine/bonus):=20=E6=88=91=E7=9A=84=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=A5=96=E8=A1=94=E7=9B=B8=E5=85=B3=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=8F=98=E6=9B=B4=EF=BC=8C=E5=A5=96=E9=87=91?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E6=9F=A5=E7=9C=8B=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/bonus/ckkj.vue | 4 +- components/bonus/fgqsy.vue | 4 +- components/bonus/fgsy.vue | 4 +- components/bonus/hfsy.vue | 4 +- components/bonus/hignfsy.vue | 4 +- components/bonus/sgsy.vue | 4 +- pages/makerspaceView/energySiloDetail.vue | 2 +- pages/mine/index.vue | 71 +-- pages/userData/index.vue | 593 +++++++++++----------- 9 files changed, 318 insertions(+), 372 deletions(-) diff --git a/components/bonus/ckkj.vue b/components/bonus/ckkj.vue index f490781..e32afe8 100644 --- a/components/bonus/ckkj.vue +++ b/components/bonus/ckkj.vue @@ -69,11 +69,11 @@ {{ item.makerRealSubtotal | toThousandthAndKeepDecimal }} - + diff --git a/components/bonus/fgqsy.vue b/components/bonus/fgqsy.vue index 13f40b9..173dd99 100644 --- a/components/bonus/fgqsy.vue +++ b/components/bonus/fgqsy.vue @@ -71,11 +71,11 @@ {{item.repurCouponSubtotal | numberToCurrency}} - + diff --git a/components/bonus/fgsy.vue b/components/bonus/fgsy.vue index 507ac49..b9c619a 100644 --- a/components/bonus/fgsy.vue +++ b/components/bonus/fgsy.vue @@ -87,11 +87,11 @@ {{item.repurRealSubtotal | toThousandthAndKeepDecimal}} - + diff --git a/components/bonus/hfsy.vue b/components/bonus/hfsy.vue index f853d1a..70a2e52 100644 --- a/components/bonus/hfsy.vue +++ b/components/bonus/hfsy.vue @@ -63,11 +63,11 @@ {{item.realIncomeTotal| numberToCurrency}} - + diff --git a/components/bonus/hignfsy.vue b/components/bonus/hignfsy.vue index 1f060c6..c2cf986 100644 --- a/components/bonus/hignfsy.vue +++ b/components/bonus/hignfsy.vue @@ -63,11 +63,11 @@ {{item.hiFunRealSubtotal | numberToCurrency}} - + diff --git a/components/bonus/sgsy.vue b/components/bonus/sgsy.vue index 88d8043..86eaa68 100644 --- a/components/bonus/sgsy.vue +++ b/components/bonus/sgsy.vue @@ -120,11 +120,11 @@ {{item.purRealSubtotal| toThousandthAndKeepDecimal}} - + diff --git a/pages/makerspaceView/energySiloDetail.vue b/pages/makerspaceView/energySiloDetail.vue index 303badc..207fd44 100644 --- a/pages/makerspaceView/energySiloDetail.vue +++ b/pages/makerspaceView/energySiloDetail.vue @@ -16,7 +16,7 @@ {{item.gradeName}} - {{'真实奖衔'}} + {{'荣誉奖衔'}} {{item.awardsName}} diff --git a/pages/mine/index.vue b/pages/mine/index.vue index 2af7ed6..63c6c1e 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -43,8 +43,8 @@ - {{ '真实奖衔' }}: - {{ awards.awardsName }} + {{ '荣誉奖衔' }}: + {{ awardsList.awardsName }} @@ -64,73 +64,6 @@ --> - - - 恭喜您!已达成 - {{ awards.awardsName }} - 奖衔,冲刺 - {{ awards.pkTransactionVal }} - 奖衔,小区仅需 - - {{ - (awards.targetPv - awards.sumRealPv > 0 - ? awards.targetPv - awards.sumRealPv - : "0.00") | toThousandthAndKeepDecimal - }}{{ '万' }} - - - 恭喜您!已达标当月最高奖衔 - {{ awards.awardsName }} - !记得保持哦! - - - - - 恭喜您!已达成 - {{ awards.awardsName }} - 奖衔,冲刺 - {{ awards.pkTransactionVal }} - 奖衔,小区仅需 - - {{ - (awards.targetPv - awards.sumRealPv > 0 - ? awards.targetPv - awards.sumRealPv - : "0.00") | toThousandthAndKeepDecimal - }}{{ '万' }} - - - 恭喜您!已达标当月最高奖衔 - {{ awards.awardsName }} - !记得保持哦! - - - - {{ '当月奖衔' }} - - - - {{ awards.sumRealPv }}万/{{ awards.targetPv }}万 - {{ awards.sumRealPv }}万 - - {{ '昨日业绩' }} diff --git a/pages/userData/index.vue b/pages/userData/index.vue index f2e2a97..ef21f43 100644 --- a/pages/userData/index.vue +++ b/pages/userData/index.vue @@ -6,61 +6,60 @@ --> @@ -175,105 +183,111 @@ import store from '@/store' export default { data() { return { - downShow:false, - userInfo:{}, - userData:'', - urls:'/member/api/maker-space/update-file', + downShow: false, + userInfo: {}, + userData: '', + urls: '/member/api/maker-space/update-file', } }, onLoad() { - this.getInfo() - this.userData = uni.getStorageSync('User') + this.getInfo() + this.userData = uni.getStorageSync('User') }, methods: { close() { this.downShow = false }, - updateImg() { - const http = uni.$u.http.config.baseURL - let token = getToken(); - uni.chooseImage({ - sourceType: ['album'], //从相册选择 - success: chooseImageRes => { - const tempFilePaths = chooseImageRes.tempFilePaths; - uni.uploadFile({ - url: http+'/member/api/member/update-head', //仅为示例,非真实的接口地址 - filePath: tempFilePaths[0], - name: 'file', - header: { - Authorization:token - }, - success: res => { - console.error(res) - // 成功:获取到头像 - if (res.statusCode == 200) { - let data = JSON.parse(res.data) - this.userInfo.headPath = data.data.url - } - } - }); - }, - fail: err => { - uni.$u.toast('上传失败', 'none'); - } - }); - }, - submit() { - api.updateData({ - nickName: this.userInfo.nickName, - }).then((res)=>{ - uni.showToast({ - title: res.msg, - icon: 'none', - duration: 1500, - }) - this.getInfo() - this.close() - }) - }, - // upload() { - // let that = this - // uni.chooseImage({ - // count: 1, //默认9 - // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 - // sourceType: ['album'], //从相册选择 - // success: function (res) { - // let FormDatas = new FormData(); - - // FormDatas.append("file", res.tempFilePaths[0]); - // api.updateFile(FormDatas).then((res)=>{ - // console.error(res) - // }) - // } - // }); - // }, - getInfo(){ - api.getData().then(res => { - if (res) { - this.userInfo = res.data - if(this.userInfo.nickName.length > 20){ - this.userInfo.nickName1 = this.userInfo.nickName.substring(0,20)+'...' + updateImg() { + const http = uni.$u.http.config.baseURL + let token = getToken() + uni.chooseImage({ + sourceType: ['album'], //从相册选择 + success: chooseImageRes => { + const tempFilePaths = chooseImageRes.tempFilePaths + uni.uploadFile({ + url: http + '/member/api/member/update-head', //仅为示例,非真实的接口地址 + filePath: tempFilePaths[0], + name: 'file', + header: { + Authorization: token, + }, + success: res => { + console.error(res) + // 成功:获取到头像 + if (res.statusCode == 200) { + let data = JSON.parse(res.data) + this.userInfo.headPath = data.data.url + } + }, + }) + }, + fail: err => { + uni.$u.toast('上传失败', 'none') + }, + }) + }, + submit() { + api + .updateData({ + nickName: this.userInfo.nickName, + }) + .then(res => { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 1500, + }) + this.getInfo() + this.close() + }) + }, + // upload() { + // let that = this + // uni.chooseImage({ + // count: 1, //默认9 + // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 + // sourceType: ['album'], //从相册选择 + // success: function (res) { + // let FormDatas = new FormData(); + + // FormDatas.append("file", res.tempFilePaths[0]); + // api.updateFile(FormDatas).then((res)=>{ + // console.error(res) + // }) + // } + // }); + // }, + getInfo() { + api + .getData() + .then(res => { + if (res) { + this.userInfo = res.data + if (this.userInfo.nickName.length > 20) { + this.userInfo.nickName1 = + this.userInfo.nickName.substring(0, 20) + '...' } - } - }).catch(error => { - reject(error) - }) - // api.getInfo().then(res => { - // if (res) { - // this.userInfo = res.data - // } - // }).catch(error => { - // reject(error) - // }) - // console.error(this.userInfo) - }, + } + }) + .catch(error => { + reject(error) + }) + // api.getInfo().then(res => { + // if (res) { + // this.userInfo = res.data + // } + // }).catch(error => { + // reject(error) + // }) + // console.error(this.userInfo) + }, }, } \ No newline at end of file +} +.avatar { + margin-top: 10rpx; + image { + width: 89rpx; + height: 89rpx; + border-radius: 50%; + } +} +.btn { + background-color: #fb3024; + border: none; + height: 92rpx; + line-height: 92rpx; + font-size: 30rpx; + margin: 40rpx auto; + width: 690rpx; +} +