Commit 723cba3f by 岑成威

Revert "fix:轮播图"

This reverts commit d965bcf9.
1 parent d965bcf9
......@@ -135,23 +135,18 @@ const getImageVersion = async () => {
/**获取素材配置 */
const getSoureData = async (shopMerchantId, sceneType, params = {}) => {
try {
uni.$logger?.local?.info?.(`[systemApi/getSoureData] start, shopMerchantId=${shopMerchantId}, sceneType=${sceneType}`)
const res = await getEquityMaterialId({
merchantId: shopMerchantId,
...params
})
uni.$logger?.local?.info?.(`[systemApi/getSoureData] getEquityMaterialId done, id=${res?.id || ''}`)
if (res && res.id) {
console.log(res.id, 'res.idres.idres.idres.id')
let data = await getEquityMaterialConfig({
id: res.id
})
if (data) {
console.log('[getSoureData] getEquityMaterialConfig response:', data)
let { toolList, materialInfoList } = data,
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}`
let insurance = materialInfoList.find(e => e.componentName == 'insurance'),
hasEquity = toolList.find(e => e.id == insurance.id)
......@@ -189,8 +184,6 @@ const getSoureData = async (shopMerchantId, sceneType, params = {}) => {
}
data.toolList = await imgTransformBase64(toolList, ['shortTitleUrl'])
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, {
moduleList: data.moduleList,
toolList: data.toolList,
......
......@@ -45,13 +45,6 @@
></div>
</template>
</view>
<view
v-if="showLongImageBtn"
class="long-image-btn"
@click.stop="openLongImagePopup"
>
查看长图
</view>
</template>
<template v-else>
<view class="nothing flex">
......@@ -71,12 +64,6 @@
<image class="gif" src="../assets/images/common/loadding.gif" />
</view>
</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>
</template>
<script>
......@@ -118,11 +105,7 @@ export default {
default: () => ({})
},
custom: Boolean,
swiperType: [Number, String],
longImageFlagKey: {
type: String,
default: 'isLongImage'
}
swiperType: [Number, String]
},
watch: {
moduleList: {
......@@ -145,15 +128,6 @@ export default {
computed: {
moduleTitle () {
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 () {
......@@ -175,8 +149,7 @@ export default {
{ index: 2, class: 'block-right' }
]),
blockX: 0,
viewX: 0,
longImagePopupVisible: false
viewX: 0
}
},
beforeDestroy () {
......@@ -336,13 +309,6 @@ export default {
if (toor == 2) this.updateCarouselPositions()
this.$emit('click', item.isIndex)
},
openLongImagePopup () {
if (!this.showLongImageBtn) return
this.longImagePopupVisible = true
},
closeLongImagePopup () {
this.longImagePopupVisible = false
},
starts (e) {
this.ismove = e.touches[0].pageX
this.playStatus = false
......@@ -498,51 +464,6 @@ export default {
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 {
width: 100%;
height: 100%;
......
const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 1
const index = 2
/**
*
0本地
......
......@@ -507,15 +507,9 @@ export default {
let storageName = `source_${sceneType}_${shopMerchantId}_${carBrandId}_${carChildsBrandId}`
let data = uni.getStorageSync(storageName)
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)
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)
} catch (error) {
uni.$logger?.local?.info?.(`[equity/detail] getSoureData error: ${error}`)
console.log('[equity/detail] getSoureData error:', error)
if (data) this.setViewInfo(data)
}
},
......
......@@ -148,15 +148,12 @@ export default {
// 查询素材
async getSoure (brandIdList, subBrandIdList) {
const { shopMerchantId, sceneType } = this
uni.$logger?.local?.info?.(`[equity/index] getSoure start, shopMerchantId=${shopMerchantId}, sceneType=${sceneType}`)
let data = uni.getStorageSync(`source_${sceneType}_${shopMerchantId}`)
if (data) this.setViewInfo(data)
uni.$logger?.local?.info?.('[equity/index] calling systemApi.getSoureData')
let requestData = await uni.$api.systemApi.getSoureData(shopMerchantId, sceneType, {
brandIdList,
subBrandIdList
})
uni.$logger?.local?.info?.(`[equity/index] getSoureData done, hasData=${!!requestData}`)
if (requestData) this.setViewInfo(requestData)
else this.loadComplete = true
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!