cmy 1 yıl önce
ebeveyn
işleme
9ea65dd5a2

+ 3 - 3
pages.json

@@ -1910,9 +1910,9 @@
   "condition": { //模式配置,仅开发期间生效
     "current": 0, //当前激活的模式(list 的索引项)
     "list": [{
-      "name": "", //模式名称
-      "path": "", //启动页面,必选
-      "query": "" //启动参数,在页面的onLoad函数里面得到
+      "name": "测试", //模式名称
+      "path": "/pages/index/index", //启动页面,必选
+      "query": "id=1580" //启动参数,在页面的onLoad函数里面得到
     }]
   }
 }

+ 14 - 2
pages/goods_details/index.vue

@@ -516,7 +516,8 @@
 		collectAdd,
 		collectDel,
 		postCartAdd,
-		newcomerDetail
+		newcomerDetail,
+		diyProduct
 	} from '@/api/store.js';
 	import {
 		getUserInfo,
@@ -754,7 +755,10 @@
 				immediate: true
 			}
 		},
-		onLoad(options) {
+		async onLoad(options) {
+			if(!uni.getStorageSync('diyProduct')){
+				const diyDetail = await this.getdiyProduct()
+			}
 			this.diyProduct = JSON.parse(uni.getStorageSync('diyProduct'))
 			console.log(this.diyProduct, 'this.diyProduct')
 			this.diyProduct.price_type = this.diyProduct.price_type + ''
@@ -928,6 +932,14 @@
 		},
 		// #endif
 		methods: {
+			// div商品详情 用于处理bug
+			getdiyProduct() {
+				diyProduct().then(res => {
+					// console.log(JSON.stringify(res.data.product_detail))
+					uni.setStorageSync('diyProduct', JSON.stringify(res.data.product_detail));
+					Promise.resolve(res.data.product_detail)
+				})
+			},
 			// 获取配送方式
 			deliveryFun(e) {
 				this.delivery_type = e;

+ 0 - 1
pages/index/index.vue

@@ -89,7 +89,6 @@
 					<!-- 首页商品列表 -->
 					<view class="product-list" v-if="goodList.length">
 						<view class="product-item" v-for="(item, index) in goodList" @click="goGoodsDetail(item)">
-							<!-- <image :src="item.image"></image> -->
 							<lazyLoad :src="item.image" width="100%" height="100%"></lazyLoad>
 							<span class="pictrue_log_big pictrue_log_class"
 								v-if="item.activity && item.activity.type === '1'">秒杀</span>

+ 3 - 1
pages/store_cate/store_cate_index.vue

@@ -136,6 +136,7 @@
 								<text class='nums'
 									v-if="item.price.toString().split('.').length>1">.{{item.price.toString().split(".")[1]}}</text>
 							</view>
+							<block v-if="(userInfo.is_ever_level||userInfo.is_money_level)">
 							<view class='vip-money acea-row row-middle' v-if="item.vip_price && item.vip_price > 0">
 								<view>¥{{item.vip_price}}</view>
 								<view class="icon on" v-if="item.price_type && item.price_type == 'member'"><text
@@ -143,6 +144,7 @@
 								<view class="icon" v-if="item.price_type && item.price_type == 'level'"><text
 										class="iconfont icon-v"></text>{{item.level_name}}</view>
 							</view>
+							</block>
 						</view>
 						<view class='vip acea-row row-between-wrapper'>
 							<view>已售{{item.sales}}{{item.unit_name || '件'}}</view>
@@ -206,7 +208,7 @@
 			...mapState({
 				cartNum: state => state.indexData.cartNum
 			}),
-			...mapGetters(['isLogin', 'uid', 'cartNum']),
+			...mapGetters(['isLogin', 'uid', 'cartNum','userInfo']),
 		},
 		data() {
 			return {