cmy 2 年之前
父节点
当前提交
a97553d3d9

+ 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 - 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>