Commit b59d4030 by liimin

Merge branch 'feature/rework' of http://192.168.3.233:8090/monorepo/venus into feature/rework

2 parents d25aea67 bacea7a0
......@@ -167,14 +167,15 @@
stateCustomerInfo.carModel = (item as UTSJSONObject).name
stateCustomerInfo.carModelId = (item as UTSJSONObject).id
if (props.linkage) {
recordService.updateBusinessData({
const businessData: UTSJSONObject = {
carBrand: selectItemVal.carChildsBrandName,
carBrandId: selectItemVal.carChildsBrandId,
oneCarBrand: selectItemVal.carBrand,
oneCarBrandId: selectItemVal.carBrandId,
carModel: (item as UTSJSONObject).name,
carModelId: (item as UTSJSONObject).id
})
} as UTSJSONObject
recordService.updateBusinessData(businessData)
// dispatch('setCustomerInfo', stateCustomerInfo)
dispatch('updateViewKey')
dispatch('setCurrentCarInfo', selectItemVal)
......
......@@ -414,8 +414,8 @@
}
function open(): void {
recordService.getBusinessData().then(data =>{
const customerInfo = data as UTSJSONObject
recordService.getBusinessData().then((data: any) =>{
const customerInfo = (data != null ? data as UTSJSONObject : null)
if (customerInfo != null) {
formData.value = {
customerName: customerInfo.customerName != null && customerInfo.customerName != 'null' ? customerInfo.customerName : '',
......
......@@ -69,21 +69,11 @@ function getMidleClass(item: AccountItem): string {
return 'midle_5'
}
function get4SStoreList(loginUserObj: AccountItem): void {
function get4SStoreList(loginUserObj: UTSJSONObject): void {
console.log('get4SStoreList:', loginUserObj)
if (loginUserObj.isSuper == true) {
// 转换为 UTSJSONObject
const userInfoObj: UTSJSONObject = {
uuid: loginUserObj.uuid,
merchantName: loginUserObj.merchantName,
merchantId: loginUserObj.merchantId,
isSuper: loginUserObj.isSuper,
userType: loginUserObj.userType,
loginRole: loginUserObj.loginRole,
active: loginUserObj.active
}
emit('chooseAccount', userInfoObj)
emit('chooseAccount', loginUserObj)
return
}
......@@ -108,13 +98,7 @@ function get4SStoreList(loginUserObj: AccountItem): void {
const storeMerchantId = store['merchantId'] as string | null
const userInfoWithStore: UTSJSONObject = {
uuid: loginUserObj.uuid,
merchantName: loginUserObj.merchantName,
merchantId: loginUserObj.merchantId,
isSuper: loginUserObj.isSuper,
userType: loginUserObj.userType,
loginRole: loginUserObj.loginRole,
active: loginUserObj.active,
...loginUserObj,
shopMerchantName: storeMerchantName,
shopMerchantId: storeMerchantId,
default4SStoreInfo: {
......@@ -138,17 +122,7 @@ function get4SStoreList(loginUserObj: AccountItem): void {
icon: 'none'
})
} else {
// 转换为 UTSJSONObject
const userInfoObj: UTSJSONObject = {
uuid: loginUserObj.uuid,
merchantName: loginUserObj.merchantName,
merchantId: loginUserObj.merchantId,
isSuper: loginUserObj.isSuper,
userType: loginUserObj.userType,
loginRole: loginUserObj.loginRole,
active: loginUserObj.active
}
emit('chooseAccount', userInfoObj)
emit('chooseAccount', loginUserObj)
}
}
} else {
......@@ -191,7 +165,9 @@ function selectAccountLogin(id: string, merchantName: string, userInfo: AccountI
const loginUserInfoListData = data['loginUserInfoList'] as any[] | null
if (loginUserInfoListData != null && loginUserInfoListData.length > 0 && userInfo != null) {
console.log('开始获取4S店列表')
get4SStoreList(userInfo)
console.log(loginUserInfoListData)
let info = loginUserInfoListData[0] as UTSJSONObject
get4SStoreList(info)
} else {
uni.showToast({
title: '获取4S店列表失败',
......
......@@ -50,7 +50,6 @@ function jump(info: UTSJSONObject, data: any | null): void {
return;
}
jumpTimer = now;
console.log("跳转进入首页!");
uni.hideLoading();
......@@ -84,7 +83,6 @@ function jump(info: UTSJSONObject, data: any | null): void {
} else {
info.channelType = 1;
}
storage.set("userInfo", info, 0);
const sceneType = info.sceneType as null | number;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!