Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 63a4e10e
authored
Mar 18, 2025
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
素材增加配置服务
1 parent
f14b531e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
165 deletions
api/module/systemApi.js
manifest.json
pages/equity/index.vue
utils/cache/constantData.js
api/module/systemApi.js
View file @
63a4e10
This diff is collapsed.
Click to expand it.
manifest.json
View file @
63a4e10
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
"versionName"
:
"2.5.1"
,
"versionName"
:
"2.5.1"
,
"versionCode"
:
"251"
,
"versionCode"
:
"251"
,
"transformPx"
:
false
,
"transformPx"
:
false
,
"sassImplementationName"
:
"node-sass"
,
/*
5
+App特有相关
*/
/*
5
+App特有相关
*/
"app-plus"
:
{
"app-plus"
:
{
"cache"
:
false
,
"cache"
:
false
,
...
@@ -16,6 +17,7 @@
...
@@ -16,6 +17,7 @@
"ignoreVersion"
:
true
"ignoreVersion"
:
true
},
},
"screenOrientation"
:
"landscape"
,
"screenOrientation"
:
"landscape"
,
"splashscreen"
:
{
"splashscreen"
:
{
"alwaysShowBeforeRender"
:
true
,
"alwaysShowBeforeRender"
:
true
,
"waiting"
:
true
,
"waiting"
:
true
,
...
...
pages/equity/index.vue
View file @
63a4e10
...
@@ -89,6 +89,10 @@ export default {
...
@@ -89,6 +89,10 @@ export default {
channelType
()
{
channelType
()
{
const
{
channelType
}
=
uni
.
$storage
.
get
(
'userInfo'
)
const
{
channelType
}
=
uni
.
$storage
.
get
(
'userInfo'
)
return
channelType
||
1
//默认问界
return
channelType
||
1
//默认问界
},
shopMerchantId
()
{
const
{
shopMerchantId
}
=
uni
.
$storage
.
get
(
'userInfo'
)
return
shopMerchantId
}
}
},
},
onBackPress
(
options
)
{
onBackPress
(
options
)
{
...
@@ -102,7 +106,7 @@ export default {
...
@@ -102,7 +106,7 @@ export default {
return
false
return
false
},
},
onLoad
()
{
onLoad
()
{
this
.
setViewInfo
()
uni
.
$api
.
systemApi
.
getMockData
(
true
)
//获取APP配置信息
this
.
getSoure
()
this
.
getSoure
()
this
.
get_Vehicle_Sales_Data
()
this
.
get_Vehicle_Sales_Data
()
},
},
...
@@ -159,124 +163,15 @@ export default {
...
@@ -159,124 +163,15 @@ export default {
})
})
},
},
// 查询素材
// 查询素材
// 查询素材
async
getSoure
(
loadStorage
=
true
)
{
async
getSoure
()
{
const
{
channelType
,
shopMerchantId
}
=
this
/**比亚迪 */
if
(
loadStorage
)
{
if
(
this
.
channelType
==
2
)
{
let
data
=
uni
.
getStorageSync
(
`source_data_merchantId_
${
shopMerchantId
}
`
)
let
{
moduleList
,
toolList
}
=
await
uni
.
$api
.
systemApi
.
getBydMockData
(
true
)
if
(
!
data
)
data
=
uni
.
getStorageSync
(
`source_data_channelType_
${
channelType
}
`
)
let
configList
if
(
data
)
this
.
setViewInfo
(
data
)
try
{
configList
=
await
uni
.
$api
.
systemApi
.
findReceptionpriproConfigList
({})
uni
.
$storage
.
set
(
'findReceptionpriproConfigList'
,
configList
)
}
catch
(
error
)
{
configList
=
uni
.
$storage
.
get
(
'findReceptionpriproConfigList'
)
}
const
toolOtherList
=
configList
.
map
(
i
=>
{
return
{
id
:
10
+
i
.
id
,
shortTitle
:
i
.
productName
,
shortTitleUrl
:
i
.
procuctLog
}
})
toolList
=
toolList
.
concat
(
toolOtherList
)
const
moduleOtherList
=
configList
.
map
(
i
=>
{
return
{
id
:
10
+
i
.
id
,
title
:
i
.
productName
,
shortTitleUrl
:
i
.
procuctLog
,
productPoster
:
i
.
productPoster
,
showAlt
:
false
,
componentName
:
'CaseCenter'
,
receptionpriproCusCaseList
:
i
.
receptionpriproCusCaseList
}
})
moduleList
=
moduleList
.
concat
(
moduleOtherList
)
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'
)
this
.
setViewInfo
(
moduleList
,
toolList
)
}
/**极狐 */
else
if
(
this
.
channelType
==
4
)
this
.
getJihuMockData
()
else
{
let
{
moduleList
,
toolList
,
default_moduleList
,
default_toolList
,
boutiqueDefaultCarBrandId
,
aitoCarModelIds
}
=
await
uni
.
$api
.
systemApi
.
getMockData
(
true
)
if
(
this
.
channelType
==
3
)
{
let
configList
try
{
configList
=
await
uni
.
$api
.
systemApi
.
findReceptionpriproConfigList
({})
uni
.
$storage
.
set
(
'findReceptionpriproConfigList'
,
configList
)
}
catch
(
error
)
{
configList
=
uni
.
$storage
.
get
(
'findReceptionpriproConfigList'
)
}
const
toolOtherList
=
configList
.
map
(
i
=>
{
return
{
id
:
10
+
i
.
id
,
shortTitle
:
i
.
productName
,
shortTitleUrl
:
i
.
procuctLog
}
})
default_toolList
=
default_toolList
.
concat
(
toolOtherList
)
const
moduleOtherList
=
configList
.
map
(
i
=>
{
return
{
id
:
10
+
i
.
id
,
title
:
i
.
productName
,
shortTitleUrl
:
i
.
procuctLog
,
productPoster
:
i
.
productPoster
,
showAlt
:
false
,
componentName
:
'CaseCenter'
,
receptionpriproCusCaseList
:
i
.
receptionpriproCusCaseList
}
})
default_moduleList
=
default_moduleList
.
concat
(
moduleOtherList
)
/**其他品牌 */
default_toolList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
default_toolList
,
'shortTitleUrl'
)
uni
.
$api
.
systemApi
.
updateMockData
(
{
default_moduleList
,
default_toolList
},
[
'default_moduleList'
,
'default_toolList'
]
)
this
.
setViewInfo
(
default_moduleList
,
default_toolList
)
}
else
{
this
.
aitoCarModelIds
=
aitoCarModelIds
/**默认问界 */
moduleList
=
await
Promise
.
all
(
moduleList
.
map
(
async
e
=>
{
const
receptionSourceDetailListType
=
Array
.
isArray
(
e
.
receptionSourceDetailList
)
return
{
...
e
,
receptionSourceDetailList
:
e
.
receptionSourceDetailList
?
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
receptionSourceDetailList
,
receptionSourceDetailListType
?
'detailUrl'
:
''
,
receptionSourceDetailListType
)
:
undefined
,
carTypeList
:
e
.
carTypeList
?
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
carTypeList
,
'url'
)
:
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'
]
)
this
.
$store
.
state
.
user
.
boutiqueDefaultCarBrandId
=
boutiqueDefaultCarBrandId
this
.
setViewInfo
(
moduleList
,
toolList
)
}
}
}
let
requestData
=
await
uni
.
$api
.
systemApi
.
getSoureData
(
channelType
,
shopMerchantId
)
this
.
setViewInfo
(
requestData
)
},
},
errorImg
(
index
)
{
errorImg
(
index
)
{
this
.
moduleList
[
index
].
showAlt
=
true
this
.
moduleList
[
index
].
showAlt
=
true
...
@@ -288,7 +183,7 @@ export default {
...
@@ -288,7 +183,7 @@ export default {
mask
:
true
mask
:
true
})
})
this
.
$refs
.
home
.
startAudio
()
this
.
$refs
.
home
.
startAudio
()
this
.
getSoure
()
this
.
getSoure
(
false
)
this
.
clearHistory
()
this
.
clearHistory
()
this
.
id
=
this
.
moduleList
[
0
].
id
this
.
id
=
this
.
moduleList
[
0
].
id
this
.
type
=
'edit'
this
.
type
=
'edit'
...
@@ -403,54 +298,16 @@ export default {
...
@@ -403,54 +298,16 @@ export default {
}
}
},
},
/**素材内容 */
/**素材内容 */
setViewInfo
(
_moduleList
,
_toolList
)
{
setViewInfo
(
data
)
{
if
(
_moduleList
&&
_toolList
)
{
let
{
moduleList
,
toolList
,
aitoCarModelIds
}
=
data
this
.
moduleList
=
_moduleList
if
(
this
.
channelType
==
1
)
this
.
aitoCarModelIds
=
aitoCarModelIds
this
.
toolList
=
_toolList
return
}
if
(
this
.
channelType
==
2
)
{
const
{
moduleList
,
toolList
}
=
uni
.
$storage
.
get
(
'byd_mock_data'
)
this
.
moduleList
=
moduleList
this
.
moduleList
=
moduleList
this
.
toolList
=
toolList
this
.
toolList
=
toolList
}
else
{
this
.
$store
.
state
.
user
=
{
const
{
default_moduleList
,
default_toolList
,
moduleList
,
toolList
}
=
uni
.
$storage
.
get
(
'mock_data'
)
||
{}
...
this
.
$store
.
state
.
user
,
this
.
moduleList
=
{
...
data
3
:
default_moduleList
,
1
:
moduleList
}[
this
.
channelType
]
this
.
toolList
=
{
3
:
default_toolList
,
1
:
toolList
}[
this
.
channelType
]
}
},
async
getJihuMockData
()
{
let
{
moduleList
,
toolList
,
boutiqueDefaultCarBrandId
,
defaultCarId
}
=
await
uni
.
$api
.
systemApi
.
getJihuMockData
(
true
)
moduleList
=
await
Promise
.
all
(
moduleList
.
map
(
async
e
=>
{
const
receptionSourceDetailListType
=
Array
.
isArray
(
e
.
receptionSourceDetailList
)
return
{
...
e
,
receptionSourceDetailList
:
e
.
receptionSourceDetailList
?
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
receptionSourceDetailList
,
receptionSourceDetailListType
?
'detailUrl'
:
''
,
receptionSourceDetailListType
)
:
undefined
,
carTypeList
:
e
.
carTypeList
?
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
carTypeList
,
'url'
)
:
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'
],
'jihu_mock_data'
)
this
.
$store
.
state
.
user
.
boutiqueDefaultCarBrandId
=
boutiqueDefaultCarBrandId
this
.
$store
.
state
.
user
.
defaultCarId
=
defaultCarId
this
.
setViewInfo
(
moduleList
,
toolList
)
}
}
}
}
}
</
script
>
</
script
>
...
...
utils/cache/constantData.js
View file @
63a4e10
...
@@ -25,9 +25,7 @@ export const STORAGE_OBJECTKEY = {
...
@@ -25,9 +25,7 @@ export const STORAGE_OBJECTKEY = {
recordSuccessList
:
'recordSuccessList'
,
recordSuccessList
:
'recordSuccessList'
,
historyList
:
'historyList'
,
historyList
:
'historyList'
,
storageVersion
:
'storageVersion'
,
storageVersion
:
'storageVersion'
,
byd_mock_data
:
'byd_mock_data'
,
boutique_mock_data
:
'boutique_mock_data'
,
boutique_mock_data
:
'boutique_mock_data'
,
findReceptionpriproConfigList
:
'findReceptionpriproConfigList'
,
findReceptionpriproConfigList
:
'findReceptionpriproConfigList'
,
appInfoList
:
'appInfoList'
,
appInfoList
:
'appInfoList'
,
jihu_mock_data
:
'jihu_mock_data'
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment