Commit bea74aea by 李伟康

commit 提交

1 parent 000ed1e0
......@@ -31,7 +31,7 @@ const getMockData = async (immediate = false) => {
data.moduleList = await imgToBase64(data.moduleList, 'thumbnail')
data.default_moduleList = await imgToBase64(data.default_moduleList, 'thumbnail')
serverConfig.mockCache = data;
uni.$storage.set("mock_data", data);
uni.$storage.set('mock_data', data);
return Promise.resolve(data);
} else {
const key = Date.now();
......@@ -78,7 +78,7 @@ const imgToBase64 = (list, urlKey) => {
})
})
};
const updateMockData = (dataList, keyList, storageName) => {
const updateMockData = (dataList, keyList, storageName = 'mock_data') => {
const mockData = uni.$storage.get(storageName)
keyList.map(key => {
mockData[key] = dataList[key]
......@@ -103,7 +103,7 @@ const getBydMockData = async (immediate = false) => {
data.createTime = Date.now();
data.moduleList = await imgToBase64(data.moduleList, 'thumbnail')
bydServerConfig.mockCache = data;
uni.$storage.set("byd_mock_data", data);
uni.$storage.set('byd_mock_data', data);
return Promise.resolve(data);
} else {
const key = Date.now();
......
......@@ -5,6 +5,7 @@
.icon-avatar { width: 96rpx; height: 96rpx; background-position: -381rpx -726rpx;}
.icon-back { width: 128rpx; height: 50rpx; background-position: -111rpx -853rpx;}
.icon-bao { width: 196rpx; height: 220rpx; background-position: -830rpx -382rpx;}
.icon-byd { width: 184rpx; height: 36rpx; background-position: -1041rpx -557rpx;}
.icon-change-account { width: 32rpx; height: 32rpx; background-position: -1212rpx -617rpx;}
.icon-clone { width: 24rpx; height: 24rpx; background-position: -1285rpx -668rpx;}
.icon-customer-1 { width: 400rpx; height: 400rpx; background-position: 0rpx 0rpx;}
......@@ -49,5 +50,4 @@
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -154rpx -964rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -229rpx -964rpx;}
.icon-total { width: 32rpx; height: 32rpx; background-position: -1269rpx -773rpx;}
.icon-visible { width: 40rpx; height: 40rpx; background-position: -995rpx -668rpx;}
.icon-byd { width: 184rpx; height: 36rpx; background-position: -1041rpx -557rpx;}
\ No newline at end of file
.icon-visible { width: 40rpx; height: 40rpx; background-position: -995rpx -668rpx;}
\ No newline at end of file
No preview for this file type
<template>
<view class="layout">
<view :class="['layout',{'byd-layout':isByd}]">
<wnCanvas
canvasId="c-5"
:drawStatus="penSwitch"
......@@ -81,7 +81,8 @@ export default {
penSwitch: Boolean,
show: Boolean,
title: String,
isPreview: Boolean
isPreview: Boolean,
isByd: Boolean
},
name: 'Reception',
data () {
......@@ -276,4 +277,13 @@ export default {
}
}
}
.byd-layout{
background-image: url('@/assets/images/media/byd-insurance-bg.webp') !important;
.title{
padding: 120rpx 128rpx 48rpx;
.text{
text-align: center;
}
}
}
</style>
const target = ["ip", "dev", "uat", "prod", "beta"];
const index = 1;
const index = 4;
/**
*
0本地
......
......@@ -73,11 +73,13 @@ export default {
.feature-title {
font-weight: 500;
font-size: 40rpx;
line-height: 56rpx;
}
.feature-description {
font-size: 28rpx;
margin-top: 8rpx;
color: rgba(255, 255, 255, 0.7);
line-height: 40rpx;
}
}
}
......@@ -92,6 +94,7 @@ export default {
font-size: 26rpx;
color: #141414;
border-radius: 0 0 40rpx 40rpx;
line-height: 40rpx;
.notice-title {
color: #666666;
}
......
......@@ -165,78 +165,79 @@ export default {
/**比亚迪 */
if (this.channelType == 2) {
let { moduleList, toolList } = await uni.$api.systemApi.getBydMockData(true)
await moduleList.map(async e => {
if (e.receptionSourceDetailList)
e.receptionSourceDetailList = await uni.$api.systemApi.imgToBase64(
moduleList = await Promise.all(
moduleList.map(async e => ({
...e,
receptionSourceDetailList: e.receptionSourceDetailList ? await uni.$api.systemApi.imgToBase64(
e.receptionSourceDetailList,
"detailUrl"
);
})
) : undefined,
screenList: e.screenList ? await uni.$api.systemApi.imgToBase64(
e.screenList,
"url"
) : undefined
}))
)
toolList = await uni.$api.systemApi.imgToBase64(toolList, "shortTitleUrl")
uni.$api.systemApi.updateMockData({
moduleList,
toolList,
}, ['moduleList', 'toolList'], 'byd_mock_data')
}, ['moduleList', 'toolList'],'byd_mock_data')
this.setViewInfo(moduleList, toolList)
} else {
let { moduleList, toolList,
default_moduleList, default_toolList,
} = await uni.$api.systemApi.getMockData(true),
_moduleList,
_toolList
} = await uni.$api.systemApi.getMockData(true)
if (this.channelType == 3) {
/**其他品牌 */
default_toolList = await uni.$api.systemApi.imgToBase64(default_toolList, "shortTitleUrl");
_moduleList = default_moduleList
_toolList = default_toolList
uni.$api.systemApi.updateMockData({
default_moduleList,
default_toolList,
}, ['default_moduleList', 'default_toolList'])
this.setViewInfo(default_moduleList, default_toolList)
} else {
/**默认问界 */
await moduleList.map(async (e) => {
if (e.receptionSourceDetailList)
e.receptionSourceDetailList = await uni.$api.systemApi.imgToBase64(
moduleList = await Promise.all(
moduleList.map(async e => ({
...e,
receptionSourceDetailList: e.receptionSourceDetailList ? await uni.$api.systemApi.imgToBase64(
e.receptionSourceDetailList,
"detailUrl"
);
if (e.carTypeList)
e.carTypeList = await uni.$api.systemApi.imgToBase64(
) : undefined,
carTypeList: e.carTypeList ? await uni.$api.systemApi.imgToBase64(
e.carTypeList,
"url"
);
if (e.screenList)
e.screenList = await uni.$api.systemApi.imgToBase64(
) : undefined,
screenList: e.screenList ? await uni.$api.systemApi.imgToBase64(
e.screenList,
"url"
)
});
) : undefined
}))
)
toolList = await uni.$api.systemApi.imgToBase64(toolList, "shortTitleUrl")
_moduleList = moduleList
_toolList = toolList
uni.$api.systemApi.updateMockData({
moduleList,
toolList
}, ["moduleList", 'toolList'])
this.setViewInfo(moduleList, toolList)
}
uni.$api.systemApi.updateMockData({
default_moduleList,
default_toolList,
moduleList,
toolList
}, ["moduleList", 'toolList',
'default_moduleList', 'default_toolList',
], 'mock_data')
this.setViewInfo(_moduleList, _toolList)
}
},
errorImg (index) {
this.moduleList[index].showAlt = true;
},
async start () {
const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO"
);
if (result !== 1) {
uni.showToast({
title: "为了记录语音通话,请打开录音权限",
icon: "none",
});
return;
}
// const result = await this.$permision.requestAndroidPermission(
// "android.permission.RECORD_AUDIO"
// );
// if (result !== 1) {
// uni.showToast({
// title: "为了记录语音通话,请打开录音权限",
// icon: "none",
// });
// return;
// }
this.getSoure();
this.clearHistory();
this.$refs.home.startAudio();
......@@ -333,6 +334,7 @@ export default {
/**按序加载车型 */
async getCarBrandsList (carBrandList, index) {
const item = carBrandList[index]
if (!item) return
const carList = uni.getStorageSync(
`${item.id}_${item.brandId}_carlist`
);
......
......@@ -25,7 +25,7 @@ class Storage {
* @param {*} type | 类型,是 get set rm
* @param {*} emptyFlag | 是否判断为空情况,默认判断 true,false 为不判断
*/
checkKeyType(key, type, emptyFlag = true) {
checkKeyType (key, type, emptyFlag = true) {
if (typeof key != 'string') {
throw new Error(`Storage ${this.types[type]} func: key must be string`)
return false
......@@ -69,7 +69,7 @@ class Storage {
*
* @param {*} 空key返回默认定义数组的值
*/
getObjectKeyValue(key) {
getObjectKeyValue (key) {
// ObjectList
if (typeof key == 'string') {
key = this.addEvnToKey(key)
......@@ -125,6 +125,8 @@ class Storage {
}
})
}
const storageInfo = uni.getStorageInfoSync();
console.log(`Used storage size: ${storageInfo.currentSize} bytes`);
})
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!