11
This commit is contained in:
parent
11604b86f6
commit
dd66d10bdb
|
@ -4,16 +4,16 @@
|
||||||
:custom-back="btns" title-size='36' height='50' id="navbar">
|
:custom-back="btns" title-size='36' height='50' id="navbar">
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
|
|
||||||
<!-- <view class="dltop">
|
<view class="dltop">
|
||||||
<view class="dian_list">
|
<view class="dian_list">
|
||||||
<view class="">
|
<view class="">
|
||||||
--
|
{{sbobj.voltage == undefined ? '--' : sbobj.voltage}}
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
--
|
{{sbobj.electricity == undefined ? '--' : sbobj.electricity}}
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
--
|
{{sbobj.realTimePower == undefined ? '--' : sbobj.realTimePower}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="dian_list">
|
<view class="dian_list">
|
||||||
|
@ -28,9 +28,10 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="botwz">
|
<view class="botwz">
|
||||||
点击刷新实时信息
|
<!-- 点击刷新实时信息 -->
|
||||||
|
历史总用电量:{{totalElectriQuantity}} 度
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
|
|
||||||
<view class="time_list">
|
<view class="time_list">
|
||||||
<view class="time_top">
|
<view class="time_top">
|
||||||
|
@ -180,7 +181,7 @@
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
|
|
||||||
<view class="" v-if="detaobj.suitFeeMode == 2">
|
<view class="">
|
||||||
<view class="jieshu" v-if="jieshuflag">
|
<view class="jieshu" v-if="jieshuflag">
|
||||||
<text v-if="detaobj.status == 1">立即支付</text>
|
<text v-if="detaobj.status == 1">立即支付</text>
|
||||||
<text v-else>结束订单</text>
|
<text v-else>结束订单</text>
|
||||||
|
@ -274,7 +275,8 @@
|
||||||
temperature:null,
|
temperature:null,
|
||||||
du:'',
|
du:'',
|
||||||
totalElectriQuantity:'',
|
totalElectriQuantity:'',
|
||||||
suitStartEle :''
|
suitStartEle :'',
|
||||||
|
sbobj:{}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
@ -400,299 +402,325 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
btnjieshu(){
|
btnjieshu(){
|
||||||
this.getsb()
|
if(this.detaobj.suitFeeMode == 1){
|
||||||
this.trueboxfalg = true
|
let data = {
|
||||||
},
|
billId: this.billId
|
||||||
btnbox() {
|
|
||||||
this.trueboxfalg = false
|
|
||||||
this.jieshuflag = true
|
|
||||||
if (this.onlineStatus == 1) {
|
|
||||||
if (this.detaobj.suitFeeType == 1 || this.detaobj.suitFeeType == 2) {
|
|
||||||
let data = {
|
|
||||||
billId: this.billId
|
|
||||||
}
|
|
||||||
this.$u.put(`/app/bill/endSmartUse`, data).then(res => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'success',
|
|
||||||
duration: 1000
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
this.jieshuflag = false
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/shouye/index'
|
|
||||||
})
|
|
||||||
}, 1500)
|
|
||||||
} else {
|
|
||||||
this.getDevice()
|
|
||||||
this.jieshuflag = false
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
if (this.detaobj.status == 1) {
|
|
||||||
this.$u.get(`/app/pay/wx/${this.orderno}`).then((res) => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
let that = this
|
|
||||||
uni.requestPayment({
|
|
||||||
provider: 'wxpay',
|
|
||||||
timeStamp: res.data.payParams.timeStamp,
|
|
||||||
nonceStr: res.data.payParams.nonceStr,
|
|
||||||
package: res.data.payParams.packageVal,
|
|
||||||
signType: res.data.payParams.signType,
|
|
||||||
paySign: res.data.payParams.paySign,
|
|
||||||
success: (res) => {
|
|
||||||
that.$u.put(`/app/bill/${that.orderno}/refreshPayResult`)
|
|
||||||
.then(res => {})
|
|
||||||
// 支付成功逻辑
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'success',
|
|
||||||
duration: 1000
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
that.jieshuflag = false
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/shouye/index'
|
|
||||||
})
|
|
||||||
}, 1500)
|
|
||||||
},
|
|
||||||
fail(err) {
|
|
||||||
that.getDevice()
|
|
||||||
that.jieshuflag = false
|
|
||||||
// 支付失败逻辑
|
|
||||||
uni.showToast({
|
|
||||||
title: '支付失败',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
let data = {
|
|
||||||
billId: this.billId
|
|
||||||
}
|
|
||||||
this.$u.put(`/app/bill/endTimingUse`, data).then(res => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
this.$u.get(`/app/pay/wx/${this.orderno}`).then((res) => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
let that = this
|
|
||||||
uni.requestPayment({
|
|
||||||
provider: 'wxpay',
|
|
||||||
timeStamp: res.data.payParams.timeStamp,
|
|
||||||
nonceStr: res.data.payParams.nonceStr,
|
|
||||||
package: res.data.payParams.packageVal,
|
|
||||||
signType: res.data.payParams.signType,
|
|
||||||
paySign: res.data.payParams.paySign,
|
|
||||||
success: (res) => {
|
|
||||||
that.$u.put(
|
|
||||||
`/app/bill/${that.orderno}/refreshPayResult`
|
|
||||||
).then(res => {})
|
|
||||||
// 支付成功逻辑
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'success',
|
|
||||||
duration: 1000
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
that.jieshuflag = false
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/shouye/index'
|
|
||||||
})
|
|
||||||
}, 1500)
|
|
||||||
},
|
|
||||||
fail(err) {
|
|
||||||
that.jieshuflag = false
|
|
||||||
// 支付失败逻辑
|
|
||||||
uni.showToast({
|
|
||||||
title: '支付失败',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.getDevice()
|
|
||||||
this.jieshuflag = false
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
this.$u.put(`/app/bill/endUse`, data).then(res => {
|
||||||
// console.log(this.temperature,'this.temperature');
|
if(res.code == 200){
|
||||||
if (this.temperature == null) {
|
uni.showModal({
|
||||||
uni.showLoading({
|
title: '提示',
|
||||||
title: '切换中'
|
content: '您确定要提前结束订单吗,将不会产生任何退款和赔偿?',
|
||||||
})
|
success: function(res) {
|
||||||
let that = this
|
if (res.confirm) {
|
||||||
xBlufi.initXBlufi(1);
|
uni.reLaunch({
|
||||||
xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent);
|
url:'/pages/shouye/index'
|
||||||
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{
|
|
||||||
if(this.detaobj.suitFeeType == 1 || this.detaobj.suitFeeType == 2){
|
|
||||||
let data = {
|
|
||||||
billId: this.billId,
|
|
||||||
totalEle:this.temperature
|
|
||||||
}
|
|
||||||
this.$u.put(`/app/bill/endSmartUse`, data).then(res => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
uni.getNetworkType({
|
|
||||||
success(res) {
|
|
||||||
if (res.networkType !== 'none') {
|
|
||||||
uni.getConnectedBluetoothDevices({
|
|
||||||
success(res) {
|
|
||||||
setTimeout(()=> {
|
|
||||||
xBlufi.notifySendCustomData({
|
|
||||||
customData: 'close'
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
this.jieshuflag = false
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/shouye/index'
|
|
||||||
})
|
|
||||||
},1000)
|
|
||||||
},1500)
|
|
||||||
},
|
|
||||||
fail(err) {
|
|
||||||
console.error('获取已连接蓝牙设备信息失败:',err)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
console.log('手机未连接网络')
|
|
||||||
// this.baiflag = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.jieshuflag = false
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
let data = {
|
uni.showToast({
|
||||||
billId: this.billId,
|
title: res.msg,
|
||||||
totalEle:this.temperature
|
icon: 'none',
|
||||||
}
|
duration: 1000
|
||||||
this.$u.put(`/app/bill/endTimingUse`, data).then(res => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
let that = this
|
|
||||||
uni.getNetworkType({
|
|
||||||
success(res) {
|
|
||||||
if (res.networkType !== 'none') {
|
|
||||||
uni.getConnectedBluetoothDevices({
|
|
||||||
success(res) {
|
|
||||||
setTimeout(()=> {
|
|
||||||
xBlufi.notifySendCustomData({
|
|
||||||
customData: 'close'
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
that.$u.get(`/app/pay/wx/${that.orderno}`).then((res) => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
|
|
||||||
uni.requestPayment({
|
|
||||||
provider: 'wxpay',
|
|
||||||
timeStamp: res.data.payParams.timeStamp,
|
|
||||||
nonceStr: res.data.payParams.nonceStr,
|
|
||||||
package: res.data.payParams.packageVal,
|
|
||||||
signType: res.data.payParams.signType,
|
|
||||||
paySign: res.data.payParams.paySign,
|
|
||||||
success: (res) => {
|
|
||||||
that.$u.put(
|
|
||||||
`/app/bill/${that.orderno}/refreshPayResult`
|
|
||||||
).then(res => {})
|
|
||||||
// 支付成功逻辑
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'success',
|
|
||||||
duration: 1000
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
that.jieshuflag = false
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/shouye/index'
|
|
||||||
})
|
|
||||||
}, 1500)
|
|
||||||
},
|
|
||||||
fail(err) {
|
|
||||||
that.jieshuflag = false
|
|
||||||
// 支付失败逻辑
|
|
||||||
uni.showToast({
|
|
||||||
title: '支付失败',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},1000)
|
|
||||||
},1500)
|
|
||||||
},
|
|
||||||
fail(err) {
|
|
||||||
console.error('获取已连接蓝牙设备信息失败:',err)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
console.log('手机未连接网络')
|
|
||||||
// this.baiflag = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.getDevice()
|
|
||||||
this.jieshuflag = false
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
})
|
||||||
}
|
}else{
|
||||||
|
this.getsb()
|
||||||
|
this.trueboxfalg = true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
btnbox() {
|
||||||
|
this.trueboxfalg = false
|
||||||
|
this.jieshuflag = true
|
||||||
|
if (this.onlineStatus == 1) {
|
||||||
|
if (this.detaobj.suitFeeType == 1 || this.detaobj.suitFeeType == 2) {
|
||||||
|
let data = {
|
||||||
|
billId: this.billId
|
||||||
|
}
|
||||||
|
this.$u.put(`/app/bill/endUse`, data).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'success',
|
||||||
|
duration: 1000
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
this.jieshuflag = false
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/shouye/index'
|
||||||
|
})
|
||||||
|
}, 1500)
|
||||||
|
} else {
|
||||||
|
this.getDevice()
|
||||||
|
this.jieshuflag = false
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
if (this.detaobj.status == 1) {
|
||||||
|
this.$u.get(`/app/pay/wx/${this.orderno}`).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
let that = this
|
||||||
|
uni.requestPayment({
|
||||||
|
provider: 'wxpay',
|
||||||
|
timeStamp: res.data.payParams.timeStamp,
|
||||||
|
nonceStr: res.data.payParams.nonceStr,
|
||||||
|
package: res.data.payParams.packageVal,
|
||||||
|
signType: res.data.payParams.signType,
|
||||||
|
paySign: res.data.payParams.paySign,
|
||||||
|
success: (res) => {
|
||||||
|
that.$u.put(`/app/bill/${that.orderno}/refreshPayResult`)
|
||||||
|
.then(res => {})
|
||||||
|
// 支付成功逻辑
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'success',
|
||||||
|
duration: 1000
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
that.jieshuflag = false
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/shouye/index'
|
||||||
|
})
|
||||||
|
}, 1500)
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
that.getDevice()
|
||||||
|
that.jieshuflag = false
|
||||||
|
// 支付失败逻辑
|
||||||
|
uni.showToast({
|
||||||
|
title: '支付失败',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
let data = {
|
||||||
|
billId: this.billId
|
||||||
|
}
|
||||||
|
this.$u.put(`/app/bill/endUse`, data).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$u.get(`/app/pay/wx/${this.orderno}`).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
let that = this
|
||||||
|
uni.requestPayment({
|
||||||
|
provider: 'wxpay',
|
||||||
|
timeStamp: res.data.payParams.timeStamp,
|
||||||
|
nonceStr: res.data.payParams.nonceStr,
|
||||||
|
package: res.data.payParams.packageVal,
|
||||||
|
signType: res.data.payParams.signType,
|
||||||
|
paySign: res.data.payParams.paySign,
|
||||||
|
success: (res) => {
|
||||||
|
that.$u.put(
|
||||||
|
`/app/bill/${that.orderno}/refreshPayResult`
|
||||||
|
).then(res => {})
|
||||||
|
// 支付成功逻辑
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'success',
|
||||||
|
duration: 1000
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
that.jieshuflag = false
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/shouye/index'
|
||||||
|
})
|
||||||
|
}, 1500)
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
that.jieshuflag = false
|
||||||
|
// 支付失败逻辑
|
||||||
|
uni.showToast({
|
||||||
|
title: '支付失败',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.getDevice()
|
||||||
|
this.jieshuflag = false
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// console.log(this.temperature,'this.temperature');
|
||||||
|
if (this.temperature == null) {
|
||||||
|
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{
|
||||||
|
if(this.detaobj.suitFeeType == 1 || this.detaobj.suitFeeType == 2){
|
||||||
|
let data = {
|
||||||
|
billId: this.billId,
|
||||||
|
totalEle:this.temperature
|
||||||
|
}
|
||||||
|
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'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
this.jieshuflag = false
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/shouye/index'
|
||||||
|
})
|
||||||
|
},1000)
|
||||||
|
},1500)
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.error('获取已连接蓝牙设备信息失败:',err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log('手机未连接网络')
|
||||||
|
// this.baiflag = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.jieshuflag = false
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
let data = {
|
||||||
|
billId: this.billId,
|
||||||
|
totalEle:this.temperature
|
||||||
|
}
|
||||||
|
this.$u.put(`/app/bill/endUse`, data).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
let that = this
|
||||||
|
uni.getNetworkType({
|
||||||
|
success(res) {
|
||||||
|
if (res.networkType !== 'none') {
|
||||||
|
uni.getConnectedBluetoothDevices({
|
||||||
|
success(res) {
|
||||||
|
setTimeout(()=> {
|
||||||
|
xBlufi.notifySendCustomData({
|
||||||
|
customData: 'close'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
that.$u.get(`/app/pay/wx/${that.orderno}`).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
|
||||||
|
uni.requestPayment({
|
||||||
|
provider: 'wxpay',
|
||||||
|
timeStamp: res.data.payParams.timeStamp,
|
||||||
|
nonceStr: res.data.payParams.nonceStr,
|
||||||
|
package: res.data.payParams.packageVal,
|
||||||
|
signType: res.data.payParams.signType,
|
||||||
|
paySign: res.data.payParams.paySign,
|
||||||
|
success: (res) => {
|
||||||
|
that.$u.put(
|
||||||
|
`/app/bill/${that.orderno}/refreshPayResult`
|
||||||
|
).then(res => {})
|
||||||
|
// 支付成功逻辑
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'success',
|
||||||
|
duration: 1000
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
that.jieshuflag = false
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/shouye/index'
|
||||||
|
})
|
||||||
|
}, 1500)
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
that.jieshuflag = false
|
||||||
|
// 支付失败逻辑
|
||||||
|
uni.showToast({
|
||||||
|
title: '支付失败',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},1000)
|
||||||
|
},1500)
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.error('获取已连接蓝牙设备信息失败:',err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log('手机未连接网络')
|
||||||
|
// this.baiflag = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.getDevice()
|
||||||
|
this.jieshuflag = false
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 每一分钟请求更新一次
|
// 每一分钟请求更新一次
|
||||||
|
@ -771,6 +799,7 @@
|
||||||
getsb() {
|
getsb() {
|
||||||
this.$u.get(`/app/device/${this.sbid}`).then(res => {
|
this.$u.get(`/app/device/${this.sbid}`).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
this.sbobj = res.data
|
||||||
this.onlineStatus = res.data.onlineStatus
|
this.onlineStatus = res.data.onlineStatus
|
||||||
this.qrResult = res.data.mac
|
this.qrResult = res.data.mac
|
||||||
this.totalElectriQuantity = res.data.totalElectriQuantity
|
this.totalElectriQuantity = res.data.totalElectriQuantity
|
||||||
|
|
|
@ -184,7 +184,7 @@
|
||||||
} else if (res.code == 500) {
|
} else if (res.code == 500) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'success',
|
icon: 'none',
|
||||||
duration: 1000
|
duration: 1000
|
||||||
})
|
})
|
||||||
this.btnmsk = false
|
this.btnmsk = false
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="page">
|
<view class="page">
|
||||||
<u-navbar title="常见问题" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
|
<u-navbar :title="tit" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
|
||||||
height='50'></u-navbar>
|
height='50'></u-navbar>
|
||||||
<view class="serch">
|
<view class="serch">
|
||||||
<u-search placeholder="搜索问题" height="72" :showAction="false" v-model="keyword" @change="sousuo" shape="square"></u-search>
|
<u-search placeholder="搜索问题" height="72" :showAction="false" v-model="keyword" @change="sousuo" shape="square"></u-search>
|
||||||
|
@ -40,10 +40,16 @@
|
||||||
listitem: [],
|
listitem: [],
|
||||||
huanindex: 1,
|
huanindex: 1,
|
||||||
keyword: '',
|
keyword: '',
|
||||||
flag:false
|
flag:false,
|
||||||
|
tit:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(option) {
|
||||||
|
if(option.id){
|
||||||
|
this.tit = '帮助中心'
|
||||||
|
}else{
|
||||||
|
this.tit = '常见问题'
|
||||||
|
}
|
||||||
this.getfenlei()
|
this.getfenlei()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getlists()
|
this.getlists()
|
||||||
|
@ -124,13 +130,11 @@
|
||||||
this.current = index;
|
this.current = index;
|
||||||
this.getlists()
|
this.getlists()
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
getlists() {
|
getlists() {
|
||||||
this.$u.get('/app/article/list?classifyId=' + this.classifyId + '&pageNum=' + 1 + '&pageSize=' + 6).then(
|
this.$u.get('/app/article/list?classifyId=' + this.classifyId + '&pageNum=' + 1 + '&pageSize=' + 6).then(
|
||||||
res => {
|
res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|
||||||
this.listitem = res.rows
|
this.listitem = res.rows
|
||||||
// console.log(this.listitem);
|
// console.log(this.listitem);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
<view class="" style="color: #8883F0;margin-top: 10rpx;margin-bottom: 10rpx;text-align: left;">
|
<view class="" style="color: #8883F0;margin-top: 10rpx;margin-bottom: 10rpx;text-align: left;">
|
||||||
蓝牙强度:{{item.RSSI}}
|
蓝牙强度:{{item.RSSI}}
|
||||||
</view>
|
</view>
|
||||||
<!-- <view @click="btnshows(item,index)" style="color: #8883F0;margin-top: 10rpx;margin-bottom: 10rpx;text-align: left;">
|
<view @click="btnshows(item,index)" style="color: #8883F0;margin-top: 10rpx;margin-bottom: 10rpx;text-align: left;">
|
||||||
型号选择:{{item.xuanz == undefined ? '--' : item.xuanz}}
|
型号选择:{{item.xuanz == undefined ? '--' : item.xuanz}}
|
||||||
</view> -->
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rt">
|
<view class="rt">
|
||||||
<!-- <text style="margin-bottom: 10rpx;" :id="item.deviceId" @tap="createBLEConnections(item)">响铃</text> -->
|
<!-- <text style="margin-bottom: 10rpx;" :id="item.deviceId" @tap="createBLEConnections(item)">响铃</text> -->
|
||||||
|
|
|
@ -128,7 +128,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="bot">收费方式</view>
|
<view class="bot">收费方式</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cont" @click="topage(5)" v-if="modelId != 34">
|
<view class="cont" @click="topage(5)" v-if="!modelId.some(tag => tag == 3)">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<image style="width: 58rpx;height: 58rpx;"
|
<image style="width: 58rpx;height: 58rpx;"
|
||||||
src="https://api.ccttiot.com/smartmeter/img/static/uik9veDG6pMVG5M1Vxze" mode="">
|
src="https://api.ccttiot.com/smartmeter/img/static/uik9veDG6pMVG5M1Vxze" mode="">
|
||||||
|
@ -284,7 +284,7 @@
|
||||||
timer: null,
|
timer: null,
|
||||||
url: "",
|
url: "",
|
||||||
deviceNo: '',
|
deviceNo: '',
|
||||||
modelid:''
|
modelId:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
@ -662,13 +662,14 @@
|
||||||
this.$u.get("/app/device/" + id).then((res) => {
|
this.$u.get("/app/device/" + id).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.deviceInfo = res.data
|
this.deviceInfo = res.data
|
||||||
res.data.modelTags.forEach(item => {
|
this.modelId = res.data.modelTags
|
||||||
if(item == 3){
|
// res.data.modelTags.forEach(item => {
|
||||||
this.modelid = 34
|
// if(item == 3){
|
||||||
}else{
|
// return this.modelId = 34
|
||||||
this.modelis = item
|
// }else{
|
||||||
}
|
// this.modelId = item
|
||||||
})
|
// }
|
||||||
|
// })
|
||||||
this.storeId = res.data.storeId
|
this.storeId = res.data.storeId
|
||||||
this.deviceNo = res.data.deviceNo
|
this.deviceNo = res.data.deviceNo
|
||||||
// this.qrResult = 'CTKG-' + res.data.mac
|
// this.qrResult = 'CTKG-' + res.data.mac
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
<view class="card">
|
<view class="card">
|
||||||
|
|
||||||
<view class="icon">
|
<view class="icon">
|
||||||
|
<view class="tit">
|
||||||
|
设备主图
|
||||||
|
</view>
|
||||||
<view class="imgbox" v-if="userImgs">
|
<view class="imgbox" v-if="userImgs">
|
||||||
<view style="border: 0;outline: none;width: 143rpx;padding-left: 0rpx;height: 143rpx;border-radius: 16rpx;margin: auto;" @click="getImage">
|
<view style="border: 0;outline: none;width: 143rpx;padding-left: 0rpx;height: 143rpx;border-radius: 16rpx;margin: auto;" @click="getImage">
|
||||||
<image style="border-radius: 10rpx;" :src="userImgs" mode="aspectFit"></image>
|
<image style="border-radius: 10rpx;" :src="userImgs" mode="aspectFit"></image>
|
||||||
|
@ -76,13 +79,13 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="li" v-if="listobj.modelId != 34">
|
<view class="li" v-if="!modelId.some(tag => tag == 3)" style="border-bottom: 0;">
|
||||||
<view class="tit">
|
<view class="tit">
|
||||||
WiFi名称
|
WiFi名称
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="txt">
|
<view class="txt">
|
||||||
{{listobj.wifi == null ? '' : listobj.wifi}}
|
{{listobj.wifi == null || listobj.wifi == '创特物联TP' ? '--' : listobj.wifi}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -233,7 +236,7 @@
|
||||||
userImgs:'',
|
userImgs:'',
|
||||||
url:'',
|
url:'',
|
||||||
token:'',
|
token:'',
|
||||||
modelid:''
|
modelId:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
@ -542,13 +545,7 @@
|
||||||
this.$u.get("/app/device/" + id).then((res) => {
|
this.$u.get("/app/device/" + id).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.listobj = res.data
|
this.listobj = res.data
|
||||||
res.data.modelTags.forEach(item => {
|
this.modelId = res.data.modelTags
|
||||||
if(item == 3){
|
|
||||||
this.modelid = 34
|
|
||||||
}else{
|
|
||||||
this.modelis = item
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -577,7 +574,7 @@
|
||||||
bottom: 230rpx;
|
bottom: 230rpx;
|
||||||
width: 632rpx;
|
width: 632rpx;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
background-color: red;
|
background-color: #8883f0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
|
@ -788,9 +785,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.icon {
|
.icon {
|
||||||
|
.tit{
|
||||||
|
padding-top: 50rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
margin-top: 40rpx;
|
margin-top: 40rpx;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
.imgbox {
|
.imgbox {
|
||||||
|
margin-left: 300rpx;
|
||||||
image {
|
image {
|
||||||
width: 142rpx;
|
width: 142rpx;
|
||||||
height: 142rpx;
|
height: 142rpx;
|
||||||
|
|
14
pages/my.vue
14
pages/my.vue
|
@ -16,10 +16,10 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="botcard" @click="btnsblr">
|
<!-- <view class="botcard" @click="btnsblr"> -->
|
||||||
<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/uYWpW30vIQ6M4svb7Vnb"></image> -->
|
<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/uYWpW30vIQ6M4svb7Vnb"></image> -->
|
||||||
<view class="txt">设备录入</view>
|
<!-- <view class="txt">设备录入</view> -->
|
||||||
</view>
|
<!-- </view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="tit">
|
<!-- <view class="tit">
|
||||||
|
@ -77,10 +77,10 @@
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uYOquvGtfb1sm5F60NgJ" mode=""></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uYOquvGtfb1sm5F60NgJ" mode=""></image>
|
||||||
<view class="txt">商家合作</view>
|
<view class="txt">商家合作</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<!-- <view class="botcard" @click="topage(2)">
|
<view class="botcard" @click="topage(2)">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u6qVTFXdkQKEqE1y0J4o" mode=""></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u6qVTFXdkQKEqE1y0J4o" mode=""></image>
|
||||||
<view class="txt">常见问题</view>
|
<view class="txt">帮助中心</view>
|
||||||
</view> -->
|
</view>
|
||||||
<!-- <view class="botcard" @click="topage(3)">
|
<!-- <view class="botcard" @click="topage(3)">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uGlrjkSOTDXMFuuRb03l" mode=""></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uGlrjkSOTDXMFuuRb03l" mode=""></image>
|
||||||
<view class="txt">意见反馈</view>
|
<view class="txt">意见反馈</view>
|
||||||
|
@ -175,7 +175,7 @@
|
||||||
})
|
})
|
||||||
}else if(num==2){
|
}else if(num==2){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/page_fenbao/statulist/question/index'
|
url:'/page_fenbao/statulist/question/index?id=' + 1
|
||||||
})
|
})
|
||||||
}else if(num==3){
|
}else if(num==3){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
Loading…
Reference in New Issue
Block a user