11
This commit is contained in:
parent
8c39f40a65
commit
781a3b5372
|
@ -44,8 +44,7 @@
|
||||||
<view class="" v-else>
|
<view class="" v-else>
|
||||||
<text
|
<text
|
||||||
v-if="detaobj.suitFeeType == 3 || detaobj.suitFeeType == 4">{{timeDifferenceString == '' ? '1分' : timeDifferenceString}}</text>
|
v-if="detaobj.suitFeeType == 3 || detaobj.suitFeeType == 4">{{timeDifferenceString == '' ? '1分' : timeDifferenceString}}</text>
|
||||||
<text
|
<text v-if="detaobj.suitFeeType == 2">{{du}}度</text>
|
||||||
v-if="detaobj.suitFeeType == 2">{{du}}度</text>
|
|
||||||
<text v-if="detaobj.suitFeeType == 1">{{formattedTime}}</text>
|
<text v-if="detaobj.suitFeeType == 1">{{formattedTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-if="detaobj.suitEndTime">
|
<view class="" v-if="detaobj.suitEndTime">
|
||||||
|
@ -191,6 +190,7 @@
|
||||||
<text v-else @click="btnjieshu">结束订单</text>
|
<text v-else @click="btnjieshu">结束订单</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="mask" v-if="jieshufalg"></view>
|
||||||
|
|
||||||
<!-- 点击结束弹窗 -->
|
<!-- 点击结束弹窗 -->
|
||||||
<view class="truebox" v-if="trueboxfalg">
|
<view class="truebox" v-if="trueboxfalg">
|
||||||
|
@ -198,7 +198,8 @@
|
||||||
您要提前结束此订单吗?
|
您要提前结束此订单吗?
|
||||||
</view>
|
</view>
|
||||||
<view class="titvalue">
|
<view class="titvalue">
|
||||||
当前预估消费金额为{{Number(feeprice) < 0.01 ? '0.01' : feeprice}}元,实际消费以实际金额为准 <text v-if="detaobj.suitFeeMode == 2 && detaobj.suitFeeType == 3">用电量为{{Number(totalElectriQuantity) - Number(suitStartEle)}}度</text>
|
当前预估消费金额为{{Number(feeprice) < 0.01 ? '0.01' : feeprice}}元,实际消费以实际金额为准 <text
|
||||||
|
v-if="detaobj.suitFeeMode == 2 && detaobj.suitFeeType == 3">用电量为{{Number(totalElectriQuantity) - Number(suitStartEle)}}度</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="truebtn">
|
<view class="truebtn">
|
||||||
<view class="quxiao" @click="trueboxfalg = false">
|
<view class="quxiao" @click="trueboxfalg = false">
|
||||||
|
@ -276,7 +277,8 @@
|
||||||
du: '',
|
du: '',
|
||||||
totalElectriQuantity: '',
|
totalElectriQuantity: '',
|
||||||
suitStartEle: '',
|
suitStartEle: '',
|
||||||
sbobj:{}
|
sbobj: {},
|
||||||
|
jieshufalg:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
@ -383,7 +385,8 @@
|
||||||
signType: res.data.payParams.signType,
|
signType: res.data.payParams.signType,
|
||||||
paySign: res.data.payParams.paySign,
|
paySign: res.data.payParams.paySign,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
that.$u.put(`/app/bill/${that.orderno}/refreshPayResult`).then(res => {})
|
that.$u.put(`/app/bill/${that.orderno}/refreshPayResult`).then(
|
||||||
|
res => {})
|
||||||
// 支付成功逻辑
|
// 支付成功逻辑
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
|
@ -412,6 +415,7 @@
|
||||||
},
|
},
|
||||||
btnjieshu() {
|
btnjieshu() {
|
||||||
if (this.detaobj.suitFeeMode == 1) {
|
if (this.detaobj.suitFeeMode == 1) {
|
||||||
|
if (this.onlineStatus == 1) {
|
||||||
let that = this
|
let that = this
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
@ -437,6 +441,87 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
if (this.temperature == null) {
|
||||||
|
this.jieshufalg = true
|
||||||
|
uni.showLoading({
|
||||||
|
title: '切换中'
|
||||||
|
})
|
||||||
|
let that = this
|
||||||
|
xBlufi.initXBlufi(1);
|
||||||
|
xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent);
|
||||||
|
xBlufi.notifyStartDiscoverBle({
|
||||||
|
'isStart': true
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
xBlufi.notifyStartDiscoverBle({
|
||||||
|
'isStart': false
|
||||||
|
})
|
||||||
|
if (that.devicesList.length > 0) {
|
||||||
|
xBlufi.notifyConnectBle({
|
||||||
|
isStart: true,
|
||||||
|
deviceId: that.deviceId,
|
||||||
|
name: that.name
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}, 2000)
|
||||||
|
uni.showModal({
|
||||||
|
title: '温馨提示',
|
||||||
|
content: `检测到该设备未联网,为您切换为蓝牙模式,支付的时候靠近该设备,并打开蓝牙`,
|
||||||
|
showCancel: false,
|
||||||
|
success: function(res) {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.jieshufalg = true
|
||||||
|
let data = {
|
||||||
|
billId: this.billId,
|
||||||
|
}
|
||||||
|
this.$u.put(`/app/bill/endUse`, data).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.getNetworkType({
|
||||||
|
success(res) {
|
||||||
|
if (res.networkType !== 'none') {
|
||||||
|
uni.getConnectedBluetoothDevices({
|
||||||
|
success(res) {
|
||||||
|
setTimeout(() => {
|
||||||
|
xBlufi.notifySendCustomData({
|
||||||
|
customData: 'close'
|
||||||
|
})
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
this.jieshufalg = false
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/shouye/index'
|
||||||
|
})
|
||||||
|
}, 1000)
|
||||||
|
}, 1500)
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.error('获取已连接蓝牙设备信息失败:', err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log('手机未连接网络')
|
||||||
|
// this.baiflag = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.getsb()
|
this.getsb()
|
||||||
this.trueboxfalg = true
|
this.trueboxfalg = true
|
||||||
|
@ -539,7 +624,9 @@
|
||||||
signType: res.data.payParams.signType,
|
signType: res.data.payParams.signType,
|
||||||
paySign: res.data.payParams.paySign,
|
paySign: res.data.payParams.paySign,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
that.$u.put(`/app/bill/${that.orderno}/refreshPayResult`).then(res => {})
|
that.$u.put(
|
||||||
|
`/app/bill/${that.orderno}/refreshPayResult`
|
||||||
|
).then(res => {})
|
||||||
// 支付成功逻辑
|
// 支付成功逻辑
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
|
@ -681,28 +768,51 @@
|
||||||
provider: 'wxpay',
|
provider: 'wxpay',
|
||||||
timeStamp: res.data.payParams.timeStamp,
|
timeStamp: res.data.payParams.timeStamp,
|
||||||
nonceStr: res.data.payParams.nonceStr,
|
nonceStr: res.data.payParams.nonceStr,
|
||||||
package: res.data.payParams.packageVal,
|
package: res
|
||||||
signType: res.data.payParams.signType,
|
.data
|
||||||
paySign: res.data.payParams.paySign,
|
.payParams
|
||||||
success: (res) => {
|
.packageVal,
|
||||||
that.$u.put(
|
signType: res
|
||||||
|
.data
|
||||||
|
.payParams
|
||||||
|
.signType,
|
||||||
|
paySign: res
|
||||||
|
.data
|
||||||
|
.payParams
|
||||||
|
.paySign,
|
||||||
|
success: (
|
||||||
|
res
|
||||||
|
) => {
|
||||||
|
that.$u
|
||||||
|
.put(
|
||||||
`/app/bill/${that.orderno}/refreshPayResult`
|
`/app/bill/${that.orderno}/refreshPayResult`
|
||||||
).then(res => {})
|
)
|
||||||
|
.then(
|
||||||
|
res => {}
|
||||||
|
)
|
||||||
// 支付成功逻辑
|
// 支付成功逻辑
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res
|
||||||
|
.msg,
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
duration: 1000
|
duration: 1000
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout
|
||||||
that.jieshuflag = false
|
(() => {
|
||||||
|
that.jieshuflag =
|
||||||
|
false
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/shouye/index'
|
url: '/pages/shouye/index'
|
||||||
})
|
})
|
||||||
}, 1500)
|
|
||||||
},
|
},
|
||||||
fail(err) {
|
1500
|
||||||
that.jieshuflag = false
|
)
|
||||||
|
},
|
||||||
|
fail(
|
||||||
|
err
|
||||||
|
) {
|
||||||
|
that.jieshuflag =
|
||||||
|
false
|
||||||
// 支付失败逻辑
|
// 支付失败逻辑
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '支付失败',
|
title: '支付失败',
|
||||||
|
@ -1004,13 +1114,15 @@
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// this.czflag = false
|
// this.czflag = false
|
||||||
this.jieshuflag = false
|
this.jieshuflag = false
|
||||||
|
this.jieshufalg = false
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
break;
|
break;
|
||||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_STOP:
|
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_STOP:
|
||||||
if (options.result) {
|
if (options.result) {
|
||||||
let uniqueDevicesList = Array.from(new Set(this.devicesList));
|
let uniqueDevicesList = Array.from(new Set(this.devicesList));
|
||||||
let filteredDevices = uniqueDevicesList.filter(device => device.name.substring(0, 4) === "CTKG");
|
let filteredDevices = uniqueDevicesList.filter(device => device.name.substring(0, 4) ===
|
||||||
|
"CTKG");
|
||||||
// 将过滤后的数组重新赋值给 this.devicesList
|
// 将过滤后的数组重新赋值给 this.devicesList
|
||||||
this.devicesList = filteredDevices;
|
this.devicesList = filteredDevices;
|
||||||
}
|
}
|
||||||
|
@ -1121,18 +1233,22 @@
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.titvalue {
|
.titvalue {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.truebtn {
|
.truebtn {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
|
|
||||||
.quxiao {
|
.quxiao {
|
||||||
border-right: 1px solid #ccc;
|
border-right: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
view {
|
view {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -1146,11 +1262,13 @@
|
||||||
.jieshu {
|
.jieshu {
|
||||||
width: 558rpx;
|
width: 558rpx;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
width: 558rpx;
|
width: 558rpx;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
background: #8883F0;
|
background: #8883F0;
|
||||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
||||||
|
|
|
@ -235,10 +235,10 @@
|
||||||
clearInterval(this.timer)
|
clearInterval(this.timer)
|
||||||
this.timer = null;
|
this.timer = null;
|
||||||
}
|
}
|
||||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
// xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
||||||
wx.closeBLEConnection({
|
// wx.closeBLEConnection({
|
||||||
deviceId: this.deviceId,
|
// deviceId: this.deviceId,
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
||||||
|
@ -904,7 +904,7 @@
|
||||||
xBlufi.notifyInitBleEsp32({
|
xBlufi.notifyInitBleEsp32({
|
||||||
deviceId: this.deviceId
|
deviceId: this.deviceId
|
||||||
});
|
});
|
||||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvents);
|
// xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvents);
|
||||||
this.deviceIds = options.data.deviceId
|
this.deviceIds = options.data.deviceId
|
||||||
this.name = this.name
|
this.name = this.name
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,6 +204,13 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
sub() {
|
sub() {
|
||||||
|
if (this.userinfo.limitWithdraw == true) {
|
||||||
|
uni.showToast({
|
||||||
|
title: this.userinfo.limitWithdrawReason,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}else{
|
||||||
if (this.userinfo.isReal == true) {
|
if (this.userinfo.isReal == true) {
|
||||||
if (this.money > this.userinfo.balance) {
|
if (this.money > this.userinfo.balance) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
@ -253,6 +260,7 @@
|
||||||
url: '/page_components/shiming'
|
url: '/page_components/shiming'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getuserinfo() {
|
getuserinfo() {
|
||||||
this.$u.get("/app/user/userInfo").then((res) => {
|
this.$u.get("/app/user/userInfo").then((res) => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user