lhl 2 lat temu
rodzic
commit
47e7401157

+ 18 - 9
pages/index/index.vue

@@ -87,7 +87,10 @@
 							<text class="font-size-sm">¥</text>
 							{{ item.price * 1 }}
 						</view>
-						<view class="yuanPrice">{{ item.ot_price }}</view>
+						<view class="yuanPrice">
+							已售:{{item.sales}}
+						</view>
+						<!-- <view class="yuanPrice">{{ item.ot_price }}</view> -->
 					</view>
 				</view>
 			</view>
@@ -130,12 +133,14 @@
 					</view>
 					<view class="djq-hd flex f-j-sb">
 						<view class="buy-info">
-							{{storeitem.count}}人已购买
+							<!-- {{storeitem.count}}人已购买 -->
 						</view>
 						<view class="hd-btn">
 							<image src="../../static/icon/call.png" mode="" style="margin-right: 15rpx;"
 								@click.stop="makeCall(storeitem.phone)"></image>
-							<image src="../../static/icon/dh.png" mode="" @click.stop="dh(storeitem)"></image>
+							<image src="../../static/icon/dh.png" mode=""
+								@click.stop="toGaodeMap(storeitem.latitude,storeitem.longitude,storeitem.name)">
+							</image>
 						</view>
 					</view>
 				</view>
@@ -257,6 +262,7 @@
 		onShow: function() {
 			this.getGoodList()
 			this.loadData();
+			// this.getStoreList()
 			// this.getCity()
 			// this.getBargainList();
 			this.getStoreCate()
@@ -512,7 +518,11 @@
 					console.log(res, '逆解析结果')
 					obj.city = res.data.city
 				})
-			}
+			},
+			// 调用高德
+			toGaodeMap(latitude, longitude, address) {
+				window.location.href = `https://uri.amap.com/marker?position=${longitude},${latitude}&name=${address}`;
+			},
 		}
 	};
 </script>
@@ -1278,7 +1288,7 @@
 					font-weight: 500;
 					color: #FF440D;
 					padding: 0 15rpx;
-					background-color: #fcf3f0;
+					background-color: #fff;
 				}
 
 				.hd-btn {
@@ -1385,9 +1395,9 @@
 
 			.hot-price {
 				display: flex;
-				justify-content: flex-start;
+				justify-content: space-between;
 				align-items: center;
-				padding: 14rpx 0 30rpx;
+				padding: 14rpx 10rpx 30rpx;
 
 				.hotPrice-box {
 					width: 70rpx;
@@ -1412,9 +1422,8 @@
 				.yuanPrice {
 					margin-left: 10rpx;
 					font-size: 20rpx;
-					font-family: PingFang SC;
 					font-weight: 500;
-					text-decoration: line-through;
+					// text-decoration: line-through;
 					color: #999999;
 				}
 

+ 873 - 809
pages/product/product.vue

@@ -1,810 +1,874 @@
-<template>
-	<view class="container">
-		<!-- 轮播图 -->
-		<top-swiper :imgList="imgList"></top-swiper>
-		<!-- 标题 -->
-		<product-content :goodsObjact="goodsObjact"></product-content>
-		<view class="c-list">
-			<view class="c-row b-b" @click="toggleSpec">
-				<text class="tit">购买数量</text>
-				<view class="con">
-					<text class="selected-text">{{ goodsNumber }}</text>
-				</view>
-				<text class="iconfont iconenter"></text>
-			</view>
-			<!-- <view class="c-row b-b">
-				<text>每购买一个送{{goodsObjact.give_integral}}响亮积分</text>
-			</view> -->
-		</view>
-		<!-- 拼货时间及优惠 -->
-		<!-- <discounts @clickCoupon="Getcoupon" :Info="goodsObjact.store_info" :showCoupon="true"></discounts> -->
-		<!-- 猜你喜欢 -->
-		<!-- <guess-like @Addcar='Addcar' @clickNavTo='navToDetailPage' :goodList = 'good_list||[]'></guess-like> -->
-		<!-- 评价 -->
-		<estimate @navTo="navTo('/pages/product/reply?id=' + goodsid)" v-if="reply" :reply="reply" :list="list"></estimate>
-		<!-- 规格信息 -->
-		<fresh-detail :goodsObjact="goodsObjact"></fresh-detail>
-		<!-- 图文详情 -->
-		<content-text :description="description"></content-text>
-		<!-- 底部高度撑开 -->
-		<view class="contentBottomHeight"></view>
-		<!-- 底部操作菜单 -->
-		<product-bottom @buy="buy" :goodsObjact="goodsObjact" :isVip='isVip' :goodsid="goodsid" @specOPne="specOPne"></product-bottom>
-		<!-- 规格-模态层弹窗 -->
-		<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">
-						<view class="good-name clamp">{{ goodsObjact.store_name }}</view>
-						<text class="price">¥{{ actionPrice }}</text>
-						<!-- <text class="stock">库存:{{ goodsObjact.stock }}件</text> -->
-						<!-- <view class="selected" v-if="goodsType == 0">
-							已选:
-							<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="flex">
-					<view>购买数量</view>
-					<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">确定</button>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-import uniNumberBox from '@/components/uni-number-box.vue';
-import { goodsDetail, cartAdd,seckillGoods } from '@/api/product.js';
-import { mapState } from 'vuex';
-import store from '@/store/index.js';
-import { orderData, userinfo } from '@/api/user.js';
-import { saveUrl } from '@/utils/loginUtils.js';
-// #ifdef H5
-import { weixindata, shareLoad } from '@/utils/wxAuthorized';
-// #endif
-// 头部轮播图
-import topSwiper from './common/topSwiper.vue';
-// 标题
-import productContent from './common/productContent.vue';
-// 到货时间及优惠
-import discounts from './common/discounts.vue';
-// 规格信息
-import freshDetail from './common/freshDetail.vue';
-// 图文详情
-import contentText from './common/contentText.vue';
-// 底部按钮
-import productBottom from './common/productBottom.vue';
-// 猜你喜欢
-import guessLike from './common/guessLike.vue';
-// 评价
-import estimate from './common/estimate.vue';
-export default {
-	components: {
-		uniNumberBox,
-		guessLike,
-		topSwiper,
-		productContent,
-		discounts,
-		freshDetail,
-		contentText,
-		productBottom,
-		estimate
-	},
-	data() {
-		return {
-			goodsStore: 0, //选中库存
-			specList: [],
-			buys_show: true,
-			buys_shows: false,
-			specSelected: [], //选中的分类
-			specClass: 'none', //显示隐藏弹窗
-			many: 1, //1是单规格  2是多规格
-			reply: '', //评论
-			list: '', //商品详情的数据
-			type: 1, //默认支付方式add为
-			goodsType: 0,
-			goodsNumber: 1, //购买数量
-			goodsid: '', //商品id
-			description: '', //商品描述
-			goodsObjact: {
-				percent: 1
-			}, //保存商品数据
-			//图片循环
-			imgList: [],
-			// 对比对象
-			actionPrice: 0, //默认选中商品价格
-			actionImage: '', //默认选中图片
-			good_list: '', //猜你喜欢列表
-			goodsNumberMax: 0, //最大可购买数量
-			// 倒计时数据保存
-			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: '',
-			isVip: '0'
-		};
-	},
-	filters: {
-		parseIntTo(percent) {
-			percent = +percent * 100;
-			if (percent % 1 === 0) {
-				return percent;
-			} else {
-				percent = percent.toFixed(1);
-				return percent;
-			}
-		}
-	},
-	async onLoad(options) {
-		console.log(this.options)
-		let obj = this;
-		userinfo({})
-			.then(({ data }) => {
-				obj.userInfo = data;
-				console.log(data,"123456")
-			})
-		//保存商品id
-		this.goodsid = options.id;
-		this.goodsType = options.type;
-		// 判断有无人邀请
-		if (options.spread) {
-			// 存储邀请人
-			uni.setStorageSync('spread', options.spread);
-		}
-		if (options.isVip) {
-			obj.isVip = options.isVip;
-			console.log(options,'isVip')
-		}
-		console.log(obj.isVip, 'vip');
-		saveUrl();
-		this.goodsDetail();
-		// 注册邀请信息
-		// #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.store_name,
-	// 		desc: obj.goodsObjact.store_info,
-	// 		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: {
-		//收藏
-		toFavorite(item) {
-			let obj = this;
-			item.userCollect = !item.userCollect;
-			if (!item.userCollect) {
-				collectDel({ id: obj.goodsid, category: 'product' }).then(function(e) {
-					uni.showToast({
-						title: '成功取消收藏',
-						type: 'top',
-						duration: 1500
-					});
-				});
-			} else {
-				collectAdd({ id: obj.goodsid, category: 'product' }).then(function(e) {
-					uni.showToast({
-						title: '成功加入收藏',
-						type: 'top',
-						duration: 1500
-					});
-				});
-			}
-		},
-		//选择规格
-		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(',');
-			// 获取当前选中的对象
-			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;
-			} else {
-				(obj.buys_show = false), (obj.buys_shows = true);
-			}
-			if (obj.goodsStore == 0) {
-				obj.buys_show = false;
-				obj.buys_shows = true;
-			}
-			obj.specSelected[ind] = item.attr;
-		},
-		// 打開彈窗
-		specOPne(type = 1) {
-			let obj = this;
-			obj.specClass = 'show';
-			obj.type = type;
-		},
-		//规格弹窗开关
-		toggleSpec(str) {
-			if (this.specClass === 'show') {
-				this.specClass = 'hide';
-				setTimeout(() => {
-					this.specClass = 'none';
-				}, 250);
-			} else if (this.specClass === 'none') {
-				this.specClass = 'show';
-			}
-			// 保存当前购买类型
-			this.type = str;
-		},
-		//领取优惠券
-		Getcoupon() {
-			uni.navigateTo({
-				url: '/pages/coupon/getcoupon'
-			});
-		},
-		// 购买数量变化
-		numberChange(e) {
-			this.goodsNumber = e.number;
-		},
-		// #ifdef H5
-		// 加载微信html5页面分享方法
-		shareDate() {
-			let obj = this;
-			// 保存分享人id链接
-			let url = window.location.href + '&spread=' + this.userInfo.uid;
-			// 判断是否微信浏览器
-			let bool = uni.getStorageSync('weichatBrowser') || '';
-			if (bool) {
-				// 过滤微信强制添加的链接地址
-				url = url.replace(/[\?,&]from=singlemessage/g, '');
-				let data = {
-					link: url, // 分享链接
-					imgUrl: obj.goodsObjact.image, // 分享图标
-					desc: obj.goodsObjact.store_info,
-					title: obj.goodsObjact.store_name,
-					success: function(e) {
-						console.log(e);
-					}
-				};
-				console.log(data, '分享');
-				shareLoad(data);
-			}
-		},
-		// #endif
-		//详情页
-		navToDetailPage(item) {
-			let id = item.id;
-			uni.navigateTo({
-				url: '/pages/product/product?id=' + id
-			});
-		},
-		// 跳转页面
-		navTo(url) {
-			uni.navigateTo({
-				url: '/pages/product/reply?id=' + this.goodsid
-			});
-		},
-		//加入购物车
-		Addcar(item) {
-			let obj = this;
-			cartAdd({
-				cartNum: '1', //商品数量
-				uniqueId: '', //商品标签
-				new: 0, //商品是否新增加到购物车1为不加入0为加入
-				mer_id: '',
-				productId: item.id //商品编号
-			})
-				.then(function(e) {
-					uni.showToast({
-						title: '成功加入购物车',
-						type: 'top',
-						duration: 500,
-						icon: 'none'
-					});
-
-					obj.goodsDetail();
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		goodsDetail() {
-			let obj = this;
-			// 获取普通商品信息
-			goodsDetail({}, this.goodsid).then(function({ data }) {
-				obj.list = data;
-				obj.good_list = data.good_list; //保存猜你喜欢列表
-				obj.reply = data.reply; //保存评论列表
-				let goods = data.storeInfo;
-				obj.goodsObjact = goods;
-				console.log(data.storeInfo,'基本商品');
-				if (obj.goodsObjact.description != null) {
-					obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
-				} //小程序商品详情图超出屏幕问题
-				obj.imgList = goods.slider_image; //保存轮播图
-				obj.specList = data.productAttr; //保存分类列表
-				if (Array.isArray(data.productValue) != true) {
-					obj.many = 2;
-					obj.specList = data.productAttr; //保存产品属性
-					obj.productValue = data.productValue; //保存属性值
-					obj.specSelected = []; //初始化默认选择对象
-					for (let i = 0; i < obj.specList.length; i++) {
-						// 设置默认数据
-						let attrValue = obj.specList[i].attr_value[0];
-						attrValue.check = true;
-						obj.specSelected.push(attrValue.attr);
-					}
-					let str = obj.specSelected.join(',');
-					console.log(str, 'str');
-					// 设置默认值
-					obj.actionPrice = obj.productValue[str].price;
-					obj.goodsNumberMax = obj.productValue[str].stock;
-					obj.actionImage = obj.productValue[str].image;
-					obj.uniqueId = obj.productValue[str].unique;
-					obj.goodsStore = obj.productValue[str].quota;
-				} else {
-					obj.many = 1;
-					obj.productValue = data.productValue; //保存分类查询数据
-					obj.actionPrice = goods.price; //保存默认选中商品价格
-					obj.actionImage = goods.image_base; //保存默认选中商品图片
-					obj.goodsNumberMax = goods.stock; //保存默认选中最大可购买商品数量
-				}
-				obj.shopId = data.mer_id; //保存商店id
-				// #ifdef H5
-				obj.shareDate();
-				// #endif
-			});
-		},
-		// #ifdef H5
-		// 加载微信html5页面分享方法
-		shareDate() {
-			let obj = this;
-			// 保存分享人id链接
-			let url = window.location.href + '&spread=' + this.userInfo.uid;
-			// 判断是否微信浏览器
-			let bool = uni.getStorageSync('weichatBrowser') || '';
-			if (bool) {
-				// 过滤微信强制添加的链接地址
-				url = url.replace(/[\?,&]from=singlemessage/g, '');
-				let data = {
-					link: url, // 分享链接
-					imgUrl: obj.goodsObjact.image, // 分享图标
-					desc: obj.goodsObjact.store_info,
-					title: obj.goodsObjact.store_name,
-					success: function(e) {
-						console.log(e);
-					}
-				};
-				shareLoad(data);
-			}
-		},
-		// #endif
-		// 立即购买
-		buy() {
-			let obj = this;
-			console.log(obj.userInfo);
-			// if (obj.userInfo.lock_spread_user == null) {
-			// 	if (obj.userInfo.unlock_spread_user == null) {
-			// 		uni.showModal({
-			// 			title: '提示',
-			// 			content: '您未绑定或锁定邀请人,无法购买会员礼包,是否前往绑定关系',
-			// 			success: function(res) {
-			// 				if (res.confirm) {
-			// 					console.log('用户点击确定');
-			// 					uni.navigateTo({
-			// 						url: '/pages/set/user'
-			// 					});
-			// 				} else if (res.cancel) {
-			// 					console.log('用户点击取消');
-			// 				}
-			// 			}
-			// 		});
-			// 		return;
-			// 	} else {
-			// 		uni.showModal({
-			// 			title: '提示',
-			// 			content: '已锁定邀请人:' + obj.userInfo.unlock_spread_user.phone + '购买商品后将绑定关系',
-			// 			success: function(res) {
-			// 				if (res.confirm) {
-			// 					obj.buy1();
-			// 				} else if (res.cancel) {
-			// 					console.log('用户点击取消');
-			// 				}
-			// 			}
-			// 		});
-			// 		return;
-			// 	}
-			// }
-			// 创建传值对象
-			let data = {
-				cartNum: obj.goodsNumber, //商品数量
-				new: 1,
-				productId: obj.goodsid, //商品编号
-				uniqueId: obj.uniqueId
-			};
-
-			if (obj.type == 2) {
-				data.new = 0;
-			}
-			cartAdd(data)
-				.then(function(e) {
-					let da = e.data;
-					if (obj.type == 1) {
-						// 跳转到支付页
-						uni.navigateTo({
-							url: '/pages/order/createOrder?id=' + da.cartId
-						});
-					}
-					if (obj.type == 2) {
-						uni.showToast({
-							title: '成功加入购物车',
-							type: 'top',
-							duration: 2000,
-							icon: 'none'
-						});
-						obj.goodsDetail();
-					}
-					obj.toggleSpec();
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		buy1() {
-			let obj = this;
-			let data = {
-				cartNum: obj.goodsNumber, //商品数量
-				new: 1,
-				productId: obj.goodsid, //商品编号
-				uniqueId: obj.uniqueId
-			};
-
-			if (obj.type == 2) {
-				data.new = 0;
-			}
-			cartAdd(data)
-				.then(function(e) {
-					let da = e.data;
-					if (obj.type == 1) {
-						// 跳转到支付页
-						uni.navigateTo({
-							url: '/pages/order/createOrder?id=' + da.cartId
-						});
-					}
-					if (obj.type == 2) {
-						uni.showToast({
-							title: '成功加入购物车',
-							type: 'top',
-							duration: 2000,
-							icon: 'none'
-						});
-						obj.goodsDetail();
-					}
-					obj.toggleSpec();
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		// 阻止触发上级事件
-		stopPrevent() {}
-	}
-};
-</script>
-
-<style lang="scss">
-/*  弹出层 */
-.popup {
-	position: fixed;
-	left: 0;
-	top: 0;
-	right: 0;
-	bottom: 0;
-	z-index: 99;
-
-	&.show {
-		display: block;
-		.mask {
-			animation: showPopup 0.2s linear both;
-		}
-		.layer {
-			animation: showLayer 0.2s linear both;
-		}
-	}
-	&.hide {
-		.mask {
-			animation: hidePopup 0.2s linear both;
-		}
-		.layer {
-			animation: hideLayer 0.2s linear both;
-		}
-	}
-	&.none {
-		display: none;
-	}
-	.mask {
-		position: fixed;
-		top: 0;
-		width: 100%;
-		height: 100%;
-		z-index: 1;
-		background-color: rgba(0, 0, 0, 0.4);
-	}
-	.layer {
-		position: fixed;
-		z-index: 99;
-		bottom: 0;
-		width: 100%;
-		min-height: 30vh;
-		border-radius: 10rpx 10rpx 0 0;
-		background-color: #fff;
-		.btn {
-			height: 66rpx;
-			line-height: 66rpx;
-			border-radius: 100rpx;
-			// background: $uni-color-primary;
-			background: #FF4C4C;
-			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: 10rpx 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;
-			.good-name {
-				padding-top: 20rpx;
-				max-width: 320rpx;
-				font-size: 30rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #1d2023;
-				line-height: 42rpx;
-				margin-bottom: 15rpx;
-			}
-			.price {
-				font-size: 60rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #ff6f0f;
-				// font-size: $font-lg;
-				// color: $uni-color-primary;
-				// margin-bottom: 10rpx;
-			}
-			.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;
-		.tit {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			background: #eee;
-			// margin-left: 10rpx;
-			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: #FCEFF1;
-			border: 1px solid #EF041F;
-			color: #EF041F;
-		}
-	}
-}
-
-//默认商品底部高度
-.goodsBottom {
-	height: 160rpx;
-}
-page {
-	background: #f0f0f0;
-}
-//秒杀、拼团底部高度
-.contentBottomHeight {
-	height: 110rpx;
-}
-//默认商品底部高度
-.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;
-}
-.c-list {
-	margin-top: 20rpx;
-	font-size: $font-sm + 2rpx;
-	color: $font-color-base;
-	background: #fff;
-	.c-row {
-		display: flex;
-		align-items: center;
-		padding: 20rpx 30rpx;
-		position: relative;
-	}
-	.tit {
-		width: 140rpx;
-	}
-	.con {
-		flex: 1;
-		color: $font-color-dark;
-		.selected-text {
-			margin-right: 10rpx;
-		}
-	}
-	.bz-list {
-		height: 40rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-dark;
-		text {
-			display: inline-block;
-			margin-right: 30rpx;
-		}
-	}
-	.con-list {
-		flex: 1;
-		display: flex;
-		flex-direction: column;
-		color: $font-color-dark;
-		line-height: 40rpx;
-	}
-	.red {
-		color: $uni-color-primary;
-	}
-}
-
+<template>
+	<view class="container">
+		<!-- 轮播图 -->
+		<top-swiper :imgList="imgList"></top-swiper>
+		<!-- 标题 -->
+		<product-content :goodsObjact="goodsObjact"></product-content>
+		<view class="c-list">
+			<view class="c-row b-b" @click="toggleSpec">
+				<text class="tit">购买数量</text>
+				<view class="con">
+					<text class="selected-text">{{ goodsNumber }}</text>
+				</view>
+				<text class="iconfont iconenter"></text>
+			</view>
+			<!-- <view class="c-row b-b">
+				<text>每购买一个送{{goodsObjact.give_integral}}响亮积分</text>
+			</view> -->
+		</view>
+		<!-- 拼货时间及优惠 -->
+		<!-- <discounts @clickCoupon="Getcoupon" :Info="goodsObjact.store_info" :showCoupon="true"></discounts> -->
+		<!-- 猜你喜欢 -->
+		<!-- <guess-like @Addcar='Addcar' @clickNavTo='navToDetailPage' :goodList = 'good_list||[]'></guess-like> -->
+		<!-- 评价 -->
+		<estimate @navTo="navTo('/pages/product/reply?id=' + goodsid)" v-if="reply" :reply="reply" :list="list">
+		</estimate>
+		<!-- 规格信息 -->
+		<fresh-detail :goodsObjact="goodsObjact"></fresh-detail>
+		<!-- 图文详情 -->
+		<content-text :description="description"></content-text>
+		<!-- 底部高度撑开 -->
+		<view class="contentBottomHeight"></view>
+		<!-- 底部操作菜单 -->
+		<product-bottom @buy="buy" :goodsObjact="goodsObjact" :isVip='isVip' :goodsid="goodsid" @specOPne="specOPne">
+		</product-bottom>
+		<!-- 规格-模态层弹窗 -->
+		<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">
+						<view class="good-name clamp">{{ goodsObjact.store_name }}</view>
+						<text class="price">¥{{ actionPrice }}</text>
+						<!-- <text class="stock">库存:{{ goodsObjact.stock }}件</text> -->
+						<!-- <view class="selected" v-if="goodsType == 0">
+							已选:
+							<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="flex">
+					<view>购买数量</view>
+					<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">确定</button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import uniNumberBox from '@/components/uni-number-box.vue';
+	import {
+		goodsDetail,
+		cartAdd,
+		seckillGoods
+	} from '@/api/product.js';
+	import {
+		mapState
+	} from 'vuex';
+	import store from '@/store/index.js';
+	import {
+		orderData,
+		userinfo
+	} from '@/api/user.js';
+	import {
+		saveUrl
+	} from '@/utils/loginUtils.js';
+	// #ifdef H5
+	import {
+		weixindata,
+		shareLoad
+	} from '@/utils/wxAuthorized';
+	// #endif
+	// 头部轮播图
+	import topSwiper from './common/topSwiper.vue';
+	// 标题
+	import productContent from './common/productContent.vue';
+	// 到货时间及优惠
+	import discounts from './common/discounts.vue';
+	// 规格信息
+	import freshDetail from './common/freshDetail.vue';
+	// 图文详情
+	import contentText from './common/contentText.vue';
+	// 底部按钮
+	import productBottom from './common/productBottom.vue';
+	// 猜你喜欢
+	import guessLike from './common/guessLike.vue';
+	// 评价
+	import estimate from './common/estimate.vue';
+	export default {
+		components: {
+			uniNumberBox,
+			guessLike,
+			topSwiper,
+			productContent,
+			discounts,
+			freshDetail,
+			contentText,
+			productBottom,
+			estimate
+		},
+		data() {
+			return {
+				goodsStore: 0, //选中库存
+				specList: [],
+				buys_show: true,
+				buys_shows: false,
+				specSelected: [], //选中的分类
+				specClass: 'none', //显示隐藏弹窗
+				many: 1, //1是单规格  2是多规格
+				reply: '', //评论
+				list: '', //商品详情的数据
+				type: 1, //默认支付方式add为
+				goodsType: 0,
+				goodsNumber: 1, //购买数量
+				goodsid: '', //商品id
+				description: '', //商品描述
+				goodsObjact: {
+					percent: 1
+				}, //保存商品数据
+				//图片循环
+				imgList: [],
+				// 对比对象
+				actionPrice: 0, //默认选中商品价格
+				actionImage: '', //默认选中图片
+				good_list: '', //猜你喜欢列表
+				goodsNumberMax: 0, //最大可购买数量
+				// 倒计时数据保存
+				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: '',
+				isVip: '0'
+			};
+		},
+		filters: {
+			parseIntTo(percent) {
+				percent = +percent * 100;
+				if (percent % 1 === 0) {
+					return percent;
+				} else {
+					percent = percent.toFixed(1);
+					return percent;
+				}
+			}
+		},
+		async onLoad(options) {
+			console.log(this.options)
+			let obj = this;
+			userinfo({})
+				.then(({
+					data
+				}) => {
+					obj.userInfo = data;
+					console.log(data, "123456")
+				})
+			//保存商品id
+			this.goodsid = options.id;
+			this.goodsType = options.type;
+			// 判断有无人邀请
+			if (options.spread) {
+				// 存储邀请人
+				uni.setStorageSync('spread', options.spread);
+			}
+			if (options.isVip) {
+				obj.isVip = options.isVip;
+				console.log(options, 'isVip')
+			}
+			console.log(obj.isVip, 'vip');
+			// saveUrl();
+			this.goodsDetail();
+			// 注册邀请信息
+			// #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.store_name,
+		// 		desc: obj.goodsObjact.store_info,
+		// 		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: {
+			//收藏
+			toFavorite(item) {
+				let obj = this;
+				item.userCollect = !item.userCollect;
+				if (!item.userCollect) {
+					collectDel({
+						id: obj.goodsid,
+						category: 'product'
+					}).then(function(e) {
+						uni.showToast({
+							title: '成功取消收藏',
+							type: 'top',
+							duration: 1500
+						});
+					});
+				} else {
+					collectAdd({
+						id: obj.goodsid,
+						category: 'product'
+					}).then(function(e) {
+						uni.showToast({
+							title: '成功加入收藏',
+							type: 'top',
+							duration: 1500
+						});
+					});
+				}
+			},
+			//选择规格
+			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(',');
+				// 获取当前选中的对象
+				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;
+				} else {
+					(obj.buys_show = false), (obj.buys_shows = true);
+				}
+				if (obj.goodsStore == 0) {
+					obj.buys_show = false;
+					obj.buys_shows = true;
+				}
+				obj.specSelected[ind] = item.attr;
+			},
+			// 打開彈窗
+			specOPne(type = 1) {
+				let obj = this;
+				obj.specClass = 'show';
+				obj.type = type;
+			},
+			//规格弹窗开关
+			toggleSpec(str) {
+				if (this.specClass === 'show') {
+					this.specClass = 'hide';
+					setTimeout(() => {
+						this.specClass = 'none';
+					}, 250);
+				} else if (this.specClass === 'none') {
+					this.specClass = 'show';
+				}
+				// 保存当前购买类型
+				this.type = str;
+			},
+			//领取优惠券
+			Getcoupon() {
+				uni.navigateTo({
+					url: '/pages/coupon/getcoupon'
+				});
+			},
+			// 购买数量变化
+			numberChange(e) {
+				this.goodsNumber = e.number;
+			},
+			// #ifdef H5
+			// 加载微信html5页面分享方法
+			shareDate() {
+				let obj = this;
+				// 保存分享人id链接
+				let url = window.location.href + '&spread=' + this.userInfo.uid;
+				// 判断是否微信浏览器
+				let bool = uni.getStorageSync('weichatBrowser') || '';
+				if (bool) {
+					// 过滤微信强制添加的链接地址
+					url = url.replace(/[\?,&]from=singlemessage/g, '');
+					let data = {
+						link: url, // 分享链接
+						imgUrl: obj.goodsObjact.image, // 分享图标
+						desc: obj.goodsObjact.store_info,
+						title: obj.goodsObjact.store_name,
+						success: function(e) {
+							console.log(e);
+						}
+					};
+					console.log(data, '分享');
+					shareLoad(data);
+				}
+			},
+			// #endif
+			//详情页
+			navToDetailPage(item) {
+				let id = item.id;
+				uni.navigateTo({
+					url: '/pages/product/product?id=' + id
+				});
+			},
+			// 跳转页面
+			navTo(url) {
+				uni.navigateTo({
+					url: '/pages/product/reply?id=' + this.goodsid
+				});
+			},
+			//加入购物车
+			Addcar(item) {
+				let obj = this;
+				cartAdd({
+						cartNum: '1', //商品数量
+						uniqueId: '', //商品标签
+						new: 0, //商品是否新增加到购物车1为不加入0为加入
+						mer_id: '',
+						productId: item.id //商品编号
+					})
+					.then(function(e) {
+						uni.showToast({
+							title: '成功加入购物车',
+							type: 'top',
+							duration: 500,
+							icon: 'none'
+						});
+
+						obj.goodsDetail();
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			goodsDetail() {
+				let obj = this;
+				// 获取普通商品信息
+				goodsDetail({}, this.goodsid).then(function({
+					data
+				}) {
+					obj.list = data;
+					obj.good_list = data.good_list; //保存猜你喜欢列表
+					obj.reply = data.reply; //保存评论列表
+					let goods = data.storeInfo;
+					obj.goodsObjact = goods;
+					console.log(data.storeInfo, '基本商品');
+					if (obj.goodsObjact.description != null) {
+						obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
+					} //小程序商品详情图超出屏幕问题
+					obj.imgList = goods.slider_image; //保存轮播图
+					obj.specList = data.productAttr; //保存分类列表
+					if (Array.isArray(data.productValue) != true) {
+						obj.many = 2;
+						obj.specList = data.productAttr; //保存产品属性
+						obj.productValue = data.productValue; //保存属性值
+						obj.specSelected = []; //初始化默认选择对象
+						for (let i = 0; i < obj.specList.length; i++) {
+							// 设置默认数据
+							let attrValue = obj.specList[i].attr_value[0];
+							attrValue.check = true;
+							obj.specSelected.push(attrValue.attr);
+						}
+						let str = obj.specSelected.join(',');
+						console.log(str, 'str');
+						// 设置默认值
+						obj.actionPrice = obj.productValue[str].price;
+						obj.goodsNumberMax = obj.productValue[str].stock;
+						obj.actionImage = obj.productValue[str].image;
+						obj.uniqueId = obj.productValue[str].unique;
+						obj.goodsStore = obj.productValue[str].quota;
+					} else {
+						obj.many = 1;
+						obj.productValue = data.productValue; //保存分类查询数据
+						obj.actionPrice = goods.price; //保存默认选中商品价格
+						obj.actionImage = goods.image_base; //保存默认选中商品图片
+						obj.goodsNumberMax = goods.stock; //保存默认选中最大可购买商品数量
+					}
+					obj.shopId = data.mer_id; //保存商店id
+					// #ifdef H5
+					obj.shareDate();
+					// #endif
+				});
+			},
+			// #ifdef H5
+			// 加载微信html5页面分享方法
+			shareDate() {
+				let obj = this;
+				// 保存分享人id链接
+				let url = window.location.href + '&spread=' + this.userInfo.uid;
+				// 判断是否微信浏览器
+				let bool = uni.getStorageSync('weichatBrowser') || '';
+				if (bool) {
+					// 过滤微信强制添加的链接地址
+					url = url.replace(/[\?,&]from=singlemessage/g, '');
+					let data = {
+						link: url, // 分享链接
+						imgUrl: obj.goodsObjact.image, // 分享图标
+						desc: obj.goodsObjact.store_info,
+						title: obj.goodsObjact.store_name,
+						success: function(e) {
+							console.log(e);
+						}
+					};
+					shareLoad(data);
+				}
+			},
+			// #endif
+			// 立即购买
+			buy() {
+				let obj = this;
+				console.log(obj.userInfo);
+				// if (obj.userInfo.lock_spread_user == null) {
+				// 	if (obj.userInfo.unlock_spread_user == null) {
+				// 		uni.showModal({
+				// 			title: '提示',
+				// 			content: '您未绑定或锁定邀请人,无法购买会员礼包,是否前往绑定关系',
+				// 			success: function(res) {
+				// 				if (res.confirm) {
+				// 					console.log('用户点击确定');
+				// 					uni.navigateTo({
+				// 						url: '/pages/set/user'
+				// 					});
+				// 				} else if (res.cancel) {
+				// 					console.log('用户点击取消');
+				// 				}
+				// 			}
+				// 		});
+				// 		return;
+				// 	} else {
+				// 		uni.showModal({
+				// 			title: '提示',
+				// 			content: '已锁定邀请人:' + obj.userInfo.unlock_spread_user.phone + '购买商品后将绑定关系',
+				// 			success: function(res) {
+				// 				if (res.confirm) {
+				// 					obj.buy1();
+				// 				} else if (res.cancel) {
+				// 					console.log('用户点击取消');
+				// 				}
+				// 			}
+				// 		});
+				// 		return;
+				// 	}
+				// }
+				// 创建传值对象
+				let data = {
+					cartNum: obj.goodsNumber, //商品数量
+					new: 1,
+					productId: obj.goodsid, //商品编号
+					uniqueId: obj.uniqueId
+				};
+
+				if (obj.type == 2) {
+					data.new = 0;
+				}
+				cartAdd(data)
+					.then(function(e) {
+						let da = e.data;
+						if (obj.type == 1) {
+							// 跳转到支付页
+							uni.navigateTo({
+								url: '/pages/order/createOrder?id=' + da.cartId
+							});
+						}
+						if (obj.type == 2) {
+							uni.showToast({
+								title: '成功加入购物车',
+								type: 'top',
+								duration: 2000,
+								icon: 'none'
+							});
+							obj.goodsDetail();
+						}
+						obj.toggleSpec();
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			buy1() {
+				let obj = this;
+				let data = {
+					cartNum: obj.goodsNumber, //商品数量
+					new: 1,
+					productId: obj.goodsid, //商品编号
+					uniqueId: obj.uniqueId
+				};
+
+				if (obj.type == 2) {
+					data.new = 0;
+				}
+				cartAdd(data)
+					.then(function(e) {
+						let da = e.data;
+						if (obj.type == 1) {
+							// 跳转到支付页
+							uni.navigateTo({
+								url: '/pages/order/createOrder?id=' + da.cartId
+							});
+						}
+						if (obj.type == 2) {
+							uni.showToast({
+								title: '成功加入购物车',
+								type: 'top',
+								duration: 2000,
+								icon: 'none'
+							});
+							obj.goodsDetail();
+						}
+						obj.toggleSpec();
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			// 阻止触发上级事件
+			stopPrevent() {}
+		}
+	};
+</script>
+
+<style lang="scss">
+	/*  弹出层 */
+	.popup {
+		position: fixed;
+		left: 0;
+		top: 0;
+		right: 0;
+		bottom: 0;
+		z-index: 99;
+
+		&.show {
+			display: block;
+
+			.mask {
+				animation: showPopup 0.2s linear both;
+			}
+
+			.layer {
+				animation: showLayer 0.2s linear both;
+			}
+		}
+
+		&.hide {
+			.mask {
+				animation: hidePopup 0.2s linear both;
+			}
+
+			.layer {
+				animation: hideLayer 0.2s linear both;
+			}
+		}
+
+		&.none {
+			display: none;
+		}
+
+		.mask {
+			position: fixed;
+			top: 0;
+			width: 100%;
+			height: 100%;
+			z-index: 1;
+			background-color: rgba(0, 0, 0, 0.4);
+		}
+
+		.layer {
+			position: fixed;
+			z-index: 99;
+			bottom: 0;
+			width: 100%;
+			min-height: 30vh;
+			border-radius: 10rpx 10rpx 0 0;
+			background-color: #fff;
+
+			.btn {
+				height: 66rpx;
+				line-height: 66rpx;
+				border-radius: 100rpx;
+				// background: $uni-color-primary;
+				background: #FF4C4C;
+				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: 10rpx 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;
+
+				.good-name {
+					padding-top: 20rpx;
+					max-width: 320rpx;
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #1d2023;
+					line-height: 42rpx;
+					margin-bottom: 15rpx;
+				}
+
+				.price {
+					font-size: 60rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #ff6f0f;
+					// font-size: $font-lg;
+					// color: $uni-color-primary;
+					// margin-bottom: 10rpx;
+				}
+
+				.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;
+
+			.tit {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				background: #eee;
+				// margin-left: 10rpx;
+				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: #FCEFF1;
+				border: 1px solid #EF041F;
+				color: #EF041F;
+			}
+		}
+	}
+
+	//默认商品底部高度
+	.goodsBottom {
+		height: 160rpx;
+	}
+
+	page {
+		background: #f0f0f0;
+	}
+
+	//秒杀、拼团底部高度
+	.contentBottomHeight {
+		height: 110rpx;
+	}
+
+	//默认商品底部高度
+	.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;
+	}
+
+	.c-list {
+		margin-top: 20rpx;
+		font-size: $font-sm + 2rpx;
+		color: $font-color-base;
+		background: #fff;
+
+		.c-row {
+			display: flex;
+			align-items: center;
+			padding: 20rpx 30rpx;
+			position: relative;
+		}
+
+		.tit {
+			width: 140rpx;
+		}
+
+		.con {
+			flex: 1;
+			color: $font-color-dark;
+
+			.selected-text {
+				margin-right: 10rpx;
+			}
+		}
+
+		.bz-list {
+			height: 40rpx;
+			font-size: $font-sm + 2rpx;
+			color: $font-color-dark;
+
+			text {
+				display: inline-block;
+				margin-right: 30rpx;
+			}
+		}
+
+		.con-list {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			color: $font-color-dark;
+			line-height: 40rpx;
+		}
+
+		.red {
+			color: $uni-color-primary;
+		}
+	}
 </style>

+ 24 - 1
pages/shop/djqQm.vue

@@ -5,7 +5,7 @@
 				<view>
 					<view class="djq-top flex f-d-c f-j-c">
 						<view class="djq-name">{{ item.coupon_title }}</view>
-						<view class="djq-time">{{ item.end_time == 0 ? '永久有效' : '有效期至' + item.end_time }}</view>
+						<view class="djq-time">{{ item.end_time | showTime }}</view>
 					</view>
 					<view class="djq-body">
 						<view class="used" v-if="item.status == 1">
@@ -40,6 +40,27 @@
 		components: {
 			tkiQrcode
 		},
+		filters: {
+			showTime(val) {
+				let str = ''
+				if (val == 0) {
+					str = '永久有效'
+				}
+				if (val) {
+					var time = new Date(val * 1000);
+					var y = time.getFullYear();
+					var m = time.getMonth() + 1;
+					var d = time.getDate();
+					var h = time.getHours();
+					var mm = time.getMinutes();
+					var s = time.getSeconds();
+					str = '有效期至:' + y + '年' + m + '月' + d + '日'
+					console.log(str)
+				}
+				return str
+			}
+
+		},
 		data() {
 			return {
 				code: '',
@@ -130,8 +151,10 @@
 			overflow: hidden;
 
 			.djq-name {
+				padding: 0 60rpx;
 				font-size: 44rpx;
 				font-weight: bold;
+				text-align: center;
 				color: #222222;
 			}
 

+ 17 - 3
pages/shop/shopDetail.vue

@@ -29,7 +29,8 @@
 			<scroll-view class="scroll-box flex" @scroll="scroll" scroll-x="true" :scroll-with-animation="true"
 				scroll-left="10px">
 				<view class="scroll-item" v-for="(item, index) in info.slider_image" :key="index">
-					<image class="scroll-image" :src="item" mode="heightFix"></image>
+					<image class="scroll-image" :src="item" mode="heightFix" @click="openImg(info.slider_image,item)">
+					</image>
 				</view>
 			</scroll-view>
 		</view>
@@ -62,7 +63,7 @@
 			<scroll-view class="scroll-box flex" @scroll="scroll" scroll-x="true" :scroll-with-animation="true"
 				scroll-left="10px">
 				<view class="scroll-item" v-for="(item, index) in info.images" :key="index">
-					<image class="scroll-image" :src="item" mode="heightFix"></image>
+					<image class="scroll-image" :src="item" mode="heightFix" @click="openImg(info.images,item)"></image>
 				</view>
 			</scroll-view>
 		</view>
@@ -71,7 +72,7 @@
 		</view>
 		<view class="btn-box flex">
 			<view class="btn-left" @click="tocall()">联系商家</view>
-			<view class="btn-right" @click="markertap()">导航到店</view>
+			<view class="btn-right" @click="toGaodeMap()">导航到店</view>
 		</view>
 
 	</view>
@@ -197,6 +198,19 @@
 				});
 				// #endif
 			},
+			//
+			openImg(list, item) {
+				uni.previewImage({
+					current: item,
+					urls: list
+				})
+			},
+			// 调用高德
+			toGaodeMap() {
+				let obj = this
+				window.location.href =
+					`https://uri.amap.com/marker?position=${obj.info.longitude},${obj.info.latitude}&name=${obj.info.name}`;
+			},
 
 		}
 	};

+ 10 - 4
pages/shop/shopList.vue

@@ -33,12 +33,13 @@
 						</view>
 						<view class="djq-hd flex f-j-sb">
 							<view class="buy-info">
-								{{item.count}}人已购买
+								<!-- {{item.count}}人已购买 -->
 							</view>
 							<view class="hd-btn">
 								<image src="../../static/icon/call.png" mode="" style="margin-right: 15rpx;"
 									@click.stop="makeCall(item.phone)"></image>
-								<image src="../../static/icon/dh.png" mode="" @click.stop="dh(item)"></image>
+								<image src="../../static/icon/dh.png" mode=""
+									@click.stop="toGaodeMap(item.latitude,item.longitude,item.name)"></image>
 							</view>
 						</view>
 					</view>
@@ -189,7 +190,12 @@
 					}
 					obj.loaded = true
 				})
-			}
+			},
+			// 调用高德
+			toGaodeMap(latitude, longitude, address) {
+				console.log('选择高德', latitude, longitude, address);
+				window.location.href = `https://uri.amap.com/marker?position=${longitude},${latitude}&name=${address}`;
+			},
 		}
 	}
 </script>
@@ -307,7 +313,7 @@
 					font-weight: 500;
 					color: #FF440D;
 					padding: 0 15rpx;
-					background-color: #fcf3f0;
+					background-color: #fff;
 				}
 
 				.hd-btn {

+ 13 - 2
pages/user/myyhq.vue

@@ -21,6 +21,9 @@
 									{{qitem.coupon_price}}
 								</view>
 							</view>
+							<view class="store-name">
+								商家:{{qitem.name}}
+							</view>
 						</view>
 						<view class="dhq-right fs0 flex f-d-c f-j-sa">
 							<view class="right-btn" @click.stop="userNow(qitem)" v-if="tabCurrentIndex == 0">
@@ -214,7 +217,7 @@
 
 	.shop-dhq {
 		width: 702rpx;
-		height: 171rpx;
+		// height: 171rpx;
 		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.15);
 		margin: auto;
 		border-radius: 20rpx;
@@ -231,8 +234,15 @@
 				color: #333333;
 			}
 
+			.store-name {
+				padding-left: 20rpx;
+				font-size: 24rpx;
+				font-weight: bold;
+			}
+
 			.dhq-price {
 				padding-top: 20rpx;
+				padding-left: 20rpx;
 
 				.j-price {
 					font-size: 38rpx;
@@ -264,7 +274,8 @@
 		}
 
 		.dhq-right {
-			height: 80%;
+			// height: 80%;
+			min-height: 171rpx;
 
 			.right-btn {
 				// width: 105rpx;

BIN
unpackage/dist/build/h5/5-19-4.rar → unpackage/dist/build/h5/5-20-5.rar


+ 1 - 1
unpackage/dist/build/h5/index.html

@@ -1,2 +1,2 @@
 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>想亮商城</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
-            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/index/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/index/static/js/chunk-vendors.58012eb0.js></script><script src=/index/static/js/index.3b2ee238.js></script></body></html>
+            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/index/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/index/static/js/chunk-vendors.58012eb0.js></script><script src=/index/static/js/index.4905c7d5.js></script></body></html>

Plik diff jest za duży
+ 0 - 0
unpackage/dist/build/h5/static/js/index.3b2ee238.js


Plik diff jest za duży
+ 0 - 0
unpackage/dist/build/h5/static/js/index.4905c7d5.js


Plik diff jest za duży
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-index.51a3dd72.js


Plik diff jest za duży
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-index.82d4780a.js


Plik diff jest za duży
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-product-product.07b4906c.js


Plik diff jest za duży
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-product-product.a2793054.js


Plik diff jest za duży
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-shop-djqQm.73c3bdc5.js


Plik diff jest za duży
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-shop-djqQm.ef0f9aa4.js


Plik diff jest za duży
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-shop-shopDetail.53f61505.js


Plik diff jest za duży
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-shop-shopDetail.84deda6c.js


Plik diff jest za duży
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-shop-shopList.07a8d99e.js


Plik diff jest za duży
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-shop-shopList.8736eb6d.js


Plik diff jest za duży
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-myyhq.2f5fa890.js


Plik diff jest za duży
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-myyhq.70ca2226.js


Plik diff jest za duży
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-withdrawal.bc16ff7f.js


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików