wangfukang 3 weeks ago
parent
commit
2e7bd5767a
  1. 34
      pages/index/index.vue

34
pages/index/index.vue

@ -461,7 +461,7 @@
</view> </view>
</view> </view>
<!-- 弹出区域选择 --> <!-- 弹出区域选择 -->
<uni-popup ref="areaPopup" :is-mask-click="false" background-color="transparent"> <uni-popup ref="areaPopup" class="home-popup-layer" :is-mask-click="false" background-color="transparent">
<view class="campus-area-popup"> <view class="campus-area-popup">
<view class="area-popup-glow area-popup-glow-a"></view> <view class="area-popup-glow area-popup-glow-a"></view>
<view class="area-popup-glow area-popup-glow-b"></view> <view class="area-popup-glow area-popup-glow-b"></view>
@ -491,7 +491,7 @@
</scroll-view> </scroll-view>
</view> </view>
</uni-popup> </uni-popup>
<uni-popup ref="productPopup" background-color="transparent"> <uni-popup ref="productPopup" class="home-popup-layer" background-color="transparent">
<view class="product-popup-content"> <view class="product-popup-content">
<view class="product-popup-header"> <view class="product-popup-header">
<view class="product-popup-title">商品详情</view> <view class="product-popup-title">商品详情</view>
@ -523,7 +523,7 @@
</view> </view>
</uni-popup> </uni-popup>
<!-- 参团成功提示弹出层 --> <!-- 参团成功提示弹出层 -->
<uni-popup ref="tishiPopup" background-color="#fff"> <uni-popup ref="tishiPopup" class="home-popup-layer" background-color="#fff">
<view class="tishi-popup"> <view class="tishi-popup">
<view class="tishi-copy"> <view class="tishi-copy">
<view class="tishi-copy-title">抢单成功</view> <view class="tishi-copy-title">抢单成功</view>
@ -1397,7 +1397,7 @@
uni.setStorageSync(HOME_AD_IMAGE_CACHE_KEY, cache) uni.setStorageSync(HOME_AD_IMAGE_CACHE_KEY, cache)
}, },
isHomeAdImageCacheValid(cacheItem) { isHomeAdImageCacheValid(cacheItem) {
return !!(cacheItem && cacheItem.path && Date.now() - Number(cacheItem.savedAt || 0) < HOME_AD_IMAGE_CACHE_TTL) return !!(cacheItem && cacheItem.path && cacheItem.path.indexOf('__tmp__') === -1 && Date.now() - Number(cacheItem.savedAt || 0) < HOME_AD_IMAGE_CACHE_TTL)
}, },
applyCachedAdImages(mallAds) { applyCachedAdImages(mallAds) {
const cache = this.getHomeAdImageCache() const cache = this.getHomeAdImageCache()
@ -1444,7 +1444,6 @@
delete homeAdImageDownloading[imageUrl] delete homeAdImageDownloading[imageUrl]
return return
} }
this.homeMenuIconImages[key] = downloadRes.tempFilePath
uni.saveFile({ uni.saveFile({
tempFilePath: downloadRes.tempFilePath, tempFilePath: downloadRes.tempFilePath,
success: (saveRes) => { success: (saveRes) => {
@ -1463,6 +1462,9 @@
this.saveHomeAdImageCache(cache) this.saveHomeAdImageCache(cache)
this.homeMenuIconImages[key] = saveRes.savedFilePath this.homeMenuIconImages[key] = saveRes.savedFilePath
}, },
fail: () => {
this.homeMenuIconImages[key] = imageUrl
},
complete: () => { complete: () => {
delete homeAdImageDownloading[imageUrl] delete homeAdImageDownloading[imageUrl]
} }
@ -1491,7 +1493,6 @@
delete homeAdImageDownloading[imageUrl] delete homeAdImageDownloading[imageUrl]
return return
} }
this.replaceAdImageWithCache(imageUrl, downloadRes.tempFilePath)
uni.saveFile({ uni.saveFile({
tempFilePath: downloadRes.tempFilePath, tempFilePath: downloadRes.tempFilePath,
success: (saveRes) => { success: (saveRes) => {
@ -1510,6 +1511,9 @@
this.saveHomeAdImageCache(cache) this.saveHomeAdImageCache(cache)
this.replaceAdImageWithCache(imageUrl, saveRes.savedFilePath) this.replaceAdImageWithCache(imageUrl, saveRes.savedFilePath)
}, },
fail: () => {
this.replaceAdImageWithCache(imageUrl, imageUrl)
},
complete: () => { complete: () => {
delete homeAdImageDownloading[imageUrl] delete homeAdImageDownloading[imageUrl]
} }
@ -1972,6 +1976,10 @@
height: 100%; height: 100%;
} }
.home-popup-layer {
z-index: 1200 !important;
}
.swiper { .swiper {
width: 100%; width: 100%;
height: 440rpx; height: 440rpx;
@ -2665,7 +2673,7 @@
box-sizing: border-box; box-sizing: border-box;
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 1002; z-index: 97;
border-radius: 34rpx; border-radius: 34rpx;
background: rgba(255, 255, 255, 0.62); background: rgba(255, 255, 255, 0.62);
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
@ -2677,7 +2685,7 @@
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 0;
z-index: 1000; z-index: 94;
pointer-events: none; pointer-events: none;
background: background:
linear-gradient(180deg, rgba(246, 255, 251, 1) 0%, rgba(246, 255, 251, 1) 78%, rgba(246, 255, 251, 0.92) 92%, rgba(246, 255, 251, 0) 100%), linear-gradient(180deg, rgba(246, 255, 251, 1) 0%, rgba(246, 255, 251, 1) 78%, rgba(246, 255, 251, 0.92) 92%, rgba(246, 255, 251, 0) 100%),
@ -2781,15 +2789,15 @@
} }
.page1.is-sticky .daimai-tab { .page1.is-sticky .daimai-tab {
z-index: 1003; z-index: 97;
} }
.page1.is-sticky .title-sort { .page1.is-sticky .title-sort {
z-index: 1002; z-index: 96;
} }
.page1.is-sticky .sort-text { .page1.is-sticky .sort-text {
z-index: 1001; z-index: 95;
} }
.daimai-tab-item { .daimai-tab-item {
@ -3958,7 +3966,7 @@
display: flex; display: flex;
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 1001; z-index: 96;
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
padding: 20rpx 10rpx 0; padding: 20rpx 10rpx 0;
box-sizing: border-box; box-sizing: border-box;
@ -3976,7 +3984,7 @@
display: flex; display: flex;
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 1001; z-index: 95;
background: rgba(255, 255, 255, 0.96); background: rgba(255, 255, 255, 0.96);
padding: 20rpx 10rpx 10rpx; padding: 20rpx 10rpx 10rpx;
box-sizing: border-box; box-sizing: border-box;

Loading…
Cancel
Save