3 Комити ab0e23ffdc ... c310785b57

Аутор SHA1 Порука Датум
  huangzhe c310785b57 评价及列表,投诉,首页数据渲染,套餐购买数量bug修改 пре 3 година
  huangzhe 177ed3925f 套餐内优惠券分享修改 пре 3 година
  huangzhe 158b64dad3 后端字段修改 пре 3 година

+ 5 - 0
src/core/apiUrl.js

xqd
@@ -69,6 +69,11 @@ const apiUrl = {
         favorite_batch_remove: '/api/user/favorite-batch-remove',
         config: 'api/user/config',
         is_clerk: 'api/user/is-clerk-user',
+		
+		//hxj新增
+		evaluate_list:'api/order-comments/list',
+		del_evaluate:'api/order-comments/del',
+		suggestion:'api/user/submit-suggestion',
     },
     article: {
         list: 'api/default/article-list',

+ 0 - 1
src/core/request.js

xqd
@@ -45,7 +45,6 @@ const request = async function (args) {
         data: args.data,
         header: header
     });
-	console.log('request',error,response)
     if (error) {
         let msg = {
             code: 400,

+ 1 - 1
src/pages.json

xqd
@@ -1596,7 +1596,7 @@
 				{
 					"path": "detail/detail",
 					"style": {
-						"navigationBarTitleText": ""
+						"navigationBarTitleText": "套餐内商品"
 					}
 				}
 			]

+ 11 - 7
src/pages/case/components/hxj-bd-info.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -4,7 +4,7 @@
 			<view class="main-between-y">
 				<view class="main-left cross-center">
 					<view class="hxj-name t-omit">{{name}}</view>
-					<view class="hxj-tags">套装</view>
+					<view class="hxj-tags">{{tag}}</view>
 					<view class="hxj-ynum">已售{{sales}}+</view>
 				</view>
 				<view class="main-left cross-center hjx-tc-999 hjx-ts-22">
@@ -12,10 +12,12 @@
 					<view class="hjx-text-decoration-line-through">{{originalPrice}}元</view>
 				</view>
 				<view class="hjx-tc-AE8445 hjx-ts-22 hjx-tw-500" style="margin:26rpx 0 22rpx ;">券后价</view>
-				<view class="hxj-price"><text class="rmb">¥</text>{{price}}<text class="dw">元</text></view>
+				<view class="hxj-price"><text class="rmb">¥</text>{{discount_amount}}<text class="dw">元</text></view>
 			</view>
 			<view class="main-between-y">
-				<view class="main-center cross-center lq" @click="receive">领券<image src="../../../static/image/index/arrow-right-facet-white.png" mode=""></image></view>
+				<view>
+					<view v-if="coupons.length>0" class="main-center cross-center lq" @click="receive">领券<image src="../../../static/image/index/arrow-right-facet-white.png" mode=""></image></view>
+				</view>
 				<view class="cross-center se" v-if="isShowShare" @click="shareClick">
 					<image src="https://t17.9026.com/web/statics/image/index/share_y.png" mode=""></image>分享
 				</view>
@@ -31,7 +33,7 @@
 			<bd-quick-share v-model="quickShareShow" @quickShare="quickShare" :goods-id="goodsId"
 				:is-video-number="goods.is_video_number" :extra-quick-share="extraQuickShare"
 				:app-share-pic="appSharePic" :app-share-title="appShareTitle"></bd-quick-share>
-			<app-share-qr-code @share="testShare" v-model="shareShow" :url="newShareUrl" :goods="goods"
+			<app-share-qr-code @share="testShare" v-model="shareShow" :url="newShareUrl" 
 				:poster-config="posterConfig" :poster-generate="posterGenerate" :has-poster-nav="hasPosterNav"
 				:app-share-pic="appSharePic" :app-share-title="appShareTitle"></app-share-qr-code>
 		</template>
@@ -50,7 +52,7 @@
 		props: {
 			name: String,
 			theme: Object,
-			price: {
+			discount_amount: {
 				type: [Number, String]
 			},
 			originalPrice: {
@@ -59,6 +61,8 @@
 			sales: {
 				type: [Number, String]
 			},
+			coupons:Array,
+			tag:String,
 			goodsId: Number,
 			goods: Object,
 			house_layout:String,
@@ -108,7 +112,7 @@
 					return this.shareUrl;
 				} else {
 					if (this.goodsId) {
-						return this.$api.poster.goods + '&goods_id=' + this.goodsId;
+						return this.$api.poster.goods + '&composition_id=' + this.goodsId;
 					} else {
 						return ``;
 					}
@@ -158,7 +162,7 @@
 		}
 
 		.hxj-tags {
-			width: 56rpx;
+			max-width: 56rpx;
 			height: 30rpx;
 			background: #040404;
 			font-size: 20rpx;

+ 3 - 6
src/pages/case/hot_sale_project.vue

xqd xqd
@@ -19,11 +19,11 @@
 			<view class="item" v-for="(item,index) in CompositionList" :key="index" @click="goPage(item.id)">
 				<view class="main-between img">
 					<view style="width: 419rpx;height: 281rpx;">
-						<image style="width: 419rpx;height: 281rpx;" :src="'https://img0.baidu.com/it/u=2817072178,3148297616&fm=26&fmt=auto'" mode=""></image>
+						<image style="width: 419rpx;height: 281rpx;" :src="item.cover_img" mode=""></image>
 					</view>
 					<view style="width: 206rpx;">
-						<image style="width: 206rpx;height: 136rpx;" :src="item.banner_imgs[1]?item.banner_imgs[1]:'https://img0.baidu.com/it/u=3232043632,3119790085&fm=26&fmt=auto'" mode=""></image>
-						<image style="width: 206rpx;height: 136rpx;" :src="item.banner_imgs[1]?item.banner_imgs[1]:'https://img0.baidu.com/it/u=2817072178,3148297616&fm=26&fmt=auto'" mode=""></image>
+						<image style="width: 206rpx;height: 136rpx;" :src="item.banner_imgs[0].banner_imgs" mode=""></image>
+						<image style="width: 206rpx;height: 136rpx;" :src="item.banner_imgs[1].banner_imgs" mode=""></image>
 					</view>
 				</view>
 				<view class="main-between pl" >
@@ -94,9 +94,6 @@
 				}).then(res=>{
 					if(res.code===0){
 						this.CompositionList=res.data.list
-						this.CompositionList[0].id=18
-						this.CompositionList[0].price=688.00
-						this.CompositionList[1].id=20
 					}
 				})
 			}

+ 220 - 208
src/pages/case/projectInfo.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -1,7 +1,7 @@
 <template>
 	<app-layout>
-		<view v-if="!goods" class="u-goods-detail"></view>
-		<template v-if="goods">
+		<view v-if="!compositionList" class="u-goods-detail"></view>
+		<template v-if="compositionList">
 			<app-nav-bar v-if="true" :fixed="true" :background-color="''" :xStyle="1" :hasMallSetting="2"
 				:hasHeight="false"></app-nav-bar>
 
@@ -19,12 +19,12 @@
 					</view>
 				</view>
 				<hxj-scroll-list :itemWidth="'168rpx'" :itemHeight="'168rpx'" :list="list"></hxj-scroll-list>
-				<hxj-bd-info :theme="getTheme" :name="compositionList.name" :price="compositionList.price" :original-price="compositionList.price"
-					:sales="Number(compositionList.sale_num)+Number(compositionList.virtual_sale_num)" :measure="compositionList.measure" :house_layout="compositionList.house_layout" :goods-id="goodsId" :extra-quick-share="extra_quick_share"
+				<hxj-bd-info :theme="getTheme" :name="compositionList.name" :discount_amount="compositionList.discount_amount" :original-price="compositionList.price"
+					:sales="Number(compositionList.sale_num)+Number(compositionList.virtual_sale_num)" :tag="compositionList.tag" :measure="compositionList.measure" :house_layout="compositionList.exampleHouse.name" :goods-id="compositionList.id" :coupons="goods_coupon_center" :extra-quick-share="extra_quick_share"
 					:app-share-pic="app_share_pic ? app_share_pic : goods.pic_url[0].pic_url"
-					:app-share-title="app_share_title ? app_share_title : name"
-					:poster-config="poster_config + `&goods_id=` + goodsId"
-					:poster-generate="poster_generate + `&goods_id=` + goodsId" :has-poster-nav="true" :goods="goods"
+					:app-share-title="compositionList.name"
+					:poster-config="poster_config + `&composition_id=` + compositionList.id"
+					:poster-generate="poster_generate + `&composition_id=` + compositionList.id" :has-poster-nav="true" :goods="goods"
 					@share="hShareAppMessage" @quickShare="quickShare" @receive="receive">
 				</hxj-bd-info>
 				<view class="hxj-goods-list" :style="{ height: isOpen ? 'auto' : '270rpx' }">
@@ -106,13 +106,13 @@
 									}" :class="['bd-btn', leftTip]">
 									加入购物车
 								</view> -->
-								<view :class="[goods.type === 'goods' ? 'bd-btn-right bd-btn-half' : 'box-grow-1']"
+								<view :class="['box-grow-1']"
 									v-if="!(isTip == 0 && sell_time > 0)">
 									<app-jump-button form>
 										<view @click="clickAttr(1)" :style="{
-												background: goods.buy_goods_auth ? getTheme.background_gradient_btn : '#999999',
-												color: goods.buy_goods_auth ? getTheme.main_text : ''
-											}" :class="['bd-btn', 'bd-btn-color', 'box-grow-1', goods.type === 'goods' ? 'bd-btn-right' : '']">
+												background: getTheme.background_gradient_btn ? getTheme.background_gradient_btn : '#999999',
+												color: getTheme.main_text ? getTheme.main_text : ''
+											}" :class="['bd-btn', 'bd-btn-color', 'box-grow-1']">
 											{{ rightRemindText }}
 										</view>
 									</app-jump-button>
@@ -246,57 +246,57 @@
 				sendPath: '',
 				poster_config: this.$api.goods.poster,
 				poster_generate: this.$api.poster.goods_new,
-				// 限时抢购
-				flash_sale: null,
-				checked: null,
-				// 商品服务
-				services: null,
-				// 商品详情
-				detail: null,
-				// 商品ID
-				goodsId: null,
-				// 套餐组合
-				composition: null,
-				autoplay: true,
-				full_reduce: null,
-				goods_marketing_award: null,
-				express: null,
-				goods_marketing: null,
-				exchangeStatus: null,
-				exchange: null,
+				// // 限时抢购
+				// flash_sale: null,
+				// checked: null,
+				// // 商品服务
+				// services: null,
+				// // 商品详情
+				// detail: null,
+				// // 商品ID
+				// goodsId: null,
+				// // 套餐组合
+				// composition: null,
+				// autoplay: true,
+				// full_reduce: null,
+				// goods_marketing_award: null,
+				// express: null,
+				// goods_marketing: null,
+				// exchangeStatus: null,
+				// exchange: null,
 
-				price: null,
-				level_show: null,
-				sales: null,
-				unit: null,
-				is_sales: null,
-				extra_quick_share: null,
-				price_max: null,
-				price_min: null,
-				price_member_max: null,
-				price_member_min: null,
-				original_price: null,
-				subtitle: null,
-				is_negotiable: null,
-				name: null,
-				app_share_pic: null,
-				app_share_title: null,
-				goodsType: null,
-				favorite: null,
+				// price: null,
+				// level_show: null,
+				// sales: null,
+				// unit: null,
+				// is_sales: null,
+				// extra_quick_share: null,
+				// price_max: null,
+				// price_min: null,
+				// price_member_max: null,
+				// price_member_min: null,
+				// original_price: null,
+				// subtitle: null,
+				// is_negotiable: null,
+				// name: null,
+				// app_share_pic: null,
+				// app_share_title: null,
+				// goodsType: null,
+				// favorite: null,
 				goods_coupon_center: null,
-				guarantee_title: null,
-				guarantee_pic: null,
-				param_content: null,
-				param_name: null,
-				attr_groups: null,
-				goods_num: null,
-				good_stock: null,
-				min_number: null,
-				limit_buy: null,
-				disable: 'disable',
-				sell_time: 0,
-				template_message_list: [],
-				is_finish_sell: false
+				// guarantee_title: null,
+				// guarantee_pic: null,
+				// param_content: null,
+				// param_name: null,
+				// attr_groups: null,
+				// goods_num: null,
+				// good_stock: null,
+				// min_number: null,
+				// limit_buy: null,
+				// disable: 'disable',
+				// sell_time: 0,
+				// template_message_list: [],
+				// is_finish_sell: false
 			};
 		},
 		computed: {
@@ -410,9 +410,9 @@
 			if (this.isLogin) {
 				this.$store.dispatch('user/info');
 			}
-			this.goodsId = options.id;
+			this.compositionList.id = options.id;
 			// #ifndef MP-ALIPAY
-			this.loadData(this.goodsId, options);
+			this.loadData(this.compositionList.id, options);
 			// #endif
 			this.sendPath = '/pages/goods/goods?id=' + options.id;
 			console.log(this.sendPath);
@@ -427,7 +427,7 @@
 			setTimeout(() => {
 				this.showClose = true;
 				// #ifdef MP-ALIPAY
-				this.loadData(this.goodsId, this.exchange);
+				this.loadData(this.compositionList.id, this.exchange);
 				// #endif
 			});
 		},
@@ -438,10 +438,10 @@
 		onShareTimeline() {
 			// 分享朋友圈beta
 			return this.$shareTimeline({
-				title: this.app_share_title ? this.app_share_title : this.name,
+				title: this.compositionList.name,
 				imageUrl: this.goods.pic_url[0].pic_url,
 				query: {
-					id: this.goodsId
+					id: this.compositionList.id
 				}
 			});
 		},
@@ -455,9 +455,9 @@
 			},
 			hShareAppMessage(s = false) {
 				return this.$shareAppMessage({
-						title: this.app_share_title ? this.app_share_title : this.name,
-						imageUrl: this.app_share_pic ? this.app_share_pic : this.goods.pic_url[0].pic_url,
-						path: '/pages/goods/goods',
+						title: this.compositionList.name,
+						// imageUrl: this.app_share_pic ? this.app_share_pic : this.goods.pic_url[0].pic_url,
+						path: '/pages/case/projectInfo',
 						desc: this.subtitle,
 						params: {
 							id: this.goodsId
@@ -516,10 +516,11 @@
 				});
 			},
 			loadData(id, options) {
+				this.$showLoading();
 				this.$request({
 					url: this.$api.composition.info,
 					data: {
-						composition_id: 3
+						composition_id: id
 					},
 					method: 'post'
 				}).then(res => {
@@ -533,126 +534,139 @@
 							this.list.push({image,link:`/pages/goods/goods?id=${id}`,name,goods_num})
 						}
 					}
+					this.$hideLoading();
 				})
-				return new Promise((resolve, reject) => {
-					this.$showLoading();
-					this.$request({
-							url: this.$api.goods.detail,
-							data: {
-								id: id,
-								plugin: options && options.exchange ? 'exchange' : 'mall'
-							}
-						})
-						.then(response => {
-							this.$hideLoading();
-							if (response.code === 0) {
-								let {
-									services,
-									detail,
-									name,
-									vip_card_appoint,
-									plugin_extra,
-									id,
-									goods_activity,
-									goods_marketing_award,
-									goods_marketing,
-									express,
-									price,
-									sales,
-									level_show,
-									is_sales,
-									unit,
-									extra_quick_share,
-									price_max,
-									price_min,
-									price_member_max,
-									price_member_min,
-									original_price,
-									subtitle,
-									is_negotiable,
-									app_share_title,
-									app_share_pic,
-									type,
-									favorite,
-									goods_coupon_center,
-									guarantee_title,
-									guarantee_pic,
-									param_content,
-									param_name,
-									attr_groups,
-									goods_num,
-									good_stock,
-									min_number,
-									limit_buy,
-									sell_time,
-									template_message_list,
-									is_finish_sell
-								} = response.data.goods;
-								this.app_share_pic = app_share_pic;
-								this.app_share_title = app_share_title;
-								this.goods = response.data.goods;
-								this.services = services;
-								this.detail = detail;
-								this.goodsId = id;
-								this.flash_sale = plugin_extra.flash_sale;
-								this.composition = plugin_extra.composition;
-								this.goods_marketing_award = goods_marketing_award;
-								this.goods_marketing = goods_marketing;
-								this.express = express;
-								this.price = price;
-								this.level_show = level_show;
-								this.sales = sales;
-								this.unit = unit;
-								this.is_sales = is_sales;
-								this.price_max = price_max;
-								this.price_min = price_min;
-								this.price_member_max = price_member_max;
-								this.price_member_min = price_member_min;
-								this.original_price = original_price;
-								this.subtitle = subtitle;
-								this.is_negotiable = is_negotiable;
-								this.extra_quick_share = extra_quick_share;
-								this.goodsType = type;
-								this.favorite = favorite;
-								this.goods_coupon_center = goods_coupon_center;
-								this.guarantee_title = guarantee_title;
-								this.param_content = param_content;
-								this.guarantee_pic = guarantee_pic;
-								this.attr_groups = attr_groups;
-								this.param_name = param_name;
-								this.goods_num = goods_num;
-								this.good_stock = good_stock;
-								this.min_number = min_number;
-								this.limit_buy = limit_buy;
-								this.sell_time = sell_time;
-								this.template_message_list = template_message_list;
-								this.is_finish_sell = is_finish_sell;
-								if (goods_activity) {
-									this.full_reduce = goods_activity.full_reduce;
-								}
-								if (vip_card_appoint.discount || vip_card_appoint.discount === '0.00') {
-									this.is_vip = true;
-									this.discount = vip_card_appoint.discount;
-								}
-								this.is_vip_card_user = vip_card_appoint.is_vip_card_user;
-								this.loadRecommend();
-								// #ifdef H5
-								this.hShareAppMessage();
-								// #endif
-								resolve();
-							} else {
-								uni.showToast({
-									title: response.msg,
-									icon: 'none'
-								});
-								reject();
-							}
-						})
-						.catch(() => {
-							reject();
-							this.$hideLoading();
-						});
-				});
+				this.$request({
+					url: this.$api.coupon.list,
+					data: {
+						composition_id: id,
+						limit:100,
+					},
+					method: 'get'
+				}).then(res => {
+					if(res.code===0){
+						this.goods_coupon_center=res.data.list
+					}
+				})
+				// return new Promise((resolve, reject) => {
+				// 	this.$showLoading();
+				// 	this.$request({
+				// 			url: this.$api.goods.detail,
+				// 			data: {
+				// 				id: 18,
+				// 				plugin: options && options.exchange ? 'exchange' : 'mall'
+				// 			}
+				// 		})
+				// 		.then(response => {
+				// 			this.$hideLoading();
+				// 			if (response.code === 0) {
+				// 				let {
+				// 					services,
+				// 					detail,
+				// 					name,
+				// 					vip_card_appoint,
+				// 					plugin_extra,
+				// 					id,
+				// 					goods_activity,
+				// 					goods_marketing_award,
+				// 					goods_marketing,
+				// 					express,
+				// 					price,
+				// 					sales,
+				// 					level_show,
+				// 					is_sales,
+				// 					unit,
+				// 					extra_quick_share,
+				// 					price_max,
+				// 					price_min,
+				// 					price_member_max,
+				// 					price_member_min,
+				// 					original_price,
+				// 					subtitle,
+				// 					is_negotiable,
+				// 					app_share_title,
+				// 					app_share_pic,
+				// 					type,
+				// 					favorite,
+				// 					goods_coupon_center,
+				// 					guarantee_title,
+				// 					guarantee_pic,
+				// 					param_content,
+				// 					param_name,
+				// 					attr_groups,
+				// 					goods_num,
+				// 					good_stock,
+				// 					min_number,
+				// 					limit_buy,
+				// 					sell_time,
+				// 					template_message_list,
+				// 					is_finish_sell
+				// 				} = response.data.goods;
+				// 				this.app_share_pic = app_share_pic;
+				// 				this.app_share_title = app_share_title;
+				// 				this.goods = response.data.goods;
+				// 				this.services = services;
+				// 				this.detail = detail;
+				// 				this.goodsId = id;
+				// 				this.flash_sale = plugin_extra.flash_sale;
+				// 				this.composition = plugin_extra.composition;
+				// 				this.goods_marketing_award = goods_marketing_award;
+				// 				this.goods_marketing = goods_marketing;
+				// 				this.express = express;
+				// 				this.price = price;
+				// 				this.level_show = level_show;
+				// 				this.sales = sales;
+				// 				this.unit = unit;
+				// 				this.is_sales = is_sales;
+				// 				this.price_max = price_max;
+				// 				this.price_min = price_min;
+				// 				this.price_member_max = price_member_max;
+				// 				this.price_member_min = price_member_min;
+				// 				this.original_price = original_price;
+				// 				this.subtitle = subtitle;
+				// 				this.is_negotiable = is_negotiable;
+				// 				this.extra_quick_share = extra_quick_share;
+				// 				this.goodsType = type;
+				// 				this.favorite = favorite;
+				// 				this.goods_coupon_center = goods_coupon_center;
+				// 				this.guarantee_title = guarantee_title;
+				// 				this.param_content = param_content;
+				// 				this.guarantee_pic = guarantee_pic;
+				// 				this.attr_groups = attr_groups;
+				// 				this.param_name = param_name;
+				// 				this.goods_num = goods_num;
+				// 				this.good_stock = good_stock;
+				// 				this.min_number = min_number;
+				// 				this.limit_buy = limit_buy;
+				// 				this.sell_time = sell_time;
+				// 				this.template_message_list = template_message_list;
+				// 				this.is_finish_sell = is_finish_sell;
+				// 				if (goods_activity) {
+				// 					this.full_reduce = goods_activity.full_reduce;
+				// 				}
+				// 				if (vip_card_appoint.discount || vip_card_appoint.discount === '0.00') {
+				// 					this.is_vip = true;
+				// 					this.discount = vip_card_appoint.discount;
+				// 				}
+				// 				this.is_vip_card_user = vip_card_appoint.is_vip_card_user;
+				// 				this.loadRecommend();
+				// 				// #ifdef H5
+				// 				this.hShareAppMessage();
+				// 				// #endif
+				// 				resolve();
+				// 			} else {
+				// 				uni.showToast({
+				// 					title: response.msg,
+				// 					icon: 'none'
+				// 				});
+				// 				reject();
+				// 			}
+				// 		})
+				// 		.catch(() => {
+				// 			reject();
+				// 			this.$hideLoading();
+				// 		});
+				// });
 
 			},
 			onAttr(data) {
@@ -696,30 +710,28 @@
 				});
 			},
 			clickAttr(data) {
-				console.log('开始');
-				if (data === 1 && this.sell_time > 0) {
-					this.rightTip();
-					return;
-				}
-				if (!this.goods.buy_goods_auth) {
-					this.$tips.showToast({
-						title: '您暂无权限购买该商品',
-						icon: 'none'
-					});
-					return;
-				}
-				if (this.goods.type === 'ecard' && data === 0) {
-					this.$tips.showToast({
-						title: '虚拟商品不允许加入购物车',
-						icon: 'none'
-					});
-					return;
-				}
+				// if (data === 1 && this.sell_time > 0) {
+				// 	this.rightTip();
+				// 	return;
+				// }
+				// if (!this.goods.buy_goods_auth) {
+				// 	this.$tips.showToast({
+				// 		title: '您暂无权限购买该商品',
+				// 		icon: 'none'
+				// 	});
+				// 	return;
+				// }
+				// if (this.goods.type === 'ecard' && data === 0) {
+				// 	this.$tips.showToast({
+				// 		title: '虚拟商品不允许加入购物车',
+				// 		icon: 'none'
+				// 	});
+				// 	return;
+				// }
 				uni.navigateTo({
 					url: `/plugins/composition/detail/detail?composition_id=${this.compositionList.id}`
 				});
 				// this.attrShow = true;
-				console.log('结束');
 			},
 			setCoupon(index) {
 				this.$set(this.goods_coupon_center[index], 'is_receive', 1);

+ 5 - 2
src/pages/goods/goods.vue

xqd xqd xqd
@@ -78,7 +78,7 @@
                 :pickup="goods_marketing.pickup"
             ></bd-kb>
             <!--套餐组合-->
-            <view @click="toComposition" class="goods-composition" v-if="composition && composition.list.length > 0">
+            <view  class="goods-composition" v-if="composition && composition.list.length > 0">
                 <view class="goods-composition-title">套餐组合</view>
                 <uni-swiper-dot :current="current" :theme="getTheme" :info="composition.list" mode="customize">
                     <swiper @change="change" class="goods-composition-swiper" :current="current" :autoplay="true">
@@ -87,10 +87,12 @@
                         </swiper-item>
                     </swiper>
                 </uni-swiper-dot>
+				<navigator url="/pages/case/hot_sale_project" hover-class="none">
                 <view class="goods-composition-more main-between cross-center">
                     <view>更多套餐组合</view>
                     <image src="https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png"></image>
                 </view>
+				</navigator>
             </view>
             <bd-comments :goods-id="goodsId"></bd-comments>
             <!--商品详情-->
@@ -528,7 +530,8 @@
             toComposition(item) {
                 let id = item.id > 0 ? item.id : this.composition.list[0].id
                 uni.navigateTo({
-                    url: this.composition.url + '?goods_id=' + this.goodsId + '&composition_id=' + id
+                    // url: this.composition.url + '?goods_id=' + this.goodsId + '&composition_id=' + id
+					url: '/pages/case/projectInfo?id='+ id
                 })
             },
             loadData(id, options) {

+ 45 - 43
src/pages/index/hxj_index_component.vue

xqd xqd xqd xqd xqd xqd xqd xqd
@@ -3,15 +3,13 @@
 		<view class="swiper_cent">
 			<swiper style="height: 900rpx;" :indicator-dots="false" :autoplay="false" :interval="3000" :duration="1000"
 				@change="swiperChange">
-				<swiper-item v-for="(item,index) in 3" :key="index">
-					<image src="https://t17.9026.com/web/statics/image/index/1.png" style="width: 100%;height: 900rpx;"
-						mode=""></image>
+				<swiper-item v-for="(item,index) in homePages[0].data.banners" :key="index" @click="goPage(item.url)">
+					<image :src="item.picUrl" style="width: 100%;height: 900rpx;" mode=""></image>
 				</swiper-item>
 			</swiper>
 			<view class="swiper_zhishi">
-				<view :class="swiperKey===i?'view_active':''" v-for="(item1,i) in 3" :key="i"></view>
+				<view :class="swiperKey===i?'view_active':''" v-for="(item1,i) in homePages[0].data.banners.length" :key="i"></view>
 			</view>
-
 		</view>
 		<view class="link">
 			<view>
@@ -28,14 +26,14 @@
 			<view class="subtitle">臻选整装 · 安全无甲醛 · 7天入住</view>
 		</view>
 		<view class="lg_list">
-			<view class="item" v-for="(item,index) in jdlg" :key="index"
-				@click="goPage('/pages/case/projectInfo?id=9')">
-				<image class="imgBox" :src="`https://t17.9026.com/web/statics/image/index/${item.cover_image}.png`">
+			<view class="item" v-for="(item,index) in homePages[5].data.list" :key="index"
+				@click="goPage(item.type=='goods'?`/pages/goods/goods?id=${item.id}`:`/pages/case/projectInfo?id=${item.id}`)">
+				<image class="imgBox" :src="item.cover_pic">
 				</image>
 				<view class="b_card main-between">
 					<view class="left">
-						<view class="title">{{item.title}}</view>
-						<view class="desc">{{item.sub_title}}</view>
+						<view class="title t-omit" style="width: 420rpx;">{{item.name}}</view>
+						<view class="desc t-omit" style="width: 420rpx;">{{item.subtitle}}</view>
 					</view>
 					<view class="right">
 						<view class="price"><text class="rmb">¥</text><text>{{item.price}}</text><text
@@ -57,15 +55,15 @@
 
 		</view>
 		<view class="coupon main-left">
-			<view class="item main-left" v-for="(item,index) in 2" :key="index">
+			<view class="item main-left" v-for="(item,index) in homePages[6].data.coupon_list" :key="index" @click="goPage(`/pages/coupon/list/list`)">
 				<view class="Wb">
 					<view>
 						<view class="title_2">定制优享礼券 <text class="hjx-tc-B19D60 hjx-ts-21 hxj-ml-10">立即领取</text></view>
 						<view class="desc_2">新用户礼遇</view>
 					</view>
 					<view>
-						<view class="price"><text>¥</text>100</view>
-						<view class="yxq">有效期至2021-12-31</view>
+						<view class="price"><text>¥</text>{{item.sub_price}}</view>
+						<view class="yxq">有效期至{{item.end_time.split(' ')[0]}}</view>
 					</view>
 				</view>
 			</view>
@@ -118,8 +116,7 @@
 		<view class="main-between link mt_20">
 			<view class="title1">
 				限时团购
-				<image class="coupon_1"
-					src="https://t17.9026.com/web/statics/image/index/coupon_1.png" mode="">
+				<image class="coupon_1" src="https://t17.9026.com/web/statics/image/index/coupon_1.png" mode="">
 				</image>
 				<text class="coupon_sub">TUANGOU</text>
 			</view>
@@ -155,10 +152,11 @@
 			</swiper>
 		</view>
 		<view class="link main-left">
-			<view class="title1" style="margin-right: 61rpx;">荟享自营</view>
-			<view class="title1" style="margin-right: 61rpx;color: #A7A7A7;">精选类别</view>
+			<!-- <view class="title1" style="margin-right: 61rpx;">荟享自营</view>
 			<view class="title1" style="margin-right: 61rpx;color: #A7A7A7;">精选类别</view>
 			<view class="title1" style="margin-right: 61rpx;color: #A7A7A7;">精选类别</view>
+			<view class="title1" style="margin-right: 61rpx;color: #A7A7A7;">精选类别</view> -->
+			<view class="title1" style="margin-right: 61rpx;" :style="{'color':bottom_goods_index===index?'':'#A7A7A7'}" v-for="(item,index) in homePages[11].data.catList" @click="selectCat(index)">{{item.menuName}}</view>
 			<image class="tyx" src="https://t17.9026.com/web/statics/image/index/tyx.png" mode=""></image>
 		</view>
 		<view class="hxzy">
@@ -175,15 +173,15 @@
 				</view>
 			</view>
 			<view class="dir-left-wrap bottom">
-				<view class="item" v-for="(item,index) in 4" :key="index"
-					@click="goPage(`/pages/goods/goods?id=${18+index}`)">
+				<view class="item" v-for="(item,index) in homePages[11].data.catList[bottom_goods_index].goodsList" :key="index"
+					@click="goPage(`/pages/goods/goods?id=${item.id}`)">
 					<view>
-						<image class="cover" :src="`https://t17.9026.com/web/statics/image/index/${index+10}.png`"
+						<image class="cover" :src="item.cover_pic"
 							mode=""></image>
 					</view>
-					<view class="title_2">马蒂斯系列 烟灰缸/首饰盘</view>
-					<view class="desc_2">细节控 · 创意</view>
-					<view class="price" style="margin-top: 27rpx;"><text class="rmb">¥</text><text>258</text><text
+					<view class="title_2 t-omit" style="width: 320rpx;">{{item.name}}</view>
+					<view class="desc_2">{{item.sales}}</view>
+					<view class="price" style="margin-top: 27rpx;"><text class="rmb">¥</text><text>{{item.price}}</text><text
 							class="dw">元</text></view>
 				</view>
 			</view>
@@ -207,19 +205,21 @@
 		components: {
 			appScrollList
 		},
-		props:{
+		props: {
 			homePages: {
-			  type: Object,
-			  default() {
-			    return {
-			      navs: [],
-			    };
-			  },
+				type: Object,
+				default () {
+					return {
+						navs: [],
+					};
+				},
 			},
 		},
 		data() {
 			return {
+				pageData: '',
 				swiperKey: 0, //轮播位置
+				bottom_goods_index:0, //底部商品分类索引
 				list: [
 
 					{
@@ -265,23 +265,25 @@
 						cover_image: 'temporary/jhk-1634284367308'
 					}
 				],
-				qwe: [{
-					'title': '兴城人居',
-					'cover_image': 'jhk-1634283667210'
-				}, {
-					'title': '世龙广场',
-					'cover_image': 'jhk-1634284372084'
-				}, {
-					'title': '新中式',
-					'cover_image': 'jhk-1634283687206'
-				}]
+				qwe: [
+					{
+						'title': '兴城人居',
+						'cover_image': 'jhk-1634283667210'
+					}, {
+						'title': '世龙广场',
+						'cover_image': 'jhk-1634284372084'
+					}, {
+						'title': '新中式',
+						'cover_image': 'jhk-1634283687206'
+					}, 
+				]
 
 			}
 		},
-		created() {
-			this.$store.dispatch('user/isEnterSales', false);
-		},
 		methods: {
+			selectCat(index){
+				this.bottom_goods_index=index
+			},
 			swiperChange(e) {
 				console.log(e.detail.current)
 				this.swiperKey = e.detail.current

+ 1 - 1
src/pages/index/index.vue

xqd
@@ -30,7 +30,7 @@
                           :is_storage="is_storage" :theme="getTheme" :page_id="page_id" :is_required="is_required"
                           :coupon_req="coupon_req"></app-diy-page> -->
 
-			<hxj-index :home-pages="homePages"></hxj-index>
+			<hxj-index :home-pages="homePages.navs[0].template.data[1].data.list[0].data"></hxj-index>
 		</template>
 		<!-- <app-buy-prompt :isShowAttention="isShowAttention" v-if="config.is_purchase_frame === 1"></app-buy-prompt> -->
 		<app-attr :goods="attrGoods.goods" :attrGroupList="attrGoods.goods.attr_groups" :theme="getTheme"

+ 2 - 2
src/pages/order/index/index.vue

xqd
@@ -359,9 +359,9 @@ export default {
         },
         // 订单评价
         appraise(e) {
-			console.log('qweqweqew',e) 
             uni.navigateTo({
-                url: `/pages/order/appraise/appraise?id=${e.id}`
+                // url: `/pages/order/appraise/appraise?id=${e.id}`
+				url: `/pages/user-center/evaluate/evaluate?id=${e.id}`
             })
         },
         getClerkCode(e) {

+ 47 - 32
src/pages/user-center/about-mall/ComplaintsSuggestions.vue

xqd xqd xqd
@@ -5,7 +5,7 @@
 				<view class="main-left cross-center title">
 					整体评价
 				</view>
-				<textarea class="evalClass"  placeholder-class="evalphlVal" value="" maxlength="30" placeholder="请写下您想咨询的问题或投诉建议,以便更好的为您解决。" />
+				<textarea class="evalClass" v-model="content" auto-height placeholder-class="evalphlVal"  maxlength="200" placeholder="请写下您想咨询的问题或投诉建议,以便更好的为您解决。" />
 			</view>
 		</view>
 		<view class="evalContent">
@@ -15,33 +15,48 @@
 				</view>
 			</view>
 		</view>
-		<view class="uploddimg" @click="uploadImg">
-			<image src="https://t17.9026.com/web/statics/image/user-center/takePicture.png" mode=""></image>
-			<view class="text">上传图片</view>
+
+		<view class='uploddimg'>
+			<app-upload-image  @imageEvent='imageEvent' :count="3" :maxNum='3'></app-upload-image>
 		</view>
 		
-		<button class="tij">提交</button>
+		<button class="tij" @click="submit">提交</button>
 	</view>
 </template>
 
 <script>
+	import AppUploadImage from "@/components/basic-component/app-upload-image/app-upload-image.vue";
 	export default {
+		components: {
+			'app-upload-image': AppUploadImage,
+		},
 		data() {
 			return {
-				
+				content:'',
+				imgs:[]
 			};
 		},
 		methods:{
-			uploadImg(){
-				uni.chooseImage({
-				    count: 6, //默认9
-				    sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-				    sourceType: ['album','camera'], //从相册选择
-				    success:(res)=> {
-				        console.log(JSON.stringify(res.tempFilePaths));
-				    }
-				});
-			}
+			submit(){
+				this.$request({
+					url:this.$api.user.suggestion,
+					data:{
+						content:this.content,
+						imgs:this.imgs
+					},
+					method:'post'
+				}).then(res=>{
+					if(res.code===0){
+						uni.showToast({
+							title:'成功'
+						})
+					}
+				})
+			},
+			// 上传图片
+			imageEvent(e) {
+				this.imgs = e.imageList;
+			},
 		}
 	}
 </script>
@@ -61,32 +76,32 @@
 		color: #FFFFFF;
 	}
 	.uploddimg{
-		width: 187rpx;
-		height: 126rpx;
-		background: #F4F4F4;
+		// width: 187rpx;
+		// height: 126rpx;
+		// background: #F4F4F4;
 		opacity: 0.8;
 		border-radius: 8rpx;
 		margin: 56rpx 36rpx;
 		padding-top: 31rpx;
-		image{
-			width: 48rpx;
-			height: 38rpx;
-			display: block;
-			margin: 0 auto 14rpx;
-		}
-		.text{
-			text-align: center;
-			font-size: 20rpx;
-			font-weight: 500;
-			color: #666666;
-		}
+		// image{
+		// 	width: 48rpx;
+		// 	height: 38rpx;
+		// 	display: block;
+		// 	margin: 0 auto 14rpx;
+		// }
+		// .text{
+		// 	text-align: center;
+		// 	font-size: 20rpx;
+		// 	font-weight: 500;
+		// 	color: #666666;
+		// }
 	}
 	.evalContent{
 		background-color: #fff;
 		margin-top: 16rpx;
 		.evalClass{
 			width: 678rpx;
-			height: 171rpx;
+			min-height: 171rpx;
 			background: #F8F8F8;
 			border-radius: 6rpx;
 			margin: 24rpx auto 0;

+ 195 - 63
src/pages/user-center/evaluate/evaluate.vue

xqd xqd xqd
@@ -1,56 +1,170 @@
 <template>
-	<view >
-		<view class="main-left evaObj">
-			<image src="https://t17.9026.com/web/statics/image/sale/1.png" mode=""></image>
-			<view class="main-between-y">
-				<view class="title">几度米黄色真皮沙发组合,可调节桦木皮艺转角沙发</view>
-				<view class="main-between cross-center">
-					<view class="price">¥2466.00</view>
-					<view class="num">x1</view>
+	<app-layout>
+		<view v-if="is_show">
+			<form>
+				<view v-for='(item,index) in appraiseData' :key='index'>
+					<view class="main-left evaObj">
+						<image mode="aspectFill" :src='item.goods_pic_url'></image>
+						<view class="main-between-y">
+							<view class="title t-omit-two">{{item.goods_name}}</view>
+							<view class="main-between cross-center">
+								<view class="price">¥2466.00</view>
+								<view class="num">x1</view>
+							</view>
+						</view>
+					</view>
+					<view class="evalContent">
+						<view class="item">
+							<view class="main-left cross-center title">
+								<image class="icon"
+									src="https://t17.9026.com/web/statics/image/user-center/evaluate1.png" mode="">
+								</image>整体评价
+							</view>
+							<textarea class="evalClass" placeholder-class="evalphlVal" v-model="item.content" maxlength="30" auto-height
+								placeholder="为了我们更好的反馈,请您填写整体评价" />
+						</view>
+						<view class="item">
+							<view class="main-left cross-center title">
+								<image class="icon"
+									src="https://t17.9026.com/web/statics/image/user-center/evaluate2.png" mode="">
+								</image>材质质量
+							</view>
+							<textarea class="evalClass" placeholder-class="evalphlVal" v-model="item.quality_comment" maxlength="30" auto-height
+								placeholder="为了我们更好的反馈,请您填写材质质量" />
+						</view>
+						<view class="item">
+							<view class="main-left cross-center title">
+								<image class="icon"
+									src="https://t17.9026.com/web/statics/image/user-center/evaluate3.png" mode="">
+								</image>商品风格
+							</view>
+							<textarea class="evalClass" placeholder-class="evalphlVal" v-model="item.style_comment" maxlength="30" auto-height
+								placeholder="为了我们更好的反馈,请您填写材质质量" />
+						</view>
+					</view>
+					<!-- <view class="uploddimg">
+						<image src="https://t17.9026.com/web/statics/image/user-center/takePicture.png" mode=""></image>
+						<view class="text">上传图片</view>
+					</view> -->
+					<view class='image-box'>
+						<app-upload-image :sign='item.id' @imageEvent='imageEvent' :count="3" :maxNum='maxNum'>
+						</app-upload-image>
+					</view>
 				</view>
-			</view>
+				<button class="tij" @click="formSubmit">提交</button>
+			</form>
 		</view>
-		<view class="evalContent">
-			<view class="item">
-				<view class="main-left cross-center title">
-					<image class="icon" src="https://t17.9026.com/web/statics/image/user-center/evaluate1.png" mode=""></image>整体评价
-				</view>
-				<textarea class="evalClass"  placeholder-class="evalphlVal" value="" maxlength="30" placeholder="为了我们更好的反馈,请您填写整体评价" />
-			</view>
-			<view class="item">
-				<view class="main-left cross-center title">
-					<image class="icon" src="https://t17.9026.com/web/statics/image/user-center/evaluate2.png" mode=""></image>材质质量
-				</view>
-				<textarea class="evalClass"  placeholder-class="evalphlVal" value="" maxlength="30" placeholder="为了我们更好的反馈,请您填写材质质量" />
-			</view>
-			<view class="item">
-				<view class="main-left cross-center title">
-					<image class="icon" src="https://t17.9026.com/web/statics/image/user-center/evaluate3.png" mode=""></image>商品风格
-				</view>
-				<textarea class="evalClass"  placeholder-class="evalphlVal" value="" maxlength="30" placeholder="为了我们更好的反馈,请您填写材质质量" />
-			</view>
-		</view>
-		<view class="uploddimg" >
-			<image src="https://t17.9026.com/web/statics/image/user-center/takePicture.png" mode=""></image>
-			<view class="text">上传图片</view>
-		</view>
-		
-		<button class="tij">提交</button>
-	</view>
+	</app-layout>
 </template>
 
 <script>
+	import AppUploadImage from "@/components/basic-component/app-upload-image/app-upload-image.vue";
 	export default {
+		components: {
+			'app-upload-image': AppUploadImage,
+		},
 		data() {
 			return {
-				
+				id: null,
+				maxNum: 6, //最大图片上传数量
+				appraiseData: [],
+				is_show: false,
 			};
+		},
+		onLoad(options) {
+			this.$commonLoad.onload(options);
+			this.id = options.id;
+			this.getOrderDetail();
+		},
+		methods: {
+			// 上传图片
+			imageEvent(e) {
+				let sign = e.sign;
+				let imageList = e.imageList;
+				this.appraiseData.forEach(item => {
+					if (item.id === sign) {
+						item.pic_list = imageList;
+						return false;
+					}
+				});
+				this.appraiseData = this.appraiseData;
+			},
+			formSubmit() {
+				uni.showLoading({
+					title: '提交中'
+				});
+				this.$request({
+					url: this.$api.order.appraise,
+					method: 'post',
+					data: {
+						appraiseData: JSON.stringify(this.appraiseData),
+						order_id: this.id,
+					},
+				}).then(response => {
+					uni.hideLoading();
+					if (response.code === 0) {
+						uni.redirectTo({
+							url: `/pages/order/appraise-finish/index?id=${this.id}`,
+						});
+					} else {
+						uni.showModal({
+							title: '',
+							content: response.msg,
+							showCancel: false
+						})
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				});
+			},
+			getOrderDetail() {
+				this.$showLoading();
+				this.$request({
+					url: this.$api.order.detail,
+					data: {
+						id: this.id
+					}
+				}).then(res => {
+					this.$hideLoading();
+					if (res.code === 0) {
+						let detail = res.data.detail;
+						let appraise = [];
+						detail.detail.forEach(function(item) {
+							appraise.push({
+								id: item.id,
+								goods_pic_url: item.goods_info.pic_url ? item.goods_info.pic_url :
+									item.goods.goodsWarehouse.cover_pic,
+								goods_name: item.goods.goodsWarehouse.name,
+								content: '',
+								quality_comment:'',
+								style_comment:'',
+								pic_list: [],
+								grade_level: 3,
+							})
+						});
+						this.appraiseData = appraise;
+						this.is_show = true;
+					} else {
+						uni.showModal({
+							title: '',
+							content: res.msg,
+							showCancel: false,
+						});
+						// uni.navigateBack();
+					}
+				}).catch(() => {
+					self.$hideLoading();
+				});
+			},
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.tij{
+	.image-box{
+		padding: 40rpx 0 0 36rpx;
+	}
+	.tij {
 		width: 678rpx;
 		height: 90rpx;
 		background: #A18353;
@@ -59,7 +173,8 @@
 		font-weight: bold;
 		color: #FFFFFF;
 	}
-	.uploddimg{
+
+	.uploddimg {
 		width: 187rpx;
 		height: 126rpx;
 		background: #F4F4F4;
@@ -67,67 +182,84 @@
 		border-radius: 8rpx;
 		margin: 56rpx 36rpx;
 		padding-top: 31rpx;
-		image{
+
+		image {
 			width: 48rpx;
 			height: 38rpx;
 			display: block;
 			margin: 0 auto 14rpx;
 		}
-		.text{
+
+		.text {
 			text-align: center;
 			font-size: 20rpx;
 			font-weight: 500;
 			color: #666666;
 		}
 	}
-	.evalContent{
+
+	.evalContent {
 		background-color: #fff;
 		margin-top: 16rpx;
-		.evalClass{
+
+		.evalClass {
 			width: 678rpx;
-			height: 171rpx;
+			min-height: 171rpx;
 			background: #F8F8F8;
 			border-radius: 6rpx;
 			margin: 24rpx auto 0;
 		}
-		/deep/.evalphlVal{
+
+		/deep/.evalphlVal {
 			font-size: 28rpx;
 			font-weight: 500;
 			color: #999999;
 			padding: 33rpx 31rpx;
 		}
-		.item{
+
+		.item {
 			padding: 40rpx 36rpx 0;
-		.title{
-			font-size: 30rpx;
-			font-weight: bold;
-			color: #222222;
+
+			.title {
+				
+				font-size: 30rpx;
+				font-weight: bold;
+				color: #222222;
+			}
+
+			.icon {
+				width: 32rpx;
+				height: 32rpx;
+				margin-right: 11rpx;
+			}
 		}
-		.icon{
-			width: 32rpx;
-			height: 32rpx;
-			margin-right: 11rpx;
-		}}
 	}
-	.evaObj{
-		padding: 37rpx 37rpx 0;
+
+	.evaObj {
+		padding: 37rpx 37rpx 20px;
 		background-color: #fff;
-		image{
-			width: 111rpx;height: 110rpx;
+
+		image {
+			width: 111rpx;
+			height: 110rpx;
 			margin-right: 24rpx;
 		}
-		.title{
+
+		.title {
+			width: 530rpx;
 			font-size: 26rpx;
-			
+
 			font-weight: 500;
 			color: #666666;
 		}
-		.price{
+
+		.price {
 			font-size: 24rpx;
 			font-weight: 500;
 			color: #222222;
 		}
-		.num{
+
+		.num {
 			font-size: 22rpx;
 			font-family: PingFang SC;
 			font-weight: 500;

+ 265 - 176
src/pages/user-center/evaluate/list.vue

xqd
@@ -1,204 +1,293 @@
 <template>
-	<view class="page">
-		<view class="box" v-for="(item,index) in evaluateList" :key="index">
-			<view class="main-between cross-center header">
-				<view class="cross-center head">
-					<image src="https://t17.9026.com/web/statics/image/sale/1.png" mode=""></image>
-					周先生
-				</view>
-				<view class="main-between cross-center">
-					<view class="date">2021-11-17</view>
-					<image class="del" src="https://t17.9026.com/web/statics/image/user-center/del.png" mode="" @click="delEval(index)"></image>
-				</view>
-			</view>
-			<view class="center" :style="{'height':item.isSpread?'auto':'174rpx'}">
-				<view class="main-between cross-center">
-					<view class="title">整体评价</view>
-					<view class="isopen cross-center" @click="Spread(index,1)" v-show="!item.isSpread">
-						展开
-						<image src="https://t17.9026.com/web/statics/image/user-center/arrow-bottom.png" mode=""></image>
+	<app-layout>
+		<view class="page">
+			<view class="box" v-for="(item,index) in evaluateList" :key="index">
+				<view class="main-between cross-center header">
+					<view class="cross-center head">
+						<image :src="userInfo.avatar" mode=""></image>
+						{{userInfo.nickname}}
+					</view>
+					<view class="main-between cross-center">
+						<view class="date">
+							{{item.is_virtual===0?item.virtual_time.split(' ')[0]:item.created_at.split(' ')[0]}}</view>
+						<image class="del" src="https://t17.9026.com/web/statics/image/user-center/del.png" mode=""
+							@click="delEval(index,item.id)"></image>
 					</view>
 				</view>
-				<view class="center-text">基本上任何一件服装都包含了来自可能多达数十位供应商的零部件和服务</view>
-				<view class="center-img"><image v-for="(item, index) in 5" :key="index" src="https://t17.9026.com/web/statics/image/user-center/1.png" mode=""></image></view>
-				<view class="main-between goods" >
-					<view class="main-left desc">
-						<image class="goods-img" src="https://t17.9026.com/web/statics/image/user-center/1.png" mode=""></image>
-						<view>
-							<view class="title">兴城人居ins居家占位套餐</view>
-							<view class="price">
-								<text class="company">¥</text>
-								2466.00
-							</view>
+				<view class="center" :style="{'height':item.isSpread?'auto':'140rpx'}">
+					<view class="main-between cross-center">
+						<view class="title">整体评价</view>
+						<view class="isopen cross-center" @click="Spread(index,1)" v-show="!item.isSpread">
+							展开
+							<image src="https://t17.9026.com/web/statics/image/user-center/arrow-bottom.png" mode="">
+							</image>
 						</view>
 					</view>
-					<view class="isopen cross-center" @click="Spread(index,0)">
-						收起
-						<image src="https://t17.9026.com/web/statics/image/user-center/arrow-top.png" mode=""></image>
-					</view>
+					<view class="center-text">{{item.content}}</view>
+
+					<template v-show="item.isSpread">
+						<view class="main-between cross-center">
+							<view class="title">材料质量</view>
+						</view>
+						<view class="center-text">{{item.quality_comment}}</view>
+
+						<view class="main-between cross-center">
+							<view class="title">商品风格</view>
+						</view>
+						<view class="center-text">{{item.style_comment}}</view>
+						<view class="center-img">
+							<image v-for="(item1, index1) in item.pic_url" :key="index1" :src="item1" mode=""></image>
+						</view>
+						<view class="main-between goods">
+							<view class="main-left desc">
+								<image class="goods-img" :src="item.cover_img" mode=""></image>
+								<view>
+									<view class="title t-omit">{{item.goods_name}}</view>
+									<view class="price">
+										<text class="company">¥</text>
+										{{item.order_amount}}
+									</view>
+								</view>
+							</view>
+							<view class="isopen cross-center" @click="Spread(index,0)">
+								收起
+								<image src="https://t17.9026.com/web/statics/image/user-center/arrow-top.png" mode="">
+								</image>
+							</view>
+						</view>
+					</template>
 				</view>
 			</view>
+
+			<view class="no-more">没有更多了...</view>
 		</view>
-		
-		<view class="no-more">没有更多了...</view>
-	</view>
+	</app-layout>
 </template>
 
 <script>
-export default {
-	data() {
-		return {
-			evaluateList:[
-				{
-					isSpread:false
-				},
-				{
-					isSpread:false
-				}
-			]
-		};
-	},
-	methods:{
-		delEval(index){
-			uni.showModal({
-				title: '提示',
-				content: '确定删除这条评价吗',
-				success: (res)=> {
-					if (res.confirm) {
-						console.log('用户点击确定');
-						this.evaluateList.splice(index,1)
-					} else if (res.cancel) {
-						console.log('用户点击取消');
-					}
-				}
-			});
+	import {
+		mapState
+	} from "vuex"
+	export default {
+		data() {
+			return {
+				page: 1,
+				evaluateList: []
+			};
+		},
+		computed: {
+			...mapState({
+				userInfo: state => state.user.info,
+			})
+		},
+		onLoad() {
+			this.getData()
+		},
+		onReachBottom() {
+			this.page++
+			this.getData()
 		},
-		Spread(index,i){
-			i?this.evaluateList[index].isSpread=true:this.evaluateList[index].isSpread=false
+		methods: {
+			getData() {
+				this.$showLoading()
+				this.$request({
+					url: `${this.$api.user.evaluate_list}&page=${this.page}`,
+					method: 'post'
+				}).then(res => {
+					if (res.code === 0) {
+						let evaluateList = res.data.list
+						for (let i = 0; i < evaluateList.length; i++) {
+							evaluateList[i].isSpread = false
+							evaluateList[i].pic_url = JSON.parse(evaluateList[i].pic_url)
+						}
+						if (this.page === 1) {
+							this.evaluateList = evaluateList
+						} else {
+							this.evaluateList = this.evaluateList.concat(evaluateList)
+						}
+					}
+					this.$hideLoading()
+				}).catch(rej => {
+					this.$hideLoading()
+				})
+			},
+			delEval(index,id) {
+				uni.showModal({
+					title: '提示',
+					content: '确定删除这条评价吗',
+					success: (res) => {
+						if (res.confirm) {
+							console.log('用户点击确定');
+							this.$request({
+								url:this.$api.user.del_evaluate,
+								data:{
+									id:id
+								},
+								method:'post'
+							}).then(res=>{
+								if(res.code===0){
+									uni.showToast({
+										title:'删除成功',
+									})
+									this.evaluateList.splice(index, 1)
+								}else{
+									uni.showToast({
+										title:'删除失败',
+									})
+								}
+							})
+						} else if (res.cancel) {
+							console.log('用户点击取消');
+						}
+					}
+				});
+			},
+			Spread(index, i) {
+				i ? this.evaluateList[index].isSpread = true : this.evaluateList[index].isSpread = false
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss" scoped>
-.page {
-	padding-top: 22rpx;
-	background: #f6f6f6;
-}
-.box {
-	width: 678rpx;
-	height: auto;
-	background: #ffffff;
-	border-radius: 6rpx;
-	padding: 26rpx 31rpx;
-	margin: 0 auto 20rpx;
-
-	.header {
-		padding-bottom: 21rpx;
-		border-bottom: 1px solid #eaeaea;
-		.head {
-			max-width: 500rpx;
-			height: 48rpx;
-			background: #f6f6f6;
-			border-radius: 24rpx;
-			padding: 0 17rpx;
-			overflow: hidden;
-			image {
-				width: 32rpx;
-				height: 32rpx;
-				margin-right: 14rpx;
-				border-radius: 50%;
-			}
-			font-size: 24rpx;
-			font-weight: 500;
-			color: #666666;
-		}
-		.date {
-			font-size: 22rpx;
-			font-weight: 500;
-			color: #222222;
-			margin-right: 30rpx;
-		}
-		.del {
-			width: 36rpx;
-			height: 36rpx;
-		}
+	.page {
+		padding-top: 22rpx;
+		background: #f6f6f6;
 	}
-	.center {
-		padding: 37rpx 0 10rpx;
-		height: 174rpx;
-		overflow: hidden;
-		.title {
-			font-size: 30rpx;
-			font-weight: bold;
-			color: #222222;
-		}
-		.isopen {
-			font-size: 24rpx;
-			font-weight: bold;
-			color: #a18353;
-			image {
-				width: 19rpx;
-				height: 12rpx;
-				margin-left: 8rpx;
+
+	.box {
+		width: 678rpx;
+		height: auto;
+		background: #ffffff;
+		border-radius: 6rpx;
+		padding: 26rpx 31rpx;
+		margin: 0 auto 20rpx;
+
+		.header {
+			padding-bottom: 21rpx;
+			border-bottom: 1px solid #eaeaea;
+
+			.head {
+				max-width: 500rpx;
+				height: 48rpx;
+				background: #f6f6f6;
+				border-radius: 24rpx;
+				padding: 0 17rpx;
+				overflow: hidden;
+
+				image {
+					width: 32rpx;
+					height: 32rpx;
+					margin-right: 14rpx;
+					border-radius: 50%;
+				}
+
+				font-size: 24rpx;
+				font-weight: 500;
+				color: #666666;
 			}
-		}
-		.center-text {
-			margin-top: 20rpx;
-			font-size: 24rpx;
-			font-weight: 500;
-			color: #999999;
-			line-height: 34rpx;
-		}
-		.center-img {
-			margin-top: 28rpx;
-			image {
-				width: 146rpx;
-				height: 96rpx;
-				border-radius: 12rpx;
-				margin-right: 15rpx;
+
+			.date {
+				font-size: 22rpx;
+				font-weight: 500;
+				color: #222222;
+				margin-right: 30rpx;
+			}
+
+			.del {
+				width: 36rpx;
+				height: 36rpx;
 			}
 		}
-		.goods{
-			padding-top: 42rpx;
-			border-top: 1rpx solid #EAEAEA;
-			.desc{
-				width: 511rpx;
-				height: 141rpx;
-				background: #F8F8F8;
-				border-radius: 6rpx;
-				padding: 18rpx 24rpx;
-				.goods-img{
-					width: 101rpx;
-					height: 99rpx;
-					border-radius: 8rpx;
-					margin-right: 21rpx;
+
+		.center {
+			padding: 20rpx 0 10rpx;
+			height: 174rpx;
+			overflow: hidden;
+
+			.title {
+				margin-top: 17rpx;
+				font-size: 30rpx;
+				font-weight: bold;
+				color: #222222;
+			}
+
+			.isopen {
+				font-size: 24rpx;
+				font-weight: bold;
+				color: #a18353;
+
+				image {
+					width: 19rpx;
+					height: 12rpx;
+					margin-left: 8rpx;
 				}
-				.title{
-					font-size: 26rpx;
-					font-weight: 500;
-					color: #222222;
-					line-height: 46rpx;
+			}
+
+			.center-text {
+				margin-top: 20rpx;
+				font-size: 24rpx;
+				font-weight: 500;
+				color: #999999;
+				line-height: 34rpx;
+			}
+
+			.center-img {
+				margin-top: 28rpx;
+
+				image {
+					width: 146rpx;
+					height: 96rpx;
+					border-radius: 12rpx;
+					margin-right: 15rpx;
 				}
-				.price{
-					font-size: 24rpx;
-					font-weight: 500;
-					color: #FC3737;
-					line-height: 36rpx;
-					.company{
-						
+			}
+
+			.goods {
+				padding-top: 42rpx;
+				border-top: 1rpx solid #EAEAEA;
+
+				.desc {
+					width: 511rpx;
+					height: 141rpx;
+					background: #F8F8F8;
+					border-radius: 6rpx;
+					padding: 18rpx 24rpx;
+
+					.goods-img {
+						width: 101rpx;
+						height: 99rpx;
+						border-radius: 8rpx;
+						margin-right: 21rpx;
+					}
+
+					.title {
+						width: 335rpx;
+						font-size: 26rpx;
+						font-weight: 500;
+						color: #222222;
+						line-height: 46rpx;
+					}
+
+					.price {
+						font-size: 24rpx;
+						font-weight: 500;
+						color: #FC3737;
+						line-height: 36rpx;
+
+						.company {}
 					}
 				}
+
 			}
-			
 		}
 	}
-}
-.no-more{
-	font-size: 24rpx;
-	font-weight: 500;
-	color: #666666;
-	margin-top: 37rpx;
-	text-align: center;
-}
+
+	.no-more {
+		font-size: 24rpx;
+		font-weight: 500;
+		color: #666666;
+		margin-top: 37rpx;
+		text-align: center;
+	}
 </style>

+ 1 - 1
src/plugins/composition/components/app-add-subtract/app-add-subtract.vue

xqd
@@ -46,7 +46,7 @@
 				}
 			}, 
 			value: {
-				type: [String, Number],
+				type: Number,
 				default () {
 					return 1;
 				}

+ 12 - 7
src/plugins/composition/components/app-bd-info/app-bd-info.vue

xqd xqd
@@ -2,28 +2,28 @@
 	<view>
 		<view class="main-between info-box">
 			<view class="main-left">
-				<image class="gd-cover" src="https://swdzshopv4.oss-cn-chengdu.aliyuncs.com/uploads/mall10000/20211213/bea32f790435d8a108717fd823113cda.jpg" mode=""></image>
+				<image class="gd-cover" :src="info.cover_img" mode=""></image>
 				<view>
-					<view class="title">兴城人居ins居家占位套餐</view>
+					<view class="title">{{info.name}}</view>
 					<view>
 						<text class="price">
 							<text class="dw">¥</text>
-							<text class="rmb">2466</text>
+							<text class="rmb">{{total}}</text>
 							<text class="decimal">.00</text>
 						</text>
-						<text class="price-line"><text>¥</text>3000.00</text>
+						<text class="price-line"><text>¥</text>{{info.min_composition_price}}</text>
 					</view>
 					<view class="main-between">
 						<view class="main-left">
-							<view class="tag">套餐</view>
+							<view class="tag">{{info.tag}}</view>
 							<view class="tag">全款</view>
-							<view class="tag">满200减10</view>
+							<!-- <view class="tag">满200减10</view> -->
 						</view>
 					</view>
 				</view>
 			</view>
 			<view class="cross-bottom">
-				<view class="main-center cross-center receive" @click="receive">
+				<view class="main-center cross-center receive" @click="receive" v-if="coupons.length>0">
 					领券<image src="../../../../static/image/index/arrow-right-facet-white.png" mode=""></image>
 				</view>
 			</view>
@@ -33,6 +33,11 @@
 
 <script>
 	export default {
+		props:{
+			info:Object,
+			coupons:Array,
+			total:Number,
+		},
 		data() {
 			return {
 				

+ 47 - 47
src/plugins/composition/components/app-list/app-list.vue

xqd xqd xqd xqd xqd xqd
@@ -2,18 +2,9 @@
     <view>
         <view class="app-list" :style="{'margin-top': `${top}rpx`}">
             <view class="app-item" v-for="(item,index) in list" :key="item.id">
-                <!-- <view class="dir-left-nowrap cross-center app-item-title">
-                    <view class="check-icon" @click="choose(index,item)">
-                        <image src="https://shop.9026.com/web/statics/image/mall/static/icon/icon-uncheck.png" v-if="!item.choose"></image>
-                        <image :style="{'background-color': theme.background,'opacity': `${item.type == 1 ? '0.3' : '1'}`}"  src="https://shop.9026.com/web/statics/image/mall/static/icon/icon-checkbox-checked.png" v-else></image>
-                    </view>
-                    <view :style="{'color': theme.color}" class="item-type">{{item.type_text}}</view>
-                    <view class="item-name">{{item.name}}</view>
-                </view> -->
-                <view class="item-goods main-between" v-for="goods in item.host_list" :key="goods.id">
-                   <!-- <view class="check-icon">
-                        <image :style="{'background-color': theme.background,'opacity': `${goods.opacity}`}" src="https://shop.9026.com/web/statics/image/mall/static/icon/icon-checkbox-checked.png"></image>
-                    </view> -->
+                
+                <view class="item-goods main-between" v-for="(goods,index1) in item.host_list" :key="goods.id">
+                   
                     <view class="main-left">
 						<image @click="toDetail(goods.goods_id)" class="goods-img" :src="goods.cover_pic"></image>
 						<view v-if="goods.stock == 0 || item.stock == 0" class="out-dialog">
@@ -33,17 +24,12 @@
 						        </view>
 						        <image class="item-good-attr-arrow" src="https://t17.9026.com/web/statics/image/index/arrow-right-A18353.png"></image>
 						    </view>
-						    <!-- <view v-if="item.type == 2 && goods.choose_attr" :style="{'color': theme.color}" class="choose_price">¥{{goods.total_price}}</view> -->
-							<view class="price"><text class="ought_price">¥3400.00</text><text class="paid_price">实付:¥<text>{{goods.total_price}}</text></text></view>
+							<view class="price"><text class="ought_price">¥{{goods.max_price}}</text><text class="paid_price" v-show="goods.total_price">实付:¥<text>{{goods.total_price}}</text></text></view>
 						</view>
 					</view>
-					<app-add-subtract :xStyle="2" :stock="100"></app-add-subtract>
+					<app-add-subtract :xStyle="2" :stock="goods.stock" :good_id="goods.id" :min="1" :value="goods.choose_attr.number" @change="addsubChange($event,goods,index,index1,0)"></app-add-subtract>
                 </view>                    
                 <view class="item-goods main-between" v-for="(goods,idx) in item.goods_list" :key="goods.id">
-                    <!-- <view class="check-icon" v-if="item.type == 2" @click="chooseGoods(idx,index,goods)">
-                        <image src="https://shop.9026.com/web/statics/image/mall/static/icon/icon-uncheck.png" v-if="!goods.choose_goods"></image>
-                        <image :style="{'background-color': theme.background}" src="https://shop.9026.com/web/statics/image/mall/static/icon/icon-checkbox-checked.png" v-else></image>
-                    </view> -->
 					<view class="main-left">
                     <image @click="toDetail(goods.goods_id)" class="goods-img" :src="goods.cover_pic"></image>
                     <view v-if="goods.stock == 0 || item.stock == 0" class="out-dialog">
@@ -65,11 +51,10 @@
                             </view>
                             <image class="item-good-attr-arrow" src="https://t17.9026.com/web/statics/image/index/arrow-right-A18353.png"></image>
                         </view>
-                        <!-- <view v-if="item.type == 2 && goods.choose_attr"  :style="{'color': theme.color}" class="choose_price">¥{{goods.total_price}}</view> -->
-						<view class="price"><text class="ought_price">¥3400.00</text><text class="paid_price">实付:¥<text>{{goods.total_price}}</text></text></view>
+                        <view class="price"><text class="ought_price">¥{{goods.max_price}}</text><text class="paid_price" v-show="goods.total_price">实付:¥<text>{{goods.total_price}}</text></text></view>
                     </view>
 					</view>
-					<app-add-subtract :xStyle="2" :stock="100"></app-add-subtract>
+					<app-add-subtract :xStyle="2" :stock="goods.stock" :good_id="goods.id" :min="0" :value="goods.choose_attr.number" @change="addsubChange($event,goods,index,idx,1)"></app-add-subtract>
                 </view>
                 <view class="app-price">
                     <template v-if="item.total_price && hidden">
@@ -167,6 +152,14 @@
 			appAddSubtract
         },
         methods: {
+			addsubChange(e,goods,index,index1,ss){
+				if(ss===0){//固定商品
+					this.list[index].host_list[index1].choose_attr.number=e.number
+				}else{//搭配商品
+					this.list[index].goods_list[index1].choose_attr.number=e.number
+				}
+				this.count();
+			},
             // 规格选择
             check({item}) {
                 this.checked = item;
@@ -197,8 +190,11 @@
                         }
                         if(that.list[that.index].type == 2) {
                             v.choose_goods = true;
-                            that.list[that.index].host_list[0].choose_goods = true
-                            that.list[that.index].host_list[0].opacity = 0.3
+							for (let i = 0; i < that.list[that.index].host_list.length; i++) {
+								let item=that.list[that.index].host_list[i]
+								item.choose_goods = true
+								item.opacity = 0.3
+							}
                         }
                         that.count();
                         that.$forceUpdate();
@@ -305,35 +301,39 @@
                     }
                 }else if(that.list[i].type == 2) {
                     that.list[i].total_price = 0;
-                    if(that.list[i].host_list[0].choose_attr) {
-                        that.list[i].total_price = +that.list[i].host_list[0].choose_attr.price - +that.list[i].host_list[0].price
-                        that.list[i].host_list[0].total_price = +that.list[i].host_list[0].choose_attr.price - +that.list[i].host_list[0].price
-                        that.max_discount += +that.list[i].host_list[0].price
-                        if(that.list[i].host_list[0].total_price < 0) {
-                            that.list[i].host_list[0].total_price = 0
-                        }else {
-                            that.list[i].host_list[0].total_price = +that.list[i].host_list[0].total_price.toFixed(2);
-                        }
-                        that.total += +that.list[i].host_list[0].total_price
-                    }else {
-                        that.noAttrList.push(that.list[i].host_list[0])
-                    }
+					for (let k = 0; k < that.list[i].host_list.length; k++) {
+						let item=that.list[i].host_list[k]
+						if(item.choose_attr) {
+							that.list[i].total_price = (+item.choose_attr.price - +item.price)*item.choose_attr.number
+							item.total_price = (+item.choose_attr.price - +item.price)*item.choose_attr.number
+							that.max_discount += (+item.price)*item.choose_attr.number
+							if(item.total_price < 0) {
+								item.total_price = 0
+							}else {
+								item.total_price = +item.total_price.toFixed(2);
+							}
+							that.total += +item.total_price
+						}else {
+							that.noAttrList.push(item)
+						}
+					}
                     for(let x in that.list[i].goods_list) {
-                        if(that.list[i].goods_list[x].choose_goods && that.list[i].goods_list[x].choose_attr) {
-                            that.list[i].goods_list[x].total_price = +that.list[i].goods_list[x].choose_attr.price - +that.list[i].goods_list[x].price
-                            that.max_discount += +that.list[i].goods_list[x].price
-                            if(that.list[i].goods_list[x].total_price < 0) {
-                                that.list[i].goods_list[x].total_price = 0
+						let item=that.list[i].goods_list[x]
+                        if(item.choose_goods && item.choose_attr) {
+                            item.total_price = (+item.choose_attr.price - +item.price)*item.choose_attr.number
+                            that.max_discount += (+item.price)*item.choose_attr.number
+                            if(item.total_price < 0) {
+                                item.total_price = 0
                             }else {
-                                that.list[i].goods_list[x].total_price = +that.list[i].goods_list[x].total_price.toFixed(2);
+                                item.total_price = +item.total_price.toFixed(2);
                             }
-                            that.total += +that.list[i].goods_list[x].total_price
+                            that.total += +item.total_price
                             if(that.list[i].total_price > 0) {
-                                that.list[i].total_price += +that.list[i].goods_list[x].total_price
+                                that.list[i].total_price += +item.total_price
                             }
                         }
-                        if(that.list[i].goods_list[x].choose_goods && that.list[i].goods_list[x].choose_attr == null ) {
-                            that.noAttrList.push(that.list[i].goods_list[x])
+                        if(item.choose_goods && item.choose_attr == null ) {
+                            that.noAttrList.push(item)
                         }
                     }
                     if(that.list[i].total_price < 0) {

+ 550 - 509
src/plugins/composition/detail/detail.vue

xqd
@@ -1,535 +1,576 @@
 <template>
-    <app-layout>
-		<app-bd-info @receive="receive"></app-bd-info>
+	<app-layout>
+		<app-bd-info @receive="receive" :info="list[0]" :coupons="goods_coupon_center" :total="total"></app-bd-info>
 		<!--商品优惠券-->
 		<bd-coupon @change="setCoupon" @on-show-change="val => {isCouponShow = val}" :isCustomEntry="true"
 			:myShow="isCouponShow" :theme="getTheme" :coupons="goods_coupon_center"></bd-coupon>
-		<view style="font-size: 34rpx;font-weight: bold;color: #222222;line-height: 46rpx;padding:30rpx 0 0 35rpx;background-color: #fff;">套餐内商品</view>
-        <app-list v-if="loading" :hidden="false" :top="0" :theme="getTheme" :list="list" v-on:update="update" v-on:change="getTotal" v-on:updateList="updateList"></app-list>
-        <view class="list" v-if="other.length > 0">
-            <view class="title">其他套餐</view>
-            <view v-for="(item, index) in other" :key="index" class="item dir-left-nowrap">
-                <app-composition :theme="getTheme" @click="choose(item)" @look="choose(item)" :item="item"></app-composition>
-            </view>
-        </view>
-        <view v-if="list.length > 0" :class="['bottom-space', `${iphone_x? 'iphone_x':''}`]"></view>
-        <view v-if="list.length > 0" :class="['bottom','main-between','cross-center', `${iphone_x? 'iphone_x':''}`]">
-           <!-- <view>
+		<view
+			style="font-size: 34rpx;font-weight: bold;color: #222222;line-height: 46rpx;padding:30rpx 0 0 35rpx;background-color: #fff;">
+			套餐内商品</view>
+		<app-list v-if="loading" :hidden="false" :top="0" :theme="getTheme" :list="list" v-on:update="update"
+			v-on:change="getTotal" v-on:updateList="updateList"></app-list>
+		<view class="list" v-if="other.length > 0">
+			<view class="title">其他套餐</view>
+			<view v-for="(item, index) in other" :key="index" class="item dir-left-nowrap">
+				<app-composition :theme="getTheme" @click="choose(item)" @look="choose(item)" :item="item">
+				</app-composition>
+			</view>
+		</view>
+		<view v-if="list.length > 0" :class="['bottom-space', `${iphone_x? 'iphone_x':''}`]"></view>
+		<view v-if="list.length > 0" :class="['bottom','main-between','cross-center', `${iphone_x? 'iphone_x':''}`]">
+			<!-- <view>
                 <view class="dir-left-nowrap cross-center">
                     <view>总计</view>
                     <view class="total-price" :style="{'color': getTheme.color}">¥{{total == 0 ? '0.00' : total}}</view>
                 </view>
                 <view class="discount" :style="{'color': getTheme.color}">已省¥{{max_discount}}</view>
             </view> -->
-            <view @click="toBuy" class="submit-btn" :style="{'background-color': getTheme.background}">立即购买</view>
-        </view>
-        <view class="dialog-bg" v-if="showNoAttr">
-            <view class="dialog">
-                <view class="dialog-title">
-                    <view class="dialog-big-title">以下商品未选择规格</view>
-                    <view>请选择规格后购买</view>
-                </view>
-                <view :class="[`${noAttrList.length > 4 ? 'dir-left-wrap' : 'main-center'}`,`dialog-goods-list`]">
-                    <view class="dialog-goods" v-for="(item, index) in noAttrList" :key="index">
-                        <image :src="item.cover_pic"></image>
-                    </view>
-                </view>
-                <view @click="close" class="dialog-close" :style="{'color': getTheme.color}">我知道了</view>
-            </view>
-        </view>
-        <view class='no-tip' v-if="list.length == 0 && loading">
-            <image src="../image/pull-off.png"></image>
-            <view>您选购的套餐已下架</view>
-            <view @click="toComposition" class="to-composition" :style="{'background-color': getTheme.background}">逛逛套餐专区</view>
-        </view>
-    </app-layout>
+			<view @click="toBuy" class="submit-btn" :style="{'background-color': getTheme.background}">立即购买</view>
+		</view>
+		<view class="dialog-bg" v-if="showNoAttr">
+			<view class="dialog">
+				<view class="dialog-title">
+					<view class="dialog-big-title">以下商品未选择规格</view>
+					<view>请选择规格后购买</view>
+				</view>
+				<view :class="[`${noAttrList.length > 4 ? 'dir-left-wrap' : 'main-center'}`,`dialog-goods-list`]">
+					<view class="dialog-goods" v-for="(item, index) in noAttrList" :key="index">
+						<image :src="item.cover_pic"></image>
+					</view>
+				</view>
+				<view @click="close" class="dialog-close" :style="{'color': getTheme.color}">我知道了</view>
+			</view>
+		</view>
+		<view class='no-tip' v-if="list.length == 0 && loading">
+			<image src="../image/pull-off.png"></image>
+			<view>您选购的套餐已下架</view>
+			<view @click="toComposition" class="to-composition" :style="{'background-color': getTheme.background}">
+				逛逛套餐专区</view>
+		</view>
+	</app-layout>
 </template>
 
 <script>
-    import {mapGetters} from "vuex";
-    import appList from '../components/app-list/app-list';
+	import {
+		mapGetters
+	} from "vuex";
+	import appList from '../components/app-list/app-list';
 	import appBdInfo from '../components/app-bd-info/app-bd-info.vue';
-    import appComposition from "../../../components/basic-component/app-composition/app-composition.vue";
-import bdCoupon from '@/components/page-component/goods/bd-coupon.vue';
-    export default {
-        data() {
-            return {
-                list: [],
-                other: [],
-                total: 0,
-                showNoAttr: false,
-                noAttrList: [],
-                goods_id: '',
-                max_discount: '0.00',
-                page: 2,
-                hidden: false,
-                iphone_x: false,
-                noMore: false,
-                composition_id: '',
-                loading: false,
-				
-				
+	import appComposition from "../../../components/basic-component/app-composition/app-composition.vue";
+	import bdCoupon from '@/components/page-component/goods/bd-coupon.vue';
+	export default {
+		data() {
+			return {
+				list: [],
+				other: [],
+				total: 0,
+				showNoAttr: false,
+				noAttrList: [],
+				goods_id: '',
+				max_discount: '0.00',
+				page: 2,
+				hidden: false,
+				iphone_x: false,
+				noMore: false,
+				composition_id: '',
+				loading: false,
+
+
 				isCouponShow: false,
-				goods_coupon_center:[
-					// {
-					// 	appoint_type: "3",
-					// 	begin_time: "0000-00-00 00:00:00",
-					// 	can_receive_count: "-1",
-					// 	cat: [],
-					// 	desc: "",
-					// 	discount: 10,
-					// 	discount_limit: 0,
-					// 	end_time: "0000-00-00 00:00:00",
-					// 	expire_day: "99",
-					// 	expire_type: "1",
-					// 	goods: [],
-					// 	id: "2",
-					// 	is_receive: "0",
-					// 	min_price: 100,
-					// 	name: "优惠券1",
-					// 	rule: "",
-					// 	share_type: 4,
-					// 	sub_price: 10,
-					// 	type: "2",
-					// }
-				]
-            }
-        },
-        components: {
-            'app-list': appList,
-            'app-composition': appComposition,
+				goods_coupon_center: []
+			}
+		},
+		components: {
+			'app-list': appList,
+			'app-composition': appComposition,
 			appBdInfo,
 			bdCoupon
-        },
-        computed: {
-            ...mapGetters('mallConfig', {
-                getTheme: 'getTheme',
-            })
-        },
-        methods: {
+		},
+		computed: {
+			...mapGetters('mallConfig', {
+				getTheme: 'getTheme',
+			})
+		},
+		methods: {
 			receive() {
 				this.isCouponShow = true
 			},
 			setCoupon(index) {
 				this.$set(this.goods_coupon_center[index], 'is_receive', 1);
 			},
-            choose(item) {
-                this.composition_id = item.id;
-                this.total = '0.00';
-                this.max_discount = '0.00';
-                this.getDetail();
-            },
-            toComposition() {
-                uni.redirectTo({
-                    url: '/plugins/composition/index/index'
-                });
-            },
-            toBuy() {
-                let that = this;
-                let attr = [];
-                let list = [
-                    {
-                        mch_id: 0,
-                        composition_list: []
-                    }
-                ]
-                if(that.noAttrList.length > 0) {
-                    that.showNoAttr = true;
-                }else {
-                    for(let i in that.list) {
-                        attr = [];
-                        if(that.list[i].choose) {
-                            let arr = {
-                                composition_id: that.list[i].id,
-                                goods_list: []
-                            }
-                            if(that.list[i].host_list.length > 0) {
-                                for(let x in that.list[i].host_list[0].choose_attr.attr_list) {
-                                    attr.push({
-                                        attr_id: that.list[i].host_list[0].choose_attr.attr_list[x].attr_id,
-                                        attr_group_id: that.list[i].host_list[0].choose_attr.attr_list[x].attr_group_id,
-                                    })
-                                }
-                                arr.goods_list.push({
-                                    id: that.list[i].host_list[0].goods_id,
-                                    num: 1,
-                                    goods_attr_id: that.list[i].host_list[0].choose_attr.goods_attr_id,
-                                    attr: []
-                                })
-                            }
-                            let goods_attr = [];
-                            for(let y in that.list[i].goods_list) {
-                                if(that.list[i].goods_list[y].choose_attr && that.list[i].goods_list[y].choose_attr.attr_list.length > 0) {
-                                    for(let x in that.list[i].goods_list[y].choose_attr.attr_list) {
-                                        attr.push({
-                                            attr_id: that.list[i].goods_list[y].choose_attr.attr_list[x].attr_id,
-                                            attr_group_id: that.list[i].goods_list[y].choose_attr.attr_list[x].attr_group_id,
-                                        })
-                                    }
-                                    arr.goods_list.push({
-                                        id: that.list[i].goods_list[y].goods_id,
-                                        num: 1,
-                                        goods_attr_id: that.list[i].goods_list[y].choose_attr.goods_attr_id,
-                                        attr: attr
-                                    })
-                                }
-                            }
-                            list[0].composition_list.push(arr);
-                        }else {
-                            let arr = {
-                                composition_id: that.list[i].id,
-                                goods_list: []
-                            }
-                            if(that.list[i].host_list.length > 0 && that.list[i].host_list[0].choose_goods) {
-                                for(let x in that.list[i].host_list[0].choose_attr.attr_list) {
-                                    attr.push({
-                                        attr_id: that.list[i].host_list[0].choose_attr.attr_list[x].attr_id,
-                                        attr_group_id: that.list[i].host_list[0].choose_attr.attr_list[x].attr_group_id,
-                                    })
-                                }
-                                arr.goods_list.push({
-                                    id: that.list[i].host_list[0].goods_id,
-                                    num: 1,
-                                    goods_attr_id: that.list[i].host_list[0].choose_attr.goods_attr_id,
-                                    attr: attr
-                                })
-                            }
-                            let noChoose = true;
-                            for(let y in that.list[i].goods_list) {
-                                if(that.list[i].goods_list[y].choose_goods && that.list[i].goods_list[y].choose_attr.attr_list) {
-                                    noChoose = false;
-                                    for(let x in that.list[i].goods_list[y].choose_attr.attr_list) {
-                                        attr.push({
-                                            attr_id: that.list[i].goods_list[y].choose_attr.attr_list[x].attr_id,
-                                            attr_group_id: that.list[i].goods_list[y].choose_attr.attr_list[x].attr_group_id,
-                                        })
-                                    }
-                                    arr.goods_list.push({
-                                        id: that.list[i].goods_list[y].goods_id,
-                                        num: 1,
-                                        goods_attr_id: that.list[i].goods_list[y].choose_attr.goods_attr_id,
-                                        attr: attr
-                                    })
-                                }
-                            }
-                            if(arr.goods_list.length > 0) {
-                                list[0].composition_list.push(arr);
-                            }
-                        }
-                    }
-                    if(list[0].composition_list.length == 0) {
-                        uni.showToast({
-                            title: '请选择套餐',
-                            icon: 'none',
-                            duration: 1000
-                        });
-                    }else {
-                        for(let i in list[0].composition_list) {
-                            if(list[0].composition_list[i].goods_list.length == 1) {
-                                list[0].composition_list.splice(i,1)
-                            }
-                        }
-                        if(list[0].composition_list.length == 0) {
-                            uni.showToast({
-                                title: '请选择搭配商品',
-                                icon: 'none',
-                                duration: 1000
-                            });
-                        }else {
-                            list[0].goods_list = [];
-                            for (let j in list[0].composition_list) {
-                                for (let y in list[0].composition_list[j].goods_list) {
-                                    list[0].composition_list[j].goods_list[y].cart_id = 0;
-                                    list[0].goods_list.push(list[0].composition_list[j].goods_list[y])
-                                }
-                            }
-                            let jump_url = `/pages/order-submit/order-submit?mch_list=${JSON.stringify(list)}`;
-                            jump_url += `&preview_url=${encodeURIComponent(this.$api.composition.order_preview)}&submit_url=${encodeURIComponent(this.$api.composition.order_submit)}&plugin=composition`;
-                            this.$jump({
-                                open_type: 'navigate',
-                                url: jump_url,
-                            });
-                        }
-                    }
-                }
-            },
-            close () {
-                this.showNoAttr = false;
-            },
-            updateList(e) {
-                this.list = e;
-            },
-            update(e) {
-                this.noAttrList = e;
-            },
-            getTotal(e) {
-                this.total = e.total;
-                if(e.max_discount) {
-                    this.max_discount = e.max_discount.toFixed(2)
-                }
-            },
-            getDetail() {
-                let that = this;
-                that.loading = false;
-                uni.showLoading({
-                    mask: true,
-                    title: '加载中...',
-                });
-                let para = {
-                    composition_id: that.composition_id
-                }
-                if(that.goods_id > 0) {
-                    para.goods_id = that.goods_id
-                }
-                that.$request({
-                    url: that.goods_id > 0 ? that.$api.composition.detail : that.$api.composition.composition_detail,
-                    data: para
-                }).then(response=>{
-                    that.loading = true;
-                    uni.hideLoading();
-                    if(response.code == 0) {
-                        if(that.goods_id > 0) {
-                            that.list = response.data.other_list;
-                            that.other = response.data.list;
-                        }else {
-                            that.list = [];
-                            that.list[0] = response.data.composition;
-                        }
-                        if(that.other.length < 4) {
-                            that.noMore = true;
-                        }
-                        for(let i in that.list) {
-                            that.list[i].choose = false;
-                            for(let idx in that.list[i].goods_list) {
-                                that.list[i].goods_list[idx].choose_attr = null;
-                                if(that.list[i].goods_list[idx].goods_attr.length == 1) {
-                                    that.list[i].goods_list[idx].choose_attr = that.list[i].goods_list[idx].goods_attr[0];
-                                    that.list[i].goods_list[idx].choose_attr.number = 1;
-                                    that.list[i].goods_list[idx].total_price = (+that.list[i].goods_list[idx].choose_attr.price - +that.list[i].goods_list[idx].price).toFixed(2)
-                                }
-                                if(that.list[i].type == 2) {
-                                    that.list[i].host_list[0].choose_attr = null;
-                                    if(that.list[i].host_list[0].goods_attr.length == 1) {
-                                        that.list[i].host_list[0].choose_attr = that.list[i].host_list[0].goods_attr[0];
-                                        that.list[i].host_list[0].choose_attr.number = 1;
-                                        that.list[i].host_list[0].total_price = (+that.list[i].host_list[0].choose_attr.price - +that.list[i].host_list[0].price).toFixed(2)
-                                    }
-                                    that.list[i].goods_list[idx].choose_goods = false;
-                                    that.list[i].host_list[0].choose_goods = true;
-                                    that.list[i].host_list[0].opacity = 0.3;
-                                }
-                            }
-                        }
-                        if(that.list[0].type == 1) {
-                            that.list[0].choose = true;
-                            that.max_discount = that.list[0].max_discount;
-                        }
-                    }else {
-                        uni.hideLoading();
-                        uni.showToast({
-                            title: response.msg,
-                            icon: 'none',
-                            duration: 1000
-                        });
-                    }
-                }).catch(response => {
-                    that.loading = true;
-                    uni.hideLoading();
-                    that.$hideLoading();
-                });
-            },
-            getMore() {
-                let that = this;
-                uni.showLoading({
-                    mask: true,
-                    title: '加载中'
-                });
-                that.$request({
-                    url: that.$api.composition.detail,
-                    data: {
-                        goods_id: that.goods_id,
-                        composition_id: that.composition_id,
-                        page: that.page
-                    }
-                }).then(response=>{
-                    uni.hideLoading();
-                    if(response.code == 0) {
-                        if(response.data.list.length == 0) {
-                            this.noMore = true;
-                            return false;
-                        }
-                        that.page++;
-                        that.other = that.other.concat(response.data.list);
-                        for(let i in that.list) {
-                            that.list[i].choose = false;
-                            for(let idx in that.list[i].goods_list) {
-                                that.list[i].goods_list[idx].choose_attr = null;
-                                if(that.list[i].type == 2) {
-                                    that.list[i].host_list[0].choose_attr = null;
-                                    that.list[i].host_list[0].opacity = 1;
-                                    that.list[i].goods_list[idx].choose_goods = false;
-                                    that.list[i].host_list[0].choose_goods = false;
-                                }
-                            }
-                        }
-                    }else {
-                        uni.hideLoading();
-                        uni.showToast({
-                            title: response.msg,
-                            icon: 'none',
-                            duration: 1000
-                        });
-                    }
-                }).catch(response => {
-                    that.$hideLoading();
-                });
-            },
-        },
-        onReachBottom() {
-            if(!this.noMore) {
-                this.getMore();
-            }
-        },
-        onLoad(option) { this.$commonLoad.onload(option);
-            let that = this;
-            uni.getSystemInfo({
-                success: function (res) {
-                    if(res.model.indexOf('iPhone X') > -1 || res.model.indexOf('iPhone 11') > -1 || res.model.indexOf('iPhone11') > -1 || res.model.indexOf('iPhone12') > -1 || res.model.indexOf('Unknown Device') > -1) {
-                        that.iphone_x = true;
-                    }
-                }
-            })
-            this.goods_id = option.goods_id > 0 ? option.goods_id : '';
-            this.composition_id = option.composition_id;
-            that.getDetail();
-        },
-    }
+			choose(item) {
+				this.composition_id = item.id;
+				this.total = '0.00';
+				this.max_discount = '0.00';
+				this.getDetail();
+			},
+			toComposition() {
+				uni.redirectTo({
+					url: '/plugins/composition/index/index'
+				});
+			},
+			toBuy() {
+				let that = this;
+				let attr = [];
+				let list = [{
+					mch_id: 0,
+					composition_list: []
+				}]
+				if (that.noAttrList.length > 0) {
+					that.showNoAttr = true;
+				} else {
+					for (let i in that.list) {
+						attr = [];
+						if (that.list[i].choose) {
+							let arr = {
+								composition_id: that.list[i].id,
+								goods_list: []
+							}
+							if (that.list[i].host_list.length > 0) {
+								for (let x in that.list[i].host_list[0].choose_attr.attr_list) {
+									attr.push({
+										attr_id: that.list[i].host_list[0].choose_attr.attr_list[x].attr_id,
+										attr_group_id: that.list[i].host_list[0].choose_attr.attr_list[x]
+											.attr_group_id,
+									})
+								}
+								arr.goods_list.push({
+									id: that.list[i].host_list[0].goods_id,
+									num: that.list[i].host_list[0].choose_attr.number,
+									goods_attr_id: that.list[i].host_list[0].choose_attr.goods_attr_id,
+									attr: []
+								})
+							}
+							let goods_attr = [];
+							for (let y in that.list[i].goods_list) {
+								if (that.list[i].goods_list[y].choose_attr && that.list[i].goods_list[y].choose_attr
+									.attr_list.length > 0) {
+									for (let x in that.list[i].goods_list[y].choose_attr.attr_list) {
+										attr.push({
+											attr_id: that.list[i].goods_list[y].choose_attr.attr_list[x].attr_id,
+											attr_group_id: that.list[i].goods_list[y].choose_attr.attr_list[x]
+												.attr_group_id,
+										})
+									}
+									arr.goods_list.push({
+										id: that.list[i].goods_list[y].goods_id,
+										num: that.list[i].goods_list[y].choose_attr.number,
+										goods_attr_id: that.list[i].goods_list[y].choose_attr.goods_attr_id,
+										attr: attr
+									})
+								}
+							}
+							list[0].composition_list.push(arr);
+						} else {
+							let arr = {
+								composition_id: that.list[i].id,
+								goods_list: []
+							}
+							if (that.list[i].host_list.length > 0) {
+								for (let k = 0; k < that.list[i].host_list.length; k++) {
+									let item=that.list[i].host_list[k]
+									if(item.choose_goods){
+										for (let x in item.choose_attr.attr_list) {
+											attr.push({
+												attr_id: item.choose_attr.attr_list[x].attr_id,
+												attr_group_id: item.choose_attr.attr_list[x]
+													.attr_group_id,
+											})
+										}
+										arr.goods_list.push({
+											id: item.goods_id,
+											num: item.choose_attr.number,
+											goods_attr_id: item.choose_attr.goods_attr_id,
+											attr: attr
+										})
+									}
+								}
+							}
+							let noChoose = true;
+							for (let y in that.list[i].goods_list) {
+								if (that.list[i].goods_list[y].choose_goods && that.list[i].goods_list[y].choose_attr
+									.attr_list) {
+									noChoose = false;
+									for (let x in that.list[i].goods_list[y].choose_attr.attr_list) {
+										attr.push({
+											attr_id: that.list[i].goods_list[y].choose_attr.attr_list[x].attr_id,
+											attr_group_id: that.list[i].goods_list[y].choose_attr.attr_list[x]
+												.attr_group_id,
+										})
+									}
+									arr.goods_list.push({
+										id: that.list[i].goods_list[y].goods_id,
+										num: that.list[i].goods_list[y].choose_attr.number,
+										goods_attr_id: that.list[i].goods_list[y].choose_attr.goods_attr_id,
+										attr: attr
+									})
+								}
+							}
+							if (arr.goods_list.length > 0) {
+								list[0].composition_list.push(arr);
+							}
+						}
+					}
+					// if (list[0].composition_list.length == 0) {
+					// 	uni.showToast({
+					// 		title: '请选择套餐',
+					// 		icon: 'none',
+					// 		duration: 1000
+					// 	});
+					// } else {
+						for (let i in list[0].composition_list) {
+							if (list[0].composition_list[i].goods_list.length == 1) {
+								list[0].composition_list.splice(i, 1)
+							}
+						}
+						if (list[0].composition_list.length == 0) {
+							uni.showToast({
+								title: '请选择至少一个搭配商品',
+								icon: 'none',
+								duration: 1000
+							});
+						} else {
+							list[0].goods_list = [];
+							for (let j in list[0].composition_list) {
+								for (let y in list[0].composition_list[j].goods_list) {
+									list[0].composition_list[j].goods_list[y].cart_id = 0;
+									list[0].goods_list.push(list[0].composition_list[j].goods_list[y])
+								}
+							}
+							console.log('this.list',this.list)
+							console.log('list',list)
+							let jump_url = `/pages/order-submit/order-submit?mch_list=${JSON.stringify(list)}`;
+							jump_url +=
+								`&preview_url=${encodeURIComponent(this.$api.composition.order_preview)}&submit_url=${encodeURIComponent(this.$api.composition.order_submit)}&plugin=composition`;
+							this.$jump({
+								open_type: 'navigate',
+								url: jump_url,
+							});
+						}
+					// }
+				}
+			},
+			close() {
+				this.showNoAttr = false;
+			},
+			updateList(e) {
+				this.list = e;
+			},
+			update(e) {
+				this.noAttrList = e;
+			},
+			getTotal(e) {
+				this.total = e.total;
+				if (e.max_discount) {
+					this.max_discount = e.max_discount.toFixed(2)
+				}
+			},
+			getDetail() {
+				let that = this;
+				that.loading = false;
+				uni.showLoading({
+					mask: true,
+					title: '加载中...',
+				});
+				let para = {
+					composition_id: that.composition_id
+				}
+				if (that.goods_id > 0) {
+					para.goods_id = that.goods_id
+				}
+				that.$request({
+					url: that.goods_id > 0 ? that.$api.composition.detail : that.$api.composition
+						.composition_detail,
+					data: para
+				}).then(response => {
+					that.loading = true;
+					uni.hideLoading();
+					if (response.code == 0) {
+						if (that.goods_id > 0) {
+							that.list = response.data.other_list;
+							that.other = response.data.list;
+						} else {
+							that.list = [];
+							that.list[0] = response.data.composition;
+						}
+						if (that.other.length < 4) {
+							that.noMore = true;
+						}
+						for (let i in that.list) {
+							that.list[i].choose = false;
+							for (let idx in that.list[i].goods_list) {
+								that.list[i].goods_list[idx].choose_attr = null;
+								if (that.list[i].goods_list[idx].goods_attr.length == 1) {
+									// that.list[i].goods_list[idx].choose_attr = that.list[i].goods_list[idx]
+									// 	.goods_attr[0];
+									// that.list[i].goods_list[idx].choose_attr.number = 1;
+									// that.list[i].goods_list[idx].total_price = (+that.list[i].goods_list[idx]
+									// 	.choose_attr.price - +that.list[i].goods_list[idx].price).toFixed(2)
+								}
+								if (that.list[i].type == 2) {
+									for (let t = 0; t < that.list[i].host_list.length; t++) {
+										that.list[i].host_list[t].choose_attr = null;
+										if (that.list[i].host_list[t].goods_attr.length == 1) {
+											that.list[i].host_list[t].choose_attr = that.list[i].host_list[t].goods_attr[0];
+											that.list[i].host_list[t].choose_attr.number = 1;
+											that.list[i].host_list[t].total_price = (+that.list[i].host_list[t]
+												.choose_attr.price - +that.list[i].host_list[t].price).toFixed(2)
+										}
+										that.list[i].host_list[t].choose_goods = true;
+										that.list[i].host_list[t].opacity = 0.3;
+									}
+									
+									that.list[i].goods_list[idx].choose_goods = false;
+									
+								}
+							}
+						}
+						if (that.list[0].type == 1) {
+							that.list[0].choose = true;
+							that.max_discount = that.list[0].max_discount;
+						}
+					} else {
+						uni.hideLoading();
+						uni.showToast({
+							title: response.msg,
+							icon: 'none',
+							duration: 1000
+						});
+					}
+				}).catch(response => {
+					that.loading = true;
+					uni.hideLoading();
+					that.$hideLoading();
+				});
+				
+				this.$request({
+					url: this.$api.coupon.list,
+					data: {
+						composition_id: this.composition_id,
+						limit:100,
+					},
+					method: 'get'
+				}).then(res => {
+					if(res.code===0){
+						this.goods_coupon_center=res.data.list
+					}
+				})
+			},
+			getMore() {
+				let that = this;
+				uni.showLoading({
+					mask: true,
+					title: '加载中'
+				});
+				that.$request({
+					url: that.$api.composition.detail,
+					data: {
+						goods_id: that.goods_id,
+						composition_id: that.composition_id,
+						page: that.page
+					}
+				}).then(response => {
+					uni.hideLoading();
+					if (response.code == 0) {
+						if (response.data.list.length == 0) {
+							this.noMore = true;
+							return false;
+						}
+						that.page++;
+						that.other = that.other.concat(response.data.list);
+						for (let i in that.list) {
+							that.list[i].choose = false;
+							for (let idx in that.list[i].goods_list) {
+								that.list[i].goods_list[idx].choose_attr = null;
+								if (that.list[i].type == 2) {
+									that.list[i].host_list[0].choose_attr = null;
+									that.list[i].host_list[0].opacity = 1;
+									that.list[i].goods_list[idx].choose_goods = false;
+									that.list[i].host_list[0].choose_goods = false;
+								}
+							}
+						}
+					} else {
+						uni.hideLoading();
+						uni.showToast({
+							title: response.msg,
+							icon: 'none',
+							duration: 1000
+						});
+					}
+				}).catch(response => {
+					that.$hideLoading();
+				});
+			},
+		},
+		onReachBottom() {
+			if (!this.noMore) {
+				this.getMore();
+			}
+		},
+		onLoad(option) {
+			this.$commonLoad.onload(option);
+			let that = this;
+			uni.getSystemInfo({
+				success: function(res) {
+					if (res.model.indexOf('iPhone X') > -1 || res.model.indexOf('iPhone 11') > -1 || res.model
+						.indexOf('iPhone11') > -1 || res.model.indexOf('iPhone12') > -1 || res.model.indexOf(
+							'Unknown Device') > -1) {
+						that.iphone_x = true;
+					}
+				}
+			})
+			this.goods_id = option.goods_id > 0 ? option.goods_id : '';
+			this.composition_id = option.composition_id;
+			that.getDetail();
+		},
+	}
 </script>
 
 <style scoped lang="scss">
-    .no-tip {
-        position: fixed;
-        top: #{120rpx};
-        left: 0;
-        right: 0;
-        margin: 0 auto;
-        color: #666666;
-        font-size: #{24rpx};
-        width: #{240rpx};
-        text-align: center;
-        image {
-            height: #{240rpx};
-            width: #{240rpx};
-            margin-bottom: #{20rpx};
-        }
-        .to-composition {
-            border-radius: #{33rpx};
-            width: #{246rpx};
-            text-align: center;
-            height: #{66rpx};
-            line-height: #{66rpx};
-            margin-top: #{38rpx};
-            color: #fff;
-        }
-    }
-    .list {
-        padding: #{24rpx};
-        .title {
-            font-size: #{28rpx};
-            color: #353535;
-        }
-        .item {
-            margin-top: #{20rpx};
-            padding: #{24rpx};
-            border-radius: #{16rpx};
-            background-color: #fff;
-        }
-    }
-    .dialog-bg {
-        position: fixed;
-        top: 0;
-        left: 0;
-        width: 100%;
-        height: 100%;
-        background-color: rgba(0,0,0,.3);
-        z-index: 202;
-        .dialog {
-            width: #{630rpx};
-            margin: #{260rpx} auto 0;
-            background-color: #fff;
-            padding-top: #{40rpx};
-            border-radius: #{16rpx};
-            .dialog-title {
-                text-align: center;
-                font-size: #{26rpx};
-                color: #999999;
-                .dialog-big-title {
-                    font-size: #{32rpx};
-                    color: #353535;
-                    margin-bottom: #{10rpx};
-                }
-            }
-            .dialog-goods-list {
-                padding: 0 #{65rpx};
-                margin: #{26rpx} 0 #{48rpx};
-                .dialog-goods {
-                    width: #{80rpx};
-                    height: #{80rpx};
-                    border-radius: #{8rpx};
-                    margin: #{10rpx};
-                    image {
-                        border-radius: #{8rpx};
-                        width: #{80rpx};
-                        height: #{80rpx};
-                    }
-                }
-            }
-            .dialog-close {
-                width: #{630rpx};
-                border-top: #{2rpx} solid #e2e2e2;
-                font-size: #{32rpx};
-                text-align: center;
-                padding: #{25rpx} 0;
-            }
-        }
-    }
-    .bottom {
-        width: 100%;
-        height: #{120rpx};
-        position: fixed;
-        bottom: 0;
-        left: 0;
-        z-index: 30;
-        background-color: #fff;
-        border-top: #{2rpx} solid #e2e2e2;
-        font-size: #{24rpx};
-        color: #353535;
-        padding: 0 #{20rpx};
-        &.iphone_x {
-            height: #{150rpx};
-            padding-bottom: #{50rpx};
-        }
-        .total-price {
-            font-size: #{36rpx};
-            margin-left: #{8rpx};
-        }
-        .submit-btn {
-            width: #{678rpx};
-            height: #{78rpx};
-            // border-radius: #{39rpx};
-            color: #fff;
-            font-size: #{32rpx};
-            line-height: #{78rpx};
-            text-align: center;
-        }
-        .discount {
-            font-size: #{24rpx};
-        }
-    }
-    .bottom-space {
-        height: #{110rpx};
-        &.iphone_x {
-            height: #{160rpx};
-        }
-    }
-</style>
+	.no-tip {
+		position: fixed;
+		top: #{120rpx};
+		left: 0;
+		right: 0;
+		margin: 0 auto;
+		color: #666666;
+		font-size: #{24rpx};
+		width: #{240rpx};
+		text-align: center;
+
+		image {
+			height: #{240rpx};
+			width: #{240rpx};
+			margin-bottom: #{20rpx};
+		}
+
+		.to-composition {
+			border-radius: #{33rpx};
+			width: #{246rpx};
+			text-align: center;
+			height: #{66rpx};
+			line-height: #{66rpx};
+			margin-top: #{38rpx};
+			color: #fff;
+		}
+	}
+
+	.list {
+		padding: #{24rpx};
+
+		.title {
+			font-size: #{28rpx};
+			color: #353535;
+		}
+
+		.item {
+			margin-top: #{20rpx};
+			padding: #{24rpx};
+			border-radius: #{16rpx};
+			background-color: #fff;
+		}
+	}
+
+	.dialog-bg {
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		background-color: rgba(0, 0, 0, .3);
+		z-index: 202;
+
+		.dialog {
+			width: #{630rpx};
+			margin: #{260rpx} auto 0;
+			background-color: #fff;
+			padding-top: #{40rpx};
+			border-radius: #{16rpx};
+
+			.dialog-title {
+				text-align: center;
+				font-size: #{26rpx};
+				color: #999999;
+
+				.dialog-big-title {
+					font-size: #{32rpx};
+					color: #353535;
+					margin-bottom: #{10rpx};
+				}
+			}
+
+			.dialog-goods-list {
+				padding: 0 #{65rpx};
+				margin: #{26rpx} 0 #{48rpx};
+
+				.dialog-goods {
+					width: #{80rpx};
+					height: #{80rpx};
+					border-radius: #{8rpx};
+					margin: #{10rpx};
+
+					image {
+						border-radius: #{8rpx};
+						width: #{80rpx};
+						height: #{80rpx};
+					}
+				}
+			}
+
+			.dialog-close {
+				width: #{630rpx};
+				border-top: #{2rpx} solid #e2e2e2;
+				font-size: #{32rpx};
+				text-align: center;
+				padding: #{25rpx} 0;
+			}
+		}
+	}
+
+	.bottom {
+		width: 100%;
+		height: #{120rpx};
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		z-index: 30;
+		background-color: #fff;
+		border-top: #{2rpx} solid #e2e2e2;
+		font-size: #{24rpx};
+		color: #353535;
+		padding: 0 #{20rpx};
+
+		&.iphone_x {
+			height: #{150rpx};
+			padding-bottom: #{50rpx};
+		}
+
+		.total-price {
+			font-size: #{36rpx};
+			margin-left: #{8rpx};
+		}
+
+		.submit-btn {
+			width: #{678rpx};
+			height: #{78rpx};
+			// border-radius: #{39rpx};
+			color: #fff;
+			font-size: #{32rpx};
+			line-height: #{78rpx};
+			text-align: center;
+		}
+
+		.discount {
+			font-size: #{24rpx};
+		}
+	}
+
+	.bottom-space {
+		height: #{110rpx};
+
+		&.iphone_x {
+			height: #{160rpx};
+		}
+	}
+</style>