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 000ed1e0
authored
Aug 14, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 增加比亚迪配置
1 parent
c5001d21
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
175 additions
and
98 deletions
api/module/systemApi.js
components/HomeFrame/components/RecordList.vue
pages/common/components/Scene.vue
pages/equity/detail/components/Guarantee.vue
pages/equity/detail/detail.vue
pages/equity/index.vue
uni.scss
utils/cache/constantData.js
api/module/systemApi.js
View file @
000ed1e
...
@@ -5,9 +5,16 @@ const serverConfig = {
...
@@ -5,9 +5,16 @@ const serverConfig = {
mockRequestCount
:
null
,
mockRequestCount
:
null
,
mockTimer
:
{},
mockTimer
:
{},
mockCache
:
null
,
mockCache
:
null
,
};
},
const
configModule
=
'app-tape'
bydServerConfig
=
{
const
configUrl
=
`https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=
${
configModule
}
&env=
${
env
}
`
;
mockRequestCount
:
null
,
mockTimer
:
{},
mockCache
:
null
,
},
configModule
=
'app-tape'
,
bydConfigModule
=
'byd-pad-config'
,
configUrl
=
`https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=
${
configModule
}
&env=
${
env
}
`
,
bydConfigUrl
=
`https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=
${
bydConfigModule
}
&env=
${
env
}
`
/**获取mock数据 */
/**获取mock数据 */
const
getMockData
=
async
(
immediate
=
false
)
=>
{
const
getMockData
=
async
(
immediate
=
false
)
=>
{
...
@@ -71,15 +78,53 @@ const imgToBase64 = (list, urlKey) => {
...
@@ -71,15 +78,53 @@ const imgToBase64 = (list, urlKey) => {
})
})
})
})
};
};
const
updateMockData
=
(
dataList
,
keyList
)
=>
{
const
updateMockData
=
(
dataList
,
keyList
,
storageName
)
=>
{
const
mockData
=
uni
.
$storage
.
get
(
'mock_data'
)
const
mockData
=
uni
.
$storage
.
get
(
storageName
)
keyList
.
map
(
key
=>
{
keyList
.
map
(
key
=>
{
mockData
[
key
]
=
dataList
[
key
]
mockData
[
key
]
=
dataList
[
key
]
})
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
uni
.
$storage
.
set
(
"mock_data"
,
mockData
)
uni
.
$storage
.
set
(
storageName
,
mockData
)
},
1
e3
)
},
1
e3
)
}
}
/**
*获取比亚迪配置
*/
const
getBydMockData
=
async
(
immediate
=
false
)
=>
{
const
MOCKDATA
=
uni
.
$storage
.
get
(
'byd_mock_data'
)
try
{
if
(
!
immediate
&&
MOCKDATA
&&
Date
.
now
()
-
MOCKDATA
.
createTime
<
5
*
60
e3
)
{
return
Promise
.
resolve
(
MOCKDATA
);
}
else
{
if
(
!
bydServerConfig
.
mockRequestCount
||
immediate
)
{
bydServerConfig
.
mockCache
=
null
;
bydServerConfig
.
mockRequestCount
=
Date
.
now
();
const
data
=
await
http
.
uni_request
({
url
:
bydConfigUrl
});
data
.
createTime
=
Date
.
now
();
data
.
moduleList
=
await
imgToBase64
(
data
.
moduleList
,
'thumbnail'
)
bydServerConfig
.
mockCache
=
data
;
uni
.
$storage
.
set
(
"byd_mock_data"
,
data
);
return
Promise
.
resolve
(
data
);
}
else
{
const
key
=
Date
.
now
();
return
new
Promise
((
resolve
)
=>
{
bydServerConfig
.
mockTimer
[
key
]
=
setInterval
(()
=>
{
if
(
bydServerConfig
.
mockCache
)
{
clearInterval
(
bydServerConfig
.
mockTimer
[
key
]);
bydServerConfig
.
mockRequestCount
=
null
;
resolve
(
bydServerConfig
.
mockCache
);
}
},
1
e3
);
});
}
}
}
catch
(
error
)
{
console
.
log
(
error
)
if
(
bydServerConfig
.
mockTimer
[
key
])
clearInterval
(
bydServerConfig
.
mockTimer
[
key
]);
bydServerConfig
.
mockRequestCount
=
null
;
return
Promise
.
reject
(
error
);
}
};
// 图片版本号
// 图片版本号
const
getImageVersion
=
async
()
=>
{
const
getImageVersion
=
async
()
=>
{
const
accountInfo
=
await
getMockData
()
const
accountInfo
=
await
getMockData
()
...
@@ -90,5 +135,6 @@ module.exports = {
...
@@ -90,5 +135,6 @@ module.exports = {
getImageVersion
,
getImageVersion
,
getMockData
,
getMockData
,
imgToBase64
,
imgToBase64
,
updateMockData
updateMockData
,
getBydMockData
}
}
\ No newline at end of file
\ No newline at end of file
components/HomeFrame/components/RecordList.vue
View file @
000ed1e
...
@@ -409,10 +409,6 @@ export default {
...
@@ -409,10 +409,6 @@ export default {
}
}
<
/script
>
<
/script
>
<
style
scoped
lang
=
"scss"
>
<
style
scoped
lang
=
"scss"
>
@
font
-
face
{
font
-
family
:
'numberBold'
;
src
:
url
(
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-700-Bold.ttf'
);
}
.
record
-
box
{
.
record
-
box
{
box
-
sizing
:
border
-
box
;
box
-
sizing
:
border
-
box
;
height
:
100
%
;
height
:
100
%
;
...
@@ -593,7 +589,7 @@ export default {
...
@@ -593,7 +589,7 @@ export default {
}
}
.
num
-
box
{
.
num
-
box
{
.
num
{
.
num
{
font
-
family
:
'number
Bold
'
;
font
-
family
:
'number
-700
'
;
font
-
size
:
48
rpx
;
font
-
size
:
48
rpx
;
font
-
weight
:
700
;
font
-
weight
:
700
;
margin
:
0
4
rpx
;
margin
:
0
4
rpx
;
...
...
pages/common/components/Scene.vue
View file @
000ed1e
...
@@ -121,7 +121,7 @@ export default {
...
@@ -121,7 +121,7 @@ export default {
})
})
uni
.
hideLoading
()
uni
.
hideLoading
()
userInfo
.
channelType
=
res
.
channelType
||
1
// 默认1 1问界 2 比亚迪 3 其他
userInfo
.
channelType
=
res
.
channelType
||
1
// 默认1 1问界 2 比亚迪 3 其他
// userInfo.channelType =
3
// userInfo.channelType =
2
uni
.
$storage
.
set
(
'userInfo'
,
userInfo
)
uni
.
$storage
.
set
(
'userInfo'
,
userInfo
)
let
url
=
{
let
url
=
{
1
:
'/pages/boutique/index'
,
1
:
'/pages/boutique/index'
,
...
...
pages/equity/detail/components/Guarantee.vue
View file @
000ed1e
...
@@ -298,6 +298,7 @@ export default {
...
@@ -298,6 +298,7 @@ export default {
.li-number
{
.li-number
{
font-size
:
32
rpx
;
font-size
:
32
rpx
;
margin-right
:
12
rpx
;
margin-right
:
12
rpx
;
font-family
:
'number-400'
}
}
.li-content
{
.li-content
{
...
...
pages/equity/detail/detail.vue
View file @
000ed1e
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</view>
</view>
<template
v-for=
"(item, index) in media"
>
<template
v-for=
"(item, index) in media"
>
<view
<view
:class=
"['view',
{ showView: id == item.id }]"
:class=
"['view',
{ showView: id == item.id }
, modeName
]"
:key="index"
:key="index"
@touchstart.stop="touchStart"
@touchstart.stop="touchStart"
@touchend.stop="touchEnd"
@touchend.stop="touchEnd"
...
@@ -123,7 +123,8 @@ export default {
...
@@ -123,7 +123,8 @@ export default {
screenWidth
:
null
,
screenWidth
:
null
,
scaleValueObject
:
{},
scaleValueObject
:
{},
showPayPage
:
false
,
showPayPage
:
false
,
productModelStatus
:
false
productModelStatus
:
false
,
modeName
:
''
};
};
},
},
computed
:
{
computed
:
{
...
@@ -213,18 +214,30 @@ export default {
...
@@ -213,18 +214,30 @@ export default {
if
(
Math
.
abs
(
this
.
startY
-
touch
.
pageY
)
>
100
)
return
if
(
Math
.
abs
(
this
.
startY
-
touch
.
pageY
)
>
100
)
return
if
(
!
scaleValueObject
[
id
])
scaleValueObject
[
id
]
=
1
if
(
!
scaleValueObject
[
id
])
scaleValueObject
[
id
]
=
1
if
(
isDistanceSignificant
&&
index
!=
-
1
&&
scaleValueObject
[
id
]
==
1
&&
!
productModelStatus
)
{
if
(
isDistanceSignificant
&&
index
!=
-
1
&&
scaleValueObject
[
id
]
==
1
&&
!
productModelStatus
)
{
const
nextId
=
this
.
getNextId
(
index
,
toolList
,
startX
,
halfScreenWidth
)
const
{
nextId
,
modeName
}
=
this
.
getNextId
(
index
,
toolList
,
startX
,
halfScreenWidth
)
this
.
modeName
=
modeName
this
.
$emit
(
'update:id'
,
nextId
)
this
.
$emit
(
'update:id'
,
nextId
)
setTimeout
(()
=>
{
this
.
modeName
=
''
},
300
)
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
}
}
},
},
getNextId
(
index
,
toolList
,
startX
,
halfScreenWidth
)
{
getNextId
(
index
,
toolList
,
startX
,
halfScreenWidth
)
{
let
nextId
=
''
,
modeName
=
''
if
(
startX
>
halfScreenWidth
)
{
if
(
startX
>
halfScreenWidth
)
{
return
index
===
toolList
.
length
-
1
?
toolList
[
0
].
id
:
toolList
[
index
+
1
].
id
;
nextId
=
index
===
toolList
.
length
-
1
?
toolList
[
0
].
id
:
toolList
[
index
+
1
].
id
;
modeName
=
'to-right'
}
else
{
}
else
{
return
index
===
0
?
toolList
[
toolList
.
length
-
1
].
id
:
toolList
[
index
-
1
].
id
;
nextId
=
index
===
0
?
toolList
[
toolList
.
length
-
1
].
id
:
toolList
[
index
-
1
].
id
;
modeName
=
'to-left'
}
return
{
nextId
,
modeName
}
}
},
},
scale
(
e
)
{
scale
(
e
)
{
...
@@ -264,31 +277,27 @@ export default {
...
@@ -264,31 +277,27 @@ export default {
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
visibility
:
hidden
;
visibility
:
hidden
;
//
display
:
none
;
}
}
.showView
{
.showView
{
position
:
absolute
;
position
:
absolute
;
z-index
:
1
;
z-index
:
1
;
visibility
:
visible
;
visibility
:
visible
;
//
display
:
block
;
animation
:
show-content-left
0.15s
forwards
;
}
}
.pen-box
{
.to-left
{
position
:
fixed
;
animation
:
to-left
0.25s
forwards
;
right
:
40
rpx
;
}
top
:
5%
;
.to-right
{
width
:
120
rpx
;
animation
:
to-right
0.25s
forwards
;
height
:
120
rpx
;
}
z-index
:
10
;
@keyframes
to-left
{
box-shadow
:
0
4px
12px
0
#00000033
;
0
%
{
border-radius
:
16
rpx
;
left
:
-100%
;
overflow
:
hidden
;
}
image
{
100
%
{
width
:
100%
;
left
:
0
;
height
:
100%
;
}
}
}
}
@keyframes
show-content-lef
t
{
@keyframes
to-righ
t
{
0
%
{
0
%
{
left
:
100%
;
left
:
100%
;
}
}
...
...
pages/equity/index.vue
View file @
000ed1e
...
@@ -162,55 +162,66 @@ export default {
...
@@ -162,55 +162,66 @@ export default {
},
},
// 查询素材
// 查询素材
async
getSoure
()
{
async
getSoure
()
{
let
{
moduleList
,
toolList
,
default_moduleList
,
default_toolList
,
byd_moduleList
,
byd_toolList
}
=
await
uni
.
$api
.
systemApi
.
getMockData
(
true
)
/**比亚迪 */
/**比亚迪 */
if
(
this
.
channelType
==
2
)
{
if
(
this
.
channelType
==
2
)
{
await
byd_moduleList
.
map
(
async
e
=>
{
let
{
moduleList
,
toolList
}
=
await
uni
.
$api
.
systemApi
.
getBydMockData
(
true
)
await
moduleList
.
map
(
async
e
=>
{
if
(
e
.
receptionSourceDetailList
)
if
(
e
.
receptionSourceDetailList
)
e
.
receptionSourceDetailList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
receptionSourceDetailList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
receptionSourceDetailList
,
e
.
receptionSourceDetailList
,
"detailUrl"
"detailUrl"
);
);
})
})
byd_toolList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
byd_toolList
,
"shortTitleUrl"
)
}
else
if
(
this
.
channelType
==
3
)
{
/**其他品牌 */
default_toolList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
default_toolList
,
"shortTitleUrl"
);
}
else
{
/**默认问界 */
await
moduleList
.
map
(
async
(
e
)
=>
{
if
(
e
.
receptionSourceDetailList
)
e
.
receptionSourceDetailList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
receptionSourceDetailList
,
"detailUrl"
);
if
(
e
.
carTypeList
)
e
.
carTypeList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
carTypeList
,
"url"
);
if
(
e
.
screenList
)
e
.
screenList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
screenList
,
"url"
)
});
toolList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
toolList
,
"shortTitleUrl"
)
toolList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
toolList
,
"shortTitleUrl"
)
uni
.
$api
.
systemApi
.
updateMockData
({
moduleList
,
toolList
,
},
[
'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
if
(
this
.
channelType
==
3
)
{
/**其他品牌 */
default_toolList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
default_toolList
,
"shortTitleUrl"
);
_moduleList
=
default_moduleList
_toolList
=
default_toolList
}
else
{
/**默认问界 */
await
moduleList
.
map
(
async
(
e
)
=>
{
if
(
e
.
receptionSourceDetailList
)
e
.
receptionSourceDetailList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
receptionSourceDetailList
,
"detailUrl"
);
if
(
e
.
carTypeList
)
e
.
carTypeList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
carTypeList
,
"url"
);
if
(
e
.
screenList
)
e
.
screenList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
screenList
,
"url"
)
});
toolList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
toolList
,
"shortTitleUrl"
)
_moduleList
=
moduleList
_toolList
=
toolList
}
uni
.
$api
.
systemApi
.
updateMockData
({
default_moduleList
,
default_toolList
,
moduleList
,
toolList
},
[
"moduleList"
,
'toolList'
,
'default_moduleList'
,
'default_toolList'
,
],
'mock_data'
)
this
.
setViewInfo
(
_moduleList
,
_toolList
)
}
}
uni
.
$api
.
systemApi
.
updateMockData
({
default_moduleList
,
default_toolList
,
byd_moduleList
,
byd_toolList
,
moduleList
,
toolList
},
[
"moduleList"
,
'toolList'
,
'default_moduleList'
,
'default_toolList'
,
'byd_moduleList'
,
'byd_toolList'
]);
},
},
errorImg
(
index
)
{
errorImg
(
index
)
{
this
.
moduleList
[
index
].
showAlt
=
true
;
this
.
moduleList
[
index
].
showAlt
=
true
;
...
@@ -338,25 +349,35 @@ export default {
...
@@ -338,25 +349,35 @@ export default {
}
}
},
},
/**素材内容 */
/**素材内容 */
setViewInfo
()
{
setViewInfo
(
_moduleList
,
_toolList
)
{
const
{
if
(
_moduleList
&&
_toolList
)
{
default_moduleList
,
this
.
moduleList
=
_moduleList
default_toolList
,
this
.
toolList
=
_toolList
byd_moduleList
,
return
byd_toolList
,
}
moduleList
,
if
(
this
.
channelType
==
2
)
{
toolList
const
{
}
=
uni
.
$storage
.
get
(
"mock_data"
)
||
{}
moduleList
,
this
.
moduleList
=
{
toolList
3
:
default_moduleList
,
}
=
uni
.
$storage
.
get
(
"byd_mock_data"
)
2
:
byd_moduleList
,
this
.
moduleList
=
moduleList
1
:
moduleList
this
.
toolList
=
toolList
}[
this
.
channelType
]
}
else
{
this
.
toolList
=
{
const
{
3
:
default_toolList
,
default_moduleList
,
2
:
byd_toolList
,
default_toolList
,
1
:
toolList
moduleList
,
}[
this
.
channelType
]
toolList
}
=
uni
.
$storage
.
get
(
"mock_data"
)
||
{}
this
.
moduleList
=
{
3
:
default_moduleList
,
1
:
moduleList
}[
this
.
channelType
]
this
.
toolList
=
{
3
:
default_toolList
,
1
:
toolList
}[
this
.
channelType
]
}
}
}
},
},
};
};
...
...
uni.scss
View file @
000ed1e
...
@@ -4,6 +4,14 @@
...
@@ -4,6 +4,14 @@
*/
*/
@import
'./assets/css/sprite.scss'
;
@import
'./assets/css/sprite.scss'
;
@font-face
{
font-family
:
'number-700'
;
src
:
url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-700-Bold.ttf')
;
}
@font-face
{
font-family
:
'number-400'
;
src
:
url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-400-Regular.ttf')
;
}
@keyframes
show-view
{
@keyframes
show-view
{
0
%
{
0
%
{
opacity
:
0
;
opacity
:
0
;
...
...
utils/cache/constantData.js
View file @
000ed1e
...
@@ -21,9 +21,5 @@ export const STORAGE_OBJECTkEY = {
...
@@ -21,9 +21,5 @@ export const STORAGE_OBJECTkEY = {
recordSuccessList
:
"recordSuccessList"
,
recordSuccessList
:
"recordSuccessList"
,
historyList
:
"historyList"
,
historyList
:
"historyList"
,
storageVersion
:
"storageVersion"
,
storageVersion
:
"storageVersion"
,
byd_mock_data
:
'byd_mock_data'
};
};
// export const IMG_VERSION = async () => {
// const accountInfo = await util.getMockData()
// return accountInfo?.version || Date.now()
// }
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