فهرست منبع

图片加载优化

shish 1 سال پیش
والد
کامیت
9bb1ab8b5f
2فایلهای تغییر یافته به همراه8 افزوده شده و 4 حذف شده
  1. 3 1
      ghsApp/src/admin/item/list2.vue
  2. 5 3
      hdApp/src/pagesPurchase/ghsProduct.vue

+ 3 - 1
ghsApp/src/admin/item/list2.vue

@@ -83,7 +83,7 @@
 		<uni-popup ref="globalClassImgRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
 			<view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
 				<view v-for="(item, index) in globalClassData" :key="index" @tap.stop="globalChangeClass(index,item)" style="margin-bottom:20upx;margin-left:3upx;">
-				<image :src="item.cover" style="width:120upx;height:120upx;border-radius:10upx;"></image>
+				<image :src="showClassImg ? item.cover : `${constant.imgUrl}/hhb_small.png`" style="width:120upx;height:120upx;border-radius:10upx;"></image>
 				<view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;">{{item.name}}</view>
 				</view>
 			</view>
@@ -210,6 +210,7 @@ export default {
 			partNum:'',
 			partShow:false,
 			partFocus:false,
+			showClassImg:false
 		};
 	},
 	computed:{
@@ -427,6 +428,7 @@ export default {
 			});
 		},
 		selectFlowerNumFn(){
+			this.showClassImg = true
 			this.$refs.globalClassImgRef.open('top')
 		},
 		printBlur() {

+ 5 - 3
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -172,7 +172,7 @@
 		<view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
 
 			<view v-for="(item, index) in filterProductInfo" :key="index" @tap.stop="changeClass(index)" style="margin-bottom:20upx;margin-left:3upx;">
-			<image :src="item.classCover" style="width:120upx;height:120upx;border-radius:10upx;"></image>
+			<image :src="showClassImg ? item.classCover : `${constant.imgUrl}/hhb_small.png`" style="width:120upx;height:120upx;border-radius:10upx;"></image>
 			<view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;">{{item.className}}</view>
 			</view>
 
@@ -291,7 +291,8 @@ export default {
 			backAction:'',
 			shareImgUrl:'',
 			superWx:'',
-			telephone:''
+			telephone:'',
+			showClassImg:false
 		};
 	},
 	onPullDownRefresh() {
@@ -425,6 +426,7 @@ export default {
 			this.$refs.showWx.open('center')
 		},
 		selectFlowerNumFn(){
+			this.showClassImg = true
 			this.$refs.selectFlowerNumRef.open('top')
 		},
 		aheadCg(item){
@@ -512,7 +514,7 @@ export default {
 	      this.popupShow = false;
 	    },
 		showBigCover(item){
-			this.$util.pageTo({url: "/admin/ghsProduct/detail",query: {id: item.id,ghsId:this.option.id}})
+			this.$util.pageTo({url: "/admin/ghsProduct/detail",query: {id: item.id,ghsId:this.option.id}})
 		},
 		toRefresh(){
 			this.init()