lhl 4 éve
szülő
commit
54f9db7872

+ 1 - 1
pages.json

@@ -167,7 +167,7 @@
 		{
 			"path": "pages/product/product",
 			"style": {
-				"navigationBarTitleText": "详情展示",
+				"navigationBarTitleText": "商品详情",
 				"app-plus": {
 					"titleNView": {
 						"type": "transparent"

+ 539 - 539
pages/cart/cart.vue

@@ -1,539 +1,539 @@
-<template>
-	<view class="container">
-		<!-- 空白页 -->
-		<view v-if="!hasLogin || empty === true" class="empty">
-			<image src="/static/error/emptyCart.png" class="emptyImg" mode="aspectFit"></image>
-			<view v-if="hasLogin" class="empty-tips">
-				空空如也
-				<navigator class="navigator" v-if="hasLogin" url="../index/index" open-type="switchTab">随便逛逛></navigator>
-			</view>
-			<view v-else class="empty-tips">
-				空空如也
-				<view class="navigator" @click="navToLogin">去登陆></view>
-			</view>
-		</view>
-		<view v-else>
-			<!-- 列表 -->
-			<view class="cart-list">
-				<block v-for="(item, index) in cartList" :key="item.id">
-					<view class="cart-item" :class="{ 'b-b': index !== cartList.length - 1 }">
-						<view class="image-wrapper">
-							<image
-								:src="item.productInfo.image"
-								:class="[item.loaded]"
-								mode="aspectFill"
-								lazy-load
-								@load="onImageLoad('cartList', index)"
-								@error="onImageError('cartList', index)"
-							></image>
-							<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.checked }" @click="check('item', index)"></view>
-						</view>
-						<view class="item-right">
-							<text class="clamp title">{{ item.productInfo.store_name }}</text>
-							<!-- <text class="attr">{{ item.attr_val }}</text> -->
-							<view class="ex-addr">
-								<image src="../../static/img/shop.png" mode="" class="name-img"></image>
-								子臣台州旗舰店
-								<image src="../../static/img/point.png" mode="" class="point-img"></image>
-								200m
-							</view>
-							<text class="price">¥{{ item.productInfo.price }} <text class="oldprice">¥{{item.productInfo.oldPrice}}</text></text>
-							<uni-number-box
-								class="step"
-								:min="1"
-								:max="item.productInfo.stock"
-								:value="item.cart_num > item.productInfo.stock ? item.productInfo.stock : item.cart_num"
-								:isMax="item.cart_num >= item.productInfo.stock ? true : false"
-								:isMin="item.cart_num === 1"
-								:index="index"
-								@eventChange="numberChange"
-							></uni-number-box>
-							<text class="del-btn iconfont iconclose" @click="deleteCartItem(index)"></text>
-							
-						</view>
-						<!-- <text class="del-btn iconfont iconclose" @click="deleteCartItem(index)"></text> -->
-					</view>
-					<view class="jg"></view>
-				</block>
-			</view>
-			<!-- 底部菜单栏 -->
-			<view class="action-section">
-				<view class="checkbox">
-					<view class="iconfont iconroundcheckfill icon-checked-box" @click="check('all')" :class="{ 'icon-checked': allChecked }"></view>
-					<view class="clear-btn" @click="allChecked ? clearCart() : ''" :class="{ show: allChecked }"><text>清空</text></view>
-				</view>
-				<view class="total-box">
-					<text class="price">¥{{ total }}</text>
-					<!-- <text class="coupon">
-						已优惠
-						<text>74.35</text>
-						元
-					</text> -->
-				</view>
-				<button type="primary" class="no-border confirm-btn" @click="createOrder">去结算</button>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-import { getCartList, getCartNum, cartDel } from '@/api/user.js';
-import { mapState } from 'vuex';
-import uniNumberBox from '@/components/uni-number-box.vue';
-import { saveUrl, interceptor } from '@/utils/loginUtils.js';
-export default {
-	components: {
-		uniNumberBox
-	},
-	data() {
-		return {
-			total: 0, //总价格
-			allChecked: false, //全选状态  true|false
-			empty: false, //空白页现实  true|false
-			cartList: [
-				{
-					id: '11',
-					productInfo: {
-						image: '###',
-						store_name: '鸭子总店',
-						price: 99,
-						stock: 99,
-						oldPrice: 199
-						
-					},
-					loaded: 'loaded',
-					checked: false,
-					attr_val: 1,
-					cart_num: 1
-					
-				},
-				{
-					id: '11',
-					productInfo: {
-						image: '###',
-						store_name: '鸭子总店',
-						price: 99,
-						stock: 99,
-						oldPrice: 199
-						
-					},
-					loaded: 'loaded',
-					checked: false,
-					attr_val: 1,
-					cart_num: 1
-					
-				},
-				{
-					id: '11',
-					productInfo: {
-						image: '###',
-						store_name: '鸭子总店',
-						price: 99,
-						stock: 99,
-						oldPrice: 199
-						
-					},
-					loaded: 'loaded',
-					checked: false,
-					attr_val: 1,
-					cart_num: 1
-					
-				},
-			]
-		};
-	},
-	onShow() {
-		// 只有登录时才加载数据
-		if (this.hasLogin) {
-			this.loadData();
-		}
-	},
-	watch: {
-		//显示空白页
-		cartList(e) {
-			let empty = e.length === 0 ? true : false;
-			if (this.empty !== empty) {
-				this.empty = empty;
-			}
-		}
-	},
-	computed: {
-		...mapState('user', ['hasLogin'])
-	},
-	methods: {
-		//请求数据
-		async loadData() {
-			let obj = this;
-			getCartList({})
-				.then(function(e) {
-					// 获取当前购物车物品增加数量
-					let nub = obj.cartList.length;
-					// 获取之前对象数组
-					let aArray = obj.cartList.reverse();
-					// 获取返回数据对象数组
-					let bArray = e.data.valid.reverse();
-					obj.cartList = bArray
-						.map((item, ind) => {
-							// 设置返回数据默认为勾选状态
-							item.checked = true;
-							// 获取相同数组之前对象的数据
-							let carlist = aArray[ind];
-							// 判断之前是否已经加载完毕
-							if (carlist && carlist.loaded == 'loaded') {
-								item.loaded = 'loaded';
-							}
-							return item;
-						})
-						.reverse();
-					obj.calcTotal(); //计算总价
-				})
-				.catch(function(e) {
-					console.log(e);
-				});
-		},
-		//监听image加载完成
-		onImageLoad(key, index) {
-			// 修改载入完成后图片class样式
-			this.$set(this[key][index], 'loaded', 'loaded');
-		},
-		//监听image加载失败
-		onImageError(key, index) {
-			this[key][index].image = '/static/error/errorImage.jpg';
-		},
-		// 跳转到登录页
-		navToLogin() {
-			// 保存地址
-			saveUrl();
-			// 登录拦截
-			interceptor();
-		},
-		//选中状态处理
-		check(type, index) {
-			if (type === 'item') {
-				this.cartList[index].checked = !this.cartList[index].checked;
-			} else {
-				const checked = !this.allChecked;
-				const list = this.cartList;
-				list.forEach(item => {
-					item.checked = checked;
-				});
-				this.allChecked = checked;
-			}
-			this.calcTotal(type);
-		},
-		//数量
-		numberChange(data) {
-			let arr = this.cartList[data.index];
-			arr.cart_num = data.number;
-			getCartNum({ id: arr.id, number: data.number })
-				.then(e => {
-					console.log(e);
-				})
-				.catch(function(e) {
-					console.log(e);
-				});
-			this.calcTotal();
-		},
-		//删除
-		deleteCartItem(index) {
-			let list = this.cartList;
-			let row = list[index];
-			let id = row.id;
-			cartDel({
-				ids: id
-			});
-			this.cartList.splice(index, 1);
-			uni.hideLoading();
-			this.calcTotal();
-		},
-		//清空
-		clearCart() {
-			uni.showModal({
-				content: '清空购物车?',
-				success: e => {
-					if (e.confirm) {
-						let st = this.cartList.map(e => {
-							return e.id;
-						});
-						cartDel({
-							ids: st.join(',')
-						}).then(e => {
-							console.log(e);
-						});
-						this.cartList = [];
-					}
-				}
-			});
-		},
-		//计算总价
-		calcTotal() {
-			let list = this.cartList;
-			if (list.length === 0) {
-				this.empty = true;
-				return;
-			}
-			let total = 0;
-			let checked = true;
-			list.forEach(item => {
-				if (item.checked === true) {
-					total += item.productInfo.price * item.cart_num;
-				} else if (checked === true) {
-					checked = false;
-				}
-			});
-			this.allChecked = checked;
-			this.total = Number(total.toFixed(2));
-		},
-		//创建订单
-		createOrder() {
-			let list = this.cartList;
-			let goodsData = [];
-			list.forEach(item => {
-				if (item.checked) {
-					goodsData.push(item.id);
-				}
-			});
-
-			uni.navigateTo({
-				url: '/pages/order/createOrder?id=' + goodsData.join(',')
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-.container {
-	padding-bottom: 134rpx;
-	background-color: $page-color-base;
-	/* 空白页 */
-	.empty {
-		position: fixed;
-		left: 0;
-		top: 0;
-		width: 100%;
-		height: 100vh;
-		padding-bottom: 100rpx;
-		display: flex;
-		justify-content: center;
-		flex-direction: column;
-		align-items: center;
-		background: #fff;
-		.emptyImg {
-			width: 300rpx;
-			height: 250rpx;
-			margin-bottom: 30rpx;
-		}
-		.empty-tips {
-			display: flex;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-disabled;
-
-			.navigator {
-				// color: $uni-color-primary;
-				margin-left: 16rpx;
-				color: #901b21;
-			}
-		}
-	}
-}
-/* 购物车列表项 */
-.cart-item {
-	display: flex;
-	position: relative;
-	padding: 30rpx 38rpx 27rpx 92rpx;
-	.image-wrapper {
-		width: 160rpx;
-		height: 160rpx;
-		flex-shrink: 0;
-		position: relative;
-		image {
-			border-radius: 8rpx;
-		}
-	}
-	.checkbox {
-		position: absolute;
-		left: -67rpx;
-		top: 57rpx;
-		// bottom: 0;
-		margin: auto 0;
-		z-index: 8;
-		font-size: 44rpx;
-		line-height: 1;
-		padding: 4rpx;
-		color: $font-color-disabled;
-		background: #fff;
-		border-radius: 50px;
-	}
-	.item-right {
-		display: flex;
-		flex-direction: column;
-		flex: 1;
-		overflow: hidden;
-		position: relative;
-		padding-left: 30rpx;
-		.ex-addr {
-			// margin-top: 16rpx;
-			// padding-left: 22rpx;
-			height: 22rpx;
-			font-size: 22rpx;
-			font-weight: 500;
-			color: #dcb876;
-			image {
-				height: 22rpx;
-			}
-			.name-img {
-				// vertical-align: ;
-				width: 26rpx;
-				margin: 0 4rpx -3rpx 0;
-			}
-			.point-img {
-				width: 16rpx;
-				margin: 0 4rpx -3rpx 14rpx;
-			}
-		}
-		.title,
-		.price {
-			font-size: $font-base + 2rpx;
-			color: $font-color-dark;
-			height: 40rpx;
-			line-height: 40rpx;
-			font-weight: bold;
-			color: #333333;
-			.oldprice {
-				font-size: 24rpx;
-				color: #9a9a9a;
-				text-decoration:line-through;
-				display: inline-block;
-				padding-left: 10rpx;
-			}
-		}
-		.attr {
-			font-size: $font-sm + 2rpx;
-			color: $font-color-light;
-			height: 50rpx;
-			line-height: 50rpx;
-		}
-		.price {
-			position: absolute;
-			bottom: 0;
-			height: 50rpx;
-			line-height: 50rpx;
-		}
-		.step {
-			position: absolute;
-			bottom: 0;
-			right: 0rpx;
-			// z-index: 999;
-			// margin-top: 20rpx;
-			// border: 1px red solid;
-		}
-		.del-btn {
-			
-			padding: 4rpx 10rpx;
-			font-size: 34rpx;
-			height: 50rpx;
-			color: $font-color-light;
-			position: absolute;
-			top: 0;
-			right: 0;
-		}
-		
-	}
-	// .del-btn {
-	// 	padding: 4rpx 10rpx;
-	// 	font-size: 34rpx;
-	// 	height: 50rpx;
-	// 	color: $font-color-light;
-	// }
-}
-/* 底部栏 */
-.action-section {
-	/* #ifdef H5 */
-	margin-bottom: 100rpx;
-	/* #endif */
-	position: fixed;
-	left: 30rpx;
-	bottom: 30rpx;
-	z-index: 95;
-	display: flex;
-	align-items: center;
-	width: 690rpx;
-	height: 100rpx;
-	padding: 0 30rpx;
-	background: rgba(255, 255, 255, 0.9);
-	box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
-	border-radius: 16rpx;
-	.checkbox {
-		height: 52rpx;
-		position: relative;
-		.icon-checked-box {
-			border-radius: 50rpx;
-			background-color: #ffffff;
-			width: 52rpx;
-			height: 100%;
-			position: relative;
-			z-index: 5;
-			font-size: 53rpx;
-			line-height: 1;
-			color: $font-color-light;
-		}
-		.icon-checked {
-			color: $base-color;
-		}
-	}
-	.clear-btn {
-		position: absolute;
-		left: 26rpx;
-		top: 0;
-		z-index: 4;
-		width: 0;
-		height: 52rpx;
-		line-height: 52rpx;
-		padding-left: 38rpx;
-		font-size: $font-base;
-		color: #fff;
-		background: $font-color-disabled;
-		border-radius: 0 50px 50px 0;
-		opacity: 0;
-		transition: 0.2s;
-		&.show {
-			opacity: 1;
-			width: 120rpx;
-		}
-	}
-	.total-box {
-		flex: 1;
-		display: flex;
-		flex-direction: column;
-		text-align: right;
-		padding-right: 40rpx;
-		.price {
-			font-size: $font-lg;
-			color: $font-color-dark;
-		}
-		.coupon {
-			font-size: $font-sm;
-			color: $font-color-light;
-			text {
-				color: $font-color-dark;
-			}
-		}
-	}
-	.confirm-btn {
-		padding: 0 38rpx;
-		margin: 0;
-		border-radius: 100px;
-		height: 76rpx;
-		line-height: 76rpx;
-		font-size: $font-base + 2rpx;
-		background: $base-color;
-	}
-}
-/* 复选框选中状态 */
-.action-section .checkbox.checked,
-.cart-item .checkbox.checked {
-	color: $base-color;
-}
-
-</style>
+<template>
+	<view class="container">
+		<!-- 空白页 -->
+		<view v-if="!hasLogin || empty === true" class="empty">
+			<image src="/static/error/emptyCart.png" class="emptyImg" mode="aspectFit"></image>
+			<view v-if="hasLogin" class="empty-tips">
+				空空如也
+				<navigator class="navigator" v-if="hasLogin" url="../index/index" open-type="switchTab">随便逛逛></navigator>
+			</view>
+			<view v-else class="empty-tips">
+				空空如也
+				<view class="navigator" @click="navToLogin">去登陆></view>
+			</view>
+		</view>
+		<view v-else>
+			<!-- 列表 -->
+			<view class="cart-list">
+				<block v-for="(item, index) in cartList" :key="item.id">
+					<view class="cart-item" :class="{ 'b-b': index !== cartList.length - 1 }">
+						<view class="image-wrapper">
+							<image
+								:src="item.productInfo.image"
+								:class="[item.loaded]"
+								mode="aspectFill"
+								lazy-load
+								@load="onImageLoad('cartList', index)"
+								@error="onImageError('cartList', index)"
+							></image>
+							<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.checked }" @click="check('item', index)"></view>
+						</view>
+						<view class="item-right">
+							<text class="clamp title">{{ item.productInfo.store_name }}</text>
+							<!-- <text class="attr">{{ item.attr_val }}</text> -->
+							<view class="ex-addr">
+								<image src="../../static/img/shop.png" mode="" class="name-img"></image>
+								子臣台州旗舰店
+								<image src="../../static/img/point.png" mode="" class="point-img"></image>
+								200m
+							</view>
+							<text class="price">¥{{ item.productInfo.price }} <text class="oldprice">¥{{item.productInfo.oldPrice}}</text></text>
+							<uni-number-box
+								class="step"
+								:min="1"
+								:max="item.productInfo.stock"
+								:value="item.cart_num > item.productInfo.stock ? item.productInfo.stock : item.cart_num"
+								:isMax="item.cart_num >= item.productInfo.stock ? true : false"
+								:isMin="item.cart_num === 1"
+								:index="index"
+								@eventChange="numberChange"
+							></uni-number-box>
+							<text class="del-btn iconfont iconclose" @click="deleteCartItem(index)"></text>
+							
+						</view>
+						<!-- <text class="del-btn iconfont iconclose" @click="deleteCartItem(index)"></text> -->
+					</view>
+					<view class="jg"></view>
+				</block>
+			</view>
+			<!-- 底部菜单栏 -->
+			<view class="action-section">
+				<view class="checkbox">
+					<view class="iconfont iconroundcheckfill icon-checked-box" @click="check('all')" :class="{ 'icon-checked': allChecked }"></view>
+					<view class="clear-btn" @click="allChecked ? clearCart() : ''" :class="{ show: allChecked }"><text>清空</text></view>
+				</view>
+				<view class="total-box">
+					<text class="price">¥{{ total }}</text>
+					<!-- <text class="coupon">
+						已优惠
+						<text>74.35</text>
+						元
+					</text> -->
+				</view>
+				<button type="primary" class="no-border confirm-btn" @click="createOrder">去结算</button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { getCartList, getCartNum, cartDel } from '@/api/user.js';
+import { mapState } from 'vuex';
+import uniNumberBox from '@/components/uni-number-box.vue';
+import { saveUrl, interceptor } from '@/utils/loginUtils.js';
+export default {
+	components: {
+		uniNumberBox
+	},
+	data() {
+		return {
+			total: 0, //总价格
+			allChecked: false, //全选状态  true|false
+			empty: false, //空白页现实  true|false
+			cartList: [
+				{
+					id: '11',
+					productInfo: {
+						image: '###',
+						store_name: '鸭子总店',
+						price: 99,
+						stock: 99,
+						oldPrice: 199
+						
+					},
+					loaded: 'loaded',
+					checked: false,
+					attr_val: 1,
+					cart_num: 1
+					
+				},
+				{
+					id: '11',
+					productInfo: {
+						image: '###',
+						store_name: '鸭子总店',
+						price: 99,
+						stock: 99,
+						oldPrice: 199
+						
+					},
+					loaded: 'loaded',
+					checked: false,
+					attr_val: 1,
+					cart_num: 1
+					
+				},
+				{
+					id: '11',
+					productInfo: {
+						image: '###',
+						store_name: '鸭子总店',
+						price: 99,
+						stock: 99,
+						oldPrice: 199
+						
+					},
+					loaded: 'loaded',
+					checked: false,
+					attr_val: 1,
+					cart_num: 1
+					
+				},
+			]
+		};
+	},
+	onShow() {
+		// 只有登录时才加载数据
+		if (this.hasLogin) {
+			this.loadData();
+		}
+	},
+	watch: {
+		//显示空白页
+		cartList(e) {
+			let empty = e.length === 0 ? true : false;
+			if (this.empty !== empty) {
+				this.empty = empty;
+			}
+		}
+	},
+	computed: {
+		...mapState('user', ['hasLogin'])
+	},
+	methods: {
+		//请求数据
+		async loadData() {
+			let obj = this;
+			getCartList({})
+				.then(function(e) {
+					// 获取当前购物车物品增加数量
+					let nub = obj.cartList.length;
+					// 获取之前对象数组
+					let aArray = obj.cartList.reverse();
+					// 获取返回数据对象数组
+					let bArray = e.data.valid.reverse();
+					obj.cartList = bArray
+						.map((item, ind) => {
+							// 设置返回数据默认为勾选状态
+							item.checked = true;
+							// 获取相同数组之前对象的数据
+							let carlist = aArray[ind];
+							// 判断之前是否已经加载完毕
+							if (carlist && carlist.loaded == 'loaded') {
+								item.loaded = 'loaded';
+							}
+							return item;
+						})
+						.reverse();
+					obj.calcTotal(); //计算总价
+				})
+				.catch(function(e) {
+					console.log(e);
+				});
+		},
+		//监听image加载完成
+		onImageLoad(key, index) {
+			// 修改载入完成后图片class样式
+			this.$set(this[key][index], 'loaded', 'loaded');
+		},
+		//监听image加载失败
+		onImageError(key, index) {
+			this[key][index].image = '/static/error/errorImage.jpg';
+		},
+		// 跳转到登录页
+		navToLogin() {
+			// 保存地址
+			saveUrl();
+			// 登录拦截
+			interceptor();
+		},
+		//选中状态处理
+		check(type, index) {
+			if (type === 'item') {
+				this.cartList[index].checked = !this.cartList[index].checked;
+			} else {
+				const checked = !this.allChecked;
+				const list = this.cartList;
+				list.forEach(item => {
+					item.checked = checked;
+				});
+				this.allChecked = checked;
+			}
+			this.calcTotal(type);
+		},
+		//数量
+		numberChange(data) {
+			let arr = this.cartList[data.index];
+			arr.cart_num = data.number;
+			getCartNum({ id: arr.id, number: data.number })
+				.then(e => {
+					console.log(e);
+				})
+				.catch(function(e) {
+					console.log(e);
+				});
+			this.calcTotal();
+		},
+		//删除
+		deleteCartItem(index) {
+			let list = this.cartList;
+			let row = list[index];
+			let id = row.id;
+			cartDel({
+				ids: id
+			});
+			this.cartList.splice(index, 1);
+			uni.hideLoading();
+			this.calcTotal();
+		},
+		//清空
+		clearCart() {
+			uni.showModal({
+				content: '清空购物车?',
+				success: e => {
+					if (e.confirm) {
+						let st = this.cartList.map(e => {
+							return e.id;
+						});
+						cartDel({
+							ids: st.join(',')
+						}).then(e => {
+							console.log(e);
+						});
+						this.cartList = [];
+					}
+				}
+			});
+		},
+		//计算总价
+		calcTotal() {
+			let list = this.cartList;
+			if (list.length === 0) {
+				this.empty = true;
+				return;
+			}
+			let total = 0;
+			let checked = true;
+			list.forEach(item => {
+				if (item.checked === true) {
+					total += item.productInfo.price * item.cart_num;
+				} else if (checked === true) {
+					checked = false;
+				}
+			});
+			this.allChecked = checked;
+			this.total = Number(total.toFixed(2));
+		},
+		//创建订单
+		createOrder() {
+			let list = this.cartList;
+			let goodsData = [];
+			list.forEach(item => {
+				if (item.checked) {
+					goodsData.push(item.id);
+				}
+			});
+
+			uni.navigateTo({
+				url: '/pages/order/createOrder?id=' + goodsData.join(',')
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.container {
+	padding-bottom: 134rpx;
+	background-color: $page-color-base;
+	/* 空白页 */
+	.empty {
+		position: fixed;
+		left: 0;
+		top: 0;
+		width: 100%;
+		height: 100vh;
+		padding-bottom: 100rpx;
+		display: flex;
+		justify-content: center;
+		flex-direction: column;
+		align-items: center;
+		background: #fff;
+		.emptyImg {
+			width: 300rpx;
+			height: 250rpx;
+			margin-bottom: 30rpx;
+		}
+		.empty-tips {
+			display: flex;
+			font-size: $font-sm + 2rpx;
+			color: $font-color-disabled;
+
+			.navigator {
+				// color: $uni-color-primary;
+				margin-left: 16rpx;
+				color: #901b21;
+			}
+		}
+	}
+}
+/* 购物车列表项 */
+.cart-item {
+	display: flex;
+	position: relative;
+	padding: 30rpx 38rpx 27rpx 92rpx;
+	.image-wrapper {
+		width: 160rpx;
+		height: 160rpx;
+		flex-shrink: 0;
+		position: relative;
+		image {
+			border-radius: 8rpx;
+		}
+	}
+	.checkbox {
+		position: absolute;
+		left: -67rpx;
+		top: 57rpx;
+		// bottom: 0;
+		margin: auto 0;
+		z-index: 8;
+		font-size: 44rpx;
+		line-height: 1;
+		padding: 4rpx;
+		color: $font-color-disabled;
+		background: #fff;
+		border-radius: 50px;
+	}
+	.item-right {
+		display: flex;
+		flex-direction: column;
+		flex: 1;
+		overflow: hidden;
+		position: relative;
+		padding-left: 30rpx;
+		.ex-addr {
+			// margin-top: 16rpx;
+			// padding-left: 22rpx;
+			height: 22rpx;
+			font-size: 22rpx;
+			font-weight: 500;
+			color: #dcb876;
+			image {
+				height: 22rpx;
+			}
+			.name-img {
+				// vertical-align: ;
+				width: 26rpx;
+				margin: 0 4rpx -3rpx 0;
+			}
+			.point-img {
+				width: 16rpx;
+				margin: 0 4rpx -3rpx 14rpx;
+			}
+		}
+		.title,
+		.price {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+			height: 40rpx;
+			line-height: 40rpx;
+			font-weight: bold;
+			color: #333333;
+			.oldprice {
+				font-size: 24rpx;
+				color: #9a9a9a;
+				text-decoration:line-through;
+				display: inline-block;
+				padding-left: 10rpx;
+			}
+		}
+		.attr {
+			font-size: $font-sm + 2rpx;
+			color: $font-color-light;
+			height: 50rpx;
+			line-height: 50rpx;
+		}
+		.price {
+			position: absolute;
+			bottom: 0;
+			height: 50rpx;
+			line-height: 50rpx;
+		}
+		.step {
+			position: absolute;
+			bottom: 0;
+			right: 0rpx;
+			// z-index: 999;
+			// margin-top: 20rpx;
+			// border: 1px red solid;
+		}
+		.del-btn {
+			
+			padding: 4rpx 10rpx;
+			font-size: 34rpx;
+			height: 50rpx;
+			color: $font-color-light;
+			position: absolute;
+			top: 0;
+			right: 0;
+		}
+		
+	}
+	// .del-btn {
+	// 	padding: 4rpx 10rpx;
+	// 	font-size: 34rpx;
+	// 	height: 50rpx;
+	// 	color: $font-color-light;
+	// }
+}
+/* 底部栏 */
+.action-section {
+	/* #ifdef H5 */
+	margin-bottom: 100rpx;
+	/* #endif */
+	position: fixed;
+	left: 30rpx;
+	bottom: 30rpx;
+	z-index: 95;
+	display: flex;
+	align-items: center;
+	width: 690rpx;
+	height: 100rpx;
+	padding: 0 30rpx;
+	background: rgba(255, 255, 255, 0.9);
+	box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
+	border-radius: 16rpx;
+	.checkbox {
+		height: 52rpx;
+		position: relative;
+		.icon-checked-box {
+			border-radius: 50rpx;
+			background-color: #ffffff;
+			width: 52rpx;
+			height: 100%;
+			position: relative;
+			z-index: 5;
+			font-size: 53rpx;
+			line-height: 1;
+			color: $font-color-light;
+		}
+		.icon-checked {
+			color: $base-color;
+		}
+	}
+	.clear-btn {
+		position: absolute;
+		left: 26rpx;
+		top: 0;
+		z-index: 4;
+		width: 0;
+		height: 52rpx;
+		line-height: 52rpx;
+		padding-left: 38rpx;
+		font-size: $font-base;
+		color: #fff;
+		background: $font-color-disabled;
+		border-radius: 0 50px 50px 0;
+		opacity: 0;
+		transition: 0.2s;
+		&.show {
+			opacity: 1;
+			width: 120rpx;
+		}
+	}
+	.total-box {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		text-align: right;
+		padding-right: 40rpx;
+		.price {
+			font-size: $font-lg;
+			color: $font-color-dark;
+		}
+		.coupon {
+			font-size: $font-sm;
+			color: $font-color-light;
+			text {
+				color: $font-color-dark;
+			}
+		}
+	}
+	.confirm-btn {
+		padding: 0 38rpx;
+		margin: 0;
+		border-radius: 100px;
+		height: 76rpx;
+		line-height: 76rpx;
+		font-size: $font-base + 2rpx;
+		background: $base-color;
+	}
+}
+/* 复选框选中状态 */
+.action-section .checkbox.checked,
+.cart-item .checkbox.checked {
+	color: $base-color;
+}
+
+</style>

+ 11 - 5
pages/order/order.vue

@@ -16,8 +16,9 @@
 					<!-- 订单列表 -->
 					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index" class="order-item">
 						<view class="i-top b-b">
-							<text class="time">{{ item._add_time }}</text>
-							<text class="state" :style="{ color: item.stateTipColor }">{{ item._status._title }}</text>
+							<!-- <view class=""></view> -->
+							<text class="time">订单编号:{{ item.id}}</text>
+							<text class="state" style=" color: #901b21; " >{{ item._status._title }}</text>
 							<text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text>
 						</view>
 
@@ -39,7 +40,7 @@
 							<view class="right">
 								<view class="flex-start">
 									<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
-									<text class="price">{{ goodsItem.productInfo.price|moneyNum }}</text>
+									<text class="price" style="flex-grow: 1;text-align: right;">{{ goodsItem.productInfo.price|moneyNum }}</text>
 								</view>
 								<view class="row flex">
 									<text class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>
@@ -81,6 +82,11 @@ export default {
 		uniLoadMore,
 		empty
 	},
+	filters: {
+		moneyNum(value) {
+			return +value
+		}
+	},
 	data() {
 		return {
 			tabCurrentIndex: 0,
@@ -110,7 +116,7 @@ export default {
 				// 	limit: 10 //每次信息条数
 				// },
 				{
-					state: 2,
+					state: 1,
 					text: '待收货',
 					loadingType: 'more',
 					orderList: [],
@@ -371,7 +377,7 @@ export default {
 					break;
 				case 4:
 					stateTip = '已完成';
-					stateTipColor = '#5dbc7c';
+					stateTipColor = '#901b21';
 					break;
 				case 9:
 					stateTip = '订单已关闭';

+ 68 - 68
pages/product/common/contentText.vue

@@ -1,68 +1,68 @@
-<template>
-	<view class="detail-desc">
-		<view class="d-header"><text>图文详情</text></view>
-		<rich-text class="detail-centent" :nodes="description"></rich-text>
-		<!-- 底部高度撑开 -->
-	</view>
-</template>
-
-<script>
-export default {
-	props: {
-		description: {
-			default: ''
-		},
-	},
-	data() {
-		return {
-			
-		};
-	},
-};
-</script>
-
-<style lang="scss">
-	/*  详情 */
-	.detail-desc {
-		margin-top: 14rpx;
-		background: #fff;
-		/deep/ img {
-			max-width: 100% !important;
-			display: inline !important;
-		}
-		/deep/ div {
-			max-width: 100% !important;
-		}
-		.d-header {
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			height: 80rpx;
-			font-size: $font-base + 2rpx;
-			color: $font-color-dark;
-			position: relative;
-	
-			text {
-				padding: 0 20rpx;
-				background: #fff;
-				position: relative;
-				z-index: 1;
-			}
-			&:after {
-				position: absolute;
-				left: 50%;
-				top: 50%;
-				transform: translateX(-50%);
-				width: 300rpx;
-				height: 0;
-				content: '';
-				border-bottom: 1px solid #ccc;
-			}
-		}
-	}
-	/* 商品详情中限制图片大小 */
-	/deep/ .rich-img {
-		width: 100% !important;
-		height: auto;
-	}
-</style>
+<template>
+	<view class="detail-desc">
+		<view class="d-header"><text>商品详情</text></view>
+		<rich-text class="detail-centent" :nodes="description"></rich-text>
+		<!-- 底部高度撑开 -->
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		description: {
+			default: ''
+		},
+	},
+	data() {
+		return {
+			
+		};
+	},
+};
+</script>
+
+<style lang="scss">
+	/*  详情 */
+	.detail-desc {
+		margin-top: 14rpx;
+		background: #fff;
+		/deep/ img {
+			max-width: 100% !important;
+			display: inline !important;
+		}
+		/deep/ div {
+			max-width: 100% !important;
+		}
+		.d-header {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 80rpx;
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+			position: relative;
+	
+			text {
+				padding: 0 20rpx;
+				background: #fff;
+				position: relative;
+				z-index: 1;
+			}
+			&:after {
+				position: absolute;
+				left: 50%;
+				top: 50%;
+				transform: translateX(-50%);
+				width: 300rpx;
+				height: 0;
+				content: '';
+				border-bottom: 1px solid #ccc;
+			}
+		}
+	}
+	/* 商品详情中限制图片大小 */
+	/deep/ .rich-img {
+		width: 100% !important;
+		height: auto;
+	}
+</style>

+ 5 - 1
pages/product/common/groupTime.vue

@@ -3,7 +3,7 @@
 		<view class="title flex" style="width: 100%;">
 			<view class="title-left ">
         <view class="price-info">
-          <view class="all-price">¥<text class="now-price">{{ goodsObjact.price }}</text><text class="old-price">¥{{goodsObjact.product_price}}</text><text class="pt-num">{{ goodsObjact.people }}人团1人中</text></view>
+          <view class="all-price">¥<text class="now-price">{{ goodsObjact.price }}</text><text class="old-price">¥{{goodsObjact.product_price}}</text><text class="pt-num">{{ goodsObjact.people }}人团{{pinkingNum}}人中</text></view>
         </view>
         <view class="pt-title">
           拼中可得200积分,未拼中可得¥1.50元补贴
@@ -78,6 +78,10 @@ export default {
 					upTime: 0
 				};
 			}
+		},
+		pinkingNum: {
+			type: Number,
+			default: 0
 		}
 	},
 	data() {

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 39 - 4
pages/product/common/topSwiper.vue


+ 989 - 943
pages/product/groupBooking/productGroup.vue

@@ -1,944 +1,990 @@
-<template>
-	<view class="container">
-		<!-- 轮播图 -->
-		<top-swiper :imgList="imgList"></top-swiper>
-		<!-- 拼团倒计时 -->
-		<group-time :goodsObjact="goodsObjact" :key='goodsObjact.product_price' :seckillObj="seckillObj"></group-time>
-    <view class="jg"></view>
-		<!-- 拼团标题 -->
-		<group-content :goodsObjact="goodsObjact"></group-content>
-		<!-- 拼团到货时间及优惠 -->
-		<discounts :mark='goodsObjact.mark' :Info="goodsObjact.info" @clickCoupon="Getcoupon" :showCoupon='false'></discounts>
-		<!-- 规格信息 -->
-		<!-- <fresh-detail :goodsObjact="goodsObjact"></fresh-detail> -->
-		<!-- <view class="uni-padding-wrap pinklistbox" v-if="pinkTlist.length > 0">
-			<view class="pinklist">
-				<view v-for="(ls, ind) in showlist">
-					<view class="flex pinklist_list">
-						<view class="pink_img"><image :src="ls.avatar"></image></view>
-						<view class="pink_name">{{ ls.nickname }}</view>
-						<view class="pink_tpl">
-							<view class="pink_people">
-								还差
-								<text>{{ ls.count }}</text>
-								人拼团
-							</view>
-						</view>
-						<view class="pint" @click="groupBooking(ls.id)">
-							去拼团
-							<text class="iconfont iconenter"></text>
-						</view>
-					</view>
-				</view>
-			</view>
-			<view class="More" @click="clickMore" v-if="more">查看更多</view>
-		</view> -->
-		<!-- <view class="ping-plan">
-			<view class="participate-7 flex-between-center">
-				<view class="participate-7-1">
-					<text class="word" v-if="pink_type == 1">AA团</text>
-					<text class="word" v-else>达人团</text>
-					<text>玩法</text>
-				</view>
-				<view class="participate-7-1" @click="ToRule()">
-					<text class="word1">详细规则</text>
-					<image src="../../../static/img/img74.png"></image>
-				</view>
-			</view>
-			<view class="participate-8 flex-between-center">
-				<view class="participate-8-1">
-					<image class="img1" src="https://shicai.liuniu946.com/img/img76.png"></image>
-					<view class="word-1">开团/参团</view>
-					<view class="word-2">拼团享低价</view>
-				</view>
-				<image src="https://shicai.liuniu946.com/img/img75.png"></image>
-				<view class="participate-8-1">
-					<image class="img2" src="https://shicai.liuniu946.com/img/img77.png"></image>
-					<view class="word-1">邀请邻里参团</view>
-					<view class="word-2">分享优惠多</view>
-				</view>
-				<image src="https://shicai.liuniu946.com/img/img75.png"></image>
-				<view class="participate-8-1">
-					<image class="img3" src="https://shicai.liuniu946.com/img/img78.png"></image>
-					<view class="word-1">人满发货</view>
-					<view class="word-2">人不满退款</view>
-				</view>
-			</view>
-		</view> -->
-		
-		<!-- 大家都在拼 达人团显示 -->
-		<!-- <now-list v-if="pink_type == 2" :recommendedlist="recommendedlist"></now-list> -->
-		
-		
-		<!-- 图文详情 -->
-		<content-text :description="description"></content-text>
-
-		<!-- 底部高度撑开 -->
-		<view class="contentBottomHeight"></view>
-		<!-- 底部操作菜单 -->
-		<view >
-			<view >
-				<group-bottom :peoplePrize='goodsObjact.people_prize' @buy="openPinkT" @specOPne="specOPne" :seckillObj="seckillObj" :many='many'></group-bottom>
-			</view>
-		</view>
-		<!-- 规格-模态层弹窗 -->
-		<view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec()">
-			<!-- 遮罩层 -->
-			<view class="mask"></view>
-			<view class="layer attr-content" @click.stop="stopPrevent">
-				<view class="a-t">
-					<image :src="actionImage"></image>
-					<view class="right">
-						<text class="name">{{ goodsObjact.store_name }}</text>
-						<text class="price">¥{{ actionPrice * goodsNumber }}</text>
-						<text class="stock">库存:{{ goodsStore }}件</text>
-						<view class="selected" v-if="specList != ''">
-							已选:
-							<text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem }}</text>
-						</view>
-					</view>
-				</view>
-				<view v-for="(item, index) in specList" :key="index" class="attr-list">
-					<text>{{ item.attr_name }}</text>
-					<view class="item-list">
-						<text
-							v-for="(childItem, childIndex) in item.attr_value"
-							:key="childIndex"
-							class="tit"
-							:class="{ selected: childItem.check }"
-							@click="selectSpec(childItem, item, index)"
-						>
-							{{ childItem.attr }}
-						</text>
-					</view>
-				</view>
-				<!-- <view class="attr-list">
-					<text>购买数量</text>
-					<view class="item-list">
-						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
-					</view>
-				</view> -->
-				<button class="btn" @click.stop="buy" v-show="buys_show">完成</button>
-				<button class="btn" style="background-color: #999999;" v-show="buys_shows">售罄</button>
-			</view>
-		</view>
-		<!-- 返回按钮 -->
-		<return-button></return-button>
-
-	</view>
-</template>
-
-<script>
-	import { nowPinkLst } from '@/api/order.js';
-	import {
-		goodsDetail,
-		cartAdd,
-		collectAdd,
-		collectDel,
-		seckillGoods,
-		groupGoods
-	} from '@/api/product.js';
-	import {
-		mapState
-	} from 'vuex';
-	import store from '@/store/index.js';
-	import {
-		saveUrl
-	} from '@/utils/loginUtils.js';
-	import {
-		timeComputed
-	} from '@/utils/rocessor.js';
-	// #ifdef H5
-	import {
-		weixindata
-	} from '@/utils/wxAuthorized';
-	// #endif
-	// 头部轮播图
-	import topSwiper from '../common/topSwiper.vue';
-	// 拼团倒计时
-	import groupTime from '../common/groupTime.vue';
-	// 拼团标题
-	import groupContent from '../common/groupContent.vue';
-	// 拼团到货时间及优惠
-	import discounts from '../common/discounts.vue';
-	// 规格信息
-	import freshDetail from '../common/freshDetail.vue';
-	// 图文详情
-	import contentText from '../common/contentText.vue';
-	// 底部按钮
-	import groupBottom from '../common/groupBottom.vue';
-	// 返回按钮
-	import returnButton from '@/components/returnButton.vue';
-	// 大家还在拼
-	import NowList from '@/components/newlist/nowList.vue';
-	export default {
-		components: {
-			topSwiper,
-			groupTime,
-			groupContent,
-			discounts,
-			freshDetail,
-			contentText,
-			groupBottom,
-			returnButton,
-			NowList
-		},
-		data() {
-			return {
-				goodsStore: 0, //选中库存
-				specList: [],
-				buys_show: true,
-				buys_shows: false,
-				specSelected: [], //选中的分类
-				reply: '', //评论
-				list: '', //商品详情的数据
-				type: 1, //默认支付方式add为
-				goodsNumber: 1, //购买数量
-				goodsid: '', //商品id
-				description: '', //商品描述
-				goodsObjact: {}, //保存商品数据
-				//图片循环
-				imgList: [],
-				// 对比对象
-				actionPrice: 0, //默认选中商品价格
-				actionImage: '', //默认选中图片
-				good_list: '', //猜你喜欢列表
-				goodsNumberMax: 0, //最大可购买数量
-				many:1,//1是单规格  2是多规格
-				// 倒计时数据保存
-				seckillObj: {
-					stopTime: 0, //结束时间
-					stop: false, //是否结束
-					stopTimeH: 0, //小时
-					stopTimeM: 0, //分钟
-					stopTimeS: 0, //秒钟
-					stopTimeD: 0, //天
-					upTime: 0 //更新组件内部组件用
-				},
-				// 拼团数据保存
-				pink: {
-					id: '', //拼团编号
-					uid: '', //用户编号
-					people: '', //拼团人数
-					price: '', //拼团价格
-					stop_time: '', //拼团结束时间
-					nickname: '', //团长昵称
-					avatar: '', //团长头像
-					count: '', //拼团剩余人数
-					h: '', //时
-					i: '', //分
-					s: '' //秒
-				},
-				userInfo: '',
-				pinkTlist: '', //拼团数据
-				more: true, //查看更多按钮
-				showlist: [],
-				pink_type: 1, //拼团类别
-				show: false, // 是否显示底部按钮
-				recommendedlist:[],// 大家都在拼
-				specClass: 'none' //显示隐藏弹窗
-			};
-
-		},
-		filters: {
-			parseIntTo(percent) {
-				percent = +percent * 100;
-				if (percent % 1 === 0) {
-					return percent;
-				} else {
-					percent = percent.toFixed(1);
-					return percent;
-				}
-			}
-		},
-		async onLoad(options) {
-			let obj = this;
-			obj.userInfo = uni.getStorageSync('userInfo');
-			//保存商品id
-			this.goodsid = options.id;
-			if (options.show) {
-				this.show = options.show;
-			}
-			console.log(this.show, 5656)
-			// 判断有无人邀请
-			if (options.spread) {
-				// 存储邀请人
-				uni.setStorageSync('spread', options.spread);
-			}
-			saveUrl();
-			// 家在数据
-			this.groupGoods();
-			return;
-			
-			// 注册邀请信息
-			// #ifdef H5
-			let bool = uni.getStorageSync('weichatBrowser') || '';
-			if (bool) {
-				weixindata();
-			}
-			// #endif
-		},
-		computed: {
-			...mapState(['weichatObj', 'baseURL', 'urlFile'])
-		},
-		// 分享
-		// onShareAppMessage(options) {
-		// 	// 设置菜单中的转发按钮触发转发事件时的转发内容
-		// 	let pages = getCurrentPages(); //获取加载的页面
-		// 	let currentPage = pages[pages.length - 1]; //获取当前页面的对象
-		// 	let url = currentPage.route; //当前页面url
-		// 	let item = currentPage.options; //如果要获取url中所带的参数可以查看options
-		// 	let shareObj = {
-		// 		title: this.goodsObjact.title + '   价格:' + this.goodsObjact.price, // 默认是小程序的名称(可以写slogan等)
-		// 		path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
-		// 		imageUrl: this.goodsObjact.image,
-		// 		success: function(res) {
-		// 			// 转发成功之后的回调
-		// 			if (res.errMsg == 'shareAppMessage:ok') {}
-		// 		},
-		// 		fail: function() {
-		// 			// 转发失败之后的回调
-		// 			if (res.errMsg == 'shareAppMessage:fail cancel') {
-		// 				// 用户取消转发
-		// 			} else if (res.errMsg == 'shareAppMessage:fail') {
-		// 				// 转发失败,其中 detail message 为详细失败信息
-		// 			}
-		// 		}
-		// 	};
-		// 	return shareObj;
-		// },
-		methods: {
-			// 跳转详细规则
-			ToRule() {
-				if( this.pink_type == 1 ) {
-					// AA团
-					uni.navigateTo({
-						url: '/pages/rule/AArule'
-					})
-				} else {
-					// 达人团
-					uni.navigateTo({
-						url: '/pages/rule/DaRrule'
-					})
-				}
-			},
-			//选择规格
-			selectSpec(item, arr, ind) {
-				arr.attr_value.forEach(function(e) {
-					e.check = false;
-				});
-				item.check = true;
-				let obj = this;
-				obj.specSelected[ind] = item.attr;
-				let str = obj.specSelected.join(',');
-				console.log(obj.productValue[str],116)
-				if (obj.productValue[str]) {
-					obj.buys_show = true;
-					obj.buys_shows = false;
-					obj.actionPrice = obj.productValue[str].price;
-					obj.goodsNumberMax = obj.productValue[str].stock;
-					obj.actionImage = obj.productValue[str].image;
-					obj.uniqueId = obj.productValue[str].unique;
-					obj.goodsStore = obj.productValue[str].stock;
-					// if (obj.goodsType == 2) {
-					// 	obj.goodsStore = obj.productValue[str].quota;
-					// } else {
-					// 	obj.goodsStore = obj.productValue[str].product_stock;
-					// }
-				} else {
-					(obj.buys_show = false), (obj.buys_shows = true);
-				}
-			},
-			// 立即购买
-			buy(item) {
-				let obj = this;
-				/* obj.toggleSpec();
-				this.specClass='show',
-				console.log(obj.list.productValue.默认.unique)
-				console.log(obj.chooseGoodsNumber,'chooseGoodsNumber')
-				return */
-				// 创建传值对象
-				console.log(obj.list.productValue);
-				console.log(obj.list);
-				let data = {
-					// cartNum: obj.goodsNumber, //商品数量
-					cartNum: obj.chooseGoodsNumber, //商品数量
-					uniqueId: obj.uniqueId, //商品标签
-					new: 1, //商品是否新增加到购物车1为不加入0为加入
-					mer_id: obj.shopId,
-					combinationId: obj.goodsid, //拼团编号
-					productId: obj.goodsObjact.product_id, //商品编号
-				};
-				this.specClass = 'none';
-				cartAdd(data)
-					.then(function(e) {
-						let da = e.data;
-						console.log(e);
-						if (obj.type == 1) {
-							// 跳转到支付页
-							uni.navigateTo({
-								url: '/pages/order/createOrder?id=' + da.cartId + '&goodsType=' + obj.goodsType
-							});
-						}
-						if (obj.type == 2) {
-							obj.$api.msg('成功加入购物车');
-							obj.toggleSpec();
-						}
-					})
-					.catch(e => {
-						console.log(e);
-					}); 
-			},
-			// 去开团
-			ToKaiTuan(item) {
-				let id = item.id;
-				uni.navigateTo({
-					url: '/pages/product/productGroup?id=' + id
-				});
-			},
-			
-			// 跳转页面
-			navTo(url) {
-				uni.navigateTo({
-					url
-				});
-			},
-			// 查看更多
-			clickMore() {
-				this.showlist = this.pinkTlist;
-				console.log(this.showlist, 22);
-				this.more = false;
-			},
-			//去拼团
-			groupBooking(item) {
-				uni.navigateTo({
-					url: '/pages/groupBooking/groupdetails?id=' + item
-				});
-			},
-			// 获取拼团商品详情
-			groupGoods() {
-				let obj = this;
-				
-				// // 大家还在拼
-				// nowPinkLst({}).then(({data}) => {
-				// 	this.recommendedlist = data;
-				// })
-				
-				groupGoods({}, this.goodsid).then(function({
-					data
-				}) {
-					let goods = data.storeInfo;
-					obj.goodsObjact = goods;
-					console.log(obj.goodsObjact, 88)
-					console.log(Array.isArray(data.productValue), 99)
-					if(Array.isArray(data.productValue) != true){
-						obj.many = 2;
-						obj.specList = data.productAttr;//保存产品属性
-						obj.productValue = data.productValue; //保存属性值
-						obj.specSelected = []; //初始化默认选择对象
-						for (let i = 0; i < obj.specList.length; i++) {
-							// 设置默认数据
-							let attrValue = obj.specList[i].attr_value[0];
-							attrValue.check = true;
-							obj.specSelected.push(attrValue.attr);
-						}
-						let str = obj.specSelected.join(',');
-						console.log(str,'str')
-						// 设置默认值
-						
-						obj.actionPrice = obj.productValue[str].price;
-						obj.goodsNumberMax = obj.productValue[str].stock;
-						obj.actionImage = obj.productValue[str].image;
-						obj.uniqueId = obj.productValue[str].unique;
-						obj.goodsStore = obj.productValue[str].quota;
-					}else{
-						obj.many = 1;
-					}
-					console.log(obj.many,'obj.many')
-					if (obj.goodsObjact.description != null) {
-						obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
-					}
-					obj.imgList = goods.images; //保存轮播图
-					obj.actionPrice = goods.price; //保存默认选中商品价格
-					obj.actionImage = goods.image_base; //保存默认选中商品图片
-					obj.goodsNumberMax = 1; //保存默认选中最大可购买商品数量
-					if (obj.goodsObjact.pink_type == 'AA团') {
-						obj.pink_type = 1;
-					} else {
-						obj.pink_type = 2;
-					}
-					obj.pinkTlist = data.pink;
-					obj.showlist = obj.pinkTlist.slice(0, 2);
-					if (obj.pinkTlist.length <= 2) {
-						obj.more = false;
-					}
-
-					// 保存结束时间
-					obj.seckillObj.stopTime = goods.stop_time * 1000;
-					// 获取当前时间
-					let acitonTime = new Date();
-					// 判断当前时间是否大于结束时间
-					if (acitonTime.getTime() > obj.seckillObj.stopTime) {
-						// 当前秒杀时间已经结束
-						obj.seckillObj.stop = true;
-					} else {
-						// 计算倒计时
-						let time = timeComputed(obj.seckillObj.stopTime)
-						// 倒计时数据保存
-						obj.seckillObj = {
-							stopTime: goods.stop_time * 1000, //结束时间
-							stop: false, //是否结束
-							stopTimeD: time.day, //天
-							stopTimeH: time.hours, //小时
-							stopTimeM: time.minutes, //分钟
-							stopTimeS: time.seconds, //秒钟
-							upTime: (new Date()).getTime()
-						}
-					}
-				});
-			},
-			// 立即购买
-			openPinkT(item) {
-				let obj = this;
-				obj.type = item;
-				// 创建传值对象
-				let data = {
-					cartNum: obj.goodsNumber, //商品数量
-					new: 1, //商品是否新增加到购物车1为不加入0为加入
-					combinationId: obj.goodsid,
-					productId: obj.goodsObjact.product_id
-				};
-				cartAdd(data)
-					.then(function(e) {
-						let da = e.data;
-						if (obj.type == 1) {
-							// 跳转到支付页
-							uni.navigateTo({
-								url: '/pages/order/createOrder?id=' + da.cartId+'&goodsType=2'
-							});
-						}
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-			specOPne(item) {
-				let obj = this;
-				obj.specClass = 'show';
-				console.log(obj.specClass,'this.specClass')
-			},
-			//规格弹窗开关
-			toggleSpec(str) {
-				if (this.specClass === 'show') {
-					this.specClass = 'hide';
-					setTimeout(() => {
-						this.specClass = 'none';
-					}, 250);
-				} else if (this.specClass === 'none') {
-					this.specClass = 'show';
-				}
-				// 判断是否为数字
-				if (typeof str == 'number') {
-					// 保存当前购买类型
-					this.type = str;
-				}
-			},
-			// 阻止触发上级事件
-			stopPrevent() {}
-		}
-	};
-</script>
-
-<style lang="scss">
-	/*  弹出层 */
-	.popup {
-		position: fixed;
-		left: 0;
-		top: 0;
-		right: 0;
-		bottom: 0;
-		z-index: 99;
-		&.show {
-			display: block;
-	
-			.mask {
-				animation: showPopup 0.2s linear both;
-			}
-	
-			.layer {
-				animation: showLayer 0.2s linear both;
-			}
-		}
-	
-		&.hide {
-			.mask {
-				animation: hidePopup 0.2s linear both;
-			}
-	
-			.layer {
-				animation: hideLayer 0.2s linear both;
-			}
-		}
-	
-		&.none {
-			display: none;
-		}
-	
-		.mask {
-			position: fixed;
-			top: 0;
-			width: 100%;
-			height: 100%;
-			z-index: 1;
-			background-color: rgba(0, 0, 0, 0.4);
-		}
-	
-		.layer {
-			position: fixed;
-			z-index: 99;
-			bottom: 0;
-			width: 100%;
-			min-height: 35vh;
-			border-radius: 10rpx 10rpx 0 0;
-			background-color: #fff;
-	
-			.btn {
-				height: 66rpx;
-				line-height: 66rpx;
-				border-radius: 100rpx;
-				// background: $uni-color-primary;
-        background-color: #901b21;
-				font-size: $font-base + 2rpx;
-				color: #fff;
-				margin: 30rpx auto 20rpx;
-			}
-		}
-	
-		@keyframes showPopup {
-			0% {
-				opacity: 0;
-			}
-	
-			100% {
-				opacity: 1;
-			}
-		}
-	
-		@keyframes hidePopup {
-			0% {
-				opacity: 1;
-			}
-	
-			100% {
-				opacity: 0;
-			}
-		}
-	
-		@keyframes showLayer {
-			0% {
-				transform: translateY(120%);
-			}
-	
-			100% {
-				transform: translateY(0%);
-			}
-		}
-	
-		@keyframes hideLayer {
-			0% {
-				transform: translateY(0);
-			}
-	
-			100% {
-				transform: translateY(120%);
-			}
-		}
-	}
-	/* 规格选择弹窗 */
-	.attr-content {
-		padding: 25rpx 30rpx;
-	
-		.a-t {
-			display: flex;
-	
-			image {
-				width: 170rpx;
-				height: 170rpx;
-				flex-shrink: 0;
-				border-radius: 8rpx;
-			}
-	
-			.right {
-				display: flex;
-				flex-direction: column;
-				padding-left: 24rpx;
-				font-size: $font-sm + 2rpx;
-				color: $font-color-base;
-				line-height: 42rpx;
-				width: 75%;
-	
-				.price {
-					font-size: $font-lg;
-					color: #901b21;
-					margin: 10rpx 0rpx;
-				}
-	
-				.name {
-					font-size: 32rpx;
-					color: $font-color-dark;
-					height: 50rpx;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					white-space: nowrap;
-					display: block;
-				}
-	
-				.selected-text {
-					margin-right: 10rpx;
-				}
-			}
-		}
-	
-		.attr-list {
-			display: flex;
-			flex-direction: column;
-			font-size: $font-base + 2rpx;
-			color: $font-color-base;
-			padding-top: 30rpx;
-			padding-left: 10rpx;
-		}
-	
-		.item-list {
-			padding: 20rpx 0 0;
-			display: flex;
-			flex-wrap: wrap;
-	
-			text {
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				background: #eee;
-				margin-right: 20rpx;
-				margin-bottom: 20rpx;
-				border-radius: 100rpx;
-				min-width: 60rpx;
-				height: 60rpx;
-				padding: 0 20rpx;
-				font-size: $font-base;
-				color: $font-color-dark;
-			}
-	
-			.selected {
-				// background: #ddffdf;
-        background-color: rgba($color: #901b21, $alpha: 0.2);
-				color: #901b21;
-			}
-		}
-	}
-	
-	//默认商品底部高度
-	.goodsBottom {
-		height: 160rpx;
-	}
-
-	page {
-		background: #f0f0f0;
-	}
-
-	//秒杀、拼团底部高度
-	.contentBottomHeight {
-		height: 110rpx;
-		// background-color: #FFFFFF;
-	}
-
-	//默认商品底部高度
-	.goodsBottom {
-		height: 160rpx;
-	}
-
-	/deep/ .iconenter {
-		font-size: $font-base + 2rpx;
-		color: #888;
-	}
-
-	/deep/ .con_image {
-		width: 130rpx;
-		height: 130rpx;
-		display: inline-block;
-		padding: 15rpx;
-
-		image {
-			width: 100%;
-			height: 100%;
-		}
-	}
-
-	/* 商品详情中限制图片大小 */
-	/deep/ .rich-img {
-		width: 100% !important;
-		height: auto;
-	}
-
-	.pinklistbox {
-		background: #ffffff;
-		margin-top: 25rpx;
-		overflow: hidden;
-	}
-
-	.pink_num {
-		background: -webkit-linear-gradient(left, #fdf5f6, #fbebf6);
-		padding: 15rpx 25rpx;
-		font-size: 26rpx;
-		color: #dd524d;
-	}
-
-	.pint {
-		background: -webkit-linear-gradient(left, #ff1f4f, #ff0409);
-		padding: 10rpx 25rpx;
-		color: #ffffff;
-		font-size: 24rpx;
-		border-radius: 25rpx;
-
-		.iconenter {
-			font-size: 15px;
-			color: #ffffff;
-		}
-	}
-
-	.pinklist {
-		padding: 0rpx 25rpx;
-		padding-top: 45rpx !important;
-	}
-
-	.pinklist_list {
-		margin-bottom: 10rpx;
-	}
-
-	.pink_img {
-		width: 100rpx;
-		height: 100rpx;
-
-		image {
-			width: 100%;
-			height: 100%;
-			border-radius: 100%;
-		}
-	}
-
-	.pink_people {
-		font-size: 28rpx;
-
-		text {
-			color: #dd524d;
-		}
-	}
-
-	.pink_time {
-		font-size: 26rpx;
-		color: #909399;
-	}
-
-	.pink_name {
-		width: 200rpx;
-		overflow: hidden;
-		white-space: nowrap;
-		text-overflow: ellipsis;
-		padding-left: 10rpx;
-		// background: #FC2A3F;
-		// height: 50rpx;
-	}
-
-	.More {
-		width: 100%;
-		line-height: 2;
-		background-color: #fc2a3f;
-		font-size: $font-lg;
-		margin: 0 auto;
-		text-align: center;
-		color: #ffffff;
-		// border-radius: 50rpx;
-	}
-
-	.ping-plan {
-		background-color: #FFFFFF;
-		padding: 25rpx 35rpx;
-		border-top: 15rpx solid #F3F3F4;
-		border-bottom: 15rpx solid #F3F3F4;
-	}
-
-	.participate-7 {
-		color: #000000;
-		font-size: 29rpx;
-		font-weight: 500;
-		padding-bottom: 25rpx;
-
-		.participate-7-1 {
-			.word {
-				color: #ff0a1a;
-			}
-
-			.word1 {
-				font-size: 25rpx;
-				color: #989aa0;
-			}
-
-			image {
-				width: 10rpx;
-				height: 20rpx;
-				margin-left: 15rpx;
-			}
-		}
-	}
-
-	//左右顶格加上下居中
-	.flex-between-center {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-	}
-
-	.participate-8 {
-		image {
-			width: 26rpx;
-			height: 12rpx;
-		}
-
-		.participate-8-1 {
-			text-align: center;
-
-			.img1 {
-				width: 43rpx;
-				height: 50rpx;
-			}
-
-			.img2 {
-				width: 43rpx;
-				height: 42rpx;
-			}
-
-			.img3 {
-				width: 60rpx;
-				height: 46rpx;
-			}
-
-			.word-1 {
-				font-size: 23rpx;
-				color: #000000;
-				line-height: 34rpx;
-			}
-
-			.word-2 {
-				font-size: 21rpx;
-				color: #91949B;
-				line-height: 34rpx;
-			}
-		}
-	}
-  .jg {
-    background-color: #fff;
-    height: 60.5rpx;
-    position: relative;
-    top: -60.5rpx;
-    margin-bottom: -60.5rpx;
-  }
+<template>
+	<view class="container">
+		<!-- 轮播图 -->
+		<top-swiper :imgList="imgList"></top-swiper>
+		<!-- 拼团倒计时 -->
+		<group-time :goodsObjact="goodsObjact" :key='goodsObjact.product_price' :seckillObj="seckillObj" :pinkingNum="pinkingNum"></group-time>
+		<view class="jg"></view>
+		<!-- 拼团标题 -->
+		<group-content :goodsObjact="goodsObjact"></group-content>
+		<view class="have-know">拼团须知<text>开团/参团-邀请好友-满员发货</text></view>
+		<view class="way">开团玩法<text>开团玩法详细介绍开团玩法详细介绍开团 玩法详细介绍开团玩法详细介绍开团玩法 详细介绍开团玩法详细介绍</text></view>
+		<!-- 拼团到货时间及优惠 -->
+		<!-- <discounts :mark='goodsObjact.mark' :Info="goodsObjact.info" @clickCoupon="Getcoupon" :showCoupon='false'> -->
+		</discounts>
+		<!-- 规格信息 -->
+		<!-- <fresh-detail :goodsObjact="goodsObjact"></fresh-detail> -->
+		<!-- <view class="uni-padding-wrap pinklistbox" v-if="pinkTlist.length > 0">
+			<view class="pinklist">
+				<view v-for="(ls, ind) in showlist">
+					<view class="flex pinklist_list">
+						<view class="pink_img"><image :src="ls.avatar"></image></view>
+						<view class="pink_name">{{ ls.nickname }}</view>
+						<view class="pink_tpl">
+							<view class="pink_people">
+								还差
+								<text>{{ ls.count }}</text>
+								人拼团
+							</view>
+						</view>
+						<view class="pint" @click="groupBooking(ls.id)">
+							去拼团
+							<text class="iconfont iconenter"></text>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="More" @click="clickMore" v-if="more">查看更多</view>
+		</view> -->
+		<!-- <view class="ping-plan">
+			<view class="participate-7 flex-between-center">
+				<view class="participate-7-1">
+					<text class="word" v-if="pink_type == 1">AA团</text>
+					<text class="word" v-else>达人团</text>
+					<text>玩法</text>
+				</view>
+				<view class="participate-7-1" @click="ToRule()">
+					<text class="word1">详细规则</text>
+					<image src="../../../static/img/img74.png"></image>
+				</view>
+			</view>
+			<view class="participate-8 flex-between-center">
+				<view class="participate-8-1">
+					<image class="img1" src="https://shicai.liuniu946.com/img/img76.png"></image>
+					<view class="word-1">开团/参团</view>
+					<view class="word-2">拼团享低价</view>
+				</view>
+				<image src="https://shicai.liuniu946.com/img/img75.png"></image>
+				<view class="participate-8-1">
+					<image class="img2" src="https://shicai.liuniu946.com/img/img77.png"></image>
+					<view class="word-1">邀请邻里参团</view>
+					<view class="word-2">分享优惠多</view>
+				</view>
+				<image src="https://shicai.liuniu946.com/img/img75.png"></image>
+				<view class="participate-8-1">
+					<image class="img3" src="https://shicai.liuniu946.com/img/img78.png"></image>
+					<view class="word-1">人满发货</view>
+					<view class="word-2">人不满退款</view>
+				</view>
+			</view>
+		</view> -->
+
+		<!-- 大家都在拼 达人团显示 -->
+		<!-- <now-list v-if="pink_type == 2" :recommendedlist="recommendedlist"></now-list> -->
+
+
+		<!-- 图文详情 -->
+		<content-text :description="description"></content-text>
+
+		<!-- 底部高度撑开 -->
+		<view class="contentBottomHeight"></view>
+		<!-- 底部操作菜单 -->
+		<view>
+			<view>
+				<group-bottom :peoplePrize='goodsObjact.people_prize' @buy="openPinkT" @specOPne="specOPne"
+					:seckillObj="seckillObj" :many='many'></group-bottom>
+			</view>
+		</view>
+		<!-- 规格-模态层弹窗 -->
+		<view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec()">
+			<!-- 遮罩层 -->
+			<view class="mask"></view>
+			<view class="layer attr-content" @click.stop="stopPrevent">
+				<view class="a-t">
+					<image :src="actionImage"></image>
+					<view class="right">
+						<text class="name">{{ goodsObjact.store_name }}</text>
+						<text class="price">¥{{ actionPrice * goodsNumber }}</text>
+						<text class="stock">库存:{{ goodsStore }}件</text>
+						<view class="selected" v-if="specList != ''">
+							已选:
+							<text class="selected-text" v-for="(sItem, sIndex) in specSelected"
+								:key="sIndex">{{ sItem }}</text>
+						</view>
+					</view>
+				</view>
+				<view v-for="(item, index) in specList" :key="index" class="attr-list">
+					<text>{{ item.attr_name }}</text>
+					<view class="item-list">
+						<text v-for="(childItem, childIndex) in item.attr_value" :key="childIndex" class="tit"
+							:class="{ selected: childItem.check }" @click="selectSpec(childItem, item, index)">
+							{{ childItem.attr }}
+						</text>
+					</view>
+				</view>
+				<!-- <view class="attr-list">
+					<text>购买数量</text>
+					<view class="item-list">
+						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
+					</view>
+				</view> -->
+				<button class="btn" @click.stop="buy" v-show="buys_show">完成</button>
+				<button class="btn" style="background-color: #999999;" v-show="buys_shows">售罄</button>
+			</view>
+		</view>
+		<!-- 返回按钮 -->
+		<!-- <return-button></return-button> -->
+
+	</view>
+</template>
+
+<script>
+	import {
+		nowPinkLst
+	} from '@/api/order.js';
+	import {
+		goodsDetail,
+		cartAdd,
+		collectAdd,
+		collectDel,
+		seckillGoods,
+		groupGoods
+	} from '@/api/product.js';
+	import {
+		mapState
+	} from 'vuex';
+	import store from '@/store/index.js';
+	import {
+		saveUrl
+	} from '@/utils/loginUtils.js';
+	import {
+		timeComputed
+	} from '@/utils/rocessor.js';
+	// #ifdef H5
+	import {
+		weixindata
+	} from '@/utils/wxAuthorized';
+	// #endif
+	// 头部轮播图
+	import topSwiper from '../common/topSwiper.vue';
+	// 拼团倒计时
+	import groupTime from '../common/groupTime.vue';
+	// 拼团标题
+	import groupContent from '../common/groupContent.vue';
+	// 拼团到货时间及优惠
+	import discounts from '../common/discounts.vue';
+	// 规格信息
+	import freshDetail from '../common/freshDetail.vue';
+	// 图文详情
+	import contentText from '../common/contentText.vue';
+	// 底部按钮
+	import groupBottom from '../common/groupBottom.vue';
+	// 返回按钮
+	import returnButton from '@/components/returnButton.vue';
+	// 大家还在拼
+	import NowList from '@/components/newlist/nowList.vue';
+	export default {
+		components: {
+			topSwiper,
+			groupTime,
+			groupContent,
+			discounts,
+			freshDetail,
+			contentText,
+			groupBottom,
+			returnButton,
+			NowList
+		},
+		data() {
+			return {
+				goodsStore: 0, //选中库存
+				specList: [],
+				buys_show: true,
+				buys_shows: false,
+				specSelected: [], //选中的分类
+				reply: '', //评论
+				list: '', //商品详情的数据
+				type: 1, //默认支付方式add为
+				goodsNumber: 1, //购买数量
+				goodsid: '', //商品id
+				description: '', //商品描述
+				goodsObjact: {}, //保存商品数据
+				//图片循环
+				imgList: [],
+				// 对比对象
+				actionPrice: 0, //默认选中商品价格
+				actionImage: '', //默认选中图片
+				good_list: '', //猜你喜欢列表
+				goodsNumberMax: 0, //最大可购买数量
+				many: 1, //1是单规格  2是多规格
+				// 倒计时数据保存
+				seckillObj: {
+					stopTime: 0, //结束时间
+					stop: false, //是否结束
+					stopTimeH: 0, //小时
+					stopTimeM: 0, //分钟
+					stopTimeS: 0, //秒钟
+					stopTimeD: 0, //天
+					upTime: 0 //更新组件内部组件用
+				},
+				// 拼团数据保存
+				pink: {
+					id: '', //拼团编号
+					uid: '', //用户编号
+					people: '', //拼团人数
+					price: '', //拼团价格
+					stop_time: '', //拼团结束时间
+					nickname: '', //团长昵称
+					avatar: '', //团长头像
+					count: '', //拼团剩余人数
+					h: '', //时
+					i: '', //分
+					s: '' //秒
+				},
+				userInfo: '',
+				pinkTlist: '', //拼团数据
+				more: true, //查看更多按钮
+				showlist: [],
+				pink_type: 1, //拼团类别
+				show: false, // 是否显示底部按钮
+				recommendedlist: [], // 大家都在拼
+				specClass: 'none', //显示隐藏弹窗
+			};
+
+		},
+		filters: {
+			parseIntTo(percent) {
+				percent = +percent * 100;
+				if (percent % 1 === 0) {
+					return percent;
+				} else {
+					percent = percent.toFixed(1);
+					return percent;
+				}
+			}
+		},
+		async onLoad(options) {
+			let obj = this;
+			obj.userInfo = uni.getStorageSync('userInfo');
+			//保存商品id
+			this.goodsid = options.id;
+			if (options.show) {
+				this.show = options.show;
+			}
+			console.log(this.show, 5656)
+			// 判断有无人邀请
+			if (options.spread) {
+				// 存储邀请人
+				uni.setStorageSync('spread', options.spread);
+			}
+			saveUrl();
+			// 家在数据
+			this.groupGoods();
+			return;
+
+			// 注册邀请信息
+			// #ifdef H5
+			let bool = uni.getStorageSync('weichatBrowser') || '';
+			if (bool) {
+				weixindata();
+			}
+			// #endif
+		},
+		computed: {
+			...mapState(['weichatObj', 'baseURL', 'urlFile']),
+			pinkingNum() {
+				return this.people*1 - this.count*1 || 0
+			}
+		},
+		// 分享
+		// onShareAppMessage(options) {
+		// 	// 设置菜单中的转发按钮触发转发事件时的转发内容
+		// 	let pages = getCurrentPages(); //获取加载的页面
+		// 	let currentPage = pages[pages.length - 1]; //获取当前页面的对象
+		// 	let url = currentPage.route; //当前页面url
+		// 	let item = currentPage.options; //如果要获取url中所带的参数可以查看options
+		// 	let shareObj = {
+		// 		title: this.goodsObjact.title + '   价格:' + this.goodsObjact.price, // 默认是小程序的名称(可以写slogan等)
+		// 		path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
+		// 		imageUrl: this.goodsObjact.image,
+		// 		success: function(res) {
+		// 			// 转发成功之后的回调
+		// 			if (res.errMsg == 'shareAppMessage:ok') {}
+		// 		},
+		// 		fail: function() {
+		// 			// 转发失败之后的回调
+		// 			if (res.errMsg == 'shareAppMessage:fail cancel') {
+		// 				// 用户取消转发
+		// 			} else if (res.errMsg == 'shareAppMessage:fail') {
+		// 				// 转发失败,其中 detail message 为详细失败信息
+		// 			}
+		// 		}
+		// 	};
+		// 	return shareObj;
+		// },
+		methods: {
+			// 跳转详细规则
+			ToRule() {
+				if (this.pink_type == 1) {
+					// AA团
+					uni.navigateTo({
+						url: '/pages/rule/AArule'
+					})
+				} else {
+					// 达人团
+					uni.navigateTo({
+						url: '/pages/rule/DaRrule'
+					})
+				}
+			},
+			//选择规格
+			selectSpec(item, arr, ind) {
+				arr.attr_value.forEach(function(e) {
+					e.check = false;
+				});
+				item.check = true;
+				let obj = this;
+				obj.specSelected[ind] = item.attr;
+				let str = obj.specSelected.join(',');
+				console.log(obj.productValue[str], 116)
+				if (obj.productValue[str]) {
+					obj.buys_show = true;
+					obj.buys_shows = false;
+					obj.actionPrice = obj.productValue[str].price;
+					obj.goodsNumberMax = obj.productValue[str].stock;
+					obj.actionImage = obj.productValue[str].image;
+					obj.uniqueId = obj.productValue[str].unique;
+					obj.goodsStore = obj.productValue[str].stock;
+					// if (obj.goodsType == 2) {
+					// 	obj.goodsStore = obj.productValue[str].quota;
+					// } else {
+					// 	obj.goodsStore = obj.productValue[str].product_stock;
+					// }
+				} else {
+					(obj.buys_show = false), (obj.buys_shows = true);
+				}
+			},
+			// 立即购买
+			buy(item) {
+				let obj = this;
+				/* obj.toggleSpec();
+				this.specClass='show',
+				console.log(obj.list.productValue.默认.unique)
+				console.log(obj.chooseGoodsNumber,'chooseGoodsNumber')
+				return */
+				// 创建传值对象
+				console.log(obj.list.productValue);
+				console.log(obj.list);
+				let data = {
+					// cartNum: obj.goodsNumber, //商品数量
+					cartNum: obj.chooseGoodsNumber, //商品数量
+					uniqueId: obj.uniqueId, //商品标签
+					new: 1, //商品是否新增加到购物车1为不加入0为加入
+					mer_id: obj.shopId,
+					combinationId: obj.goodsid, //拼团编号
+					productId: obj.goodsObjact.product_id, //商品编号
+				};
+				this.specClass = 'none';
+				cartAdd(data)
+					.then(function(e) {
+						let da = e.data;
+						console.log(e);
+						if (obj.type == 1) {
+							// 跳转到支付页
+							uni.navigateTo({
+								url: '/pages/order/createOrder?id=' + da.cartId + '&goodsType=' + obj.goodsType
+							});
+						}
+						if (obj.type == 2) {
+							obj.$api.msg('成功加入购物车');
+							obj.toggleSpec();
+						}
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			// 去开团
+			ToKaiTuan(item) {
+				let id = item.id;
+				uni.navigateTo({
+					url: '/pages/product/productGroup?id=' + id
+				});
+			},
+
+			// 跳转页面
+			navTo(url) {
+				uni.navigateTo({
+					url
+				});
+			},
+			// 查看更多
+			clickMore() {
+				this.showlist = this.pinkTlist;
+				console.log(this.showlist, 22);
+				this.more = false;
+			},
+			//去拼团
+			groupBooking(item) {
+				uni.navigateTo({
+					url: '/pages/groupBooking/groupdetails?id=' + item
+				});
+			},
+			// 获取拼团商品详情
+			groupGoods() {
+				let obj = this;
+
+				// // 大家还在拼
+				// nowPinkLst({}).then(({data}) => {
+				// 	this.recommendedlist = data;
+				// })
+
+				groupGoods({}, this.goodsid).then(function({
+					data
+				}) {
+					let goods = data.storeInfo;
+					obj.goodsObjact = goods;
+					console.log(obj.goodsObjact, 88)
+					console.log(Array.isArray(data.productValue), 99)
+					if (Array.isArray(data.productValue) != true) {
+						obj.many = 2;
+						obj.specList = data.productAttr; //保存产品属性
+						obj.productValue = data.productValue; //保存属性值
+						obj.specSelected = []; //初始化默认选择对象
+						for (let i = 0; i < obj.specList.length; i++) {
+							// 设置默认数据
+							let attrValue = obj.specList[i].attr_value[0];
+							attrValue.check = true;
+							obj.specSelected.push(attrValue.attr);
+						}
+						let str = obj.specSelected.join(',');
+						console.log(str, 'str')
+						// 设置默认值
+
+						obj.actionPrice = obj.productValue[str].price;
+						obj.goodsNumberMax = obj.productValue[str].stock;
+						obj.actionImage = obj.productValue[str].image;
+						obj.uniqueId = obj.productValue[str].unique;
+						obj.goodsStore = obj.productValue[str].quota;
+					} else {
+						obj.many = 1;
+					}
+					console.log(obj.many, 'obj.many')
+					if (obj.goodsObjact.description != null) {
+						obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
+					}
+					obj.imgList = goods.images; //保存轮播图
+					obj.actionPrice = goods.price; //保存默认选中商品价格
+					obj.actionImage = goods.image_base; //保存默认选中商品图片
+					obj.goodsNumberMax = 1; //保存默认选中最大可购买商品数量
+					if (obj.goodsObjact.pink_type == 'AA团') {
+						obj.pink_type = 1;
+					} else {
+						obj.pink_type = 2;
+					}
+					obj.pinkTlist = data.pink;
+					obj.showlist = obj.pinkTlist.slice(0, 2);
+					if (obj.pinkTlist.length <= 2) {
+						obj.more = false;
+					}
+
+					// 保存结束时间
+					obj.seckillObj.stopTime = goods.stop_time * 1000;
+					// 获取当前时间
+					let acitonTime = new Date();
+					// 判断当前时间是否大于结束时间
+					if (acitonTime.getTime() > obj.seckillObj.stopTime) {
+						// 当前秒杀时间已经结束
+						obj.seckillObj.stop = true;
+					} else {
+						// 计算倒计时
+						let time = timeComputed(obj.seckillObj.stopTime)
+						// 倒计时数据保存
+						obj.seckillObj = {
+							stopTime: goods.stop_time * 1000, //结束时间
+							stop: false, //是否结束
+							stopTimeD: time.day, //天
+							stopTimeH: time.hours, //小时
+							stopTimeM: time.minutes, //分钟
+							stopTimeS: time.seconds, //秒钟
+							upTime: (new Date()).getTime()
+						}
+					}
+				});
+			},
+			// 立即购买
+			openPinkT(item) {
+				let obj = this;
+				obj.type = item;
+				// 创建传值对象
+				let data = {
+					cartNum: obj.goodsNumber, //商品数量
+					new: 1, //商品是否新增加到购物车1为不加入0为加入
+					combinationId: obj.goodsid,
+					productId: obj.goodsObjact.product_id
+				};
+				cartAdd(data)
+					.then(function(e) {
+						let da = e.data;
+						if (obj.type == 1) {
+							// 跳转到支付页
+							uni.navigateTo({
+								url: '/pages/order/createOrder?id=' + da.cartId + '&goodsType=2'
+							});
+						}
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			specOPne(item) {
+				let obj = this;
+				obj.specClass = 'show';
+				console.log(obj.specClass, 'this.specClass')
+			},
+			//规格弹窗开关
+			toggleSpec(str) {
+				if (this.specClass === 'show') {
+					this.specClass = 'hide';
+					setTimeout(() => {
+						this.specClass = 'none';
+					}, 250);
+				} else if (this.specClass === 'none') {
+					this.specClass = 'show';
+				}
+				// 判断是否为数字
+				if (typeof str == 'number') {
+					// 保存当前购买类型
+					this.type = str;
+				}
+			},
+			// 阻止触发上级事件
+			stopPrevent() {}
+		}
+	};
+</script>
+
+<style lang="scss">
+	/*  弹出层 */
+	.popup {
+		position: fixed;
+		left: 0;
+		top: 0;
+		right: 0;
+		bottom: 0;
+		z-index: 99;
+
+		&.show {
+			display: block;
+
+			.mask {
+				animation: showPopup 0.2s linear both;
+			}
+
+			.layer {
+				animation: showLayer 0.2s linear both;
+			}
+		}
+
+		&.hide {
+			.mask {
+				animation: hidePopup 0.2s linear both;
+			}
+
+			.layer {
+				animation: hideLayer 0.2s linear both;
+			}
+		}
+
+		&.none {
+			display: none;
+		}
+
+		.mask {
+			position: fixed;
+			top: 0;
+			width: 100%;
+			height: 100%;
+			z-index: 1;
+			background-color: rgba(0, 0, 0, 0.4);
+		}
+
+		.layer {
+			position: fixed;
+			z-index: 99;
+			bottom: 0;
+			width: 100%;
+			min-height: 35vh;
+			border-radius: 10rpx 10rpx 0 0;
+			background-color: #fff;
+
+			.btn {
+				height: 66rpx;
+				line-height: 66rpx;
+				border-radius: 100rpx;
+				// background: $uni-color-primary;
+				background-color: #901b21;
+				font-size: $font-base + 2rpx;
+				color: #fff;
+				margin: 30rpx auto 20rpx;
+			}
+		}
+
+		@keyframes showPopup {
+			0% {
+				opacity: 0;
+			}
+
+			100% {
+				opacity: 1;
+			}
+		}
+
+		@keyframes hidePopup {
+			0% {
+				opacity: 1;
+			}
+
+			100% {
+				opacity: 0;
+			}
+		}
+
+		@keyframes showLayer {
+			0% {
+				transform: translateY(120%);
+			}
+
+			100% {
+				transform: translateY(0%);
+			}
+		}
+
+		@keyframes hideLayer {
+			0% {
+				transform: translateY(0);
+			}
+
+			100% {
+				transform: translateY(120%);
+			}
+		}
+	}
+
+	/* 规格选择弹窗 */
+	.attr-content {
+		padding: 25rpx 30rpx;
+
+		.a-t {
+			display: flex;
+
+			image {
+				width: 170rpx;
+				height: 170rpx;
+				flex-shrink: 0;
+				border-radius: 8rpx;
+			}
+
+			.right {
+				display: flex;
+				flex-direction: column;
+				padding-left: 24rpx;
+				font-size: $font-sm + 2rpx;
+				color: $font-color-base;
+				line-height: 42rpx;
+				width: 75%;
+
+				.price {
+					font-size: $font-lg;
+					color: #901b21;
+					margin: 10rpx 0rpx;
+				}
+
+				.name {
+					font-size: 32rpx;
+					color: $font-color-dark;
+					height: 50rpx;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+					display: block;
+				}
+
+				.selected-text {
+					margin-right: 10rpx;
+				}
+			}
+		}
+
+		.attr-list {
+			display: flex;
+			flex-direction: column;
+			font-size: $font-base + 2rpx;
+			color: $font-color-base;
+			padding-top: 30rpx;
+			padding-left: 10rpx;
+		}
+
+		.item-list {
+			padding: 20rpx 0 0;
+			display: flex;
+			flex-wrap: wrap;
+
+			text {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				background: #eee;
+				margin-right: 20rpx;
+				margin-bottom: 20rpx;
+				border-radius: 100rpx;
+				min-width: 60rpx;
+				height: 60rpx;
+				padding: 0 20rpx;
+				font-size: $font-base;
+				color: $font-color-dark;
+			}
+
+			.selected {
+				// background: #ddffdf;
+				background-color: rgba($color: #901b21, $alpha: 0.2);
+				color: #901b21;
+			}
+		}
+	}
+
+	//默认商品底部高度
+	.goodsBottom {
+		height: 160rpx;
+	}
+
+	page {
+		background: #f0f0f0;
+	}
+
+	//秒杀、拼团底部高度
+	.contentBottomHeight {
+		height: 110rpx;
+		// background-color: #FFFFFF;
+	}
+
+	//默认商品底部高度
+	.goodsBottom {
+		height: 160rpx;
+	}
+
+	/deep/ .iconenter {
+		font-size: $font-base + 2rpx;
+		color: #888;
+	}
+
+	/deep/ .con_image {
+		width: 130rpx;
+		height: 130rpx;
+		display: inline-block;
+		padding: 15rpx;
+
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	/* 商品详情中限制图片大小 */
+	/deep/ .rich-img {
+		width: 100% !important;
+		height: auto;
+	}
+
+	.pinklistbox {
+		background: #ffffff;
+		margin-top: 25rpx;
+		overflow: hidden;
+	}
+
+	.pink_num {
+		background: -webkit-linear-gradient(left, #fdf5f6, #fbebf6);
+		padding: 15rpx 25rpx;
+		font-size: 26rpx;
+		color: #dd524d;
+	}
+
+	.pint {
+		background: -webkit-linear-gradient(left, #ff1f4f, #ff0409);
+		padding: 10rpx 25rpx;
+		color: #ffffff;
+		font-size: 24rpx;
+		border-radius: 25rpx;
+
+		.iconenter {
+			font-size: 15px;
+			color: #ffffff;
+		}
+	}
+
+	.pinklist {
+		padding: 0rpx 25rpx;
+		padding-top: 45rpx !important;
+	}
+
+	.pinklist_list {
+		margin-bottom: 10rpx;
+	}
+
+	.pink_img {
+		width: 100rpx;
+		height: 100rpx;
+
+		image {
+			width: 100%;
+			height: 100%;
+			border-radius: 100%;
+		}
+	}
+
+	.pink_people {
+		font-size: 28rpx;
+
+		text {
+			color: #dd524d;
+		}
+	}
+
+	.pink_time {
+		font-size: 26rpx;
+		color: #909399;
+	}
+
+	.pink_name {
+		width: 200rpx;
+		overflow: hidden;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		padding-left: 10rpx;
+		// background: #FC2A3F;
+		// height: 50rpx;
+	}
+
+	.More {
+		width: 100%;
+		line-height: 2;
+		background-color: #fc2a3f;
+		font-size: $font-lg;
+		margin: 0 auto;
+		text-align: center;
+		color: #ffffff;
+		// border-radius: 50rpx;
+	}
+
+	.ping-plan {
+		background-color: #FFFFFF;
+		padding: 25rpx 35rpx;
+		border-top: 15rpx solid #F3F3F4;
+		border-bottom: 15rpx solid #F3F3F4;
+	}
+
+	.participate-7 {
+		color: #000000;
+		font-size: 29rpx;
+		font-weight: 500;
+		padding-bottom: 25rpx;
+
+		.participate-7-1 {
+			.word {
+				color: #ff0a1a;
+			}
+
+			.word1 {
+				font-size: 25rpx;
+				color: #989aa0;
+			}
+
+			image {
+				width: 10rpx;
+				height: 20rpx;
+				margin-left: 15rpx;
+			}
+		}
+	}
+
+	//左右顶格加上下居中
+	.flex-between-center {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+	}
+
+	.participate-8 {
+		image {
+			width: 26rpx;
+			height: 12rpx;
+		}
+
+		.participate-8-1 {
+			text-align: center;
+
+			.img1 {
+				width: 43rpx;
+				height: 50rpx;
+			}
+
+			.img2 {
+				width: 43rpx;
+				height: 42rpx;
+			}
+
+			.img3 {
+				width: 60rpx;
+				height: 46rpx;
+			}
+
+			.word-1 {
+				font-size: 23rpx;
+				color: #000000;
+				line-height: 34rpx;
+			}
+
+			.word-2 {
+				font-size: 21rpx;
+				color: #91949B;
+				line-height: 34rpx;
+			}
+		}
+	}
+
+	.jg {
+		background-color: #fff;
+		height: 60.5rpx;
+		position: relative;
+		top: -60.5rpx;
+		margin-bottom: -60.5rpx;
+	}
+	.have-know {
+		height: 100rpx;
+		width: 750rpx;
+		line-height: 1;
+		padding: 35rpx 0 0 30rpx;
+		background-color: #fff;
+		margin: 15rpx 0;
+		font-size: 32rpx;
+		font-weight: bold;
+		color: #3B3B3B;
+		text {
+			display: inline-block;
+			padding-left: 31rpx;
+			font-size: 26rpx;
+			font-weight: 500;
+			color: #8A8A8A;
+		}
+	}
+	.way {
+		padding: 34rpx 97rpx 0 30rpx;
+		background-color: #fff;
+		margin: 15rpx 0;
+		font-size: 32rpx;
+		font-weight: bold;
+		color: #3B3B3B;
+		line-height: 1;
+		text {
+			display: inline-block;
+			padding-left: 186rpx;
+			font-size: 26rpx;
+			font-weight: 500;
+			color: #8A8A8A;
+			// width: 100%;
+			position: relative;
+			top:-34rpx;
+			line-height: 1.5;
+		}
+	}
 </style>

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott