2312970463@qq.com 3 years ago
parent
commit
b2a16b6ae8

+ 8 - 3
components/seckill/seckill.vue

@@ -36,7 +36,7 @@
   				<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
   				<view class="good-title">{{ item.title }}</view>
   				<view class="price">
-  					<view class="now-price">¥{{ item.price }}</view>
+  					<view class="now-price">¥{{ item.price | mon}}</view>
   					<view class="old-price">¥{{ item.ot_price }}</view>
   				</view>
   			</view>
@@ -76,7 +76,12 @@
         show: false, //是否显示活动
         status: 0 //获取状态值1为有活动开始中 2为活动未开始 0为活动已经结束
       };
-    },
+    },
+	filters: {
+		mon(value) {
+			return +value
+		}
+	},
     created: function(e) {
       // 载入分类
       this.getClass();
@@ -350,7 +355,7 @@
   					.old-price {
   						// padding-top:27rpx ;
   						align-self: flex-end;
-  						font-size: 20rpx;
+  						font-size: 15rpx;
   						font-weight: 500;
   						text-decoration: line-through;
   						color: #9d9d9d;

+ 20 - 13
components/uni-countdown/uni-countdown.vue

@@ -38,10 +38,22 @@
 				type: String,
 				default: '#000000'
 			},
-			day:0,
-			hour:0,
-			minute:0,
-			second:0
+			day: {
+				type: Number,
+				default: 0
+			},
+			hour: {
+				type: Number,
+				default: 0
+			},
+			minute: {
+				type: Number,
+				default: 0
+			},
+			second: {
+				type: Number,
+				default: 0
+			}
 		},
 		data() {
 			return {
@@ -94,7 +106,6 @@
 				} else {
 					this.timeUp()
 				}
-				hour = hour + (day*24)
 				if (day < 10) {
 					day = '0' + day
 				}
@@ -130,7 +141,6 @@
 			changeFlag() {
 				if (!this.syncFlag) {
 					this.seconds = this.toSeconds(this.day, this.hour, this.minute, this.second)
-					console.log(this.seconds)
 					this.startData();
 					this.syncFlag = true;
 				}
@@ -140,8 +150,8 @@
 </script>
 <style lang="scss" scoped>
 	@import '~@/uni.scss';
-	$countdown-height: 40rpx;
-	$countdown-width: 40rpx;
+	$countdown-height: 48rpx;
+	$countdown-width: 52rpx;
 
 	.uni-countdown {
 		/* #ifndef APP-NVUE */
@@ -149,9 +159,7 @@
 		/* #endif */
 		flex-direction: row;
 		justify-content: flex-start;
-		position: relative;
-		top: 5rpx;
-		left: 15rpx;
+		padding: 2rpx 0;
 	}
 
 	.uni-countdown__splitor {
@@ -173,9 +181,8 @@
 		width: $countdown-width;
 		height: $countdown-height;
 		line-height: $countdown-height;
-		// margin: 5rpx;
+		margin: 5rpx;
 		text-align: center;
 		font-size: $uni-font-size-sm;
-		border-radius: 8rpx;
 	}
 </style>

+ 16 - 0
pages.json

@@ -484,6 +484,14 @@
 			"style": {
 				"navigationBarTitleText": "邀请好友"
 			}
+		},
+		{
+			"path": "pages/order/choisestore",
+			"style": {
+				"navigationBarTitleText": "选择门店",
+				"navigationBarBackgroundColor":"#fff",
+				"navigationBarTextStyle":"black"
+			}
 		}
 	],
 	"subPackages": [{
@@ -515,6 +523,14 @@
 					"navigationBarTitleText": "砍价记录"
 				}
 			}
+			// {
+			// 	"path": "choise/store",
+			// 	"style": {
+			// 		"navigationBarTitleText": "选择门店",
+			// 		"navigationBarBackgroundColor":"#fff",
+			// 		"navigationBarTextStyle":"black"
+			// 	}
+			// }
 		]
 	}],
 	"globalStyle": {

+ 11 - 0
pages/activity/choise/store.vue

@@ -0,0 +1,11 @@
+<template>
+	<view class="stores-wrapper">
+		55555555
+	</view>
+</template>
+
+<script>
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 57 - 74
pages/index/index.vue

@@ -12,11 +12,11 @@
 		<!-- #endif -->
 		<!-- 头部轮播 -->
 		<!-- <view class="carousel-section"> -->
-			<!-- 标题栏和状态栏占位符 -->
-<!-- 			<view class="titleNview-placing"></view> -->
-			<!-- 背景色区域 -->
-			<!-- <view class="titleNview-background" :style="{ backgroundColor: '#5DBC7C' }"></view> -->
-<!-- 			<view class="titleNview-background" ></view>
+		<!-- 标题栏和状态栏占位符 -->
+		<!-- 			<view class="titleNview-placing"></view> -->
+		<!-- 背景色区域 -->
+		<!-- <view class="titleNview-background" :style="{ backgroundColor: '#5DBC7C' }"></view> -->
+		<!-- 			<view class="titleNview-background" ></view>
 			<swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange">
 				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item" @click="bannerNavToUrl(item)"><image :src="item.pic" /></swiper-item>
 			</swiper>
@@ -39,7 +39,7 @@
 			<text class="iconfont iconenter" @click="loadMore('/pages/product/seckill')">更多</text>
 		</view>
 		<!-- 秒杀商品 -->
-	  <seckill></seckill> 
+		<seckill></seckill>
 		<!-- 超值拼团title -->
 		<view class="m-tap">
 			<image src="../../static/img/groupBooking.png" mode=""></image>
@@ -47,65 +47,28 @@
 		</view>
 		<!-- 超值拼团商品 -->
 		<view class="groupBooking-wrapper">
-			<view class="spgood">
-				<view class="left-wrapper"><image src="../../static/img/spimg1.jpg" mode="scaleToFill"></image></view>
-				<view class="right-wrapper">
-					<view class="right-title">湿热肝上火气肺痰煲汤材料</view>
-					<view class="ex-addr">
-						<image src="../../static/img/shop.png" mode="" class="name-img"></image>
-						子臣台州旗舰店
-						<image src="../../static/img/point.png" mode="" class="point-img"></image>
-						200m
-					</view>
-					<view class="right-bottom">
-						<view class="sp-price">
-							<view class="now-price">¥ 77</view>
-							<view class="old-price">¥ 99</view>
-						</view>
-						<view class="sp-btn">马上拼</view>
-					</view>
-				</view>
-			</view>
-			<view class="jg"></view>
-			<view class="spgood">
-				<view class="left-wrapper"><image src="../../static/img/spimg1.jpg" mode="scaleToFill"></image></view>
-				<view class="right-wrapper">
-					<view class="right-title">湿热肝上火气肺痰煲汤材料</view>
-					<view class="ex-addr">
-						<image src="../../static/img/shop.png" mode="" class="name-img"></image>
-						子臣台州旗舰店
-						<image src="../../static/img/point.png" mode="" class="point-img"></image>
-						200m
-					</view>
-					<view class="right-bottom">
-						<view class="sp-price">
-							<view class="now-price">¥ 77</view>
-							<view class="old-price">¥ 99</view>
+			<template v-for="(item,index) in czgoodList">
+				<view class="spgood" :key="item.id" @click="goProduct(item)">
+					<view class="left-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
+					<view class="right-wrapper">
+						<view class="right-title clamp">{{ item.title }}</view>
+						<view class="ex-addr">
+							<image src="../../static/img/shop.png" mode="" class="name-img"></image>
+							子臣台州旗舰店
+							<image src="../../static/img/point.png" mode="" class="point-img"></image>
+							200m
 						</view>
-						<view class="sp-btn">马上拼</view>
-					</view>
-				</view>
-			</view>
-			<view class="jg"></view>
-			<view class="spgood">
-				<view class="left-wrapper"><image src="../../static/img/spimg1.jpg" mode="scaleToFill"></image></view>
-				<view class="right-wrapper">
-					<view class="right-title">湿热肝上火气肺痰煲汤材料</view>
-					<view class="ex-addr">
-						<image src="../../static/img/shop.png" mode="" class="name-img"></image>
-						子臣台州旗舰店
-						<image src="../../static/img/point.png" mode="" class="point-img"></image>
-						200m
-					</view>
-					<view class="right-bottom">
-						<view class="sp-price">
-							<view class="now-price">¥ 77</view>
-							<view class="old-price">¥ 99</view>
+						<view class="right-bottom">
+							<view class="sp-price">
+								<view class="now-price">¥ {{ item.price }}</view>
+								<view class="old-price">¥ {{ item.product_price }}</view>
+							</view>
+							<view class="sp-btn">马上拼</view>
 						</view>
-						<view class="sp-btn">马上拼</view>
 					</view>
 				</view>
-			</view>
+				<view class="jg" :class="{'jgshow': index === czgoodList.length}" :key="index"></view>
+			</template>
 		</view>
 		<!-- 积分兑换title -->
 		<view class="m-tap">
@@ -457,6 +420,7 @@ import { setCoupons } from '@/api/functionalUnit.js';
 import { getBargainList } from '@/api/product.js';
 import { interceptor } from '@/utils/loginUtils';
 import { mapState } from 'vuex';
+import { getCombinationList } from '@/api/product.js';
 
 export default {
 	components: {
@@ -539,7 +503,8 @@ export default {
 					re_name: '90天便宜好货'
 				}
 			],
-			actTime: new Date()
+			actTime: new Date(),
+			czgoodList: []
 		};
 	},
 	computed: {
@@ -562,12 +527,12 @@ export default {
 			});
 		}
 		// #endif
-    uni.request({
-      complete(res) {
-        console.log(res)
-      },
-      url:'http://base.liuniu946.com/api/index'
-    })
+		uni.request({
+			complete(res) {
+				console.log(res);
+			},
+			url: 'http://base.liuniu946.com/api/index'
+		});
 	},
 	onShow: function() {
 		// 判断是否强制登录
@@ -577,6 +542,7 @@ export default {
 		}
 		this.loadData();
 		this.getBargainList();
+		this.getCzgoods();
 	},
 	//下拉刷新
 	onPullDownRefresh() {
@@ -739,10 +705,10 @@ export default {
 		async loadData() {
 			loadIndexs({})
 				.then(({ data }) => {
-					console.log('index-data++++++++++++++++++',data)
+					console.log('index-data++++++++++++++++++', data);
 					let goods = data.info;
 					this.carouselList = data.banner;
-					console.log(this.carouselList,'lunbotu')
+					console.log(this.carouselList, 'lunbotu');
 					this.swiperLength = this.carouselList.length;
 					this.menusList = data.menus;
 					this.goodsList = goods.firstList; //最新商品
@@ -787,6 +753,21 @@ export default {
 			uni.navigateTo({
 				url: url
 			});
+		},
+		getCzgoods() {
+			getCombinationList({
+				page: 1,
+				limit: 3
+			}).then(res => {
+				console.log(res, 'chaozhi++++++++++');
+				this.czgoodList = res.data;
+			});
+		},
+		goProduct(e) {
+			console.log(e)
+			uni.navigateTo({
+				url: '/pages/product/groupBooking/productGroup?id=' + e.id
+			});
 		}
 	}
 };
@@ -1001,7 +982,6 @@ page {
 		z-index: 5;
 		border-radius: 16rpx 16rpx 0 0;
 		margin-top: -20rpx;
-
 	}
 
 	.carousel-section {
@@ -1602,7 +1582,7 @@ page {
 		height: 200rpx;
 		// background-color: #4CD964;
 		display: flex;
-		
+
 		.left-wrapper {
 			width: 200rpx;
 			height: 200rpx;
@@ -1619,7 +1599,7 @@ page {
 			// background-color: red;
 			.right-title {
 				padding-top: 8rpx;
-				width: 100%;
+				width: 358rpx;
 				// height: 29rpx;
 				font-size: 30rpx;
 				font-weight: bold;
@@ -1831,7 +1811,7 @@ page {
 			image {
 				width: 100%;
 				height: 100%;
-				
+
 				border-radius: $border-radius-sm;
 			}
 		}
@@ -1842,4 +1822,7 @@ page {
 	background-image: url(../../static/img/main_bg.png);
 	background-size: 100%;
 }
+.jgshow {
+	display: none;
+}
 </style>

+ 100 - 0
pages/order/choisestore.vue

@@ -0,0 +1,100 @@
+<template>
+	<view class="stores-wrapper">
+		<view class="store">
+			<view class="store-logo"><image src="../../static/error/missing-face.png" mode=""></image><text class="store-name">子臣餐饮台州店</text></view>
+			<view class="store-addr store-base">地区:<text>市府大道144号</text></view>
+			<view class="store-addr store-base">电话:<text>13202514250</text></view>
+			<view class="store-addr store-base">距离:<text>11.2Km</text></view>
+			<view class="store-lv ">门店</view>
+			<view class="store-can">支持自取</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				storeList: []
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page {
+		background-color: #f8f6f6;
+		height: 100%;
+	}
+.stores-wrapper {
+	padding-top: 20rpx;
+	.store {
+		width: 710rpx;
+		height: 231rpx;
+		background: #FFFFFF;
+		box-shadow: 0px 0px 20rpx 0rpx rgba(50, 50, 52, 0.06);
+		border-radius: 10rpx;
+		// margin-bottom: 15rpx;
+		margin: 0 auto 15rpx;
+		position: relative;
+		padding: 25rpx 0 0 20rpx;
+		.store-logo {
+			height: 65rpx;
+			font-size: 32rpx;
+			font-weight: bold;
+			color: #333333;
+			line-height: 65rpx;
+			margin-bottom: 20rpx;
+			position: relative;
+			image {
+				width: 65rpx;
+				height: 65rpx;
+			}
+			.store-name {
+				display: inline-block;
+				padding-left: 12rpx;
+				position: absolute;
+				top: 0;
+			}
+		}
+		.store-base {
+			height: 37rpx;
+			line-height: 37rpx;
+			font-size: 24rpx;
+			font-weight: bold;
+			color: #333333;
+			text {
+				font-weight: normal;
+			}
+		}
+		.store-lv {
+			width: 60rpx;
+			height: 40rpx;
+			background: linear-gradient(-90deg, #DCB876 0%, #EECD92 100%);
+			border-radius: 5rpx;
+			text-align: center;
+			line-height: 40rpx;
+			color: #fff;
+			font-size: 23rpx;
+			position: absolute;
+			right: 20rpx;
+			top:38rpx;
+		}
+		.store-can {
+			width: 113rpx;
+			height: 44rpx;
+			border: 2px solid #901B21;
+			border-radius: 5rpx;
+			font-size: 23rpx;
+			text-align: center;
+			line-height: 44rpx;
+			font-weight: 500;
+			color: #901B21;
+			position: absolute;
+			right: 20rpx;
+			bottom: 25rpx;
+		}
+	}
+}
+
+</style>

+ 52 - 17
pages/order/createOrder.vue

@@ -78,7 +78,7 @@
 		</view>
 
 		<!-- 优惠明细 -->
-		<view class="yt-list">
+		<!-- <view class="yt-list">
 			<view class="yt-list-cell b-b" @click="couponListshow ? toggleMask('show') : ''">
 				<view class="cell-icon">券</view>
 				<text class="cell-tit clamp">优惠券</text>
@@ -92,27 +92,49 @@
 				<text class="cell-tit clamp">商家促销</text>
 				<text class="cell-tip disabled">满{{ moneyAll.storeFreePostage }}包邮</text>
 			</view>
-		</view>
+		</view> -->
 		<!-- 金额明细 -->
 		<view class="yt-list">
 			<!-- <view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">优惠金额</text>
 				<text class="cell-tip red">-¥35</text>
 			</view> -->
-			<view class="yt-list-cell b-b">
+			<!-- <view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">积分抵扣{{ '(当前积分:' + integralAll + ')' }}</text>
 				<view class="cell-tip"><radio @click="checkedPoints = !checkedPoints" color=" #5dbc7c" :checked="checkedPoints" /></view>
-			</view>
-			<view class="yt-list-cell b-b">
+			</view> -->
+<!-- 			<view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">运费</text>
 				<text class="cell-tip">{{ Postage }}</text>
-			</view>
-			<view class="yt-list-cell b-b">
+			</view> -->
+			<!-- <view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">备注</text>
 				<input class="desc" type="text" v-model="desc" placeholder="请填写备注信息" placeholder-class="placeholder" />
-			</view>
+			</view> -->
+		</view>
+		<view class="price-info">
+			<view class="item">
+				<text class="item-name">配送方式</text>
+				<text class="item-value">{{tabCurrentIndex=== 0 ? '上门配送':'门店自提'}}</text>
+			</view>
+			<view class="item">
+				<text class="item-name">商品总价</text>
+				<text class="item-value">¥{{ payAllMoney }}</text>
+			</view>
+			<view class="item">
+				<text class="item-name">物流费用</text>
+				<text class="item-value">{{ Postage }}</text>
+			</view>
+			<view class="item" v-if="moneyAll.vipPrice > 0">
+				<text class="item-name" >会员折扣</text>
+				<text class="item-value">-¥{{moneyAll.vipPrice}}</text>
+			</view>
+			<view class="item" v-if="tabCurrentIndex === 1">
+				<text class="item-name">押金</text>
+				<text class="item-value">-¥20</text>
+			</view>
 		</view>
-		<view class="yt-list">
+<!-- 		<view class="yt-list">
 			<view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">商品金额</text>
 				<text class="cell-tip">¥{{ payAllMoney }}</text>
@@ -125,12 +147,12 @@
 				<text class="cell-tit clamp">VIP优惠</text>
 				<text class="cell-tip">-¥{{ moneyAll.vipPrice }}</text>
 			</view>
-		</view>
+		</view> -->
 
 		<!-- 底部 -->
 		<view class="footer">
 			<view class="price-content">
-				<text>实付款</text>
+				<text>应付金额</text>
 				<text class="price-tip">¥</text>
 				<text class="price">{{ payPrice }}</text>
 			</view>
@@ -138,10 +160,10 @@
 		</view>
 
 		<!-- 优惠券面板 -->
-		<view class="mask" :class="maskState === 0 ? 'none' : maskState === 1 ? 'show' : ''" @click="toggleMask">
-			<view class="mask-content">
+		<!-- <view class="mask" :class="maskState === 0 ? 'none' : maskState === 1 ? 'show' : ''" @click="toggleMask">
+			<view class="mask-content"> -->
 				<!-- 优惠券页面,仿mt -->
-				<view class="coupon-item" @click="checkedCp(item)" v-for="(item, index) in couponList" :key="index">
+<!-- 				<view class="coupon-item" @click="checkedCp(item)" v-for="(item, index) in couponList" :key="index">
 					<view class="con">
 						<view class="left">
 							<text class="title">{{ item.coupon_title }}</text>
@@ -157,7 +179,7 @@
 					<text class="tips">有效期至{{ item.end_time }}</text>
 				</view>
 			</view>
-		</view>
+		</view> -->
 	</view>
 </template>
 
@@ -697,12 +719,12 @@ page {
 		padding-left: 30rpx;
 	}
 	.price-tip {
-		color: $font-color-base;
+		color: #901B21;
 		margin-left: 8rpx;
 	}
 	.price {
 		font-size: 36rpx;
-		color: $font-color-base;
+		color: #901B21;
 	}
 	.submit {
 		display: flex;
@@ -865,5 +887,18 @@ page {
       background: #FFFFFF;
     }
   }
+}
+.price-info {
+	width: 750rpx;
+	padding: 20rpx 30rpx;
+	background-color: #fff;
+	font-size: 24rpx;
+	font-weight: 500;
+	color: #666666;
+	.item {
+		display: flex;
+		justify-content: space-between;
+		line-height: 36rpx;
+	}
 }
 </style>

+ 11 - 16
pages/order/order.vue

@@ -40,7 +40,7 @@
 							<view class="right">
 								<view class="flex-start">
 									<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
-									<text class="price" style="flex-grow: 1;text-align: right;">{{ goodsItem.productInfo.price|moneyNum }}</text>
+									<text class="price" style="flex-grow: 1;text-align: right;color: #901B21;font-size: 30rpx;font-weight: bold;">{{ goodsItem.productInfo.price|moneyNum }}</text>
 								</view>
 								<view class="row flex">
 									<text class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>
@@ -53,9 +53,12 @@
 							<text class="num">{{ item.cartInfo.length }}</text>
 							件商品 邮费
-							<text class="price">{{ moneyNum(item.pay_postage)}}</text>
-							实付款
+							
+							合计
 							<text class="price">{{ moneyNum(item.pay_price)}}</text>
+							(含运费
+							<text class="price">{{ moneyNum(item.pay_postage)}}</text>
+							)
 						</view>
 						<view class="action-box b-t" v-if="item.status != 5">
 							<button v-if="item._status._title == '未支付'" class="action-btn" @click.stop="cancelOrder(item)">取消订单</button>
@@ -92,31 +95,23 @@ export default {
 			tabCurrentIndex: 0,
 			navList: [
 				{
-					state: 5,
-					text: '全部',
+					state: 0,
+					text: '待付款',
 					loadingType: 'more',
 					orderList: [],
 					page: 1, //当前页数
 					limit: 10 //每次信息条数
 				},
 				{
-					state: 0,
-					text: '待付款',
+					state: 1,
+					text: '待发货',
 					loadingType: 'more',
 					orderList: [],
 					page: 1, //当前页数
 					limit: 10 //每次信息条数
 				},
-				// {
-				// 	state: 1,
-				// 	text: '待发货',
-				// 	loadingType: 'more',
-				// 	orderList: [],
-				// 	page: 1, //当前页数
-				// 	limit: 10 //每次信息条数
-				// },
 				{
-					state: 1,
+					state: 2,
 					text: '待收货',
 					loadingType: 'more',
 					orderList: [],

+ 26 - 23
pages/order/orderRefund.vue

@@ -6,24 +6,24 @@
 					<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
 				</view>
 			</scroll-view>
-			<view v-if="listStyle == 2" class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
+<!-- 			<view v-if="listStyle == 2" class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
 				<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
 				<view class="right">
 					<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
 					<text class="attr-box">{{ goodsItem.attrInfo ? goodsItem.attrInfo.suk : '' }} x {{ goodsItem.cart_num }}</text>
 					<text class="price">{{ goodsItem.productInfo.price }}</text>
 				</view>
-			</view>
-		</view>
-		<view class="good">
-			<view class="img-wrapper"><image src="../../static/img/ex1.jpg" mode=""></image></view>
-			<view class="good-infoo">
-				<view class="good-name">子臣鸭汤调料粉商用专用配方特调底料</view>
-				<view class="create-time">下单时间:2019-06-09</view>
-			</view>
-			<view class="good-infot">
-				<view class="good-price">¥21</view>
-				<view class="good-num">X99</view>
+			</view> -->
+			<view class="good" v-if="listStyle == 2" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
+				<view class="img-wrapper"><image :src="goodsItem.productInfo.image" mode=""></image></view>
+				<view class="good-infoo">
+					<view class="good-name ellipsis">{{ goodsItem.productInfo.store_name }}</view>
+					<view class="create-time">下单时间:{{item.add_time_y}}</view>
+				</view>
+				<view class="good-infot">
+					<view class="good-price">¥{{ goodsItem.productInfo.price }}</view>
+					<view class="good-num">X{{ goodsItem.cart_num }}</view>
+				</view>
 			</view>
 		</view>
 		<!-- <view class="orderDetial">
@@ -50,14 +50,14 @@
 		</view> -->
 		<view class="row b-b">
 			<text class="tit">货物状态</text>
-			<picker mode="selector" :range="status" @change="bindChange">
-				<view class="refund" v-if="refundStatus">{{ refundStatus || '请选择' }}</view>
-				<view class="noRefund" v-else>请选择</view>
-			</picker>
+			<input class="input" type="text" v-model="reason" placeholder="请输入货物状态" placeholder-class="placeholder" />
 		</view>
 		<view class="row b-b">
 			<text class="tit">退款原因</text>
-			<input class="input" type="text" v-model="reason" placeholder="请输入退款原因" placeholder-class="placeholder" />
+			<picker mode="selector" :range="status" @change="bindChange">
+				<view class="refund" v-if="refundStatus">{{ refundStatus || '请选择' }}</view>
+				<view class="noRefund" v-else>请选择退款原因</view>
+			</picker>
 		</view>
 		<view class="row b-b">
 			<text class="tit">退款方式</text>
@@ -91,7 +91,7 @@ import { refund, refundReason, orderDetail } from '@/api/order.js';
 export default {
 	data() {
 		return {
-			refundStatus: '', //退款方式
+			refundStatus: '', //退款理由
 			refundMethods: '', //退款方式
 			reason: '', //退款理由
 			status: ['代付款', '待发货', '待收货', '已完成'],
@@ -99,7 +99,7 @@ export default {
 			item: {},
 			listStyle: 2,
 			refundNum: 0,
-			methods: ['微信', '支付宝'],
+			methods: ['余额'],
 			isUp: true,
 			upImg: ''
 		};
@@ -113,6 +113,7 @@ export default {
 		// 切换选中事件
 		bindChange(e) {
 			this.refundStatus = this.status[e.detail.value];
+			console.log('this.refundStatus',this.refundStatus)
 		},
 		bind2Change(e) {
 			this.refundMethods = this.methods[e.detail.value];
@@ -126,11 +127,13 @@ export default {
 		loadOrder() {
 			orderDetail({}, this.orderId).then(e => {
 				this.item = e.data;
+				console.log(this.item)
 			});
 		},
 		//提交
 		confirm() {
-			if (!obj.refund) {
+			let obj = this;
+			if (!obj.refundStatus) {
 				uni.showModal({
 					title: '错误',
 					content: '请填写退货理由',
@@ -138,9 +141,9 @@ export default {
 				});
 				return false;
 			}
-			let obj = this;
+
 			refund({
-				text: obj.refund,
+				text: obj.refundStatus,
 				uni: obj.orderId,
 				refund_reason_wap_explain: obj.reason
 			}).then(function(e) {
@@ -225,7 +228,7 @@ page {
 .order-item {
 	display: flex;
 	flex-direction: column;
-	padding-left: 30rpx;
+	// padding-left: 30rpx;
 	background: #fff;
 	margin-top: 16rpx;
 	.goods-box {

+ 0 - 1
pages/product/common/contentText.vue

@@ -41,7 +41,6 @@ export default {
 			font-size: $font-base + 2rpx;
 			color: $font-color-dark;
 			position: relative;
-	
 			text {
 				padding: 0 20rpx;
 				background: #fff;

+ 116 - 115
pages/product/common/estimate.vue

@@ -1,115 +1,116 @@
-<template>
-	<view class="eva-section" @click="navTo">
-		<view class="e-header">
-			<text class="tit">评价</text>
-			<text>({{ list.replyCount }})</text>
-			<text class="tip">好评率 {{ list.replyChance }}%</text>
-			<text class="iconfont iconenter"></text>
-		</view>
-		<view class="eva-box">
-			<image class="portrait" :src="reply.avatar" mode="aspectFill"></image>
-			<view class="right">
-				<text class="name">{{ reply.nickname }}</text>
-				<text class="con">{{ reply.comment }}</text>
-				<view class="con_box">
-					<view class="con_image" v-for="item in reply.pics"><image :src="item"></image></view>
-				</view>
-				<view class="bot">
-					<text class="attr"></text>
-					<text class="stime">{{ reply.add_time }}</text>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-export default {
-	props: {
-		list: {
-			default: ''
-		},
-		reply: {
-			default: ''
-		},
-	},
-	data() {
-		return {
-		};
-	},
-	methods: {
-		navTo() {
-			this.$emit('navTo')
-		}
-	},
-};
-</script>
-
-<style lang="scss">
-/* 评价 */
-.eva-section {
-	display: flex;
-	flex-direction: column;
-	padding: 20rpx 30rpx;
-	background: #fff;
-	margin-top: 16rpx;
-	.e-header {
-		display: flex;
-		align-items: center;
-		height: 70rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-light;
-		.tit {
-			font-size: $font-base + 2rpx;
-			color: $font-color-dark;
-			margin-right: 4rpx;
-		}
-		.tip {
-			flex: 1;
-			text-align: right;
-		}
-		.iconenter {
-			margin-left: 10rpx;
-		}
-	}
-	.eva-box {
-		display: flex;
-		padding: 20rpx 0;
-		.portrait {
-			flex-shrink: 0;
-			width: 80rpx;
-			height: 80rpx;
-			border-radius: 100px;
-		}
-		.right {
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-			font-size: $font-base;
-			color: $font-color-base;
-			padding-left: 26rpx;
-			.con {
-				font-size: $font-base;
-				color: $font-color-dark;
-				padding: 20rpx 0;
-			}
-			.bot {
-				display: flex;
-				justify-content: space-between;
-				font-size: $font-sm;
-				color: $font-color-light;
-			}
-		}
-	}
-	.con_image {
-		width: 130rpx;
-		height: 130rpx;
-		display: inline-block;
-		padding: 15rpx;
-		image {
-			width: 100%;
-			height: 100%;
-		}
-	}
-}
-</style>
+<template>
+	<view class="eva-section" @click="navTo">
+		<view class="e-header">
+			<text class="tit">评价</text>
+			<text>({{ list.replyCount }})</text>
+			<!-- <text class="tip">好评率 {{ list.replyChance }}%</text> -->
+			<text class="tip">查看全部评价</text>
+			<text class="iconfont iconenter"></text>
+		</view>
+		<view class="eva-box">
+			<image class="portrait" :src="reply.avatar" mode="aspectFill"></image>
+			<view class="right">
+				<text class="name">{{ reply.nickname }}</text>
+				<text class="con">{{ reply.comment }}</text>
+				<view class="con_box">
+					<view class="con_image" v-for="item in reply.pics"><image :src="item"></image></view>
+				</view>
+				<view class="bot">
+					<text class="attr"></text>
+					<text class="stime">{{ reply.add_time }}</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		list: {
+			default: ''
+		},
+		reply: {
+			default: ''
+		},
+	},
+	data() {
+		return {
+		};
+	},
+	methods: {
+		navTo() {
+			this.$emit('navTo')
+		}
+	},
+};
+</script>
+
+<style lang="scss">
+/* 评价 */
+.eva-section {
+	display: flex;
+	flex-direction: column;
+	padding: 20rpx 30rpx;
+	background: #fff;
+	margin-top: 16rpx;
+	.e-header {
+		display: flex;
+		align-items: center;
+		height: 70rpx;
+		font-size: $font-sm + 2rpx;
+		color: $font-color-light;
+		.tit {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+			margin-right: 4rpx;
+		}
+		.tip {
+			flex: 1;
+			text-align: right;
+		}
+		.iconenter {
+			margin-left: 10rpx;
+		}
+	}
+	.eva-box {
+		display: flex;
+		padding: 20rpx 0;
+		.portrait {
+			flex-shrink: 0;
+			width: 80rpx;
+			height: 80rpx;
+			border-radius: 100px;
+		}
+		.right {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			font-size: $font-base;
+			color: $font-color-base;
+			padding-left: 26rpx;
+			.con {
+				font-size: $font-base;
+				color: $font-color-dark;
+				padding: 20rpx 0;
+			}
+			.bot {
+				display: flex;
+				justify-content: space-between;
+				font-size: $font-sm;
+				color: $font-color-light;
+			}
+		}
+	}
+	.con_image {
+		width: 130rpx;
+		height: 130rpx;
+		display: inline-block;
+		padding: 15rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
+</style>

+ 1 - 1
pages/product/common/groupBottom.vue

@@ -67,7 +67,7 @@ export default {
 .goods-pay-box {
 	position: fixed;
 	left: 0;
-	bottom: 0;
+	bottom: 35rpx;
 	z-index: 99;
 	width: 100%;
 	height: 100rpx;

+ 210 - 169
pages/product/common/productBottom.vue

@@ -1,169 +1,210 @@
-<template>
-	<view class="page-bottom">
-		<navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
-			<text class="iconfont iconhome"></text>
-			<text>首页</text>
-		</navigator>
-		<view class="p-b-btn" :class="{ active: goodsObjact.userCollect }" @click="toFavorite(goodsObjact)">
-			<text class="iconfont " :class="{ iconlike: !goodsObjact.userCollect, iconlikefill: goodsObjact.userCollect }"></text>
-			<text>收藏</text>
-		</view>
-		<view class="action-btn-group">
-			<button type="primary" class=" action-btn no-border add-cart-btn" @click="buy(2)">加入购物车</button>
-			<button type="primary" class=" action-btn no-border buy-now-btn" @click="buy(1)">立即购买</button>
-		</view>
-	</view>
-</template>
-
-<script>
-import { collectAdd, collectDel } from '@/api/product.js';
-export default {
-	props: {
-		many: {
-			default: 9
-		},
-		goodsObjact: {
-			default: function() {
-				return {};
-			}
-		},
-		goodsid:{
-			default: ''
-		}
-	},
-	data() {
-		return {};
-	},
-	methods: {
-		buy(type) {
-			this.$emit('specOPne',type);
-		},
-		//收藏
-		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
-					});
-				});
-			}
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-/* 底部操作菜单 */
-.page-bottom {
-	position: fixed;
-	bottom: 0rpx;
-	z-index: 95;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	width: 750rpx;
-	height: 120rpx;
-	background-color: #ffffff;
-	/* box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
-	border-radius: 16rpx; */
-	.p-b-btn {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-		font-size: $font-sm;
-		color: $font-color-base;
-		width: 96rpx;
-		height: 80rpx;
-		.iconfont {
-			font-size: 40rpx;
-			line-height: 48rpx;
-			color: $font-color-light;
-		}
-		&.active,
-		&.active .iconfont {
-			color: $uni-color-primary;
-		}
-		.iconlikefill {
-			font-size: 46rpx;
-		}
-		image {
-			width: 56rpx;
-			height: 58rpx;
-		}
-	}
-	.action-btn-group {
-		display: flex;
-		height: 76rpx;
-		border-radius: 100px;
-		overflow: hidden;
-		margin-left: 20rpx;
-		position: relative;
-		&:after {
-			content: '';
-			position: absolute;
-			top: 50%;
-			right: 50%;
-			transform: translateY(-50%);
-			height: 28rpx;
-			width: 0;
-			border-right: 1px solid rgba(255, 255, 255, 0.5);
-		}
-		.action-btn {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			width: 270rpx;
-			height: 100%;
-			font-size: $font-base;
-			padding: 0;
-			border-radius: 0;
-			background: transparent;
-			&.buy-now-btn {
-				background-color: #303e49;
-			}
-			&.add-cart-btn {
-				background-color: $base-color;
-			}
-		}
-	}
-}
-.p-b-btn {
-	display: flex;
-	flex-direction: column;
-	align-items: center;
-	justify-content: center;
-	font-size: $font-sm;
-	color: $font-color-base;
-	width: 96rpx;
-	height: 80rpx;
-	.iconfont {
-		font-size: 40rpx;
-		line-height: 48rpx;
-		color: $font-color-light;
-	}
-	&.active,
-	&.active .iconfont {
-		color: $uni-color-primary;
-	}
-	.icon-fenxiang2 {
-		font-size: 42rpx;
-		transform: translateY(-2rpx);
-	}
-	.iconlikefill {
-		font-size: 46rpx;
-	}
-}
-</style>
+<template>
+	<!-- <view class="page-bottom">
+		<navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
+			<text class="iconfont iconhome"></text>
+			<text>首页</text>
+		</navigator>
+		<view class="p-b-btn" :class="{ active: goodsObjact.userCollect }" @click="toFavorite(goodsObjact)">
+			<text class="iconfont " :class="{ iconlike: !goodsObjact.userCollect, iconlikefill: goodsObjact.userCollect }"></text>
+			<text>收藏</text>
+		</view>
+		<view class="action-btn-group">
+			<button type="primary" class=" action-btn no-border add-cart-btn" @click="buy(2)">加入购物车</button>
+			<button type="primary" class=" action-btn no-border buy-now-btn" @click="buy(1)">立即购买</button>
+		</view>
+		
+	</view> -->
+	<view class="btm-btn">
+		<button type="primary" class="add-btn"  @click="buy(2)">加入购物车</button>
+		<button type="primary" class="buy-btn" @click="buy(1)">立即购买</button>
+	</view>
+</template>
+
+<script>
+import { collectAdd, collectDel } from '@/api/product.js';
+export default {
+	props: {
+		many: {
+			default: 9
+		},
+		goodsObjact: {
+			default: function() {
+				return {};
+			}
+		},
+		goodsid:{
+			default: ''
+		}
+	},
+	data() {
+		return {};
+	},
+	methods: {
+		buy(type) {
+			this.$emit('specOPne',type);
+		},
+		//收藏
+		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
+					});
+				});
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+/* 底部操作菜单 */
+.page-bottom {
+	position: fixed;
+	bottom: 0rpx;
+	z-index: 95;
+	// display: flex;
+	// justify-content: space-between;
+	// align-items: center;
+	width: 750rpx;
+	height: 120rpx;
+	background-color: #ffffff;
+	/* box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
+	border-radius: 16rpx; */
+	.p-b-btn {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		font-size: $font-sm;
+		color: $font-color-base;
+		width: 96rpx;
+		height: 80rpx;
+		.iconfont {
+			font-size: 40rpx;
+			line-height: 48rpx;
+			color: $font-color-light;
+		}
+		&.active,
+		&.active .iconfont {
+			color: $uni-color-primary;
+		}
+		.iconlikefill {
+			font-size: 46rpx;
+		}
+		image {
+			width: 56rpx;
+			height: 58rpx;
+		}
+	}
+	.action-btn-group {
+		display: flex;
+		height: 76rpx;
+		border-radius: 100px;
+		overflow: hidden;
+		margin-left: 20rpx;
+		position: relative;
+		&:after {
+			content: '';
+			position: absolute;
+			top: 50%;
+			right: 50%;
+			transform: translateY(-50%);
+			height: 28rpx;
+			width: 0;
+			border-right: 1px solid rgba(255, 255, 255, 0.5);
+		}
+		.action-btn {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 270rpx;
+			height: 100%;
+			font-size: $font-base;
+			padding: 0;
+			border-radius: 0;
+			background: transparent;
+			&.buy-now-btn {
+				background-color: #303e49;
+			}
+			&.add-cart-btn {
+				background-color: $base-color;
+			}
+		}
+	}
+}
+.p-b-btn {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+	font-size: $font-sm;
+	color: $font-color-base;
+	width: 96rpx;
+	height: 80rpx;
+	.iconfont {
+		font-size: 40rpx;
+		line-height: 48rpx;
+		color: $font-color-light;
+	}
+	&.active,
+	&.active .iconfont {
+		color: $uni-color-primary;
+	}
+	.icon-fenxiang2 {
+		font-size: 42rpx;
+		transform: translateY(-2rpx);
+	}
+	.iconlikefill {
+		font-size: 46rpx;
+	}
+}
+.btm-btn {
+	z-index: 2;
+	width: 750rpx;
+	height: 130rpx;
+	display: flex;
+	// justify-content: space-between;
+	justify-content: space-between;
+	// justify-content: space-between;
+	position: fixed;
+	padding: 20rpx;
+	bottom: 0;
+	background-color: #fff;
+	// z-index: 666;
+	.add-btn {
+		width: 339rpx;
+		height: 90rpx;
+		border: 1px solid #901B21;
+		border-radius: 45rpx;
+		background-color: #fff;
+		font-size: 36rpx;
+		font-weight: 500;
+		color: #901B21;
+		line-height: 90rpx;
+	}
+	.buy-btn {
+		width: 339rpx;
+		height: 90rpx;
+		background: #901B21;
+		border-radius: 45rpx;
+		font-size: 36rpx;
+		font-weight: 500;
+		color: #901B21;
+		line-height: 90rpx;
+		color: #fff;
+	}
+}
+</style>

+ 151 - 146
pages/product/common/productContent.vue

@@ -1,146 +1,151 @@
-<template>
-	<view class="introduce-section">
-		<text class="title clamp2">{{ goodsObjact.store_name }}</text>
-		<button open-type="share" class="shareDate">
-			<image class="share-img" src="../../../static/img/img57.png"></image>
-			好物推荐
-		</button>
-		<text class="info" v-if="goodsObjact.store_info">{{ goodsObjact.store_info }}</text>
-		<!-- <view class="progress-box">
-			<progress :percent="goodsObjact.percent | parseIntTo" activeColor="#F65527" font-size="10" show-info border-radius="5" stroke-width="9" />
-			<view class="number">剩余{{ goodsObjact.percent | parseIntTo }}%</view>
-		</view> -->
-		<view class="price-box">
-			<text class="price-tip">¥</text>
-			<view class="price">
-				{{ goodsObjact.price }}
-				<text class="text">/份</text>
-				<text class="m-price" v-if="goodsObjact.ot_price > goodsObjact.price">¥{{ goodsObjact.ot_price }}</text>
-			</view>
-		</view>
-		<view class="price-green">
-			¥{{ goodsObjact.ot_price }}
-			<text>市场价</text>
-		</view>
-	</view>
-</template>
-
-<script>
-export default {
-	props: {
-		goodsObjact: {
-			type: Object,
-			default: function() {
-				return {
-					percent:1
-				};
-			}
-		}
-	},
-	filters: {
-		parseIntTo(percent) {
-			percent = +percent * 100;
-			if (percent % 1 === 0) {
-				return percent;
-			} else {
-				percent = percent.toFixed(1);
-				return percent;
-			}
-		}
-	},
-	data() {
-		return {};
-	}
-};
-</script>
-
-<style lang="scss">
-/* 标题简介 */
-.introduce-section {
-	position: relative;
-	background: #fff;
-	padding: 35rpx 0rpx;
-	padding-left: 35rpx;
-	.title {
-		font-size: 32rpx;
-		color: $font-color-dark;
-		.tip-o {
-			color: #ff3334;
-			padding-left: 15rpx;
-		}
-	}
-	.shareDate {
-		position: absolute;
-		top: 25rpx;
-		right: 25rpx;
-		font-size: 26rpx;
-		color: #3d3f46;
-		border-radius: 15rpx;
-		background-color: #ffffff;
-		height: 60rpx;
-		line-height: 60rpx;
-	}
-	.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: 26rpx;
-		color: $uni-color-primary;
-	}
-	.price {
-		font-size: $font-lg + 6rpx;
-		.text {
-			padding-left: 5rpx;
-			color: #b0b0b0;
-			font-size: 22rpx !important;
-		}
-	}
-	.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;
-		}
-	}
-	.m-price {
-		margin: 0 12rpx;
-		color: $font-color-light;
-		text-decoration: line-through;
-		margin-left: 25rpx;
-		font-size: 24rpx;
-	}
-}
-</style>
+<template>
+	<view class="introduce-section">
+		
+		<button open-type="share" class="shareDate" style="border: none;">
+			<image class="share-img" src="../../../static/icon/share.png"></image>
+		</button>
+		<!-- <text class="info" v-if="goodsObjact.store_info">{{ goodsObjact.store_info }}</text> -->
+		<!-- <view class="progress-box">
+			<progress :percent="goodsObjact.percent | parseIntTo" activeColor="#F65527" font-size="10" show-info border-radius="5" stroke-width="9" />
+			<view class="number">剩余{{ goodsObjact.percent | parseIntTo }}%</view>
+		</view> -->
+		<view class="price-box">
+			<text class="price-tip">¥</text>
+			<view class="price">
+				{{ goodsObjact.price }}
+			<!-- 	<text class="text">/份</text> -->
+				<text class="m-price" v-if="goodsObjact.ot_price > goodsObjact.price">¥{{ goodsObjact.ot_price }}</text>
+			</view>
+		</view>
+		<!-- <view class="price-green">
+			¥{{ goodsObjact.ot_price }}
+			<text>市场价</text>
+		</view> -->
+		<text class="title clamp2" v-if="goodsObjact.store_name">{{ goodsObjact.store_name }}</text>
+		<text class="title clamp2" v-else>{{ goodsObjact.title }}</text>
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		goodsObjact: {
+			type: Object,
+			default: function() {
+				return {
+					percent:1
+				};
+			}
+		}
+	},
+	filters: {
+		parseIntTo(percent) {
+			percent = +percent * 100;
+			if (percent % 1 === 0) {
+				return percent;
+			} else {
+				percent = percent.toFixed(1);
+				return percent;
+			}
+		}
+	},
+	data() {
+		return {};
+	}
+};
+</script>
+
+<style lang="scss">
+/* 标题简介 */
+.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;
+		}
+	}
+	.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;
+		}
+	}
+	.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: #EF041F;
+	}
+	.price {
+		font-size: $font-lg + 6rpx;
+		.text {
+			padding-left: 5rpx;
+			color: #b0b0b0;
+			font-size: 22rpx !important;
+		}
+	}
+	.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;
+		}
+	}
+	.m-price {
+		margin: 0 12rpx;
+		color: $font-color-light;
+		text-decoration: line-through;
+		margin-left: 25rpx;
+		font-size: 24rpx;
+	}
+}
+</style>

+ 2 - 2
pages/product/common/topSwiper.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="carousel">
-		<swiper indicator-dots :circular="true" duration="400"  @change="swiperChange">
+		<swiper :circular="true" duration="400"  @change="swiperChange">
 			<swiper-item class="swiper-item" v-for="(item, index) in imgList" :key="index">
-				<view class="image-wrapper"><image :src="item" class="loaded" mode="scaleToFill"></image></view>
+				<view class="image-wrapper"><image :src="item" class="loaded" mode="aspectFit"></image></view>
 			</swiper-item>
 		</swiper>
 		<view class="swiper-dots" v-show="isShow">

+ 1 - 1
pages/product/groupBooking/index.vue

@@ -33,7 +33,7 @@
 						<image src="../../../static/img/point.png" mode="" class="point-img"></image>
 						200m
 					</view>
-					<view class="pepple-num"><image src="../../../static/icon/hot.png" mode="scaleToFill"></image> &ensp;&ensp;{{  items.people }}人团</view>
+					<view class="pepple-num"><image src="../../../static/icon/hot.png" mode="scaleToFill"></image>{{  items.people }}人团</view>
 					<view class="right-bottom">
 						<view class="sp-price">
 							<view class="now-price">¥{{ items.price * 1 }}</view>

+ 69 - 5
pages/product/groupBooking/productGroup.vue

@@ -7,6 +7,13 @@
 		<view class="jg"></view>
 		<!-- 拼团标题 -->
 		<group-content :goodsObjact="goodsObjact"></group-content>
+		<!-- <view class="row b-b">
+			<text class="tit">选择</text>
+			<picker mode="selector" :range="choNum" @change="bindChange">
+				<view class="refund" v-if="goodsNumber !== 1">{{ goodsNumber || '请选择' }}</view>
+				<view class="noRefund" v-else>请选择购买数量</view>
+			</picker>
+		</view> -->
 		<view class="have-know">拼团须知<text>开团/参团-邀请好友-满员发货</text></view>
 		<view class="way">开团玩法<text>开团玩法详细介绍开团玩法详细介绍开团 玩法详细介绍开团玩法详细介绍开团玩法 详细介绍开团玩法详细介绍</text></view>
 		<!-- 拼团到货时间及优惠 -->
@@ -112,12 +119,12 @@
 						</text>
 					</view>
 				</view>
-				<!-- <view class="attr-list">
+				<view class="attr-list">
 					<text>购买数量</text>
 					<view class="item-list">
 						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
 					</view>
-				</view> -->
+				</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>
@@ -173,6 +180,8 @@
 	import returnButton from '@/components/returnButton.vue';
 	// 大家还在拼
 	import NowList from '@/components/newlist/nowList.vue';
+	
+	import uniNumberBox from '@/components/uni-number-box.vue';
 	export default {
 		components: {
 			topSwiper,
@@ -183,7 +192,8 @@
 			contentText,
 			groupBottom,
 			returnButton,
-			NowList
+			NowList,
+			uniNumberBox
 		},
 		data() {
 			return {
@@ -284,6 +294,13 @@
 			...mapState(['weichatObj', 'baseURL', 'urlFile']),
 			pinkingNum() {
 				return this.people*1 - this.count*1 || 0
+			},
+			choNum() {
+				let a = []
+				for(let i = 1 ; i <= this.goodsNumberMax ; i++ ){
+					a.push(i)
+				}
+				return a
 			}
 		},
 		// 分享
@@ -365,6 +382,7 @@
 				// 创建传值对象
 				console.log(obj.list.productValue);
 				console.log(obj.list);
+				console.log(obj.goodsNumber)
 				let data = {
 					// cartNum: obj.goodsNumber, //商品数量
 					cartNum: obj.chooseGoodsNumber, //商品数量
@@ -507,6 +525,7 @@
 				let obj = this;
 				obj.type = item;
 				// 创建传值对象
+				console.log(obj.goodsNumber)
 				let data = {
 					cartNum: obj.goodsNumber, //商品数量
 					new: 1, //商品是否新增加到购物车1为不加入0为加入
@@ -549,7 +568,15 @@
 				}
 			},
 			// 阻止触发上级事件
-			stopPrevent() {}
+			stopPrevent() {},
+			bindChange(e) {
+				this.goodsNumber = this.choNum[e.detail.value]*1;
+				console.log(this.goodsNumber)
+			},
+			numberChange(e) {
+				//购买数量
+				this.chooseGoodsNumber = e.number;
+			}
 		}
 	};
 </script>
@@ -754,7 +781,7 @@
 
 	//秒杀、拼团底部高度
 	.contentBottomHeight {
-		height: 110rpx;
+		height: 125rpx;
 		// background-color: #FFFFFF;
 	}
 
@@ -987,4 +1014,41 @@
 			line-height: 1.5;
 		}
 	}
+	.row {
+		display: flex;
+		align-items: center;
+		position: relative;
+		padding: 0 30rpx;
+		height: 110rpx;
+		background: #fff;
+		.refund {
+			font-size: 30rpx;
+			color: $font-color-dark;
+			padding-left: 128rpx;
+		}
+		.noRefund {
+			font-size: 30rpx;
+			color: $font-color-light;
+			padding-left: 128rpx;
+		}
+		.tit {
+			flex-shrink: 0;
+			width: 120rpx;
+			font-size: 30rpx;
+			color: $font-color-dark;
+		}
+		.input {
+			flex: 1;
+			font-size: 30rpx;
+			color: $font-color-dark;
+			padding-left: 128rpx;
+			&.payColor {
+				color: $color-red;
+			}
+		}
+		.iconlocation {
+			font-size: 36rpx;
+			color: $font-color-light;
+		}
+	}
 </style>

+ 903 - 612
pages/product/product.vue

@@ -1,612 +1,903 @@
-<template>
-	<view class="container">
-		<!-- 轮播图 -->
-		<top-swiper :imgList="imgList"></top-swiper>
-		<!-- 标题 -->
-		<product-content :goodsObjact="goodsObjact"></product-content>
-		<!-- 拼货时间及优惠 -->
-		<!-- <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" :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">
-						<text class="name">{{ goodsObjact.store_name }}</text>
-						<text class="price">¥{{ actionPrice * goodsNumber }}</text>
-						<text class="stock">库存:{{ goodsStore }}件</text>
-						<view class="selected" v-if="specList != ''">
-							已选:
-							<text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem }}</text>
-						</view>
-					</view>
-				</view>
-				<view v-for="(item, index) in specList" :key="index" class="attr-list">
-					<text>{{ item.attr_name }}</text>
-					<view class="item-list">
-						<text
-							v-for="(childItem, childIndex) in item.attr_value"
-							:key="childIndex"
-							class="tit"
-							:class="{ selected: childItem.check }"
-							@click="selectSpec(childItem, item, index)"
-						>
-							{{ childItem.attr }}
-						</text>
-					</view>
-				</view>
-				<!-- <view class="attr-list">
-					<text>购买数量</text>
-					<view class="item-list">
-						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
-					</view>
-				</view> -->
-				<button class="btn" @click.stop="buy" v-show="buys_show">完成</button>
-				<button class="btn" style="background-color: #999999;" v-show="buys_shows">售罄</button>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-import { goodsDetail, cartAdd } 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';
-export default {
-	components: {
-		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: ''
-		};
-	},
-	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;
-		this.goodsType = options.type;
-		// 判断有无人邀请
-		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 为详细失败信息
-				}
-			}
-		};
-
-		return shareObj;
-	},
-	methods: {
-		//选择规格
-		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'
-			});
-		},
-		//详情页
-		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;
-				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
-			});
-		},
-		// 立即购买
-		buy() {
-			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: 35vh;
-		border-radius: 10rpx 10rpx 0 0;
-		background-color: #fff;
-
-		.btn {
-			height: 66rpx;
-			line-height: 66rpx;
-			border-radius: 100rpx;
-			background: $uni-color-primary;
-			font-size: $font-base + 2rpx;
-			color: #fff;
-			margin: 30rpx auto 20rpx;
-		}
-	}
-
-	@keyframes showPopup {
-		0% {
-			opacity: 0;
-		}
-
-		100% {
-			opacity: 1;
-		}
-	}
-
-	@keyframes hidePopup {
-		0% {
-			opacity: 1;
-		}
-
-		100% {
-			opacity: 0;
-		}
-	}
-
-	@keyframes showLayer {
-		0% {
-			transform: translateY(120%);
-		}
-
-		100% {
-			transform: translateY(0%);
-		}
-	}
-
-	@keyframes hideLayer {
-		0% {
-			transform: translateY(0);
-		}
-
-		100% {
-			transform: translateY(120%);
-		}
-	}
-}
-/* 规格选择弹窗 */
-.attr-content {
-	padding: 25rpx 30rpx;
-
-	.a-t {
-		display: flex;
-
-		image {
-			width: 170rpx;
-			height: 170rpx;
-			flex-shrink: 0;
-			border-radius: 8rpx;
-		}
-
-		.right {
-			display: flex;
-			flex-direction: column;
-			padding-left: 24rpx;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-base;
-			line-height: 42rpx;
-			width: 75%;
-
-			.price {
-				font-size: $font-lg;
-				color: $uni-color-primary;
-				margin: 10rpx 0rpx;
-			}
-
-			.name {
-				font-size: 32rpx;
-				color: $font-color-dark;
-				height: 50rpx;
-				overflow: hidden;
-				text-overflow: ellipsis;
-				white-space: nowrap;
-				display: block;
-			}
-
-			.selected-text {
-				margin-right: 10rpx;
-			}
-		}
-	}
-
-	.attr-list {
-		display: flex;
-		flex-direction: column;
-		font-size: $font-base + 2rpx;
-		color: $font-color-base;
-		padding-top: 30rpx;
-		padding-left: 10rpx;
-	}
-
-	.item-list {
-		padding: 20rpx 0 0;
-		display: flex;
-		flex-wrap: wrap;
-
-		text {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			background: #eee;
-			margin-right: 20rpx;
-			margin-bottom: 20rpx;
-			border-radius: 100rpx;
-			min-width: 60rpx;
-			height: 60rpx;
-			padding: 0 20rpx;
-			font-size: $font-base;
-			color: $font-color-dark;
-		}
-
-		.selected {
-			background: #ddffdf;
-			color: $uni-color-primary;
-		}
-	}
-}
-
-//默认商品底部高度
-.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;
-}
-</style>
+<template>
+	<view class="container">
+		<!-- 轮播图 -->
+		<top-swiper :imgList="imgList"></top-swiper>
+		<view class="sckill-top" v-if="isSckill">
+			<view class="top-left">
+				<view class="left-top">限时秒杀价</view>
+				<view class="left-btm">¥<text class="now-pri">{{goodsObjact.price}}</text><text class="old-pri">¥{{goodsObjact.ot_price}}</text></view>
+			</view>
+			<view class="top-right">
+				<view class="right-top">距离本场结束还剩</view>
+				<uni-countdown
+					class="timeBox"
+					color="#901b21"
+					background-color="#fff"
+					splitor-color="#fff"
+					:show-day="false"
+					:hour="stopTimes.hours"
+					:minute="stopTimes.minutes"
+					:second="stopTimes.seconds"
+				></uni-countdown>
+			</view>
+		</view>
+		<!-- 标题 -->
+		<!-- <product-content :goodsObjact="goodsObjact" ></product-content> -->
+		<view class="good-title clamp2"  v-if="isSckill">{{goodsObjact.store_name}}</view>
+		<!-- 选择数量 -->
+<!-- 		<view class="row b-b">
+			<text class="tit">选择</text>
+			<picker mode="selector" :range="choNum" @change="bindChange">
+				<view class="refund" v-if="goodsNumber !== 1">{{ goodsNumber || '请选择' }}</view>
+				<view class="noRefund" v-else>请选择购买数量</view>
+			</picker>
+		</view> -->
+		<!-- 拼货时间及优惠 -->
+		<!-- <discounts @clickCoupon="Getcoupon" :Info="goodsObjact.store_info" :showCoupon="true"></discounts> -->
+		<!-- 猜你喜欢 -->
+		<!-- <guess-like @Addcar='Addcar' @clickNavTo='navToDetailPage' :goodList = 'good_list||[]'></guess-like> -->
+		<!-- 店铺信息 -->
+		<view class="shop-info">
+			<view class="shop-logo"><image src="../../static/error/missing-face.png" mode=""></image></view>
+			<view class="shop-base">
+				<view class="base-name">子臣台州旗舰店</view>
+				<view class="base-addr clamp">浙江省台州市椒江区市府大道520号</view>
+			</view>
+			<view class="shop-dis"><image src="../../static/icon/base_addr.png" mode="aspectFill"></image>距离200m</view>
+		</view>
+		<!-- 评价 -->
+		<estimate @navTo="navTo('/pages/product/reply?id=' + product_id)" 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" :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">
+						<text class="name">{{ goodsObjact.store_name }}</text>
+						<text class="price">¥{{ actionPrice * goodsNumber }}</text>
+						<text class="stock">库存:{{ goodsStore }}件</text>
+						<view class="selected" v-if="specList != ''">
+							已选:
+							<text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem }}</text>
+						</view>
+					</view>
+				</view>
+				<view v-for="(item, index) in specList" :key="index" class="attr-list">
+					<text>{{ item.attr_name }}</text>
+					<view class="item-list">
+						<text
+							v-for="(childItem, childIndex) in item.attr_value"
+							:key="childIndex"
+							class="tit"
+							:class="{ selected: childItem.check }"
+							@click="selectSpec(childItem, item, index)"
+						>
+							{{ childItem.attr }}
+						</text>
+					</view>
+				</view>
+				<view class="attr-list">
+					<text>购买数量</text>
+					<view class="item-list">
+						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
+					</view>
+				</view>
+				<button class="btn" @click.stop="buy" v-show="buys_show">完成</button>
+				<button class="btn" style="background-color: #999999;" v-show="buys_shows">售罄</button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { goodsDetail, cartAdd, seckillGoods } 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 uniNumberBox from '@/components/uni-number-box.vue';
+import {timeComputed} from '@/utils/rocessor.js'
+export default {
+	components: {
+		guessLike,
+		topSwiper,
+		productContent,
+		discounts,
+		freshDetail,
+		contentText,
+		productBottom,
+		estimate,
+		uniNumberBox
+	},
+	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: '',
+			isSckill: false,
+			stopTimes: {
+				hours: 0,
+				minutes: 0,
+				seconds: 0,
+				day: 0,
+				tpye: false
+				
+			},
+			product_id: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(options)
+		
+		let obj = this;
+		obj.userInfo = uni.getStorageSync('userInfo');
+		//保存商品id
+		this.goodsid = options.id;
+		this.product_id = options.id
+		this.goodsType = options.type;
+		// 判断有无人邀请
+		if (options.spread) {
+			// 存储邀请人
+			uni.setStorageSync('spread', options.spread);
+		}
+		saveUrl();
+		
+		
+		if(options.type === '1') {
+			obj.getGoodInfo()
+			// obj.getTime()
+			this.product_id = options.product_id
+			console.log('this.product_id',this.product_id)
+			obj.isSckill = true
+		}else {
+			this.goodsDetail();
+		}
+		if(options.type === '1'){
+			obj.isSckill = true
+		}
+		// 注册邀请信息
+		// #ifdef H5
+		let bool = uni.getStorageSync('weichatBrowser') || '';
+		if (bool) {
+			weixindata();
+		}
+		// #endif
+		
+	},
+	computed: {
+		...mapState(['weichatObj', 'baseURL', 'urlFile']),
+		choNum() {
+			let a = []
+			for(let i = 1 ; i <= this.goodsNumberMax ; i++ ){
+				a.push(i)
+			}
+			return a
+		}
+	},
+	// 分享
+	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;
+	},
+	methods: {
+		//选择规格
+		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'
+			});
+		},
+		//详情页
+		navToDetailPage(item) {
+			let id = item.id;
+			uni.navigateTo({
+				url: '/pages/product/product?id=' + id
+			});
+		},
+		// 跳转页面
+		navTo(url) {
+			uni.navigateTo({
+				url
+			});
+		},
+		//加入购物车
+		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;
+				console.log(data)
+				obj.good_list = data.good_list; //保存猜你喜欢列表
+				obj.reply = data.reply; //保存评论列表
+				let goods = data.storeInfo;
+				obj.goodsObjact = goods;
+				console.log(obj.goodsObjact)
+				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
+			});
+		},
+		getGoodInfo() {
+			let obj = this;
+			// 获取秒杀商品信息
+			seckillGoods({}, this.goodsid).then(function({ data }) {
+				console.log(data)
+				obj.list = data;
+				obj.good_list = data.good_list; //保存猜你喜欢列表
+				obj.reply = data.reply; //保存评论列表
+				let goods = data.storeInfo;
+				obj.goodsObjact = goods;
+				obj.goodsObjact.title = goods.title
+				obj.stopTimes = timeComputed(obj.list.isSeckillEnd.stop*1000)
+				console.log(obj.stopTimes,'dddddddddd')
+				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].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
+				
+			});
+		},
+		// 立即购买
+		buy() {
+			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() {},
+		bindChange(e) {
+			this.goodsNumber = this.choNum[e.detail.value]*1;
+			console.log(this.goodsNumber)
+		},
+		numberChange(e) {
+			//购买数量
+			this.chooseGoodsNumber = e.number;
+		},
+		// getTime() {
+		// 	let start = new data()
+		// }
+	}
+};
+</script>
+
+<style lang="scss">
+/*  弹出层 */
+.popup {
+	position: fixed;
+	left: 0;
+	top: 0;
+	right: 0;
+	bottom: 0;
+	z-index: 99;
+	&.show {
+		display: block;
+
+		.mask {
+			animation: showPopup 0.2s linear both;
+		}
+
+		.layer {
+			animation: showLayer 0.2s linear both;
+		}
+	}
+
+	&.hide {
+		.mask {
+			animation: hidePopup 0.2s linear both;
+		}
+
+		.layer {
+			animation: hideLayer 0.2s linear both;
+		}
+	}
+
+	&.none {
+		display: none;
+	}
+
+	.mask {
+		position: fixed;
+		top: 0;
+		width: 100%;
+		height: 100%;
+		z-index: 1;
+		background-color: rgba(0, 0, 0, 0.4);
+	}
+
+	.layer {
+		position: fixed;
+		z-index: 99;
+		bottom: 0;
+		width: 100%;
+		min-height: 35vh;
+		border-radius: 10rpx 10rpx 0 0;
+		background-color: #fff;
+
+		.btn {
+			height: 66rpx;
+			line-height: 66rpx;
+			border-radius: 100rpx;
+			background: #901b21;
+			font-size: $font-base + 2rpx;
+			color: #fff;
+			margin: 30rpx auto 20rpx;
+		}
+	}
+
+	@keyframes showPopup {
+		0% {
+			opacity: 0;
+		}
+
+		100% {
+			opacity: 1;
+		}
+	}
+
+	@keyframes hidePopup {
+		0% {
+			opacity: 1;
+		}
+
+		100% {
+			opacity: 0;
+		}
+	}
+
+	@keyframes showLayer {
+		0% {
+			transform: translateY(120%);
+		}
+
+		100% {
+			transform: translateY(0%);
+		}
+	}
+
+	@keyframes hideLayer {
+		0% {
+			transform: translateY(0);
+		}
+
+		100% {
+			transform: translateY(120%);
+		}
+	}
+}
+/* 规格选择弹窗 */
+.attr-content {
+	padding: 25rpx 30rpx;
+
+	.a-t {
+		display: flex;
+
+		image {
+			width: 170rpx;
+			height: 170rpx;
+			flex-shrink: 0;
+			border-radius: 8rpx;
+		}
+
+		.right {
+			display: flex;
+			flex-direction: column;
+			padding-left: 24rpx;
+			font-size: $font-sm + 2rpx;
+			color: $font-color-base;
+			line-height: 42rpx;
+			width: 75%;
+
+			.price {
+				font-size: $font-lg;
+				color: #901b21;
+				margin: 10rpx 0rpx;
+			}
+
+			.name {
+				font-size: 32rpx;
+				color: $font-color-dark;
+				height: 50rpx;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				white-space: nowrap;
+				display: block;
+			}
+
+			.selected-text {
+				margin-right: 10rpx;
+			}
+		}
+	}
+
+	.attr-list {
+		display: flex;
+		flex-direction: column;
+		font-size: $font-base + 2rpx;
+		color: $font-color-base;
+		padding-top: 30rpx;
+		padding-left: 10rpx;
+	}
+
+	.item-list {
+		padding: 20rpx 0 0;
+		display: flex;
+		flex-wrap: wrap;
+
+		text {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			background: #eee;
+			margin-right: 20rpx;
+			margin-bottom: 20rpx;
+			border-radius: 100rpx;
+			min-width: 60rpx;
+			height: 60rpx;
+			padding: 0 20rpx;
+			font-size: $font-base;
+			color: $font-color-dark;
+		}
+
+		.selected {
+			background: #ddffdf;
+			color: $uni-color-primary;
+		}
+	}
+}
+
+//默认商品底部高度
+.goodsBottom {
+	height: 160rpx;
+}
+page {
+	background: #f0f0f0;
+}
+//秒杀、拼团底部高度
+.contentBottomHeight {
+	height: 130rpx;
+}
+//默认商品底部高度
+.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;
+}
+.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;
+	}
+	.noRefund {
+		font-size: 30rpx;
+		color: $font-color-light;
+		padding-left: 128rpx;
+	}
+	.tit {
+		flex-shrink: 0;
+		width: 120rpx;
+		font-size: 30rpx;
+		color: $font-color-dark;
+	}
+	.input {
+		flex: 1;
+		font-size: 30rpx;
+		color: $font-color-dark;
+		padding-left: 128rpx;
+		&.payColor {
+			color: $color-red;
+		}
+	}
+	.iconlocation {
+		font-size: 36rpx;
+		color: $font-color-light;
+	}
+}
+.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;
+		}
+	}
+	.shop-base {
+		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;
+		}
+	}
+	
+}
+.sckill-top {
+	width: 750rpx;
+	height: 165rpx;
+	background-image: url(../../static/img/base-sckill.png);
+	background-size: 100% 100%;
+	position: relative;
+	top: -40rpx;
+	margin-bottom: -40rpx;
+	display: flex;
+	justify-content: space-between;
+	.top-left {
+		line-height: 1;
+		.left-top {
+			padding: 35rpx 0 23rpx 22rpx;
+			font-size: 44rpx;
+			font-weight: 500;
+			color: #FFFFFF;
+			line-height: 1;
+		}
+		.left-btm {
+			line-height: 1;
+			font-size: 30rpx;
+			font-weight: 500;
+			// text-decoration: line-through;
+			color: #FFFFFF;
+			.now-pri {
+				display: inline-block;
+				padding-right: 8rpx;
+				font-size: 44rpx;
+				font-weight: 800;
+				color: #FFFFFF;
+			}
+			.old-pri {
+				text-decoration: line-through;
+			}
+		}
+	}
+	.top-right {
+		padding:67rpx 20rpx 18rpx 0;
+		.right-top {
+			font-size: 22rpx;
+			font-weight: 400;
+			color: #FFFFFF;
+			line-height: 1;
+			padding-bottom: 8rpx;
+		}
+	}
+}
+.good-title {
+	background-color: #fff;
+	// height: 142rpx;
+	padding: 24rpx 19rpx 24rpx 34rpx;
+	line-height: 1.5;
+	font-size: 36rpx;
+	font-weight: 800;
+	color: #333333;
+}
+</style>

+ 15 - 9
pages/product/seckill.vue

@@ -58,10 +58,10 @@
 							</view>
 						</view>
 					</view> -->
-					<view class="spgood">
-						<view class="left-wrapper"><image src="../../static/img/spimg1.jpg" mode="scaleToFill"></image></view>
+					<view class="spgood" :key="ind" v-for="(lss, ind) in ls.dataList">
+						<view class="left-wrapper"><image :src="lss.image" mode="scaleToFill"></image></view>
 						<view class="right-wrapper">
-							<view class="right-title">湿热肝上火气肺痰煲汤材料</view>
+							<view class="right-title clamp">{{ lss.title }}</view>
 							<view class="ex-addr">
 								<image src="../../static/img/shop.png" mode="" class="name-img"></image>
 								子臣台州旗舰店
@@ -71,10 +71,10 @@
 							<!-- <view class="pepple-num"><image src="../../static/icon/hot.png" mode="scaleToFill"></image>2人团</view> -->
 							<view class="right-bottom">
 								<view class="sp-price">
-									<view class="now-price">¥77</view>
+									<view class="now-price">¥{{ lss.price }}</view>
 									<!-- <view class="old-price">¥99</view> -->
 								</view>
-								<view class="sp-btn">马上拼</view>
+								<view class="sp-btn" @click="navProduct(ls, ind)" :class="{ 'seckill-action': ls.status == 1 }">{{ ls.status == 1 ? '马上拼' : ls.status == 2 ? '未开始' : '已结束' }}</view>
 							</view>
 						</view>
 					</view>
@@ -153,9 +153,9 @@ export default {
 		navProduct(ls, ind) {
 			if (ls.status == 1) {
 				let data = ls.dataList[ind];
-
+				console.log(data,'66666666')
 				uni.navigateTo({
-					url: '/pages/product/product?id=' + data.id + '&type=1'
+					url: '/pages/product/product?id=' + data.id + '&type=1&product_id=' + data.product_id
 				});
 			}
 		},
@@ -453,7 +453,7 @@ $slider-color: #fe9398; //滑块左侧颜色
 			// background-color: red;
 			.right-title {
 				padding-top: 12rpx;
-				width: 100%;
+				width: 358rpx;
 				// height: 29rpx;
 				// font-size: 30rpx;
 				// font-weight: bold;
@@ -557,8 +557,14 @@ $slider-color: #fe9398; //滑块左侧颜色
 					line-height: 60rpx;
 					font-weight: 400;
 					color: #ffffff;
-					background-color: #dcb876;
+					// background-color: #dcb876;
+					background-color: #999999;
+					&.seckill-action {
+						background-color: #dcb876;
+						// background-color: #999999;
+					}
 				}
+				
 			}
 		}
 	}

+ 386 - 386
pages/public/login.vue

@@ -1,386 +1,386 @@
-<template>
-	<view class="container">
-		<view class="container_text">
-			<image class="banner-img" src="/static/img/img01.png" mode="scaleToFill"></image>
-		</view>
-		<view class="loginTitle"><text>登录</text></view>
-		<view class="login_text">
-			<view class="login_input flex">
-				<view class="login_img"><image src="/static/icon/img03.png"></image></view>
-				<view class="login_name"><input class="uni-input" v-model="username" focus placeholder="请输入手机号" /></view>
-			</view>
-			<view class="login_input flex">
-				<view class="login_img"><image src="/static/icon/img04.png"></image></view>
-				<view class="login_name"><input class="uni-input" type="password" v-model="passward" focus placeholder="请输入密码" /></view>
-			</view>
-			<view><button type="green" class="uni-button uni-button-green" @click="toLogin">登录</button></view>
-			<view><button type="green" class="uni-button uni-button-green uni-button-green-plain" plain="true" hover-class="none" @click="register">注册</button></view>
-			<navigator url="./forget"><view class="forget">忘记密码</view></navigator>
-			<view class="flex other">
-				<view class="fenge"></view>
-				<view class="qita">其他方式登录</view>
-				<view class="fenge"></view>
-			</view>
-			<!-- #ifndef APP-PLUS -->
-					<view class="weixin" @click="wecahtLogin"><image src="/static/img/img05.png"></image></view>
-					<view class="weixin_text" @click="wecahtLogin">微信登录</view>
-					<!-- #endif -->
-					<!-- #ifdef APP-PLUS -->
-					<block v-if="!is_ios">
-						<view class="weixin" @click="wecahtLogin"><image src="/static/img/img05.png" mode="scaleToFill"></image></view>
-						<view class="weixin_text" @click="wecahtLogin">微信登录</view>
-					</block>
-					<block v-else>
-						<view class="ios_login flex" @click="wecahtLogin('weixin')">
-							<text class="iconfont iconweixin"></text>
-							<text class="weixin_text">微信登录</text>
-						</view>
-						<view v-if='is_apple_login' class="ios_login flex" @click="wecahtLogin('apple')">
-							<image class="loginIcon" src="/static/icon/appleIcon.png" mode=" scaleToFill"></image>
-							<text class="weixin_text">通过Apple登录</text>
-						</view>
-					</block>
-					<!-- #endif -->
-				</view>
-			</view>
-</template>
-
-<script>
-import { mapMutations } from 'vuex';
-import { login} from '@/api/login.js';
-import { getUserInfo} from '@/api/user.js';
-// #ifdef APP-PLUS
-// applelogin接口需要开发编写,基础项目中可能没有
-import { applelogin } from '@/api/set.js';
-// loginWx接口需要开发编写,基础项目中可能没有
-import { loginWx } from '@/api/login.js';
-// #endif
-// #ifdef H5
-import { loginWinxin } from '@/utils/wxAuthorized';
-// #endif
-export default {
-	data() {
-		return {
-			username: '',
-			passward: '',
-			// #ifdef APP-PLUS
-			is_ios: false ,//判断是否为ios手机
-			is_apple_login:false,//是否有ios授权登录功能
-			// #endif
-		};
-	},
-	onLoad() {
-		let obj = this;
-		// #ifdef APP-PLUS
-		let system = uni.getStorageSync('platform');
-		// 判断是否为ios
-		if (system == 'ios') {
-			obj.is_ios = true;
-		}
-		uni.getSystemInfo({
-			success(e) {
-				if(+e.system.split('.')[0]>=13){
-					obj.is_apple_login=true;
-				}
-			}
-		})
-		// #endif
-	},
-	methods: {
-		...mapMutations('user', ['setUserInfo', 'login']),
-		// 微信登录
-		wecahtLogin(type) {
-			let obj = this;
-			// #ifdef H5
-			let weichatBrowser = uni.getStorageSync('weichatBrowser');
-			if (weichatBrowser) {
-				loginWinxin();
-			}
-			// #endif
-			// #ifdef APP-PLUS
-			uni.login({
-				provider: type,
-				success(e) {
-					uni.getUserInfo({
-						provider: type,
-						success(es) {
-							if(type==='weixin'){
-								loginWx(es.userInfo)
-									.then(e => {
-										uni.setStorageSync('token', e.data.token);
-										getUserInfo({}).then(e => {
-											obj.login();
-											// 保存返回用户数据
-											obj.setUserInfo(e.data);
-											//成功跳转首页
-											uni.switchTab({
-												url: '/pages/index/index'
-											});
-										});
-									})
-									.catch(e => {
-										console.log(e);
-										uni.showModal({
-											content: JSON.stringify(e),
-											success() {},
-											fail() {}
-										});
-									});
-							}
-							if(type==='apple'){
-								console.log(es.userInfo);
-								applelogin({
-									account: es.userInfo.openId,
-								})
-									.then(function(e) {
-										console.log(e,'token')
-										uni.setStorageSync('token', e.data.token);
-										getUserInfo({}).then(e => {
-											obj.login();
-											// 保存返回用户数据
-											obj.setUserInfo(e.data);
-											//成功跳转首页
-											uni.switchTab({
-												url: '/pages/index/index'
-											});
-										});
-										
-									})
-									.catch(function(e) {
-										console.log(e);
-									});
-							}
-							
-						},
-						fail(es) {
-							uni.showModal({
-								content: JSON.stringify(es),
-								success() {
-									// obj.login();
-									// // 保存返回用户数据
-									// obj.setUserInfo(e.data);
-									// //成功跳转首页
-									// uni.switchTab({
-									// 	url: '/pages/index/index'
-									// });
-								}
-							});
-						}
-					});
-				},
-				fail(e) {
-					uni.showModal({
-						title: '提示',
-						content: JSON.stringify(e),
-						showCancel: false
-					});
-				}
-			});
-			// #endif
-		},
-		//登录
-		async toLogin() {
-			let obj = this;
-			obj.logining = true;
-			if (obj.username == '') {
-				obj.$api.msg('请输入手机号');
-				return;
-			}
-			if (obj.passward == '') {
-				obj.$api.msg('请输入密码');
-				return;
-			}
-			login({
-				account: obj.username,
-				password: obj.passward
-			})
-				.then(function(e) {
-					uni.setStorageSync('token', e.data.token);
-					obj.$store.commit('hasLogin', true);
-					getUserInfo({}).then(e => {
-						obj.login();
-						// 保存返回用户数据
-						obj.setUserInfo(e.data);
-						let ur = uni.getStorageSync('present')|| '/pages/index/index';
-						//成功跳转首页
-						uni.switchTab({
-							url: ur,
-							fail(e) {
-								uni.navigateTo({
-									url: ur,
-									fail(e) {
-										uni.navigateTo({
-											url: '/pages/index/index',
-										});
-									}
-								});
-							}
-						});
-					});
-				})
-				.catch(function(e) {
-					console.log(e);
-				});
-		},
-		//跳转注册页
-		register() {
-			uni.navigateTo({
-				url: `/pages/public/register`
-			});
-		},
-		// 后退
-		navBack() {
-			uni.navigateBack();
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-	/* #ifdef APP-PLUS */
-	
-	.ios_login {
-		width: 260rpx;
-		border-radius: 12rpx;
-		justify-content: center;
-		border: 1px solid #212121;
-		margin: 24rpx auto;
-		padding: 10rpx;
-		background-color: #212121;
-		color: #ffffff;
-		.loginIcon {
-			width: 50rpx;
-			height: 50rpx;
-		}
-		.weixin_text {
-			line-height: 1;
-			margin-left: 20rpx;
-			color: #ffffff !important;
-		}
-	}
-	
-	/* #endif */
-	.ios_login {
-		width: 350rpx;
-		border-radius: 12rpx;
-		justify-content: center;
-		border: 1px solid #212121;
-		margin: 24rpx auto;
-		padding: 15rpx;
-		background-color: #212121;
-		color: #ffffff;
-		font-size: 32rpx;
-		.loginIcon {
-			font-size: 35rpx;
-			width: 35rpx;
-			height: 35rpx;
-		}
-		.weixin_text {
-			line-height: 1;
-			margin-left: 20rpx;
-			color: #ffffff !important;
-		}
-	}
-	
-page {
-	height: 100%;
-}
-.container {
-	width: 100%;
-	height: 100%;
-	background-size: 100%;
-}
-.container_text {
-	width: 100%;
-	height: 500rpx;
-	top: 0rpx;
-	.banner-img {
-		width: 100%;
-		height: 100%;
-	}
-}
-.login_text {
-	margin: auto 30rpx;
-	position: relative;
-	padding: 100rpx 102rpx;
-	background-color: #ffffff;
-	margin-top: -180rpx;
-	border-radius: 20rpx;
-	.login_input {
-		border-bottom: 1px solid #f0f0f0;
-		margin-bottom: 65rpx;
-		.login_img image {
-			height: 35rpx;
-			width: 29rpx;
-			margin-right: 20rpx;
-		}
-		.uni-input {
-			text-align: left;
-			width: 470rpx;
-			font-size: 28rpx !important;
-		}
-		.login_name {
-			color: #333333;
-		}
-	}
-
-	.other {
-		margin-top: 60rpx;
-		.fenge {
-			width: 30%;
-			height: 2rpx;
-			background-color: #eeeeee;
-		}
-		.qita {
-			font-size: 28rpx;
-			color: #999999;
-		}
-	}
-	.weixin {
-		width: 75rpx;
-		height: 75rpx;
-		margin: 25rpx auto;
-	}
-	.weixin image {
-		width: 100%;
-		height: 100%;
-	}
-	.weixin_text {
-		text-align: center;
-		font-size: 28rpx;
-		color: #999999;
-	}
-	.forget {
-		font-size: 28rpx;
-		width: 100%;
-		text-align: right;
-		color: #999999;
-	}
-
-	.uni-button-green {
-		color: #ffffff;
-		background-color: #5dbc7c;
-		margin: 40rpx 10rpx;
-		border-radius: 50rpx;
-	}
-	.uni-button-green-plain {
-		border: 1px solid #5dbc7c;
-		margin: 40rpx 10rpx;
-		border-radius: 50rpx;
-		color: #5dbc7c;
-		background-color: #ffffff;
-	}
-	.uni-button {
-		height: 85rpx;
-		line-height: 85rpx;
-	}
-}
-.loginTitle {
-	position: absolute;
-	top: 250rpx;
-	width: 100%;
-	text-align: center;
-	color: white;
-	font-size: 40rpx;
-}
-</style>
+<template>
+	<view class="container">
+		<view class="container_text">
+			<image class="banner-img" src="/static/img/img01.png" mode="scaleToFill"></image>
+		</view>
+		<view class="loginTitle"><text>登录</text></view>
+		<view class="login_text">
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img03.png"></image></view>
+				<view class="login_name"><input class="uni-input" v-model="username" focus placeholder="请输入手机号" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img04.png"></image></view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="passward" focus placeholder="请输入密码" /></view>
+			</view>
+			<view><button type="green" class="uni-button uni-button-green" @click="toLogin">登录</button></view>
+			<view><button type="green" class="uni-button uni-button-green uni-button-green-plain" plain="true" hover-class="none" @click="register">注册</button></view>
+			<navigator url="./forget"><view class="forget">忘记密码</view></navigator>
+			<view class="flex other">
+				<view class="fenge"></view>
+				<view class="qita">其他方式登录</view>
+				<view class="fenge"></view>
+			</view>
+			<!-- #ifndef APP-PLUS -->
+					<view class="weixin" @click="wecahtLogin"><image src="/static/img/img05.png"></image></view>
+					<view class="weixin_text" @click="wecahtLogin">微信登录</view>
+					<!-- #endif -->
+					<!-- #ifdef APP-PLUS -->
+					<block v-if="!is_ios">
+						<view class="weixin" @click="wecahtLogin"><image src="/static/img/img05.png" mode="scaleToFill"></image></view>
+						<view class="weixin_text" @click="wecahtLogin">微信登录</view>
+					</block>
+					<block v-else>
+						<view class="ios_login flex" @click="wecahtLogin('weixin')">
+							<text class="iconfont iconweixin"></text>
+							<text class="weixin_text">微信登录</text>
+						</view>
+						<view v-if='is_apple_login' class="ios_login flex" @click="wecahtLogin('apple')">
+							<image class="loginIcon" src="/static/icon/appleIcon.png" mode=" scaleToFill"></image>
+							<text class="weixin_text">通过Apple登录</text>
+						</view>
+					</block>
+					<!-- #endif -->
+				</view>
+			</view>
+</template>
+
+<script>
+import { mapMutations } from 'vuex';
+import { login} from '@/api/login.js';
+import { getUserInfo} from '@/api/user.js';
+// #ifdef APP-PLUS
+// applelogin接口需要开发编写,基础项目中可能没有
+import { applelogin } from '@/api/set.js';
+// loginWx接口需要开发编写,基础项目中可能没有
+import { loginWx } from '@/api/login.js';
+// #endif
+// #ifdef H5
+import { loginWinxin } from '@/utils/wxAuthorized';
+// #endif
+export default {
+	data() {
+		return {
+			username: '18167036832',
+			passward: '123456789',
+			// #ifdef APP-PLUS
+			is_ios: false ,//判断是否为ios手机
+			is_apple_login:false,//是否有ios授权登录功能
+			// #endif
+		};
+	},
+	onLoad() {
+		let obj = this;
+		// #ifdef APP-PLUS
+		let system = uni.getStorageSync('platform');
+		// 判断是否为ios
+		if (system == 'ios') {
+			obj.is_ios = true;
+		}
+		uni.getSystemInfo({
+			success(e) {
+				if(+e.system.split('.')[0]>=13){
+					obj.is_apple_login=true;
+				}
+			}
+		})
+		// #endif
+	},
+	methods: {
+		...mapMutations('user', ['setUserInfo', 'login']),
+		// 微信登录
+		wecahtLogin(type) {
+			let obj = this;
+			// #ifdef H5
+			let weichatBrowser = uni.getStorageSync('weichatBrowser');
+			if (weichatBrowser) {
+				loginWinxin();
+			}
+			// #endif
+			// #ifdef APP-PLUS
+			uni.login({
+				provider: type,
+				success(e) {
+					uni.getUserInfo({
+						provider: type,
+						success(es) {
+							if(type==='weixin'){
+								loginWx(es.userInfo)
+									.then(e => {
+										uni.setStorageSync('token', e.data.token);
+										getUserInfo({}).then(e => {
+											obj.login();
+											// 保存返回用户数据
+											obj.setUserInfo(e.data);
+											//成功跳转首页
+											uni.switchTab({
+												url: '/pages/index/index'
+											});
+										});
+									})
+									.catch(e => {
+										console.log(e);
+										uni.showModal({
+											content: JSON.stringify(e),
+											success() {},
+											fail() {}
+										});
+									});
+							}
+							if(type==='apple'){
+								console.log(es.userInfo);
+								applelogin({
+									account: es.userInfo.openId,
+								})
+									.then(function(e) {
+										console.log(e,'token')
+										uni.setStorageSync('token', e.data.token);
+										getUserInfo({}).then(e => {
+											obj.login();
+											// 保存返回用户数据
+											obj.setUserInfo(e.data);
+											//成功跳转首页
+											uni.switchTab({
+												url: '/pages/index/index'
+											});
+										});
+										
+									})
+									.catch(function(e) {
+										console.log(e);
+									});
+							}
+							
+						},
+						fail(es) {
+							uni.showModal({
+								content: JSON.stringify(es),
+								success() {
+									// obj.login();
+									// // 保存返回用户数据
+									// obj.setUserInfo(e.data);
+									// //成功跳转首页
+									// uni.switchTab({
+									// 	url: '/pages/index/index'
+									// });
+								}
+							});
+						}
+					});
+				},
+				fail(e) {
+					uni.showModal({
+						title: '提示',
+						content: JSON.stringify(e),
+						showCancel: false
+					});
+				}
+			});
+			// #endif
+		},
+		//登录
+		async toLogin() {
+			let obj = this;
+			obj.logining = true;
+			if (obj.username == '') {
+				obj.$api.msg('请输入手机号');
+				return;
+			}
+			if (obj.passward == '') {
+				obj.$api.msg('请输入密码');
+				return;
+			}
+			login({
+				account: obj.username,
+				password: obj.passward
+			})
+				.then(function(e) {
+					uni.setStorageSync('token', e.data.token);
+					obj.$store.commit('hasLogin', true);
+					getUserInfo({}).then(e => {
+						obj.login();
+						// 保存返回用户数据
+						obj.setUserInfo(e.data);
+						let ur = uni.getStorageSync('present')|| '/pages/index/index';
+						//成功跳转首页
+						uni.switchTab({
+							url: ur,
+							fail(e) {
+								uni.navigateTo({
+									url: ur,
+									fail(e) {
+										uni.navigateTo({
+											url: '/pages/index/index',
+										});
+									}
+								});
+							}
+						});
+					});
+				})
+				.catch(function(e) {
+					console.log(e);
+				});
+		},
+		//跳转注册页
+		register() {
+			uni.navigateTo({
+				url: `/pages/public/register`
+			});
+		},
+		// 后退
+		navBack() {
+			uni.navigateBack();
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+	/* #ifdef APP-PLUS */
+	
+	.ios_login {
+		width: 260rpx;
+		border-radius: 12rpx;
+		justify-content: center;
+		border: 1px solid #212121;
+		margin: 24rpx auto;
+		padding: 10rpx;
+		background-color: #212121;
+		color: #ffffff;
+		.loginIcon {
+			width: 50rpx;
+			height: 50rpx;
+		}
+		.weixin_text {
+			line-height: 1;
+			margin-left: 20rpx;
+			color: #ffffff !important;
+		}
+	}
+	
+	/* #endif */
+	.ios_login {
+		width: 350rpx;
+		border-radius: 12rpx;
+		justify-content: center;
+		border: 1px solid #212121;
+		margin: 24rpx auto;
+		padding: 15rpx;
+		background-color: #212121;
+		color: #ffffff;
+		font-size: 32rpx;
+		.loginIcon {
+			font-size: 35rpx;
+			width: 35rpx;
+			height: 35rpx;
+		}
+		.weixin_text {
+			line-height: 1;
+			margin-left: 20rpx;
+			color: #ffffff !important;
+		}
+	}
+	
+page {
+	height: 100%;
+}
+.container {
+	width: 100%;
+	height: 100%;
+	background-size: 100%;
+}
+.container_text {
+	width: 100%;
+	height: 500rpx;
+	top: 0rpx;
+	.banner-img {
+		width: 100%;
+		height: 100%;
+	}
+}
+.login_text {
+	margin: auto 30rpx;
+	position: relative;
+	padding: 100rpx 102rpx;
+	background-color: #ffffff;
+	margin-top: -180rpx;
+	border-radius: 20rpx;
+	.login_input {
+		border-bottom: 1px solid #f0f0f0;
+		margin-bottom: 65rpx;
+		.login_img image {
+			height: 35rpx;
+			width: 29rpx;
+			margin-right: 20rpx;
+		}
+		.uni-input {
+			text-align: left;
+			width: 470rpx;
+			font-size: 28rpx !important;
+		}
+		.login_name {
+			color: #333333;
+		}
+	}
+
+	.other {
+		margin-top: 60rpx;
+		.fenge {
+			width: 30%;
+			height: 2rpx;
+			background-color: #eeeeee;
+		}
+		.qita {
+			font-size: 28rpx;
+			color: #999999;
+		}
+	}
+	.weixin {
+		width: 75rpx;
+		height: 75rpx;
+		margin: 25rpx auto;
+	}
+	.weixin image {
+		width: 100%;
+		height: 100%;
+	}
+	.weixin_text {
+		text-align: center;
+		font-size: 28rpx;
+		color: #999999;
+	}
+	.forget {
+		font-size: 28rpx;
+		width: 100%;
+		text-align: right;
+		color: #999999;
+	}
+
+	.uni-button-green {
+		color: #ffffff;
+		background-color: #5dbc7c;
+		margin: 40rpx 10rpx;
+		border-radius: 50rpx;
+	}
+	.uni-button-green-plain {
+		border: 1px solid #5dbc7c;
+		margin: 40rpx 10rpx;
+		border-radius: 50rpx;
+		color: #5dbc7c;
+		background-color: #ffffff;
+	}
+	.uni-button {
+		height: 85rpx;
+		line-height: 85rpx;
+	}
+}
+.loginTitle {
+	position: absolute;
+	top: 250rpx;
+	width: 100%;
+	text-align: center;
+	color: white;
+	font-size: 40rpx;
+}
+</style>

+ 4 - 4
pages/user/user.vue

@@ -107,7 +107,7 @@
 						<text class="iconfont iconenter" ></text>
 					</view>
 					<view class="order-section">
-						<view class="order-item" @click="navTo('/pages/order/order?state=0')" hover-class="common-hover" :hover-stay-time="50">
+						<view class="order-item" @click="navTo('/pages/order/order?state=0&isUser='+isUser)" hover-class="common-hover" :hover-stay-time="50">
 							<view class=" icon position-relative">
 								<image class="icon-img" src="/static/icon/i1.png" mode="aspectFit"></image>
 								<view class="corner" v-if="orderInfo.unpaid_count > 0">
@@ -116,7 +116,7 @@
 							</view>
 							<text>待付款</text>
 						</view>
-						<view class="order-item" @click="navTo('/pages/order/order?state=1')" hover-class="common-hover" :hover-stay-time="50">
+						<view class="order-item" @click="navTo('/pages/order/order?state=1&isUser='+isUser)" hover-class="common-hover" :hover-stay-time="50">
 							<view class=" icon position-relative">
 								<image class="icon-img" src="/static/icon/i2.png" mode="aspectFit"></image>
 								<view class="corner" v-if="orderInfo.unshipped_count > 0">
@@ -125,7 +125,7 @@
 							</view>
 							<text>待发货</text>
 						</view>
-						<view class="order-item" @click="navTo('/pages/order/order?state=2')" hover-class="common-hover" :hover-stay-time="50">
+						<view class="order-item" @click="navTo('/pages/order/order?state=3&isUser='+isUser)" hover-class="common-hover" :hover-stay-time="50">
 							<view class="icon position-relative">
 								<image class="icon-img" src="/static/icon/i3.png" mode="aspectFit"></image>
 								<view class="corner" v-if="orderInfo.received_count > 0">
@@ -134,7 +134,7 @@
 							</view>
 							<text>待收货</text>
 						</view>
-						<view class="order-item" @click="navTo('/pages/order/order?state=3')" hover-class="common-hover" :hover-stay-time="50">
+						<view class="order-item" @click="navTo('/pages/order/order?state=4&isUser='+isUser)" hover-class="common-hover" :hover-stay-time="50">
 							<view class="icon position-relative">
 								<image class="icon-img" src="/static/icon/i4.png" mode="aspectFit"></image>
 								<!-- <view class="corner" v-if="orderInfo.complete_count > 0">

BIN
static/icon/base_addr.png


BIN
static/img/base-sckill.png


+ 124 - 120
utils/rocessor.js

@@ -1,120 +1,124 @@
-//身份证验证	
-export function isCardNo(card) {
-	// 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X 
-	var reg =
-		/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/;
-	if (reg.test(card) === false) {
-		console.log(card);
-		return false;
-
-	}
-	return true
-}
-
-// 金额显示变化
-export function getMoneyStyle(value = 0) {
-	if (typeof value == 'string') {
-		value = (+value).toFixed(2)
-	}
-	if (typeof value == 'number') {
-		value = value.toFixed(2)
-	}
-	// 将字符串转为数组
-	let n = value.split("");
-	// 反转数组并复制循环处理
-	let arr = n.reverse().map(function(e, ind, ar) {
-		// 判断当前下标是否为3的整数倍数且不为最后一个下标
-		if (ind % 3 == 0 && ind / 3 > 1 && ind != ar.length) {
-			return e + ','
-		} else {
-			return e
-		}
-	})
-	// 反转数组回复原来排序并合并回字符串
-	arr = arr.reverse().join('')
-	return arr;
-}
-
-// 倒计时计算
-// 计算倒计时时间
-export function timeComputed(time) {
-	// 获取当前时间
-	const actTime = (new Date()).getTime();
-	// 获取到期时间
-	let stopTime = time - actTime;
-	// 判断是否小于0
-	if (stopTime < 0) {
-		stopTime = stopTime * -1
-	}
-	let day = Math.floor(stopTime / 1000 / 60 / 60 / 24) //获取剩余天数
-	let hours = Math.floor((stopTime / 1000 / 60 / 60) % 24); //获取剩余小时数
-	let minutes = Math.floor((stopTime / 1000 / 60) % 60); //获取分钟
-	let seconds = Math.floor((stopTime / 1000) % 60); //获取秒数
-	return {
-		hours, //倒计时小时数
-		minutes, //倒计时分钟数
-		seconds, //倒计时秒数
-		day //倒计时天数
-	}
-}
-
-// 调用打开地图方法
-export function openMap(e) {
-	const that = this
-	return new Promise((resolve, reject) => {
-		wx.getSetting({
-			success(res) {
-				//这里判断是否有地位权限
-				if (!res.authSetting['scope.userLocation']) {
-					wx.showModal({
-						title: '提示',
-						content: '请求获取位置权限',
-						success: function(res) {
-							if (res.confirm == false) {
-								// 授权失败
-								reject()
-								return false;
-							}
-							wx.openSetting({
-								success(res) {
-									//如果再次拒绝则返回页面并提示
-									if (!res.authSetting['scope.userLocation']) {
-										wx.showToast({
-											title: '此功能需获取位置信息,请重新设置',
-											duration: 3000,
-											icon: 'none'
-										})
-									} else {
-										//允许授权,调用地图
-										resolve()
-									}
-								}
-							})
-						}
-					})
-				} else {
-					//如果有定位权限,调用地图
-					resolve()
-				}
-			}
-		})
-	})
-}
-//时间戳转换成时间
-export function getTime(time) {
-	const num =13 - (time+'').length;
-	let l = 1;//倍数
-	for (let i = 0; i < num; i++) {
-		l+='0';
-	}
-	// 重新解析为数字
-	l = parseInt(l)
-	const date = new Date(parseInt(time) * l);
-	const year = date.getFullYear();
-	const mon = date.getMonth() + 1;
-	const day = date.getDate();
-	const hours = date.getHours();
-	const minu = date.getMinutes();
-	const sec = date.getSeconds();
-	return year + '-' + mon + '-' + day + ' ' + hours + ':' + minu + ':' + sec;
-}
+//身份证验证	
+export function isCardNo(card) {
+	// 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X 
+	var reg =
+		/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/;
+	if (reg.test(card) === false) {
+		console.log(card);
+		return false;
+
+	}
+	return true
+}
+
+// 金额显示变化
+export function getMoneyStyle(value = 0) {
+	if (typeof value == 'string') {
+		value = (+value).toFixed(2)
+	}
+	if (typeof value == 'number') {
+		value = value.toFixed(2)
+	}
+	// 将字符串转为数组
+	let n = value.split("");
+	// 反转数组并复制循环处理
+	let arr = n.reverse().map(function(e, ind, ar) {
+		// 判断当前下标是否为3的整数倍数且不为最后一个下标
+		if (ind % 3 == 0 && ind / 3 > 1 && ind != ar.length) {
+			return e + ','
+		} else {
+			return e
+		}
+	})
+	// 反转数组回复原来排序并合并回字符串
+	arr = arr.reverse().join('')
+	return arr;
+}
+
+// 倒计时计算
+// 计算倒计时时间
+export function timeComputed(time) {
+	// 判断是否当前时间大于结束时间
+	let tpye = false
+	// 获取当前时间
+	const actTime = (new Date()).getTime();
+	// 获取到期时间
+	let stopTime = time - actTime;
+	// 判断是否小于0
+	if (stopTime < 0) {
+		stopTime = stopTime * -1
+		 tpye = true
+	}
+	let day = Math.floor(stopTime / 1000 / 60 / 60 / 24) //获取剩余天数
+	let hours = Math.floor((stopTime / 1000 / 60 / 60) % 24); //获取剩余小时数
+	let minutes = Math.floor((stopTime / 1000 / 60) % 60); //获取分钟
+	let seconds = Math.floor((stopTime / 1000) % 60); //获取秒数
+	return {
+		hours, //倒计时小时数
+		minutes, //倒计时分钟数
+		seconds, //倒计时秒数
+		day, //倒计时天数
+		tpye
+	}
+}
+
+// 调用打开地图方法
+export function openMap(e) {
+	const that = this
+	return new Promise((resolve, reject) => {
+		wx.getSetting({
+			success(res) {
+				//这里判断是否有地位权限
+				if (!res.authSetting['scope.userLocation']) {
+					wx.showModal({
+						title: '提示',
+						content: '请求获取位置权限',
+						success: function(res) {
+							if (res.confirm == false) {
+								// 授权失败
+								reject()
+								return false;
+							}
+							wx.openSetting({
+								success(res) {
+									//如果再次拒绝则返回页面并提示
+									if (!res.authSetting['scope.userLocation']) {
+										wx.showToast({
+											title: '此功能需获取位置信息,请重新设置',
+											duration: 3000,
+											icon: 'none'
+										})
+									} else {
+										//允许授权,调用地图
+										resolve()
+									}
+								}
+							})
+						}
+					})
+				} else {
+					//如果有定位权限,调用地图
+					resolve()
+				}
+			}
+		})
+	})
+}
+//时间戳转换成时间
+export function getTime(time) {
+	const num =13 - (time+'').length;
+	let l = 1;//倍数
+	for (let i = 0; i < num; i++) {
+		l+='0';
+	}
+	// 重新解析为数字
+	l = parseInt(l)
+	const date = new Date(parseInt(time) * l);
+	const year = date.getFullYear();
+	const mon = date.getMonth() + 1;
+	const day = date.getDate();
+	const hours = date.getHours();
+	const minu = date.getMinutes();
+	const sec = date.getSeconds();
+	return year + '-' + mon + '-' + day + ' ' + hours + ':' + minu + ':' + sec;
+}