This commit is contained in:
tx 2024-08-06 17:15:17 +08:00
parent 062c925581
commit 2a081c7166
11 changed files with 487 additions and 298 deletions

View File

@ -1,152 +1,139 @@
const install = (Vue, vm) => { const install = (Vue, vm) => {
// Vue.prototype.$u.http.setConfig({
// Vue.prototype.$u.http.setConfig({ // baseURL: 'https://yruibao.com/admin',
// // baseUrl: 'http://192.168.10.104:8088',
// baseURL: 'https://yruibao.com/admin', // method: 'POST',
// // 设置为json返回后会对数据进行一次JSON.parse()
// // baseUrl: 'http://192.168.10.104:8088', // dataType: 'json',
// method: 'POST', // showLoading: true, // 是否显示请求中的loading
// // 设置为json返回后会对数据进行一次JSON.parse() // loadingText: '请求加载中...', // 请求loading中的文字提示
// dataType: 'json', // loadingTime: 10000, // 在此时间内请求还没回来的话就显示加载中动画单位ms
// showLoading: true, // 是否显示请求中的loading // originalData: false, // 是否在拦截器中返回服务端的原始数据
// loadingText: '请求加载中...', // 请求loading中的文字提示 // loadingMask: true, // 展示loading的时候是否给一个透明的蒙层防止触摸穿透
// loadingTime: 10000, // 在此时间内请求还没回来的话就显示加载中动画单位ms // // 配置请求头信息
// originalData: false, // 是否在拦截器中返回服务端的原始数据 // header: {
// loadingMask: true, // 展示loading的时候是否给一个透明的蒙层防止触摸穿透 // 'content-type': 'application/json;charset=UTF-8',
// // 配置请求头信息 // },
// header: { // });
// 'content-type': 'application/json;charset=UTF-8',
// },
// });
uni.setStorageSync('deptId', 100);
Vue.prototype.$u.http.setConfig({
// baseUrl: 'http://61.174.243.28:15861',
// baseUrl: 'http://192.168.2.46:8080',
// baseUrl: 'http://124.221.246.124:2289',
// baseUrl: 'https://dianche.chuantewulian.cn/prod-api',
baseUrl: 'https://dche.ccttiot.com/prod-api',
loadingText: '努力加载中~',
loadingTime: 50000,
// 设置自定义头部content-type
header: {
'content-type': 'application/json;charset=UTF-8',
},
// ......
});
// 创享 wx3428c498d5061192
// 嵛山岛 wx4d178f8c80348214
// 请求拦截部分,如配置,每次请求前都会执行
Vue.prototype.$u.http.interceptor.request = (config) => {
// 引用token
// 方式一存放在vuex的token假设使用了uView封装的vuex方式
// 见https://uviewui.com/components/globalVariable.html
// config.header.token = vm.token;
// 方式二如果没有使用uView封装的vuex方法那么需要使用$store.state获取
// config.header.token = vm.$store.state.token;
// 方式三如果token放在了globalData通过getApp().globalData获取
// 方式四如果token放在了Storage本地存储中拦截是每次请求都执行的 uni.setStorageSync('deptId', 100);
// 所以哪怕您重新登录修改了Storage下一次的请求将会是最新值 Vue.prototype.$u.http.setConfig({
const token = uni.getStorageSync('token'); // baseUrl: 'http://61.174.243.28:15861',
// baseUrl: 'http://192.168.2.46:8080',
// baseUrl: 'http://124.221.246.124:2289',
// baseUrl: 'https://dianche.chuantewulian.cn/prod-api',
baseUrl: 'https://dche.ccttiot.com/prod-api',
loadingText: '努力加载中~',
loadingTime: 10000,
// 设置自定义头部content-type
header: {
'content-type': 'application/json;charset=UTF-8',
},
});
// const token = "Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjQ0ZDljYzBlLThjZjEtNGFkOC05OGFjLThlNThjMWIxYjQ3OSJ9.v-aMkp9t7Z_QfjfsZy6d_1Ng76hPYa0A--SWScMJY9to7UlNv9IxHQnTJylLKdYKGrr8fRZ47Bu12UPm1DgMQg" // 请求拦截部分
Vue.prototype.$u.http.interceptor.request = (config) => {
// 引用token
// 方式一存放在vuex的token假设使用了uView封装的vuex方式
// 见https://uviewui.com/components/globalVariable.html
// config.header.token = vm.token;
// console.log("我是token", token) // 方式二如果没有使用uView封装的vuex方法那么需要使用$store.state获取
config.header.Authorization = token; // config.header.token = vm.$store.state.token;
// config.header.Tenant-Id=1
// #ifdef H5 // 方式三如果token放在了globalData通过getApp().globalData获取
config.header.Authorization = 'Bearer '+token;
// #endif // 方式四如果token放在了Storage本地存储中拦截是每次请求都执行的
// 可以对某个url进行特别处理此url参数为this.$u.get(url)中的url值 // 所以哪怕您重新登录修改了Storage下一次的请求将会是最新值
if(config.url == '/user/login') config.header.noToken = true; const token = uni.getStorageSync('token');
// 最后需要将config进行return
return config; // const token = "Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjQ0ZDljYzBlLThjZjEtNGFkOC05OGFjLThlNThjMWIxYjQ3OSJ9.v-aMkp9t7Z_QfjfsZy6d_1Ng76hPYa0A--SWScMJY9to7UlNv9IxHQnTJylLKdYKGrr8fRZ47Bu12UPm1DgMQg"
// 如果return一个false值则会取消本次请求 // console.log("我是token", token)
// if(config.url == '/user/rest') return false; // 取消某次请求 config.header.Authorization = token;
} // config.header.Tenant-Id=1
// #ifdef H5
// 响应拦截,如配置,每次请求结束都会执行本方法 config.header.Authorization = 'Bearer ' + token;
Vue.prototype.$u.http.interceptor.response = (res) => { // #endif
// if(res.code == 10022 || res.code == 10023) { // 可以对某个url进行特别处理此url参数为this.$u.get(url)中的url值
// // res为服务端返回值可能有coderesult等字段 if (config.url == '/user/login') config.header.noToken = true;
// // 这里对res.result进行返回将会在this.$u.post(url).then(res => {})的then回调中的res的到 // 最后需要将config进行return
// // 如果配置了originalData为true请留意这里的返回值 return config;
// uni.redirectTo({
// url:"/pages/login/login", // 如果return一个false值则会取消本次请求
// fail:function(mes){ // if(config.url == '/user/rest') return false; // 取消某次请求
// console.log(mes) }
// },
// success:function(mes){ // 响应拦截部分
// console.log(mes) Vue.prototype.$u.http.interceptor.response = (res) => {
// } // if(res.code == 10022 || res.code == 10023) {
// }) // // res为服务端返回值可能有coderesult等字段
// // return res.result; // // 这里对res.result进行返回将会在this.$u.post(url).then(res => {})的then回调中的res的到
// } // // 如果配置了originalData为true请留意这里的返回值
if(res.code == 401) { // uni.redirectTo({
// url:"/pages/login/login",
wx.login({ // fail:function(mes){
success(res) { // console.log(mes)
if (res.code) { // },
console.log('登录!', res); // success:function(mes){
let data = { // console.log(mes)
wxOpenId: res.code, // }
// })
}; // // return res.result;
let areaId=uni.getStorageSync('areaId'); // }
if(areaId){ if (res.code == 401) {
vm.$u.post('/loginByopenid?jsCode='+res.code+'&areaId='+areaId).then(res=>{ wx.login({
uni.hideLoading(); success(res) {
if (res.code == 200) { if (res.code) {
uni.setStorageSync('token', res.token); console.log('登录!', res);
// uni.navigateTo({ let areaId = uni.getStorageSync('areaId');
// url:'/pages/index/index' if (areaId) {
// }) vm.$u.post('/loginByopenid?jsCode=' + res.code + '&areaId=' + areaId).then(
res => {
uni.hideLoading();
}else if(res.code == 501){ if (res.code == 200) {
uni.showToast({ uni.setStorageSync('token', res.token);
title: res.msg, } else if (res.code == 501) {
icon: 'none', uni.showToast({
duration: 2000 title: res.msg,
}); icon: 'none',
}else { duration: 2000
// console.log("老用户登录",res.data) });
uni.navigateTo({ } else {
url:'/pages/login/login' uni.navigateTo({
}) url: '/pages/login/login'
} })
}); }
} });
}
} }
}, },
});
}); }
return res;
} }
return res;
// else if(res.code == 201) { // 手动实现超时控制
// // 假设201为token失效这里跳转登录 const originalRequest = Vue.prototype.$u.http.request;
// vm.$u.toast('验证失败,请重新登录'); Vue.prototype.$u.http.request = (options) => {
// setTimeout(() => { return new Promise((resolve, reject) => {
// // 此为uView的方法详见路由相关文档 const timeout = 20000; // 10秒超时
// vm.$u.route('/pages/user/login') const timer = setTimeout(() => {
// }, 1500) resolve( { code: 500, msg: '请求超时' } );
// return false; }, timeout);
// } else {
// // 如果返回false则会调用Promise的reject回调 // 执行原始请求
// // 并将进入this.$u.post(url).then().catch(res=>{})的catch回调中res为服务端的返回值 originalRequest.call(Vue.prototype.$u.http, options).then(response => {
// return false; clearTimeout(timer);
// } resolve(response);
} }).catch(error => {
clearTimeout(timer);
reject(error);
});
});
};
} }
export default { export default {
install install
} }

View File

@ -54,7 +54,7 @@
"appid" : "wx3428c498d5061192", "appid" : "wx3428c498d5061192",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"minified" : false "minified" : true
}, },
"usingComponents" : true, "usingComponents" : true,
"optimization" : { "optimization" : {

37
page_vip/Vip_index.vue Normal file
View File

@ -0,0 +1,37 @@
<template>
<view class="page">
<u-navbar title="编号开锁" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' height='45'></u-navbar>
</view>
</template>
<script>
export default {
data() {
return {
bgc: {
backgroundColor: '#fff'
},
sn:'',
istrue:false
}
},
methods: {
}
}
</script>
<style lang="scss" >
page{
background-color: #fff;
}
.page{
width: 750rpx;
}
</style>

View File

@ -29,24 +29,8 @@
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/bind_sn",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path" : "pages/bind_mac",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
} }
], ],
@ -104,6 +88,23 @@
"enablePullDownRefresh" : false "enablePullDownRefresh" : false
} }
}, },
{
"path": "worke/bind_sn",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path" : "worke/bind_mac",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{ {
"path" : "worke/worke_income", "path" : "worke/worke_income",
"style" : "style" :
@ -199,6 +200,22 @@
} }
// ... A
]
},
{
"root": "page_vip", // A
"pages": [
{
"path": "Vip_index",
"style": {
"navigationBarTitleText": "上传",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
// ... A // ... A
] ]
}, },

View File

@ -4410,7 +4410,7 @@
} }
if (this.sn) { if (this.sn) {
setTimeout(()=>{ setTimeout(()=>{
this.deviceInfo(0) this.deviceInfo(1)
this.qParam = null this.qParam = null
},500) },500)
@ -4817,7 +4817,7 @@
}); });
} else if (this.deviceInfos.status == 1) { } else if (this.deviceInfos.status == 1) {
if (this.areaId != res.data.areaId) { if (this.areaInfo.areaId != res.data.areaId) {
this.getArea() this.getArea()
} }
// this.routePlanning(res.data.latitude, res.data.longitude) // this.routePlanning(res.data.latitude, res.data.longitude)
@ -4825,7 +4825,7 @@
this.showdevice = true this.showdevice = true
this.type = 1; this.type = 1;
this.deviceIndex = 1; this.deviceIndex = 1;
}, 500) }, 600)
} }
} }
@ -4949,7 +4949,7 @@
// this.routePlanning(res.data // this.routePlanning(res.data
// .latitude, res.data // .latitude, res.data
// .longitude) // .longitude)
if (this.areaId != res.data if (this.areaInfo != res.data
.areaId) { .areaId) {
this.getArea() this.getArea()
} }
@ -4958,7 +4958,7 @@
this.showdevice = true this.showdevice = true
this.type = 1; this.type = 1;
this.deviceIndex = 1; this.deviceIndex = 1;
}, 500) }, 600)
} }
} }
} else { } else {

View File

@ -174,7 +174,7 @@
}) })
}else if(num==5){ }else if(num==5){
uni.navigateTo({ uni.navigateTo({
url:'/pages/bind_sn' url:'/pages_admin/worke/bind_sn'
}) })
// uni.scanCode({ // uni.scanCode({
// onlyFromCamera: true, // onlyFromCamera: true,

View File

@ -1167,6 +1167,7 @@
}, },
deviceInfo() { deviceInfo() {
this.$u.get('/app/device/info?sn=' + this.sn).then((res) => { this.$u.get('/app/device/info?sn=' + this.sn).then((res) => {
console.log(res,'rererer');
if (res.code === 200) { if (res.code === 200) {
this.deviceInfos = res.data this.deviceInfos = res.data
if(this.getnum==0){ if(this.getnum==0){
@ -1337,6 +1338,12 @@
} }
this.$forceUpdate() this.$forceUpdate()
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
} }
}) })
}, },

View File

@ -64,15 +64,27 @@
</view> </view>
</view> </view>
<view class="info_li"> <view class="info_li">
<!-- <view class="half_infoli"> <view class="half_infoli" v-if="deviceInfos.onlineStatus==0">
车辆编号<span>{{orderInfo.device.areaName}}</span> 网络状态<span >离线</span>
</view> --> </view>
<view class="half_infoli" v-if="deviceInfos.onlineStatus==1">
网络状态<span >在线</span>
</view>
<view class="half_infoli"> <view class="half_infoli">
运营区域: 运营区域:
<span v-if="orderInfo.area">{{orderInfo.area}}</span> <span v-if="orderInfo.area">{{orderInfo.area}}</span>
<span v-else>--</span> <span v-else>--</span>
</view> </view>
</view> </view>
<view class="info_li">
<view class="half_infoli" v-if="deviceInfos.lockStatus==0">
锁状态<span >关锁</span>
</view>
<view class="half_infoli" v-if="deviceInfos.lockStatus==1">
锁状态<span >开锁</span>
</view>
</view>
</view> </view>
</view> </view>
@ -104,11 +116,20 @@
骑行费用<span>{{orderInfo.ridingFee}}</span> 骑行费用<span>{{orderInfo.ridingFee}}</span>
</view> </view>
</view> </view>
<view class="info_li">
<view class="half_infoli">
停车点外调度费<span>{{orderInfo.manageFee}}</span>
</view>
<view class="half_infoli">
骑行费用<span>{{orderInfo.ridingFee}}</span>
</view>
</view>
<view class="info_li"> <view class="info_li">
实收<span>{{orderInfo.totalFee}}</span> 实收<span>{{orderInfo.totalFee}}</span>
</view> </view>
<view class="info_li"> <view class="info_li">
支付方式<span>微信支付</span> 支付方式<span v-if="orderInfo.payType=='yj'">押金抵扣</span><span v-if="orderInfo.payType=='wx'">微信支付</span>
</view> </view>
<view class="info_li" v-if="orderInfo.rule" style="display: inline-block;"> <view class="info_li" v-if="orderInfo.rule" style="display: inline-block;">
计费模板<span>{{orderInfo.rule.name}}</span> 计费模板<span>{{orderInfo.rule.name}}</span>
@ -266,7 +287,15 @@
<view class="btn" @click="pass()" v-if="orderInfo.status==5"> <view class="btn" @click="pass()" v-if="orderInfo.status==5">
审核通过 审核通过
</view> </view>
<view class="btn" @click="yjdkBtn()" v-if="orderInfo.status==3">
押金抵扣
</view>
<view class="btn" @click="openBtn()" v-if="orderInfo.status==2">
开锁
</view>
<view class="btn" @click="closeBtn()" v-if="orderInfo.status==2">
关锁
</view>
<view class="btn" @click="unpass" v-if="orderInfo.status==5"> <view class="btn" @click="unpass" v-if="orderInfo.status==5">
有损坏 有损坏
@ -490,7 +519,8 @@
areaNum: 1, areaNum: 1,
showload:false, showload:false,
showfzhc:false, showfzhc:false,
showgj:false showgj:false,
deviceInfos:{}
} }
}, },
@ -542,6 +572,116 @@
}, },
methods: { methods: {
status() {
// if (this.deviceInfos.onlineStatus == 0) {
// return '线'
// } else {
// }
if (this.deviceInfos.status == 0) {
return '仓库中'
} else if (this.deviceInfos.status == 1) {
return '待租'
} else if (this.deviceInfos.status == 2) {
return '预约中'
} else if (this.deviceInfos.status == 3) {
return '骑行中'
} else if (this.deviceInfos.status == 4) {
return '临时锁车中'
}else if (this.deviceInfos.status == 6) {
return '调度中'
} else if (this.deviceInfos.status == 8) {
return '下线'
}
},
deviceInfo() {
this.$u.get('/app/device/info?sn=' + this.orderInfo.sn).then((res) => {
console.log(res,'rererer');
if (res.code === 200) {
this.deviceInfos = res.data
this.$forceUpdate()
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
})
},
//
openBtn(){
this.$u.post('/appVerify/admin/unlocking?sn=' + this.orderInfo.sn).then((res) => {
if (res.code == 200) {
// 线
uni.showToast({
title: '操作成功',
icon: 'none',
duration: 2000
});
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
//
closBtn(){
this.$u.post('/appVerify/admin/lock?sn=' + this.orderInfo.sn).then((res) => {
if (res.code == 200) {
// 线
uni.showToast({
title: '操作成功',
icon: 'none',
duration: 2000
});
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
//
yjdkBtn(){
let data = {
orderNo: this.orderInfo.orderNo,
}
this.$u.post('/appVerify/order/deduction', data).then((res) => {
if (res.code === 200) {
// 线
this.getOrderDetail()
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
// //
changeMoney() { changeMoney() {
let data = { let data = {
@ -1011,8 +1151,9 @@
this.areaNum = this.areaNum + 1 this.areaNum = this.areaNum + 1
if (this.areaNum != 0) { if (this.areaNum != 0) {
this.getArea() this.getArea()
} }
this.deviceInfo()
this.loading = true this.loading = true
this.latitude = parseFloat(this.orderInfo.latitude) this.latitude = parseFloat(this.orderInfo.latitude)

View File

@ -28,7 +28,7 @@
</view> </view>
</view> </view>
<view class="info_li"> <view class="info_li">
<view class="text">实际到账{{realprice}}</view> <view class="text">实际到账{{realprice}}</view>
<!-- <view class="txt" @click="showtip=!showtip"> <!-- <view class="txt" @click="showtip=!showtip">
@ -92,12 +92,12 @@
list: [], list: [],
pageNum: 1, pageNum: 1,
pageSize: 25, pageSize: 25,
info:{}, info: {},
price:0, price: 0,
realprice:0, realprice: 0,
Quantity:0, Quantity: 0,
border: false, border: false,
isThrottled:false isThrottled: false
} }
}, },
onLoad(e) { onLoad(e) {
@ -118,44 +118,44 @@
}, },
methods: { methods: {
ckinpt() { ckinpt() {
if( parseFloat(this.amount)> parseFloat(this.info.balance)){ if (parseFloat(this.amount) > parseFloat(this.info.balance)) {
uni.showToast({ uni.showToast({
title: '提现金额不能大于账户余额', title: '提现金额不能大于账户余额',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
this.amount='' this.amount = ''
} }
const floatValue = parseFloat(this.amount); const floatValue = parseFloat(this.amount);
const decimalPart = this.amount.split('.')[1]; const decimalPart = this.amount.split('.')[1];
if (decimalPart && decimalPart.length > 2) { if (decimalPart && decimalPart.length > 2) {
// //
uni.showToast({ uni.showToast({
title: '金额只能精确到小数点后两位', title: '金额只能精确到小数点后两位',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
this.amount = floatValue.toFixed(2).slice(0, -1); this.amount = floatValue.toFixed(2).slice(0, -1);
} }
// checkPrice() // checkPrice()
this.checkPrice(); this.checkPrice();
}, },
checkPrice(){ checkPrice() {
if(this.amount!=''){ if (this.amount != '') {
this.price= parseFloat(this.amount); this.price = parseFloat(this.amount);
}else{ } else {
this.price=0.00 this.price = 0.00
} }
let abb=this.amount * (parseFloat(this.info.handlingCharge)/1000) let abb = this.amount * (parseFloat(this.info.handlingCharge) / 1000)
this.Quantity= abb.toFixed(2) this.Quantity = abb.toFixed(2)
let aaa =this.amount-this.Quantity let aaa = this.amount - this.Quantity
this.realprice=aaa.toFixed(2) this.realprice = aaa.toFixed(2)
}, },
status(type) { status(type) {
if (type == 1) { if (type == 1) {
return '骑行订单' return '骑行订单'
@ -163,98 +163,98 @@
return '押金订单' return '押金订单'
} else if (type == 3) { } else if (type == 3) {
return '押金订单退款' return '押金订单退款'
} else if (type ==4 ) { } else if (type == 4) {
return '骑行订单退款' return '骑行订单退款'
} else if (type == 5) { } else if (type == 5) {
return '提现' return '提现'
} else if (type == 6) { } else if (type == 6) {
return '提现失败' return '提现失败'
}else if (type == 7) { } else if (type == 7) {
return '车损收入' return '车损收入'
} }
}, },
formatDate(value) { formatDate(value) {
if (!value) return ''; if (!value) return '';
let date = new Date(value); let date = new Date(value);
let month = date.getMonth() + 1; // 01 let month = date.getMonth() + 1; // 01
let day = date.getDate(); let day = date.getDate();
let hours = date.getHours(); let hours = date.getHours();
let minutes = date.getMinutes(); let minutes = date.getMinutes();
// //
month = month < 10 ? '0' + month : month; month = month < 10 ? '0' + month : month;
day = day < 10 ? '0' + day : day; day = day < 10 ? '0' + day : day;
hours = hours < 10 ? '0' + hours : hours; hours = hours < 10 ? '0' + hours : hours;
minutes = minutes < 10 ? '0' + minutes : minutes; minutes = minutes < 10 ? '0' + minutes : minutes;
return `${month}-${day} ${hours}:${minutes}`; return `${month}-${day} ${hours}:${minutes}`;
}, },
payBtn() { payBtn() {
if (this.realprice != 0) { if (this.realprice != 0) {
// //
if (this.isThrottled) { if (this.isThrottled) {
uni.showToast({ uni.showToast({
title: '请勿重复点击', title: '请勿重复点击',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
return; return;
} }
// //
this.isThrottled = true; this.isThrottled = true;
let data = { let data = {
amount: this.realprice, amount: this.realprice,
areaId: this.areaId areaId: this.areaId
} }
this.$u.post('/appVerify/admin/withdraw', data).then((res) => { this.$u.post('/appVerify/admin/withdraw', data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.amount = '' this.amount = ''
this.Quantity = 0 this.Quantity = 0
this.realprice = 0 this.realprice = 0
this.price = 0 this.price = 0
this.list = [] this.list = []
this.pageNum = 1 this.pageNum = 1
this.getareaInfo() this.getareaInfo()
this.getlist() this.getlist()
uni.showToast({ uni.showToast({
title: '提现成功', title: '提现成功',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
} }
}).catch(error => { }).catch(error => {
console.error("Error fetching area data:", error); console.error("Error fetching area data:", error);
}).finally(() => { }).finally(() => {
// //
setTimeout(() => { setTimeout(() => {
this.isThrottled = false; this.isThrottled = false;
}, 3000); }, 3000);
}); });
} else { } else {
uni.showToast({ uni.showToast({
title: '提现金额不能为0', title: '提现金额不能为0',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
} }
}, },
getareaInfo() { getareaInfo() {
let data={ let data = {
areaId: this.areaId areaId: this.areaId
} }
this.$u.get('/appVerify/getDept',data).then((res) => { this.$u.get('/appVerify/getDept', data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.info=res.data this.info = res.data
} }
}).catch(error => { }).catch(error => {
console.error("Error fetching area data:", error); console.error("Error fetching area data:", error);

View File

@ -154,7 +154,7 @@
console.log(e); console.log(e);
let Bluetoothmac = e.name.substring(5) let Bluetoothmac = e.name.substring(5)
uni.navigateTo({ uni.navigateTo({
url:'/pages/bind_mac?mac='+Bluetoothmac url:'/pages_admin/worke/bind_mac?mac='+Bluetoothmac
}) })
}, },
send(){ send(){