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