lhl 4 vuotta sitten
vanhempi
commit
367c7e6767
4 muutettua tiedostoa jossa 26 lisäystä ja 5 poistoa
  1. 22 0
      pages/goods_details/index.vue
  2. 2 4
      pages/index/index.vue
  3. 1 1
      pages/index/index_cate.vue
  4. 1 0
      pages/user/index.vue

+ 22 - 0
pages/goods_details/index.vue

@@ -155,6 +155,7 @@
 				<view class="iconfont icon-shoucang" v-else></view>
 				<view>收藏</view>
 			</view>
+			<!-- #ifndef MP-TOUTIAO -->
 			<navigator open-type="switchTab" class="animated item" :class="animated == true ? 'bounceIn' : ''" url="/pages/order_addcart/order_addcart" hover-class="none">
 				<view class="iconfont icon-gouwuche1">
 					<text v-if="CartCount > 0" class="num bg-color">{{ CartCount || 0 }}</text>
@@ -170,6 +171,27 @@
 			<view v-else class="bnt acea-row">
 				<form report-submit="true"><button class="buy bnts sold_out" form-type="submit" disabled>商品已售罄</button></form>
 			</view>
+			<!-- #endif -->
+			<!-- #ifdef MP-TOUTIAO -->
+			<template v-if="power != ''">
+				<navigator open-type="switchTab" class="animated item" :class="animated == true ? 'bounceIn' : ''" url="/pages/order_addcart/order_addcart" hover-class="none">
+					<view class="iconfont icon-gouwuche1">
+						<text v-if="CartCount > 0" class="num bg-color">{{ CartCount || 0 }}</text>
+					</view>
+					<view>购物车</view>
+				</navigator>
+				<view v-if="attr.productSelect.stock != 0" class="bnt acea-row">
+					<form @submit="joinCart" report-submit="true"><button class="joinCart bnts" form-type="submit">加入购物车</button></form>
+					<form @submit="goBuy" report-submit="true" v-if="attr.productSelect">
+						<button class="buy bnts" form-type="submit" :disabled="attr.productSelect.stock == 0">立即购买</button>
+					</form>
+				</view>
+				<view v-else class="bnt acea-row">
+					<form report-submit="true"><button class="buy bnts sold_out" form-type="submit" disabled>商品已售罄</button></form>
+				</view>
+			</template>
+			
+			<!-- #endif -->
 		</view>
 		<block v-if="sharePacket.max && sharePacket.min">
 			<shareRedPackets

+ 2 - 4
pages/index/index.vue

@@ -295,7 +295,6 @@
 					</navigator>
 				</view>
 				<!-- #endif -->
-				<!-- #ifndef MP-TOUTIAO -->
 				<!-- 热点菜单 -->
 				<view class="hot-img" style="margin-top:20rpx">
 					<navigator :url="item.url" class="item" v-for="(item,index) in hot" :key="index" hover-class="none">
@@ -307,7 +306,6 @@
 						</view>
 					</navigator>
 				</view>
-				<!-- #endif -->
 				<!-- 品牌好店 -->
 				<view class="explosion" v-if="brandList.length && hide_mer_status !=1">
 					<view class="common-hd">
@@ -586,6 +584,7 @@
 			return {
 				title: that.share_title,
 				path: '/pages/index/index?spid=' + that.uid
+				
 			}
 		},
 		onShareTimeline: function() {
@@ -616,7 +615,6 @@
 				if (value.spid) {
 					that.currSpid = value.spid
 					app.globalData.spid = value.spid;
-					 
 				}
 			}
 			// #endif
@@ -797,6 +795,7 @@
 						// #endif 
 						// #ifdef MP
 						this.$emit('isShowAuth', true);
+						
 						this.$emit('isAuto', true);
 						// #endif
 					}
@@ -2310,7 +2309,6 @@
 									font-size: 20rpx;
 									border-radius: 2px;
 								}
-
 								.price {
 									display: flex;
 									margin-left: 10rpx;

+ 1 - 1
pages/index/index_cate.vue

@@ -316,7 +316,7 @@
 			// this.navIndex = options.navIndex
 			this.changeTab(JSON.parse(options.e))
 			// #ifdef MP-TOUTIAO
-			this.getPower()
+			// this.getPower()
 			// #endif
 			let that = this;
 			if (options.spid) {

+ 1 - 0
pages/user/index.vue

@@ -316,6 +316,7 @@
 				this.getMyMenus();
 				this.orderNum();
 				this.isShowAuth = false
+				
 			},
 			Setting: function() {
 				uni.openSetting({