hwq 3 years ago
parent
commit
877e246d0b

+ 11 - 1
api/order.js

@@ -151,4 +151,14 @@ export function fugou(data) {
 		method: 'post',
 		data
 	});
-}
+}
+
+
+// 添加积分商品
+export function jfOrderCreate(data) {
+	return request({
+		url: '/api/juniu/order_create',
+		method: 'post',
+		data
+	});
+}

+ 17 - 0
api/product.js

@@ -184,3 +184,20 @@ export function reply_list(data,id) {
 	});
 }
 
+// 获取积分商品列表
+export function getJfList(data) {
+	return request({
+		url:'/api/juniu/lst',
+		method: 'post',
+		data
+	})
+}
+
+// 获取积分商品详情
+export function getJfDetail(data) {
+	return request({
+		url:'/api/juniu/info',
+		method: 'get',
+		data
+	})
+}

+ 4 - 4
manifest.json

@@ -78,9 +78,9 @@
             "splashscreen" : {
                 "androidStyle" : "default",
                 "android" : {
-                    "hdpi" : "C:/Users/Administrator/Desktop/惠莱/惠莱/480.png",
-                    "xhdpi" : "C:/Users/Administrator/Desktop/惠莱/惠莱/720.png",
-                    "xxhdpi" : "C:/Users/Administrator/Desktop/惠莱/惠莱/1080.png"
+                    "hdpi" : "",
+                    "xhdpi" : "",
+                    "xxhdpi" : ""
                 },
                 "iosStyle" : "common",
                 "ios" : {
@@ -161,7 +161,7 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    "target" : "http://shop.zhengyjk1994.com", //请求的目标域名
+                    "target" : "http://hl.frp.liuniu946.com", //请求的目标域名
 
                     // "target" : "http://po.frp.liuniu946.com", //请求的目标域名
                     "changeOrigin" : true,

+ 20 - 9
pages.json

@@ -282,9 +282,9 @@
 			}
 		},
 		{
-			"path": "pages/index/fugou",
+			"path": "pages/index/jfgood",
 			"style": {
-				"navigationBarTitleText": "报单"
+				"navigationBarTitleText": "积分商品"
 			}
 		},
 		{
@@ -380,7 +380,7 @@
 		{
 			"path": "pages/story/story",
 			"style": {
-				"navigationBarTitleText": "品牌故事"
+				"navigationBarTitleText": "公司介绍"
 			}
 		},
 		{
@@ -396,6 +396,17 @@
 				}
 			}
 		},
+		{
+			"path": "pages/product/jfproduct",
+			"style": {
+				"navigationStyle": "custom",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
 		{
 			"path": "pages/user/jiedian",
 			"style": {
@@ -497,12 +508,6 @@
 			// 	"text": "品牌故事"
 			// },
 			// {
-			// 	"pagePath": "pages/cart/cart",
-			// 	"iconPath": "static/tabBar/tab-cart.png",
-			// 	"selectedIconPath": "static/tabBar/tab-cart-current.png",
-			// 	"text": "购物车"
-			// },
-			// {
 			// 	"pagePath": "pages/user/user",
 			// 	"iconPath": "./static/tabbar/tabbar07.png",
 			// 	"selectedIconPath": "static/tabbar/tabbar06.png",
@@ -514,6 +519,12 @@
 				"selectedIconPath": "static/tabbar/tabbar10.png",
 				"text": "发现"
 			},
+			{
+				"pagePath": "pages/cart/cart",
+				"iconPath": "static/tabBar/tab-cart.png",
+				"selectedIconPath": "static/tabBar/tab-cart-current.png",
+				"text": "购物车"
+			},
 			{
 				"pagePath": "pages/shop/shop",
 				"iconPath": "static/tabbar/tabbar03.png",

+ 191 - 79
pages/cart/cart.vue

@@ -1,65 +1,129 @@
 <template>
 	<view class="container">
-		<!-- 空白页 -->
-		<view v-if="!hasLogin || empty === true" class="empty">
-			<image src="/static/error/emptyCart.png" class="emptyImg" mode="aspectFit"></image>
-			<view v-if="hasLogin" class="empty-tips">
-				空空如也
-				<navigator class="navigator" v-if="hasLogin" url="../index/index" open-type="switchTab">随便逛逛></navigator>
-			</view>
-			<view v-else class="empty-tips">
-				空空如也
-				<view class="navigator" @click="navToLogin">去登陆></view>
-			</view>
+		<view class="nav-bar flex">
+			<view class="nav-item" v-for="(item, index) in navList" :key="index" :class="{ active: currentIndex == index }" @click="navClick(index)">{{ item.tit }}</view>
 		</view>
-		<view v-else>
-			<!-- 购物车头部 -->
-			<view class="cart-hand flex">
-				<view class="hand-tit">
-					购物车共 <text>{{ ' '+cartList.length}} 件</text>商品
+		<!-- 普通商品列表 -->
+		<view v-if="currentIndex == 0">
+			<!-- 空白页 -->
+			<view v-if="!hasLogin || empty === true" class="empty">
+				<image src="/static/error/emptyCart.png" class="emptyImg" mode="aspectFit"></image>
+				<view v-if="hasLogin" class="empty-tips">
+					空空如也
+					<navigator class="navigator" v-if="hasLogin" url="../index/index" open-type="switchTab">随便逛逛></navigator>
 				</view>
-				<view class="hand-btn" @click="clearCart()">
-					清空购物车
+				<view v-else class="empty-tips">
+					空空如也
+					<view class="navigator" @click="navToLogin">去登陆></view>
 				</view>
 			</view>
-			<!-- 列表 -->
-			<view class="cart-list">
-				<block v-for="(item, index) in cartList" :key="item.id">
-					<view class="cart-item" :class="{ 'b-b': index !== cartList.length - 1 }">
-						<view class="image-wrapper">
-							<image
-								:src="item.productInfo.image"
-								:class="[item.loaded]"
-								mode="aspectFill"
-								lazy-load
-								@load="onImageLoad('cartList', index)"
-								@error="onImageError('cartList', index)"
-							></image>
-							<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.checked }" @click="check('item', index)"></view>
-						</view>
-						<view class="item-right">
-							<text class="clamp title">{{ item.productInfo.store_name }}</text>
-							<text class="attr">{{ item.productInfo.attrInfo.suk }}</text>
-							<text class="price">¥{{ item.productInfo.price }}</text>
-							<view class="munbox flex" >
-								<image src="../../static/img/reduce.png" mode="" @click="reduce(item,index)"></image>
-								<input type="number" :value="item.cart_num" disabled/>
-								<image src="../../static/img/add.png" mode="" @click="add(item)"></image>
+			<view v-else>
+				<!-- 购物车头部 -->
+				<view class="cart-hand flex">
+					<view class="hand-tit">
+						购物车共
+						<text>{{ ' ' + cartList.length }} 件</text>
+						商品
+					</view>
+					<view class="hand-btn" @click="clearCart()">清空购物车</view>
+				</view>
+				<!-- 列表 -->
+				<view class="cart-list">
+					<block v-for="(item, index) in cartList" :key="item.id">
+						<view class="cart-item" :class="{ 'b-b': index !== cartList.length - 1 }">
+							<view class="image-wrapper">
+								<image
+									:src="item.productInfo.image"
+									:class="[item.loaded]"
+									mode="aspectFill"
+									lazy-load
+									@load="onImageLoad('cartList', index)"
+									@error="onImageError('cartList', index)"
+								></image>
+								<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.checked }" @click="check('item', index)"></view>
+							</view>
+							<view class="item-right">
+								<text class="clamp title">{{ item.productInfo.store_name }}</text>
+								<text class="attr">{{ item.productInfo.attrInfo.suk }}</text>
+								<text class="price">¥{{ item.productInfo.price }}</text>
+								<view class="munbox flex">
+									<image src="../../static/img/reduce.png" mode="" @click="reduce(item, index)"></image>
+									<input type="number" :value="item.cart_num" disabled />
+									<image src="../../static/img/add.png" mode="" @click="add(item)"></image>
+								</view>
 							</view>
 						</view>
+					</block>
+				</view>
+				<!-- 底部菜单栏 -->
+				<view class="action-section">
+					<view class="checkbox"><view class="iconfont iconroundcheckfill icon-checked-box" @click="check('all')" :class="{ 'icon-checked': allChecked }"></view></view>
+					<view class="total-box">
+						<text class="price">¥{{ total }}</text>
 					</view>
-				</block>
+					<button type="primary" class="no-border confirm-btn" @click="createOrder">去结算</button>
+				</view>
+			</view>
+		</view>
+		<!-- 会员商品列表 -->
+		<view v-if="currentIndex == 1">
+			<view v-if="!hasLogin || vipempty === true" class="empty">
+				<image src="/static/error/emptyCart.png" class="emptyImg" mode="aspectFit"></image>
+				<view v-if="hasLogin" class="empty-tips">
+					空空如也
+					<navigator class="navigator" v-if="hasLogin" url="../index/index" open-type="switchTab">随便逛逛></navigator>
+				</view>
+				<view v-else class="empty-tips">
+					空空如也
+					<view class="navigator" @click="navToLogin">去登陆></view>
+				</view>
 			</view>
-			<!-- 底部菜单栏 -->
-			<view class="action-section">
-				<view class="checkbox">
-					<view class="iconfont iconroundcheckfill icon-checked-box" @click="check('all')" :class="{ 'icon-checked': allChecked }"></view>
+			<view v-else>
+				<!-- 购物车头部 -->
+				<view class="cart-hand flex">
+					<view class="hand-tit">
+						购物车共
+						<text>{{ ' ' + vipcartList.length }} 件</text>
+						商品
+					</view>
+					<view class="hand-btn" @click="clearCart()">清空购物车</view>
+				</view>
+				<!-- 列表 -->
+				<view class="cart-list">
+					<block v-for="(item, index) in vipcartList" :key="item.id">
+						<view class="cart-item" :class="{ 'b-b': index !== cartList.length - 1 }">
+							<view class="image-wrapper">
+								<image
+									:src="item.productInfo.image"
+									:class="[item.loaded]"
+									mode="aspectFill"
+									lazy-load
+									@load="onImageLoad('cartList', index)"
+									@error="onImageError('cartList', index)"
+								></image>
+								<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.checked }" @click="check('item', index)"></view>
+							</view>
+							<view class="item-right">
+								<text class="clamp title">{{ item.productInfo.store_name }}</text>
+								<text class="attr">{{ item.productInfo.attrInfo.suk }}</text>
+								<text class="price">¥{{ item.productInfo.price }}</text>
+								<view class="munbox flex">
+									<image src="../../static/img/reduce.png" mode="" @click="reduce(item, index)"></image>
+									<input type="number" :value="item.cart_num" disabled />
+									<image src="../../static/img/add.png" mode="" @click="add(item)"></image>
+								</view>
+							</view>
+						</view>
+					</block>
 				</view>
-				<view class="total-box">
-					<text class="price">¥{{ total }}</text>
-					
+				<!-- 底部菜单栏 -->
+				<view class="action-section">
+					<view class="checkbox"><view class="iconfont iconroundcheckfill icon-checked-box" @click="check('all')" :class="{ 'icon-checked': allChecked }"></view></view>
+					<view class="total-box">
+						<text class="price">¥{{ viptotal }}</text>
+					</view>
+					<button type="primary" class="no-border confirm-btn" @click="createOrder">去结算</button>
 				</view>
-				<button type="primary" class="no-border confirm-btn" @click="createOrder">去结算</button>
 			</view>
 		</view>
 	</view>
@@ -76,10 +140,24 @@ export default {
 	},
 	data() {
 		return {
+			currentIndex: 0, //0显示普通购物车1显示vip购物车
+			isvip: 0, //是否是vip
 			total: 0, //总价格
+			viptotal: 0, //vip总价格
 			allChecked: false, //全选状态  true|false
+			vipallChecked: false, //vip全选状态  true|false
 			empty: false, //空白页现实  true|false
-			cartList: []
+			vipempty:false,//vip空白页现实  true|false
+			cartList: [], //普通购物车
+			vipcartList: [], //vip购物车
+			navList: [
+				{
+					tit: '普通商品'
+				},
+				{
+					tit: '会员商品'
+				}
+			]
 		};
 	},
 	onShow() {
@@ -101,35 +179,34 @@ export default {
 		...mapState('user', ['hasLogin'])
 	},
 	methods: {
-		reduce(item,index) {
-			if(item.cart_num == 1) {
+		reduce(item, index) {
+			if (item.cart_num == 1) {
 				uni.showModal({
 					content: '删除该商品?',
 					success: e => {
 						if (e.confirm) {
-							this.deleteCartItem(index)
+							this.deleteCartItem(index);
 						}
 					}
 				});
-				
-			}else {
-				item.cart_num--
-				this.newNumberChange(item)
+			} else {
+				item.cart_num--;
+				this.newNumberChange(item);
 			}
 		},
 		add(item) {
-			console.log(item)
-			if(item.productInfo.stock > item.cart_num) {
-				item.cart_num++
-				this.newNumberChange(item)
-			}else {
-				return 
+			console.log(item);
+			if (item.productInfo.stock > item.cart_num) {
+				item.cart_num++;
+				this.newNumberChange(item);
+			} else {
+				return;
 			}
 		},
 		//请求数据
 		async loadData() {
 			let obj = this;
-			getCartList({})
+			getCartList({ vip: obj.isvip })
 				.then(function(e) {
 					// 获取当前购物车物品增加数量
 					let nub = obj.cartList.length;
@@ -186,6 +263,9 @@ export default {
 			}
 			this.calcTotal(type);
 		},
+		navClick(index) {
+			this.currentIndex = index;
+		},
 		//数量
 		numberChange(data) {
 			let arr = this.cartList[data.index];
@@ -242,7 +322,12 @@ export default {
 		},
 		//计算总价
 		calcTotal() {
-			let list = this.cartList;
+			if(this.currentIndex == '0'){
+				let list = this.cartList;
+			}
+			if(this.currentIndex == '1') {
+				let list = this.vipcartList;
+			}
 			if (list.length === 0) {
 				this.empty = true;
 				return;
@@ -256,8 +341,15 @@ export default {
 					checked = false;
 				}
 			});
-			this.allChecked = checked;
-			this.total = Number(total.toFixed(2));
+			if(this.currentIndex == '0'){
+				this.allChecked = checked;
+				this.total = Number(total.toFixed(2));
+			}
+			if(this.currentIndex == '1') {
+				this.vipallChecked = checked;
+				this.viptotal = Number(total.toFixed(2));
+			}
+			
 		},
 		//创建订单
 		createOrder() {
@@ -285,7 +377,7 @@ export default {
 	.empty {
 		position: fixed;
 		left: 0;
-		top: 0;
+		top: 180rpx;
 		width: 100%;
 		height: 100vh;
 		padding-bottom: 100rpx;
@@ -314,11 +406,11 @@ export default {
 .cart-item {
 	width: 710rpx;
 	height: 210rpx;
-	background: #FFFFFF;
+	background: #ffffff;
 	box-shadow: 0px 0px 10rpx 0rpx rgba(0, 0, 0, 0.1);
 	border-radius: 10rpx;
 	margin: 20rpx auto;
-	
+
 	display: flex;
 	position: relative;
 	padding: 30rpx 26rpx 30rpx 80rpx;
@@ -381,7 +473,7 @@ export default {
 			color: $font-color-light;
 			height: 50rpx;
 			line-height: 50rpx;
-			
+
 			font-size: 26rpx;
 			font-family: PingFang SC;
 			font-weight: bold;
@@ -394,7 +486,7 @@ export default {
 			font-size: 34rpx;
 			font-family: PingFang SC;
 			font-weight: bold;
-			color: #FF4C4C;
+			color: #ff4c4c;
 		}
 		.step {
 			margin-top: 20rpx;
@@ -474,7 +566,7 @@ export default {
 		flex-direction: column;
 		text-align: right;
 		padding-right: 40rpx;
-		
+
 		.price {
 			font-size: $font-lg;
 			color: $font-color-dark;
@@ -505,7 +597,7 @@ export default {
 .cart-hand {
 	width: 750rpx;
 	height: 88rpx;
-	background: #FFFFFF;
+	background: #ffffff;
 	font-size: 30rpx;
 	font-family: PingFang SC;
 	font-weight: bold;
@@ -515,21 +607,41 @@ export default {
 	padding-right: 26rpx;
 	.hand-tit {
 		text {
-			color: #FF4C4C;
+			color: #ff4c4c;
 		}
-	
 	}
 	.hand-btn {
 		width: 164rpx;
 		height: 62rpx;
-		border: 2rpx solid #FF4C4C;
+		border: 2rpx solid #ff4c4c;
 		border-radius: 31rpx;
 		font-size: 26rpx;
 		font-family: PingFang SC;
 		font-weight: bold;
-		color: #FF4C4C;
+		color: #ff4c4c;
 		line-height: 62rpx;
 		text-align: center;
 	}
 }
+.nav-bar {
+	background: #FFFFFF;
+	width: 100%;
+	line-height: 86rpx;
+	font-size: 32rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #333333;
+	justify-content: space-around;
+	border-bottom: #e0e0e0 1px solid;
+
+	.active {
+		color: #52C696;
+		border-bottom: 3rpx solid #52C696;
+	}
+
+	.nav-item {
+		// flex-grow: 1;
+		text-align: center;
+	}
+}
 </style>

File diff suppressed because it is too large
+ 0 - 99
pages/index/fugou.vue


+ 18 - 83
pages/index/index.vue

@@ -21,43 +21,8 @@
 				<view class="swiper-dots">
 				</view>
 			</swiper>
-			<!-- <view class="customs">
-				<image src="../../static/image/baodan.png" mode=""></image>
-			</view> -->
-			<!-- <view class="customs-content">
-				<view class="backgroundimg1">
-					<image src="../../static/image/background02.png" mode=""></image>
-				</view>
-				<view class="box">
-					<view class="customs-img">
-						<image :src="fugou.image" mode=""></image>
-					</view>
-					<view class="customstext">
-						<view class="customstext1">
-							<view class="customstext-title clamp">
-								{{fugou.store_name}}
-							</view>
-							<view class="customstext-product clamp">
-								{{fugou.store_info}}
-							</view>
-						</view>
-						<view class="customsprice">
-							<view class="customsprice-left">
-								健康价:¥
-							</view>
-							<view class="customsprice-between">
-								{{price}}
-							</view>
-							<view class="customsprice-right" @click="navTo('/pages/index/fugou')">
-								立即报单
-							</view>
-						</view>
-					</view>
-				</view>
-
-			</view> -->
 			<view class="title-box">
-				<view class="boxx">
+				<view class="boxx" @click="navTo('/pages/category/category')">
 					<view class="boxx-top">
 						<image src="../../static/index/index06.png" mode=""></image>
 					</view>
@@ -65,7 +30,7 @@
 						全部商品
 					</view>
 				</view>
-				<view class="boxx">
+				<view class="boxx" @click="navTo('/pages/index/jfgood')">
 					<view class="boxx-top">
 						<image src="../../static/index/index08.png" mode=""></image>
 					</view>
@@ -73,7 +38,7 @@
 						积分商城
 					</view>
 				</view>
-				<view class="boxx">
+				<view class="boxx" @click="navTo('/pages/story/story')">
 					<view class="boxx-top">
 						<image src="../../static/index/index02.png" mode=""></image>
 					</view>
@@ -81,7 +46,7 @@
 						公司介绍
 					</view>
 				</view>
-				<view class="boxx">
+				<view class="boxx" @click="navTo('/pages/user/shareQrCode')">
 					<view class="boxx-top">
 						<image src="../../static/index/index01.png" mode=""></image>
 					</view>
@@ -102,7 +67,7 @@
 					@click="navTo('/pages/product/product?id=' + item.id)">
 					<view class="img">
 						<image class="hlbg" src="../../static/index/index04.png" mode=""></image>
-						<image :src="item.image" mode=""></image>
+						<image class="image" :src="item.image" mode=""></image>
 					</view>
 					<view class="jifen-list">
 						<view class="box-title">
@@ -120,18 +85,11 @@
 							<view class="price-left">
 								{{(item.price*1).toFixed(0)}}
 							</view>
-							<view class="price-right">
-								¥{{item.ot_price}}
-							</view>
 						</view>
 					</view>
 				</view>
 			</view>
 		</view>
-		<!-- 	
-		<view class="fiexd">
-			<image src="../../static/image/background03.png" mode=""></image>
-		</view> -->
 	</view>
 </template>
 <script>
@@ -145,32 +103,12 @@
 	export default {
 		components: {
 
-		},
-		watch: {
-			//自适应swiper高度
-			checkid(newValue, oldValue) {
-				let obj = this;
-				if (newValue == 0) {
-					let bHeight = Math.ceil(obj.bastList.length / 2);
-					obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
-				}
-				if (newValue == 1) {
-					let bHeight = Math.ceil(obj.goodsList.length / 2);
-					obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
-				}
-				if (newValue == 2) {
-					let bHeight = Math.ceil(obj.bastBanner.length / 2);
-					obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
-				}
-			},
-			// 初次加载页面高度时修改页面高度
-
 		},
 		data() {
 			return {
 				carouselList: [], //轮播列表
 				couponArray: '',
-				bastList: [], //精品推荐
+				bastList: [], //会员礼包
 				fugou: '', //复购商品
 				price: '', //复购价格
 			}
@@ -185,18 +123,11 @@
 					.then(({
 						data
 					}) => {
-						console.log(data, 'dddd')
-						this.fugou = data.register_order;
-						this.price = data.register_price;
 						let goods = data.info;
 						this.carouselList = data.banner;
 						this.swiperLength = this.carouselList.length;
-						this.menusList = data.menus;
 						this.goodsList = goods.firstList; //最新商品
-						this.bastList = goods.bastList; //精品推荐
-						console.log(this.bastList, 'this.bastList6666666666666666666666');
-						this.bastBanner = data.benefit; //促销单品
-						this.$set(this, 'couponArray', data.couponList); //保存卡包券
+						this.bastList = goods.vipList; //精品推荐
 
 						uni.stopPullDownRefresh();
 					})
@@ -216,7 +147,12 @@
 			},
 			navTo(url) {
 				uni.navigateTo({
-					url
+					url,
+					fail() {
+						uni.switchTab({
+							url
+						})
+					}
 				})
 			}
 		}
@@ -483,13 +419,13 @@
 				// box-shadow: 0px 7px 10px 1px #8BAFAB;
 
 				.img {
-					
+					position: relative;
 					.hlbg{
 						border-radius: 10rpx;
 						z-index: 9;
 						position: absolute;
-						width:335rpx ;
-						height: 335rpx;
+						width:312rpx ;
+						height: 312rpx;
 						top: 0;
 						left: 0;
 					}
@@ -499,7 +435,7 @@
 					width: 312rpx;
 					background-color: #eee;
 
-					image {
+					.image {
 						height: 100%;
 						width: 100%;
 					}
@@ -549,8 +485,7 @@
 							}
 						}
 						.huiyuan{
-							width: 70rpx;
-							height: 33rpx;
+							padding: 4rpx 8rpx;
 							background: linear-gradient(90deg, #C79A4C, #F9DF7F);
 							border-radius: 5rpx;
 							font-size: 19rpx;

+ 253 - 0
pages/index/jfgood.vue

@@ -0,0 +1,253 @@
+<template>
+	<view class="main">
+		<view class="top-search">
+			<input type="text" class="search-key" placeholder="请输入关键字" v-model="keyword" />
+			<image src="../../static/icon/search.png" mode="" class="search-logo"></image>
+			<view class="search-btn" @click.stop="search">搜索</view>
+		</view>
+		<scroll-view scroll-y="true" :style="{'height': height}" class="scoll-wrap" @scrolltolower="getArticleList()">
+			<view class="list-box-h">
+				<view v-for="(item, index) in list" :key="index" class="guess-item" @click="navToDetailPage(item)">
+					<image :src="item.image"></image>
+					<view class="guess-box">
+						<view class="title clamp2">{{ item.goods_name }}</view>
+						<view class="flex itemContent">
+							<view>
+								<view class="price-box flex">
+									<!-- <view class="yuanprice">{{ item.ot_price }}</view> -->
+									<!-- <image src="../../static/img/jiantou.png" mode=""></image> -->
+									<!-- <view class="jiang">直降{{ (item.ot_price - item.price).toFixed(2) }}元</view> -->
+								</view>
+								<view class="price" >{{ ((item.price)*(three_integral)).toFixed(2) }}积分</view>
+							</view>
+							<view class="btn">立即购买</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<uni-load-more :status="loadingType"></uni-load-more>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import {
+		getJfList,getBl
+	} from '@/api/product.js';
+	export default {
+		data() {
+			return {
+				height: '',
+				list: [],
+				page: 1,
+				limit: 10,
+				loadingType: 'more',
+				total_pages: 0,
+				keyword: '',
+				three_integral: 1,
+			}
+		},
+		onLoad(opt) {
+			this.getArticleList()
+		},
+		// onReachBottom() {
+		// 	this.getArticleList()
+		// },
+		onReady(res) {
+			var obj = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.scoll-wrap').boundingClientRect();
+					query.exec(function(res) {
+						console.log(res, 'ddddddddddddd');
+						obj.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', obj.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		methods: {
+			navToDetailPage(item) {
+				uni.navigateTo({
+					url: '/pages/product/jfproduct?id=' + item.id
+				});
+			},
+			getArticleList() {
+				let obj = this
+				if (obj.loadingType == 'noMore' || obj.loadingType == 'loading') {
+					return
+				}
+				obj.loadingType = 'loading'
+				getJfList({
+					page: obj.page,
+					// limit: obj.limit,
+					keyword: obj.keyword //商品关键字
+					// is_gp:1 //设置是否vip商品
+				}).then(({
+					data
+				}) => {
+					obj.list = obj.list.concat(data.data)
+					obj.total_pages = data.meta.pagination.total_pages
+					obj.page++
+					if(obj.page <= obj.total_pages) {
+						obj.loadingType = 'more'
+					}else {
+						obj.loadingType = 'noMore'
+					}
+					// if (data.length == obj.limit) {
+					// 	obj.loadingType = 'more'
+					// } else {
+					// 	obj.loadingType = 'noMore'
+					// }
+				})
+			},
+			search() {
+				let obj = this
+				obj.page = 1
+				obj.list = []
+				obj.loadingType = 'more'
+				obj.getArticleList()
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page {
+		background-color: #fff;
+		min-height: 100%;
+	}
+
+	.list-box-h {
+		padding: 20rpx;
+	}
+
+	.guess-item {
+		padding: 10rpx;
+		display: flex;
+		min-width: 100%;
+		width: 0;
+		margin-bottom: 20rpx;
+		background: #ffffff;
+		border-radius: 10rpx;
+		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+
+		image {
+			width: 200rpx;
+			height: 200rpx;
+			border-radius: 10rpx;
+			flex-shrink: 0;
+		}
+
+		.guess-box {
+			width: 100%;
+			padding: 5px;
+			position: relative;
+			.itemContent {
+				position: absolute ;
+				width: 100%;
+				padding: 20rpx 10rpx;
+				bottom: 0;
+				right: 0;
+			}
+			.title {
+				font-size: 30rpx;
+				font-weight: bold;
+				color: #333333;
+				height: 2.5em;
+				line-height: 1.25em;
+			}
+
+			.price-box {
+				justify-content: flex-start;
+
+				.yuanprice {
+					font-size: 26rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #999999;
+					padding-right: 6rpx;
+				}
+
+				image {
+					width: 14rpx;
+					height: 16rpx;
+				}
+
+				.jiang {
+					padding-left: 2rpx;
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #b59467;
+				}
+			}
+
+			.price {
+				font-size: 36rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FF6F0F;
+			}
+
+			.btn {
+				background: #16cc9f;
+				border-radius: 28rpx;
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #ffffff;
+				float: right;
+				padding: 10rpx 20rpx;
+			}
+		}
+	}
+	.top-search {
+		width: 750rpx;
+		height: 100rpx;
+		// padding-top: 20rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		position: relative;
+	
+		.search-key {
+			width: 700rpx;
+			height: 70rpx;
+			padding-left: 100rpx;
+			background: #FFFFFF;
+			box-shadow: 0px 1rpx 5rpx #16cc9f;
+			border-radius: 35rpx;
+			position: relative;
+		}
+	
+		.search-logo {
+			width: 36rpx;
+			height: 36rpx;
+			position: absolute;
+			top: 0;
+			bottom: 0;
+			left: 50rpx;
+			margin: auto;
+		}
+	
+		.search-btn {
+			width: 150rpx;
+			height: 70rpx;
+			border-radius: 30rpx;
+			color: #16cc9f;
+			text-align: center;
+			line-height: 70rpx;
+			position: absolute;
+			top: 0;
+			bottom: 0;
+			right: 10rpx;
+			margin: auto;
+			// background-color: red;
+			z-index: 9;
+		}
+	}
+</style>
+

File diff suppressed because it is too large
+ 138 - 0
pages/product/jfproduct.vue


+ 945 - 975
pages/product/product.vue

@@ -4,9 +4,7 @@
 		<top-swiper :imgList="imgList"></top-swiper>
 		<!-- 标题 -->
 		<view class="introduce-section" v-if="goodsType == 0">
-			<button class="shareDate" style="border: none;" @click="callf()">
-				<image class="share-img" src="../../static/icon/share.png"></image>
-			</button>
+			<button class="shareDate" style="border: none;" @click="callf()"><image class="share-img" src="../../static/icon/share.png"></image></button>
 			<view class="price-box">
 				<text class="price-tip">¥</text>
 				<view class="price">
@@ -18,13 +16,12 @@
 			<text class="title clamp2" v-else>{{ goodsObjact.store_name }}</text>
 		</view>
 		<view class="introduce-section" v-if="goodsType == 2">
-			<button class="shareDate" style="border: none;" @click="callf()">
-				<image class="share-img" src="../../static/icon/share.png"></image>
-			</button>
+			<button class="shareDate" style="border: none;" @click="callf()"><image class="share-img" src="../../static/icon/share.png"></image></button>
 			<view class="price-box-jf">
 				<!-- <text class="price-tip">¥</text> -->
 				<view class="price">
-					<text>{{goodsObjact.integral}}</text><text class="jf">积分</text>
+					<text>{{ goodsObjact.integral }}</text>
+					<text class="jf">积分</text>
 					<text class="m-price">¥{{ goodsObjact.ot_price }}</text>
 				</view>
 			</view>
@@ -35,16 +32,11 @@
 		<view class="good-title " v-if="isSckill">{{ goodsObjact.title }}</view>
 		<!-- 兑换说明 -->
 		<view class="dhsm" v-if="goodsType == 2">
-			<view class="title">
-				兑换说明
-			</view>
-			<view class="info">
-				兑换说明详细介绍兑换说明详细介绍兑换兑换说明详细介绍兑换说明详细介绍兑换兑换说明详细介绍兑换说明
-			</view>
+			<view class="title">兑换说明</view>
+			<view class="info">兑换说明详细介绍兑换说明详细介绍兑换兑换说明详细介绍兑换说明详细介绍兑换兑换说明详细介绍兑换说明</view>
 		</view>
 		<!-- 评价 -->
-		<estimate @navTo="navTo('/pages/product/reply?id=' + goodsObjact.product_id)" v-if="reply" :reply="reply"
-			:list="list"></estimate>
+		<estimate @navTo="navTo('/pages/product/reply?id=' + goodsObjact.product_id)" v-if="reply" :reply="reply" :list="list"></estimate>
 		<!-- 规格信息 -->
 		<!-- <fresh-detail :goodsObjact="goodsObjact"></fresh-detail> -->
 		<!-- 图文详情 -->
@@ -72,8 +64,13 @@
 				<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)">
+						<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>
@@ -81,1088 +78,1061 @@
 				<view class="mun-box">
 					<text>购买数量</text>
 					<view class="num">
-						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax"
-							@eventChange="numberChange"></uni-number-box>
+						<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>
-		<view class="mask" v-if="show">
-			<image @click="onTap" src="../../static/img/shareimg.png"></image>
-		</view>
+		<view class="mask" v-if="show"><image @click="onTap" src="../../static/img/shareimg.png"></image></view>
 	</view>
 </template>
 
 <script>
-	import {
-		goodsDetail,
-		cartAdd,
-		seckillGoods,
-		getIntegraDetail
-	} from '@/api/product.js';
-	import {
-		mapState
-	} from 'vuex';
-	import store from '@/store/index.js';
-	import {
-		saveUrl
-	} from '@/utils/loginUtils.js';
-	// #ifdef H5
-	import {
-		weixindata
-	} 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';
-	import {
-		timeComputed
-	} from '@/utils/rocessor.js';
-	import uniNumberBox from '@/components/uni-number-box.vue'
-	export default {
-		components: {
-			guessLike,
-			topSwiper,
-			productContent,
-			discounts,
-			freshDetail,
-			contentText,
-			productBottom,
-			estimate,
-			uniNumberBox
-		},
-		data() {
-			return {
-				showAdd: true, //是否显示加入购物车
-				show: false,
-				isSckill: false, //是否为秒杀
-				goodsStore: 0, //选中库存
-				specList: [],
-				buys_show: true,
-				buys_shows: false,
-				specSelected: [], //选中的分类
-				specClass: 'none', //显示隐藏弹窗
-				many: 1, //1是单规格  2是多规格
-				reply: '', //评论
-				list: '', //商品详情的数据
-				type: 1, //默认支付方式add为
-				goodsType: 0, //商品类型 0:普通,1:秒杀 ,2:积分
-				goodsNumber: 1, //购买数量
-				goodsid: '', //商品id
-				description: '', //商品描述
-				goodsObjact: {
-					percent: 1
-				}, //保存商品数据
-				//图片循环
-				imgList: [],
-				// 对比对象
-				actionPrice: 0, //默认选中商品价格
-				actionImage: '', //默认选中图片
-				good_list: '', //猜你喜欢列表
-				goodsNumberMax: 0, //最大可购买数量
-				goodsNumberMin: 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: ''
-			};
-		},
-		filters: {
-			parseIntTo(percent) {
-				percent = +percent * 100;
-				if (percent % 1 === 0) {
-					return percent;
-				} else {
-					percent = percent.toFixed(1);
-					return percent;
+import { goodsDetail, cartAdd, seckillGoods, getIntegraDetail } from '@/api/product.js';
+import { mapState } from 'vuex';
+import store from '@/store/index.js';
+import { saveUrl } from '@/utils/loginUtils.js';
+// #ifdef H5
+import { weixindata } 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';
+import { timeComputed } from '@/utils/rocessor.js';
+import uniNumberBox from '@/components/uni-number-box.vue';
+export default {
+	components: {
+		guessLike,
+		topSwiper,
+		productContent,
+		discounts,
+		freshDetail,
+		contentText,
+		productBottom,
+		estimate,
+		uniNumberBox
+	},
+	data() {
+		return {
+			showAdd: true, //是否显示加入购物车
+			show: false,
+			isSckill: false, //是否为秒杀
+			goodsStore: 0, //选中库存
+			specList: [],
+			buys_show: true,
+			buys_shows: false,
+			specSelected: [], //选中的分类
+			specClass: 'none', //显示隐藏弹窗
+			many: 1, //1是单规格  2是多规格
+			reply: '', //评论
+			list: '', //商品详情的数据
+			type: 1, //默认支付方式add为
+			goodsType: 0, //商品类型 0:普通,1:秒杀 ,2:积分
+			goodsNumber: 1, //购买数量
+			goodsid: '', //商品id
+			description: '', //商品描述
+			goodsObjact: {
+				percent: 1
+			}, //保存商品数据
+			//图片循环
+			imgList: [],
+			// 对比对象
+			actionPrice: 0, //默认选中商品价格
+			actionImage: '', //默认选中图片
+			good_list: '', //猜你喜欢列表
+			goodsNumberMax: 0, //最大可购买数量
+			goodsNumberMin: 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: ''
+		};
+	},
+	filters: {
+		parseIntTo(percent) {
+			percent = +percent * 100;
+			if (percent % 1 === 0) {
+				return percent;
+			} else {
+				percent = percent.toFixed(1);
+				return percent;
+			}
+		}
+	},
+	async onLoad(options) {
+		let obj = this;
+		obj.userInfo = uni.getStorageSync('userInfo');
+		//保存商品id
+		this.goodsid = options.id;
+		if (options.type) {
+			this.goodsType = options.type * 1;
+		}
+
+		if (this.goodsType == 2) {
+			this.showAdd = false;
+			console.log('不显示', this.showAdd);
+		}
+		console.log(this.goodsType, 'this.goodsTypethis.goodsTypethis.goodsTypethis.goodsType');
+		if (options.type == 1) {
+			obj.isSckill = true;
+		}
+		// 判断有无人邀请
+		if (options.spread) {
+			// 存储邀请人
+			uni.setStorageSync('spread', options.spread);
+		}
+		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 + '   价格:' + 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 为详细失败信息
 				}
 			}
-		},
-		async onLoad(options) {
+		};
+
+		return shareObj;
+	},
+	methods: {
+		//选择规格
+		selectSpec(item, arr, ind) {
+			arr.attr_value.forEach(function(e) {
+				e.check = false;
+			});
+			item.check = true;
 			let obj = this;
-			obj.userInfo = uni.getStorageSync('userInfo');
-			//保存商品id
-			this.goodsid = options.id;
-			if(options.type) {
-				this.goodsType = options.type * 1;
-			}
-			
-			if (this.goodsType == 2) {
-				this.showAdd = false
-				console.log('不显示', this.showAdd)
+			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].quota;
+				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);
 			}
-			console.log(this.goodsType, 'this.goodsTypethis.goodsTypethis.goodsTypethis.goodsType')
-			if (options.type == 1) {
-				obj.isSckill = true
+			if (obj.goodsStore == 0) {
+				obj.buys_show = false;
+				obj.buys_shows = true;
 			}
-			// 判断有无人邀请
-			if (options.spread) {
-				// 存储邀请人
-				uni.setStorageSync('spread', options.spread);
-			}
-			saveUrl();
-			this.goodsDetail();
-			// 注册邀请信息
-			// #ifdef H5
-			let bool = uni.getStorageSync('weichatBrowser') || '';
-			if (bool) {
-				weixindata();
+			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';
 			}
-			// #endif
+			// 保存当前购买类型
+			this.type = str;
 		},
-		computed: {
-			...mapState(['weichatObj', 'baseURL', 'urlFile'])
+		//领取优惠券
+		Getcoupon() {
+			uni.navigateTo({
+				url: '/pages/coupon/getcoupon'
+			});
 		},
-		// 分享
-		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 + '   价格:' + 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;
+		//详情页
+		navToDetailPage(item) {
+			let id = item.id;
+			uni.navigateTo({
+				url: '/pages/product/product?id=' + id
+			});
 		},
-		methods: {
-			//选择规格
-			selectSpec(item, arr, ind) {
-				arr.attr_value.forEach(function(e) {
-					e.check = false;
+		// 跳转页面
+		navTo(url) {
+			uni.navigateTo({
+				url: url
+			});
+		},
+		//加入购物车
+		Addcar(item) {
+			let obj = this;
+			cartAdd({
+				cartNum: '1', //商品数量
+				uniqueId: '', //商品标签
+				new: 0, //商品是否新增加到购物车1为不加入0为加入
+				mer_id: '',
+				productId: item.id //商品编号
+			})
+				.then(function(e) {
+					console.log(e, 'ddddddddddddddd');
+					uni.showToast({
+						title: '成功加入购物车',
+						type: 'top',
+						duration: 500,
+						icon: 'none'
+					});
+
+					obj.goodsDetail();
+				})
+				.catch(e => {
+					console.log(e);
 				});
-				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].quota;
-					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'
+		},
+		goodsDetail() {
+			let obj = this;
+			// 获取普通商品信息
+			console.log('获取商品信息++++++++++++++');
+			console.log(obj.goodsType);
+			if (obj.goodsType == 0) {
+				console.log('获取普通商品信息++++++++++++++');
+				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;
+					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
 				});
-			},
-			//详情页
-			navToDetailPage(item) {
-				let id = item.id;
-				uni.navigateTo({
-					url: '/pages/product/product?id=' + id
+			}
+			if (obj.goodsType == 1) {
+				seckillGoods({}, this.goodsid).then(({ data }) => {
+					obj.list = data;
+					console.log(obj.list, '秒杀商品数据++++++++++');
+					// obj.good_list = data.good_list; //保存猜你喜欢列表
+					obj.reply = data.reply; //保存评论列表
+					let goods = data.storeInfo;
+					obj.goodsNumberMax = goods.num;
+					// console.log('obj.goodsNumberMin+++++++++',obj.goodsNumberMin)
+					const time = timeComputed(goods.stop_time * 1000);
+					obj.seckillObj = {
+						stop: time.tpye, //是否结束
+						stopTimeH: time.hours + time.day * 24, //小时
+						stopTimeM: time.minutes, //分钟
+						stopTimeS: time.seconds //秒钟
+					};
+
+					console.log(obj.seckillObj, '数据');
+					// console.log(obj.seckillObj,'obj.seckillObj++++++++++++++++++++++')
+					obj.goodsObjact = goods;
+					if (obj.goodsObjact.description != null) {
+						obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
+					} //小程序商品详情图超出屏幕问题
+					obj.imgList = goods.images; //保存轮播图
+					obj.specList = data.productAttr; //保存分类列表
+					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(',');
+						// 设置默认值
+						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 {
+						console.log('单规格+++++++++++++');
+						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
+					}
 				});
-			},
-			// 跳转页面
-			navTo(url) {
-				uni.navigateTo({
-					url: url
+			}
+			if (obj.goodsType == 3) {
+				getIntegraDetail({}, this.goodsid).then(({ data }) => {
+					obj.list = data;
+					console.log(obj.list, '积分商品数据++++++++++');
+					// obj.good_list = data.good_list; //保存猜你喜欢列表
+					obj.reply = data.reply; //保存评论列表
+					let goods = data.storeInfo;
+					obj.goodsNumberMax = goods.num;
+					// console.log('obj.goodsNumberMin+++++++++',obj.goodsNumberMin)
+					// obj.seckillObj = timeComputed( goods.stop_time*1000);
+
+					// console.log(obj.seckillObj,'obj.seckillObj++++++++++++++++++++++')
+					obj.goodsObjact = goods;
+					if (obj.goodsObjact.description != null) {
+						obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
+					} //小程序商品详情图超出屏幕问题
+					obj.imgList = goods.images; //保存轮播图
+					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].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
+					}
 				});
-			},
-			//加入购物车
-			Addcar(item) {
-				let obj = this;
-				cartAdd({
-						cartNum: '1', //商品数量
-						uniqueId: '', //商品标签
-						new: 0, //商品是否新增加到购物车1为不加入0为加入
-						mer_id: '',
-						productId: item.id //商品编号
-					})
-					.then(function(e) {
-						console.log(e,'ddddddddddddddd')
+			}
+		},
+		// 立即购买
+		buy() {
+			let obj = this;
+			// 创建传值对象
+			if (obj.userInfo) {
+				// if(obj.userInfo.store_order == 0) {
+				// 	uni.showModal({
+				// 		title: '提示',
+				// 		content:'您未报单,请前往报单页面',
+				// 		success() {
+				// 			uni.switchTab({
+				// 				url:'/pages/index/index'
+				// 			})
+				// 		}
+				// 	})
+				// 	return
+				// }
+			}
+			let data = {
+				productId: obj.goodsid, //商品编号
+				cartNum: obj.goodsNumber, //商品数量
+				uniqueId: obj.uniqueId, //分类编号
+				new: 1,
+				secKillId: '',
+				integralId: ''
+			};
+			console.log(obj.goodsType, 'obj.goodsType77777777777777777777');
+			if (obj.type == 2) {
+				data.new = 0;
+			}
+			cartAdd(data)
+				.then(function(e) {
+					let da = e.data;
+					if (obj.type == 1) {
+						// 跳转到支付页
+						console.log(obj.goodsType, 'this.goodsType456444444444444444');
+						uni.navigateTo({
+							url: '/pages/order/createOrder?id=' + da.cartId + '&goodsType=' + obj.goodsType
+						});
+					}
+					if (obj.type == 2) {
 						uni.showToast({
 							title: '成功加入购物车',
 							type: 'top',
-							duration: 500,
+							duration: 2000,
 							icon: 'none'
 						});
-
 						obj.goodsDetail();
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-			goodsDetail() {
-				let obj = this;
-				// 获取普通商品信息
-				console.log('获取商品信息++++++++++++++')
-				console.log(obj.goodsType)
-				if (obj.goodsType == 0) {
-					console.log('获取普通商品信息++++++++++++++')
-					goodsDetail({}, this.goodsid).then(function({
-						data
-					}) {
-						obj.list = data;
-						console.log(obj.list, '普通商品数据')
-						obj.good_list = data.good_list; //保存猜你喜欢列表
-						obj.reply = data.reply; //保存评论列表
-						let goods = data.storeInfo;
-						obj.goodsObjact = goods;
-						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].stock;
-						} 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
-						}
+					}
+					obj.toggleSpec();
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		// 阻止触发上级事件
+		stopPrevent() {},
+		//选择数量
+		numberChange(e) {
+			console.log(e);
+			this.goodsNumber = e.number;
+		},
+		callf() {
+			this.show = true;
+		},
+		onTap() {
+			console.log(this.callf);
 
-					});
-				}
-				if (obj.goodsType == 1) {
-					seckillGoods({}, this.goodsid).then(({
-						data
-					}) => {
-						obj.list = data;
-						console.log(obj.list, '秒杀商品数据++++++++++')
-						// obj.good_list = data.good_list; //保存猜你喜欢列表
-						obj.reply = data.reply; //保存评论列表
-						let goods = data.storeInfo;
-						obj.goodsNumberMax = goods.num
-						// console.log('obj.goodsNumberMin+++++++++',obj.goodsNumberMin)
-						const time = timeComputed(goods.stop_time * 1000);
-						obj.seckillObj = {
-							stop: time.tpye, //是否结束
-							stopTimeH: time.hours + time.day * 24, //小时
-							stopTimeM: time.minutes, //分钟
-							stopTimeS: time.seconds, //秒钟
-						}
+			if (!this.callf) return;
+			this.close();
+		},
+		close() {
+			this.show = false;
+		},
+		closes() {
+			this.specClass = 'none';
+		}
+	}
+};
+</script>
 
-						console.log(obj.seckillObj, '数据');
-						// console.log(obj.seckillObj,'obj.seckillObj++++++++++++++++++++++')
-						obj.goodsObjact = goods;
-						if (obj.goodsObjact.description != null) {
-							obj.description = obj.goodsObjact.description.replace(/\<img/gi,
-								'<img class="rich-img"');
-						} //小程序商品详情图超出屏幕问题
-						obj.imgList = goods.images; //保存轮播图
-						obj.specList = data.productAttr; //保存分类列表
-						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 {
-							console.log('单规格+++++++++++++')
-							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
-						}
+<style lang="scss" scoped>
+/*  弹出层 */
+.popup {
+	position: fixed;
+	left: 0;
+	top: 0;
+	right: 0;
+	bottom: 0;
+	z-index: 99;
+
+	&.show {
+		display: block;
 
-					})
-				}
-				if (obj.goodsType == 3) {
-					getIntegraDetail({}, this.goodsid).then(({
-						data
-					}) => {
-						obj.list = data;
-						console.log(obj.list, '积分商品数据++++++++++')
-						// obj.good_list = data.good_list; //保存猜你喜欢列表
-						obj.reply = data.reply; //保存评论列表
-						let goods = data.storeInfo;
-						obj.goodsNumberMax = goods.num
-						// console.log('obj.goodsNumberMin+++++++++',obj.goodsNumberMin)
-						// obj.seckillObj = timeComputed( goods.stop_time*1000);
-
-						// console.log(obj.seckillObj,'obj.seckillObj++++++++++++++++++++++')
-						obj.goodsObjact = goods;
-						if (obj.goodsObjact.description != null) {
-							obj.description = obj.goodsObjact.description.replace(/\<img/gi,
-								'<img class="rich-img"');
-						} //小程序商品详情图超出屏幕问题
-						obj.imgList = goods.images; //保存轮播图
-						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].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
-						}
-					})
-				}
+		.mask {
+			animation: showPopup 0.2s linear both;
+		}
 
-			},
-			// 立即购买
-			buy() {
-				let obj = this;
-				// 创建传值对象
-				if(obj.userInfo) {
-					// if(obj.userInfo.store_order == 0) {
-					// 	uni.showModal({
-					// 		title: '提示',
-					// 		content:'您未报单,请前往报单页面',
-					// 		success() {
-					// 			uni.switchTab({
-					// 				url:'/pages/index/index'
-					// 			})
-					// 		}
-					// 	})
-					// 	return 
-					// }
-				}
-				let data = {
-					productId: obj.goodsid, //商品编号
-					cartNum: obj.goodsNumber, //商品数量
-					uniqueId: obj.uniqueId, //分类编号
-					new: 1,
-					secKillId: '',
-					integralId: '',
-				};
-				console.log(obj.goodsType, 'obj.goodsType77777777777777777777')
-				if(obj.type == 2) {
-					data.new = 0
-				}
-				cartAdd(data)
-					.then(function(e) {
-						let da = e.data;
-						if (obj.type == 1) {
-							// 跳转到支付页
-							console.log(obj.goodsType, 'this.goodsType456444444444444444')
-							uni.navigateTo({
-								url: '/pages/order/createOrder?id=' + da.cartId + '&goodsType=' + obj.goodsType
-							});
-						}
-						if (obj.type == 2) {
-							uni.showToast({
-								title: '成功加入购物车',
-								type: 'top',
-								duration: 2000,
-								icon: 'none'
-							});
-							obj.goodsDetail();
-						}
-						obj.toggleSpec()
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-			// 阻止触发上级事件
-			stopPrevent() {},
-			//选择数量
-			numberChange(e) {
-				console.log(e)
-				this.goodsNumber = e.number
-			},
-			callf() {
-				this.show = true;
-			},
-			onTap() {
-				console.log(this.callf);
+		.layer {
+			animation: showLayer 0.2s linear both;
+		}
+	}
 
-				if (!this.callf) return;
-				this.close();
-			},
-			close() {
-				this.show = false;
-			},
-			closes() {
-				this.specClass = 'none';
-			},
+	&.hide {
+		.mask {
+			animation: hidePopup 0.2s linear both;
 		}
-	};
-</script>
 
-<style lang="scss" scoped>
-	/*  弹出层 */
-	.popup {
+		.layer {
+			animation: hideLayer 0.2s linear both;
+		}
+	}
+
+	&.none {
+		display: none;
+	}
+
+	.mask {
 		position: fixed;
-		left: 0;
 		top: 0;
-		right: 0;
-		bottom: 0;
-		z-index: 99;
-
-		&.show {
-			display: block;
+		width: 100%;
+		height: 100%;
+		z-index: 1;
+		background-color: rgba(0, 0, 0, 0.4);
+	}
 
-			.mask {
-				animation: showPopup 0.2s linear both;
-			}
+	.layer {
+		position: fixed;
+		z-index: 99;
+		bottom: 0;
+		width: 100%;
+		min-height: 20vh;
+		border-radius: 10rpx 10rpx 0 0;
+		background-color: #fff;
 
-			.layer {
-				animation: showLayer 0.2s linear both;
-			}
+		.btn {
+			height: 66rpx;
+			line-height: 66rpx;
+			border-radius: 100rpx;
+			background: #6eab4e;
+			font-size: $font-base + 2rpx;
+			color: #fff;
+			margin: 30rpx auto 20rpx;
 		}
+	}
 
-		&.hide {
-			.mask {
-				animation: hidePopup 0.2s linear both;
-			}
-
-			.layer {
-				animation: hideLayer 0.2s linear both;
-			}
+	@keyframes showPopup {
+		0% {
+			opacity: 0;
 		}
 
-		&.none {
-			display: none;
+		100% {
+			opacity: 1;
 		}
+	}
 
-		.mask {
-			position: fixed;
-			top: 0;
-			width: 100%;
-			height: 100%;
-			z-index: 1;
-			background-color: rgba(0, 0, 0, 0.4);
+	@keyframes hidePopup {
+		0% {
+			opacity: 1;
 		}
 
-		.layer {
-			position: fixed;
-			z-index: 99;
-			bottom: 0;
-			width: 100%;
-			min-height: 20vh;
-			border-radius: 10rpx 10rpx 0 0;
-			background-color: #fff;
-
-			.btn {
-				height: 66rpx;
-				line-height: 66rpx;
-				border-radius: 100rpx;
-				background: #6EAB4E;
-				font-size: $font-base + 2rpx;
-				color: #fff;
-				margin: 30rpx auto 20rpx;
-			}
+		100% {
+			opacity: 0;
 		}
+	}
 
-		@keyframes showPopup {
-			0% {
-				opacity: 0;
-			}
-
-			100% {
-				opacity: 1;
-			}
+	@keyframes showLayer {
+		0% {
+			transform: translateY(120%);
 		}
 
-		@keyframes hidePopup {
-			0% {
-				opacity: 1;
-			}
-
-			100% {
-				opacity: 0;
-			}
+		100% {
+			transform: translateY(0%);
 		}
+	}
 
-		@keyframes showLayer {
-			0% {
-				transform: translateY(120%);
-			}
+	@keyframes hideLayer {
+		0% {
+			transform: translateY(0);
+		}
 
-			100% {
-				transform: translateY(0%);
-			}
+		100% {
+			transform: translateY(120%);
 		}
+	}
+}
 
-		@keyframes hideLayer {
-			0% {
-				transform: translateY(0);
-			}
+/* 规格选择弹窗 */
+.attr-content {
+	padding: 25rpx 30rpx;
 
-			100% {
-				transform: translateY(120%);
-			}
+	.a-t {
+		display: flex;
+
+		image {
+			width: 170rpx;
+			height: 170rpx;
+			flex-shrink: 0;
+			border-radius: 8rpx;
+			background-color: #eee;
 		}
-	}
 
-	/* 规格选择弹窗 */
-	.attr-content {
-		padding: 25rpx 30rpx;
-	
-		.a-t {
+		.right {
 			display: flex;
-	
-			image {
-				width: 170rpx;
-				height: 170rpx;
-				flex-shrink: 0;
-				border-radius: 8rpx;
-				background-color: #eee;
+			flex-direction: column;
+			padding-left: 24rpx;
+			font-size: $font-sm + 2rpx;
+			color: $font-color-base;
+			line-height: 42rpx;
+			width: 75%;
+			position: relative;
+			.right-img {
+				width: 37rpx;
+				height: 37rpx;
+				position: absolute;
+				right: 0;
+				top: 20rpx;
+				// background-color: red;
 			}
-	
-			.right {
-				display: flex;
-				flex-direction: column;
-				padding-left: 24rpx;
-				font-size: $font-sm + 2rpx;
-				color: $font-color-base;
-				line-height: 42rpx;
-				width: 75%;
-				position: relative;
-				.right-img {
-					width: 37rpx;
-					height: 37rpx;
-					position: absolute;
-					right: 0;
-					top: 20rpx;
-					// background-color: red;
-				}
-				.price {
-					position: absolute;
-					bottom: 0;
-					font-size: $font-lg;
-					color: $uni-color-primary;
-					margin: 10rpx 0rpx;
-					font-size: 60rpx;
-					font-family: PingFang SC;
-					font-weight: bold;
-					color: #ef041f;
-					text {
-						font-size: 30rpx;
-					}
-				}
-	
-				.name {
-					width: 350rpx;
-					font-size: 32rpx;
-					color: $font-color-dark;
-					height: 50rpx;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					white-space: nowrap;
-					display: block;
+			.price {
+				position: absolute;
+				bottom: 0;
+				font-size: $font-lg;
+				color: $uni-color-primary;
+				margin: 10rpx 0rpx;
+				font-size: 60rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #ef041f;
+				text {
 					font-size: 30rpx;
-					font-family: PingFang SC;
-					font-weight: bold;
-					color: #1d2023;
-				}
-	
-				.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: 10rpx;
-				min-width: 60rpx;
-				height: 60rpx;
-				padding: 0 20rpx;
-				font-size: $font-base;
+
+			.name {
+				width: 350rpx;
+				font-size: 32rpx;
 				color: $font-color-dark;
+				height: 50rpx;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				white-space: nowrap;
+				display: block;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #1d2023;
 			}
-	
-			.selected {
-				background: #fceff1;
-				color: #f35768;
-				border: 1px solid #f35768;
+
+			.selected-text {
+				margin-right: 10rpx;
 			}
 		}
 	}
 
-	//默认商品底部高度
-	.goodsBottom {
-		height: 160rpx;
+	.attr-list {
+		display: flex;
+		flex-direction: column;
+		font-size: $font-base + 2rpx;
+		color: $font-color-base;
+		padding-top: 30rpx;
+		padding-left: 10rpx;
 	}
 
-	page {
-		background: #f0f0f0;
-	}
+	.item-list {
+		padding: 20rpx 0 0;
+		display: flex;
+		flex-wrap: wrap;
 
-	//秒杀、拼团底部高度
-	.contentBottomHeight {
-		height: 120rpx;
-	}
+		text {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			background: #eee;
+			margin-right: 20rpx;
+			margin-bottom: 20rpx;
+			border-radius: 10rpx;
+			min-width: 60rpx;
+			height: 60rpx;
+			padding: 0 20rpx;
+			font-size: $font-base;
+			color: $font-color-dark;
+		}
 
-	//默认商品底部高度
-	.goodsBottom {
-		height: 160rpx;
+		.selected {
+			background: #fceff1;
+			color: #f35768;
+			border: 1px solid #f35768;
+		}
 	}
-
-	/deep/ .iconenter {
-		font-size: $font-base + 2rpx;
-		color: #888;
+}
+
+//默认商品底部高度
+.goodsBottom {
+	height: 160rpx;
+}
+
+page {
+	background: #f0f0f0;
+}
+
+//秒杀、拼团底部高度
+.contentBottomHeight {
+	height: 120rpx;
+}
+
+//默认商品底部高度
+.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/ .con_image {
-		width: 130rpx;
-		height: 130rpx;
-		display: inline-block;
-		padding: 15rpx;
-
-		image {
-			width: 100%;
-			height: 100%;
-		}
+}
+
+/* 商品详情中限制图片大小 */
+/deep/ .rich-img {
+	width: 100% !important;
+	height: auto;
+}
+
+.cho-num {
+	margin: 20rpx 0;
+	width: 750rpx;
+	height: 83rpx;
+	background: #ffffff;
+	padding: 29rpx 24rpx 30rpx 25rpx;
+	font-size: 26rpx;
+	font-weight: 500;
+	color: #606972;
+}
+
+.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;
 	}
 
-	/* 商品详情中限制图片大小 */
-	/deep/ .rich-img {
-		width: 100% !important;
-		height: auto;
+	.noRefund {
+		font-size: 30rpx;
+		color: $font-color-light;
+		padding-left: 128rpx;
 	}
 
-	.cho-num {
-		margin: 20rpx 0;
-		width: 750rpx;
-		height: 83rpx;
-		background: #ffffff;
-		padding: 29rpx 24rpx 30rpx 25rpx;
-		font-size: 26rpx;
-		font-weight: 500;
-		color: #606972;
+	.tit {
+		flex-shrink: 0;
+		width: 120rpx;
+		font-size: 30rpx;
+		color: $font-color-dark;
 	}
 
-	.row {
-		display: flex;
-		align-items: center;
-		position: relative;
-		padding: 0 30rpx;
-		height: 110rpx;
-		background: #fff;
+	.input {
+		flex: 1;
+		font-size: 30rpx;
+		color: $font-color-dark;
+		padding-left: 128rpx;
 
-		.refund {
-			font-size: 30rpx;
-			color: $font-color-dark;
-			padding-left: 128rpx;
+		&.payColor {
+			color: $color-red;
 		}
+	}
 
-		.noRefund {
-			font-size: 30rpx;
-			color: $font-color-light;
-			padding-left: 128rpx;
+	.iconlocation {
+		font-size: 36rpx;
+		color: $font-color-light;
+	}
+}
+
+.shop-info {
+	width: 750rpx;
+	height: 140rpx;
+	margin: 20rpx 0;
+	padding: 28rpx 24rpx 22rpx 16rpx;
+	background-color: #fff;
+	display: flex;
+	position: relative;
+
+	.shop-logo {
+		width: 90rpx;
+		height: 90rpx;
+		border-radius: 50%;
+
+		// background-color: red;
+		// overflow: hidden;
+		image {
+			width: 90rpx;
+			height: 90rpx;
 		}
+	}
 
-		.tit {
-			flex-shrink: 0;
-			width: 120rpx;
-			font-size: 30rpx;
-			color: $font-color-dark;
-		}
+	.shop-base {
+		padding-left: 15rpx;
+		// width: 376rpx;
+		width: 100%;
+		font-size: 24rpx;
+		font-weight: 500;
+		color: #999999;
+		line-height: 1;
 
-		.input {
-			flex: 1;
+		.base-name {
+			padding-top: 14rpx;
 			font-size: 30rpx;
-			color: $font-color-dark;
-			padding-left: 128rpx;
-
-			&.payColor {
-				color: $color-red;
-			}
-		}
-
-		.iconlocation {
-			font-size: 36rpx;
-			color: $font-color-light;
+			padding-bottom: 16rpx;
+			font-weight: 500;
+			color: #333333;
 		}
 	}
 
-	.shop-info {
-		width: 750rpx;
-		height: 140rpx;
-		margin: 20rpx 0;
-		padding: 28rpx 24rpx 22rpx 16rpx;
-		background-color: #fff;
-		display: flex;
-		position: relative;
-
-		.shop-logo {
-			width: 90rpx;
-			height: 90rpx;
-			border-radius: 50%;
+	.shop-dis {
+		padding-top: 31rpx;
+		position: absolute;
+		font-size: 24rpx;
+		font-weight: 500;
+		color: #901b21;
+		// line-height: 140rpx;
+		right: 24rpx;
 
-			// background-color: red;
-			// overflow: hidden;
-			image {
-				width: 90rpx;
-				height: 90rpx;
-			}
+		image {
+			padding-right: 5rpx;
+			width: 21rpx;
+			height: 21rpx;
 		}
-
-		.shop-base {
+	}
+}
+
+.good-title {
+	background-color: #fff;
+	// height: 142rpx;
+	padding: 24rpx 19rpx 24rpx 34rpx;
+	line-height: 1.5;
+	font-size: 36rpx;
+	font-weight: 800;
+	color: #333333;
+}
+
+.introduce-section {
+	position: relative;
+	background: #fff;
+	padding: 35rpx 0rpx;
+	padding-left: 20rpx;
+
+	.title {
+		font-size: 32rpx;
+		color: $font-color-dark;
+		padding-right: 34rpx;
+
+		.tip-o {
+			color: #ff3334;
 			padding-left: 15rpx;
-			// width: 376rpx;
-			width: 100%;
-			font-size: 24rpx;
-			font-weight: 500;
-			color: #999999;
-			line-height: 1;
-
-			.base-name {
-				padding-top: 14rpx;
-				font-size: 30rpx;
-				padding-bottom: 16rpx;
-				font-weight: 500;
-				color: #333333;
-			}
-		}
-
-		.shop-dis {
-			padding-top: 31rpx;
-			position: absolute;
-			font-size: 24rpx;
-			font-weight: 500;
-			color: #901b21;
-			// line-height: 140rpx;
-			right: 24rpx;
-
-			image {
-				padding-right: 5rpx;
-				width: 21rpx;
-				height: 21rpx;
-			}
 		}
 	}
 
-	.good-title {
-		background-color: #fff;
-		// height: 142rpx;
-		padding: 24rpx 19rpx 24rpx 34rpx;
-		line-height: 1.5;
-		font-size: 36rpx;
-		font-weight: 800;
-		color: #333333;
+	.shareDate {
+		position: absolute;
+		top: 25rpx;
+		right: 10rpx;
+		font-size: 26rpx;
+		color: #3d3f46;
+		border-radius: 15rpx;
+		background-color: #ffffff;
+		height: 60rpx;
+		line-height: 60rpx;
+
+		&::after {
+			border: none;
+		}
 	}
 
-	.introduce-section {
+	.share-img {
+		width: 30rpx;
+		height: 30rpx;
 		position: relative;
-		background: #fff;
-		padding: 35rpx 0rpx;
-		padding-left: 20rpx;
+		top: 5rpx;
+		left: 0;
+		margin-right: 10rpx;
+	}
 
-		.title {
-			font-size: 32rpx;
-			color: $font-color-dark;
-			padding-right: 34rpx;
+	.info {
+		color: #999999;
+		font-size: 26rpx;
+		padding-bottom: 15rpx;
+	}
 
-			.tip-o {
-				color: #ff3334;
-				padding-left: 15rpx;
-			}
-		}
+	.progress-box {
+		width: 260rpx;
+		position: relative;
+		margin-top: 15rpx;
+		line-height: 10px;
 
-		.shareDate {
+		.number {
+			font-size: 17rpx;
 			position: absolute;
-			top: 25rpx;
-			right: 10rpx;
-			font-size: 26rpx;
-			color: #3d3f46;
-			border-radius: 15rpx;
-			background-color: #ffffff;
-			height: 60rpx;
-			line-height: 60rpx;
-
-			&::after {
-				border: none;
-			}
-		}
-
-		.share-img {
-			width: 30rpx;
-			height: 30rpx;
-			position: relative;
-			top: 5rpx;
-			left: 0;
-			margin-right: 10rpx;
-		}
-
-		.info {
-			color: #999999;
-			font-size: 26rpx;
-			padding-bottom: 15rpx;
-		}
-
-		.progress-box {
-			width: 260rpx;
-			position: relative;
-			margin-top: 15rpx;
-			line-height: 10px;
-
-			.number {
-				font-size: 17rpx;
-				position: absolute;
-				z-index: 999;
-				top: 3rpx;
-				left: 15rpx;
-				color: #ffffff;
-			}
-		}
-
-		.price-box {
-			display: flex;
-			align-items: baseline;
-			height: 64rpx;
-			padding: 10rpx 0;
-			font-size: 27rpx;
-			color: #FF0000;
+			z-index: 999;
+			top: 3rpx;
+			left: 15rpx;
+			color: #ffffff;
 		}
+	}
 
-		.price {
-			font-size: $font-lg + 6rpx;
+	.price-box {
+		display: flex;
+		align-items: baseline;
+		height: 64rpx;
+		padding: 10rpx 0;
+		font-size: 27rpx;
+		color: #ff0000;
+	}
 
-			.text {
-				padding-left: 5rpx;
-				color: #b0b0b0;
-				font-size: 22rpx !important;
-			}
-		}
+	.price {
+		font-size: $font-lg + 6rpx;
 
-		.price-green {
-			color: #2dbd59;
-			font-size: 28rpx !important;
-
-			text {
-				background: #2dbd59;
-				color: #ffffff;
-				padding: 0rpx 10rpx;
-				border-radius: 5rpx;
-				font-size: 22rpx !important;
-				margin-left: 15rpx;
-			}
+		.text {
+			padding-left: 5rpx;
+			color: #b0b0b0;
+			font-size: 22rpx !important;
 		}
+	}
 
-		.m-price {
-			margin: 0 12rpx;
-			color: $font-color-light;
-			text-decoration: line-through;
-			margin-left: 25rpx;
-			font-size: 24rpx;
+	.price-green {
+		color: #2dbd59;
+		font-size: 28rpx !important;
+
+		text {
+			background: #2dbd59;
+			color: #ffffff;
+			padding: 0rpx 10rpx;
+			border-radius: 5rpx;
+			font-size: 22rpx !important;
+			margin-left: 15rpx;
 		}
 	}
 
-	.dhsm {
-		display: flex;
-		margin: 20rpx 0;
-		background-color: #fff;
-		padding: 34rpx 104rpx 30rpx 24rpx;
+	.m-price {
+		margin: 0 12rpx;
+		color: $font-color-light;
+		text-decoration: line-through;
+		margin-left: 25rpx;
+		font-size: 24rpx;
+	}
+}
 
-		.title {
-			font-size: 32rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #333333;
-			margin-right: 32rpx;
-			flex-shrink: 0;
-		}
+.dhsm {
+	display: flex;
+	margin: 20rpx 0;
+	background-color: #fff;
+	padding: 34rpx 104rpx 30rpx 24rpx;
 
-		.info {
-			font-size: 26rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #8A8A8A;
-			line-height: 38rpx;
-		}
+	.title {
+		font-size: 32rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #333333;
+		margin-right: 32rpx;
+		flex-shrink: 0;
 	}
 
-	.price-box-jf {
-		color: #901b21;
-		display: flex;
-		align-items: baseline;
-		height: 64rpx;
-		font-size: 50rpx;
+	.info {
+		font-size: 26rpx;
 		font-family: PingFang SC;
-		font-weight: 800;
-		color: #FF0000;
-
-		.price {
-			font-size: 50rpx;
-		}
-
-		image {
-			height: 30rpx;
-			width: 30rpx;
-		}
-
-		.jf {
-			font-size: 30rpx;
+		font-weight: 500;
+		color: #8a8a8a;
+		line-height: 38rpx;
+	}
+}
+
+.price-box-jf {
+	color: #901b21;
+	display: flex;
+	align-items: baseline;
+	height: 64rpx;
+	font-size: 50rpx;
+	font-family: PingFang SC;
+	font-weight: 800;
+	color: #ff0000;
+
+	.price {
+		font-size: 50rpx;
+	}
 
-		}
+	image {
+		height: 30rpx;
+		width: 30rpx;
 	}
-	.mun-box {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
+
+	.jf {
+		font-size: 30rpx;
 	}
-	.mask {
-		position: fixed;
-		top: 0;
-		left: 0;
+}
+.mun-box {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+}
+.mask {
+	position: fixed;
+	top: 0;
+	left: 0;
+	width: 100%;
+	height: 100%;
+	z-index: 999;
+	background-color: rgba(0, 0, 0, 0.4);
+
+	image {
 		width: 100%;
 		height: 100%;
-		z-index: 999;
-		background-color: rgba(0, 0, 0, 0.4);
-
-		image {
-			width: 100%;
-			height: 100%;
-			opacity: 0.8;
-		}
+		opacity: 0.8;
 	}
+}
 </style>

+ 0 - 23
pages/story/story.vue

@@ -1,12 +1,5 @@
 <template>
 	<view class="content">
-		<!-- 头部导航 -->
-		<view class="nav-bar flex">
-			<view class="nav-item" v-for="(item,index) in navList" :key="index"
-				:class="{'active': currentIndex == index}" @click="navClick(index)">
-				{{item.tit}}
-			</view>
-		</view>
 		<!-- 分类列表 -->
 		<swiper :duration="400" class="swiper-wrapper" :style="{'height': height}" :current="currentIndex"
 			@change="swiperChange">
@@ -76,22 +69,6 @@
 						page: 1,
 						limit: 10,
 						loadingType: 'more'
-					},
-					{
-						cid: 2,
-						tit: '产品简介',
-						list: [],
-						page: 1,
-						limit: 10,
-						loadingType: 'more'
-					},
-					{
-						cid: 3,
-						tit: '案例分享',
-						list: [],
-						page: 1,
-						limit: 10,
-						loadingType: 'more'
 					}
 				]
 			}

BIN
static/icon/search.png


BIN
static/tabbar/tab-cart-current.png


BIN
static/tabbar/tab-cart.png


+ 1 - 1
store/index.js

@@ -6,7 +6,7 @@ Vue.use(Vuex)
 const store = new Vuex.Store({
 	namespaced: true,
 	state: {
-		baseURL:'http://www.plhl918.com/',//请求地址配置 
+		baseURL:'http://hl.frp.liuniu946.com',//请求地址配置 
 		// baseURL:'http://po.frp.liuniu946.com',//请求地址配置
 		urlFile:'/index',//项目部署所在文件夹
 		userInfo: {}, //登录信息

Some files were not shown because too many files changed in this diff