Commit 6513638c by liangjianmin

bug

parent 51d671d5
......@@ -110,7 +110,7 @@ export default {
methods: {
scanChange() {
uni.scanCode({
success: function(res) {
success: res => {
console.log(res);
if (res.errMsg == 'scanCode:ok') {
uni.navigateTo({
......@@ -118,7 +118,7 @@ export default {
});
}
},
fail: function(res) {
fail: res => {
console.log(res);
uni.showToast({
title: '扫码失败',
......
......@@ -80,6 +80,14 @@ export default {
}
};
},
onLoad(option) {
this.getTraySelectOption();
try {
uni.removeStorageSync('device');
} catch (e) {
// error
}
},
onShow() {
const deviceData = uni.getStorageSync('device') || ''; //获取已连接蓝牙设备信息
if (deviceData) {
......@@ -90,9 +98,6 @@ export default {
this.device_name = '';
}
},
onLoad() {
this.getTraySelectOption();
},
methods: {
getTraySelectOption() {
this.request(API.getTraySelectOption, 'POST', {}, false).then(res => {
......
const API_BASE = 'https://api.ichunt.com';
//const API_BASE = 'http://api.liexin.com'
//const API_BASE = 'https://api.ichunt.com';
const API_BASE = 'http://api.liexin.com'
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