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 d965bcf9
authored
Jul 09, 2026
by
岑成威
1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:轮播图
1 parent
e685a44b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
98 additions
and
3 deletions
api/module/systemApi.js
components/SwiperComponent.vue
env.js
pages/equity/detail/detail.vue
pages/equity/index.vue
api/module/systemApi.js
View file @
d965bcf
...
@@ -135,18 +135,23 @@ const getImageVersion = async () => {
...
@@ -135,18 +135,23 @@ const getImageVersion = async () => {
/**获取素材配置 */
/**获取素材配置 */
const
getSoureData
=
async
(
shopMerchantId
,
sceneType
,
params
=
{})
=>
{
const
getSoureData
=
async
(
shopMerchantId
,
sceneType
,
params
=
{})
=>
{
try
{
try
{
uni
.
$logger
?.
local
?.
info
?.(
`[systemApi/getSoureData] start, shopMerchantId=
${
shopMerchantId
}
, sceneType=
${
sceneType
}
`
)
const
res
=
await
getEquityMaterialId
({
const
res
=
await
getEquityMaterialId
({
merchantId
:
shopMerchantId
,
merchantId
:
shopMerchantId
,
...
params
...
params
})
})
uni
.
$logger
?.
local
?.
info
?.(
`[systemApi/getSoureData] getEquityMaterialId done, id=
${
res
?.
id
||
''
}
`)
if (res && res.id) {
if (res && res.id) {
console.log(res.id, 'res.idres.idres.idres.id')
console.log(res.id, 'res.idres.idres.idres.id')
let data = await getEquityMaterialConfig({
let data = await getEquityMaterialConfig({
id: res.id
id: res.id
})
})
if (data) {
if (data) {
console.log('[getSoureData] getEquityMaterialConfig response:', data)
let { toolList, materialInfoList } = data,
let { toolList, materialInfoList } = data,
storageName = `
source_$
{
sceneType
}
_$
{
shopMerchantId
}
`
storageName = `
source_$
{
sceneType
}
_$
{
shopMerchantId
}
`
console.log('[getSoureData] materialInfoList:', materialInfoList)
uni.$logger?.local?.info?.(`
[
systemApi
/
getSoureData
]
materialInfoList
length
=
$
{
materialInfoList
?.
length
||
0
}
`)
if (params.brandId && params.subBrandId) storageName += `
_$
{
params
.
brandId
}
_$
{
params
.
subBrandId
}
`
if (params.brandId && params.subBrandId) storageName += `
_$
{
params
.
brandId
}
_$
{
params
.
subBrandId
}
`
let insurance = materialInfoList.find(e => e.componentName == 'insurance'),
let insurance = materialInfoList.find(e => e.componentName == 'insurance'),
hasEquity = toolList.find(e => e.id == insurance.id)
hasEquity = toolList.find(e => e.id == insurance.id)
...
@@ -184,6 +189,8 @@ const getSoureData = async (shopMerchantId, sceneType, params = {}) => {
...
@@ -184,6 +189,8 @@ const getSoureData = async (shopMerchantId, sceneType, params = {}) => {
}
}
data.toolList = await imgTransformBase64(toolList, ['shortTitleUrl'])
data.toolList = await imgTransformBase64(toolList, ['shortTitleUrl'])
data.moduleList = await imgTransformBase64(materialInfoList, ['thumbnail', 'receptionSourceDetailList', 'screenList'])
data.moduleList = await imgTransformBase64(materialInfoList, ['thumbnail', 'receptionSourceDetailList', 'screenList'])
console.log('[getSoureData] moduleList(after transform):', data.moduleList)
uni.$logger?.local?.info?.(`
[
systemApi
/
getSoureData
]
moduleList
length
=
$
{
data
.
moduleList
?.
length
||
0
}
`)
uni.setStorageSync(storageName, {
uni.setStorageSync(storageName, {
moduleList: data.moduleList,
moduleList: data.moduleList,
toolList: data.toolList,
toolList: data.toolList,
...
...
components/SwiperComponent.vue
View file @
d965bcf
...
@@ -45,6 +45,13 @@
...
@@ -45,6 +45,13 @@
>
</div>
>
</div>
</
template
>
</
template
>
</view>
</view>
<view
v-if=
"showLongImageBtn"
class=
"long-image-btn"
@
click
.
stop=
"openLongImagePopup"
>
查看长图
</view>
</template>
</template>
<
template
v-else
>
<
template
v-else
>
<view
class=
"nothing flex"
>
<view
class=
"nothing flex"
>
...
@@ -64,6 +71,12 @@
...
@@ -64,6 +71,12 @@
<image
class=
"gif"
src=
"../assets/images/common/loadding.gif"
/>
<image
class=
"gif"
src=
"../assets/images/common/loadding.gif"
/>
</view>
</view>
</
template
>
</
template
>
<view
v-if=
"longImagePopupVisible"
class=
"long-image-popup"
@
click
.
stop
>
<view
class=
"popup-close"
@
click
.
stop=
"closeLongImagePopup"
>
×
</view>
<scroll-view
class=
"popup-scroll"
scroll-y
show-scrollbar
>
<image
class=
"popup-long-image"
:src=
"currentImageUrl"
mode=
"widthFix"
/>
</scroll-view>
</view>
</view>
</view>
</template>
</template>
<
script
>
<
script
>
...
@@ -105,7 +118,11 @@ export default {
...
@@ -105,7 +118,11 @@ export default {
default
:
()
=>
({})
default
:
()
=>
({})
},
},
custom
:
Boolean
,
custom
:
Boolean
,
swiperType
:
[
Number
,
String
]
swiperType
:
[
Number
,
String
],
longImageFlagKey
:
{
type
:
String
,
default
:
'isLongImage'
}
},
},
watch
:
{
watch
:
{
moduleList
:
{
moduleList
:
{
...
@@ -128,6 +145,15 @@ export default {
...
@@ -128,6 +145,15 @@ export default {
computed
:
{
computed
:
{
moduleTitle
()
{
moduleTitle
()
{
return
this
.
moduleList
[
this
.
currentIndex
]?.
detailTitle
||
''
return
this
.
moduleList
[
this
.
currentIndex
]?.
detailTitle
||
''
},
currentModule
()
{
return
this
.
moduleList
[
this
.
currentIndex
]
||
{}
},
currentImageUrl
()
{
return
this
.
currentModule
?.[
this
.
imgKey
]
||
''
},
showLongImageBtn
()
{
return
!!
this
.
currentModule
?.[
this
.
longImageFlagKey
]
&&
!!
this
.
currentImageUrl
}
}
},
},
created
()
{
created
()
{
...
@@ -149,7 +175,8 @@ export default {
...
@@ -149,7 +175,8 @@ export default {
{
index
:
2
,
class
:
'block-right'
}
{
index
:
2
,
class
:
'block-right'
}
]),
]),
blockX
:
0
,
blockX
:
0
,
viewX
:
0
viewX
:
0
,
longImagePopupVisible
:
false
}
}
},
},
beforeDestroy
()
{
beforeDestroy
()
{
...
@@ -309,6 +336,13 @@ export default {
...
@@ -309,6 +336,13 @@ export default {
if
(
toor
==
2
)
this
.
updateCarouselPositions
()
if
(
toor
==
2
)
this
.
updateCarouselPositions
()
this
.
$emit
(
'click'
,
item
.
isIndex
)
this
.
$emit
(
'click'
,
item
.
isIndex
)
},
},
openLongImagePopup
()
{
if
(
!
this
.
showLongImageBtn
)
return
this
.
longImagePopupVisible
=
true
},
closeLongImagePopup
()
{
this
.
longImagePopupVisible
=
false
},
starts
(
e
)
{
starts
(
e
)
{
this
.
ismove
=
e
.
touches
[
0
].
pageX
this
.
ismove
=
e
.
touches
[
0
].
pageX
this
.
playStatus
=
false
this
.
playStatus
=
false
...
@@ -464,6 +498,51 @@ export default {
...
@@ -464,6 +498,51 @@ export default {
background
:
#fff
;
background
:
#fff
;
}
}
}
}
.long-image-btn
{
position
:
absolute
;
left
:
50%
;
bottom
:
toRpx
(
40
);
transform
:
translateX
(
-50%
);
z-index
:
25
;
padding
:
toRpx
(
12
)
toRpx
(
28
);
border-radius
:
toRpx
(
28
);
font-size
:
toRpx
(
24
);
color
:
#ffffff
;
background
:
linear-gradient
(
90deg
,
#61c0ff
0%
,
#2c66f7
100%
);
}
.long-image-popup
{
position
:
fixed
;
left
:
0
;
top
:
0
;
width
:
100vw
;
height
:
100vh
;
z-index
:
9999
;
background
:
rgba
(
0
,
0
,
0
,
0.92
);
.popup-close
{
position
:
absolute
;
right
:
toRpx
(
28
);
top
:
toRpx
(
28
);
width
:
toRpx
(
56
);
height
:
toRpx
(
56
);
line-height
:
toRpx
(
56
);
text-align
:
center
;
border-radius
:
50%
;
font-size
:
toRpx
(
48
);
color
:
#ffffff
;
background
:
rgba
(
255
,
255
,
255
,
0.16
);
z-index
:
2
;
}
.popup-scroll
{
width
:
100%
;
height
:
100%
;
box-sizing
:
border-box
;
padding
:
toRpx
(
100
)
0
toRpx
(
40
);
}
.popup-long-image
{
width
:
100%
;
display
:
block
;
}
}
.nothing
{
.nothing
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
...
...
env.js
View file @
d965bcf
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'beta'
]
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'beta'
]
const
index
=
2
const
index
=
1
/**
/**
*
*
0本地
0本地
...
...
pages/equity/detail/detail.vue
View file @
d965bcf
...
@@ -507,9 +507,15 @@ export default {
...
@@ -507,9 +507,15 @@ export default {
let
storageName
=
`source_
${
sceneType
}
_
${
shopMerchantId
}
_
${
carBrandId
}
_
${
carChildsBrandId
}
`
let
storageName
=
`source_
${
sceneType
}
_
${
shopMerchantId
}
_
${
carBrandId
}
_
${
carChildsBrandId
}
`
let
data
=
uni
.
getStorageSync
(
storageName
)
let
data
=
uni
.
getStorageSync
(
storageName
)
try
{
try
{
uni
.
$logger
?.
local
?.
info
?.(
`[equity/detail] setPageData start, shopMerchantId=
${
shopMerchantId
}
, sceneType=
${
sceneType
}
, brandId=
${
carBrandId
}
, subBrandId=
${
carChildsBrandId
}
`
)
let
requestData
=
await
uni
.
$api
.
systemApi
.
getSoureData
(
shopMerchantId
,
sceneType
,
params
)
let
requestData
=
await
uni
.
$api
.
systemApi
.
getSoureData
(
shopMerchantId
,
sceneType
,
params
)
uni
.
$logger
?.
local
?.
info
?.(
`[equity/detail] getSoureData done, hasData=
${
!!
requestData
}
, moduleListLength=
${
requestData
?.
moduleList
?.
length
||
0
}
`)
console.log('[equity/detail] getSoureData result:', requestData)
console.log('[equity/detail] getSoureData moduleList:', requestData?.moduleList || [])
if (requestData) this.setViewInfo(requestData)
if (requestData) this.setViewInfo(requestData)
} catch (error) {
} catch (error) {
uni.$logger?.local?.info?.(`
[
equity
/
detail
]
getSoureData
error
:
$
{
error
}
`)
console.log('[equity/detail] getSoureData error:', error)
if (data) this.setViewInfo(data)
if (data) this.setViewInfo(data)
}
}
},
},
...
...
pages/equity/index.vue
View file @
d965bcf
...
@@ -148,12 +148,15 @@ export default {
...
@@ -148,12 +148,15 @@ export default {
// 查询素材
// 查询素材
async
getSoure
(
brandIdList
,
subBrandIdList
)
{
async
getSoure
(
brandIdList
,
subBrandIdList
)
{
const
{
shopMerchantId
,
sceneType
}
=
this
const
{
shopMerchantId
,
sceneType
}
=
this
uni
.
$logger
?.
local
?.
info
?.(
`[equity/index] getSoure start, shopMerchantId=
${
shopMerchantId
}
, sceneType=
${
sceneType
}
`
)
let
data
=
uni
.
getStorageSync
(
`source_
${
sceneType
}
_
${
shopMerchantId
}
`
)
let
data
=
uni
.
getStorageSync
(
`source_
${
sceneType
}
_
${
shopMerchantId
}
`
)
if
(
data
)
this
.
setViewInfo
(
data
)
if
(
data
)
this
.
setViewInfo
(
data
)
uni
.
$logger
?.
local
?.
info
?.(
'[equity/index] calling systemApi.getSoureData'
)
let
requestData
=
await
uni
.
$api
.
systemApi
.
getSoureData
(
shopMerchantId
,
sceneType
,
{
let
requestData
=
await
uni
.
$api
.
systemApi
.
getSoureData
(
shopMerchantId
,
sceneType
,
{
brandIdList
,
brandIdList
,
subBrandIdList
subBrandIdList
})
})
uni
.
$logger
?.
local
?.
info
?.(
`[equity/index] getSoureData done, hasData=
${
!!
requestData
}
`
)
if
(
requestData
)
this
.
setViewInfo
(
requestData
)
if
(
requestData
)
this
.
setViewInfo
(
requestData
)
else
this
.
loadComplete
=
true
else
this
.
loadComplete
=
true
},
},
...
...
@cencw
岑成威
@cencw
mentioned in commit
723cba3f
Jul 11, 2026
mentioned in commit
723cba3f
Toggle commit list
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