From 63097d88703c6b373f86dfe3491f885f6d836b2d Mon Sep 17 00:00:00 2001 From: unknown <573515615@qq.com> Date: Fri, 31 Oct 2025 15:27:59 +0800 Subject: [PATCH] =?UTF-8?q?'=E6=94=B6=E6=94=AF=E8=AE=B0=E5=BD=95'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/api.js | 1 + pages/mine/mine.vue | 6 +- pages/mine/orderConfig.vue | 111 +++++++++++++++++++++++++++++-------- pages/mine/priceRecord.vue | 108 ++++++++++++++++++++++++++++++------ 4 files changed, 182 insertions(+), 44 deletions(-) diff --git a/config/api.js b/config/api.js index 59fb307..7816db2 100644 --- a/config/api.js +++ b/config/api.js @@ -189,4 +189,5 @@ export const allarealist = (data, callback) => post('api/recover/area/allarealis export const qrcode = (data, callback) => post('api/promotion/generate', data, callback); export const cityarealist = (data, callback) => post('api/recover/area/cityarealist', data, callback); export const createRecharge = (data, callback) => post('api/recover/recharge/createRecharge', data, callback); +export const statistics = (data, callback) => post('api/recover/personmoney/statistics', data, callback); diff --git a/pages/mine/mine.vue b/pages/mine/mine.vue index 078b5cc..9b348bb 100644 --- a/pages/mine/mine.vue +++ b/pages/mine/mine.vue @@ -124,7 +124,7 @@ - + - {{userinfo.typeLength}}个 + {{typeLength}} @@ -55,7 +55,7 @@ 高空作业证 - + >已上传 待上传 @@ -63,7 +63,7 @@ 电工证 - + 已上传 待上传 @@ -72,7 +72,7 @@ 焊工证 - + 已上传 待上传 @@ -80,7 +80,7 @@ 绿色回收认证证书 - + 已上传 待上传 @@ -89,22 +89,20 @@ - + - + --> 手机号码 - @@ -168,7 +166,7 @@ 取消 - 确定 + 确定 @@ -195,7 +193,7 @@ 取消 - 确定 + 确定 @@ -229,6 +227,9 @@ typelist: [], poptitle: '', checkType: [], + imgStatus: '', + typeText: '', + typeLength: '', areaText: '', areaId: '', personal_insurance: '', // | 人身保险 | @@ -256,11 +257,25 @@ this.getauth() }, methods: { + conformType(){ + console.log(this.checkType) + this.showType = false + }, checkboxChange(res) { // setTimeout(()=>{ // console.log(res,this.checkType,'gggg') // },2000) - console.log(res,this.checkType,'gggg') + let arr = [] + console.log(res,this.typelist,'gggg') + this.typelist.some((item,index)=>{ + console.log(item) + if(res.indexOf(item.id)!=-1){ + arr.push(item.name) + } + }) + // console.log(arr,this.deelData(arr),'ggggggggg') + this.typeText = this.deelData(arr); + this.typeLength = res.length; }, getdata(){ let data = { @@ -307,9 +322,36 @@ uploadClick(val, type){ this.showUpload = true; this.poptitle = val + this.imgStatus = type }, imgList(list){ console.log(list,'jjj') + switch(this.imgStatus){ + case 1: + this.personal_insurance = list; + break; + case 2: + this.health_certificate = list; + break; + case 3: + this.high_altitude_certificate = list; + break; + case 4: + this.electrician_certificate = list; + break; + case 5: + this.welder_certificate = list; + break; + case 6: + this.green_recycle_certificate = list; + break; + } + // personal_insurance: this.personal_insurance, // | 人身保险 | + // health_certificate: this.health_certificate, // | 健康证 | + // high_altitude_certificate: this.high_altitude_certificate, // | 高空作业证 | + // electrician_certificate: this.electrician_certificate, // | 电工证 | + // welder_certificate: this.welder_certificate, // | 焊工证 | + // green_recycle_certificate: this.green_recycle_certificate }, deelData(data){ let str = '' @@ -335,7 +377,19 @@ }, checkPassword() { var _this = this; - if(this.isConfigPassword){ + if(this.isConfigPassword && this.yuanPassword){ + if(!this.pay_password){ + uni.showToast({ title: '请输入支付密码', icon: 'none' }) + return false; + } + if(!this.rePassword){ + uni.showToast({ title: '请输入确认密码', icon: 'none' }) + return false; + } + if(this.pay_password != this.rePassword){ + uni.showToast({ title: '密码和确认密码不一致', icon: 'none' }) + return false; + } _this.$api.verifyPayPassword({ pay_password: this.yuanPassword },res=>{ @@ -352,14 +406,11 @@ }, setConfig() { var _this = this; - if(this.pay_password != this.rePassword){ - uni.showToast({ title: '密码和确认密码不一致', icon: 'none' }) - return false; - } + let data = { - realname: this.userinfo.nickname, + // realname: this.userinfo.nickname, mobile: this.userinfo.mobile, - pay_password: this.pay_password, + // pay_password: this.pay_password, area_id: this.areaId, type_ids: this.checkType.join(","), personal_insurance: this.personal_insurance, // | 人身保险 | @@ -369,12 +420,24 @@ welder_certificate: this.welder_certificate, // | 焊工证 | green_recycle_certificate: this.green_recycle_certificate // | 绿色回收认证证书 | } + if(this.pay_password){ + if(this.pay_password != this.rePassword){ + uni.showToast({ title: '密码和确认密码不一致', icon: 'none' }) + return false; + } + data.pay_password = this.pay_password + } console.log('data',data) + // return _this.$api.editperson(data,res=>{ if(res.code == '1'){ console.log(res.data) uni.showToast({ title: res.msg , icon: 'success' }) - + setTimeout(()=>{ + uni.navigateBack({ + delta: 1 + }) + }, 2000) }else{ uni.showToast({ title: res.msg , icon: 'none' }) } @@ -426,8 +489,10 @@ // } // _this.nickname = res.data.user.nickname // _this.userinfo = res.data.user - res.data.person.typeText = this.deelData(res.data.person.type_ids_show) - res.data.person.typeLength = res.data.person.type_ids_show.length + // res.data.person + this.typeText = this.deelData(res.data.person.type_ids_show) + // res.data.person + this.typeLength = res.data.person.type_ids_show.length _this.userinfo = res.data.person _this.areaId = res.data.person.area_id _this.areaText = res.data.person.area_ids_show diff --git a/pages/mine/priceRecord.vue b/pages/mine/priceRecord.vue index ce1f5d7..f4e4edd 100644 --- a/pages/mine/priceRecord.vue +++ b/pages/mine/priceRecord.vue @@ -2,38 +2,50 @@ - + + 搜索 - - 2 + + {{nowYear}} + + {{nowMonth}} 充值 - +1839.00 + +{{statisticsObj.total_income}} 支出 - -1839.00 + -{{statisticsObj.total_expense}} - - 订单号:202504121349001 + + 订单号:{{item.order_no}} - 余额充值 - 2025年04月12日 13:49 + {{item.type_text}} + {{item.createtime_text}} - +60.00 - 完成订单 + {{item.money}} + {{item.status_text}} + 没有更多了 + + @@ -43,34 +55,80 @@ data() { return { page: 1, - limit: 10 + limit: 10, + priceList: [], + statisticsObj: {}, + showDate: false, + nowDate: Number(new Date()), + nowYear: '', + nowMonth: '', + lastPage: '', + order_num: '' } }, components:{ }, onLoad() { + this.confirmDate({mode:1}) this.getPriceList() + this.statistics() }, onShow() { + }, + onReachBottom (){ + console.log('触底') + if(this.page{ if(res.code == '1'){ - if(res.data.user.avatar){ - _this.avatar = res.data.user.avatar - } - _this.nickname = res.data.user.nickname - _this.userinfo = res.data.user + this.priceList = res.data.list + this.lastPage = Math.ceil(res.data.total/this.limit) }else{ } }) }, + statistics(){ + var _this = this; + _this.$api.statistics({ + year: this.nowYear, + month: this.nowMonth + },res=>{ + if(res.code == '1'){ + this.statisticsObj = res.data + }else{ + } + }) + } } } @@ -89,7 +147,15 @@ background: #fff; height: 80rpx; padding-left: 32rpx; + padding-right: 32rpx; margin-bottom: 20rpx; + .searchBtn{ + font-size: 26rpx; + border:1rpx solid #F5F5FA; + padding: 10rpx 22rpx; + background: #F5F5FA; + border-radius: 8rpx; + } } .monthBox{ display: flex; @@ -169,7 +235,13 @@ .moduleBox:last-child{ border-bottom: none; } - + .noMore{ + margin-top: 50rpx; + // font-weight: bold; + font-size: 28rpx; + color: #333333; + line-height: 36rpx; + }