Commit e49bf3ea by liangjianmin

记住放置托盘

parent d6b15a65
Showing with 9 additions and 0 deletions
......@@ -65,13 +65,21 @@
};
},
created() {
this.getTraySelectOption();
},
methods: {
getTraySelectOption() {
this.request(API.getTraySelectOption, 'POST', {}, false).then(res => {
if (res.err_code === 0) {
this.traySelectOption = res.data;
let token = uni.getStorageSync('token');
let tray_sn_index = uni.getStorageSync('tray_sn_index');
if (token) {
this.index = tray_sn_index;
}
}
});
},
......@@ -128,6 +136,7 @@
this.request(API.printLabel, 'POST', this.form, false).then(res => {
if (res.err_code === 0) {
this.printLabelData = res.data;
uni.setStorageSync('tray_sn_index', this.index);
this.openBluetoothAdapter();
} else {
uni.showToast({
......
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