zs 2 years ago
parent
commit
743c20e916
1 changed files with 158 additions and 14 deletions
  1. 158 14
      pagesHome/order/detail.vue

+ 158 - 14
pagesHome/order/detail.vue

@@ -5,7 +5,8 @@
 				<scroll-view scroll-y="true" class="scroll-view">
 					<view class="list-scroll-view">
 						<view class="one_1">
-							<swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff" indicator-active-color="#FB1438" :interval="3000" :duration="1000">
+							<swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff"
+								indicator-active-color="#FB1438" :interval="3000" :duration="1000">
 								<swiper-item class="list" v-for="(item,index) in info.goods.file" :key="index">
 									<image class="image" :src="item.url" mode="aspectFit">
 									</image>
@@ -13,12 +14,15 @@
 							</swiper>
 							<!-- 是否关注商品 -->
 							<view class="goodsColect">
-								<text @tap="toGoodscolect" :class="['iconfont',goodsColect?'icon-yduishoucangshixin-copy':'icon-yduishoucangkongxin']"></text>
+								<text @tap="toGoodscolect"
+									:class="['iconfont',goodsColect?'icon-yduishoucangshixin-copy':'icon-yduishoucangkongxin']"></text>
 							</view>
 						</view>
 						<view class="one_2">
-							<text class="money"><text>¥</text>{{info.specs&&info.specs.length>0?info.specs[0].sell_money:0}}</text>
-							<text class="money"><text>¥</text>{{info.specs&&info.specs.length>0?info.specs[0].flow_money:0}}</text>
+							<text
+								class="money"><text>¥</text>{{info.specs&&info.specs.length>0?info.specs[0].sell_money:0}}</text>
+							<text
+								class="money"><text>¥</text>{{info.specs&&info.specs.length>0?info.specs[0].flow_money:0}}</text>
 						</view>
 						<view class="one_3">
 							<view class="name">
@@ -32,6 +36,14 @@
 								<text>{{info.goods.send_time}}内发货</text>
 							</view>
 						</view>
+						<view class="one_4" @tap="toActivity">
+							<view class="l">
+								<text>{{info.act.length>0?`活动`:`暂无活动`}}</text>
+							</view>
+							<view class="r">
+								<text class="iconfont icon-jiantouyou"></text>
+							</view>
+						</view>
 						<view class="one_4" @tap="toSpec">
 							<view class="l">
 								选择规格
@@ -51,7 +63,9 @@
 						<view class="one_6">
 							<view class="one_6_1">
 								<view class="shop_1">
-									<image class="image" :src="info.shop.logo&&info.shop.logo.length>0?info.shop.logo[0].url:''" mode="aspectFit"></image>
+									<image class="image"
+										:src="info.shop.logo&&info.shop.logo.length>0?info.shop.logo[0].url:''"
+										mode="aspectFit"></image>
 								</view>
 								<view class="shop_2">
 									<view class="name">{{info.shop.name}}</view>
@@ -90,7 +104,8 @@
 				</scroll-view>
 			</view>
 			<view class="two">
-				<uni-goods-nav :options="options" :button-group="buttonGroup" @click="toNavleft" @buttonClick="toNavright" />
+				<uni-goods-nav :options="options" :button-group="buttonGroup" @click="toNavleft"
+					@buttonClick="toNavright" />
 			</view>
 		</view>
 		<!-- 跳转菜单 -->
@@ -98,7 +113,8 @@
 			<text @tap="toMenubar" class="iconfont icon-gengduo"></text>
 		</view>
 		<view class="bar_2" v-if="is_menu">
-			<view class="list" v-for="(item,index) in barList" :key="index" v-if="item.is_use=='0'" @click="toPath(item)">
+			<view class="list" v-for="(item,index) in barList" :key="index" v-if="item.is_use=='0'"
+				@click="toPath(item)">
 				<image class="image" :src="item.normal&&item.normal.length>0?item.normal[0].url:''"></image>
 				<text class="name"> {{item.name}}</text>
 			</view>
@@ -116,7 +132,9 @@
 								<view class="one">
 									<view class="one_1">
 										<view class="l">
-											<image class="image" :src="specsInfo.file.length>0?specsInfo.file[0].url:info.goods.file[0].url" mode="aspectFill" @tap="diaView"></image>
+											<image class="image"
+												:src="specsInfo.file.length>0?specsInfo.file[0].url:info.goods.file[0].url"
+												mode="aspectFill" @tap="diaView"></image>
 										</view>
 										<view class="r">
 											<view class="money">
@@ -134,7 +152,9 @@
 											规格
 										</view>
 										<view class="one_2_2">
-											<view :class="['list',is_specs!=index&&item.num>0?'list':is_specs!=index&&item.num<=0?'huilist':is_specs==index&&item.num>0?'redlist':is_specs==index&&item.num<=0?'huiilist':'list']" v-for="(item,index) in info.specs" :key="index" @tap="toSpecs(item)">
+											<view
+												:class="['list',is_specs!=index&&item.num>0?'list':is_specs!=index&&item.num<=0?'huilist':is_specs==index&&item.num>0?'redlist':is_specs==index&&item.num<=0?'huiilist':'list']"
+												v-for="(item,index) in info.specs" :key="index" @tap="toSpecs(item)">
 												<text>{{item.name}}</text>
 											</view>
 										</view>
@@ -144,7 +164,8 @@
 											<text>数量</text>
 										</view>
 										<view class="one_3_1">
-											<uni-number-box v-model="buy_num" @change="toCount" :min="1" :max="specsInfo.num">
+											<uni-number-box v-model="buy_num" @change="toCount" :min="1"
+												:max="specsInfo.num">
 											</uni-number-box>
 										</view>
 										<view class="one_3_1">
@@ -167,6 +188,41 @@
 						</view>
 					</view>
 				</view>
+				<view class="info_3" v-else-if="popupShow=='2'">
+					<scroll-view scroll-y="true" class="scroll-view">
+						<view class="list" v-for="(item,index) in info.act" :key="index">
+							<view class="list_1 textOver" @tap="toAct(item)">
+								<view class="title_1">
+									<view class="l">
+										<text>{{item.tag||'暂无'}}</text>{{item.act_time.title}}
+									</view>
+									<view class="r">
+										<text class="iconfont icon-jiantouyou"></text>
+									</view>
+								</view>
+								<view class="title_2" v-if="item.type=='5'||item.type=='6'">
+									<view class="text">{{item.text}}</view>
+									<view class="time">{{item.config.time_start}}-{{item.config.time_end}}</view>
+								</view>
+								<view class="title_2" v-else-if="item.type=='2'">
+									<view class="specList" v-for="(tag,indexx) in item.list" :key="indexx">
+										<view class="name">规格:{{tag.spec_name}}</view>
+										<view class="giftList" v-for="(tags,indexs) in tag.gift" :key="indexs"
+											@tap.stop="tags.type=='0' && getDetail(tags)">
+											<view class="left">
+												<view class="goods">{{tags.goods_name}}{{tags.spec_name}}</view>
+												<view class="goods">{{tags.desc}}</view>
+												<view class="num">×{{tags.num}}</view>
+											</view>
+											<view class="right"><text class="iconfont icon-jiantouyou"></text>
+											</view>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</scroll-view>
+				</view>
 			</view>
 		</uni-popup>
 		<view class="dialog" v-if="dialog.show==true" @tap="dialogClose">
@@ -174,7 +230,8 @@
 				<swiper class="swiper" circular @change="diaSpecs" :current="is_specs">
 					<swiper-item class="list" v-for="(item,index) in info.specs" :key="index">
 						<view class="list_1">
-							<image class="image" :src="item.file.length>0?item.file[0].url:info.goods.file[0].url" mode="aspectFill"></image>
+							<image class="image" :src="item.file.length>0?item.file[0].url:info.goods.file[0].url"
+								mode="aspectFill"></image>
 						</view>
 						<view class="name">
 							<text>{{item.name}}</text>
@@ -257,7 +314,7 @@
 		},
 		onLoad: async function(e) {
 			const that = this;
-			that.$set(that, `id`, e.id || '635e4b5b42e87c7a2880d0a8');
+			that.$set(that, `id`, e.id || '');
 			that.$set(that, `inviter`, e.inviter || '');
 			await that.searchConfig();
 			await that.search();
@@ -294,7 +351,6 @@
 							});
 							that.$set(that, `barList`, list)
 						}
-
 					}
 				})
 			},
@@ -374,6 +430,21 @@
 					}
 				}
 			},
+			// 活动说明
+			toActivity() {
+				const that = this;
+				if (that.info.act.length > 0) {
+					that.$set(that, `popupShow`, '2')
+					that.$refs.specShow.open();
+				}
+			},
+			// 查看正品详情
+			getDetail(e) {
+				const that = this;
+				uni.navigateTo({
+					url: `/pagesHome/order/detail?id=${e.goods}`
+				})
+			},
 			// 选择规格
 			toSpecs(e) {
 				const that = this;
@@ -568,7 +639,7 @@
 			// 加入购物车,立即购买
 			toNavright(e) {
 				const that = this;
-				this.$set(that, `popupShow`, '1');
+				that.$set(that, `popupShow`, '1');
 				that.$set(that, `btn_type`, e.content.type);
 				that.$refs.specShow.open();
 			},
@@ -604,6 +675,12 @@
 					type: '1'
 				})
 			},
+			// 查看活动
+			toAct(item) {
+				uni.navigateTo({
+					url: `/pagesRest/activity/info?id=${item._id}`
+				})
+			},
 			// 弹框选择规格
 			diaSpecs(e) {
 				const that = this;
@@ -1063,6 +1140,73 @@
 				}
 			}
 		}
+
+		.info_3 {
+			position: relative;
+			flex-grow: 1;
+
+			.list {
+				margin: 0 2vw 2vw 2vw;
+				border-radius: 10px;
+				background-color: #FFF8DC;
+
+				.list_1 {
+					padding: 2vw;
+					font-size: 14px;
+
+					.title_1 {
+						display: flex;
+						justify-content: space-between;
+						margin: 1vw 0;
+
+						.l {
+							text {
+								margin: 0 1vw 0 0;
+								font-size: 12px;
+								border-radius: 5px;
+								border: 0.5px solid var(--fFB1Color);
+								color: var(--fFB1Color);
+							}
+						}
+
+					}
+
+					.title_2 {
+						.specList {
+							.name {
+								margin: 0 0 1vw 0;
+							}
+
+							.giftList {
+								width: 90vw;
+								display: flex;
+								justify-content: space-between;
+								align-items: center;
+								margin: 0 0 1vw 0;
+								border: 0.5px solid var(--f9Color);
+								border-radius: 10px;
+
+								.left {
+									width: 85vw;
+
+									.goods {
+										overflow: hidden;
+										text-overflow: ellipsis;
+										display: -webkit-box;
+										-webkit-line-clamp: 2;
+										-webkit-box-orient: vertical;
+									}
+								}
+							}
+						}
+
+						.text {
+							color: var(--fFB1Color);
+						}
+					}
+				}
+			}
+		}
 	}
 
 	.dialog {