Bladeren bron

2020 7.17 退款添加退款理由

347617796@qq.com 5 jaren geleden
bovenliggende
commit
995a24314b

+ 0 - 6
App.vue

@@ -122,12 +122,6 @@
 			  })
 			};
 		
-		},
-		onShow: function() {
-			console.log('App Show')
-		},
-		onHide: function() {
-			console.log('App Hide')
 		}
 	}
 </script>

+ 139 - 0
common/uin.css

@@ -1464,4 +1464,143 @@ radio-group label, checkbox-group label{
 		color:#303133!important;
 		font-size: 36upx;
 		font-weight: normal!important;
+	}
+	/* 盒子模型 */
+	.flex-box {
+	  display: -webkit-box;
+	  display: -moz-box;
+	  display: -ms-flexbox;
+	  display: -webkit-flex;
+	  display: flex;
+	}
+	
+	/*盒子模型,竖向自适应,垂直排列  */
+	.flex-box-v {
+	  display: -webkit-box;
+	  display: -webkit-flex;
+	  display: flex;
+	  -webkit-box-orient: vertical;
+	  -webkit-flex-flow: column;
+	  flex-flow: column !important;
+	}
+	
+	/* 水平等列排版(容器左右没缝隙,子元素左右两边自适应) */
+	.flex-d-center {
+	  justify-content: space-between;
+	  -webkit-justify-content: space-between;
+	}
+	
+	/* 水平等列排版(子元素两边有缝隙自己适应) */
+	.flex-dv-center {
+	  justify-content: space-around;
+	  -webkit-justify-content: space-around;
+	}
+	
+	
+	/*通过一起使用 box-align 和 box-pack 属性,对 view 框的子元素进行居中,目前没有浏览器支持box-align 和 box-pack 属性,所以需要加上浏览器内核-webkit,-moz等的简写  */
+	.flex-center-center {
+	  justify-content: center;
+	  -webkit-justify-content: center;
+	  -moz-justify-content: center;
+	  align-items: center;
+	  -webkit-align-items: center;
+	  -webkit-box-pack: center;
+	  -webkit-box-align: center;
+	  -moz-align-items: center;
+	  -moz-box-pack: center;
+	  -moz-box-align: center;
+	}
+	
+	/*对view中的子元素进行居中,并且位于容器的中间位置(flex-box水平;flex-box-v垂直)  */
+	.flex-v-zhu,
+	.flex-h-zhu {
+	  justify-content: center;
+	  -webkit-justify-content: center;
+	  -webkit-box-pack: center;
+	}
+	
+	/*对view中的子元素进行居中,并且位于容器的中间位置(flex-box垂直;flex-box-v水平)  */
+	.flex-v-ce,
+	.flex-h-ce {
+	  align-items: center;
+	  -webkit-align-items: center;
+	  -webkit-box-align: center;
+	}
+	
+	/*让所有弹性盒模型对象的子元素都有相同的长度,且忽略它们内部的内容:  */
+	.flex-1 {
+	  -webkit-box-flex: 1;
+	  -moz-box-flex: 1;
+	  -webkit-flex: 1;
+	  -ms-flex: 1;
+	  flex: 1;
+	}
+	
+	.flex-2 {
+	  -webkit-box-flex: 2;
+	  box-flex: 2;
+	  -moz-box-flex: 2;
+	  -webkit-flex: 2;
+	  -ms-flex: 2;
+	  flex: 2;
+	}
+	
+	.flex-3 {
+	  -webkit-box-flex: 3;
+	  box-flex: 3;
+	  -moz-box-flex: 3;
+	  -webkit-flex: 3;
+	  -ms-flex: 3;
+	  flex: 3;
+	}
+	
+	.flex-4 {
+	  -webkit-box-flex: 4;
+	  box-flex: 4;
+	  -moz-box-flex: 4;
+	  -webkit-flex: 4;
+	  -ms-flex: 4;
+	  flex: 4;
+	}
+	
+	
+	.flex-5 {
+	  -webkit-box-flex: 5;
+	  box-flex: 5;
+	  -moz-box-flex: 5;
+	  -webkit-flex: 5;
+	  -ms-flex: 5;
+	  flex: 5;
+	}
+	
+	.flex-direction-row-reverse {
+	  flex-direction: row-reverse;
+	  -webkit-flex-direction: row-reverse;
+	}
+	
+	/*超出部分用....表示的公用样式  */
+	.font-flex-word {
+	  overflow: hidden;
+	  text-overflow: ellipsis;
+	  white-space: nowrap;
+	}
+	
+	/* 内容超出部分自动换行 */
+	.flex-d-wrap {
+	  flex-wrap: wrap;
+	}
+	
+	/* 内容超出部分不换行 */
+	.flex-no-wrap {
+	  flex-wrap: nowrap;
+	}
+	
+	/* 从右边开始排列 */
+	.flex-box-end {
+	  display: -webkit-box;
+	  display: -moz-box;
+	  display: -ms-flexbox;
+	  display: -webkit-flex;
+	  display: flex;
+	  justify-content: flex-end;
 	}

+ 2 - 9
component/Dialog.vue

@@ -1,14 +1,7 @@
 <template>
     <view v-if="showdialog">
-		<van-dialog  
-		:title="titles"
-		show-cancel-button="true"
-		:show="showdialog"
-		@cancel="cancelDialog" @confirm="confirmOrder"
-		>
-		<view>
-			{{values}}
-		</view>
+		<van-dialog :title="titles" show-cancel-button="true"	:show="showdialog"	@cancel="cancelDialog" @confirm="confirmOrder">
+				<view>	{{values}}	</view>
 		</van-dialog>
 	</view>
 </template>

+ 3 - 3
component/Gobacktop.vue

@@ -36,14 +36,14 @@
 		background-color: transparent;
 	}
 	.activebottom {
-		width: 90upx;
-		height: 90upx;
+		width: 80upx;
+		height: 80upx;
 		border-radius: 50%;
 		background-color: #fff;
 		border: 1px solid #ccc;
 		position: fixed;
 		right: 32upx;
-		bottom: 130upx;
+		bottom: 150upx;
 		background-color: transparent;
 	}
 	.imgTop {

+ 2 - 2
component/openpictrue.vue

@@ -41,7 +41,7 @@
 			},
 			images: {
 				default: '',
-				type: String
+				type:Array
 			}
 		},
 		components: {
@@ -61,7 +61,7 @@
 			return {
 				types: false,
 				pictureUrl: this.pictureUrl,
-				images:[],
+				// images:[],
 				list: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'],
 			};
 		},

+ 79 - 76
component/shopList.vue

@@ -1,77 +1,80 @@
-<template>
-	<view class="page">
-		<view class="uni-product-list">
-			<view style="padding: 20upx;" v-for="(product,index) in productList" :key="index" @click="goshop(product)">
-				<view class="image-view">												
-					<image  class="uni-product-image" :src="pictureUrl+'/uploads/home/store/goods/' + product.goods_image.substr(0, product.goods_image.indexOf('\_')) + '/' + product.goods_image "></image>
-				</view>
-				<view class="uni-product-title textover">{{product.goods_name}}</view>
-				<view class="uni-product-price">
-					<text class="uni-product-price-original" style="color:#D9332E!important;font-weight: bold;">¥{{product.goods_price}}</text>
-					<text class="uni-product-price-favour">¥{{product.goods_marketprice}}</text>
-				</view>
-				<view class="tags" v-if="product.goods_advword!=''">{{product.goods_advword}}</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-export default {
-	props: {
-		productList: {
-		  type: Array
-		},
-		// 酒店总id
-		goodId: {
-			type: Number
-		}
-	},
-    data() {
-        return {
-            title: 'product-list',
-            renderImage: false,
-			pictureUrl: this.pictureUrl
-        };
-    },
-    methods: {
-       goshop(e) {
-		   let id = e.goods_commonid;
-		   let goodIds = e.store_id; // 商品单个酒店id
-		   let stoe_ids = this.goodId;
-		 
-		   uni.navigateTo({
-		   	url:`/pages/index/shop?id=${id}&store_id=${stoe_ids}&goodId=${goodIds}`
-		   })
-	   }
-    },
-    onLoad() {
-   
-    },
-    onPullDownRefresh() {
-       
-    },
-    onReachBottom() {
-       
-    }
-};
-</script>
-
-<style>
-	.textover {
-		text-overflow:ellipsis;  /* ellipsis:显示省略符号来代表被修剪的文本  string:使用给定的字符串来代表被修剪的文本*/ 
		white-space: nowrap;   /* nowrap:规定段落中的文本不进行换行   */ 
		overflow: hidden; /*超出 */ 
-	    display: inline-block;	 /*display:box的时候省略好不出现*/ 
-	}
-	.tags {
-		display:inline-block!important; 
-		border: 1px solid #D9332E;
-		color: #D9332E;
-		text-align: center;
-		line-height: 45upx;
-		width:auto;
-		padding: 0 10upx;
-		margin-top: 10upx;
-		border-radius: 6upx;
-		font-size: 22upx;
-	}
+<template>
+	<view class="page">
+		<view class="uni-product-list">
+			<view style="padding: 20upx;" v-for="(product,index) in productList" :key="index" @click="goshop(product)">
+				<view class="image-view">												
+					<image  class="uni-product-image" :src="pictureUrl+'/uploads/home/store/goods/' + product.goods_image.substr(0, product.goods_image.indexOf('\_')) + '/' + product.goods_image "></image>
+				</view>
+				<view class="uni-product-title textover">{{product.goods_name}}</view>
+				<view class="uni-product-price">
+					<text class="uni-product-price-original" style="color:#D9332E!important;font-weight: bold;">¥{{product.goods_price}}</text>
+					<text class="uni-product-price-favour">¥{{product.goods_marketprice}}</text>
+				</view>
+				<view class="tags" v-if="product.goods_advword!=''">{{product.goods_advword}}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		productList: {
+		  type: Array
+		},
+		// 酒店总id
+		goodId: {
+			type: Number
+		}
+	},
+    data() {
+        return {
+            title: 'product-list',
+            renderImage: false,
+			pictureUrl: this.pictureUrl
+        };
+    },
+    methods: {
+       goshop(e) {
+		   let id = e.goods_commonid;
+		   let goodIds = e.store_id; // 商品单个酒店id
+		   let stoe_ids = this.goodId;
+		 
+		   uni.navigateTo({
+		   	url:`/pages/index/shop?id=${id}&store_id=${stoe_ids}&goodId=${goodIds}`
+		   })
+	   }
+    },
+    onLoad() {
+   
+    },
+    onPullDownRefresh() {
+       
+    },
+    onReachBottom() {
+       
+    }
+};
+</script>
+
+<style>
+	.textover {
+		overflow : hidden;
+		text-overflow: ellipsis;
+		display: -webkit-box;
+		-webkit-line-clamp: 2;
+		-webkit-box-orient: vertical;
+	}
+	.tags {
+		display:inline-block!important; 
+		border: 1px solid #D9332E;
+		color: #D9332E;
+		text-align: center;
+		line-height: 45upx;
+		width:auto;
+		padding: 0 10upx;
+		margin-top: 10upx;
+		border-radius: 6upx;
+		font-size: 22upx;
+	}
 </style>

+ 5 - 1
pages.json

@@ -221,7 +221,11 @@
 				"navigationBarTitleText": "订单详情",
 				"usingComponents": {
 					"van-card": "/wxcomponents/dist/card/index",
-					"van-dialog": "/wxcomponents/dist/dialog/index"
+					"van-dialog": "/wxcomponents/dist/dialog/index",
+					"van-cell-group": "/wxcomponents/dist/cell-group/index",
+					"van-radio": "/wxcomponents/dist/radio/index",
+					"van-radio-group": "/wxcomponents/dist/radio-group/index",
+					"van-field": "/wxcomponents/dist/field/index"
 				}
 			}
 		},

+ 331 - 369
pages/index/cart.vue

@@ -1,394 +1,356 @@
 <template>
 	<view style="height: 100vh;background-color: #F5F5F5;">
-		  <van-skeleton  :loading="loading">
-		 <view  class="titleright" @click="changeShop" v-if="isdelete">编辑</view>
-		  <view class="titleright" @click="changeShop" v-else>取消</view>
-		  <view v-if="list.length>0" style="margin-bottom: 150upx;">
-			  <scroll-view  style="height: 88vh;" class="floor-list"
-			  		   :scroll-top="scrollTop" scroll-y="true"  @scroll="scroll"  @scrolltoupper="upper" @scrolltolower="lower"
-			  		    :refresher-enabled="false">
-			  		 <view class="cart-list">
-			  		  <view style="display: flex;align-items: center;padding: 20upx 36upx;
-			  		   border-bottom: 1px solid #F5F5F5;">
-			  			  <image :src="pictureUrl+'/uploads/home/store/'+store.store_id+'/'+store.store_banner" style="border-radius: 50%;
-			  width: 50upx;height: 50upx;"></image>
-			  			  <span style="padding-left: 8upx;">{{store.store_name}}</span>
-			  		  </view>
-			  		  
-			  		  <view v-for="(item,index) in list" :key="index" class="shoplist" style="background-color: #fff;">
-			  			  <view style="flex: 1;border-radius: 100%;">
-			  				<van-checkbox-group :value="checkboxList" @change="checkboxChange()">
-			  				    <van-checkbox  checked-color="#D9332E" :name="index"></van-checkbox>
-			  				  </van-checkbox-group> 
-			  			  </view>
-			  			  <view style="flex: 15;">
-			  			  <van-card
-			  			    title-class="changewidth"
-			  				price-class ="priceClass"
-			  			    :price="item.goods_price"
-			  			    :desc="item.descire+'X'+item.goods_num"
-			  			    :title="item.desarray"
-			  			    :thumb="pictureUrl + '/uploads/home/store/goods/' + item.goods_image.substr(0, item.goods_image.indexOf('\_')) + '/' + item.goods_image"
-			  			  >
-			  			    <view slot="footer">
-			  				 <!-- <uninumberbox :min="1":isMax="item.number>=item.stock?true:false"
-			  				 	:isMin="item.number===1":max="item.stock" :value="item.goods_num" @change="bindChange(item)"/> -->
-			  				 <uninumberbox
-			  				    class="step"
-			  				 	:min="1" 
-			  				 	:value="item.goods_num"
-			  					:index="index"
-			  					@eventChange="bindChange"
-			  				 ></uninumberbox>
-			  			    </view>
-			  			  </van-card>
-			  			  </view>
-			  		  </view>
-			  		 </view>
-			  		 </scroll-view>
-		  </view>
-		  <view v-else>
-			  <view style="margin: 120upx auto;text-align: center;">
-				   <van-icon size="160rpx" color="#909399" name="cart-o" />
-				   <view @click="gostore" style="text-align: center;
-				   color: #909399;border: 1px solid #909399; padding: 5upx 10upx;
-				   margin: 10upx auto;width: 150rpx;">
+		<van-skeleton :loading="loading">
+			<view class="titleright" @click="changeShop" v-if="isdelete">编辑</view>
+			<view class="titleright" @click="changeShop" v-else>取消</view>
+			<view v-if="list.length > 0" style="margin-bottom: 150upx;">
+				<scroll-view
+					style="height: 88vh;"
+					class="floor-list"
+					:scroll-top="scrollTop"
+					scroll-y="true"
+					@scroll="scroll"
+					@scrolltoupper="upper"
+					@scrolltolower="lower"
+					:refresher-enabled="false">
+					<view class="cart-list">
+						<view style="display: flex;align-items: center;padding: 20upx 36upx; border-bottom: 1px solid #F5F5F5;">
+							<image :src="pictureUrl + '/uploads/home/store/' + store.store_id + '/' + store.store_banner" style="border-radius: 50%;width: 50upx;height: 50upx;"></image>
+							<span style="padding-left: 8upx;">{{ store.store_name }}</span>
+						</view>
+
+						<view v-for="(item, index) in list" :key="index" class="shoplist" style="background-color: #fff;">
+							<view style="border-radius: 100%;">
+								<van-checkbox-group :value="checkboxList" @change="checkboxChange()">
+									<van-checkbox checked-color="#D9332E" :name="index"></van-checkbox>
+								</van-checkbox-group>
+							</view>
+							<view style="flex:1;position: relative;overflow: hidden;">
+								<van-card style="width: 100%;"
+									title-class="changewidth"
+									price-class="priceClass"
+									:price="item.goods_price"
+									:desc="item.descire + 'X' + item.goods_num"
+									:title="item.desarray"
+									:thumb="pictureUrl + '/uploads/home/store/goods/' + item.goods_image.substr(0, item.goods_image.indexOf('\_')) + '/' + item.goods_image">
+								</van-card>
+								<uninumberbox class="step" :min="1" :value="item.goods_num" :index="index" @eventChange="bindChange"></uninumberbox>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+			</view>
+			<view v-else>
+				<view style="margin: 120upx auto;text-align: center;">
+					<van-icon size="160rpx" color="#909399" name="cart-o" />
+					<view @click="gostore" style="text-align: center; color: #909399;border: 1px solid #909399; padding: 5upx 10upx; margin: 10upx auto;width: 150rpx;">
 						去逛逛
-				  </view>
-			  </view>
-		  </view>
-		   
-		 <view style="position: fixed;bottom: 0;border-top:1px solid #eee;height: 8vh;">
-			 <!--    :price-class="isdelete? '':'isdiaplay' " -->
-		 <van-submit-bar
-			v-if="isdelete"
-		   :price="prices"
-		   :button-text="listip"
-		   @submit="onClickButton"
-		   :tip="true"
-		 >
-		 <van-checkbox checked-color="#D9332E" :value="isAll" shape="round" @change="onChange">
-		  全选
-		 </van-checkbox>
-	
-		 </van-submit-bar>
-		 
-		 <van-submit-bar
-		   bar-class="betweenclass"	
-		   v-if="!isdelete"
-		   :button-text="listip"
-		   @submit="onClickButton"
-		   :tip="true"
-		 >
-		 <van-checkbox checked-color="#D9332E" :value="isAll" shape="round" @change="onChange">
-		  全选
-		 </van-checkbox>
-		 	
-		 </van-submit-bar>
-		 
-		 </view>
-		 
-		 </van-skeleton>
+					</view>
+				</view>
+			</view>
+
+			<view style="position: fixed;bottom: 0;border-top:1px solid #eee;height: 8vh;">
+				<van-submit-bar v-if="isdelete" :price="prices" :button-text="listip" @submit="onClickButton" :tip="true">
+					<van-checkbox checked-color="#D9332E" :value="isAll" shape="round" @change="onChange">全选</van-checkbox>
+				</van-submit-bar>
+				<van-submit-bar bar-class="betweenclass" v-if="!isdelete" :button-text="listip" @submit="onClickButton" :tip="true">
+					<van-checkbox checked-color="#D9332E" :value="isAll" shape="round" @change="onChange">全选</van-checkbox>
+				</van-submit-bar>
+			</view>
+		</van-skeleton>
 	</view>
 </template>
 
 <script>
-	import uniNavBar from '@/component/uni-nav-bar/uni-nav-bar.vue'
-	import uninumberbox  from '@/component/uinNumberCart.vue'
-	export default {
-		components: {
-			uniNavBar,
-			uninumberbox 
+import uniNavBar from '@/component/uni-nav-bar/uni-nav-bar.vue';
+import uninumberbox from '@/component/uinNumberCart.vue';
+export default {
+	components: {
+		uniNavBar,
+		uninumberbox
+	},
+	data() {
+		return {
+			firstloading: 0,
+			loading: true,
+			ismax: 0,
+			lengthnumber: 0,
+			pricelist: [],
+			pictureUrl: this.pictureUrl,
+			scrollTop: 0,
+			old: {
+				scrollTop: 0
+			},
+			nums: 0,
+			store: {},
+			ispull: true,
+			page: 1,
+			store_id: 0,
+			prices: 0,
+			listip: '',
+			isdelete: true,
+			isAll: false,
+			checkboxList: [],
+			list: []
+		};
+	},
+	// 隐藏分享菜单
+	onLoad: function(options) {
+		if(options.store_id){
+			this.store_id = options.store_id;
+			this.listip = '结算' + '(' + this.nums + ')';
+			this.getshoplist();
+		}
+	},
+	methods: {
+		// 返回酒店
+		gostore() {
+			uni.navigateBack();
 		},
-		data() {
-			return {
-				firstloading: 0,
-				loading: true,
-				ismax: 0,
-				lengthnumber: 0,
-				pricelist:[],
-				pictureUrl: this.pictureUrl,
-				scrollTop: 0,
-				old: {
-					scrollTop: 0
-				},
-				nums: 0,
-				store: {},
-				ispull: true,
-				page: 1,
-				store_id: 0,
-				prices: 0,
-				listip: '',
-				isdelete: true,
-				isAll: false,
-				checkboxList:[],
-				list:[],
+		onClickButton(e) {
+			let array = [];
+			if (this.pricelist.length == 0) {
+				if (this.isdelete) {
+					this.$msg('请选择商品');
+				} else {
+					this.$msg('请选择删除商品');
+				}
+				return;
+			}
+			this.pricelist.forEach(item => {
+				array.push(item.goods_id);
+			});
+			let ids = array.toString();
+			if (this.isdelete) {
+				// 结算
+				this.getorderId(); // 保存订单生成订单id 购买
+			} else {
+				this.deleteshop(ids);
 			}
 		},
-		// 隐藏分享菜单
-		onLoad: function (options) {
-			this.store_id = options.store_id;
-			this.listip = "结算" + '(' + this.nums + ')';
-			this.getshoplist();
-	    },
-		methods: {
-			// 返回酒店
-			gostore() {
-				uni.navigateBack();
-			},
-			onClickButton(e) {
-				let array = [];
-				if(this.pricelist.length == 0) {
-					if(this.isdelete) {
-						this.$msg('请选择商品');
-					}else {
-						this.$msg('请选择删除商品');
+		// 保存订单生成订单id
+		getorderId() {
+			let goods = [];
+			let prices = this.prices;
+			this.pricelist.forEach((item, index) => {
+				goods.push({});
+				goods[index].goods_id = item.goods_id;
+				goods[index].buy_num = item.goods_num;
+			});
+			this.request({
+				url: '/v1/order/save_og',
+				method: 'post',
+				data: {
+					store_id: this.store.store_id,
+					goods: JSON.stringify(goods)
+				},
+				success: res => {
+					if (res.data.code == 1000) {
+						let order_id = res.data.data.order_id;
+						let store = this.store.store_id;
+						uni.navigateTo({
+							url: `/pages/index/sureBuy?store=${store}&prices=${prices}&order_id=${order_id}`
+						});
 					}
-					return;
-				}
-				this.pricelist.forEach(item => {
-				  array.push(item.goods_id)
-				})
-				let ids = array.toString();
-				if(this.isdelete) {
-					// 结算
-					this.getorderId(); // 保存订单生成订单id 购买
-				}else {
-					this.deleteshop(ids);
 				}
-			},
-			// 保存订单生成订单id
-            getorderId() {
-				let goods = [];
-				let prices = this.prices;
-				this.pricelist.forEach((item,index) => {
-					 goods.push({});
-					 goods[index].goods_id = item.goods_id;
-					 goods[index].buy_num = item.goods_num;
-				 })
-				 this.request({
-					 url:'/v1/order/save_og',
-					 method: 'post',
-					 data: {
-						 store_id: this.store.store_id,
-						 goods: JSON.stringify(goods)
-					 },
-					 success:(res) => {
-						 if(res.data.code == 1000) {
-							 let order_id = res.data.data.order_id;
-							 let store = this.store.store_id;
-							 uni.navigateTo({
-							   url: `/pages/index/sureBuy?store=${store}&prices=${prices}&order_id=${order_id}`
-							 });
-						 }
-						
-					 }
-				 })
-			},
-			// 购物车删除
-			deleteshop(ids) {
-				this.request({
-					url: '/v2/order/cart_drop',
-					method: 'post',
-					data: {
-						ids: ids,
-						store_id: this.store_id
-					},
-					success: () => {
+			});
+		},
+		// 购物车删除
+		deleteshop(ids) {
+			this.request({
+				url: '/v2/order/cart_drop',
+				method: 'post',
+				data: {
+					ids: ids,
+					store_id: this.store_id
+				},
+				success: (res) => {
+					console.log(res);
+					if(res.data.code==1000){
 						this.nums = 0;
-					    this.listip = "删除" + '(' + this.nums + ')';
-						this.list = [];
+						this.listip = '删除' + '(' + this.nums + ')';
+						this.prices=0;
 						this.checkboxList = [];
 						this.getshoplist();
 					}
-				})
-			},
-			// 滚动到顶部
-			upper(e) {
-				console.log("顶部")
-			},
-			
-			// 滚到底部
-			lower(e) {
-				// this.page = this.page + 1;
-				// if(this.ispull) {
-				// 	this.getshoplist();
-				// }
-			},
-			
-			// 滚动时触发
-			scroll(e) {
-				this.old.scrollTop = e.detail.scrollTop
-			},
-			changeShop() {
-				this.isdelete = !this.isdelete;
-				
-				 this.listip = this.isdelete ? "结算" + '(' + this.nums + ')' :'删除'+ '(' + this.nums + ')';
-			},
-			getshoplist() {
-				this.loading = true;
-				this.request({
-					url: '/v2/order/cart',
-					method: 'post',
-					data: {
-						store_id: this.store_id,
-						page: this.page
-					},
-					success: (res) => {
-						let { data } = res.data;
-						 data.cart_list.forEach(item => {
-							 let arr = item.goods_name.split(' ');
-							 item.desarray = arr[0];
-							 item.descire = item.goods_name.replace(arr[0], '');
-						 })
-						if(data.cart_list.length < 10) {
-							this.ispull = false;
-						}
-						this.list = this.list.concat(data.cart_list);
-						this.store = data.store;
-						if(this.firstloading == 0) {
-							this.loading = false;
-						}
-						this.firstloading = 1;
-					}
-				})
-			},
-			// 返回上层
-			goback() {
-					uni.navigateBack(); 
-			},
-			
-			// 数量累加
-			bindChange(e) {
-				 this.list[e.index].goods_num = e.number;
-				 this.checkoutprice();
-			},
-			// 单选
-			checkboxChange(e) {
-			  this.checkboxList = []
-			  e.detail.forEach((item, idx) => {
-				  this.$set(this.checkboxList, idx, item)
-			  })
-			  let array = this.list;
-			  let price = [];
-			  this.checkboxList.forEach(item => {
-				  price.push(array[item])
-			  })
-			  this.pricelist = price;
-			  let num = 0;
-			  this.pricelist.forEach(item => {
-				  num += item.goods_num;
-			  })
-			  console.log(num);
-			  this.nums = num;
-			  this.lengthnumber = this.pricelist.length;
-			   this.listip = this.isdelete ? "结算" + '(' + this.nums + ')' :'删除'+ '(' + this.nums + ')';
-			  this.checkoutprice();
-			   },
-			 // 计算价格 
-			 checkoutprice() {
-				 let total = 0;
-				 let num = 0
-				  this.pricelist.forEach(item => {
-					  total += item.goods_price * item.goods_num;
-					  num += item.goods_num;
-				  })
-				  this.nums = num;
-				  this.prices = Number(total.toFixed(2))*100;
-				  this.listip = this.isdelete ? "结算" + '(' + this.nums + ')' :'删除'+ '(' + this.nums + ')';
-				  
-			 },
-			// 全选
-			onChange(a) {
-				this.isAll = !this.isAll;
-				let items = this.list;
-				if(this.isAll) {
-					items.forEach((item, idx) => {
-						this.$set(this.checkboxList, idx, idx.toString())
-					})
-					 this.pricelist = this.list;
-					 let num = 0
-					 this.pricelist.forEach(item => {
-					 				  num += item.goods_num;
-					 })
-					 this.nums = num;
-					 this.listip = this.isdelete ? "结算" + '(' + this.nums + ')' :'删除'+ '(' + this.nums + ')';
-					 this.checkoutprice();
-				}else {
-					for (let i = 0, lenI = items.length; i < lenI; ++i) {
-						  this.checkboxList = [];
-						  this.pricelist = [];
-						  this.nums = 0;
-						  this.listip = this.isdelete ? "结算" + '(' + this.nums + ')' :'删除'+ '(' + this.nums + ')';
-						  this.checkoutprice();
-					}
-					
 				}
-				
+			});
+		},
+		// 滚动到顶部
+		upper(e) {
+			console.log('顶部');
+		},
+
+		// 滚到底部
+		lower(e) {
+			// this.page = this.page + 1;
+			// if(this.ispull) {
+			// 	this.getshoplist();
+			// }
+		},
+
+		// 滚动时触发
+		scroll(e) {
+			this.old.scrollTop = e.detail.scrollTop;
+		},
+		changeShop() {
+			this.isdelete = !this.isdelete;
+			this.listip = this.isdelete ? '结算' + '(' + this.nums + ')' : '删除' + '(' + this.nums + ')';
+		},
+		getshoplist() {
+			this.loading = true;
+			this.request({
+				url: '/v2/order/cart',
+				method: 'post',
+				data: {
+					store_id: this.store_id,
+					page: this.page
+				},
+				success: res => {
+					let { data } = res.data;
+					this.store = data.store;
+					data.cart_list.forEach(item => {
+						let arr = item.goods_name.split(' ');
+						item.desarray = arr[0];
+						item.descire = item.goods_name.replace(arr[0], '');
+					});
+					this.list =data.cart_list;
+					console.log(this.list);
+					this.loading = false;
+				}
+			});
+		},
+		// 返回上层
+		goback() {
+			uni.navigateBack();
+		},
+
+		// 数量累加
+		bindChange(e) {
+			this.list[e.index].goods_num = e.number;
+			this.checkoutprice();
+		},
+		// 单选
+		checkboxChange(e) {
+			this.checkboxList = [];
+			e.detail.forEach((item, idx) => {
+				this.$set(this.checkboxList, idx, item);
+			});
+			let array = this.list;
+			let price = [];
+			this.checkboxList.forEach(item => {
+				price.push(array[item]);
+			});
+			this.pricelist = price;
+			let num = 0;
+			this.pricelist.forEach(item => {
+				num += item.goods_num;
+			});
+			this.nums = num;
+			this.lengthnumber = this.pricelist.length;
+			this.listip = this.isdelete ? '结算' + '(' + this.nums + ')' : '删除' + '(' + this.nums + ')';
+			this.checkoutprice();
+		},
+		// 计算价格
+		checkoutprice() {
+			let total = 0;
+			let num = 0;
+			this.pricelist.forEach(item => {
+				total += item.goods_price * item.goods_num;
+				num += item.goods_num;
+			});
+			this.nums = num;
+			this.prices = Number(total.toFixed(2)) * 100;
+			this.listip = this.isdelete ? '结算' + '(' + this.nums + ')' : '删除' + '(' + this.nums + ')';
+		},
+		// 全选
+		onChange(a) {
+			this.isAll = !this.isAll;
+			let items = this.list;
+			if (this.isAll) {
+				items.forEach((item, idx) => {
+					this.$set(this.checkboxList, idx, idx.toString());
+				});
+				this.pricelist = this.list;
+				let num = 0;
+				this.pricelist.forEach(item => {
+					num += item.goods_num;
+				});
+				this.nums = num;
+				this.listip = this.isdelete ? '结算' + '(' + this.nums + ')' : '删除' + '(' + this.nums + ')';
+				this.checkoutprice();
+			} else {
+				for (let i = 0, lenI = items.length; i < lenI; ++i) {
+					this.checkboxList = [];
+					this.pricelist = [];
+					this.nums = 0;
+					this.listip = this.isdelete ? '结算' + '(' + this.nums + ')' : '删除' + '(' + this.nums + ')';
+					this.checkoutprice();
+				}
 			}
 		}
 	}
+};
 </script>
 
 <style>
-	.betweenclass {
-		display: flex;
-		justify-content: space-between!important;
-	}
-	.uniNavBar {
-	  height: 100%;	
-	}
-	.cart-list {
-		background-color: #fff;
-		/* padding: 0 36upx; */
-	}
-	.titleright {
-		text-align: right;
-		padding: 10upx 30upx;
-		background: #fff;
-		border-bottom: 1px solid #eee;
-		height: 4vh;
-		
-	}
-	.changewidth {
-		color: #303133;
-		font-size: 32upx;
-		font-weight: 100!important;
-		width: 70%;
-		white-space: nowrap;
-		overflow: hidden;
-		text-overflow: ellipsis;
+.betweenclass {
+	display: flex;
+	justify-content: space-between !important;
+}
+.uniNavBar {
+	height: 100%;
+}
+.cart-list {
+	background-color: #fff;
+	/* padding: 0 36upx; */
+}
+.titleright {
+	text-align: right;
+	padding: 10upx 30upx;
+	background: #fff;
+	border-bottom: 1px solid #eee;
+	height: 4vh;
+}
+.changewidth {
+	color: #303133;
+	font-size: 32upx;
+	font-weight: 100 !important;
+	width: 100%;
+	white-space: nowrap;
+	overflow: hidden;
+	text-overflow: ellipsis;
+}
 
-	}
-	
-	.van-card {
-		background-color: #fff!important;
-	}
-    .shoplist {
-		display: flex;
-		padding: 0 35upx;
-		justify-content: space-between;
-		align-items: center;
-		padding-bottom: 25upx;
-	}
-		
-	.checklabel {
-		transform:scale(0.7);
-		border-radius: 100%;
-	}
-	.checkboxteil {
-		transform:scale(0.7);
-		border-radius: 100%;
-	}
-	.uni-numbox {
-		position: static!important;
-		float: right;
-	}
-	
-	.isdiaplay .van-submit-bar__text {
-		visibility: hidden;
-	}
-	.isdiaplay {
-		visibility: hidden;
-	}
+.van-card {
+	background-color: #fff !important;
+	overflow: hidden;
+}
+.shoplist {
+	display: flex;
+	padding: 0 35upx;
+	justify-content: space-between;
+	align-items: center;
+	padding-bottom: 25upx;
+}
+
+.checklabel {
+	transform: scale(0.7);
+	border-radius: 100%;
+}
+.checkboxteil {
+	transform: scale(0.7);
+	border-radius: 100%;
+}
+.uni-numbox {
+	left: auto !important;
+	right: 0 !important;
+}
+
+.isdiaplay .van-submit-bar__text {
+	visibility: hidden;
+}
+.isdiaplay {
+	visibility: hidden;
+}
 </style>

+ 43 - 45
pages/index/hotel.vue

@@ -391,55 +391,52 @@
 
 			// 获取商品详情
 			getshopdetail(e) {
-				// uni.showLoading({
-				//     title: '加载中'
-				// });
 				this.request({
-				                url:"/v2/entry/storeGoods",
-				                method:'get',
-				                data: {
-				                         store_id: this.goodId,
-										 page: this.page,
-										 goods_commonid: this.goods_commonid, // 上新排序
-										 goods_price: this.goods_price,
-										 gc_id_1: this.gc_id_1
-				                    },
-								success: (res) => {
-									// uni.hideLoading()
-									if(this.firstloading == 0) {
-										this.loading = false;
-									}
-									this.firstloading = 1;
-									if(e == 2) {
-										this.goods_list = [];
-									}
-									this.goods_list = this.goods_list.concat(res.data.data.goods_list);
-									if(res.data.data.goods_list.length < 10) {
-										this.isDetail = 2;
-									}
-									
-								},
+	                url:"/v2/entry/storeGoods",
+	                method:'get',
+					data: {
+							 store_id: this.goodId,
+							 page: this.page,
+							 goods_commonid: this.goods_commonid, // 上新排序
+							 goods_price: this.goods_price,
+							 gc_id_1: this.gc_id_1
+						},
+					success: (res) => {
+						// uni.hideLoading()
+						if(this.firstloading == 0) {
+							this.loading = false;
+						}
+						this.firstloading = 1;
+						if(e == 2) {
+							this.goods_list = [];
+						}
+						this.goods_list = this.goods_list.concat(res.data.data.goods_list);
+						if(res.data.data.goods_list.length < 10) {
+							this.isDetail = 2;
+						}
+						
+					},
 			    })
 			},
 			// 一级菜单
 			hotelmenu() {
 				let _this = this;
 				this.request({
-				                url:"/v1/entry/storeCategory",
-				                method:'get',
-				                data: {
-				                        store_id: this.goodId,
-				                    },
-								success: function(res) {
-									 let { category_list } = res.data.data;
-									 category_list.forEach((item,idx) => {
-										 item.text = item.gc_name;
-										 item.value = idx;
-									 })
-									 let array = [{gc_id:'',gc_name:'全部'}];
-									 _this.classify =  array.concat(category_list);
-									 _this.category_list = category_list.splice(0,10);
-								},
+	                url:"/v1/entry/storeCategory",
+	                method:'get',
+					data: {
+							store_id: this.goodId,
+						},
+					success: function(res) {
+						 let { category_list } = res.data.data;
+						 category_list.forEach((item,idx) => {
+							 item.text = item.gc_name;
+							 item.value = idx;
+						 })
+						 let array = [{gc_id:'',gc_name:'全部'}];
+						 _this.classify =  array.concat(category_list);
+						 _this.category_list = category_list.splice(0,10);
+					},
 				})
 			},
 		
@@ -504,9 +501,10 @@
 						this.storeinformation = data;
 						this.store_summary = data.store_summary;
 						const regex = new RegExp('<img', 'gi');
-						data.store_description = data.store_description.replace(regex, 
-						`<img style="width: 100%;height: auto!important;display: block;text-align: center;"`);
-						this.store_description = data.store_description;
+						if(data.store_description){
+							data.store_description = data.store_description.replace(regex, `<img style="width: 100%;height: auto!important;display: block;text-align: center;"`);
+							this.store_description = data.store_description;
+						}
 						this.has_collected = data.has_collected; // 是否收藏
 						
 					}

+ 2 - 2
pages/index/index.vue

@@ -44,7 +44,7 @@
 		 > 
 			<swiper-item v-for="(item,index) in backgroundlist" :key="index">
 			<view class="swiper-item"  @tap="shopDetail(item)" >
-				 <image style="height: 100%;width: 100%;border-radius: 10upx;" :src='pictureUrl +"/uploads/home/adv/"+item.adv_code' />
+				 <image v-if="item.adv_code" style="height: 100%;width: 100%;border-radius: 10upx;" :src='pictureUrl +"/uploads/home/adv/"+item.adv_code' />
 		    </view>
 			</swiper-item>
 		 </swiper>
@@ -59,7 +59,7 @@
 	<view v-if="!allow">
      <view class="hotelList" v-for='(item,index) in hotelist' :key="index" @click="openinfo(item)">
 		 <view class="hotleLeft">					
-			 <image  style="width: 214upx;height: 152upx;border-radius: 10upx;" :src="pictureUrl+'/uploads/home/store/'+item.store_id+'/'+item.store_banner" />
+			 <image v-if="item.store_banner" style="width: 214upx;height: 152upx;border-radius: 10upx;" :src="pictureUrl+'/uploads/home/store/'+item.store_id+'/'+item.store_banner" />
 		 </view>
 		 <view class="hotelright">
 		 	<view style="font-size: 28upx;color: #303133;font-weight: bold;">{{item.store_name}}

+ 1101 - 1220
pages/index/shop.vue

@@ -1,1277 +1,1158 @@
 <template>
- 	<view class="container">
-		 <van-skeleton  :loading="loading">
-		<scroll-view  style="height: 100vh;" class="floor-list"
-		 :scroll-top="scrollTop" scroll-y="true"  @scroll="scroll"  @scrolltoupper="upper" @scrolltolower="lower"
-		  :refresher-enabled="false">
- 		<view class="carousel">
- 			<swiper indicator-dots circular=true duration="400">
- 				<swiper-item class="swiper-item" v-for="(item,index) in datalist.images" :key="index">
- 					<view @click="shoupicture(item)" class="image-wrapper">
- 						<image
-						    :src="pictureUrl+'/uploads/home/store/goods/'+item.goodsimage_url.substr(0, item.goodsimage_url.indexOf('\_')) + '/' + item.goodsimage_url"
- 							class="loaded" 
- 							mode="aspectFill"
- 						></image>
- 					</view>
- 				</swiper-item>
- 			</swiper>
- 		</view>
- 		
- 		<view class="introduce-section">
-			<view class="titleLayout" >
-				<view class="title">{{datalist.goods_name}}</view>
-				<view @tap="shopDetail" style="display: flex;flex-direction: row;">
-					<view class="titleRight">
-						<view style="font-size: 36upx;color: #D9332E;text-align: right;">{{datalist.praise}}%</view>
-						<view style="color: #606266;font-size: 28upx;">好评率</view>
+	<view class="container">
+		<van-skeleton :loading="loading">
+			<scroll-view
+				style="height: 100vh;"
+				class="floor-list"
+				:scroll-top="scrollTop"
+				scroll-y="true"
+				@scroll="scroll"
+				:refresher-enabled="false">
+				<view class="carousel">
+					<swiper indicator-dots circular="true" duration="400">
+						<swiper-item class="swiper-item" v-for="(item, index) in datalist.images" :key="index">
+							<view @click="shoupicture(item)" class="image-wrapper">
+								<image
+									:src="pictureUrl + '/uploads/home/store/goods/' + item.goodsimage_url.substr(0, item.goodsimage_url.indexOf('\_')) + '/' + item.goodsimage_url"
+									class="loaded"
+									mode="aspectFill"
+								></image>
+							</view>
+						</swiper-item>
+					</swiper>
+				</view>
+
+				<view class="introduce-section">
+					<view class="titleLayout">
+						<view class="title">{{ datalist.goods_name }}</view>
+						<view @tap="shopDetail" style="display: flex;flex-direction: row;">
+							<view class="titleRight">
+								<view style="font-size: 36upx;color: #D9332E;text-align: right;">{{ datalist.praise }}%</view>
+								<view style="color: #606266;font-size: 28upx;">好评率</view>
+							</view>
+							<view style="display: flex;align-items: center;"><uni-icon size="18" type="arrowright"></uni-icon></view>
+						</view>
 					</view>
-					<view style="display: flex;align-items: center;">
-						 <uni-icon  size="18" type="arrowright"></uni-icon>
+					<view style="color: #909399;padding: 10upx 0 15upx 0;" v-if="datalist.points > 0">购买得{{ datalist.points }}圈币</view>
+					<view class="titleLayout price-box">
+						<view>
+							<text class="price-tip">¥</text>
+							<text class="price" style="color: #D9332E;">{{ datalist.goods_price }}</text>
+							<text class="m-price">¥{{ datalist.goods_marketprice }}</text>
+							<text class="price-tip" style="color: #D9332E;" v-if="datalist.goods_storage == 0 || datalist.store_id != store_id || datalist.goods_state != 1">
+								已售罄
+							</text>
+						</view>
+						<view>
+							<text style="color: #909399">月销售{{ datalist.sale_number }}</text>
+						</view>
 					</view>
 				</view>
-			</view>
-			<view style="color: #909399;padding: 10upx 0 15upx 0;" v-if="datalist.points>0">购买得{{datalist.points}}圈币</view>
- 			<view  class="titleLayout price-box">
-				<view>
-					<text class="price-tip">¥</text>
-					<text class="price" style="color: #D9332E;">{{datalist.goods_price}}</text>
-					<text class="m-price">¥{{datalist.goods_marketprice}}</text>
-					<text class="price-tip" style="color: #D9332E;" 
-					v-if="datalist.goods_storage == 0 ||
-					datalist.store_id!= store_id 
-					|| datalist.goods_state != 1
-					">已下架</text>
+
+				<view class="c-list">
+					<view style="display: flex;justify-content: space-between;" class="c-row b-b" @click="toggleSpec">
+						<view style="font-size: 32upx;color: #303133;">规则数量选择</view>
+						<view><uni-icon size="20" type="arrowright"></uni-icon></view>
+					</view>
 				</view>
-				<view>
-					<text style="color: #909399">月销售{{datalist.sale_number}}</text>
+				<!-- 评价 -->
+				<view @tap="shopDetail" style="border-bottom: 20rpx solid #F5F5F5;" class="eva-section">
+					<view style="display: flex;justify-content: space-between;" class="c-row b-b">
+						<view style="font-size: 32upx;color: #303133;">评价</view>
+						<view><uni-icon size="20" type="arrowright"></uni-icon></view>
+					</view>
 				</view>
- 				
- 			</view>
- 			
- 		</view>
- 		
- 		<view class="c-list">
- 			<view  style="display: flex;justify-content: space-between;" class="c-row b-b" @click="toggleSpec">
- 				<view style="font-size: 32upx;color: #303133;">规则数量选择</view>
-				<view>
-				  <uni-icon  size="20" type="arrowright"></uni-icon>
+				<view class="detail-desc">
+					<van-tabs v-model="active" @click="onChange">
+						<van-tab :name="0" title="详情">
+							<view style="padding: 0 32upx;"><rich-text :nodes="datalist.goods_body"></rich-text></view>
+						</van-tab>
+						<van-tab :name="1" title="常见问题">
+							<view style="padding: 0 32upx;"><rich-text :nodes="datalist.issue"></rich-text></view>
+						</van-tab>
+					</van-tabs>
 				</view>
- 			</view>
- 		</view>
- 		<!-- 评价 -->
- 		<view @tap="shopDetail" style="border-bottom: 20rpx solid #F5F5F5;" class="eva-section">
- 			<view  style="display: flex;justify-content: space-between;" class="c-row b-b">
- 				<view style="font-size: 32upx;color: #303133;">评价</view>
- 				<view>
- 				 <uni-icon  size="20" type="arrowright"></uni-icon>
- 				 </view>
- 			</view>
-			
- 		</view>
-		<!-- <assess /> -->
-		<!-- :class="iScrolltop == 2?'activeColor' : ''" -->
- 		<view class="detail-desc" >
-			<van-tabs  v-model="active" @click="onChange">
-			  <van-tab :name="0" title="详情">
-				   <view style="padding: 0 32upx;">
-					   <rich-text :nodes="datalist.goods_body"></rich-text>
-				   </view>
-			  </van-tab>
-			  <van-tab :name="1" title="常见问题">
-				 <view style="padding: 0 32upx;">
-				 	<rich-text :nodes="datalist.issue"></rich-text>
-				 </view>
-			  </van-tab>
-			</van-tabs>
- 		</view>
-		</scroll-view>
+			</scroll-view>
 
- 		<!-- 规格-模态层弹窗 -->
- 		<view 
- 			class="popup spec" 
- 			:class="specClass"
- 			@touchmove.stop.prevent="stopPrevent"
- 			@click="toggleSpec">
- 			<!-- 遮罩层 -->
- 			<view class="mask"></view>
- 			<view class="layer attr-content" @click.stop="stopPrevent">
- 				<view class="a-t">
- 					<image :src="nuberImg==''?firstImg:nuberImg"></image>
- 					<view class="right">
- 						<text class="price" style="font-size: 36upx;color: #303133">¥{{totalprice==0?datalist.goods_price:totalprice}}</text>
-						<view v-if="datalist.spec_list.length > 0 ">
-							<view class="selected" v-if="chosename.length > 0 ">
-								<text class="selected-text" v-for="(sItem, sIndex) in chosename" :key="sIndex">
-									{{sItem.value_name}}
-								</text>
-								X {{shopnumber}}
-							</view>
-							<view class="selected" v-else>
-								<text class="selected-text">
-									请选择规格数量
-								</text>
+			<!-- 规格-模态层弹窗 -->
+			<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="nuberImg == '' ? firstImg : nuberImg"></image>
+						<view class="right">
+							<text class="price" style="font-size: 36upx;color: #303133">¥{{ totalprice == 0 ? datalist.goods_price : totalprice }}</text>
+							<view v-if="datalist.spec_list.length > 0">
+								<view class="selected" v-if="chosename.length > 0">
+									<text class="selected-text" v-for="(sItem, sIndex) in chosename" :key="sIndex">
+										{{ sItem.value_name }}
+									</text>
+									X {{ shopnumber }}
+								</view>
+								<view class="selected" v-else><text class="selected-text">请选择规格数量</text></view>
 							</view>
+							<view v-else>X {{ shopnumber }}</view>
 						</view>
- 						<view v-else>
-							X {{shopnumber}}
+						<view @click="closeCar" style="position: absolute;right: 10%;font-size: 40upx;">x</view>
+					</view>
+					<view v-for="(item, index) in datalist.spec_list" :key="index" class="attr-list">
+						<text>{{ item.spec_name }}</text>
+						<view class="item-list">
+							<text v-for="(childItem, childIndex) in item.value_list"
+								:key="childIndex"
+								class="tit"
+								:class="{ selected: childItem.selected, disabled: childItem.disabled }"
+								@click="selectSpec(index, childItem.value_id, childItem, item, childItem.goods_storage)">
+								{{ childItem.value_name }}
+							</text>
 						</view>
- 					</view>
-					<view @click="closeCar" style="position: absolute;right: 10%;font-size: 40upx;"> 
-					<!-- 	<uni-icon size="20" type="close"></uni-icon> -->
-				      x
 					</view>
- 				</view>
- 				<view v-for="(item,index) in datalist.spec_list" :key="index" class="attr-list">
- 					<text>{{item.spec_name}}</text>
- 					<view class="item-list">
-						<!-- 	v-if="childItem.pid === item.id"   disabled: childItem.goods_storage==0, disabled: childItem.goods_storage==0-->
- 						<text 
- 							v-for="(childItem, childIndex) in item.value_list" 
- 							:key="childIndex" class="tit"
- 							:class="{selected: childItem.selected, disabled:childItem.disabled}"
- 							@click="selectSpec(index, childItem.value_id, childItem, item,childItem.goods_storage)"
- 						>
- 							{{childItem.value_name}}
- 						</text>
- 					</view>
- 				</view>
-				<!-- :max="goods_storage"  -->
-				<view class="numberchange">
-					  <span>数量</span>
-					  <uninumberbox :max="goods_storage" :min="1" @change="changestorage"/>
+					<view class="numberchange">
+						<span>数量</span>
+						<uninumberbox :max="goods_storage" :value="shopnumber" :min="1" @change="changestorage" />
+					</view>
 				</view>
- 			</view>
- 		</view>
-		<View class="page-bottom">
-			<van-goods-action>
-			<!--  <van-goods-action-icon @click="goIndex" icon="bag-o" /> -->
-			<van-goods-action-icon @click="goIndex">
-			  <template slot="icon" style="width: 40upx;height: 40upx;">
-				  <image  style="width: 100%;height: 100%;" src='/static/bottombtn0101.png'>
-				  </image>
-			  </template>
-			</van-goods-action-icon>
-			  <van-goods-action-icon icon="cart-o" @click="openCar" :info="cartnumber" />
-			  <van-goods-action-icon icon="star-o" v-if="has_collected == 0"  @click="toFavorite"/>
-			   <van-goods-action-icon icon="star" v-if="has_collected == 1"   icon-class="colored"   @click="toFavorite"/>
-			  <van-goods-action-button  @click="addCar"   text="加入购物车" type="warning" />
-			  <van-goods-action-button text="立即购买"  @click="buynow"   />
-			</van-goods-action>
-		</View>
-		<Gobacktop @getop="getop" :bottomtop="2" v-if="isTop" />
-		 <unipopup :images="images"  :show="ishow"/>
+			</view>
+			
+			<View class="page-bottom">
+				<van-goods-action>
+					<van-goods-action-icon @click="goIndex">
+						<template slot="icon" style="width: 40upx;height: 40upx;">
+							<image style="width: 100%;height: 100%;" src="/static/bottombtn0101.png"></image>
+						</template>
+					</van-goods-action-icon>
+					<van-goods-action-icon icon="cart-o" @click="openCar" :info="cartnumber" />
+					<van-goods-action-icon icon="star-o" v-if="has_collected == 0" @click="toFavorite" />
+					<van-goods-action-icon icon="star" v-if="has_collected == 1" icon-class="colored" @click="toFavorite" />
+					<van-goods-action-button color="#fff" class="font-text" @click="dianAddCar()" text="加入购物车"/>
+					<van-goods-action-button color="#E72028" text="立即购买" @click="dianBuynow()"/>
+				</van-goods-action>
+			</View>
+			<Gobacktop @getop="getop" :bottomtop="2" v-if="isTop" />
+			<unipopup :images="images" :show="ishow" />
 		</van-skeleton>
-		<view class="home" v-if="isfx" @click="openHome()">
-			<image src="../../static/bottombtn0101.png"></image>
-		</view>
- 	</view>
- </template>
- 
- <script>
-	 import {
-	 	mapMutations,mapState
-	 } from 'vuex'
-	// import logionDialog from '@/component/loginDialog.vue'
-	import Gobacktop from '@/component/Gobacktop.vue'
-	import uninumberbox  from '@/component/uinNumber.vue' 
-	import assess from '@/component/assess.vue'  // 评价列表
- 	import uniIcon from '@/component/uni-icon/uni-icon.vue'
-	import unipopup from '@/component/openpictrue.vue'
- 	export default{
- 		components: {
- 			uniIcon,
-			assess,
-			uninumberbox,
-			Gobacktop,
-			unipopup
- 		},
- 		data() {
- 			return {
-				ishow: false,
-				images: '',
-				loading: true,
-				firstloading: 0,
-				isTop: false,
-				chosename: [],
-				arrayId:[],
-				bottomtop: '55upx',
-				scopemapId: 0,
-				showdialog: false,
-				has_collected: false, // 是否收藏
-				cartnumber: 0, // 购物车数量
-				changnumber: 100,
-				ismax: false, // 输入狂禁止数量
-				goods_storage: '', // 规格商品参数
-				nuberImg:'',
-				firstImg:'',
-				shopnumber: 1,
-				pictureUrl: this.pictureUrl,
-				datalist: {},
-				store_id: 0, // 酒店id
-				goodId: 0, // 商品公共id
-				goods_id: 0, // 商品规格id
-				windowHeight: 0, // 窗口高度
-				iScrolltop: 1,
-				active: 0,
-				scrollTop: 0,
-				old: {
-					scrollTop: 0
-				},
- 				specClass: 'none',
- 				specSelected:[],
- 				totalprice:0,
-				firstprice: 0,
- 				favorite: true,
- 				shareList: [],
- 				imgList: [],
- 				desc:'',
- 				specList: [],
-				onlystoreId: 0 ,// 总酒店id
-				isfx:false,
- 			};
- 		},
-		onLaunch: function(){
-			this.active = 1;
+		<view class="home" v-if="isfx" @click="openHome()"><image src="../../static/bottombtn0101.png"></image></view>
+	</view>
+</template>
+
+<script>
+import { mapMutations, mapState } from 'vuex';
+// import logionDialog from '@/component/loginDialog.vue'
+import Gobacktop from '@/component/Gobacktop.vue';
+import uninumberbox from '@/component/uinNumber.vue';
+import assess from '@/component/assess.vue'; // 评价列表
+import uniIcon from '@/component/uni-icon/uni-icon.vue';
+import unipopup from '@/component/openpictrue.vue';
+export default {
+	components: {
+		uniIcon,
+		assess,
+		uninumberbox,
+		Gobacktop,
+		unipopup
+	},
+	data() {
+		return {
+			ishow: false,
+			images: '',
+			loading: true,
+			firstloading: 0,
+			isTop: false,
+			chosename: [],
+			arrayId: [],
+			bottomtop: '55upx',
+			scopemapId: 0,
+			showdialog: false,
+			has_collected: false, // 是否收藏
+			cartnumber: 0, // 购物车数量
+			changnumber: 100,
+			ismax: false, // 输入狂禁止数量
+			goods_storage: '', // 规格商品参数
+			nuberImg: '',
+			firstImg: '',
+			shopnumber: 1,
+			pictureUrl: this.pictureUrl,
+			datalist: {},
+			store_id: 0, // 酒店id
+			goodId: 0, // 商品公共id
+			goods_id: 0, // 商品规格id
+			windowHeight: 0, // 窗口高度
+			iScrolltop: 1,
+			active: 0,
+			scrollTop: 0,
+			old: {
+				scrollTop: 0
+			},
+			specClass: 'none',
+			specSelected: [],
+			totalprice: 0,
+			firstprice: 0,
+			favorite: true,
+			shareList: [],
+			imgList: [],
+			desc: '',
+			specList: [],
+			onlystoreId: 0, // 总酒店id
+			isfx: false
+		};
+	},
+	onLaunch: function() {
+		this.active = 1;
+	},
+	computed: {
+		...mapState(['hasLogin', 'userInfo', 'successlogion'])
+	},
+	onShow: function() {
+		let _this = this;
+		this.getshopdetail(); // 获取商品详情
+		// this.getNum();
+		uni.getSystemInfo({
+			success: function(res) {
+				_this.windowHeight = res.screenHeight;
+				// console.log("屏幕宽度:"+res.screenWidth);
+				// console.log("屏幕高度:"+res.screenHeight);
+				// console.log("可使用窗口宽度:"+res.windowWidth);
+				// console.log("可使用窗口高度:"+res.windowHeight);
+			}
+		});
+	},
+	async onLoad(options) {
+		if (options.isfx) {
+			this.isfx = true;
+		} else {
+			this.isfx = false;
+		}
+		this.goodId = options.id; // 商品公共id
+		this.store_id = options.store_id; // 酒店id
+		this.onlystoreId = options.goodId;
+		// this.getshopdetail(); // 获取商品详情
+		uni.$on('changshow', e => {
+			this.changeshow();
+		});
+	},
+	onShareAppMessage(res) {
+		uni.showShareMenu({
+			withShareTicket: true
+		});
+		let that = this;
+		let id = this.goodId; // 商品Id
+		let store_id = this.store_id;
+		if (res.from === 'button') {
+			// 来自页面内分享按钮
+		}
+		return {
+			title: that.datalist.goods_name,
+			path: `/pages/index/shop?id=${id}&store_id=${store_id}`,
+			imageUrl: that.nuberImg
+		};
+	},
+	onReady: function() {},
+	methods: {
+		openHome() {
+			uni.switchTab({
+				url: `/pages/index/index`
+			});
 		},
-		computed:{
-			...mapState([
-			  'hasLogin',
-			  'userInfo',
-			  'successlogion'
-			]),
+		shoupicture(item) {
+			this.images = this.pictureUrl + '/uploads/home/store/goods/' + item.goodsimage_url.substr(0, item.goodsimage_url.indexOf('\_')) + '/' + item.goodsimage_url;
+			this.ishow = true;
 		},
-		onShow: function() {
-			let _this = this;
-			uni.getSystemInfo({
-				success: function (res) {
-					_this.windowHeight = res.screenHeight;
-					// console.log("屏幕宽度:"+res.screenWidth);
-					// console.log("屏幕高度:"+res.screenHeight);
-					// console.log("可使用窗口宽度:"+res.windowWidth);
-					// console.log("可使用窗口高度:"+res.windowHeight);
-				}
+		changeshow() {
+			this.ishow = false;
+		},
+		getop() {
+			this.scrollTop = this.old.scrollTop;
+			this.$nextTick(function() {
+				this.scrollTop = 0;
 			});
+			this.isTop = false;
 		},
- 		async onLoad(options){
-			if(options.isfx){
-				this.isfx=true;
-			}else{
-				this.isfx=false;
+
+		// 跳转到首页
+		goIndex() {
+			let id = this.store_id;
+			uni.redirectTo({
+				url: `/pages/index/hotel?id=${id}`
+			});
+		},
+		// 更改商品数量
+		changestorage(e) {
+			if (e == this.goods_storage) {
+				this.$msg('您选择的数量已超过最大库存数');
+				return;
 			}
- 			this.goodId = options.id;  // 商品公共id
-			this.store_id =  options.store_id; // 酒店id
-			this.onlystoreId = options.goodId;
-			this.getshopdetail(); // 获取商品详情
-			uni.$on('changshow', (e) => {
-				this.changeshow();			
-			})
- 			//规格 默认选中第一条
- 			// this.datalist.spec_list[0].value_list.forEach(item=>{
- 			// 	for(let cItem of this.specChildList){
- 			// 		if(cItem.pid === item.id){
- 			// 			this.$set(cItem, 'selected', true);
- 			// 			this.specSelected.push(cItem);
- 			// 			break; //forEach不能使用break
- 			// 		}
- 			// 	}
- 			// })
- 			//this.shareList = await this.$api.json('shareList');
- 		},
-		onShareAppMessage(res) {
-			uni.showShareMenu({
-			     withShareTicket: true  
-			});  
-			let that = this;
-			let id = this.goodId;  // 商品Id
+			this.shopnumber = e;
+			let firstprice = this.firstprice;
+			this.totalprice = firstprice * this.shopnumber;
+		},
+		// 获取商品详情
+		getshopdetail() {
+			let params = {};
+			params.goods_commonid = this.goodId;
+			params.store_id = this.store_id;
+			this.request({
+				url: '/v2/goods/detail',
+				method: 'POST',
+				data: params,
+				success: res => {
+					console.log(res.data);
+					let { data } = res.data;
+					this.cartnumber = data.cart;
+					// this.getNum();
+					this.has_collected = data.has_collected;
+					let array = data;
+					array.images.forEach(item => {
+						this.firstImg =this.pictureUrl + '/uploads/home/store/goods/' + item.goodsimage_url.substr(0, item.goodsimage_url.indexOf('\_')) + '/' + item.goodsimage_url;
+					});
+					if (array.spec_list.length == 0) {
+						this.datalist = data;
+						this.goods_id = data.goods_list[0].goods_id;
+						this.goods_storage = data.goods_storage;
+					} else {
+						array.spec_list[0].value_list.forEach((item, idx) => {
+							item.goods_storage = data.goods_list[idx].goods_storage;
+						});
+						this.datalist = array;
+					}
+					const regex1 = new RegExp('stlye="" ', 'gi');
+					this.datalist.goods_body = this.datalist.goods_body.replace(/\(<img\)/gi, '');
+					const regex = new RegExp('<img', 'gi');
+					this.datalist.goods_body = this.datalist.goods_body.replace(regex, `<img class="changeimg"`);
+					if (this.firstloading == 0) {
+						this.loading = false;
+					}
+					this.firstloading = 1;
+				}
+			});
+		},
+		shopDetail() {
+			let goodId = this.goodId; // 商品Id
 			let store_id = this.store_id;
-			if (res.from === 'button') {
-		      // 来自页面内分享按钮
-				
-			}
-			return {
-				title: that.datalist.goods_name,
-				path: `/pages/index/shop?id=${id}&store_id=${store_id}`,
-				imageUrl:that.nuberImg
-			}
+			uni.navigateTo({
+				url: `/pages/index/commemt?goodId=${goodId}&store_id=${store_id}`
+			});
 		},
-		onReady: function()  {
-			
+		onChange(event) {
+			this.active = event.detail.name;
 		},
- 		methods:{
-			openHome(){
-				uni.switchTab({
-					url: `/pages/index/index`
-				})
-			},
-			shoupicture(item) {
-				this.images =this.pictureUrl+'/uploads/home/store/goods/'+item.goodsimage_url.substr(0, item.goodsimage_url.indexOf('\_')) + '/' + item.goodsimage_url;
-				this.ishow = true;
-				console.log(this.ishow)
-			},
-			changeshow() {
-				this.ishow = false;
-			},
-			getop() {
-			        this.scrollTop = this.old.scrollTop
-			                this.$nextTick(function(){
-			                    this.scrollTop=0;
-			                });
-			        this.isTop = false;
-			      },
-					
-			// 跳转到首页
-			goIndex() {
-				let id = this.store_id;
-				uni.redirectTo({
-				  url: `/pages/index/hotel?id=${id}`
-				})
-				// uni.switchTab({
-				// 	url:'./index'
-				// })
-				// uni.navigateBack();
-			},
-			// 更改商品数量
-			changestorage(e) {
-				if(e == this.goods_storage) {
-					this.$msg("您选择的数量已超过最大库存数");
+		//规格弹窗开关
+		toggleSpec() {
+			if (this.hasLogin && this.successlogion) {
+				if (this.datalist.store_id != this.store_id || this.datalist.goods_state != 1 || this.datalist.goods_storage < 1) {
+					this.$msg('商品已售罄');
 					return;
 				}
-				this.shopnumber = e;
-				let firstprice = this.firstprice;
-				this.totalprice = firstprice*this.shopnumber;
-			},
-			// 获取商品详情
-			getshopdetail() {
-			
-				let params = {};
-				params.goods_commonid =this.goodId;
-				params.store_id = this.store_id;
-				this.request({
-					url:'/v2/goods/detail',
-					method:'POST',
-					data: params,
-					success: (res)=> {
-						let { data } = res.data;
-						this.cartnumber = data.cart;
-						this.has_collected = data.has_collected;
-						let array = data;
-						array.images.forEach(item => {
-							this.firstImg = this.pictureUrl+'/uploads/home/store/goods/'+item.goodsimage_url.substr(0, item.goodsimage_url.indexOf('\_')) + '/' + item.goodsimage_url
-						})
-						if(array.spec_list.length == 0) {
-							this.datalist = data;
-							this.goods_id = data.goods_list[0].goods_id;
-							this.goods_storage = data.goods_storage;
-							//this.specSelected = data.goods_list;
-						}else {
-							array.spec_list[0].value_list.forEach( (item,idx) => {
-								item.goods_storage = data.goods_list[idx].goods_storage;
-							})
-							this.datalist = array;
-						}  
-						    const regex1 = new RegExp('stlye="" ', 'gi');
-							this.datalist.goods_body = this.datalist.goods_body.replace(/\(<img\)/ig, '');
-							const regex = new RegExp('<img', 'gi');
-							this.datalist.goods_body = this.datalist.goods_body.replace(regex, 
-							`<img class="changeimg"`);
-							if(this.firstloading == 0) {
-								this.loading = false;
-							}
-							this.firstloading = 1;
-					}
-				})
-			},
-			shopDetail() {
-				//  url: `/pages/index/shop?id=${id}&store_id=${store_id}`
-				let goodId = this.goodId;  // 商品Id
-				let store_id = this.store_id;
-				uni.navigateTo({
-				                   url: `/pages/index/commemt?goodId=${goodId}&store_id=${store_id}`
-				               }); 
-			},
-			onChange(event) {
-				this.active = event.detail.name;
-				console.log(this.active)
-			},
- 			//规格弹窗开关
- 			toggleSpec() {
 				this.specClass = 'show';
-				//this.specSelected = []; 
- 				// if(this.specClass === 'show'){
- 				// 	this.specClass = 'hide';
- 				// 	setTimeout(() => {
- 				// 		this.specClass = 'none';
- 				// 	}, 250);
- 				// }else if(this.specClass === 'none'){
- 				// 	this.specClass = 'show';
- 				// }
- 			},
-			 
-			 // 关闭弹窗
-			 // cancelDiaolog() {
-			 // 	this.showdialog = false;
-			 // },
-			 // // 确定
-			 // confirmDiaolog() {
-			 // 	this.showdialog = false;
-			 // 	uni.navigateTo({
-			 // 	   url: '../myCenter/information'  // 我的收藏
-			 // 	})
-			 // },
-			
-			openCar() {
-				if(this.hasLogin && this.successlogion) { 
-					let store_id = this.store_id;
-					uni.navigateTo({
-						url:`/pages/index/cart?store_id=${store_id}`
-					})
-				}else {
-					//this.showdialog = true;
-					uni.navigateTo({
-						url:'/pages/myCenter/logion'
-					})
-				}
-			},
-			// 立即购买
-			buynow() {
-				if(this.hasLogin  && this.successlogion) {
-					if(this.datalist.store_id != this.store_id || this.datalist.goods_state != 1 || this.datalist.goods_storage < 1) {
-						this.$msg("商品已下架");
-						return;
-					}
-					if(this.specSelected.length == 0&&this.datalist.spec_list.length != 0 ) {
-						this.$msg("请选择规格数量");
-						this.specClass = 'show';
-						return;
-					}
-					if(this.specSelected.length == 0&&this.datalist.spec_list.length == 0) {
-						this.specClass = 'show';
-						this.specSelected = this.datalist.goods_list;
-						return;
-					}
-					 let goods = [];
-					     goods.push({});
-						 goods[0].goods_id = this.goods_id;
-						 goods[0].buy_num = this.shopnumber;
-					 this.request({
-						 url:'/v1/order/save_og',
-						 method: 'post',
-						 data: {
-							 store_id: this.store_id,
-							 goods: JSON.stringify(goods)
-						 },
-						 success:(res) => {
-							 let store = this.store_id;
-							 let order_id = res.data.data.order_id;
-							 this.specClass = 'none';
-							 this.specSelected = [];
-							 this.chosename = [];
-							 uni.navigateTo({
-							   url: `/pages/index/sureBuy?store=${store}&order_id=${order_id}`
-							 });
-							 
-						 }
-					 })
-				}else {
-					uni.navigateTo({
-						url:'/pages/myCenter/logion'
-					})
-				}
-			},
-			// 加入购物车
-			addCar() {
-				if(this.hasLogin && this.successlogion) {
-					if(this.datalist.store_id != this.store_id  || this.datalist.goods_state != 1 || this.datalist.goods_storage < 1) {
-						this.$msg("商品已下架");
-						return;
-					}
-					if(this.specSelected.length == 0&&this.datalist.spec_list.length == 0) {
-						this.specClass = 'show';
-						this.specSelected = this.datalist.goods_list;
-						return;
-					}
-					// if(this.chosename.length == 0&&this.datalist.spec_list.length != 0) {
-					// 	this.specClass = 'show';
-					// 	return;
-					// }
-						if(this.specSelected.length == 0&&this.datalist.spec_list.length != 0 ) {
-							this.specClass = 'show';
-							this.$msg("请选择规格数量");
-							return;
-						}else {
-							this.request({
-								url:'/v2/order/add_cart',
-								method:'POST',
-								data: {
-									goods_id: this.goods_id,
-									goods_num: this.shopnumber
-								},
-								success: () => {
-									this.specSelected = [];
-									this.chosename = [];
-									this.$msg("商品添加成功");
-									this.specClass = 'none';
-									this.getshopdetail();
-								}
-							})
-						}
-				}else {
-					uni.navigateTo({
-						url:'/pages/myCenter/logion'
-					})
+			} else {
+				uni.navigateTo({
+					url: '/pages/myCenter/logion'
+				});
+			}	
+		},
+		getNum() {
+			this.request({
+				url: '/v2/order/cart',
+				method: 'post',
+				data: {
+					store_id: this.store_id,
+					page: 1
+				},
+				success: res => {
+					let { data } = res.data;
+					var sum = 0;
+					data.cart_list.forEach(item => {
+						sum = sum + item.goods_num;
+					});
+					this.cartnumber = sum;
 				}
-			},
-			
-			closeCar() {
-				this.specClass = 'none';
-			},
- 			//选择规格
- 			selectSpec(index, pid,chose,first,goods_storage){
-				// if(goods_storage == 0) {
-				// 	this.$msg("商品没库存啦");
+			});
+		},
+		openCar() {
+			if (this.hasLogin && this.successlogion) {
+				let store_id = this.store_id;
+				uni.navigateTo({
+					url: `/pages/index/cart?store_id=${store_id}`
+				});
+			} else {
+				//this.showdialog = true;
+				uni.navigateTo({
+					url: '/pages/myCenter/logion'
+				});
+			}
+		},
+		// 立即购买
+		buynow() {
+				// if (this.specSelected.length == 0 && this.datalist.spec_list.length == 0) {
+				// 	this.specClass = 'show';
+				// 	this.specSelected = this.datalist.goods_list;
 				// 	return;
 				// }
-				let obj = {};
-				obj.spec_id = first.spec_id;
-				obj.value_name = chose.value_name;
-				if(this.datalist.spec_list.length == this.chosename.length) {
-				}else {
-					this.chosename.push(obj);
-				}
-				this.specSelected = []; 
- 				let list = this.datalist.spec_list[index].value_list;
- 				this.datalist.spec_list[index].value_list.forEach(item=>{
- 					if(item.value_id === pid){ 
- 						this.$set(item, 'selected', true);
- 					}else {
-						this.$set(item, 'selected', false);
-					}
- 				})
-				this.chosename.forEach(items => {
-					if(items.spec_id == first.spec_id) {
-						items.value_name = chose.value_name
-					};
-				
-				})
-				
-				let array = [];	
-			    for(let i = 0; i < this.datalist.spec_list.length; i++) {
-					for(let j = 0; j<this.datalist.spec_list[i].value_list.length;j++) {
-						if(this.datalist.spec_list[i].value_list[j].selected) {
-							array.push(this.datalist.spec_list[i].value_list[j].value_id);
+				if (this.specSelected.length == 0 && this.datalist.spec_list.length != 0) {
+					this.$msg('请选择规格数量');
+				}else{
+					let goods = [];
+					goods.push({});
+					goods[0].goods_id = this.goods_id;
+					goods[0].buy_num = this.shopnumber;
+					this.request({
+						url: '/v1/order/save_og',
+						method: 'post',
+						data: {
+							store_id: this.store_id,
+							goods: JSON.stringify(goods)
+						},
+						success: res => {
+							let store = this.store_id;
+							let order_id = res.data.data.order_id;
+							this.specClass = 'none';
+							// this.specSelected = [];
+							this.chosename = [];
+							uni.navigateTo({
+								url: `/pages/index/sureBuy?store=${store}&order_id=${order_id}`
+							});
 						}
-					}
+					});
 				}
-				this.arrayId = array;
-				// if(this.arrayId.length == this.datalist.spec_list.length) {
-				// 	let goodIds = this.datalist.spec_map[this.scopemapId];
-				// 	let itemsa = this.datalist.goods_list[goodIds]
-				// 	console.log(itemsa);
-				// 	// if(itemsa.goods_storage == 0) {
-				// 	// 	this.$msg("商品没库存啦");
-				// 	// 	return;
-				// 	// }
+		},
+		dianBuynow(){
+			if(this.specClass=='show'){
+				this.buynow();
+			}else{
+				this.toggleSpec();
+			}
+		},
+		dianAddCar(){
+			if(this.specClass=='show'){
+				this.addCar();
+			}else{
+				this.toggleSpec();
+			}
+		},
+		// 加入购物车
+		addCar() {
+				// if (this.specSelected.length == 0 && this.datalist.spec_list.length == 0) {
+				// 	this.specSelected = this.datalist.goods_list;
 				// 	return;
 				// }
-				
-				if(this.arrayId.length == this.datalist.spec_list.length) {
-					this.scopemapId = array.join("_");
-					let goodId = this.datalist.spec_map[this.scopemapId]; //
-					let items = this.datalist.goods_list[goodId]
-					if(items.goods_storage == 0) {
-						this.$msg("商品没库存啦");
-						this.datalist.spec_list[index].value_list.forEach(item=>{
-							if(item.value_id === pid){ 
-								this.$set(item, 'selected', false);
-								// this.$set(item, 'disabled', true);
-							}else {
-								// this.$set(item, 'disabled', false);
-							}
-						})
-						return;
+			if (this.specSelected.length == 0 && this.datalist.spec_list.length != 0) {
+				this.$msg('请选择商品规格');
+			} else {
+				this.request({
+					url: '/v2/order/add_cart',
+					method: 'POST',
+					data: {
+						goods_id: this.goods_id,
+						goods_num: this.shopnumber
+					},
+					success: () => {
+						this.$msg('商品添加成功');
+						this.totalprice=0;//金额清空
+						this.specSelected = [];//选择的规格清空
+						this.chosename = [];//选择的规格样式清空
+						this.shopnumber = 1;//选择的数量清空
+						this.getshopdetail();
+						this.closeCar();
 					}
+				});
+			}
+		},
+		
+		closeCar() {
+			this.specClass = 'none';
+		},
+		//选择规格
+		selectSpec(index, pid, chose, first, goods_storage) {
+			let obj = {};
+
+			obj.spec_id = first.spec_id;
+
+			obj.value_name = chose.value_name;
+
+			if (this.datalist.spec_list.length != this.chosename.length) {
+				this.chosename.push(obj);
+			}
+
+			this.specSelected = [];
+
+			let list = this.datalist.spec_list[index].value_list;
+			//设置选中状态
+			this.datalist.spec_list[index].value_list.forEach(item => {
+				if (item.value_id === pid) {
+					this.$set(item, 'selected', true);
+				} else {
+					this.$set(item, 'selected', false);
+				}
+			});
+			//设置名字
+			this.chosename.forEach(items => {
+				if (items.spec_id == first.spec_id) {
 					items.value_name = chose.value_name;
-					this.nuberImg = items.spec_img;
-					this.specSelected.push(items)
-					this.goods_storage = items.goods_storage;
-					this.goods_id = items.goods_id;
-					this.firstprice = items.goods_price;
-					this.totalprice = items.goods_price*this.shopnumber;
 				}
-			   
-				// if(this.arrayId.length == this.datalist.spec_list.length) {
-					
-				// }
-			
-				// let obj = {};
-				// obj.firstId = index;
-				// obj.pid = pid;
-				// this.arrayId.push(obj);
-				// console.log(this.arrayId)
-				// let arr = this.arrayId;
-				// 		   for(var i=0; i<arr.length; i++){
-				// 		             for(var j=i+1; j<arr.length; j++){
-				// 		                 if(arr[i].firstId==arr[j].firstId){
-				// 								 arr.splice(j,1);
-				// 								 j--;
-				// 		                 }
-				// 		             }
-				// 		         }
-				// let newarray = []
-				// arr.forEach(item => {
-				// 	newarray.push(item.pid);
-				// })
-				// this.arrayId = arr;
-				// if(this.arrayId.length == 0) {
-				// 	this.scopemapId = newarray.toString(); ;
-				// }else {
-				// 	this.scopemapId = newarray.join("_");
-				// }
-				// console.log(this.scopemapId);
-				//this.datalist.spec_list[index].value_list = list;
-				
- 				
- 			}, 					 					
- 			// 滚动到顶部
- 			upper(e) {
- 				
- 			},
- 			
- 			// 滚到底部
- 			lower(e) {
- 				console.log("底部")
- 			},
- 			// 滚动时触发
- 			scroll(e) {
- 				this.old.scrollTop = e.detail.scrollTop
- 				if(e.detail.scrollTop > this.windowHeight) {
- 					this.iScrolltop = 2;
- 				}else {
- 					this.iScrolltop = 1;
- 				}
-				if(e.detail.scrollTop > 400) {
-				  this.isTop = true;
-				}else{ //当距离小于500时显示回到顶部按钮
-				  this.isTop = false;
+			});
+			let array = [];
+			for (let i = 0; i < this.datalist.spec_list.length; i++) {
+				for (let j = 0; j < this.datalist.spec_list[i].value_list.length; j++) {
+					if (this.datalist.spec_list[i].value_list[j].selected) {
+						array.push(this.datalist.spec_list[i].value_list[j].value_id);
+					}
 				}
+			}
+			this.arrayId = array;
 
- 			},
- 			
- 			//收藏
- 			toFavorite(){
-				if(this.hasLogin && this.successlogion) {
-					if(this.datalist.store_id != this.store_id  || this.datalist.goods_state != 1 || this.datalist.goods_storage < 1) {
-						this.$msg("商品已下架");
-						return;
-					}
-					this.request({
-						url: '/v1/favorites/collect',
-						method: 'post',
-						data: {
-							type:'goods',
-							fav_id: this.goodId
-						},
-						success: (res) => {
-							if(res.data.data.action == 'add') {
-								this.$msg("收藏成功")
-							}else {
-								this.$msg("取消收藏")
-							}
-							this.getshopdetail()
+			if (this.arrayId.length == this.datalist.spec_list.length) {
+				this.scopemapId = array.join('_');
+				let goodId = this.datalist.spec_map[this.scopemapId]; //
+				let items = this.datalist.goods_list[goodId];
+				if (items.goods_storage == 0) {
+					this.$msg('商品没库存啦');
+					this.datalist.spec_list[index].value_list.forEach(item => {
+						if (item.value_id === pid) {
+							this.$set(item, 'selected', false);
 						}
-					})
-				}else {
-					uni.navigateTo({
-						url:'/pages/myCenter/logion'
-					})
+					});
+					return;
+				}
+
+				items.value_name = chose.value_name;
+				this.nuberImg = items.spec_img;
+				this.specSelected.push(items);
+				this.goods_storage = items.goods_storage;
+				this.goods_id = items.goods_id;
+				this.firstprice = items.goods_price;
+				this.totalprice = items.goods_price * this.shopnumber;
+			}
+		},
+		// 滚动时触发
+		scroll(e) {
+			this.old.scrollTop = e.detail.scrollTop;
+			if (e.detail.scrollTop > this.windowHeight) {
+				this.iScrolltop = 2;
+			} else {
+				this.iScrolltop = 1;
+			}
+			if (e.detail.scrollTop > 400) {
+				this.isTop = true;
+			} else {
+				//当距离小于500时显示回到顶部按钮
+				this.isTop = false;
+			}
+		},
+
+		//收藏
+		toFavorite() {
+			if (this.hasLogin && this.successlogion) {
+				if (this.datalist.store_id != this.store_id || this.datalist.goods_state != 1 || this.datalist.goods_storage < 1) {
+					this.$msg('商品已售罄');
+					return;
 				}
- 				//this.favorite = !this.favorite;
- 			},
- 			buy(){
- 				uni.navigateTo({
- 					url: './sureBuy'
- 				})
- 			},
- 			stopPrevent(){}
- 		},
- 
- 	}
- </script>
- 
- <style lang='scss'>
- 	page{
- 		/* background: $page-color-base; */
- 		/* padding-bottom: 160upx; */
+				this.request({
+					url: '/v1/favorites/collect',
+					method: 'post',
+					data: {
+						type: 'goods',
+						fav_id: this.goodId
+					},
+					success: res => {
+						if (res.data.data.action == 'add') {
+							this.$msg('收藏成功');
+						} else {
+							this.$msg('取消收藏');
+						}
+						this.getshopdetail();
+					}
+				});
+			} else {
+				uni.navigateTo({
+					url: '/pages/myCenter/logion'
+				});
+			}
+		},
+		buy() {
+			uni.navigateTo({
+				url: './sureBuy'
+			});
+		},
+		stopPrevent(){}
+	}
+};
+</script>
+<style>
+	.font-text .van-button__text{
+		color: #222 !important;
+	}
+</style>
+<style lang="scss">
+page {
+	/* background: $page-color-base; */
+	/* padding-bottom: 160upx; */
+	position: relative;
+}
+.home {
+	position: absolute;
+	width: 60upx;
+	height: 60upx;
+	background-color: #fff;
+	border-radius: 50%;
+	box-shadow: 0 0 3upx #333333;
+	text-align: center;
+	top: 100upx;
+	z-index: 999;
+	left: 0;
+}
+.home image {
+	width: 40upx;
+	height: 40upx;
+	padding-top: 8rpx;
+}
+.icon-you {
+	font-size: 28upx + 2upx;
+	color: #888;
+}
+.carousel {
+	height: 722upx;
+	position: relative;
+	swiper {
+		height: 100%;
+	}
+	.image-wrapper {
+		width: 100%;
+		height: 100%;
+	}
+	.swiper-item {
+		display: flex;
+		justify-content: center;
+		align-content: center;
+		height: 750upx;
+		overflow: hidden;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
+
+.titleLayout {
+	display: flex;
+	justify-content: space-between;
+	padding-bottom: 20upx;
+}
+/* 标题简介 */
+.introduce-section {
+	background: #fff;
+	padding: 20upx 30upx;
+
+	.title {
+		font-size: 36upx;
+		color: #303133;
+		height: 50upx;
+		line-height: 50upx;
+		width: 70%;
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
+	}
+
+	.titleRight {
+		border-left: 1px solid #f5f5f5;
+		padding-left: 32upx;
+	}
+	.price-box {
+		display: flex;
+		align-items: baseline;
+		height: 64upx;
+		padding: 10upx 0;
+		font-size: 26upx;
+		color: #fa436a;
+	}
+	.price {
+		font-size: $font-lg + 2upx;
+	}
+	.m-price {
+		margin: 0 12upx;
+		color: #909399;
+		text-decoration: line-through;
+	}
+	.coupon-tip {
+		align-items: center;
+		padding: 4upx 10upx;
+		background: #fa436a;
+		font-size: 24upx;
+		color: #fff;
+		border-radius: 6upx;
+		line-height: 1;
+		transform: translateY(-4upx);
+	}
+	.bot-row {
+		display: flex;
+		align-items: center;
+		height: 50upx;
+		font-size: 24upx;
+		color: #909399;
+		text {
+			flex: 1;
+		}
+	}
+}
+/* 分享 */
+.share-section {
+	display: flex;
+	align-items: center;
+	color: #606266;
+	background: linear-gradient(left, #fdf5f6, #fbebf6);
+	padding: 12upx 30upx;
+	.share-icon {
+		display: flex;
+		align-items: center;
+		width: 70upx;
+		height: 30upx;
+		line-height: 1;
+		border: 1px solid #fa436a;
+		border-radius: 4upx;
 		position: relative;
- 	}
-	.home{
-		position: absolute;
-		width: 60upx;
-		height: 60upx;
-		background-color: #fff;
-		border-radius: 50%;
-		box-shadow: 0 0 3upx #333333;
-		text-align: center;
-		top: 100upx;
-		z-index: 999;
-		left: 0;
+		overflow: hidden;
+		font-size: 22upx;
+		color: #fa436a;
+		&:after {
+			content: '';
+			width: 50upx;
+			height: 50upx;
+			border-radius: 50%;
+			left: -20upx;
+			top: -12upx;
+			position: absolute;
+			background: #fa436a;
+		}
+	}
+	.icon-xingxing {
+		position: relative;
+		z-index: 1;
+		font-size: 24upx;
+		margin-left: 2upx;
+		margin-right: 10upx;
+		color: #fff;
+		line-height: 1;
+	}
+	.tit {
+		font-size: 28upx;
+		margin-left: 10upx;
+	}
+	.icon-bangzhu1 {
+		padding: 10upx;
+		font-size: 30upx;
+		line-height: 1;
+	}
+	.share-btn {
+		flex: 1;
+		text-align: right;
+		font-size: 24upx;
+		color: #fa436a;
+	}
+	.icon-you {
+		font-size: 24upx;
+		margin-left: 4upx;
+		color: #fa436a;
+	}
+}
+
+.c-list {
+	font-size: 24upx + 2upx;
+	color: #606266;
+	background: #fff;
+	border-top: 20upx solid #f5f5f5;
+	border-bottom: 20upx solid #f5f5f5;
+	.c-row {
+		display: flex;
+		align-items: center;
+		padding: 20upx 30upx;
+		position: relative;
+	}
+	.tit {
+		width: 140upx;
 	}
-	.home image{
-		width: 40upx;
+	.con {
+		flex: 1;
+		color: #303133;
+		.selected-text {
+			margin-right: 10upx;
+		}
+	}
+	.bz-list {
 		height: 40upx;
-		padding-top: 8rpx;
+		font-size: 24upx+2upx;
+		color: #303133;
+		text {
+			display: inline-block;
+			margin-right: 30upx;
+		}
 	}
- 	.icon-you{
- 		font-size: 28upx + 2upx;
- 		color: #888;
- 	}
- 	.carousel {
- 		height: 722upx;
- 		position:relative;
- 		swiper{
- 			height: 100%;
- 		}
- 		.image-wrapper{
- 			width: 100%;
- 			height: 100%;
- 		}
- 		.swiper-item {
- 			display: flex;
- 			justify-content: center;
- 			align-content: center;
- 			height: 750upx;
- 			overflow: hidden;
- 			image {
- 				width: 100%;
- 				height: 100%;
- 			}
- 		}
- 		
- 	}
- 	
-	.titleLayout {
+	.con-list {
+		flex: 1;
 		display: flex;
-		justify-content: space-between;
-		padding-bottom: 20upx;
+		flex-direction: column;
+		color: #303133;
+		line-height: 40upx;
 	}
- 	/* 标题简介 */
- 	.introduce-section{
- 		background: #fff;
- 		padding: 20upx 30upx;
- 		
- 		.title{
- 			font-size: 36upx;
- 			color:  #303133;
- 			height: 50upx;
- 			line-height: 50upx;
-			width: 70%;
-			white-space:nowrap;
-			overflow:hidden;
-			text-overflow:ellipsis;
-			
- 		}
-			
-		.titleRight {
-			border-left: 1px solid #F5F5F5;
-			padding-left: 32upx;
+	.red {
+		color: #fa436a;
+	}
+}
+
+/* 评价 */
+.eva-section {
+	display: flex;
+	flex-direction: column;
+	padding: 20upx 30upx;
+	background: #fff;
+	/* margin-top: 16upx; */
+	.e-header {
+		display: flex;
+		align-items: center;
+		height: 70upx;
+		font-size: 24upx + 2upx;
+		color: #909399;
+		.tit {
+			font-size: 28upx + 2upx;
+			color: #303133;
+			margin-right: 4upx;
 		}
- 		.price-box{
- 			display:flex;
- 			align-items:baseline;
- 			height: 64upx;
- 			padding: 10upx 0;
- 			font-size: 26upx;
- 			color:#fa436a;
- 		}
- 		.price{
- 			font-size: $font-lg + 2upx;
- 		}
- 		.m-price{
- 			margin:0 12upx;
- 			color: #909399;
- 			text-decoration: line-through;
- 		}
- 		.coupon-tip{
- 			align-items: center;
- 			padding: 4upx 10upx;
- 			background: #fa436a;
- 			font-size: 24upx;
- 			color: #fff;
- 			border-radius: 6upx;
- 			line-height: 1;
- 			transform: translateY(-4upx); 
- 		}
- 		.bot-row{
- 			display:flex;
- 			align-items:center;
- 			height: 50upx;
- 			font-size: 24upx;
- 			color: #909399;
- 			text{
- 				flex: 1;
- 			}
- 		}
- 	}
- 	/* 分享 */
- 	.share-section{
- 		display:flex;
- 		align-items:center;
- 		color:  #606266;
- 		background: linear-gradient(left, #fdf5f6, #fbebf6);
- 		padding: 12upx 30upx;
- 		.share-icon{
- 			display:flex;
- 			align-items:center;
- 			width: 70upx;
- 			height: 30upx;
- 			line-height: 1;
- 			border: 1px solid #fa436a;
- 			border-radius: 4upx;
- 			position:relative;
- 			overflow: hidden;
- 			font-size: 22upx;
- 			color: #fa436a;
- 			&:after{
- 				content: '';
- 				width: 50upx;
- 				height: 50upx;
- 				border-radius: 50%;
- 				left: -20upx;
- 				top: -12upx;
- 				position:absolute;
- 				background: #fa436a;
- 			}
- 		}
- 		.icon-xingxing{
- 			position:relative;
- 			z-index: 1;
- 			font-size: 24upx;
- 			margin-left: 2upx;
- 			margin-right: 10upx;
- 			color: #fff;
- 			line-height: 1;
- 		}
- 		.tit{
- 			font-size: 28upx;
- 			margin-left:10upx;
- 		}
- 		.icon-bangzhu1{
- 			padding: 10upx;
- 			font-size: 30upx;
- 			line-height: 1;
- 		}
- 		.share-btn{
- 			flex: 1;
- 			text-align:right;
- 			font-size: 24upx;
- 			color: #fa436a;
- 		}
- 		.icon-you{
- 			font-size: 24upx;
- 			margin-left: 4upx;
- 			color: #fa436a;
- 		}
- 	}
- 	
- 	.c-list{
- 		font-size: 24upx + 2upx;
- 		color:  #606266;
- 		background: #fff;
-		border-top: 20upx solid #F5F5F5;
-		border-bottom: 20upx solid #F5F5F5;
- 		.c-row{
- 			display:flex;
- 			align-items:center;
- 			padding: 20upx 30upx;
- 			position:relative;
- 		}
- 		.tit{
- 			width: 140upx;
- 		}
- 		.con{
- 			flex: 1;
- 			color:  #303133;
- 			.selected-text{
- 				margin-right: 10upx;
- 			}
- 		}
- 		.bz-list{
- 			height: 40upx;
- 			font-size: 24upx+2upx;
- 			color:  #303133;
- 			text{
- 				display: inline-block;
- 				margin-right: 30upx;
- 			}
- 		}
- 		.con-list{
- 			flex: 1;
- 			display:flex;
- 			flex-direction: column;
- 			color:  #303133;
- 			line-height: 40upx;
- 		}
- 		.red{
- 			color: #fa436a;
- 		}
- 	}
- 	
- 	/* 评价 */
- 	.eva-section{
- 		display: flex;
- 		flex-direction: column;
- 		padding: 20upx 30upx;
- 		background: #fff;
- 		/* margin-top: 16upx; */
- 		.e-header{
- 			display: flex;
- 			align-items: center;
- 			height: 70upx;
- 			font-size: 24upx + 2upx;
- 			color: #909399;
- 			.tit{
- 				font-size: 28upx + 2upx;
- 				color:  #303133;
- 				margin-right: 4upx;
- 			}
- 			.tip{
- 				flex: 1;
- 				text-align: right;
- 			}
- 			.icon-you{
- 				margin-left: 10upx;
- 			}
- 		}
- 	}
- 	.eva-box{
- 		display: flex;
- 		padding: 20upx 0;
- 		.portrait{
- 			flex-shrink: 0;
- 			width: 80upx;
- 			height: 80upx;
- 			border-radius: 100px;
- 		}
- 		.right{
- 			flex: 1;
- 			display: flex;
- 			flex-direction: column;
- 			font-size: 28upx;
- 			color:  #606266;
- 			padding-left: 26upx;
- 			.con{
- 				font-size: 28upx;
- 				color:  #303133;
- 				padding: 20upx 0;
- 			}
- 			.bot{
- 				display: flex;
- 				justify-content: space-between;
- 				font-size: 24upx;
- 				color:#909399;
- 			}
- 		}
- 	}
- 	/*  详情 */
- 	.detail-desc{
- 		background: #fff;
- 		margin-top: 16upx;
-		margin-bottom: 135rpx;
-		width: 100%;
- 		.d-header{
- 			display: flex;
- 			justify-content: center;
- 			align-items: center;
- 			height: 80upx;
- 			font-size: 28upx + 2upx;
- 			color:  #303133;
- 			position: relative;
- 				
- 			text{
- 				padding: 0 20upx;
- 				background: #fff;
- 				position: relative;
- 				z-index: 1;
- 			}
- 			&:after{
- 				position: absolute;
- 				left: 50%;
- 				top: 50%;
- 				transform: translateX(-50%);
- 				width: 300upx;
- 				height: 0;
- 				content: '';
- 				border-bottom: 1px solid #ccc; 
- 			}
- 		}
- 	}
- 	
- 	/* 规格选择弹窗 */
- 	.attr-content{
- 		padding: 10upx 30upx;
- 		.a-t{
- 			display: flex;
- 			image{
- 				width: 170upx;
- 				height: 170upx;
- 				flex-shrink: 0;
- 				margin-top: -40upx;
- 				border-radius: 8upx;;
- 			}
- 			.right{
- 				display: flex;
- 				flex-direction: column;
- 				padding-left: 24upx;
- 				font-size: 24upx + 2upx;
- 				color:  #606266;
- 				line-height: 42upx;
-				justify-content: space-around;
- 				.price{
- 					font-size: $font-lg;
- 					color: #D9332E;
- 					margin-bottom: 10upx;
- 				}
- 				.selected-text{
- 					margin-right: 10upx;
- 				}
- 			}
- 		}
- 		.attr-list{
- 			display: flex;
- 			flex-direction: column;
- 			font-size: 28upx + 2upx;
- 			color:  #606266;
- 			padding-top: 30upx;
- 			padding-left: 10upx;
- 		}
- 		.item-list{
- 			padding: 20upx 0 0;
- 			display: flex;
- 			flex-wrap: wrap;
- 			text{
- 				display: flex;
- 				align-items: center;
- 				justify-content: center;
- 				background: #eee;
- 				margin-right: 20upx;
- 				margin-bottom: 20upx;
- 				border-radius: 100upx;
- 				min-width: 60upx;
- 				height: 60upx;
- 				padding: 0 20upx;
- 				font-size: 28upx;
- 				color:  #303133;
- 			}
- 			.selected{
- 				background: #fbebee;
- 				color: #D9332E;
- 			}
-				
-			.disabled {
-				color:#999;
-				background: rgba(245,245,245, 0.5);
-				
+		.tip {
+			flex: 1;
+			text-align: right;
+		}
+		.icon-you {
+			margin-left: 10upx;
+		}
+	}
+}
+.eva-box {
+	display: flex;
+	padding: 20upx 0;
+	.portrait {
+		flex-shrink: 0;
+		width: 80upx;
+		height: 80upx;
+		border-radius: 100px;
+	}
+	.right {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		font-size: 28upx;
+		color: #606266;
+		padding-left: 26upx;
+		.con {
+			font-size: 28upx;
+			color: #303133;
+			padding: 20upx 0;
+		}
+		.bot {
+			display: flex;
+			justify-content: space-between;
+			font-size: 24upx;
+			color: #909399;
+		}
+	}
+}
+/*  详情 */
+.detail-desc {
+	background: #fff;
+	margin-top: 16upx;
+	margin-bottom: 135rpx;
+	width: 100%;
+	.d-header {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 80upx;
+		font-size: 28upx + 2upx;
+		color: #303133;
+		position: relative;
+
+		text {
+			padding: 0 20upx;
+			background: #fff;
+			position: relative;
+			z-index: 1;
+		}
+		&:after {
+			position: absolute;
+			left: 50%;
+			top: 50%;
+			transform: translateX(-50%);
+			width: 300upx;
+			height: 0;
+			content: '';
+			border-bottom: 1px solid #ccc;
+		}
+	}
+}
+
+/* 规格选择弹窗 */
+.attr-content {
+	padding: 10upx 30upx;
+	.a-t {
+		display: flex;
+		image {
+			width: 170upx;
+			height: 170upx;
+			flex-shrink: 0;
+			margin-top: -40upx;
+			border-radius: 8upx;
+		}
+		.right {
+			display: flex;
+			flex-direction: column;
+			padding-left: 24upx;
+			font-size: 24upx + 2upx;
+			color: #606266;
+			line-height: 42upx;
+			justify-content: space-around;
+			.price {
+				font-size: $font-lg;
+				color: #d9332e;
+				margin-bottom: 10upx;
+			}
+			.selected-text {
+				margin-right: 10upx;
 			}
- 		}
- 	}
- 	
- 	/*  弹出层 */
- 	.popup {
- 		position: fixed;
- 		left: 0;
- 		top: 0;
- 		right: 0;
- 		bottom: 100upx;
- 		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: 90%;
- 			z-index: 1;
- 			background-color: rgba(0, 0, 0, 0.4);
- 		}
- 		.layer {
- 			position: fixed;
- 			z-index: 99;
- 			bottom: 100upx;
- 			width: 100%;
- 			border-radius: 10upx 10upx 0 0;
- 			background-color: #fff;
- 			.btn{
- 				height: 66upx;
- 				line-height: 66upx;
- 				border-radius: 100upx;
- 				background: #fa436a;
- 				font-size: 28upx + 2upx;
- 				color: #fff;
- 				margin: 30upx auto 20upx;
- 			}
- 		}
- 		@keyframes showPopup {
- 			0% {
- 				opacity: 0;
- 			}
- 			100% {
- 				opacity: 1;
- 			}
- 		}
- 		@keyframes hidePopup {
- 			0% {
- 				opacity: 1;
- 			}
- 			90% {
- 				opacity: 0;
- 			}
- 		}
- 		@keyframes showLayer {
- 			0% {
- 				transform: translateY(120%);
- 			}
- 			100% {
- 				transform: translateY(0%);
- 			}
- 		}
- 		@keyframes hideLayer {
- 			0% {
- 				transform: translateY(0);
- 			}
- 			100% {
- 				transform: translateY(120%);
- 			}
- 		}
- 	}
-	.colored {
-		color: red;
+		}
 	}
- 	.van-sticky {
-		/* z-index: 0!important; */
+	.attr-list {
+		display: flex;
+		flex-direction: column;
+		font-size: 28upx + 2upx;
+		color: #606266;
+		padding-top: 30upx;
+		padding-left: 10upx;
 	}
-	/* 详情固定 */
-	.activeColor {
-		/* background: #fff!important; */
+	.item-list {
+		padding: 20upx 0 0;
+		display: flex;
+		flex-wrap: wrap;
+		text {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			background: #fff;
+			margin-right: 20upx;
+			margin-bottom: 20upx;
+			border-radius: 5upx;
+			border:1px solid #f1f1f1;
+			min-width: 60upx;
+			height: 60upx;
+			padding: 0 20upx;
+			font-size: 28upx;
+			color: #303133;
+		}
+		.selected {
+			border:1px solid #d9251c;
+			color: #d9251c;
+		}
+
+		.disabled {
+			color: #999;
+			background: rgba(245, 245, 245, 0.5);
+		}
+	}
+}
+
+/*  弹出层 */
+.popup {
+	position: fixed;
+	left: 0;
+	top: 0;
+	right: 0;
+	bottom: 100upx;
+	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: 90%;
+		z-index: 1;
+		background-color: rgba(0, 0, 0, 0.4);
+	}
+	.layer {
 		position: fixed;
-		background-color: #fff;
-		top: 0upx;
 		z-index: 99;
-		margin-top: 0;
+		bottom: 100upx;
+		width: 100%;
+		border-radius: 10upx 10upx 0 0;
+		background-color: #fff;
+		.btn {
+			height: 66upx;
+			line-height: 66upx;
+			border-radius: 100upx;
+			background: #fa436a;
+			font-size: 28upx + 2upx;
+			color: #fff;
+			margin: 30upx auto 20upx;
+		}
 	}
-	.numberchange {
-		padding-top: 48px;
-		overflow: hidden;
-		clear: both;
-		padding-right: 59rpx;
-		padding-bottom: 50rpx;
+	@keyframes showPopup {
+		0% {
+			opacity: 0;
+		}
+		100% {
+			opacity: 1;
+		}
 	}
-	.uni-numbox {
-		float: right;
+	@keyframes hidePopup {
+		0% {
+			opacity: 1;
+		}
+		90% {
+			opacity: 0;
+		}
 	}
-	
- 	/* 底部操作菜单 */
- 	.page-bottom{
- 		position: fixed;
- 		left: 0;
- 		bottom: 0;
- 		display: flex;
- 		justify-content: center;
- 		align-items: center;
- 		width:  100vw;
- 		height: 80upx;
-		z-index: 99;
- 		background: rgba(255,255,255,.9);
- 		.p-b-btn{
- 			display:flex;
- 			flex-direction: column;
- 			align-items: center;
- 			justify-content: center;
- 			font-size: 24upx;
- 			color:  #606266;
- 			width: 96upx;
- 			height: 80upx;
- 			.yticon{
- 				font-size: 40upx;
- 				line-height: 48upx;
- 				color: #909399;
- 			}
- 			&.active, &.active .yticon{
- 				color: #fa436a;
- 			}
- 			.icon-fenxiang2{
- 				font-size: 42upx;
- 				transform: translateY(-2upx);
- 			}
- 			.icon-shoucang{
- 				font-size: 46upx;
- 			}
- 		}
- 		.action-btn-group{
- 			display: flex;
- 			height: 76upx;
- 			border-radius: 100px;
- 			overflow: hidden;
- 			box-shadow: 0 20upx 40upx -16upx #fa436a;
- 			box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
- 			background: linear-gradient(to right, #ffac30,#fa436a,#F56C6C);
- 			margin-left: 20upx;
- 			position:relative;
- 			&:after{
- 				content: '';
- 				position:absolute;
- 				top: 50%;
- 				right: 50%;
- 				transform: translateY(-50%);
- 				height: 28upx;
- 				width: 0;
- 				border-right: 1px solid rgba(255,255,255,.5);
- 			}
- 			.action-btn{
- 				display:flex;
- 				align-items: center;
- 				justify-content: center;
- 				width: 180upx;
- 				height: 100%;
- 				font-size: 28upx ;
- 				padding: 0;
- 				border-radius: 0;
- 				background: transparent;
- 			}
- 		}
- 	}
- 	.van-goods-action-button--last {
-		border-radius: none!important;
-		--button-border-radius: none!important;
+	@keyframes showLayer {
+		0% {
+			transform: translateY(120%);
+		}
+		100% {
+			transform: translateY(0%);
+		}
+	}
+	@keyframes hideLayer {
+		0% {
+			transform: translateY(0);
+		}
+		100% {
+			transform: translateY(120%);
+		}
 	}
-	.van-goods-action-button--first {
-		border-radius: none!important;
-		--button-border-radius: none!important;
+}
+.colored {
+	color: red;
+}
+.van-sticky {
+	/* z-index: 0!important; */
+}
+/* 详情固定 */
+.activeColor {
+	/* background: #fff!important; */
+	position: fixed;
+	background-color: #fff;
+	top: 0upx;
+	z-index: 99;
+	margin-top: 0;
+}
+.numberchange {
+	padding-top: 48px;
+	overflow: hidden;
+	clear: both;
+	padding-right: 59rpx;
+	padding-bottom: 50rpx;
+}
+.uni-numbox {
+	float: right;
+}
+
+/* 底部操作菜单 */
+.page-bottom {
+	position: fixed;
+	left: 0;
+	bottom: 0;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	width: 100vw;
+	height: 80upx;
+	z-index: 99;
+	background: rgba(255, 255, 255, 0.9);
+	.p-b-btn {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		font-size: 24upx;
+		color: #606266;
+		width: 96upx;
+		height: 80upx;
+		.yticon {
+			font-size: 40upx;
+			line-height: 48upx;
+			color: #909399;
+		}
+		&.active,
+		&.active .yticon {
+			color: #fa436a;
+		}
+		.icon-fenxiang2 {
+			font-size: 42upx;
+			transform: translateY(-2upx);
+		}
+		.icon-shoucang {
+			font-size: 46upx;
+		}
 	}
-	.changeimg {
-		width: 100%;
-		height: auto!important;
-		display: block;
-		text-align: center;
+	.action-btn-group {
+		display: flex;
+		height: 76upx;
+		border-radius: 100px;
+		overflow: hidden;
+		box-shadow: 0 20upx 40upx -16upx #fa436a;
+		box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+		background: linear-gradient(to right, #ffac30, #fa436a, #f56c6c);
+		margin-left: 20upx;
+		position: relative;
+		&:after {
+			content: '';
+			position: absolute;
+			top: 50%;
+			right: 50%;
+			transform: translateY(-50%);
+			height: 28upx;
+			width: 0;
+			border-right: 1px solid rgba(255, 255, 255, 0.5);
+		}
+		.action-btn {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 180upx;
+			height: 100%;
+			font-size: 28upx;
+			padding: 0;
+			border-radius: 0;
+			background: transparent;
+		}
 	}
- </style>
- 
+}
+.van-goods-action-button--last {
+	border-radius: none !important;
+	--button-border-radius: none !important;
+}
+.van-goods-action-button--first {
+	border-radius: none !important;
+	--button-border-radius: none !important;
+}
+.changeimg {
+	width: 100%;
+	height: auto !important;
+	display: block;
+	text-align: center;
+}
+</style>

+ 41 - 83
pages/index/sureBuy.vue

@@ -4,15 +4,8 @@
 		 :scroll-top="scrollTop" scroll-y="true" 
 		 :refresher-enabled="false">
 		<van-radio-group >
-		   <van-cell-group 
-		   v-for="(item, index) in list"
-		   :key="index"
-		   >
-			 <van-cell
-			   :border="false"
-		       :title="item.title"
-			   @click="onChange(index)" 
-		     >
+		   <van-cell-group v-for="(item, index) in list" :key="index" >
+			 <van-cell  :border="false"  :title="item.title" @click="onChange(index)"  >
 			 <template slot="right-icon">
 			    <van-radio-group style="width: 20upx;" :value="radio" >
 			      <van-radio checked-color="#D9332E" :name="index" >
@@ -22,40 +15,31 @@
 		     </van-cell>
 		   </van-cell-group>
 		 </van-radio-group>
-		 <view v-if="is_traffic == 0 && radio === 0" style="background-color: #D9332E;color: #fff;margin: 10upx 0;
-		 padding: 0 32upx;">
+		 <view v-if="is_traffic == 0 && radio === 0" style="background-color: #D9332E;color: #fff;margin: 10upx 0; padding: 0 32upx;">
 			 酒店现在是休息时间,可能无法及时为您配送
 		 </view>
-		 <view v-if="radio === 0"
-		  style="border-top: 15upx solid #F5F5F5;
-		  border-bottom: 15upx solid #F5F5F5;
-		  "
-		 >
+		 <view v-if="radio === 0"  style="border-top: 15upx solid #F5F5F5;  border-bottom: 15upx solid #F5F5F5;">
 		  <van-field 
 		     @change="gethotelname"
 		     :value="hotelname"
 			 style="color: #323233;"
 		     label="酒店"
 			 readonly
-		     placeholder="请输入酒店"
-		   />
+		     placeholder="请输入酒店" />
 		   <view @click="goshopvalue">
 			   <van-field
 			      :disabled="first==1&&!pleasesure"
 			   	  @change="getplaese"
 			      :value="honename"
 			      label="房间号"
-			      placeholder="请输入房间号"
-			    />
+			      placeholder="请输入房间号" />
 		   </view>
 		  
-			
 			<van-field
 			   @change="getusername"
 			   :value="username"
 			   label="收货人"
-			   placeholder="请输入收货人"
-			 />
+			   placeholder="请输入收货人"/>
 			<van-field
 			   @change="getphone"
 			   :value="phone"
@@ -65,45 +49,31 @@
 		    </view>
 			
 		 <view v-if="radio === 2"
-		  style="border-top: 15upx solid #F5F5F5;
-		  border-bottom: 15upx solid #F5F5F5;
-		  "
-		 >
+		  style="border-top: 15upx solid #F5F5F5; border-bottom: 15upx solid #F5F5F5;">
 		  <van-field 
 		    @change="getreserve"
 		     :value="reserve"
 			 readonly
 		     label="预订酒店"
-		     placeholder="请输入预订酒店"
-		   />
+		     placeholder="请输入预订酒店"/>
 		   
 		   <van-field
 		    @change="getCheckedin"
 		      :value="Checkedin"
 		      label="入住人"
-		      placeholder="请输入入住人"
-		    />
+		      placeholder="请输入入住人"/>
 			<van-field
 			@change="getnumberphone"
 			   :value="numberphone"
 			   label="手机号"
-			   placeholder="请输入手机号"
-			 />
-			 <van-field
-			 @change="getremark"
-			    :value="remark"
-			    label="备注"
-			    placeholder="请输入备注"
-			  />
+			   placeholder="请输入手机号"/>
+			 <van-field @change="getremark" :value="remark" label="备注" placeholder="请输入备注" />
 		    </view>
 		
 		<view v-if="radio == 2">
 			<van-radio-group >
-			   <van-cell-group 
-			   >
-				 <van-cell
-				   :border="false"
-			     >
+			   <van-cell-group >
+				 <van-cell :border="false">
 				 <template slot="title">
 					 我已阅读并同意 <span @click="readshouknow" style="color: #007AFF">《预订须知》</span>
 				 </template>
@@ -118,7 +88,6 @@
 			 </van-radio-group>
 		</view>
 		
-		
 		<van-dialog
 		  use-slot
 		  :show="pleasesure"
@@ -126,8 +95,7 @@
 		  cancel-button-text="返回"	
 		  @confirm="confirmstore"
 		  confirm-button-color="#D9332E"	
-		  @cancel="cancelstore"
-		>
+		  @cancel="cancelstore">
 		 <view style="padding: 50upx 32rpx;text-align: center;">
 			<view style="padding: 15upx 0;">购物前请确认</view>
 			<view  style="padding: 15upx 0;font-size: 38rpx;color: #D9332E;font-weight: bold;">{{hotelname}}</view>
@@ -135,14 +103,7 @@
 		 </view>
 		</van-dialog>
 		
-		
-		 <van-dialog
-		   use-slot
-		   title="预订须知"
-		   :show="ishow"
-		   @confirm="confirmOrder"
-		   :show-cancel-button="false"
-		 >
+		 <van-dialog use-slot title="预订须知" :show="ishow"  @confirm="confirmOrder"   :show-cancel-button="false">
 		  <view style="padding: 0 32rpx;">
 			  <scroll-view style="height: 40vh;" :scroll-top="scrollTop"  scroll-y="true" :refresher-enabled="false">
 				  <rich-text :nodes="store.buy_notice"></rich-text>
@@ -163,7 +124,7 @@
 		 <view @tap="goDetail()" class="cart-list">
 		  <view class="topTip">
 			   <view style="display: flex;align-items: center;">
-				<image :src="pictureUrl+'/uploads/home/store/'+store.store_id+'/'+store.store_banner" style="border-radius: 50%;
+				<image v-if="store.store_id&&store.store_banner" :src="pictureUrl+'/uploads/home/store/'+store.store_id+'/'+store.store_banner" style="border-radius: 50%;
 				width: 50upx;height: 50upx;"></image>
 				<span style="padding-left: 8upx;">{{store.store_name}}</span>
 			   </view>
@@ -189,7 +150,9 @@
 		 <!-- 底部付款 -->
 		 <view class="adressbutton">
 		 		<view class="buttonStatus">
-		 			<view @click="estimate" class="deleteOrder">应付<span>¥{{prices}}</span></view>
+					
+		 			<view @click="estimate" v-if="radio == 1" class="deleteOrder">应付<span>¥{{prices2}}</span></view>
+					<view @click="estimate" v-else class="deleteOrder">应付<span>¥{{prices}}</span></view>
 		 			<view class="payOrder" @click="goPay">付款</view>
 		 		</view>
 		 </view>
@@ -219,7 +182,8 @@
 				numberphone:'',
 				remark:'',
 				ralodprice: 0,
-				prices:'',
+				prices:'',//没快递的费用
+				prices2:'',//带快递的费用
 				pictureUrl: this.pictureUrl,
 				list:[
 					{title:'请送到我的房间'},
@@ -240,14 +204,11 @@
 		onLoad(options) {
 			this.order_id = options.order_id;
 			this.store_id = options.store;
-			// let prices =  Number((options.prices/100).toFixed(2));
-			// this.prices = prices; 
 			this.getorder(); // 获取订单详情
 			this.getuserinfo(); // 获取会员详情
 			 uni.$on("getadress",(adress)=>{
 			        this.choseadress = adress;
 					this.address_id = this.choseadress.address_id;
-					//this.getorder();
 					this.getralodprice();
 			 })
 		},
@@ -302,21 +263,21 @@
 					return;
 				}
 			},	
-				getphone(e) {
-					this.phone = e.detail;
-				},
-				getusername(e) {
-					this.username = e.detail;
-				},
-				getCheckedin(e) {
-					this.Checkedin = e.detail;
-				},
-				getnumberphone(e) {
-					this.numberphone = e.detail;
-				},
-				getremark(e) {
-					this.remark = e.detail;
-				},
+			getphone(e) {
+				this.phone = e.detail;
+			},
+			getusername(e) {
+				this.username = e.detail;
+			},
+			getCheckedin(e) {
+				this.Checkedin = e.detail;
+			},
+			getnumberphone(e) {
+				this.numberphone = e.detail;
+			},
+			getremark(e) {
+				this.remark = e.detail;
+			},
 			// 获取订单详情
 			getorder() {
 				this.request({
@@ -438,13 +399,12 @@
 						if(res.data.code == 1000) {
 							let order_id = res.data.data.order_id; // 订单id
 							let store_id  = this.store.store_id;
-							let prices = this.prices;
+							var prices =this.radio == 1? this.prices2:this.prices;
 							let isform = 2;
 							uni.redirectTo({
 								url:`/pages/myOrder/paymoment?order_id=${order_id}&prices=${prices}&isform=${isform}&store_id=${store_id}`
 							})
 						}
-						
 					}
 				})
 			},
@@ -460,13 +420,12 @@
 					success:(res) => {
 						    let price = this.firstprice;
 						    this.ralodprice = Number(res.data.data.shipping_fee);
-							this.prices =  Number(price + this.ralodprice).toFixed(2);;
+							this.prices2 =  Number(price + this.ralodprice).toFixed(2);;
 					}
 				})
 			},
 			onChange(index) {
 				this.radio = index;
-					
 				if(index == 1) {
 					this.shipping_type = 0; // 订单付款快递类型
 				}else {
@@ -474,10 +433,9 @@
 				}
 			},
 			goAdress() {
-			    
 				uni.navigateTo({
-				                   url: '../myOrder/adress',
-				               }); 
+				    url: '../myOrder/adress',
+				}); 
 			}
 		}
 	}

+ 2 - 5
pages/myOrder/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<van-tabs :active="active"  @change="changeselect" style="width: 20%!important;">
-		  <van-tab v-for="(item, index) in menu" :name="index" :title="item.name">
+		  <van-tab v-for="(item, index) in menu" :name="index" :key="index" :title="item.name">
 		  </van-tab>
 		</van-tabs>
 		<van-skeleton  :loading="loading">
@@ -11,7 +11,7 @@
 		  <view v-for="(item,index) in order_list" :key="index"  class="cart-list">
 		   <view class="topTip" @click="goStore(item.store_id)">
 			   <view>
-				   <image :src="pictureUrl+'/uploads/home/store/'+item.store_id+'/'+item.store_avatar" style="border-radius: 50%;
+				   <image v-if="item.store_avatar" :src="pictureUrl+'/uploads/home/store/'+item.store_id+'/'+item.store_avatar" style="border-radius: 50%;
 				   width: 50upx;height: 50upx;vertical-align: middle;"></image>
 				  <span style="padding-left: 16upx;">{{item.store_name}}</span>
 			   </view>
@@ -250,9 +250,6 @@
 						page_size: 10
 					},
 					success: (res) => {
-						console.log("订单");
-						console.log(res);
-						return;
 						if(res.data.data.order_list.length< 10) {
 							this.ispull = false;
 						}

+ 497 - 395
pages/myOrder/order.vue

@@ -1,422 +1,524 @@
 <template>
-	<van-skeleton  :loading="loading">
-	<view class="cart-list">
-       <view style="padding: 0 36upx;line-height: 70upx;
-	   border-bottom: 14upx solid #F5F5F5;
-	   border-top: 1px solid #F5F5F5;"
-	   >
-		 <!--  <span v-if="detail.order_state == 10">未付款</span>
-		   <span v-if="detail.order_state == 0">已取消</span>
-		   <span v-if="detail.order_state == 20">待发货</span>  
-		   <!-- 已付款  -->
-		 <!--  <span v-if="detail.order_state == 30">已发货</span>
-		   <span v-if="detail.order_state == 40">已收货</span> -->
-		   <span>{{detail.status}}</span>
-	   </view>  
-	<!--   <view style="padding: 0 36upx;line-height: 70upx;border-bottom: 14upx solid #F5F5F5;">
-	   		   <span v-if="detail.refund_state == 1">等待酒店处理退货申请</span>
-	   		   <span v-if="detail.refund_state == 2">同意退款售后</span>
-	   		   <span v-if="detail.order_state == 3">拒绝退款</span>  
-	   </view>  -->
-	   <view class="adress">
-	   		 <view class="adressDetail">{{detail.reciver_info.mob_phone}}</view>
-	   		 <view>{{detail.reciver_info.address}}</view>
-	   </view>
-	   <view @click="goStore" style="padding: 30upx 36upx 15upx 36upx;border-bottom: 1px solid #F5F5F5;">
-		   <image :src="pictureUrl+'/uploads/home/store/'+detail.store_id+'/'+detail.store_avatar" style="border-radius: 50%;
-		   width: 50upx;height: 50upx;vertical-align: middle;"></image>
-		  <span style="padding-left: 16upx;">{{detail.store_name}}</span>
-	   </view>
-	
-	 <view class="shoplist" v-for="(items,index) in detail.goods" :key="index">
-			  <view @click="goDetail(items)">
-				  <van-card
-					title-class="changewidth"
-					price-class ="priceClass"
-					:price="items.goods_price"
-					:desc="items.descire"
-					:title="items.desarray"
-					:thumb="pictureUrl + '/uploads/home/store/goods/'+items.goods_image.substr(0, items.goods_image.indexOf('\_')) + '/' + items.goods_image"
-				  >
-				  </van-card>
-			  </view>
-			  <view style="clear:both;width: 100%;overflow: hidden;padding: 20rpx 0;">
-				  <view  class="retungood" v-if="detail.status=='已收货' && items.status == 2" @click="goreturngood(items)">退货退款</view>
-				  <view class="retungood" v-if="detail.status=='已收货' && items.status == 4" @click="goreturndetail(items.or_id)">退款成功</view>
-				  <view class="retungood" v-if="detail.status=='已收货' && items.status ==3" @click="goreturndetail(items.or_id)">退款申请中</view>
-			  </view>
-	 </view>
-	 <view class="topTip">
-		  <view style="padding-right: 20upx;">运费: {{detail.shipping_fee}}</view>
-		  <view style="font-size: 28upx;">合计:{{detail.order_amount}}</view>
-	 </view>
-	 <view style="padding: 18upx 36upx;">订单编号:<text class="orderCode">{{detail.order_sn}}</text></view>
-	 
-	 <view v-if="detail.shipping_code!='' " style="margin: 20upx 0;
+	<van-skeleton :loading="loading">
+		<view class="cart-list">
+			<view style="padding: 0 36upx;line-height: 70upx; border-bottom: 14upx solid #F5F5F5; border-top: 1px solid #F5F5F5;">
+				<span>{{ detail.status }}</span>
+			</view>
+			<view class="adress">
+				<view class="adressDetail">{{ detail.reciver_info.mob_phone }}</view>
+				<view>{{ detail.reciver_info.address }}</view>
+			</view>
+			<view @click="goStore" style="padding: 30upx 36upx 15upx 36upx;border-bottom: 1px solid #F5F5F5;">
+				<image
+					:src="pictureUrl + '/uploads/home/store/' + detail.store_id + '/' + detail.store_avatar"
+					style="border-radius: 50%; width: 50upx;height: 50upx;vertical-align: middle;"
+				></image>
+				<span style="padding-left: 16upx;">{{ detail.store_name }}</span>
+			</view>
+
+			<view class="shoplist" v-for="(items, index) in detail.goods" :key="index">
+				<view @click="goDetail(items)">
+					<van-card
+						title-class="changewidth"
+						price-class="priceClass"
+						:price="items.goods_price"
+						:desc="items.descire"
+						:title="items.desarray"
+						:thumb="pictureUrl + '/uploads/home/store/goods/' + items.goods_image.substr(0, items.goods_image.indexOf('\_')) + '/' + items.goods_image"
+					></van-card>
+				</view>
+				<view style="clear:both;width: 100%;overflow: hidden;padding: 20rpx 0;">
+					<view class="retungood" v-if="detail.status == '已收货' && items.status == 2" @click="goreturngood(items)">退货退款</view>
+					<view class="retungood" v-if="detail.status == '已收货' && items.status == 4" @click="goreturndetail(items.or_id)">退款成功</view>
+					<view class="retungood" v-if="detail.status == '已收货' && items.status == 3" @click="goreturndetail(items.or_id)">退款申请中</view>
+				</view>
+			</view>
+			<view class="topTip">
+				<view style="padding-right: 20upx;">运费: {{ detail.shipping_fee }}</view>
+				<view style="font-size: 28upx;">合计:{{ detail.order_amount }}</view>
+			</view>
+			<view style="padding: 18upx 36upx;">
+				订单编号:
+				<text class="orderCode">{{ detail.order_sn }}</text>
+			</view>
+
+			<view
+				v-if="detail.shipping_code != ''"
+				style="margin: 20upx 0;
 				  padding: 10upx 0 0upx 32upx;
 	              border-top: 16upx solid #F5F5F5;
-				  border-top: 16upx solid #F5F5F5;">
-	 		 <view>快递单号: <text  style="font-weight: 500;padding-left:16upx;" class="time">
-				 {{detail.shipping_code}}  ({{detail.express_name}})
-				 </text>
-			 </view>
-	</view>
-	
-	 <view class="adressbottom">
-		 <view>下单时间: <text  style="font-weight: 500;" class="time">{{detail.add_time}}</text></view> 
-		 <view>支付订单: 
-		     <text class="time"  v-if="detail.order_state == 10 || detail.order_state == 0">未支付</text>
-		     <text class="time"  v-else>{{detail.payment_time}}</text>
-		 </view>
-		 <view>商家发货: 
-		   <text class="time"  v-if="detail.order_state == 10 || detail.order_state == 0 ||  detail.order_state == 20 || detail.order_state == 60">未发货</text>
-		   <text class="time"  v-else>{{happenTimeFun(detail.shipping_time)}}</text>
-		 </view>
-		 <view>确认收货: 
-			<text class="time"  v-if="detail.order_state == 10 || detail.order_state == 0||  detail.order_state == 20||  detail.order_state == 30|| detail.order_state == 60">未确认</text>
-			<text class="time"  v-else>{{detail.finnshed_time}}</text>
-		 </view>
-	 </view>
-	 
-	 <view class="adressbutton">
-		<view  class="buttonStatus">
-			<!-- shipping_code -->
-		<!-- 	<view>{{detail.operate}}</view> -->
-			<!-- <view v-if="detail.order_state == 0 " @click="cancelOrder(2)" class="deleteOrder">删除订单</view> -->
-			<view @click="cancelOrder(4)"  v-if="detail.order_state == 20" class="deleteOrder">退款</view>
-			<view @click="reminder(1)"  v-if="detail.order_state == 20&&detail.shipping_type==0" class="deleteOrder">催单</view>
-			<view @click="reminder(2)"  v-if="detail.order_state == 20&&detail.shipping_type==1" class="deleteOrder">联系酒店</view>
-			
-			<view @click="cancelOrder(1)" v-if="detail.order_state == 10" class="deleteOrder">取消订单</view>
-			<view class="payOrder" v-if="detail.order_state == 10" @click="goPay(detail)">去付款</view>
-			<!-- detail.order_state == 40 && detail.refund_state == 0 -->
-			<view v-if=" detail.status == '已发货'" @click="cancelOrder(3)" class="deleteOrder">确认收货</view>
-			<!-- <view v-if=" detail.status == '已收货'"  evaluation_state  class="deleteOrder">退货退款</view> -->
-			<view v-if=" detail.status == '已收货' && detail.evaluation_state == 0 || detail.status == '已完成' && detail.evaluation_state == 0 " @click="estimate" class="deleteOrder">去评价</view>
-			<view v-if=" detail.order_state == 40 && detail.evaluation_state == 1 || detail.status == '已取消' || detail.status == '退款关闭' " @click="cancelOrder(2)" class="deleteOrder">删除订单</view>
+				  border-top: 16upx solid #F5F5F5;"
+			>
+				<view>
+					快递单号:
+					<text style="font-weight: 500;padding-left:16upx;" class="time">{{ detail.shipping_code }} ({{ detail.express_name }})</text>
+				</view>
+			</view>
+
+			<view class="adressbottom">
+				<view>
+					下单时间:
+					<text style="font-weight: 500;" class="time">{{ detail.add_time }}</text>
+				</view>
+				<view>
+					支付订单:
+					<text class="time" v-if="detail.order_state == 10 || detail.order_state == 0">未支付</text>
+					<text class="time" v-else>{{ detail.payment_time }}</text>
+				</view>
+				<view>
+					商家发货:
+					<text class="time" v-if="detail.order_state == 10 || detail.order_state == 0 || detail.order_state == 20 || detail.order_state == 60">未发货</text>
+					<text class="time" v-else>{{ happenTimeFun(detail.shipping_time) }}</text>
+				</view>
+				<view>
+					确认收货:
+					<text
+						class="time"
+						v-if="detail.order_state == 10 || detail.order_state == 0 || detail.order_state == 20 || detail.order_state == 30 || detail.order_state == 60"
+					>
+						未确认
+					</text>
+					<text class="time" v-else>{{ detail.finnshed_time }}</text>
+				</view>
+			</view>
+
+			<view class="adressbutton">
+				<view class="buttonStatus">
+					<view @click="returnmoney()" v-if="detail.order_state == 20" class="deleteOrder">退款</view>
+					<view @click="reminder(1)" v-if="detail.order_state == 20 && detail.shipping_type == 0" class="deleteOrder">催单</view>
+					<view @click="reminder(2)" v-if="detail.order_state == 20 && detail.shipping_type == 1" class="deleteOrder">联系酒店</view>
+
+					<view @click="cancelOrder(1)" v-if="detail.order_state == 10" class="deleteOrder">取消订单</view>
+					<view class="payOrder" v-if="detail.order_state == 10" @click="goPay(detail)">去付款</view>
+					<view v-if="detail.status == '已发货'" @click="cancelOrder(3)" class="deleteOrder">确认收货</view>
+					<view
+						v-if="(detail.status == '已收货' && detail.evaluation_state == 0) || (detail.status == '已完成' && detail.evaluation_state == 0)"
+						@click="estimate"
+						class="deleteOrder"
+					>
+						去评价
+					</view>
+					<view
+						v-if="(detail.order_state == 40 && detail.evaluation_state == 1) || detail.status == '已取消' || detail.status == '退款关闭'"
+						@click="cancelOrder(2)"
+						class="deleteOrder"
+					>
+						删除订单
+					</view>
+				</view>
+			</view>
+			<Dialog :orderCancel="orderCancel" :titles="titles" @colseDialog="cancelDialog" @confirmPay="confirmOrder" />
+
+			<view class="openSelect" v-if="radioShow">
+				<view class="openSelectTitle">请选择退款的理由</view>
+				<van-radio-group :value="radio" @change="onChange">
+					<van-cell-group>
+						<van-cell :title="item.name" clickable :data-name="item.value" @click="onClick" v-for="(item, index) in radioItems" :key="index">
+							<van-radio checked-color="#E72028" slot="right-icon" :name="item.value" />
+						</van-cell>
+					</van-cell-group>
+				</van-radio-group>
+				<van-field :value="textarea" @change="changatextarea" type="textarea" placeholder="请输入退款理由" v-if="radio == 5" />
+				<view class="flex-box btns">
+					<view class="flex-1" @click="cancelDialog2()">取消</view>
+					<view class="flex-1" @click="confirmOrder2()">确定</view>
+				</view>
+			</view>
 		</view>
-		<!-- <view v-else>
-			<view v-if="detail.refund_state == 2">
-			ji
-			
-			删除订单</view>
-		</view> -->
-	 </view>
-	<Dialog  :orderCancel="orderCancel" 
-	    :titles="titles"
-	    @colseDialog="cancelDialog" 
-	    @confirmPay="confirmOrder"
-	 />
-	</view>
-	 </van-skeleton>
+		<view class="weui-mask" v-if="radioShow"></view>
+	</van-skeleton>
 </template>
 
 <script>
-	import Dialog from '@/component/Dialog.vue'
-	export default {
-		components: {
-			Dialog
-		},
-		data() {
-			return {
-			  firstloading: 0,
-			  loading: true,
-			  isreturn: false,
-			  isCancel: false,
-			  isDelete: false,
-			  isGet: false,
-			  titles:'',
-			  pictureUrl: this.pictureUrl,
-			  orderCancel: false,
-			  detail:{},
-			  id: '' ,// 订单id
-		    }
-	    },
-		onLoad(e) {
-			this.id = e.id;
+import Dialog from '@/component/Dialog.vue';
+export default {
+	components: {
+		Dialog
+	},
+	data() {
+		return {
+			firstloading: 0,
+			loading: true,
+			isreturn: false,
+			isCancel: false,
+			isDelete: false,
+			isGet: false,
+			titles: '',
+			pictureUrl: this.pictureUrl,
+			orderCancel: false,
+			detail: {},
+			id: '', // 订单id
+			radioShow: false,
+			radio: 1,
+			radioItems: [
+				{ name: '拍错/多拍/不想要', value: 1 },
+				{ name: '协商一致退货', value: 2 },
+				{ name: '缺货', value: 3 },
+				{ name: '未按约定时间发货', value: 4 },
+				{ name: '其他', value: 5 }
+			],
+			textarea: ''
+		};
+	},
+	onLoad(e) {
+		this.id = e.id;
+		this.getDetail();
+		// 刷新订单详情
+		uni.$on('refshlist', e => {
 			this.getDetail();
-			// 刷新订单详情  
-			uni.$on('refshlist', (e) => {
-				this.getDetail();			
-			})
-			
+		});
+	},
+	methods: {
+		changatextarea(e) {
+			this.textarea = e.detail;
 		},
-		methods: {
-			  goStore() {
-			     let id = this.detail.store_id;
-			  	 uni.navigateTo({
-			  	       url: `/pages/index/hotel?id=${id}`
-			  	 });
-			  },
-			  happenTimeFun(num){//时间戳数据处理
-			                  let date = new Date(num * 1000);
-			                //时间戳为10位需*1000,时间戳为13位的话不需乘1000
-			                let y = date.getFullYear();
-			                let MM = date.getMonth() + 1;
-			                MM = MM < 10 ? ('0' + MM) : MM;//月补0
-			                let d = date.getDate();
-			                 d = d < 10 ? ('0' + d) : d;//天补0
-			                let h = date.getHours();
-			                 h = h < 10 ? ('0' + h) : h;//小时补0
-			                let m = date.getMinutes();
-			                 m = m < 10 ? ('0' + m) : m;//分钟补0
-			                 let s = date.getSeconds();
-			                 s = s < 10 ? ('0' + s) : s;//秒补0
-			                 return y + '-' + MM + '-' + d+ ' ' + h + ':' + m; //年月日
-			                 //return y + '-' + MM + '-' + d + ' ' + h + ':' + m+ ':' + s; //年月日时分秒
-			            },           
-			
-			goDetail(e) {
-				let id = e.goods_commonid; 
-				let store_id = e.store_id; 
-				uni.navigateTo({
-									url: `/pages/index/shop?id=${id}&store_id=${store_id}`
-								}); 
-			},
-			// 退货退款
-			goreturngood(item) {
-				item.statusremak =  this.detail.status;
-				item.order_id =  this.id;
-				item.store_avatar = this.detail.store_avatar;
-				item.store_name = this.detail.store_name;
-				item.order_sn = this.detail.order_sn;
-				let id = JSON.stringify(item);
-				uni.navigateTo({
-					url: `/pages/myOrder/returngood?id=${id}`  // 退货页面
-				})
-			},
-			// 退款详情
-			goreturndetail(e) {
-				let id = e;
-				uni.navigateTo({
-					url: `/pages/myOrder/returndetail?id=${id}`  // 退货详情页面
-				})
-			},
-			getDetail() {
-				uni.showLoading({
-				    title: '加载中',
-					mask: true
-				});
-				
-				this.request({
-					url: '/v2/order/info',
-					method: 'post',
-					data: {
-						order_id: this.id
-					},
-					success: (res) => {
-						let { data } = res.data;
-						data.goods.forEach((items,index) => {
-								let arr = items.goods_name.split(' ');
-								items.desarray = arr[0];
-								items.descire = items.goods_name.replace(arr[0], '');
-						})
-						this.detail = data;
-						uni.hideLoading()
-						if(this.firstloading == 0) {
-							this.loading = false;
-						}
-						this.firstloading = 1;
+		onChange(event) {
+			this.radio = event.detail;
+		},
+		onClick(event) {
+			const { name } = event.currentTarget.dataset;
+			this.radio = name;
+		},
+		goStore() {
+			let id = this.detail.store_id;
+			uni.navigateTo({
+				url: `/pages/index/hotel?id=${id}`
+			});
+		},
+		happenTimeFun(num) {
+			//时间戳数据处理
+			let date = new Date(num * 1000);
+			//时间戳为10位需*1000,时间戳为13位的话不需乘1000
+			let y = date.getFullYear();
+			let MM = date.getMonth() + 1;
+			MM = MM < 10 ? '0' + MM : MM; //月补0
+			let d = date.getDate();
+			d = d < 10 ? '0' + d : d; //天补0
+			let h = date.getHours();
+			h = h < 10 ? '0' + h : h; //小时补0
+			let m = date.getMinutes();
+			m = m < 10 ? '0' + m : m; //分钟补0
+			let s = date.getSeconds();
+			s = s < 10 ? '0' + s : s; //秒补0
+			return y + '-' + MM + '-' + d + ' ' + h + ':' + m; //年月日
+			//return y + '-' + MM + '-' + d + ' ' + h + ':' + m+ ':' + s; //年月日时分秒
+		},
+
+		goDetail(e) {
+			let id = e.goods_commonid;
+			let store_id = e.store_id;
+			uni.navigateTo({
+				url: `/pages/index/shop?id=${id}&store_id=${store_id}`
+			});
+		},
+		// 退货退款
+		goreturngood(item) {
+			item.statusremak = this.detail.status;
+			item.order_id = this.id;
+			item.store_avatar = this.detail.store_avatar;
+			item.store_name = this.detail.store_name;
+			item.order_sn = this.detail.order_sn;
+			let id = JSON.stringify(item);
+			uni.navigateTo({
+				url: `/pages/myOrder/returngood?id=${id}` // 退货页面
+			});
+		},
+		// 退款详情
+		goreturndetail(e) {
+			let id = e;
+			uni.navigateTo({
+				url: `/pages/myOrder/returndetail?id=${id}` // 退货详情页面
+			});
+		},
+		getDetail() {
+			uni.showLoading({
+				title: '加载中',
+				mask: true
+			});
+			this.request({
+				url: '/v2/order/info',
+				method: 'post',
+				data: {
+					order_id: this.id
+				},
+				success: res => {
+					let { data } = res.data;
+					data.goods.forEach((items, index) => {
+						let arr = items.goods_name.split(' ');
+						items.desarray = arr[0];
+						items.descire = items.goods_name.replace(arr[0], '');
+					});
+					this.detail = data;
+					uni.hideLoading();
+					if (this.firstloading == 0) {
+						this.loading = false;
 					}
-				})
-			},
-			// 退款  
-		
-			returnmoney() {
-				
-				
-			},
-			// 取消订单
-			cancelOrder(e) { 
-				if(e == 1) {
-					this.titles="确认取消订单?"
-					this.isCancel = true;
-				}else if(e == 3){
-					this.titles="确认收货?"
-					this.isGet = true;
-				}else if(e == 4) {
-					this.titles = "确定退款?";
-					this.isreturn = true;
-				}else {
-				   this.titles="确认删除订单?"
-				   this.isDelete = true;
+					this.firstloading = 1;
 				}
-				this.orderCancel = true;
-			},
-			cancelDialog() {
-				this.orderCancel = false;
-				this.isreturn = false;
-				this.isCancel = false;
-				this.isDelete = false;
-				this.isGet = false;
-			},
-			confirmOrder() {
-				let url = '';
-				this.orderCancel = false;
-				// 取消
-				if(this.isCancel) {
-					url = '/v2/order/cancel';
-				}else if(this.isDelete) {
-					// 删除
-					url = '/v2/order/drop';
-				}else if(this.isGet) {
-					// 收货
-					url = '/v2/order/confirm';
-				} else if(this.isreturn) {
-					url = '/v3/Order/refund_direct';
+			});
+		},
+
+		// 退款
+		returnmoney() {
+			this.isreturn = true;
+			this.radioShow = true;
+		},
+		// 取消订单
+		cancelOrder(e) {
+			if (e == 1) {
+				this.titles = '确认取消订单?';
+				this.isCancel = true;
+			} else if (e == 3) {
+				this.titles = '确认收货?';
+				this.isGet = true;
+			} else if (e == 4) {
+				this.titles = '确定退款?';
+				this.isreturn = true;
+			} else {
+				this.titles = '确认删除订单?';
+				this.isDelete = true;
+			}
+			this.orderCancel = true;
+		},
+		cancelDialog() {
+			this.orderCancel = false;
+			this.isreturn = false;
+			this.isCancel = false;
+			this.isDelete = false;
+			this.isGet = false;
+		},
+
+		cancelDialog2() {
+			this.radioShow = false;
+			this.isreturn = false;
+			this.textarea = '';
+			this.radio = 1;
+		},
+		confirmOrder2() {
+			var str = this.radioItems[this.radio - 1].name;
+			var data = { order_id: this.id };
+			data.remark = str;
+			if (this.radio == 5) {
+				console.log(this.textarea);
+				if (!this.textarea) {
+					this.$msg('请输入退款理由');
+					return false;
+				} else {
+					data.remark = this.textarea;
 				}
-				this.request({
-					url: url,
-					method:'post',
-					data: {
-						order_id: this.id
-					},
-					success: (res) => {
-						if(this.isDelete) {
-							this.$msg("删除成功");
-						}else if(this.isGet) {
-							this.$msg("收货成功");
-						}else if(this.isCancel) {
-							this.$msg("取消成功");
-						}else if(this.isreturn) {
-							this.$msg("退款成功");
-						}
-						uni.$emit("refehlist");
-						if(this.isreturn) {
+			}
+			this.request({
+				url: '/v3/Order/refund_direct',
+				method: 'post',
+				data: data,
+				success: res => {
+					if (res.data.code == 1000) {
+						uni.$emit('refehlist');
+						if (this.isreturn) {
+							this.cancelDialog2();
 							this.getDetail();
-						}else {
-							setTimeout(()=> {
-								uni.navigateBack();
-							}, 1000)
 						}
-						
-						
+					} else {
+						this.$msg(res.data.msg);
+						this.cancelDialog2();
 					}
-				})
-				
-				
-			},
-			goPay(e) {
-				let prices = this.detail.order_amount;
-				let order_id = this.id;
-				let store_id = e.store_id;
-				let isform = 1;
-				uni.navigateTo({
-					url:`/pages/myOrder/paymoment?order_id=${order_id}
-					&prices=${prices}&isform=${isform}&store_id=${store_id}`
-				})
-			},
-			
-			// 催单
-			reminder(e) {
-			   let a = e;
-			   let order_id = this.id;
-				uni.navigateTo({
-					url: `/pages/myOrder/reminder?order_id=${order_id}&a=${a}`
-				})
-			},
-		    
-			// 评价晒单
-			estimate() {
-				let order_id = this.id;
-				uni.navigateTo({
-					url: `/pages/myOrder/estimate?order_id=${order_id}`
-				})
-				
+				}
+			});
+		},
+
+		confirmOrder() {
+			let url = '';
+			var data = { order_id: this.id };
+			this.orderCancel = false;
+			// 取消
+			if (this.isCancel) {
+				url = '/v2/order/cancel';
+			} else if (this.isDelete) {
+				// 删除
+				url = '/v2/order/drop';
+			} else if (this.isGet) {
+				// 收货
+				url = '/v2/order/confirm';
 			}
+			this.request({
+				url: url,
+				method: 'post',
+				data: data,
+				success: res => {
+					if (res.data.code == 1000) {
+						if (this.isDelete) {
+							this.$msg('删除成功');
+						} else if (this.isGet) {
+							this.$msg('收货成功');
+						} else if (this.isCancel) {
+							this.$msg('取消成功');
+						}
+						uni.$emit('refehlist');
+						setTimeout(() => {
+							uni.navigateBack();
+						}, 1000);
+					} else {
+						this.$msg(res.data.msg);
+					}
+				}
+			});
+		},
+		goPay(e) {
+			let prices = this.detail.order_amount;
+			let order_id = this.id;
+			let store_id = e.store_id;
+			let isform = 1;
+			uni.navigateTo({
+				url: `/pages/myOrder/paymoment?order_id=${order_id}
+					&prices=${prices}&isform=${isform}&store_id=${store_id}`
+			});
+		},
+
+		// 催单
+		reminder(e) {
+			let a = e;
+			let order_id = this.id;
+			uni.navigateTo({
+				url: `/pages/myOrder/reminder?order_id=${order_id}&a=${a}`
+			});
+		},
+
+		// 评价晒单
+		estimate() {
+			let order_id = this.id;
+			uni.navigateTo({
+				url: `/pages/myOrder/estimate?order_id=${order_id}`
+			});
 		}
 	}
+};
 </script>
-  
+
 <style lang="scss">
-		
-	page {
-		background-color: #F5F5F5;
+.openSelectTitle {
+	padding: 30upx;
+	color: #999;
+}
+.weui-mask {
+	position: fixed;
+	z-index: 998;
+	top: 0;
+	right: 0;
+	left: 0;
+	bottom: 0;
+	background: rgba(0, 0, 0, 0.6);
+	// display: none;
+}
+.openSelect {
+	position: absolute;
+	position: fixed;
+	left: 10%;
+	right: 10%;
+	background-color: #fff;
+	border-radius: 10px;
+	z-index: 999;
+	top: 20%;
+	// display: none;
+}
+.btns view {
+	text-align: center;
+	padding: 30upx;
+	color: #222;
+}
+.btns view:nth-child(2) {
+	border-left: 1px solid #f1f1f1;
+	color: #d60e15;
+}
+.tkText {
+	padding: 0 20upx 20upx 20upx;
+	color: #ccc;
+}
+page {
+	background-color: #f5f5f5;
+}
+.cart-list {
+	background-color: #fff;
+}
+
+.topTip {
+	display: flex;
+	align-items: center;
+	justify-content: flex-start;
+	padding: 20upx 36upx;
+}
+.changewidth {
+	color: #303133;
+	font-size: 32upx;
+	font-weight: 100 !important;
+}
+.priceClass {
+	color: #303133 !important;
+	font-weight: normal !important;
+	font-size: 36upx;
+}
+.van-card {
+	background-color: #fff !important;
+}
+.shoplist {
+	padding: 10upx 32upx;
+	border-bottom: 1px solid #f5f5f5;
+	// display: flex;
+	// justify-content: space-between;
+	// align-items: center;
+}
+.retungood {
+	text-align: right;
+	padding: 0upx 32upx;
+	float: right;
+	border: 1px solid #666;
+	//margin-right: 32upx;
+}
+.adress {
+	padding: 35upx 36upx;
+	border-bottom: 14upx solid #f5f5f5;
+}
+.adressDetail {
+	padding: 15upx 0;
+}
+.orderCode {
+	padding-left: 15upx;
+	font-weight: 500;
+}
+.adressbottom {
+	padding: 0 36upx;
+	color: #606266;
+	border-top: 16upx solid #f5f5f5;
+	padding-bottom: 32upx;
+	margin-bottom: 100upx;
+	view {
+		padding: 32upx 0 0 0;
 	}
-	.cart-list {
-		background-color: #fff;
-		
+
+	.time {
+		padding-left: 16upx;
 	}
-		
-	.topTip {
+}
+.adressbutton {
+	position: fixed;
+	bottom: 0;
+	width: 100%;
+	.buttonStatus {
 		display: flex;
-		align-items: center;
-		justify-content: flex-start;
-		padding: 20upx 36upx;
-	}
-	.changewidth {
-		color: #303133;
-		font-size: 32upx;
-		font-weight: 100!important;
-	}
-	.priceClass {
-		color:#303133!important;
-		font-weight: normal!important;
-		font-size: 36upx;
-	}
-	.van-card {
-		background-color: #fff!important;
-	}
-	.shoplist {
-		padding: 10upx 32upx;
-		border-bottom:1px solid #F5F5F5;
-		// display: flex;
-		// justify-content: space-between;
-		// align-items: center;
-	}
-	.retungood {
-		text-align: right;
-		padding: 0upx 32upx;
-		float: right;
-		border: 1px solid #666;
-		//margin-right: 32upx;
-	}
-	.adress {
-		padding: 35upx 36upx;
-		border-bottom: 14upx solid #F5F5F5;
-	}
-	.adressDetail {
-		padding: 15upx 0;
-	}
-	.orderCode {
-		padding-left: 15upx;
-		font-weight: 500;
-	}
-	.adressbottom {
-		padding: 0 36upx;
-		color: #606266;
-		border-top: 16upx solid #F5F5F5;
-		padding-bottom: 32upx;
-		margin-bottom: 100upx;
-		view {
-			padding: 32upx 0 0 0;
-		}
-			
-		.time {
-			padding-left: 16upx;
+		text-align: center;
+		.deleteOrder {
+			flex: 1;
+			color: #303133;
+			font-size: 32upx;
+			background-color: #fff;
+			padding: 25upx 0;
 		}
-	}
-	.adressbutton {
-		position: fixed;
-		bottom: 0;
-		width: 100%;
-		.buttonStatus {
-			display: flex;
-			text-align: center;
-			.deleteOrder {
-				flex: 1;
-				color: #303133;
-				font-size: 32upx;
-				background-color: #fff;
-				padding: 25upx 0;
-			}
-			.payOrder {
-				flex: 1;
-				font-size: 32upx;
-				color: #fff;
-				background-color: #D9332E;
-				padding: 10px 0;
-			}
+		.payOrder {
+			flex: 1;
+			font-size: 32upx;
+			color: #fff;
+			background-color: #d9332e;
+			padding: 10px 0;
 		}
 	}
+}
 </style>

+ 3 - 10
pages/myOrder/paymoment.vue

@@ -1,15 +1,8 @@
 <template>
 	<view>
-		<van-radio-group >
-		   <van-cell-group 
-		   v-for="(item, index) in list"
-		   :key="index"
-		   >
-			 <van-cell
-			   title-class="changtitle"
-		       :title="item.title"
-			   @click="onChange(index)" 
-		     >
+		<van-radio-group>
+		   <van-cell-group  v-for="(item, index) in list"  :key="index">
+			 <van-cell   title-class="changtitle"   :title="item.title"  @click="onChange(index)">
 			 <template slot="icon" style="padding-right: 10upx;">
 			    <van-radio-group :value="radio" >
 			      <van-radio checked-color="#D9332E" :name="index" >