111
This commit is contained in:
parent
a746f55b27
commit
d8b37a2a3f
|
@ -65,7 +65,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
var xBlufi = require("@/page_components/blufi/xBlufi.js")
|
||||
var xBlufi = require("@/page_components/blufi/xBlufi.js")
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -149,6 +149,13 @@
|
|||
path: '/pages/shouye/index'
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
console.log("unload ");
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
||||
wx.closeBLEConnection({
|
||||
deviceId: this.deviceId,
|
||||
})
|
||||
},
|
||||
|
||||
// 分享到朋友圈
|
||||
onShareTimeline: function() {
|
||||
|
|
|
@ -308,6 +308,13 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
console.log("unload ");
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
||||
wx.closeBLEConnection({
|
||||
deviceId: this.deviceId,
|
||||
})
|
||||
},
|
||||
// 分享到好友(会话)
|
||||
onShareAppMessage: function() {
|
||||
return {
|
||||
|
@ -405,28 +412,29 @@
|
|||
},
|
||||
btnjieshu(){
|
||||
if(this.detaobj.suitFeeMode == 1){
|
||||
let data = {
|
||||
billId: this.billId
|
||||
}
|
||||
this.$u.put(`/app/bill/endUse`, data).then(res => {
|
||||
if(res.code == 200){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您确定要提前结束订单吗,将不会产生任何退款和赔偿?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.reLaunch({
|
||||
url:'/pages/shouye/index'
|
||||
})
|
||||
}
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您确定要提前结束订单吗,将不会产生任何退款和赔偿?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
let data = {
|
||||
billId: that.billId
|
||||
}
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
that.$u.put(`/app/bill/endUse`, data).then(res => {
|
||||
if(res.code == 200){
|
||||
uni.reLaunch({
|
||||
url:'/pages/shouye/index'
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
|
@ -440,7 +448,7 @@
|
|||
if (this.onlineStatus == 1) {
|
||||
if (this.detaobj.suitFeeType == 1 || this.detaobj.suitFeeType == 2) {
|
||||
let data = {
|
||||
billId: this.billId
|
||||
billId: this.billId
|
||||
}
|
||||
this.$u.put(`/app/bill/endUse`, data).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
@ -471,7 +479,7 @@
|
|||
billNo:this.orderno,
|
||||
channelId:5
|
||||
}
|
||||
this.$u.put(`/app/bill/pay`,data).then.then((res) => {
|
||||
this.$u.put(`/app/bill/pay`,data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
let that = this
|
||||
uni.requestPayment({
|
||||
|
@ -520,7 +528,7 @@
|
|||
billNo:this.orderno,
|
||||
channelId:5
|
||||
}
|
||||
this.$u.put(`/app/bill/pay`,data).then.then((res) => {
|
||||
this.$u.put(`/app/bill/pay`,data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
let that = this
|
||||
uni.requestPayment({
|
||||
|
@ -667,7 +675,7 @@
|
|||
billNo:that.orderno,
|
||||
channelId:5
|
||||
}
|
||||
that.$u.put(`/app/bill/pay`,data).then.then((res) => {
|
||||
that.$u.put(`/app/bill/pay`,data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
|
|
|
@ -236,8 +236,8 @@
|
|||
this.timer = null;
|
||||
}
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': false
|
||||
wx.closeBLEConnection({
|
||||
deviceId: this.deviceId,
|
||||
})
|
||||
},
|
||||
onHide() {
|
||||
|
|
|
@ -378,10 +378,11 @@
|
|||
if (this.dotShowInterval) {
|
||||
clearInterval(this.dotShowInterval);
|
||||
}
|
||||
let that = this;
|
||||
wx.closeBLEConnection({
|
||||
deviceId: that.objlist.deviceId,
|
||||
})
|
||||
console.log("unload ");
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
||||
wx.closeBLEConnection({
|
||||
deviceId: this.objlist.deviceId,
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
// 开始闪烁动画
|
||||
|
|
|
@ -174,7 +174,7 @@
|
|||
一档费用
|
||||
</view>
|
||||
<view class="dianjtwo">
|
||||
<input type="text" v-model="gdvalue" /> <text>元/度</text>
|
||||
<input type="text" v-model="gdvalue" /> <text>元/时</text>
|
||||
</view>
|
||||
<view class="dianjthre" @click="changeColor('#64B6A7')">
|
||||
全天为一档
|
||||
|
@ -185,7 +185,7 @@
|
|||
二档费用
|
||||
</view>
|
||||
<view class="dianjtwo">
|
||||
<input type="text" v-model="pdvalue" /> <text>元/度</text>
|
||||
<input type="text" v-model="pdvalue" /> <text>元/时</text>
|
||||
</view>
|
||||
<view class="dianjthre" style="background: #468DFF;" @click="changeColor('#468DFF')">
|
||||
全天为二档
|
||||
|
@ -196,7 +196,7 @@
|
|||
三档费用
|
||||
</view>
|
||||
<view class="dianjtwo">
|
||||
<input type="text" v-model="dfvalue" /> <text>元/度</text>
|
||||
<input type="text" v-model="dfvalue" /> <text>元/时</text>
|
||||
</view>
|
||||
<view class="dianjthre" style="background: #8883F0;" @click="changeColor('#8883F0')">
|
||||
全天为三档
|
||||
|
@ -207,7 +207,7 @@
|
|||
四档费用
|
||||
</view>
|
||||
<view class="dianjtwo">
|
||||
<input type="text" v-model="jdvalue" /> <text>元/度</text>
|
||||
<input type="text" v-model="jdvalue" /> <text>元/时</text>
|
||||
</view>
|
||||
<view class="dianjthre" style="background: #FF4444;" @click="changeColor('#FF4444')">
|
||||
全天为四档
|
||||
|
|
|
@ -359,7 +359,7 @@
|
|||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
console.log('已销毁')
|
||||
} A
|
||||
}
|
||||
},
|
||||
onHide() {
|
||||
if (this.timer) {
|
||||
|
@ -368,6 +368,13 @@
|
|||
console.log('已销毁')
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
console.log("unload ");
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
||||
wx.closeBLEConnection({
|
||||
deviceId: this.deviceId,
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
setTimeout(() => {
|
||||
this.getDevice(this.id)
|
||||
|
@ -893,7 +900,7 @@
|
|||
this.btnmsk = false
|
||||
this.shibaiflag = false
|
||||
this.bluetoothflag = true
|
||||
// console.log(this.deviceId,'idididididdidii');
|
||||
console.log(this.deviceId,'idididididdidii');
|
||||
if (this.setMode == null) {
|
||||
xBlufi.initXBlufi(1)
|
||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
||||
|
@ -933,14 +940,12 @@
|
|||
if (systemInfo.platform == 'android') {
|
||||
// 当前设备是 Android
|
||||
uni.navigateTo({
|
||||
url: '/page_components/wifilist/index?deviceId=' + this
|
||||
.deviceId + '&name=' + this.name
|
||||
url: '/page_components/wifilist/index?deviceId=' + this.deviceId + '&name=' + this.name
|
||||
})
|
||||
} else if (systemInfo.platform == 'ios') {
|
||||
// 当前设备是 iOS
|
||||
uni.navigateTo({
|
||||
url: '/page_fenbao/device/wifivideo?deviceId=' + this
|
||||
.deviceId + '&name=' + this.name
|
||||
url: '/page_fenbao/device/wifivideo?deviceId=' + this.deviceId + '&name=' + this.name
|
||||
})
|
||||
}
|
||||
} else if (res.msg == '设备编号和mac不能同时为空') {
|
||||
|
@ -960,7 +965,7 @@
|
|||
// uni.navigateBack()
|
||||
}
|
||||
})
|
||||
}, 1000)
|
||||
}, 2000)
|
||||
} else {
|
||||
let name = ''
|
||||
let index = this.name.indexOf('-')
|
||||
|
@ -986,14 +991,12 @@
|
|||
if (systemInfo.platform == 'android') {
|
||||
// 当前设备是 Android
|
||||
uni.navigateTo({
|
||||
url: '/page_components/wifilist/index?deviceId=' + this.deviceId +
|
||||
'&name=' + this.name
|
||||
url: '/page_components/wifilist/index?deviceId=' + this.deviceId +'&name=' + this.name
|
||||
})
|
||||
} else if (systemInfo.platform == 'ios') {
|
||||
// 当前设备是 iOS
|
||||
uni.navigateTo({
|
||||
url: '/page_fenbao/device/wifivideo?deviceId=' + this.deviceId +
|
||||
'&name=' + this.name
|
||||
url: '/page_fenbao/device/wifivideo?deviceId=' + this.deviceId +'&name=' + this.name
|
||||
})
|
||||
}
|
||||
} else {
|
||||
|
@ -1107,7 +1110,7 @@
|
|||
this.deviceId = device.deviceId
|
||||
this.name = device.name
|
||||
this.mac = device.name.slice(5, 17)
|
||||
// console.log(this.mac, 'macmacmac')
|
||||
console.log(this.mac,this.deviceId,this.name, 'macmacmac')
|
||||
// this.devicesList = uniqueDevicesList
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user