Ver Fonte

Merge branch 'master' of http://git.liuniu946.com/hwq/mnsx

hwq há 2 anos atrás
pai
commit
22d354a3f6

+ 8 - 5
components/empty.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="empty-content">
+	<view class="empty-content" :style="{'background': bgc}">
 		<image class="empty-content-image" :src="setSrc" mode="aspectFit"></image>
 	</view>
 </template>
@@ -10,7 +10,11 @@
 			src: {
 				type: String,
 				default: 'empty'
-			},
+			},
+			bgc: {
+				type: String,
+				default: '$page-color-base'
+			}
 		},
 
 		data() {
@@ -35,15 +39,14 @@
 		align-items: center;
 		justify-content: center;
 		flex-direction: column;
-		
 		position: absolute;
 		left: 0;
 		top: 0;
 		right: 0;
 		bottom: 0;
-		background: $page-color-base;
+		// background: $page-color-base;
 		padding-bottom: 120upx;
-
+		
 		&-image {
 			width: 200upx;
 			height: 200upx;

+ 1 - 38
pages.json

@@ -108,15 +108,6 @@
 				"navigationBarTitleText": "商品列表"
 			}
 		},
-		// #ifndef MP
-		{
-			"path": "pages/product/jmszg",
-			"style": {
-				"enablePullDownRefresh": true,
-				"navigationBarTitleText": "加盟商专供"
-			}
-		},
-		// #endif
 		{
 			"path": "pages/product/search",
 			"style": {
@@ -260,24 +251,7 @@
 		},
 		{
 			"root": "pages/order",
-			"pages": [{
-					"path": "order",
-					"style": {
-						"navigationBarTitleText": "我的订单",
-						"app-plus": {
-							"bounce": "none"
-						}
-					}
-				},
-				{
-					"path": "adminOrder",
-					"style": {
-						"navigationBarTitleText": "我的订单",
-						"app-plus": {
-							"bounce": "none"
-						}
-					}
-				},
+			"pages": [
 
 				{
 					"path": "orderDetail",
@@ -331,17 +305,6 @@
 			]
 		},
 		{
-			"root": "pages/recommend",
-			"pages": [{
-				"path": "recommend",
-				"style": {
-					"navigationBarTitleText": "为你推荐",
-					"app-plus": {
-						"bounce": "none"
-					}
-				}
-			}]
-		}, {
 			"root": "pages/exchange",
 			"pages": [{
 				"path": "exchange",

+ 0 - 495
pages/cart/carts.vue

@@ -1,495 +0,0 @@
-<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="attr">已选: {{item.productInfo.attrInfo.suk }}</text>
-							<text class="price">¥{{ item.productInfo.price }} <text class="oldprice">¥{{item.productInfo.ot_price}}</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: []
-		};
-	},
-	onShow() {
-		// 只有登录时才加载数据
-		this.cartList = []
-		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: {
-		//请求数据
-		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;
-			}
-		}
-		.title {
-			
-			width: 350rpx;
-		}
-		.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>

+ 123 - 17
pages/index/Vipgift.vue

@@ -1,24 +1,130 @@
 <template>
-	<view class="content"></view>
+	<view class="content padding-t-20">
+		<view class="flex item padding-v-20 padding-c-20">
+			<view class="imgbox">
+				<image class="img" src="" mode="scaleToFill"></image>
+			</view>
+			<view class="contentbox padding-l-20 flex">
+				<view class="clamp2 title">
+					法国空运高端82年拉菲陈酿 红葡萄酒...
+				</view>
+				<view class="oldMoneyBox ">
+					<view class="flex-start padding-b-10">
+						<text class="oldMoney">¥200</text>
+						<image class="icon padding-l-10" src="../../static/img/domIcon.png" mode="scaleToFill"></image>
+						<text class="domMoney font-size-sm">
+							直降40元
+						</text>
+					</view>
+					<view class="flex">
+						<view class="money">¥200</view>
+						<view class="buttomPay">立即购买</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
-export default {
-	data() {
-		return {};
-	},
-	onLoad() {},
-	onShow() {},
-	onReachBottom() {},
-	onReady() {},
-	methods: {}
-};
+	export default {
+		data() {
+			return {
+				
+				
+				
+			};
+		},
+		onLoad() {},
+		onShow() {},
+		onReachBottom() {},
+		onReady() {},
+		methods: {
+			navto(url) {
+				// #ifdef H5
+				console.log(url.indexOf('http'), 'banner');
+				if (url.indexOf('http') >= 0) {
+					window.location.href = url;
+				}
+				// #endif
+				//测试数据没有写id,用title代替
+				uni.navigateTo({
+					url: url
+				});
+			}
+			
+		}
+	};
 </script>
 
 <style lang="scss">
-page,
-.content {
-	min-height: 100%;
-	height: auto;
-}
-</style>
+	page,
+	.content {
+		min-height: 100%;
+		height: auto;
+	}
+
+	.item {
+		border-radius: 10rpx;
+		background-color: #FFFFFF;
+		width: 690rpx;
+		margin: 0 30rpx 20rpx 30rpx;
+		align-items: stretch;
+		line-height: 1;
+
+		.imgbox {
+			background-color: #EE2F72;
+			border-radius: 10rpx;
+			.img {
+				height: 246rpx;
+				width: 246rpx;
+			}
+		}
+
+		.contentbox {
+			flex-wrap: wrap;
+
+			.title {
+				width: 100%;
+				align-self: flex-start;
+				font-size: $font-lg;
+				color: $font-color-dark;
+				line-height: 1.5;
+			}
+
+			.money {
+				font-size: $font-lg + 4rpx;
+				font-weight: bold;
+				color: #EE2F72;
+			}
+
+			.oldMoneyBox {
+				align-self: flex-end;
+				width: 100%;
+
+				.oldMoney {
+					font-size: $font-sm;
+					text-decoration: line-through;
+					color: $font-color-light;
+				}
+
+				.domMoney {
+					color: #B59467;
+				}
+
+				.icon {
+					width: 14rpx;
+					height: 16rpx;
+				}
+
+				.buttomPay {
+					padding: 14rpx 26rpx;
+					font-size: $font-base;
+					color: #fff;
+					background: linear-gradient(90deg, #FF4A8A, #FF77A7);
+					border-radius: 26px;
+				}
+			}
+		}
+	}
+</style>

+ 1 - 1
pages/index/index.vue

@@ -391,7 +391,7 @@ export default {
 	line-height: 1;
 	.tipLeft {
 		background-color: rgba(255, 51, 66, 1);
-		border-radius: 100rpx;
+		border-radius: 20rpx;
 		border-bottom-left-radius: 0rpx;
 		padding: 15rpx 25rpx;
 		position: absolute;

+ 0 - 697
pages/order/adminOrder.vue

@@ -1,697 +0,0 @@
-<template>
-	<view class="content">
-		<view class="navbar">
-			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
-		</view>
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<!-- 订单列表 -->
-					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index" class="order-item">
-						<view class="i-top b-b">
-							<!-- <view class=""></view> -->
-							<text class="time">订单编号:{{ item.order_id }}</text>
-							<text class="state" style=" color: #901b21; ">{{ item.status_name }}</text>
-							<text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text>
-						</view>
-
-						<!-- 		<scroll-view v-if="item.cartInfo.length > 1" class="goods-box" scroll-x>
-							<view v-for="(goodsItem, goodsIndex) in item._info" :key="goodsIndex" class="goods-item">
-								<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
-							</view>
-						</scroll-view> -->
-						<view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item._info" :key="goodsIndex">
-							<image class="goods-img" :src="goodsItem.cart_info.productInfo.image" mode="scaleToFill"></image>
-							<view class="right">
-								<view class="flex-start">
-									<text class="title clamp2">{{ goodsItem.cart_info.productInfo.store_name }}</text>
-									<text class="price" style="flex-grow: 1;text-align: right;color: #901B21;font-size: 30rpx;font-weight: bold;">
-										{{ goodsItem.cart_info.productInfo.price | moneyNum }}
-									</text>
-								</view>
-								<view class="row flex">
-									<!-- <view class="row_title" v-if="item.shipping_type === 1">送货上门</view>
-									<view class="row_title" v-else>门店自提</view> -->
-									<!-- <text class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text> -->
-									<text class="attr-box">x {{ goodsItem.cart_info.cart_num }}</text>
-								</view>
-							</view>
-						</view>
-
-						<view class="price-box">
-							共
-							<text class="num">{{ item._info.length }}</text>
-							件商品 邮费 合计
-							<text class="price">{{ moneyNum(item.pay_price) }}</text>
-							(含运费
-							<text class="price">{{ moneyNum(item.pay_postage) }}</text>
-							)
-						</view>
-						<!-- <view class="action-box b-t" v-if="item.status != 5">
-							<button v-if="item._status._title == '未支付'" class="action-btn" @click.stop="cancelOrder(item)">取消订单</button>
-							<button v-if="item._status._title == '未支付'" @click.stop="orderPay(item)" class="action-btn recom">立即支付</button>
-							<button v-if="item._status._title == '待评价'" class="action-btn">评价</button>
-							<button v-if="item._status._title == '待收货'" @click.stop="orderTake(item, index)" class="action-btn">确认收货</button>
-							<button v-if="item._status._title == '未发货'" class="action-btn" @click.stop="orderRefund(item)">申请退款</button>
-						</view> -->
-					</view>
-
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import empty from '@/components/empty';
-import { orderList, orderCancel, orderDel, orderTake, GetAdminOrderList } from '@/api/order.js';
-export default {
-	components: {
-		uniLoadMore,
-		empty
-	},
-	filters: {
-		moneyNum(value) {
-			return +value;
-		}
-	},
-	data() {
-		return {
-			tabCurrentIndex: 0,
-			navList: [
-				{
-					state: 0,
-					text: '未支付',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 1,
-					text: '待接单',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 2,
-					text: '进行中',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				// {
-				// 	state: 3,
-				// 	text: '待自提',
-				// 	loadingType: 'more',
-				// 	orderList: [],
-				// 	page: 1, //当前页数
-				// 	limit: 10 //每次信息条数
-				// },
-				{
-					state: 4,
-					text: '已完成',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}
-			],
-			isUser: true
-		};
-	},
-	onLoad(options) {
-		/**
-		 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
-		 * 替换onLoad下代码即可
-		 */
-		console.log(options);
-		this.isUser = options.isUser;
-		console.log(this.isUser);
-		this.tabCurrentIndex = +options.state;
-		// if(options.state == '4') {
-		// 	this.tabCurrentIndex = 3
-		// }
-		// #ifndef MP
-		this.loadData();
-		// #endif
-		// #ifdef MP
-		if (options.state == 0) {
-			this.loadData();
-		}
-		// #endif
-	},
-	// #ifdef APP-PLUS || H5
-	onBackPress(e) {
-		uni.switchTab({
-			url: '/pages/user/user'
-		});
-		return true;
-	},
-	// #endif
-	methods: {
-		// 转换金额为数字
-		moneyNum(value) {
-			return +value;
-		},
-		// 确认收货
-		orderTake(item, index) {
-			let obj = this;
-			uni.showModal({
-				title: '是否确认收货?',
-				success: res => {
-					if (res.confirm) {
-						orderTake({
-							uni: item.order_id
-						})
-							.then(e => {
-								obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
-								uni.showToast({
-									title: '收货成功'
-								});
-							})
-							.catch(e => {
-								console.log(e);
-							});
-					} else if (res.cancel) {
-						console.log('取消');
-					}
-				}
-			});
-		},
-		//跳转到订单详情
-		goToOrderDetail(e) {
-			// uni.navigateTo({
-			// 	url: '/pages/order/orderDetail?id=' + e.order_id
-			// });
-		},
-		// 申请退款
-		orderRefund(e) {
-			uni.navigateTo({
-				url: '/pages/order/orderRefund?id=' + e.order_id
-			});
-		},
-		// 订单支付
-		orderPay(e) {
-			uni.navigateTo({
-				url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + e.pay_price
-			});
-		},
-		//获取订单列表
-		loadData(source) {
-			//这里是将订单挂载到tab列表下
-			let index = this.tabCurrentIndex;
-			let navItem = this.navList[index];
-			let state = navItem.state;
-			if (source === 'tabChange' && navItem.loaded === true) {
-				//tab切换只有第一次需要加载数据
-				return;
-			}
-			if (navItem.loadingType === 'loading') {
-				//防止重复加载
-				return;
-			}
-			if (navItem.loadingType === 'noMore') {
-				//防止重复加载
-				return;
-			}
-			// 修改当前对象状态为加载中
-			navItem.loadingType = 'loading';
-
-			GetAdminOrderList({
-				status: state,
-				page: navItem.page,
-				limit: navItem.limit
-			})
-				.then(({ data }) => {
-					console.log(data, 'ddddddddddd');
-					let arr = data.map(e => {
-						let b = this.orderStateExp(e.status);
-						e.stateTip = b.stateTip;
-						e.stateTipColor = b.stateTipColor;
-						return e;
-					});
-					navItem.orderList = navItem.orderList.concat(arr);
-					console.log(navItem.orderList);
-					navItem.page++;
-					if (navItem.limit == data.length) {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'more';
-						return;
-					} else {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'noMore';
-					}
-					uni.hideLoading();
-					this.$set(navItem, 'loaded', true);
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-
-		//swiper 切换
-		changeTab(e) {
-			this.tabCurrentIndex = e.target.current;
-			this.loadData('tabChange');
-		},
-		//顶部tab点击
-		tabClick(index) {
-			console.log(index);
-			this.tabCurrentIndex = index;
-		},
-		//删除订单
-		deleteOrder(index) {
-			uni.showLoading({
-				title: '请稍后'
-			});
-			setTimeout(() => {
-				this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
-				uni.hideLoading();
-			}, 600);
-		},
-		//取消订单
-		cancelOrder(item) {
-			uni.showModal({
-				title: '订单取消',
-				content: '是否取消订单?',
-				success: e => {
-					if (e.confirm) {
-						uni.showLoading({
-							title: '请稍后'
-						});
-						orderCancel({ id: item.order_id })
-							.then(e => {
-								uni.showToast({
-									title: '取消成功',
-									duration: 2000,
-									position: 'top'
-								});
-							})
-							.catch(e => {
-								console.log(e);
-							});
-						//取消订单后删除待付款中该项
-						let list = this.navList[this.tabCurrentIndex].orderList;
-						let index = list.findIndex(val => val.id === item.id);
-						index !== -1 && list.splice(index, 1);
-						uni.hideLoading();
-					}
-				}
-			});
-		},
-
-		//订单状态文字和颜色
-		orderStateExp(state) {
-			let stateTip = '',
-				stateTipColor = '#fa436a';
-			switch (+state) {
-				case 0:
-					stateTip = '待付款';
-					break;
-				case 1:
-					stateTip = '待发货';
-					break;
-				case 2:
-					stateTip = '待收货';
-					break;
-				case 3:
-					stateTip = '待评价';
-					break;
-				case 4:
-					stateTip = '已完成';
-					stateTipColor = '#901b21';
-					break;
-				case 9:
-					stateTip = '订单已关闭';
-					stateTipColor = '#909399';
-					break;
-
-				//更多自定义
-			}
-			return { stateTip, stateTipColor };
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page,
-.content {
-	background: $page-color-base;
-	height: 100%;
-}
-
-.swiper-box {
-	height: calc(100% - 40px);
-}
-.list-scroll-content {
-	height: 100%;
-}
-
-.navbar {
-	display: flex;
-	height: 40px;
-	padding: 0 5px;
-	background: #fff;
-	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-	position: relative;
-	z-index: 10;
-	.nav-item {
-		flex: 1;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		height: 100%;
-		font-size: 15px;
-		color: $font-color-dark;
-		position: relative;
-		&.current {
-			color: $base-color;
-			&:after {
-				content: '';
-				position: absolute;
-				left: 50%;
-				bottom: 0;
-				transform: translateX(-50%);
-				width: 44px;
-				height: 0;
-				border-bottom: 2px solid $base-color;
-			}
-		}
-	}
-}
-
-.uni-swiper-item {
-	height: auto;
-}
-.order-item {
-	display: flex;
-	flex-direction: column;
-	padding-left: 30rpx;
-	background: #fff;
-	margin-top: 16rpx;
-	.i-top {
-		display: flex;
-		align-items: center;
-		height: 80rpx;
-		padding-right: 30rpx;
-		font-size: $font-base;
-		color: $font-color-dark;
-		position: relative;
-		.time {
-			flex: 1;
-		}
-		.state {
-			color: $base-color;
-		}
-		.del-btn {
-			padding: 10rpx 0 10rpx 36rpx;
-			font-size: $font-lg;
-			color: $font-color-light;
-			position: relative;
-			&:after {
-				content: '';
-				width: 0;
-				height: 30rpx;
-				border-left: 1px solid $border-color-dark;
-				position: absolute;
-				left: 20rpx;
-				top: 50%;
-				transform: translateY(-50%);
-			}
-		}
-	}
-	/* 多条商品 */
-	.goods-box {
-		height: 160rpx;
-		padding: 20rpx 0;
-		white-space: nowrap;
-		.goods-item {
-			width: 120rpx;
-			height: 120rpx;
-			display: inline-block;
-			margin-right: 24rpx;
-		}
-		.goods-img {
-			display: block;
-			width: 100%;
-			height: 100%;
-		}
-	}
-	/* 单条商品 */
-	.goods-box-single {
-		display: flex;
-		padding: 20rpx 0;
-		.goods-img {
-			display: block;
-			width: 120rpx;
-			height: 120rpx;
-		}
-		.right {
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-			padding: 0 30rpx 0 24rpx;
-			overflow: hidden;
-			.row {
-				margin-top: 10rpx;
-				justify-content: space-between;
-			}
-			.row_title {
-				// padding:5rpx 10rpx;
-				// background-color: #dddddd;
-				// border-radius: 10rpx;
-				// font-size: 22rpx;
-				// color: #ffffff;
-				display: inline-block;
-				padding: 7rpx 11rpx;
-				font-size: 20rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #fd5b23;
-				background: #ffeae5;
-				border-radius: 5rpx;
-			}
-			.title {
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				line-height: 1;
-				width: 80%;
-			}
-			.attr-box {
-				display: flex;
-				justify-content: flex-end;
-				font-size: $font-sm + 2rpx;
-				color: $font-color-light;
-			}
-			.price {
-				display: inline;
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				&:before {
-					content: '¥';
-					font-size: $font-sm;
-				}
-			}
-		}
-	}
-	.price-box {
-		display: flex;
-		justify-content: flex-end;
-		align-items: baseline;
-		padding: 20rpx 30rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-light;
-		.num {
-			margin: 0 8rpx;
-			color: $font-color-dark;
-		}
-		.price {
-			font-size: $font-lg;
-			color: $font-color-dark;
-			&:before {
-				content: '¥';
-				font-size: $font-sm;
-				margin: 0 2rpx 0 8rpx;
-			}
-		}
-	}
-	.action-box {
-		display: flex;
-		justify-content: flex-end;
-		align-items: center;
-		height: 100rpx;
-		position: relative;
-		padding-right: 30rpx;
-	}
-	.action-btn {
-		width: 160rpx;
-		height: 60rpx;
-		margin: 0;
-		margin-left: 24rpx;
-		padding: 0;
-		text-align: center;
-		line-height: 60rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-dark;
-		background: #fff;
-		border-radius: 100px;
-		&:after {
-			border-radius: 100px;
-		}
-		&.recom {
-			color: $base-color;
-			&:after {
-				border-color: $base-color;
-			}
-		}
-		&.evaluate {
-			color: $color-yellow;
-			&:after {
-				border-color: $color-yellow;
-			}
-		}
-	}
-}
-
-/* load-more */
-.uni-load-more {
-	display: flex;
-	flex-direction: row;
-	height: 80rpx;
-	align-items: center;
-	justify-content: center;
-}
-
-.uni-load-more__text {
-	font-size: 28rpx;
-	color: #999;
-}
-
-.uni-load-more__img {
-	height: 24px;
-	width: 24px;
-	margin-right: 10px;
-}
-
-.uni-load-more__img > view {
-	position: absolute;
-}
-
-.uni-load-more__img > view view {
-	width: 6px;
-	height: 2px;
-	border-top-left-radius: 1px;
-	border-bottom-left-radius: 1px;
-	background: #999;
-	position: absolute;
-	opacity: 0.2;
-	transform-origin: 50%;
-	animation: load 1.56s ease infinite;
-}
-
-.uni-load-more__img > view view:nth-child(1) {
-	transform: rotate(90deg);
-	top: 2px;
-	left: 9px;
-}
-
-.uni-load-more__img > view view:nth-child(2) {
-	transform: rotate(180deg);
-	top: 11px;
-	right: 0;
-}
-
-.uni-load-more__img > view view:nth-child(3) {
-	transform: rotate(270deg);
-	bottom: 2px;
-	left: 9px;
-}
-
-.uni-load-more__img > view view:nth-child(4) {
-	top: 11px;
-	left: 0;
-}
-
-.load1,
-.load2,
-.load3 {
-	height: 24px;
-	width: 24px;
-}
-
-.load2 {
-	transform: rotate(30deg);
-}
-
-.load3 {
-	transform: rotate(60deg);
-}
-
-.load1 view:nth-child(1) {
-	animation-delay: 0s;
-}
-
-.load2 view:nth-child(1) {
-	animation-delay: 0.13s;
-}
-
-.load3 view:nth-child(1) {
-	animation-delay: 0.26s;
-}
-
-.load1 view:nth-child(2) {
-	animation-delay: 0.39s;
-}
-
-.load2 view:nth-child(2) {
-	animation-delay: 0.52s;
-}
-
-.load3 view:nth-child(2) {
-	animation-delay: 0.65s;
-}
-
-.load1 view:nth-child(3) {
-	animation-delay: 0.78s;
-}
-
-.load2 view:nth-child(3) {
-	animation-delay: 0.91s;
-}
-
-.load3 view:nth-child(3) {
-	animation-delay: 1.04s;
-}
-
-.load1 view:nth-child(4) {
-	animation-delay: 1.17s;
-}
-
-.load2 view:nth-child(4) {
-	animation-delay: 1.3s;
-}
-
-.load3 view:nth-child(4) {
-	animation-delay: 1.43s;
-}
-
-@-webkit-keyframes load {
-	0% {
-		opacity: 1;
-	}
-
-	100% {
-		opacity: 0.2;
-	}
-}
-</style>

+ 0 - 751
pages/order/order.vue

@@ -1,751 +0,0 @@
-<template>
-	<view class="content">
-		<view class="navbar">
-			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
-		</view>
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<!-- 订单列表 -->
-					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index" class="order-item">
-						<view class="i-top b-b">
-							<!-- <view class=""></view> -->
-							<text class="time">订单编号:{{ item.order_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>
-
-						<scroll-view v-if="item.cartInfo.length > 1" class="goods-box" scroll-x>
-							<view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
-								<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
-							</view>
-						</scroll-view>
-						<!-- <view v-if="item.cartInfo.length === 1" class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
-							<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
-							<view class="right">
-								<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
-								<text class="attr-box">{{ goodsItem.attrInfo ? goodsItem.attrInfo.suk : '' }} x {{ goodsItem.cart_num }}</text>
-								<text class="price">{{ moneyNum(goodsItem.productInfo.price)}}</text>
-							</view>
-						</view> -->
-						<view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
-							<image class="goods-img" :src="goodsItem.productInfo.image" mode="scaleToFill"></image>
-							<view class="right">
-								<view class="flex-start">
-									<text class="title clamp2">{{ goodsItem.productInfo.store_name }}</text>
-									<text class="price" style="flex-grow: 1;text-align: right;color: #901B21;font-size: 30rpx;font-weight: bold;">{{ goodsItem.productInfo.price|moneyNum }}</text>
-								</view>
-								<view class="row flex">
-									<view class="row_title" v-if="item.shipping_type === 1">送货上门</view>
-									<view class="row_title" v-if="item.shipping_type === 2 && item.store_id != 0">门店自提</view>
-									<!-- <text class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text> -->
-									<text class="attr-box"> x {{ goodsItem.cart_num }}</text>
-								</view>
-							</view>
-						</view>
-
-						<view class="price-box">
-							共
-							<text class="num">{{ item.cartInfo.length }}</text>
-							件商品 邮费
-							
-							合计
-							<text class="price">{{ moneyNum(item.pay_price)}}</text>
-							(含运费
-							<text class="price">{{ moneyNum(item.pay_postage)}}</text>
-							)
-						</view>
-						<view class="action-box b-t" v-if="item.status != 5">
-							<button v-if="item._status._title == '未支付'" class="action-btn" @click.stop="cancelOrder(item)">取消订单</button>
-							<button v-if="item._status._title == '未支付'" @click.stop="orderPay(item)" class="action-btn recom">立即支付</button>
-							<button v-if="item._status._title == '待评价'" class="action-btn">评价</button>
-							<button v-if="item._status._title == '待收货'" @click.stop="orderTake(item, index)" class="action-btn">确认收货</button>
-							<button v-if="item._status._title == '未发货'" class="action-btn" @click.stop="orderRefund(item)">申请退款</button>
-						</view>
-					</view>
-
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import empty from '@/components/empty';
-import { orderList, orderCancel, orderDel, orderTake } from '@/api/order.js';
-export default {
-	components: {
-		uniLoadMore,
-		empty
-	},
-	filters: {
-		moneyNum(value) {
-			return +value
-		}
-	},
-	data() {
-		return {
-			tabCurrentIndex: 0,
-			navList: [
-				{
-					state: 0,
-					text: '待付款',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 1,
-					text: '待发货',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 2,
-					text: '待收货',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 3,
-					text: '待评价',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 4,
-					text: '已完成',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}
-				
-			],
-			navShopList: [
-				{
-					state: 0,
-					text: '全部',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 1,
-					text: '待接单',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 2,
-					text: '进行中',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 3,
-					text: '待自提',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 4,
-					text: '已完成',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}
-			],
-      isUser: true
-		};
-	},
-	onLoad(options) {
-		/**
-		 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
-		 * 替换onLoad下代码即可
-		 */
-    console.log(options)
-    this.isUser = options.isUser
-    console.log(this.isUser)
-		this.tabCurrentIndex = +options.state;
-		// #ifndef MP
-		this.loadData();
-		// #endif
-		// #ifdef MP
-		if (options.state == 0) {
-			this.loadData();
-		}
-		// #endif
-	},
-	// #ifdef APP-PLUS || H5
-	onBackPress(e){
-		uni.switchTab({
-			url: '/pages/user/user',
-		});
-		return true;
-	},
-	// #endif
-	methods: {
-		// 转换金额为数字
-		moneyNum(value){
-				return +value;
-		},
-		// 确认收货
-		orderTake(item, index) {
-			let obj = this;
-			uni.showModal({
-				title: '是否确认收货?',
-				success: (res) => {
-					if(res.confirm) {
-						orderTake({
-							uni: item.order_id
-						})
-							.then(e => {
-								obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
-								uni.showToast({
-									title: '收货成功'
-								});
-							})
-							.catch(e => {
-								console.log(e);
-							});
-					}else if(res.cancel) {
-						console.log('取消')
-					}
-					
-				}
-			});
-		},
-		//跳转到订单详情
-		goToOrderDetail(e) {
-			uni.navigateTo({
-				url: '/pages/order/orderDetail?id=' + e.order_id
-			});
-		},
-		// 申请退款
-		orderRefund(e) {
-			uni.navigateTo({
-				url: '/pages/order/orderRefund?id=' + e.order_id
-			});
-		},
-		// 订单支付
-		orderPay(e) {
-			let yajin = 0 
-			e.cartInfo.forEach(item => {
-				console.log(item.deposit)
-				yajin += item.deposit*1
-			})
-			console.log(yajin)
-			uni.navigateTo({
-				url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + (e.pay_price*1 + yajin)
-			});
-		},
-		//获取订单列表
-		loadData(source) {
-			//这里是将订单挂载到tab列表下
-			let index = this.tabCurrentIndex;
-			let navItem = this.navList[index];
-			let state = navItem.state;
-			if (source === 'tabChange' && navItem.loaded === true) {
-				//tab切换只有第一次需要加载数据
-				return;
-			}
-			if (navItem.loadingType === 'loading') {
-				//防止重复加载
-				return;
-			}
-			if (navItem.loadingType === 'noMore') {
-				//防止重复加载
-				return;
-			}
-			// 修改当前对象状态为加载中
-			navItem.loadingType = 'loading';
-
-			orderList({
-				type: state,
-				page: navItem.page,
-				limit: navItem.limit
-			})
-				.then(({ data }) => {
-					let arr = data.map(e => {
-						let b = this.orderStateExp(e.status);
-						e.stateTip = b.stateTip;
-						e.stateTipColor = b.stateTipColor;
-						return e;
-					});
-					navItem.orderList = navItem.orderList.concat(arr);
-					// console.log(navItem.orderList);
-					navItem.page++;
-					if (navItem.limit == data.length) {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'more';
-						return;
-					} else {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'noMore';
-					}
-					uni.hideLoading();
-					this.$set(navItem, 'loaded', true);
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-
-		//swiper 切换
-		changeTab(e) {
-			this.tabCurrentIndex = e.target.current;
-			this.loadData('tabChange');
-		},
-		//顶部tab点击
-		tabClick(index) {
-			this.tabCurrentIndex = index;
-		},
-		//删除订单
-		deleteOrder(index) {
-			uni.showLoading({
-				title: '请稍后'
-			});
-			setTimeout(() => {
-				this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
-				uni.hideLoading();
-			}, 600);
-		},
-		//取消订单
-		cancelOrder(item) {
-			uni.showModal({
-				title: '订单取消',
-				content: '是否取消订单?',
-				success: e => {
-					if (e.confirm) {
-						uni.showLoading({
-							title: '请稍后'
-						});
-						orderCancel({ id: item.order_id })
-							.then(e => {
-								uni.showToast({
-									title: '取消成功',
-									duration: 2000,
-									position: 'top'
-								});
-							})
-							.catch(e => {
-								console.log(e);
-							});
-						//取消订单后删除待付款中该项
-						let list = this.navList[this.tabCurrentIndex].orderList;
-						let index = list.findIndex(val => val.id === item.id);
-						index !== -1 && list.splice(index, 1);
-						uni.hideLoading();
-					}
-				}
-			});
-		},
-
-		//订单状态文字和颜色
-		orderStateExp(state) {
-			let stateTip = '',
-				stateTipColor = '#fa436a';
-			switch (+state) {
-				case 0:
-					stateTip = '待付款';
-					break;
-				case 1:
-					stateTip = '待发货';
-					break;
-				case 2:
-					stateTip = '待收货';
-					break;
-				case 3:
-					stateTip = '待评价';
-					break;
-				case 4:
-					stateTip = '已完成';
-					stateTipColor = '#901b21';
-					break;
-				case 9:
-					stateTip = '订单已关闭';
-					stateTipColor = '#909399';
-					break;
-
-				//更多自定义
-			}
-			return { stateTip, stateTipColor };
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page,
-.content {
-	background: $page-color-base;
-	height: 100%;
-}
-
-.swiper-box {
-	height: calc(100% - 40px);
-}
-.list-scroll-content {
-	height: 100%;
-}
-
-.navbar {
-	display: flex;
-	height: 40px;
-	padding: 0 5px;
-	background: #fff;
-	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-	position: relative;
-	z-index: 10;
-	.nav-item {
-		flex: 1;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		height: 100%;
-		font-size: 15px;
-		color: $font-color-dark;
-		position: relative;
-		&.current {
-			color: $base-color;
-			&:after {
-				content: '';
-				position: absolute;
-				left: 50%;
-				bottom: 0;
-				transform: translateX(-50%);
-				width: 44px;
-				height: 0;
-				border-bottom: 2px solid $base-color;
-			}
-		}
-	}
-}
-
-.uni-swiper-item {
-	height: auto;
-}
-.order-item {
-	display: flex;
-	flex-direction: column;
-	padding-left: 30rpx;
-	background: #fff;
-	margin-top: 16rpx;
-	.i-top {
-		display: flex;
-		align-items: center;
-		height: 80rpx;
-		padding-right: 30rpx;
-		font-size: $font-base;
-		color: $font-color-dark;
-		position: relative;
-		.time {
-			flex: 1;
-		}
-		.state {
-			color: $base-color;
-		}
-		.del-btn {
-			padding: 10rpx 0 10rpx 36rpx;
-			font-size: $font-lg;
-			color: $font-color-light;
-			position: relative;
-			&:after {
-				content: '';
-				width: 0;
-				height: 30rpx;
-				border-left: 1px solid $border-color-dark;
-				position: absolute;
-				left: 20rpx;
-				top: 50%;
-				transform: translateY(-50%);
-			}
-		}
-	}
-	/* 多条商品 */
-	.goods-box {
-		height: 160rpx;
-		padding: 20rpx 0;
-		white-space: nowrap;
-		.goods-item {
-			width: 120rpx;
-			height: 120rpx;
-			display: inline-block;
-			margin-right: 24rpx;
-		}
-		.goods-img {
-			display: block;
-			width: 100%;
-			height: 100%;
-		}
-	}
-	/* 单条商品 */
-	.goods-box-single {
-		display: flex;
-		padding: 20rpx 0;
-		.goods-img {
-			display: block;
-			width: 120rpx;
-			height: 120rpx;
-		}
-		.right {
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-			padding: 0 30rpx 0 24rpx;
-			overflow: hidden;
-			.row{
-				margin-top: 10rpx;
-				justify-content: space-between;
-			}
-			.row_title{
-				// padding:5rpx 10rpx;
-				// background-color: #dddddd;
-				// border-radius: 10rpx;
-				// font-size: 22rpx;
-				// color: #ffffff;
-				display: inline-block;
-				padding: 7rpx 11rpx;
-				font-size: 20rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #FD5B23;
-				background: #FFEAE5;
-				border-radius: 5rpx;
-			}
-			.title {
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				line-height: 1;
-				width: 80%;
-			}
-			.attr-box {
-				display: flex;
-				justify-content: flex-end;
-				font-size: $font-sm + 2rpx;
-				color: $font-color-light;
-			}
-			.price {
-				display: inline;
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				&:before {
-					content: '¥';
-					font-size: $font-sm;
-					
-				}
-			}
-		}
-	}
-	.price-box {
-		display: flex;
-		justify-content: flex-end;
-		align-items: baseline;
-		padding: 20rpx 30rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-light;
-		.num {
-			margin: 0 8rpx;
-			color: $font-color-dark;
-		}
-		.price {
-			font-size: $font-lg;
-			color: $font-color-dark;
-			&:before {
-				content: '¥';
-				font-size: $font-sm;
-				margin: 0 2rpx 0 8rpx;
-			}
-		}
-	}
-	.action-box {
-		display: flex;
-		justify-content: flex-end;
-		align-items: center;
-		height: 100rpx;
-		position: relative;
-		padding-right: 30rpx;
-	}
-	.action-btn {
-		width: 160rpx;
-		height: 60rpx;
-		margin: 0;
-		margin-left: 24rpx;
-		padding: 0;
-		text-align: center;
-		line-height: 60rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-dark;
-		background: #fff;
-		border-radius: 100px;
-		&:after {
-			border-radius: 100px;
-		}
-		&.recom {
-			color: $base-color;
-			&:after {
-				border-color: $base-color;
-			}
-		}
-		&.evaluate {
-			color: $color-yellow;
-			&:after {
-				border-color: $color-yellow;
-			}
-		}
-	}
-}
-
-/* load-more */
-.uni-load-more {
-	display: flex;
-	flex-direction: row;
-	height: 80rpx;
-	align-items: center;
-	justify-content: center;
-}
-
-.uni-load-more__text {
-	font-size: 28rpx;
-	color: #999;
-}
-
-.uni-load-more__img {
-	height: 24px;
-	width: 24px;
-	margin-right: 10px;
-}
-
-.uni-load-more__img > view {
-	position: absolute;
-}
-
-.uni-load-more__img > view view {
-	width: 6px;
-	height: 2px;
-	border-top-left-radius: 1px;
-	border-bottom-left-radius: 1px;
-	background: #999;
-	position: absolute;
-	opacity: 0.2;
-	transform-origin: 50%;
-	animation: load 1.56s ease infinite;
-}
-
-.uni-load-more__img > view view:nth-child(1) {
-	transform: rotate(90deg);
-	top: 2px;
-	left: 9px;
-}
-
-.uni-load-more__img > view view:nth-child(2) {
-	transform: rotate(180deg);
-	top: 11px;
-	right: 0;
-}
-
-.uni-load-more__img > view view:nth-child(3) {
-	transform: rotate(270deg);
-	bottom: 2px;
-	left: 9px;
-}
-
-.uni-load-more__img > view view:nth-child(4) {
-	top: 11px;
-	left: 0;
-}
-
-.load1,
-.load2,
-.load3 {
-	height: 24px;
-	width: 24px;
-}
-
-.load2 {
-	transform: rotate(30deg);
-}
-
-.load3 {
-	transform: rotate(60deg);
-}
-
-.load1 view:nth-child(1) {
-	animation-delay: 0s;
-}
-
-.load2 view:nth-child(1) {
-	animation-delay: 0.13s;
-}
-
-.load3 view:nth-child(1) {
-	animation-delay: 0.26s;
-}
-
-.load1 view:nth-child(2) {
-	animation-delay: 0.39s;
-}
-
-.load2 view:nth-child(2) {
-	animation-delay: 0.52s;
-}
-
-.load3 view:nth-child(2) {
-	animation-delay: 0.65s;
-}
-
-.load1 view:nth-child(3) {
-	animation-delay: 0.78s;
-}
-
-.load2 view:nth-child(3) {
-	animation-delay: 0.91s;
-}
-
-.load3 view:nth-child(3) {
-	animation-delay: 1.04s;
-}
-
-.load1 view:nth-child(4) {
-	animation-delay: 1.17s;
-}
-
-.load2 view:nth-child(4) {
-	animation-delay: 1.3s;
-}
-
-.load3 view:nth-child(4) {
-	animation-delay: 1.43s;
-}
-
-@-webkit-keyframes load {
-	0% {
-		opacity: 1;
-	}
-
-	100% {
-		opacity: 0.2;
-	}
-}
-</style>

+ 0 - 227
pages/product/discount.vue

@@ -1,227 +0,0 @@
-<template>
-	<view class="content">
-		<view class="top-nav flex">
-			<view class="nav-item" v-for="(item,index) in navList" :key="index" :class="{'action': currentIndex == index}" @click="tabChange(index)">
-				{{item.tit}}
-			</view>
-			<view class="jg"></view>
-		</view>
-		<scroll-view scroll-y="true" class="swiper-box" :style="{'height': height}">
-			<empty v-if="navList[currentIndex].loaded === true && navList[currentIndex].list.length === 0"></empty>
-			<view class="itemt" v-for="(navItem , index) in navList[currentIndex].list">
-				<image :src="currentIndex == 0 ? '../../static/img/act-dis.png': '../../static/img/no-dis.png'" mode=""></image>
-				<view class="price" :class="{'price1': currentIndex == 1}">
-					{{parseFloat(navItem.coupon_price)}}
-				</view>
-				<view class="tit">
-					{{navItem.coupon_title}}
-				</view>
-				<view class="time" :class="{'time1': currentIndex == 1}">
-					{{navItem._add_time + ' - ' + navItem._end_time}}
-				</view>
-				<view class="status" :class="{'status1': currentIndex == 1 || navItem.is_fail != 0 }">
-					{{navItem.is_fail != 0? '已过期' : currentIndex == 0? '未使用': '已使用'}}
-				</view>
-				<view class="condition">
-					{{parseFloat(navItem.use_min_price) == 0 ? '无门槛': '满' + parseFloat(navItem.use_min_price) + '使用'}}
-				</view>
-			</view>
-			<uni-load-more :status="navList[currentIndex].loadingType"></uni-load-more>
-		</scroll-view>
-	</view>
-</template>
-
-<script>
-	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-	import empty from '@/components/empty';
-	
-	import { getMyCoupons } from '../../api/index.js'
-	export default {
-		components: {
-			uniLoadMore,
-			empty
-		},
-		data() {
-			return {
-				currentIndex: 0,
-				navList: [
-					{
-						tit: '未使用',
-						status: 1,
-						list: [],
-						page: 1,
-						limit: 10,
-						loadingType: 'more'
-					},
-					{
-						tit: '已使用',
-						status: 2,
-						list: [],
-						page: 1,
-						limit: 10,
-						loadingType: 'more'
-					}
-				],
-				height: '',
-			}
-		},
-		onReady() {
-			var _this = this;
-			uni.getSystemInfo({
-				success: resu => {
-					const query = uni.createSelectorQuery();
-					query.select('.swiper-box').boundingClientRect();
-					query.exec(function(res) {
-						console.log(res, 'ddddddddddddd');
-						_this.height = resu.windowHeight - res[0].top + 'px';
-						console.log('打印页面的剩余高度', _this.height);
-					});
-				},
-				fail: res => {}
-			});
-		},
-		onShow() {
-			this.loadData()
-		},
-		methods: {
-			tabChange(index) {
-				this.currentIndex = index
-				this.loadData()
-			},
-			loadData() {
-				let obj = this
-				let index = obj.currentIndex
-				let navItem = obj.navList[index]
-				if(navItem.loadingType == 'noMore' || navItem.loadingType == 'loading') {
-					return
-				}
-				navItem.loadingType = 'loading'
-				getMyCoupons({
-					page: 1,
-					limit: 10
-				},navItem.status).then(({data}) => {
-					console.log(data,'++++++')
-					navItem.list = data
-					navItem.page++
-					if(data.length == navItem.limit) {
-						navItem.loadingType = 'more'
-					}else {
-						navItem.loadingType = 'noMore'
-					}
-					obj.$set(navItem,'loaded',true)
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.top-nav {
-		height: 100rpx;
-		width: 100%;
-		background-color: #fff;
-		border-top: 1px solid #e7e7e7;
-		position: relative;
-		.nav-item {
-			text-align: center;
-			width: 50%;
-			line-height: 100rpx;
-			font-size: 32rpx;
-		}
-		.action {
-			color: #901b21;
-			font-weight: bold;
-		}
-		.jg {
-			position: absolute;
-			top: 0;
-			left: 0;
-			right: 0;
-			bottom: 0;
-			margin: auto;
-			height: 58rpx;
-			width: 2rpx;
-			background-color: #e7e7e7;
-		}
-	}
-	.swiper-box {
-		// background-color: red;
-		padding-top: 30rpx;
-		.itemt {
-			width: 701rpx;
-			height: 199rpx;
-			margin: 0 auto 30rpx;
-			position: relative;
-			image {
-				width: 100%;
-				height: 100%;
-			}
-			.price {
-				width: 190rpx;
-				line-height: 50rpx;
-				color: #901b21;
-				font-size: 50rpx;
-				font-weight: bold;
-				position: absolute;
-				top: 43rpx;
-				left: 21rpx;
-				text-align: center;
-			}
-			.price1 {
-				color: #d8d8d8;
-				
-			}
-			.condition {
-				width: 190rpx;
-				line-height: 50rpx;
-				font-size: 24rpx;
-				position: absolute;
-				top: 100rpx;
-				left: 21rpx;
-				text-align: center;
-				color: #9a9a9a;
-			}
-			.tit {
-				width: 490rpx;
-				line-height: 45rpx;
-				position: absolute;
-				right: 0;
-				top: 40rpx;
-				font-size: 30rpx;
-				font-weight: 500;
-				padding-left: 20rpx;
-				color: #1b1b1b;
-			}
-			.time {
-				width: 490rpx;
-				line-height: 30rpx;
-				position: absolute;
-				right: 0;
-				top: 90rpx;
-				font-size: 20rpx;
-				font-weight: 500;
-				padding-left: 20rpx;
-				color: #1b1b1b;
-			}
-			.time1 {
-				color: #d8d8d8;
-			}
-			.status {
-				width: 123rpx;
-				line-height: 50rpx;
-				border-radius: 25rpx;
-				font-size: 24rpx;
-				border: 1px solid #1b1b1b;
-				color: #1b1b1b;
-				text-align: center;
-				position: absolute;
-				top: 124rpx;
-				left: 234rpx;
-			}
-			.status1 {
-				color: #d8d8d8;
-				border: 1px solid #d8d8d8;
-			}
-		}
-	}
-</style>

+ 0 - 501
pages/product/groupBooking/detail.vue

@@ -1,501 +0,0 @@
-<template>
-	<view class="box">
-		<!-- 拼团 -->
-		<view class="lyy-a">
-			<view class="lyy-a-p">
-				<view class="lyy-a-f">
-					<view>
-						<image :src="goods.image" class="lyy-a-tu" />
-					</view>
-					<view class="lyy-a-z">
-						<view class="lyy-a-word lyy-a-word2">{{ goods.title }}</view>
-						<view class="flex money-box">
-							<view class="lyy-a-f lyy-a-word margin-r-20">
-								<view class="lyy-a-word3">¥{{ goods.price }}</view>
-							</view>
-							<view class="lyy-a-tu2 lyy-a-f padding-c-20 border-radius-all">
-								<view class="lyy-a-tu4 flex-shrink-false">{{ goods.people }}人拼</view>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="lyy-hx"></view>
-		<!-- 第二部分 -->
-		<view class="lyy-b padding-t-20">
-			<view class="lyy-b-p">
-				<view class="lyy-b-jz flex">
-					<view class="image1">
-						<view class="lyy-b-word">剩余时间</view>
-					</view>
-				</view>
-				<view class="lyy-b-jz flex">
-					<uni-countdowns v-if="pinkBool == 0" color="#FFFFFF" splitor-color="#901b21"
-						background-color="#901b21" border-color="#901b21" :show-day="false" :hour="stopTime.stopTimeH"
-						:minute="stopTime.stopTimeM" :second="stopTime.stopTimeS"></uni-countdowns>
-				</view>
-				<view class="lyy-b-jz flex">
-					<span class="lyy-b-word2">{{ pinkT.people }}</span>
-					<span class="lyy-b-word3">人成团,还差{{ peopleNub }}人</span>
-				</view>
-				<view class="lyy-b-jz flex">
-					<view class="cmy-user-box">
-						<view class="user-list">
-							<view class="lyy-y bg-gray">
-								<image :src="pinkT.avatar" class="user-list-img" />
-							</view>
-							<view class="lyy-y-word clamp">{{ pinkT.nickname }}</view>
-						</view>
-						<view class="user-list" v-for="(item , i) in people" :key='i'>
-							<view class="lyy-y bg-gray">
-								<image :src="item.avatar" class="user-list-img" />
-							</view>
-							<view class="lyy-y-word clamp">{{ item.nickname }}</view>
-						</view>
-						<view class="user-list" v-for="(l, i) in peopleNub" :key="i">
-							<view class="lyy-y bg-gray"></view>
-							<view class="lyy-y-word clamp">待邀请</view>
-						</view>
-					</view>
-				</view>
-				<view class="lyy-b-jz flex">
-					<view class="lyy-b-but" v-if="status == 1 && pinkBool == 0" @click="invitation">邀请好友参团</view>
-					<view class="lyy-b-but" v-if="status == 0&&pinkBool==0" @click="goBuy">立即加入</view>
-					<!-- <view class="lyy-b-but" @click="goBuy">立即加入</view> -->
-					<view class="lyy-b-but bg-gray" v-if="pinkBool == -1">拼团失败</view>
-					<view class="lyy-b-but" v-if="pinkBool == 1">拼团成功</view>
-				</view>
-			</view>
-		</view>
-		<view class="lyy-hx"></view>
-		<!-- 第三部分 -->
-		<view class="lyy-c">
-			<view class="lyy-c-p">
-				<view class="lyy-c-word">
-					<view>拼团规则:</view>
-					<view>1.点击商品进入商品详情,通过拼团进入订单支付 页,用户付款成功后,按页面提示分享给好友。</view>
-					<view>2.好友通过分享,加入拼团,完成订单支付,待达成 拼团人数后,拼团成功。</view>
-					<view class="">
-						{{scene}}
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import uniCountdowns from '@/components/uni-countdown/uni-countdowns.vue';
-	import {
-		getCombinationLisPink
-	} from '@/api/product.js';
-	import {
-		groupGoods
-	} from '@/api/product.js';
-	import {
-		timeComputed
-	} from '@/utils/rocessor.js';
-	import {
-		mapState
-	} from 'vuex';
-	// 倒计时
-	export default {
-		// #ifdef MP
-		onShareAppMessage: function(res) {
-			if (res.from === 'button') {
-				// 来自页面内分享按钮
-				let pages = getCurrentPages();
-				// 获取当前页面
-				let page = pages[pages.length - 1];
-				let path = '/' + page.route + '?';
-				// 保存传值
-				for (let i in page.options) {
-					path += i + '=' + page.options[i] + '&';
-				}
-				// 保存邀请人
-				path += 'spread=' + this.userInfo.uid;
-				let data = {
-					path: path,
-					imageUrl: this.goods.image,
-					title: '万水千山总是情,一起来拼行不行' //this.goods.title
-				};
-				return data;
-			} else {
-				// 来自页面内分享按钮
-				let pages = getCurrentPages();
-				// 获取当前页面
-				let page = pages[pages.length - 1];
-				let path = '/' + page.route + '?';
-				// 保存传值
-				for (let i in page.options) {
-					path += i + '=' + page.options[i] + '&';
-				}
-				// 保存邀请人
-				path += 'spread=' + this.userInfo.uid;
-				let data = {
-					path: path,
-					imageUrl: this.goods.image,
-					title: '万水千山总是情,一起来拼行不行' //this.goods.title
-				};
-				return data;
-			}
-		},
-		// #endif
-		data() {
-			return {
-				gp_id: 0, //拼团商品id
-				goods: {}, //商品信息
-				pinkT: {}, //拼团团长信息
-				people: [], //拼团成员信息
-				status: 0, //判断是否为团长
-				gid: 0,
-				user_info: {}, //当前用户信息
-				// 倒计时
-				stopTime: {
-					stopTimeH: 0,
-					stopTimeM: 0,
-					stopTimeS: 0
-				},
-				pinkBool: 0, //拼团状态0为待拼团 -1为拼团失败 1为拼团成功
-				userBool: 0, //判断用户是否已经参与拼团 0未参加 1为已参加
-				spread: '', //默认没有邀请人
-				userInfo: {}, //当前用户信息
-				peopleNub: 0,
-				scene: ''
-			};
-		},
-		onLoad(option) {
-			if (option.scene) {
-				// this.scene = option.scene
-				// uni.showModal({
-				// 	title: 'scene',
-				// 	content: option.scene
-				// })
-				if (typeof option.scene == 'string') {
-					// let scene = ('{' + option.scene + "}").replace('qr%26', '').replace(/%3D/g, ':').replace(/%26/g, ',')
-					// 	.replace('id', '\"id\"').replace('pid', '\"pid\"');
-					 let scene = ('{' + option.scene + "}").replace('qr%26', '').replace(/%3D/g, ':').replace(/%26/g, ',')
-					            .replace('id', '\"id\"').replace('pid', '\"pid\"').replace(/=/g,':').replace(/&/g,',');
-					console.log(scene,'scene')
-					let opt = JSON.parse(scene);
-					console.log(opt)
-					// 保存拼团订单id
-					this.gp_id = opt.id;
-					if (opt.pid) {
-						// 存储邀请人
-						this.spread = opt.pid;
-						uni.setStorageSync('spread', opt.pid);
-					}
-				}
-			} else {
-				// 保存拼团订单id
-				this.gp_id = option.id;
-				if (option.spread) {
-					// 存储邀请人
-					this.spread = option.spread;
-					uni.setStorageSync('spread', option.spread);
-				}
-			}
-			// 判断是否有拼团
-			if (option.unique) {
-				this.unique = option.unique
-			}
-			this.getData();
-			// // 保存拼团订单id
-			// this.gp_id = e.id;
-			// // 判断是否有人邀请
-			// if (e.spread) {
-			// 	// 存储邀请人
-			// 	this.spread = e.spread;
-			// 	uni.setStorageSync('spread', option.spread);
-			// }
-		},
-		onShow() {
-			// this.getData();
-		},
-		components: {
-			uniCountdowns
-		},
-		methods: {
-			//前往参团
-			goBuy() {
-				let _self = this;
-				uni.navigateTo({
-					url: '/pages/order/createOrder?pinkId=' + this.gp_id + '&type=pink' + '&pid=' + this.goods
-						.product_id + '&gid=' + this.goods.id + '&merid=' + this.goods.mer_id +'&unique=' + this.goods.productValue[this.goods.productAttr[0].attr_values[0]].unique
-				});
-			},
-			//邀请参团
-			invitation() {
-				let obj = this;
-				// 判断拼团是否已经结束
-				if (obj.userBool == 0) {
-					uni.showModal({
-						title: '提示',
-						content: '该拼团已经结束!',
-						showCancel: false,
-						success: res => {},
-						fail: () => {},
-						complete: () => {}
-					});
-					return;
-				}
-				uni.navigateTo({
-					url: '/pages/product/groupBooking/inviteImg?id=' + this.pinkT.id + '&spread=' + this.userInfo
-						.uid,
-					success: res => {},
-					fail: e => {
-						console.log(e);
-					},
-					complete: () => {}
-				});
-			},
-			// #ifdef H5
-			// 加载微信html5页面分享方法
-			shareDate() {
-				let obj = this;
-				// 判断是否微信浏览器
-				let bool = uni.getStorageSync('weichatBrowser') || '';
-				if (bool) {
-					// 过滤微信强制添加的链接地址
-					url = url.replace('?from=singlemessage', '');
-					let data = {
-						link: url, // 分享链接
-						imgUrl: obj.goodsObjact.image, // 分享图标
-						desc: obj.goodsObjact.store_info,
-						title: obj.goodsObjact.store_name,
-						success: function() {}
-					};
-					obj.weichatObj.updateAppMessageShareData(data);
-					obj.weichatObj.updateTimelineShareData(data);
-				}
-			},
-			// #endif
-			// 获取拼团信息
-			getData() {
-				let obj = this;
-				// let data = {gp_id:_self.gp_id},
-				getCombinationLisPink({}, this.gp_id).then(e => {
-					let r = e.data;
-					// 保存拼团商品详细
-					obj.goods = r.store_combination;
-					// 保存团长信息
-					obj.pinkT = r.pinkT;
-					/* 计算倒计时 */
-					obj.timeComputed(obj.pinkT.stop_time * 1000);
-					// 获取拼团用户列表
-					obj.people = r.pinkAll;
-					// 获取当前是否已参与过这个拼团
-					obj.userBool = r.userBool;
-					// 判断当前用户是否为团长
-					if (r.pinkT.uid == r.userInfo.uid) {
-						// 显示邀请好用选项
-						obj.status = 1;
-					}
-					// 保存当前登录用户信息
-					obj.userInfo = r.userInfo;
-					// 获取拼团是否已经过期
-					obj.pinkBool = r.pinkBool;
-					obj.peopleNub = obj.pinkT.people - 1 - obj.people.length;
-					// #ifdef H5
-					// 加载微信分享配置
-					this.shareDate();
-					// #endif
-				});
-			},
-			// 计算倒计时时间
-			timeComputed(da) {
-				let obj = this;
-				let stopTime = timeComputed(da);
-				obj.stopTime.stopTimeH = stopTime.hours;
-				obj.stopTime.stopTimeM = stopTime.minutes;
-				obj.stopTime.stopTimeS = stopTime.seconds;
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	.box {
-		/* #ifdef APP-PLUS | MP */
-		padding-top: var(--status-bar-height);
-		/* #endif */
-	}
-
-	.lyy-c {
-		width: 100%;
-		background: rgba(255, 255, 255, 1);
-
-		.lyy-c-word {
-			font-size: 28rpx;
-			color: rgba(102, 102, 102, 1);
-			line-height: 50rpx;
-		}
-
-		.lyy-c-p {
-			padding: 39rpx 30rpx;
-		}
-	}
-
-	.lyy-wrap {
-		background-color: #f4f4f4;
-	}
-
-	.lyy-hx {
-		height: 14rpx;
-	}
-
-	.image1 {
-		width: 200rpx;
-		height: 33rpx;
-		background-size: 200rpx auto;
-	}
-
-	.lyy-b {
-		width: 100%;
-		background-color: white;
-
-		.lyy-b-p {
-			padding: 30rpx 45rpx;
-
-			.lyy-b-word2,
-			.lyy-b-word3 {
-				font-size: 28rpx;
-				font-weight: bold;
-			}
-
-			.lyy-b-word2 {
-				color: #901b21;
-			}
-
-			.lyy-b-word3 {
-				color: #1d2023;
-			}
-
-			.lyy-b-jz {
-				width: 100%;
-				justify-content: center;
-				margin-bottom: 20rpx;
-
-				.lyy-y {
-					width: 80rpx;
-					height: 80rpx;
-					margin: 0px 15rpx;
-					border-radius: 40rpx;
-					overflow: hidden;
-
-					.user-list-img {
-						width: 100%;
-						height: 100%;
-					}
-				}
-
-				.lyy-y-word {
-					margin-top: 10rpx;
-					font-size: 28rpx;
-					text-align: center;
-					width: 110rpx;
-				}
-
-				.lyy-b-but {
-					width: 550rpx;
-					height: 80rpx;
-					background: #901b21;
-					border-radius: 100rpx;
-					text-align: center;
-					color: white;
-					line-height: 80rpx;
-					font-size: 32rpx;
-				}
-
-				.cmy-user-box {
-					.user-list {
-						display: inline-block;
-						line-height: 1;
-					}
-				}
-			}
-
-			.lyy-b-word {
-				text-align: center;
-				font-size: 26rpx;
-				color: rgba(29, 32, 35, 1);
-			}
-		}
-	}
-
-	// 商品列表样式
-	.lyy-a {
-		width: 100%;
-		background-color: white;
-
-		.lyy-a-p {
-			padding: 22rpx 30rpx;
-
-			.lyy-a-f {
-				display: flex;
-				align-items: center;
-
-				.lyy-a-f2 {
-					flex: 1;
-				}
-
-				.lyy-a-tu {
-					width: 122rpx;
-					height: 122rpx;
-				}
-
-				.lyy-a-z {
-					padding-left: 30rpx;
-					flex-grow: 1;
-
-					.money-box {
-						justify-content: flex-start;
-
-						.lyy-a-tu2 {
-							background: rgba(255, 255, 255, 1);
-							border: 1rpx solid #901b21;
-
-							.lyy-a-tu3 {
-								background-color: #901b21;
-								padding: 2px 4px 0px 4px;
-								text-align: center;
-								height: 26rpx;
-
-								.lyy-a-tu5 {
-									width: 20rpx;
-									height: 20rpx;
-									display: block;
-								}
-							}
-
-							.lyy-a-tu4 {
-								margin-left: 2px;
-								font-size: 10px;
-								color: #901b21;
-								padding: 0px 10rpx;
-								text-align: center;
-							}
-						}
-					}
-
-					.lyy-a-word {
-						line-height: 56rpx;
-
-						.lyy-a-word3 {
-							font-size: 28rpx;
-							font-weight: bold;
-							color: #901b21;
-						}
-					}
-
-					.lyy-a-word2 {
-						font-size: 30rpx;
-						color: rgba(29, 32, 35, 1);
-					}
-				}
-			}
-		}
-	}
-</style>

+ 0 - 454
pages/product/groupBooking/index.vue

@@ -1,454 +0,0 @@
-<template>
-<!-- 	<view class="lyy-bg4">
-		<view class="lyy-f-a">
-			<view class="lyy-f-b lyy-flex">
-				<view class="lyy-f-c item" @click="goProduct(items)" v-for="(items, ind) in goodsList" :key="ind">
-					<view class="content">
-						<view><image :src="items.image" class="lyy-f-image" /></view>
-						<view class="lyy-f-word1 lyy-f-jl ellipsis">{{ items.title }}</view>
-						<view class="lyy-flex2">
-							<view class="lyy-flex3">
-								<view class="lyy-f-word2 lyy-f-jl">¥{{ items.price * 1 }}</view>
-							</view>
-							<view class="lyy-a-tu2 lyy-flex2">
-								<view class="lyy-a-tu3"><image src="../../../static/img/img11.png" class="lyy-a-tu5" /></view>
-								<view class="lyy-a-tu4">{{ items.people }}人拼</view>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<uni-load-more :status="loadingType"></uni-load-more>
-	</view> -->
-	<view class="czpt">
-		<view class="good-wrapper">
-			<view class="spgood" @click="goProduct(items)" v-for="(items, ind) in goodsList" :key="ind">
-				<view class="left-wrapper"><image :src="items.image" mode="scaleToFill"></image></view>
-				<view class="right-wrapper">
-					<view class="right-title clamp">{{ items.title }}</view>
-					<view class="ex-addr">
-						<image src="../../../static/img/shop.png" mode="" class="name-img"></image>
-							{{checkedStore.name | longstorename }}
-						<image src="../../../static/img/point.png" mode="" class="point-img"></image>
-						 {{ des | distance }}
-					</view>
-					<view class="pepple-num"><image src="../../../static/icon/hot.png" mode="scaleToFill"></image>{{  items.people }}人团</view>
-					<view class="right-bottom">
-						<view class="sp-price">
-							<view class="now-price">¥{{ items.price * 1 }}</view>
-							<view class="old-price">¥{{ items.product_price * 1 }}</view>
-						</view>
-						<view class="sp-btn">马上拼团</view>
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import { getCombinationList } from '@/api/product.js';
-import { mapMutations,mapState } from 'vuex';
-export default {
-	components: {
-		uniLoadMore
-	},
-	data() {
-		return {
-			goodsList: [],
-			loadingType: 'more', //加载更多状态
-			limit: 20, //每次加载数据条数
-			page: 1 //当前页数
-		};
-	},
-	computed: {
-		...mapState('user', ['userInfo', 'checkedStore', 'des', 'latlng']),
-	},
-	onLoad(options) {
-		this.loadData();
-	},
-	//下拉刷新
-	onPullDownRefresh() {
-		this.loadData('refresh');
-	},
-	//监听页面是否滚动到底部加载更多
-	onReachBottom() {
-		this.loadData();
-	},
-	filters: {
-		storename(val) {
-			let str = ''
-			if(val) {
-				str = val
-				if(val.length > 5) {
-					str = val.slice(0,5)+'...'
-				}
-				 
-			}
-			return str
-		},
-		longstorename(val) {
-			let str = ''
-			if(val) {
-				str = val
-				if(val.length > 10) {
-					str = val.slice(0,10)+'...' 
-				}
-				
-			}
-			return str
-		},
-		distance(val) {
-			let str = ''
-			if(val) {
-				if(val*1 > 1000) {
-					return str = (val*1/1000).toFixed(1) + 'km'
-				}
-			}else {
-				return str = (val*1).toFixed(0) + 'm'
-			}
-			return str
-			
-		}
-	},
-	methods: {
-		//加载商品 ,带下拉刷新和上滑加载
-		async loadData(type = 'add', loading) {
-			let obj = this;
-			let data = {
-				page: obj.page,
-				limit: obj.limit
-			};
-			//没有更多直接返回
-			if (type === 'add') {
-				if (obj.loadingType === 'nomore') {
-					return;
-				}
-				obj.loadingType = 'loading';
-			} else {
-				obj.loadingType = 'more';
-			}
-
-			// 加载商品信息
-			getCombinationList(data)
-				.then(e => {
-					console.log(e,'++++++++++++e+++++++')
-					if (type === 'refresh') {
-						// 清空数组
-						obj.goodsList = [];
-					}
-					obj.goodsList = obj.goodsList.concat(e.data);
-					
-					//判断是否还有下一页,有是more  没有是nomore
-					if (obj.limit == e.data.length) {
-						obj.page++;
-						obj.loadingType = 'more';
-					} else {
-						obj.loadingType = 'nomore';
-					}
-					if (type === 'refresh') {
-						if (loading == 1) {
-							uni.hideLoading();
-						} else {
-							uni.stopPullDownRefresh();
-						}
-					}
-				})
-				.catch();
-		},
-		goProduct(e) {
-			uni.navigateTo({
-				url: '/pages/product/groupBooking/productGroup?id=' + e.id
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	height: 100%;
-}
-// 拼团列表
-.lyy-f-a {
-	margin: 0px 15px;
-
-	.lyy-flex {
-		/* 内部模块1*/
-		display: flex;
-		justify-content: space-between;
-	}
-	.lyy-f-b {
-		flex-wrap: wrap;
-		.lyy-f-c {
-			flex: 0 0 50%;
-			/* width: 50%; */
-			margin: 10px 0px 0px 0px;
-		}
-
-		.item:nth-child(2n + 1) .content {
-			margin: 0px 7.5px 0px 0px;
-			border-radius: 10px;
-		}
-	}
-
-	.lyy-f-b .content {
-		background-color: white;
-		.lyy-f-image {
-			width: 100%;
-			height: 340rpx;
-			border-radius: 10rpx 10rpx 0rpx 0rpx;
-		}
-		.ellipsis {
-			width: 165px;
-			white-space: nowrap;
-			overflow: hidden;
-			text-overflow: ellipsis;
-		}
-		.lyy-f-jl {
-			padding: 5px 7px;
-		}
-		.lyy-f-word1 {
-			font-size: 12px;
-			color: rgba(50, 50, 50, 1);
-			line-height: 20px;
-			width: 300rpx;
-			white-space: nowrap;
-			overflow: hidden;
-			text-overflow: ellipsis;
-		}
-	}
-
-	.item:nth-child(2n) .content {
-		margin: 0px 0 0px 7.5px;
-		border-radius: 10px;
-	}
-
-	.lyy-f-word3 {
-		font-size: 12px;
-		text-decoration: line-through;
-		color: rgba(139, 139, 139, 1);
-	}
-
-	.lyy-f-word5 {
-		font-size: 20rpx;
-		color: rgba(153, 153, 153, 1);
-		margin: 20rpx 0px 0px 0px;
-	}
-
-	.lyy-f-word4 {
-		height: 26px;
-		background: #6fb22f;
-		color: white;
-		text-align: center;
-	}
-
-	.lyy-f-d {
-		height: 24rpx;
-		border: 1px solid rgba(252, 91, 98, 1);
-		border-radius: 3px;
-		font-size: 20rpx;
-		text-align: center;
-		width: 50rpx;
-		color: rgba(252, 91, 98, 1);
-		margin: 23rpx 0rpx 0rpx 0rpx;
-		line-height: 24rpx;
-	}
-
-	.lyy-flex2 {
-		display: flex;
-		padding-right: 10rpx;
-		align-items: center;
-		.lyy-flex3 {
-			flex: 1;
-			.lyy-f-word2 {
-				font-size: 14px;
-				color: rgba(241, 13, 59, 1);
-			}
-		}
-		&.lyy-a-tu2 {
-			height: 34rpx;
-			background: rgba(255, 255, 255, 1);
-			border: 1px solid #fc5b62;
-			border-radius: 2px;
-			margin: 10rpx 0rpx;
-
-			.lyy-a-tu3 {
-				height: 30rpx;
-				background-color: #fc5b62;
-				padding: 0px 6px;
-				text-align: center;
-				.lyy-a-tu5 {
-					width: 20rpx;
-					height: 20rpx;
-					margin-top: 6rpx;
-					display: block;
-				}
-			}
-
-			.lyy-a-tu4 {
-				margin-left: 4rpx;
-				font-size: 24rpx;
-				line-height: 30rpx;
-				color: #fc5b62;
-				padding: 0px 10rpx;
-				text-align: center;
-			}
-		}
-	}
-}
-.good-wrapper {
-	width: 710rpx;
-	background-color: #f7f5f5;
-	margin: 20rpx auto 0;
-	.spgood {
-		width: 710rpx;
-		height: 280rpx;
-		background: #FFFFFF;
-		box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);
-		border-radius: 8rpx;
-		padding: 40rpx 20rpx;
-		display: flex;
-		margin-bottom: 21rpx;
-		.left-wrapper {
-			width: 190rpx;
-			height: 200rpx;
-			border-radius: 10rpx;
-			image {
-				width: 190rpx;
-				height: 200rpx;
-				border-radius: 10rpx;
-			}
-		}
-		.right-wrapper {
-			padding-left: 22rpx;
-			width: 100%;
-			height: 200rpx;
-			// background-color: red;
-			.right-title {
-				padding-top: 8rpx;
-				width: 400rpx;
-				// height: 29rpx;
-				font-size: 30rpx;
-				font-weight: bold;
-				color: #333333;
-        
-			}
-			.right-addr {
-				margin-top: 18rpx;
-				display: flex;
-				.shop-img {
-					width: 26rpx;
-					height: 23rpx;
-					margin: 0 4rpx 0 0;
-					image {
-						width: 100%;
-						height: 100%;
-					}
-				}
-				.shop-name {
-					// height: 22rpx;
-					font-size: 22rpx;
-					font-weight: 500;
-					color: #dcb876;
-				}
-				.point-img {
-					width: 16rpx;
-					height: 23rpx;
-					margin: 0 4rpx 0 14rpx;
-					image {
-						width: 100%;
-						height: 21rpx;
-					}
-				}
-				.point-disc {
-					font-size: 24rpx;
-					font-weight: 500;
-					padding-top: 3rpx;
-					color: #dcb876;
-				}
-			}
-			.ex-addr {
-				margin-top: 16rpx;
-				// padding-left: 22rpx;
-				height: 24rpx;
-				font-size: 24rpx;
-				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;
-				}
-			}
-			.pepple-num {
-				// width: 99rpx;
-        display: inline-block;
-        padding-right: 15rpx;
-				height: 36rpx;
-				// color: #ff3366;
-				// background: #FC7A0C;
-				background-color: #fee4ce;
-				// opacity: 0.2;
-				border-radius: 18rpx;
-				font-size: 20rpx;
-				font-weight: 500;
-				color: #ff3366;
-				line-height: 36rpx;
-				padding-left: 12rpx;
-				margin-top: 33rpx;
-				image {
-					width: 17rpx;
-					height: 20rpx;
-          margin-right: 10rpx;
-          // padding-right: rpx;
-				}
-			}
-			.right-bottom {
-				margin-top: 2rpx;
-				// justify-items: flex-end;
-				display: flex;
-				justify-content: space-between;
-				.sp-price {
-					height: 60rpx;
-					display: flex;
-					vertical-align: bottom;
-					line-height: 60rpx;
-					.now-price {
-						font-size: 30rpx;
-						font-weight: bold;
-						color: #901b21;
-						margin-right: 16rpx;
-					}
-					.old-price {
-						font-size: 22rpx;
-						font-weight: 500;
-						text-decoration: line-through;
-						color: #aaaaaa;
-					}
-				}
-				.sp-btn {
-					width: 160rpx;
-					height: 60rpx;
-					border-radius: 30rpx;
-					font-size: 26rpx;
-					text-align: center;
-					line-height: 60rpx;
-					font-weight: 400;
-					color: #ffffff;
-					background-color: #901b21;
-				}
-			}
-		}
-	}
-}
-</style>

+ 0 - 75
pages/product/groupBooking/inviteImg.vue

@@ -1,75 +0,0 @@
-<template>
-	<view class="box">
-		<image class="inviteImg" :src="image" ></image>
-		<!-- <view class="lyy-b-but">长按图片下载</view> -->
-		<!-- <view class="lyy-b-but" @click="domImg">点击下载图片</view> -->
-	</view>
-</template>
-
-<script>
-	import { getCombinationPoster } from '@/api/product.js';
-	import { mapState } from 'vuex';
-	export default {
-		data() {
-			return {
-				image:'',//海报
-				ptId:'',//拼团id
-			}
-		},
-		computed: {
-			...mapState(['baseURL','urlFile'])
-		},
-		onLoad(option) {
-			// 保存拼团id
-			this.ptId = option.id;
-			// 保存团长id
-			this.spread = option.spread;
-			// 加载分享图
-			this.getCombinationPoster();
-		},
-		methods: {
-			// 加载海报
-			getCombinationPoster() {
-				let obj = this;
-				getCombinationPoster({
-					id:obj.ptId,
-					// #ifdef H5|APP-PLUS
-					url:obj.baseURL+obj.urlFile+'/#/pages/product/groupBooking/detail?id='+obj.ptId+'&spread='+obj.spread,
-					from:'wechat',//来源wechat公众号
-					// #endif
-					// #ifdef MP
-					from:'routine',//来源routine小程序
-					url:'/pages/product/groupBooking/detail?id='+obj.ptId
-					// #endif
-				}).then((e) => {
-					obj.image = e.data.url;
-				}).catch((e) => {
-					console.log(e);
-				})
-			}
-		},
-	}
-</script>
-
-<style lang="scss">
-	page{
-		background-color: #FFFFFF;
-		height: 100%;
-	}
-	.box{
-		.inviteImg{
-			width: 750rpx;
-			height: 1200rpx;
-		}
-	}
-	.lyy-b-but {
-		height: 80rpx;
-		background: #901b21;
-		border-radius: 100rpx;
-		text-align: center;
-		color: white;
-		line-height: 80rpx;
-		font-size: 32rpx;
-		margin:  0 100rpx;
-	}
-</style>

+ 0 - 1081
pages/product/groupBooking/productGroup.vue

@@ -1,1081 +0,0 @@
-<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>
-		<!-- <view class="row b-b">
-			<text class="tit">选择</text>
-			<picker mode="selector" :range="choNum" @change="bindChange">
-				<view class="refund" v-if="goodsNumber !== 1">{{ goodsNumber || '请选择' }}</view>
-				<view class="noRefund" v-else>请选择购买数量</view>
-			</picker>
-		</view> -->
-		<view class="have-know">{{kttitle}}<view v-html="ktcontent"></view></view>
-		<view class="way">{{dhtitle}}<view v-html="dhcontent"></view></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 { getArticleDetail } from '@/api/index.js'
-	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 freshDetail from '../common/freshDetail.vue';
-	// 图文详情
-	import contentText from '../common/contentText.vue';
-	// 底部按钮
-	import groupBottom from '../common/groupBottom.vue';
-	// 大家还在拼
-	// import NowList from '@/components/newlist/nowList.vue';
-	//数量盒子
-	import uniNumberBox from '@/components/uni-number-box.vue'
-	export default {
-		components: {
-			topSwiper,
-			groupTime,
-			groupContent,
-			// freshDetail,
-			contentText,
-			groupBottom,
-			// NowList,
-			uniNumberBox
-		},
-		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' ,//显示隐藏弹窗
-				kttitle: '',//拼团须知
-				ktcontent: '',//须知内容
-				dhcontent: '',//开团介绍
-				dhtitle: '',//开团标题
-			};
-	
-		},
-		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.getDhsm(3,'kttitle','ktcontent')
-			obj.getDhsm(4,'dhtitle','dhcontent')
-			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: {
-			//获取兑换说明
-			getDhsm(id,title,content) {
-				getArticleDetail({},id).then( ({data}) => {
-					console.log(data)
-					this.$set(this,title,data.title)
-					this.$set(this,content,data.content)
-				})
-			},
-			// 跳转详细规则
-			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
-				}) {
-					console.log(data,'拼团商品数据++++++++++')
-					let goods = data.storeInfo;
-					obj.goodsObjact = goods;
-					console.log(obj.goodsObjact, 88)
-					if (obj.goodsObjact.description != null) {
-						obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
-					} //小程序商品详情图超出屏幕问题
-					
-					console.log(Array.isArray(data.productValue), 99)
-					// let len = 0
-					// for( let item in data.productValue) {
-					// 	len++
-					// }
-					// console.log(len,'len6666')
-					// if(len > 1){
-					// 	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;
-					// }
-					if (Array.isArray(data.productValue) != true) {
-						console.log('多规格++++++++++')
-						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].quota;
-						// console.log(obj.goodsNumberMax,'obj.goodsNumberMax++++++++++++')
-						obj.actionImage = obj.productValue[str].image;
-						obj.uniqueId = obj.productValue[str].unique;
-						obj.goodsStore = obj.productValue[str].stock;
-					} else {
-						obj.many = 1;
-						obj.productValue = data.productValue; //保存分类查询数据
-						obj.actionPrice = goods.price; //保存默认选中商品价格
-						obj.actionImage = goods.image_base; //保存默认选中商品图片
-						// obj.goodsNumberMax = goods.quota; //保存默认选中最大可购买商品数量
-						console.log(obj.goodsNumberMax,'obj.goodsNumberMax---------------')
-						obj.shopId = data.mer_id; //保存商店id
-					}
-					
-					// console.log(obj.description,'')
-					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" scoped>
-	/*  弹出层 */
-	.popup {
-		position: fixed;
-		left: 0;
-		top: 0;
-		right: 0;
-		bottom: 0;
-		z-index: 999;
-
-		&.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: 135rpx;
-		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;
-		view {
-			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;
-		view {
-			display: inline-block;
-			padding-left: 186rpx;
-			font-size: 26rpx;
-			font-weight: 500;
-			color: #8A8A8A;
-			// width: 100%;
-			position: relative;
-			top:-34rpx;
-			line-height: 1.5;
-		}
-	}
-	.row {
-		display: flex;
-		align-items: center;
-		position: relative;
-		padding: 0 30rpx;
-		height: 110rpx;
-		background: #fff;
-		.refund {
-			font-size: 30rpx;
-			color: $font-color-dark;
-			padding-left: 128rpx;
-		}
-		.noRefund {
-			font-size: 30rpx;
-			color: $font-color-light;
-			padding-left: 128rpx;
-		}
-		.tit {
-			flex-shrink: 0;
-			width: 120rpx;
-			font-size: 30rpx;
-			color: $font-color-dark;
-		}
-		.input {
-			flex: 1;
-			font-size: 30rpx;
-			color: $font-color-dark;
-			padding-left: 128rpx;
-			&.payColor {
-				color: $color-red;
-			}
-		}
-		.iconlocation {
-			font-size: 36rpx;
-			color: $font-color-light;
-		}
-	}
-</style>

+ 0 - 233
pages/product/jmszg.vue

@@ -1,233 +0,0 @@
-<template>
-	<view class="content">
-		<scroll-view scroll-y="true" class="scroll-wrapper">
-			<view class="spgood"  v-for="(items, ind) in list" :key="ind">
-				<view class="left-wrapper"><image :src="items.product_info.image" mode="scaleToFill"></image></view>
-				<view class="right-wrapper">
-					<view class="right-title clamp">{{ items.product_info.store_name }}</view>
-					<!-- <view class="ex-addr">
-					
-					</view> -->
-					<view class="right-bottom">
-						<view class="sp-price">
-							<view class="now-price">¥{{ items.product_info.price * 1 }}</view>
-							<view class="old-price">¥{{ items.product_info.ot_price * 1 }}</view>
-						</view>
-						<view class="sp-btn">马上购</view>
-					</view>
-				</view>
-			</view>
-		</scroll-view>
-	</view>
-</template>
-
-<script>
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import { getOrderStock } from '@/api/product.js';
-export default {
-	data() {
-		return {
-			list: [],
-			page: 1,
-			limit: 10,
-			loadType: 'more',
-			loaded: false
-		};
-	},
-	onReady() {
-		//初始化获取页面宽度
-		uni.createSelectorQuery().select('.scroll-wrapper')
-			.fields(
-			{
-				size:true
-			},
-			data => {
-				console.log(data);
-				console.log(Math.floor((data.width /750) * 300));
-				//保存头部高度
-				this.maxheight =data.height - Math.floor((data.width / 750) * 570);
-				console.log(this.maxheight);
-				}
-			)
-			.exec();
-	},
-	onLoad() {
-		this.loadData();
-	},
-	methods: {
-		loadData() {
-			let obj = this;
-			if (obj.loadType == 'loading') {
-				return;
-			}
-			if (obj.loadType == 'noMore') {
-				return;
-			}
-			obj.loadType = 'loading';
-			getOrderStock({
-				page: obj.page,
-				limit: obj.limit
-			}).then(({ data }) => {
-				// this.list = this.list.concat()
-				obj.page++;
-				console.log(data.data.data, 'ddddddddddddddddddddddddddddddd');
-				this.list = this.list.concat(data.data.data)
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss" scoped>
-.spgood {
-	margin: 0 auto;
-	width: 710rpx;
-	height: 280rpx;
-	background: #ffffff;
-	box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);
-	border-radius: 8rpx;
-	padding: 40rpx 20rpx;
-	display: flex;
-	margin-bottom: 21rpx;
-	position: relative;
-	.left-wrapper {
-		width: 190rpx;
-		height: 200rpx;
-		border-radius: 10rpx;
-		image {
-			width: 190rpx;
-			height: 200rpx;
-			border-radius: 10rpx;
-		}
-	}
-	.right-wrapper {
-		padding-left: 22rpx;
-		width: 100%;
-		height: 200rpx;
-		// background-color: red;
-		.right-title {
-			padding-top: 8rpx;
-			width: 400rpx;
-			// height: 29rpx;
-			font-size: 30rpx;
-			font-weight: bold;
-			color: #333333;
-		}
-		.right-addr {
-			margin-top: 18rpx;
-			display: flex;
-			.shop-img {
-				width: 26rpx;
-				height: 23rpx;
-				margin: 0 4rpx 0 0;
-				image {
-					width: 100%;
-					height: 100%;
-				}
-			}
-			.shop-name {
-				// height: 22rpx;
-				font-size: 22rpx;
-				font-weight: 500;
-				color: #dcb876;
-			}
-			.point-img {
-				width: 16rpx;
-				height: 23rpx;
-				margin: 0 4rpx 0 14rpx;
-				image {
-					width: 100%;
-					height: 21rpx;
-				}
-			}
-			.point-disc {
-				font-size: 24rpx;
-				font-weight: 500;
-				padding-top: 3rpx;
-				color: #dcb876;
-			}
-		}
-		.ex-addr {
-			margin-top: 16rpx;
-			// padding-left: 22rpx;
-			height: 24rpx;
-			font-size: 24rpx;
-			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;
-			}
-		}
-		.pepple-num {
-			// width: 99rpx;
-			display: inline-block;
-			padding-right: 15rpx;
-			height: 36rpx;
-			// color: #ff3366;
-			// background: #FC7A0C;
-			background-color: #fee4ce;
-			// opacity: 0.2;
-			border-radius: 18rpx;
-			font-size: 20rpx;
-			font-weight: 500;
-			color: #ff3366;
-			line-height: 36rpx;
-			padding-left: 12rpx;
-			margin-top: 33rpx;
-			image {
-				width: 17rpx;
-				height: 20rpx;
-				margin-right: 10rpx;
-				// padding-right: rpx;
-			}
-		}
-		.right-bottom {
-			margin-top: 2rpx;
-			// justify-items: flex-end;
-			display: flex;
-			justify-content: space-between;
-			.sp-price {
-				height: 60rpx;
-				display: flex;
-				vertical-align: bottom;
-				line-height: 60rpx;
-				.now-price {
-					font-size: 30rpx;
-					font-weight: bold;
-					color: #901b21;
-					margin-right: 16rpx;
-				}
-				.old-price {
-					font-size: 22rpx;
-					font-weight: 500;
-					text-decoration: line-through;
-					color: #aaaaaa;
-				}
-			}
-			.sp-btn {
-				width: 160rpx;
-				height: 60rpx;
-				border-radius: 30rpx;
-				font-size: 26rpx;
-				text-align: center;
-				line-height: 60rpx;
-				font-weight: 400;
-				color: #ffffff;
-				background-color: #901b21;
-				position: absolute;
-				bottom: 40rpx;
-				right: 20rpx;
-			}
-		}
-	}
-}
-</style>

+ 0 - 246
pages/product/pointsExchange.vue

@@ -1,246 +0,0 @@
-<template>
-	<view class="content">
-		<scroll-view scroll-y="true" style="height: 100%;">
-			<empty v-if="integral.loaded === true && integral.list.length === 0"></empty>
-			<view class="exchange-wrapper">
-				<view class="exgood-wrapper" v-for="item in integral.list" :key="item.id" @click="navTo('/pages/product/product?id=' + item.id + '&type=2')">
-					<image src="https://zccy.liuniu946.com/static/img/bg3.png" mode="" class="bg3"></image>
-					<view class="ex-img-wrapper"><image :src="item.image" mode=""></image></view>
-					<view class="exgood-title">{{item.title}}</view>
-					<view class="ex-addr">
-						<image src="../../static/img/shop.png" mode="" class="name-img"></image>
-						{{checkedStore.name | storename}}
-						<image src="../../static/img/point.png" mode="" class="point-img"></image>
-						{{space(checkedStore.latitude, checkedStore.longitude) }}
-					</view>
-					<view class="ex-price">
-						¥{{item.price*1}}+{{item.integral*1}}
-						<text class="tx1">积分</text>
-						<text class="tx2">¥{{item.ot_price*1}}</text>
-					</view>
-				</view>
-			</view>
-			<uni-load-more :status="integral.loadingType"></uni-load-more>
-		</scroll-view>
-	</view>
-	
-</template>
-
-<script>
-import empty from '@/components/empty';
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import { getCombinationList, getProductslist, getProductHot ,getIntegralList} from '@/api/product.js';
-import { mapMutations,mapState } from 'vuex';
-	export default {
-		components: {
-			empty,
-			uniLoadMore
-		},
-		data() {
-			return {
-				integral: {
-					page: 1,
-					limit: 10,
-					list: [],
-					loadingType: 'more',
-					loaded: ''
-				}
-			}
-		},
-		computed: {
-			...mapState('user', ['userInfo', 'checkedStore', 'des', 'latlng']),
-		},
-		onLoad() {
-			this.loadData()
-		},
-		onReachBottom() {
-			this.loadData()
-		},
-		filters: {
-			storename(val) {
-				let str = ''
-				if(val) {
-					str = val
-					if(val.length > 5) {
-						str = val.slice(0,5)+'...'
-					}
-					 
-				}
-				return str
-			},
-			longstorename(val) {
-				let str = ''
-				if(val) {
-					str = val
-					if(val.length > 10) {
-						str = val.slice(0,10)+'...' 
-					}
-					
-				}
-				return str
-			}
-		},
-		methods:{
-			space(lat1, lng1) {
-				let sp = uni.getStorageSync('latlon');
-				console.log(sp);
-				let arr1 = sp.split(',');
-				let lat2 = arr1[0];
-				let lng2 = arr1[1];
-				console.log(lat1, lng1, lat2, lng2, '位置信息');
-				var radLat1 = (lat1 * Math.PI) / 180.0;
-				var radLat2 = (lat2 * Math.PI) / 180.0;
-				var a = radLat1 - radLat2;
-				var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
-				var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
-				s = s * 6378.137;
-				s = Math.round(s * 10000) / 10000;
-				// return s * 1000;
-				if (s > 1) {
-					return s.toFixed(2) + 'km';
-				} else {
-					return s * 1000 + 'm'; // 单位米
-				}
-			},
-			navTo(url) {
-				uni.navigateTo({
-					url: url
-				})
-			},
-			loadData() {
-				let obj = this
-				if (obj.integral.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				if (obj.integral.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				obj.integral.loadingType = 'loading';
-				getIntegralList({
-					page: obj.integral.page,
-					limit: obj.integral.limit,
-				}).then( ({data}) => {
-					console.log(data)
-					obj.integral.list = obj.integral.list.concat(data)
-					console.log(obj.integral.list)
-					if (obj.integral.limit == data.length) {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						obj.integral.loadingType = 'more';
-						return;
-					} else {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						obj.integral.loadingType = 'noMore';
-					}
-					uni.hideLoading();
-					this.$set(obj.integral, 'loaded', true);
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	page {
-		height: 100%;
-	}
-	.content {
-		height: 100%;
-	}
-	.exchange-wrapper {
-		// background-color: #fff;
-		width: 696rpx;
-		// height: 100rpx;
-		padding-top: 28rpx;
-		margin: 0 auto 39rpx;
-		// padding: 0 27rpx;
-		display: flex;
-		justify-content: space-between;
-		position: relative;
-		flex-wrap: wrap;
-		.exgood-wrapper {
-			width: 342rpx;
-			height: 540rpx;
-			box-shadow: 0px 4px 18px 0px rgba(144, 27, 33, 0.13);
-			margin-bottom: 20rpx;
-			position: relative;
-			.ex-img-wrapper {
-				width: 342rpx;
-				height: 338rpx;
-				image {
-					width: 100%;
-					height: 100%;
-				}
-			}
-			.exgood-title {
-				margin-top: 33rpx;
-				padding-left: 21rpx;
-				font-size: 30rpx;
-				font-weight: bold;
-				color: #333333;
-				white-space: nowrap;
-				overflow: hidden;
-				text-overflow: ellipsis;
-			}
-			.ex-addr {
-				margin-top: 16rpx;
-				padding-left: 22rpx;
-				height: 22rpx;
-				font-size: 22rpx;
-				font-weight: 500;
-				color: #dcb876;
-				image {
-					height: 22rpx;
-				}
-				.name-img {
-					width: 26rpx;
-					margin: 0 4rpx -3rpx 0;
-				}
-				.point-img {
-					width: 16rpx;
-					margin: 0 4rpx -3rpx 14rpx;
-				}
-			}
-			.ex-price {
-				margin-top: 17rpx;
-				padding-left: 22rpx;
-				font-size: 36rpx;
-				font-weight: bold;
-				color: #901b21;
-				vertical-align: bottom;
-				.tx1 {
-					font-size: 24rpx;
-					vertical-align: baseline;
-					position: relative;
-					top: -2rpx;
-				}
-				.tx2 {
-					margin-left: 9rpx;
-					font-size: 26rpx;
-					font-weight: 500;
-					text-decoration: line-through;
-					color: #9d9d9d;
-					line-height: 35rpx;
-				}
-			}
-			.bg {
-				position: absolute;
-				top: 0;
-				width: 342rpx;
-				height: 540rpx;
-				background-size: 100% 100%;
-			}
-		}
-	}
-	.bg3 {
-		z-index: 3;
-		width: 342rpx;
-		height: 540rpx;
-		position: absolute;
-		top: 0;
-		left: 0;
-	}
-	
-</style>

+ 0 - 585
pages/product/seckill.vue

@@ -1,585 +0,0 @@
-<template>
-	<view class="seckillBox">
-		<scroll-view scroll-x="true" class="class-box flex " :scroll-left="scrollLeft" :scroll-with-animation="true">
-			<view @click="tabClass(idx)" class="item" :style="{ width: topNavWidth }" v-for="(item, idx) in indexList" :key="idx" :class="{ action: idx == classIndex }">
-				<view class="time" :class="{ action: idx == classIndex }">{{ item.time}}</view>
-				<view class="status" :class="{ action: idx == classIndex }">{{ item.state }}</view>
-			</view>
-		</scroll-view>
-		<swiper class="list-Box" :current="classIndex" @change="swiperChange" duration="500">
-			<swiper-item class="list-item" v-for="(ls, idx) in indexList" :key="idx">
-				<scroll-view scroll-y="true" class="list" @scrolltolower="getList(classIndex)">
-					<view class="jg"></view>
-					<view class="spgood" :key="ind" v-for="(lss, ind) in ls.dataList">
-						<view class="left-wrapper"><image :src="lss.image" mode="scaleToFill"></image></view>
-						<view class="right-wrapper">
-							<view class="right-title clamp">{{ lss.title }}</view>
-							<view class="ex-addr">
-								<image src="../../static/img/shop.png" mode="" class="name-img"></image>
-								{{checkedStore.name | longstorename}}
-								<image src="../../static/img/point.png" mode="" class="point-img"></image>
-								{{ des | distance}}
-							</view>
-							<view class="right-bottom">
-								<view class="sp-price">
-									<view class="now-price">¥{{ lss.price }}</view>
-								</view>
-								<view class="sp-btn" @click="navProduct(ls, ind)" :class="{ 'seckill-action': ls.status == 1 }">{{ ls.status == 1 ? '去抢购' : ls.status == 2 ? '未开始' : '已结束' }}</view>
-							</view>
-						</view>
-					</view>
-					<uni-load-more :status="ls.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-import { mapState, mapMutations } from 'vuex';
-import { getSeckillList, getSeckillClass } from '@/api/product.js';
-import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import { timeComputed } from '@/utils/rocessor.js';
-export default {
-	components: {
-		uniCountdown,
-		uniLoadMore
-	},
-	data() {
-		return {
-			indexList: [], //分类列表
-			showTime: '', //显示的时间
-			showTImeId: '', //显示时间id用于查询数据
-			// 判断是否所有活动已经结束
-			stop: false, //活动是否已经结束
-			show: false, //是否显示活动
-			status: 0, //获取状态值1为有活动开始中 2为活动未开始 0为活动已经结束
-			topNavWidth: '25%', //设置导航默认宽度
-			classIndex: 0, //当前进行中的活动
-			itemWidht: 0 //顶部分类宽度
-		};
-	},
-	filters: {
-		storename(val) {
-			let str = ''
-			if(val) {
-				str = val
-				if(val.length > 5) {
-					str = val.slice(0,5)+'...'
-				}
-				 
-			}
-			return str
-		},
-		longstorename(val) {
-			let str = ''
-			if(val) {
-				str = val
-				if(val.length > 8) {
-					str = val.slice(0,8)+'...' 
-				}
-				
-			}
-			return str
-		},
-		distance(val) {
-			let str = ''
-			if(val) {
-				if(val*1 > 1000) {
-					return str = (val*1/1000).toFixed(1) + 'km'
-				}
-			}else {
-				return str = (val*1).toFixed(0) + 'm'
-			}
-			return str
-			
-		}
-	},
-	computed: {
-		...mapState('user', ['hasLogin', 'userInfo', 'checkedStore','des']),
-		// 计算左侧距离
-		scrollLeft() {
-			if (this.classIndex > 1) {
-				return this.itemWidht * (this.classIndex - 1.5);
-			} else {
-				return 0;
-			}
-		}
-	},
-	onLoad: function(e) {
-		// 载入分类
-		this.getClass();
-		console.log(this.checkedStore,'ddddddddddddddddddddddd')
-	},
-	methods: {
-		space(lat1, lng1) {
-			let sp = uni.getStorageSync('latlon');
-			console.log(sp);
-			let arr1 = sp.split(',');
-			let lat2 = arr1[0];
-			let lng2 = arr1[1];
-			console.log(lat1, lng1, lat2, lng2, '位置信息');
-			var radLat1 = (lat1 * Math.PI) / 180.0;
-			var radLat2 = (lat2 * Math.PI) / 180.0;
-			var a = radLat1 - radLat2;
-			var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
-			var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
-			s = s * 6378.137;
-			s = Math.round(s * 10000) / 10000;
-			// return s * 1000;
-			if(s>1) {
-				return s.toFixed(2) + 'km'
-			}else {
-				return s * 1000 + 'm'; // 单位米
-			}
-		},
-		//抢购时间切换时触发效果
-		swiperChange(e) {
-			this.classIndex = e.target.current;
-			this.getList(this.classIndex, 'tabChange');
-		},
-		// 获取项目宽度
-		numClassWidht() {
-			uni.createSelectorQuery()
-				.select('.seckillBox')
-				.fields(
-					{
-						size: true
-					},
-					data => {
-						// 设置项目宽度
-						this.itemWidht = Math.floor((data.width / 750) * 187.5);
-					}
-				)
-				.exec();
-		},
-		// 切换当前选中的秒杀活动
-		tabClass(ind) {
-			// 保存当前选中的对象
-			this.classIndex = ind;
-		},
-		// 跳转到商品详情
-		navProduct(ls, ind) {
-			if (ls.status == 1) {
-				let data = ls.dataList[ind];
-
-				uni.navigateTo({
-					url: '/pages/product/product?id=' + data.id + '&type=1'
-				});
-			}
-		},
-		// 获取商品
-		getList(ind, source) {
-			// 获取数据对象
-			let date = this.indexList[ind];
-			console.log(date, source);
-			if (source === 'tabChange' && date.loaded === true) {              
-				//tab切换只有第一次需要加载数据
-				return;
-			}
-			if (date.loadingType === 'noMore') {
-				//防止重复加载
-				return;
-			}
-			if (date.loadingType === 'loading') {
-				//防止重复加载
-				return;
-			}
-			// 修改当前对象状态为加载中
-			date.loadingType = 'loading';
-			getSeckillList(
-				{
-					page: date.page,
-					limit: date.limit
-				},
-				date.id
-			)
-				.then(e => {
-					date.dataList.push(...e.data);
-					// 查询翻页增加
-					date.page++;
-					// 判断是否可以继续加载
-					if (date.limit == e.data.length) {
-						date.loadingType = 'more';
-					} else {
-						date.loadingType = 'noMore';
-					}
-					// 设置当前数据已加载完毕
-					this.$set(date, 'loaded', true);
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		// 获取秒杀时间段
-		getClass() {
-			let obj = this;
-			getSeckillClass({})
-				.then(({ data }) => {
-					obj.indexList = data.seckillTime.map((e, ind) => {
-						// 初始化翻页页数
-						e.page = 1;
-						// 初始每次加载的数据条数
-						e.limit = 6;
-						// 创建储存订单数据
-						e.dataList = [];
-						// 初始化加载
-						e.loadingType = 'more';
-						let ar = e;
-						// 判断是否为进行中的活动
-						if (ar.status === 1) {
-							// 计算倒计时时间
-							obj.timeComputed(ar.stop * 1000, ar);
-						} else {
-							// 获取距离开始还需要多少时间
-							let arTime = ar.time.split(':');
-							let h = arTime[0];
-							let m = arTime[1];
-							let time = new Date();
-							// 设置时间
-							time.setHours(h, m, 0);
-							// 计算倒计时时间
-							obj.timeComputed(time.getTime(), ar);
-						}
-
-						return e;
-					});
-					// 获取当前活动中的下标值
-					obj.classIndex = data.seckillTimeIndex;
-					// 获取当前显示中对象的数据
-					obj.$nextTick(() => {
-						obj.getList(obj.classIndex);
-					});
-					if (obj.indexList.length <= 4) {
-						// 当数量小于等于4的时候自适应宽度
-						obj.topNavWidth = 100 / obj.indexList.length + '%';
-					} else {
-						// 页面渲染完毕后加载scroll-view左侧距离
-						obj.$nextTick(() => {
-							obj.numClassWidht();
-						});
-					}
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		// 计算倒计时时间
-		timeComputed(da, ar) {
-			let obj = this;
-			// 计算时间,保存需要多少时间到期
-			let stopTime = timeComputed(da);
-			console.log(stopTime);
-			ar.stopTimeH = stopTime.hours;
-			ar.stopTimeM = stopTime.minutes;
-			ar.stopTimeS = stopTime.seconds;
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page,
-.seckillBox {
-	min-height: 100%;
-	height: 100%;
-}
-// 头部时间段样式
-.class-box {
-	white-space: nowrap;
-	height: 60px;
-	.item {
-		text-align: center;
-		display: inline-block;
-		color: #fff;
-		padding: 11.5px 5px;
-		background-color: #901b21;
-		line-height: 1;
-		.time {
-			font-size: 16px;
-			padding-bottom: 3px;
-			&.action {
-				color: #901b21;
-			}
-		}
-		.status {
-			font-size: 12px;
-			margin: 0 auto;
-			width: 60px;
-			padding: 3px 0;
-			&.action {
-				color: #901b21;
-				border-radius: 99px;
-				background-color: #fff;
-			}
-		}
-	}
-	.action {
-		color: #901b21;
-		background-color: #fff;
-	}
-}
-// 列表上方标题样式
-.title-box {
-	margin-top: 10px;
-	padding: 10px;
-	background-color: #ffffff;
-	.title-box-left {
-		font-size: 15px;
-		color: $font-color-base;
-	}
-	.title-box-right {
-		.tip {
-			font-size: 15px;
-			color: #999999;
-			padding-right: 5px;
-		}
-
-		/deep/ .uni-countdown__number {
-			border-radius: 3px;
-			width: 22px;
-		}
-		/deep/ .uni-countdown__splitor,
-		/deep/ .uni-countdown__number {
-			height: 20px;
-			line-height: 18px;
-		}
-	}
-}
-// 列表样式
-.list-Box {
-	height: calc(100vh - 104px);
-	// height: calc(100vh- 60px);
-	.list {
-		height: calc(100vh - 104px);
-		// background-color: pink;
-	}
-}
-// 商品列表
-$slider-color: #fe9398; //滑块左侧颜色
-.goodsList-item {
-	background-color: #ffffff;
-	padding: 30rpx;
-	border-bottom: 1px solid $border-color-light;
-	image {
-		flex-shrink: 0;
-		border-radius: $border-radius-sm;
-		height: 180rpx;
-		width: 180rpx;
-	}
-	.slider {
-		margin-top: 15rpx;
-		justify-content: flex-start;
-		.slider-box {
-			width: 196rpx;
-			border-radius: 99px;
-			border: 1px solid $slider-color;
-			height: 16rpx;
-			.slider-action {
-				background-color: $slider-color;
-				height: 100%;
-			}
-		}
-		.sales-nub {
-			color: $font-color-light;
-			font-size: 24rpx;
-			padding-left: 20rpx;
-		}
-	}
-	.goodsList-content {
-		margin-left: 20rpx;
-		flex-grow: 1;
-		height: 180rpx;
-		position: relative;
-		.title {
-			font-size: $font-base;
-			color: $font-color-dark;
-			font-weight: 500;
-			width: 0;
-			min-width: 100%;
-		}
-		.goods-money {
-			position: absolute;
-			left: 0;
-			bottom: 0;
-			width: 100%;
-			.money-box {
-				.money {
-					font-size: $font-lg + 10rpx;
-					color: $color-red;
-					font-weight: bold;
-				}
-				.otMoney-box {
-					font-size: $font-sm;
-					.otMoney {
-						color: $font-color-light;
-						padding-right: 20rpx;
-						text-decoration: line-through;
-					}
-					.sales {
-						color: $font-color-light;
-					}
-				}
-			}
-			.cart {
-				font-size: $font-base;
-				border-radius: 99px;
-				padding: 15rpx 30rpx;
-				line-height: 1;
-				color: #ffffff;
-				background-color: $color-gray;
-				&.seckill-action {
-					border: 1px solid $color-red;
-					background-color: $color-red;
-				}
-			}
-		}
-	}
-}
-.spgood {
-		width: 710rpx;
-		height: 290rpx;
-		background: #FFFFFF;
-		box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);
-		border-radius: 10rpx;
-		padding: 15rpx 20rpx 15rpx 14rpx;
-		display: flex;
-		margin: 0 auto;
-		margin-bottom: 20rpx;
-		.left-wrapper {
-			width: 260rpx;
-			height: 260rpx;
-			border-radius: 10rpx;
-			image {
-				width: 260rpx;
-				height: 260rpx;
-				border-radius: 10rpx;
-			}
-		}
-		.right-wrapper {
-			padding-left: 22rpx;
-			width: 100%;
-			height: 200rpx;
-			// background-color: red;
-			.right-title {
-				padding-top: 12rpx;
-				width: 358rpx;
-				// height: 29rpx;
-				// font-size: 30rpx;
-				// font-weight: bold;
-				// color: #333333;
-				
-				font-size: 30rpx;
-				font-weight: bold;
-				color: #333333;
-				line-height: 35rpx;
-			}
-			.right-addr {
-				margin-top: 18rpx;
-				display: flex;
-				.shop-img {
-					width: 26rpx;
-					height: 23rpx;
-					margin: 0 4rpx 0 0;
-					image {
-						width: 100%;
-						height: 100%;
-					}
-				}
-				.shop-name {
-					// height: 22rpx;
-					font-size: 22rpx;
-					font-weight: 500;
-					color: #dcb876;
-				}
-				.point-img {
-					width: 16rpx;
-					height: 23rpx;
-					margin: 0 4rpx 0 14rpx;
-					image {
-						width: 100%;
-						height: 21rpx;
-					}
-				}
-				.point-disc {
-					font-size: 24rpx;
-					font-weight: 500;
-					padding-top: 3rpx;
-					color: #dcb876;
-				}
-			}
-			.ex-addr {
-				margin-top: 16rpx;
-				// padding-left: 22rpx;
-				height: 22rpx;
-				font-size: 25rpx;
-				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;
-				}
-			}
-			
-			.right-bottom {
-				margin-top: 117rpx;
-				// justify-items: flex-end;
-				display: flex;
-				justify-content: space-between;
-				.sp-price {
-					height: 52rpx;
-					display: flex;
-					vertical-align: bottom;
-					line-height: 52rpx;
-					.now-price {
-						// font-size: 30rpx;
-						// font-weight: bold;
-						// color: #901b21;
-						padding-top: 19rpx;
-						margin-right: 16rpx;
-						font-size: 36rpx;
-						font-weight: bold;
-						color: #901B21;
-						line-height: 35rpx;
-						// vertical-align: bottom;
-					}
-					.old-price {
-						font-size: 22rpx;
-						font-weight: 500;
-						text-decoration: line-through;
-						color: #aaaaaa;
-					}
-				}
-				.sp-btn {
-					width: 136.6rpx;
-					height: 60rpx;
-					border-radius: 30rpx;
-					font-size: 26rpx;
-					text-align: center;
-					line-height: 60rpx;
-					font-weight: 400;
-					color: #ffffff;
-					// background-color: #dcb876;
-					background-color: #999999;
-					&.seckill-action {
-						background-color: #dcb876;
-						// background-color: #999999;
-					}
-				}
-				
-			}
-		}
-	}
-	.jg {
-		height: 34rpx;
-	}
-</style>

+ 0 - 189
pages/recommend/recommend.vue

@@ -1,189 +0,0 @@
-<template>
-	<view class="recommend">
-		<view class="re-list" v-for="b in bastList" :key="b.id">
-			<view class="re-img">
-				<image :src="b.image" mode=""></image>
-			</view>
-			<view class="re-right">
-				<view class="re-right-top">
-					<view class="good-name clamp2">{{b.store_name}}</view>
-					<view class="store-name clamp">
-						门店:{{checkedStore.name}}
-					</view>
-					<text>距离:{{checkedStore.distance | des}}</text>
-				</view>
-				<view class="re-right-bottom">
-					<view class="re-right-bottom-left">
-						<text>¥{{b.price}}</text><text class="ot-price" v-if="b.ot_price*1 > b.price*1">¥{{b.ot_price}}</text>
-					</view>
-					<view class="re-right-bottom-right" @click="navTo('/pages/product/product?id=' + b.id + '&type=0')">
-						立即购买
-					</view>
-				</view>
-			</view>
-		</view>
-		<uni-load-more :status="loadingType"></uni-load-more>
-	</view>
-</template>
-
-<script>
-import { mapState, mapMutations } from 'vuex';
-import { groom1 } from '@/api/index.js';
-export default {
-	data() {
-		return {
-			bastList: [],
-			loadingType: 'more',
-			page: 1,
-			limit: 10,
-		}
-	},
-	filters: {
-		des(val) {
-			let str = ''
-			if(val) {
-				if(val <= 1000) {
-					 str = parseInt(val) + 'm'
-				}else {
-					 str = parseInt(val/1000) + 'km'
-				}
-			}
-			return str
-		}
-	},
-	onShow() {
-		this.getRecommend()
-		console.log(this.checkedStore)
-	},
-	computed: {
-		...mapState('user',['checkedStore'])
-	},
-	// 页面到底部
-	onReachBottom() {
-		console.log('到底')
-		this.getRecommend()
-	},
-	methods: {
-		navTo(url) {
-			uni.navigateTo({
-				url: url
-			})
-		},
-		getRecommend() {
-			let obj = this
-			if(obj.loadingType == 'loading' || obj.loadingType == 'noMore') {
-				return 
-			}
-			obj.loadingType = 'loading' 
-			groom1({
-				page: obj.page,
-				limit: obj.limit
-			}).then( ({data}) => {
-				obj.bastList = obj.bastList.concat(data.list)
-				console.log(data.list,'groom1')
-				obj.page++
-				if(data.list.length == obj.limit) {
-					obj.loadingType = 'more' 
-				}else {
-					obj.loadingType = 'noMore' 
-				}
-				})
-		}
-	}
-}
-</script>
-
-<style lang="scss" scoped>
-	.re-list {
-		margin: 20rpx;
-		height: 280rpx;
-		background-color: #FFFFFF;
-		border-radius: 8rpx;
-		display: flex;
-		
-		$wi: 200rpx;
-		.re-img {
-			margin: auto 0;
-			image {
-				width: $wi;
-				height: $wi;
-				border-radius: 10rpx;
-				margin: 0 25rpx;
-			}
-		}
-		
-		.re-right {
-			height: $wi;
-			width: 100%;
-			margin: auto 0;
-			font-family: PingFang-SC-Medium;
-			position: relative;
-				
-			.re-right-top {
-				color: #333333;
-				font-size: 30rpx;
-				.good-name {
-					width: 380rpx;
-					font-size: 30rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #333333;
-				}
-				.store-name {
-					padding-top: 10rpx;
-					width: 300rpx;
-					font-size: 22rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #DCB876;
-				}
-				text {
-					color: #DCB876;
-					font-size: 22rpx;
-				}
-			}
-			
-			.re-right-bottom {
-				width: 450rpx;
-				display: flex;
-				justify-content:space-between;
-				position: absolute;
-				bottom: 0;
-					
-				.re-right-bottom-left {
-					height: 60rpx;
-					line-height: 60rpx;
-					margin: auto 0;
-					font-size: 32rpx;
-					color: #901B21;
-					.ot-price {
-						padding-left: 8rpx;
-						font-size: 20rpx;
-						font-family: PingFang SC;
-						font-weight: 500;
-						text-decoration: line-through;
-						color: #9D9D9D;
-					}
-					// span {
-					// 	margin-left: 5rpx;
-					// 	color: #989B9F;
-					// 	font-size: 15rpx;
-					// 	text-decoration: line-through;
-					// }
-				}
-				
-				.re-right-bottom-right {
-					width: 160rpx;
-					line-height: 60rpx;
-					background: #901b21;
-					border-radius: 30rpx;
-					font-size: 28rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #FFFFFF;
-					text-align: center;
-				}
-			}
-		}
-	}
-</style>

BIN
static/img/domIcon.png


+ 172 - 126
user/page/scoreAccumulate.vue

@@ -1,33 +1,54 @@
 <template>
 	<view class="content">
-		<view class="top-wrapper">{{ userInfo.integral || 0.0 }}</view>
-		<view class="navbar">
-			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
-		</view>
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab" :style="{ height: height }">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<!-- 订单列表 -->
-					<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item flex">
-						<view class="title-box">
-							<view class="title">
-								<text>{{ item.mark }}</text>
-							</view>
-							<view class="time">
-								<text>{{ item.add_time }}</text>
-							</view>
-						</view>
-						<view class="money">
-							<text>{{ (item.pm == 0 ? '-' : '+') + item.number }}</text>
-						</view>
-					</view>
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
+		<view class="top-bg">
+		
+		</view>
+		<view class="yue-wrap flex">
+			<view class="yue-tit">
+				总积分
+			</view>
+			<view class="yue-num flex">
+				<view class="yue">
+					{{userInfo.integral || '0.00'}}
+				</view>
+				<!-- <view class="cz" @click="navto('/pages/money/recharge')">
+					充值
+					<image src="../../static/icon/dz.png" mode="widthFix"></image>
+				</view> -->
+			</view>
+			<view class="lj-wrap flex">
+				<view class="">
+					<!-- 累计消费:¥{{ userInfo.orderStatusSum || '0'}} -->
+				</view>
+				<view class="">
+					<!-- 累计充值:¥{{ userInfo.recharge || '0' }} -->
+				</view>
+			</view>
+		</view>
+		<scroll-view scroll-y="true" class="jl-wrap" :style="{'height': maxheight}" @scrolltolower="loadData">
+			<view>
+				<empty v-if="navList[tabCurrentIndex].orderList.length == 0 && navList[tabCurrentIndex].loaded" ></empty>
+				<view class="jl " v-for="item in navList[tabCurrentIndex].orderList">
+					<view class="jl-tit flex">
+						<view class="clamp2 tit">
+							{{item.mark}}
+						</view>
+						<view class="price" :class="{'add':item.pm == 1,'jian': item.pm == 0}">
+							{{item.number*1}}
+						</view>
+					</view>
+					<view class="jl-mark flex">
+						<!-- <view class="mark">
+							{{item.mark}}
+						</view> -->
+						<view class="">
+							{{item.add_time}}
+						</view>
+					</view>
+				</view>
+				<uni-load-more :status="navList[tabCurrentIndex].loadingType" v-if="!(navList[tabCurrentIndex].orderList.length == 0 && navList[tabCurrentIndex].loaded)"></uni-load-more>
+			</view>
+		</scroll-view>
 	</view>
 </template>
 
@@ -87,6 +108,20 @@ export default {
 	onShow() {
 		// 载入积分数据
 		this.loadData();
+	},
+	onReady() {
+		// 初始化获取页面宽度
+		var obj = this;
+		uni.getSystemInfo({
+			success: resu => {
+				const query = uni.createSelectorQuery();
+				query.select('.jl-wrap').boundingClientRect();
+				query.exec(function(res) {
+					obj.maxheight = resu.windowHeight - res[0].top + 'px';
+				});
+			},
+			fail: res => {}
+		});
 	},
 	methods: {
 		// 页面跳转
@@ -116,8 +151,7 @@ export default {
 				{
 					page: navItem.page,
 					limit: navItem.limit
-				},
-				state
+				}
 			)
 				.then(({ data }) => {
 					console.log(data);
@@ -125,9 +159,7 @@ export default {
 					if (data.length > 0) {
 						let list = [];
 						data.forEach(item => {
-							if (item.pm === state) {
-								list.push(item);
-							}
+							list.push(item);
 						});
 						navItem.orderList = navItem.orderList.concat(list);
 						navItem.page++;
@@ -162,98 +194,112 @@ export default {
 </script>
 
 <style lang="scss">
-page {
-	background: #ffffff;
-	height: 100%;
-}
-
-.navbar {
-	display: flex;
-	height: 40px;
-	padding: 0 5px;
-	background: #fff;
-	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-	position: relative;
-	z-index: 10;
-
-	.nav-item {
-		flex: 1;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		height: 100%;
-		font-size: 15px;
-		color: $font-color-dark;
-		position: relative;
-
-		&.current {
-			color: $base-color;
-
-			&:after {
-				content: '';
-				position: absolute;
-				left: 50%;
-				bottom: 0;
-				transform: translateX(-50%);
-				width: 44px;
-				height: 0;
-				border-bottom: 2px solid $base-color;
-			}
-		}
+page {
+		background-color: #fff;
+		height: auto;
+		min-height: 100%;
+	}
+
+	.top-bg {
+		background-color: #ee2f72;
+		height: 180rpx;
+		width: 750rpx;
+	}
+
+	.yue-wrap {
+		width: 670rpx;
+		height: 320rpx;
+		margin: -160rpx auto 30rpx;
+		background: linear-gradient(-70deg, #FF77A7, #FF4A8A);
+		box-shadow: 0px 15rpx 22rpx 6rpx rgba(238, 47, 114, 0.1);
+		border-radius: 25rpx;
+		color: #fff;
+		font-size: 26rpx;
+		padding: 50rpx 75rpx;
+		flex-direction: column;
+		justify-content: space-between;
+		align-items: flex-start;
+
+		.yue-num {
+			width: 100%;
+			justify-content: space-between;
+
+			.yue {
+				font-size: 76rpx;
+				font-weight: bold;
+			}
+
+			.cz {
+				image {
+					width: 13rpx;
+					margin-left: 10rpx;
+				}
+			}
+		}
+
+		.lj-wrap {
+			width: 100%;
+			justify-content: space-between;
+			font-size: 24rpx;
+		}
+	}
+
+	.jl {
+		width: 670rpx;
+		margin: 0 auto 20rpx;
+		padding: 35rpx 30rpx;
+		background: #FFFFFF;
+		box-shadow: 0px 0px 28px 0px rgba(48, 48, 48, 0.1);
+		border-radius: 8px;
+
+		.jl-tit {
+			width: 100%;
+			font-size: 28rpx;
+			font-weight: bold;
+			color: #333333;
+
+			.tit {
+				max-width: 450rpx;
+			}
+
+			.price {
+				font-size: 38rpx;
+				font-weight: bold;
+
+			}
+
+			.add {
+				color: #EE2F72;
+
+				&::before {
+					content: '+';
+					font-size: 28rpx;
+					color: #EE2F72;
+				}
+			}
+
+			.jian {
+				color: #808080;
+
+				&::before {
+					content: '-';
+					font-size: 28rpx;
+				}
+			}
+		}
+
+		.jl-mark {
+			padding-top: 20rpx;
+			width: 100%;
+			font-size: 24rpx;
+			font-weight: 500;
+			color: #808080;
+			align-items: flex-start;
+
+			// justify-content: flex-end;
+			.mark {
+				max-width: 470rpx;
+			}
+		}
 	}
-}
-
-// 列表
-
-.swiper-box {
-	height: calc(100% - 44px);
-	padding-top: 10rpx;
-
-	.order-item {
-		padding: 20rpx 30rpx;
-		line-height: 1.5;
-
-		.title-box {
-			.title {
-				font-size: $font-lg;
-				color: $font-color-base;
-			}
-
-			.time {
-				font-size: $font-base;
-				color: $font-color-light;
-			}
-		}
-
-		.money {
-			color: #fd5b23;
-			font-size: $font-lg;
-		}
-	}
-}
-
-.list-scroll-content {
-	height: 100%;
-}
-
-.content {
-	height: 100%;
-
-	.empty-content {
-		background-color: #ffffff;
-	}
-}
-
-.top-wrapper {
-	width: 750rpx;
-	height: 265rpx;
-	background: #ee2f72;
-	color: #ffffff;
-	font-size: 72rpx;
-	font-family: PingFang SC;
-	font-weight: bold;
-	color: #ffffff;
-	line-height: 265rpx;
-	text-align: center;
-}
 </style>