Commit 6513638c by liangjianmin

bug

parent 51d671d5
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
methods: { methods: {
scanChange() { scanChange() {
uni.scanCode({ uni.scanCode({
success: function(res) { success: res => {
console.log(res); console.log(res);
if (res.errMsg == 'scanCode:ok') { if (res.errMsg == 'scanCode:ok') {
uni.navigateTo({ uni.navigateTo({
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
}); });
} }
}, },
fail: function(res) { fail: res => {
console.log(res); console.log(res);
uni.showToast({ uni.showToast({
title: '扫码失败', title: '扫码失败',
......
...@@ -80,6 +80,14 @@ export default { ...@@ -80,6 +80,14 @@ export default {
} }
}; };
}, },
onLoad(option) {
this.getTraySelectOption();
try {
uni.removeStorageSync('device');
} catch (e) {
// error
}
},
onShow() { onShow() {
const deviceData = uni.getStorageSync('device') || ''; //获取已连接蓝牙设备信息 const deviceData = uni.getStorageSync('device') || ''; //获取已连接蓝牙设备信息
if (deviceData) { if (deviceData) {
...@@ -90,9 +98,6 @@ export default { ...@@ -90,9 +98,6 @@ export default {
this.device_name = ''; this.device_name = '';
} }
}, },
onLoad() {
this.getTraySelectOption();
},
methods: { methods: {
getTraySelectOption() { getTraySelectOption() {
this.request(API.getTraySelectOption, 'POST', {}, false).then(res => { this.request(API.getTraySelectOption, 'POST', {}, false).then(res => {
......
const API_BASE = 'https://api.ichunt.com'; //const API_BASE = 'https://api.ichunt.com';
//const API_BASE = 'http://api.liexin.com' const API_BASE = 'http://api.liexin.com'
const API = { const API = {
/** /**
* 上传数据 * 上传数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment