Browse Source

no message

宇宙无敌M1处理器的MacBook Pro 4 years ago
parent
commit
14e51c2779
1 changed files with 37 additions and 4 deletions
  1. 37 4
      plugins/mch/goods/goods.vue

+ 37 - 4
plugins/mch/goods/goods.vue

xqd xqd xqd
@@ -3,13 +3,31 @@
         <view v-if="!goods" class="u-goods-detail"></view>
         <template v-if="goods">
             <!--商品轮播图-->
-            <app-goods-banner
+            <!-- <app-goods-banner
                 :pic-list="goods.pic_url"
                 :share="goods.share"
                 :goods_id="id"
                 sign="mch"
-                :video-url="goods.video_url"
-            ></app-goods-banner>
+                :video-url="goods.banner_video"
+				type="video"
+            ></app-goods-banner> -->
+			<view style="position:relative;overflow:hidden;">
+				<view style="width:100%;display:flex;justify-content: flex-start;">
+					<view style="width:100%;" v-if="type=='video'">
+						<app-goods-banner :type="type" v-bind:pic-list="goods.pic_url" v-bind:share="goods.share" v-bind:video-url="goods.banner_video"
+						 v-bind:goods_id="id"></app-goods-banner>
+					</view>
+					<view style="width:100%;" v-if="type=='picture'">
+						<app-goods-banner :type="type" v-bind:pic-list="goods.pic_url" v-bind:share="goods.share" v-bind:video-url="goods.banner_video"
+						 v-bind:goods_id="id"></app-goods-banner>
+					</view>
+				</view>
+				<view style="position:absolute;left:50%;transform:translate(-50%,0);bottom:20px;display:flex;flex-wrap:nowrap;background:#fff;border-radius:28px;">
+					<view class="banner_btn" v-if="goods.banner_video&&goods.banner_video.length>0" :class="{active:type=='video'}"
+					 @click="type='video'">视频({{goods.banner_video.length}})</view>
+					<view class="banner_btn" :class="{active:type=='picture'}" @click="type='picture'">图片({{goods.pic_url.length}})</view>
+				</view>
+			</view>
             <bd-info
                 :theme="themeObject"
                 :name="goods.name"
@@ -219,7 +237,8 @@
                 mch_setting: null,
                 poster: this.$api.mch.poster,
                 poster_config: this.$api.mch.poster_config,
-                poster_generate: this.$api.mch.poster_generate
+                poster_generate: this.$api.mch.poster_generate,
+				type:'video'
             };
         },
         computed: {
@@ -664,4 +683,18 @@
         z-index: 1602;
         background-color: #ffffff;
     }
+	.banner_btn {
+		width: 64px;
+		height: 22px;
+		line-height: 20px;
+		background: #fff;
+		border-radius: 28px;
+		text-align: center;
+		font-size: 14px;
+	}
+	
+	.active {
+		color: #fff;
+		background: linear-gradient(#ff6404, #f21c1c);
+	}
 </style>