diff --git a/manifest.json b/manifest.json index 3106710..392f89e 100644 --- a/manifest.json +++ b/manifest.json @@ -54,7 +54,8 @@ "appid" : "wx3428c498d5061192", "setting" : { "urlCheck" : false, - "minified" : true + "minified" : true, + "es6" : true }, "usingComponents" : true, "optimization" : { diff --git a/pages/index/index.vue b/pages/index/index.vue index 7874a8f..458f93d 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -115,10 +115,10 @@ <view class="bot"> - <view class=" left_btn" @click="Reserve()"> + <!-- <view class=" left_btn" @click="Reserve()"> 预约用车 - </view> - <view class="right_btn" @click="lockDevice() "> + </view> --> + <view class="right_btn" @click="lockDevice() " style="width: 100%;"> 解锁用车 </view> </view> @@ -1170,8 +1170,6 @@ if (e.q) { this.qParam = e.q - - } console.log(e, 'e.qParame.qParam'); if (e.qParam) { @@ -1267,7 +1265,7 @@ } else { that.netonlines = true - uni.getLocation({ + uni.getLocation({ type: 'gcj02', success: function(lb) { // that.latitude = 23.440359 @@ -1306,24 +1304,7 @@ }); } that.sn = sn - // if (that.sn != '') { - - - // setTimeout(() => { - - // if (!that.orderinfo.status) { - // that.deviceInfo(1) - // that.qParam = null - // // this.showdevice = true - // // this.deviceIndex = 1 - // // this.type = 1 - // } else { - // // this.showtcs=true - // } - // }, 700) - - - // } + } // that.getmarks() diff --git a/pages/my.vue b/pages/my.vue index 6c5d12f..99f96ef 100644 --- a/pages/my.vue +++ b/pages/my.vue @@ -287,14 +287,14 @@ <view class="iconfont icon-xiangyou1"></view> </view> </view> - <view class="type_cont" v-if="info.role==3||info.role==2||info.role==9"> - <view class="type_li" @click="topage(8)" v-if="info.role==3||info.role==2||info.role==9"> + <view class="type_cont" v-if="info.role==3||info.role==2||info.role==9||info.role==4"> + <view class="type_li" @click="topage(8)" v-if="info.role==3||info.role==2||info.role==9" style="margin-bottom: 70rpx;"> <image src="https://lxnapi.ccttiot.com/bike/img/static/uyA3Cjjryy4Z9fCjs15Z" mode=""></image> 运维人员 <view class="iconfont icon-xiangyou1"></view> </view> - <view class="type_li" style="margin-top: 70rpx;" @click="topage(9)" v-if="info.role==3||info.role==9"> + <view class="type_li" @click="topage(9)" v-if="info.role==3||info.role==9||info.role==4"> <image src="https://lxnapi.ccttiot.com/bike/img/static/uC0nQVG6EK7OCYefw1Ws" mode=""></image> 管理人员 <view class="iconfont icon-xiangyou1"></view> diff --git a/pages_admin/addcode.vue b/pages_admin/addcode.vue index c5936ed..448f12d 100644 --- a/pages_admin/addcode.vue +++ b/pages_admin/addcode.vue @@ -34,15 +34,27 @@ token: '', upurl:'', userImgs:'', - deptId:'' + deptId:'', + userInfo:{} } }, onLoad(e) { this.getQiniuToken() console.log(e); this.deptId=e.deptId + this.getUserInfo() }, methods:{ + getUserInfo(){ + this.$u.get(`/getAppInfo?`).then((res) => { + if (res.code == 200) { + this.userInfo=res.user + + } else { + + } + }); + }, sub(){ if(this.userImgs==''){ uni.showToast({ @@ -51,22 +63,42 @@ duration: 1000 }); }else{ - const encodedUserImgs = encodeURIComponent(this.userImgs); - this.$u.post(`/appVerify/uploadPaymentCode?collectionCode=${encodedUserImgs}&deptId=${this.deptId}`) - .then((res) => { - if (res.code == 200) { - uni.navigateBack({ - delta: 1 - }); - } else { - uni.showToast({ - title: res.msg, - icon: 'none', - duration: 2000 - }); - } - }); - + if(this.userInfo.role==4){ + const encodedUserImgs = encodeURIComponent(this.userImgs); + this.$u.post(`/appVerify/uploadPaymentCode?collectionCode=${encodedUserImgs}`) + .then((res) => { + if (res.code == 200) { + uni.navigateBack({ + delta: 1 + }); + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }); + + }else{ + const encodedUserImgs = encodeURIComponent(this.userImgs); + this.$u.post(`/appVerify/uploadPaymentCode?collectionCode=${encodedUserImgs}&deptId=${this.deptId}`) + .then((res) => { + if (res.code == 200) { + uni.navigateBack({ + delta: 1 + }); + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }); + + } + } }, btn(){ diff --git a/pages_admin/admin_worke.vue b/pages_admin/admin_worke.vue index 3765eaa..77d8f0e 100644 --- a/pages_admin/admin_worke.vue +++ b/pages_admin/admin_worke.vue @@ -54,7 +54,7 @@ 车辆绑定 </view> </view> - <view class="cont" @click="topage(6)" v-if="userinfo.role==9&&deptId==100"> + <view class="cont" @click="topage(6)" v-if="(userinfo.role == 9 || userinfo.role == 4) && deptId == 100"> <image src="https://lxnapi.ccttiot.com/bike/img/static/u47okd0YdEQBsyhLlQIt" mode="" style="width: 50rpx;height: 50rpx;"></image> <view class="text"> 账户明细 diff --git a/pages_admin/order/order_detail.vue b/pages_admin/order/order_detail.vue index 7988179..a3f92ce 100644 --- a/pages_admin/order/order_detail.vue +++ b/pages_admin/order/order_detail.vue @@ -487,6 +487,9 @@ </view> </view> </view> + + + <u-mask :show="showck" @click="showck = false" :z-index='100' /> <view class="tip_box" v-if="showck"> <view class="top" v-if="showck"> diff --git a/pages_admin/worke/AccountDetails.vue b/pages_admin/worke/AccountDetails.vue index f41c3fe..8799838 100644 --- a/pages_admin/worke/AccountDetails.vue +++ b/pages_admin/worke/AccountDetails.vue @@ -129,9 +129,10 @@ if (uni.getStorageSync('adminAreaid')) { this.areaId = uni.getStorageSync('adminAreaid') - this.getowner() + } - this.getareaInfo() + + this.getUserInfo() }, onReachBottom() { // 触底时增加 pageNum 并调用 getlist 获取更多数据 @@ -139,6 +140,17 @@ this.getlist(); }, methods: { + getUserInfo(){ + this.$u.get(`/getAppInfo?`).then((res) => { + if (res.code == 200) { + this.userInfo=res.user + this.getowner() + this.getareaInfo() + } else { + + } + }); + }, getowner(){ this.$u.get('/appVerify/ownerType' ).then((res) => { if (res.code == 200) { @@ -184,11 +196,19 @@ } - let abb = this.amount * (parseFloat(this.info.handlingCharge) / 1000) - this.Quantity = abb.toFixed(2) + + + if(this.info.handlingChargeType==1){ + let abb = this.amount * (parseFloat(this.info.withdrawHandlingCharge) / 1000) + this.Quantity = abb.toFixed(2) + }else{ + this.Quantity = parseFloat(this.info.withdrawHandlingCharge).toFixed(2) + } let aaa = this.amount - this.Quantity + this.realprice = aaa.toFixed(2) }, + status(type) { if (type == 1) { return '骑行订单' @@ -241,7 +261,7 @@ }) },1100) }else{ - if (this.realprice != 0) { + if (this.price != 0) { // 检查是否已经在等待三秒的时间内 if (this.isThrottled) { uni.showToast({ @@ -255,7 +275,7 @@ // 设置节流标志位 this.isThrottled = true; - if (parseFloat(this.realprice) > parseFloat(this.info.withdrawableAmount)) { + if (parseFloat(this.price) > parseFloat(this.info.withdrawableAmount)) { uni.showToast({ title: '提现金额不能大于可提现金额', @@ -265,8 +285,12 @@ } let data = { - amount: this.realprice, - areaId: this.areaId + amount: this.price, + + } + if(this.userInfo.role!=4){ + data.areaId= this.areaId + } this.$u.post('/appVerify/admin/withdraw', data).then((res) => { if (res.code == 200) { @@ -313,13 +337,26 @@ let data = { areaId: this.areaId } - this.$u.get('/appVerify/getDept?', data).then((res) => { - if (res.code == 200) { - this.info = res.data - } - }).catch(error => { - console.error("Error fetching area data:", error); - }); + if(this.userInfo.role==4){ + + this.$u.get('/appVerify/getDept', ).then((res) => { + if (res.code == 200) { + this.info = res.data + } + }).catch(error => { + console.error("Error fetching area data:", error); + }); + }else{ + + this.$u.get('/appVerify/getDept?', data).then((res) => { + if (res.code == 200) { + this.info = res.data + } + }).catch(error => { + console.error("Error fetching area data:", error); + }); + } + this.$u.get('index/statistics?', data).then((res) => { if (res.code == 200) { this.moneyInfo = res.data @@ -337,9 +374,13 @@ ownerType: this.ownerInfo.ownerType, }; - if( this.ownerInfo.ownerId==1){ + + if( this.ownerInfo.ownerId==1&&this.userInfo.role!=4){ data.areaId=this.areaId } + if(this.userInfo.role==4){ + data.ownerType=2 + } this.$u.get('/appVerify/flowList?', data).then((res) => { if (res.code == 200) { // 确保合并新获取的数据