feat: 无扫码配置时自动匹配并升至1.1.20
This commit is contained in:
@@ -125,6 +125,7 @@ import md5 from '@/common/md5.js';
|
||||
import manifest from '@/manifest.json';
|
||||
import { mapState } from 'vuex'
|
||||
import app_upgrade from '@/uni_modules/app-upgrade/js_sdk/index.js'
|
||||
import { ensureScanConfigAfterLogin } from '@/common/scanAutoConfig.js'
|
||||
|
||||
function isDefaultPassword(data) {
|
||||
if (!data || typeof data !== 'object') return false;
|
||||
@@ -334,7 +335,7 @@ export default {
|
||||
this.$u.api.pdaLogin({
|
||||
'phone': this.login.username,
|
||||
'password': this.login.password,
|
||||
}).then((res) => {
|
||||
}).then(async (res) => {
|
||||
console.log('login res', res)
|
||||
var aLoginUserData = res;
|
||||
|
||||
@@ -365,6 +366,11 @@ export default {
|
||||
getApp().globalData.StoreNameID = aLoginUserData.default_physical_warehouse_id;
|
||||
getApp().globalData.StoreName = aLoginUserData.default_physical_warehouse_name;
|
||||
getApp().globalData.StoreTypeNo = '';
|
||||
try {
|
||||
await ensureScanConfigAfterLogin(this.$u.api);
|
||||
} catch (scanError) {
|
||||
console.log('自动匹配扫码设置失败', scanError);
|
||||
}
|
||||
const workbenchUrl = isDefaultPassword(aLoginUserData)
|
||||
? '/pages/sys/workbench/index?defaultPassword=1'
|
||||
: '/pages/sys/workbench/index';
|
||||
|
||||
Reference in New Issue
Block a user