完善
This commit is contained in:
parent
53901aec4f
commit
63cf0b1e50
|
@ -21,7 +21,7 @@ const install = (Vue, vm) => {
|
||||||
// });
|
// });
|
||||||
Vue.prototype.$u.http.setConfig({
|
Vue.prototype.$u.http.setConfig({
|
||||||
// baseUrl: 'http://192.168.2.184:3000/dev-api',
|
// baseUrl: 'http://192.168.2.184:3000/dev-api',
|
||||||
baseUrl: 'https://kaiguan.chuantewulian.cn/prod-api',
|
baseUrl: 'https://kg.chuantewulian.cn/prod-api',
|
||||||
loadingText: '努力加载中~',
|
loadingText: '努力加载中~',
|
||||||
loadingTime: 1000,
|
loadingTime: 1000,
|
||||||
// 设置自定义头部content-type
|
// 设置自定义头部content-type
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
}
|
}
|
||||||
let sceneValue = option.q
|
let sceneValue = option.q
|
||||||
let decodedValue = decodeURIComponent(sceneValue);
|
let decodedValue = decodeURIComponent(sceneValue);
|
||||||
this.id = getQueryParam(decodedValue, 'deviceNo')
|
this.id = getQueryParam(decodedValue, 's')
|
||||||
console.log(this.id)
|
console.log(this.id)
|
||||||
this.startTimer()
|
this.startTimer()
|
||||||
this.gettaoc()
|
this.gettaoc()
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
}
|
}
|
||||||
let sceneValue = res.result
|
let sceneValue = res.result
|
||||||
let decodedValue = decodeURIComponent(sceneValue);
|
let decodedValue = decodeURIComponent(sceneValue);
|
||||||
this.deviceNo = getQueryParam(decodedValue, 'deviceNo')
|
this.deviceNo = getQueryParam(decodedValue, 's')
|
||||||
// this.deviceNo = res.result;
|
// this.deviceNo = res.result;
|
||||||
},
|
},
|
||||||
fail: err => {
|
fail: err => {
|
||||||
|
|
|
@ -180,14 +180,10 @@
|
||||||
}
|
}
|
||||||
let sceneValue = res.result
|
let sceneValue = res.result
|
||||||
let decodedValue = decodeURIComponent(sceneValue);
|
let decodedValue = decodeURIComponent(sceneValue);
|
||||||
let id = getQueryParam(decodedValue, 'deviceNo')
|
let id = getQueryParam(decodedValue, 's')
|
||||||
this.$u.get(`/app/device/${id}/bySn`).then((res) => {
|
this.$u.get(`/app/device/${id}/bySn`).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.qrResult = 'CTKG-' + res.data.mac
|
this.qrResult = 'CTKG-' + res.data.mac
|
||||||
// console.log(this.qrResult);
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url:'/page_fenbao/device/lianjie?mac=' + this.qrResult + '&storeId=' + this.storeId
|
|
||||||
// })
|
|
||||||
xBlufi.initXBlufi(1);
|
xBlufi.initXBlufi(1);
|
||||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent);
|
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent);
|
||||||
xBlufi.notifyStartDiscoverBle({
|
xBlufi.notifyStartDiscoverBle({
|
||||||
|
@ -243,7 +239,8 @@
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '没有发现设备',
|
title: '没有发现设备',
|
||||||
icon: 'none'
|
icon: 'none',
|
||||||
|
duration:2000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -180,7 +180,7 @@
|
||||||
}
|
}
|
||||||
let sceneValue = res.result
|
let sceneValue = res.result
|
||||||
let decodedValue = decodeURIComponent(sceneValue);
|
let decodedValue = decodeURIComponent(sceneValue);
|
||||||
let id = getQueryParam(decodedValue, 'deviceNo')
|
let id = getQueryParam(decodedValue, 's')
|
||||||
this.$u.get(`/app/device/${id}/withSuitList`).then((res) =>{
|
this.$u.get(`/app/device/${id}/withSuitList`).then((res) =>{
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
|
@ -539,14 +539,18 @@
|
||||||
if (systemInfo.platform === 'android') {
|
if (systemInfo.platform === 'android') {
|
||||||
// 当前设备是 Android
|
// 当前设备是 Android
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/page_components/wifilist/index?deviceId=' + options
|
url: '/page_components/wifilist/index?deviceId=' +
|
||||||
.data.deviceId + '&name=' + options.data.name
|
options
|
||||||
|
.data.deviceId + '&name=' +
|
||||||
|
options.data.name
|
||||||
})
|
})
|
||||||
} else if (systemInfo.platform === 'ios') {
|
} else if (systemInfo.platform === 'ios') {
|
||||||
// 当前设备是 iOS
|
// 当前设备是 iOS
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/page_fenbao/device/wifivideo?deviceId=' + options
|
url: '/page_fenbao/device/wifivideo?deviceId=' +
|
||||||
.data.deviceId + '&name=' + options.data.name
|
options
|
||||||
|
.data.deviceId + '&name=' +
|
||||||
|
options.data.name
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
|
@ -768,6 +772,7 @@
|
||||||
padding-left: 80rpx;
|
padding-left: 80rpx;
|
||||||
padding-right: 120rpx;
|
padding-right: 120rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.cont {
|
.cont {
|
||||||
.tit {
|
.tit {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
}
|
}
|
||||||
let sceneValue = res.result
|
let sceneValue = res.result
|
||||||
let decodedValue = decodeURIComponent(sceneValue);
|
let decodedValue = decodeURIComponent(sceneValue);
|
||||||
this.qrResult = getQueryParam(decodedValue, 'deviceNo')
|
this.qrResult = getQueryParam(decodedValue, 's')
|
||||||
// this.qrResult = res.result; // 将扫描结果存储在数据中
|
// this.qrResult = res.result; // 将扫描结果存储在数据中
|
||||||
},
|
},
|
||||||
fail: err => {
|
fail: err => {
|
||||||
|
|
|
@ -216,7 +216,8 @@
|
||||||
}
|
}
|
||||||
let sceneValue = res.result
|
let sceneValue = res.result
|
||||||
let decodedValue = decodeURIComponent(sceneValue);
|
let decodedValue = decodeURIComponent(sceneValue);
|
||||||
let id = getQueryParam(decodedValue, 'deviceNo')
|
let id = getQueryParam(decodedValue, 's')
|
||||||
|
console.log(res,id);
|
||||||
this.$u.get(`/app/device/${id}/withSuitList`).then((res) => {
|
this.$u.get(`/app/device/${id}/withSuitList`).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
Loading…
Reference in New Issue
Block a user