zs 2 yıl önce
ebeveyn
işleme
34ca6852c7

+ 5 - 0
common/api.js

@@ -9,6 +9,11 @@ const getDomain = (uri, method, type) => {
 		if (config.wx_dev) return url + `${config.wx_dev}` + integral_1;
 		else return url + integral_1;
 	}
+	if (type && type == 'group') {
+		let group_1 = `/point/group/v1/api` + uri;
+		if (config.wx_dev) return url + `${config.wx_dev}` + group_1;
+		else return url + group_1;
+	}
 	if (uri.startsWith('/wechat/api')) return url + uri;
 	else {
 		if (system.uniPlatform == 'app') {

+ 9 - 2
pages.json

@@ -248,7 +248,8 @@
 				{
 					"path": "group/index",
 					"style": {
-						"navigationBarTitleText": "团购"
+						"navigationBarTitleText": "团购",
+						"navigationBarBackgroundColor": "#23B67A"
 					}
 				},
 				{
@@ -257,8 +258,14 @@
 						"navigationBarTitleText": "团购分享",
 						"navigationBarBackgroundColor": "#23B67A"
 					}
+				},
+				{
+					"path": "group/order",
+					"style": {
+						"navigationBarTitleText": "团购订单",
+						"navigationBarBackgroundColor": "#23B67A"
+					}
 				}
-
 			]
 		},
 		{

+ 87 - 403
pagesHome/group/index.vue

@@ -2,127 +2,61 @@
 	<mobile-frame>
 		<view class="main">
 			<view class="one">
-				<view class="list" @tap="toView">
-					<image class="image" :src="goodsInfo.file&&goodsInfo.file.length>0?goodsInfo.file[0].url:''" mode="">
-					</image>
-					<view class="list_1_1">
-						<view class="name">
-							{{goodsInfo.name||'暂无'}}
-						</view>
-						<view class="specs">
-							<text>规格:{{specsInfo.name}}</text>
-							<text>店铺:{{shopInfo.name}}</text>
-						</view>
-						<view class="money">
-							原价¥<text>{{specsInfo.sell_money}}</text>团购价¥<text>{{specsInfo.group_config.money}}</text>
-						</view>
-					</view>
-				</view>
-			</view>
-			<view class="two">
-				<button type="default" size="default" @click="toGroup">我要开团</button>
-			</view>
-			<view class="thr">
-				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
-					<view class="list-scroll-view">
-						<view class="list" v-for="(item, index) in list" :key="index">
-							<view class="image">
-								<image class="file" v-for="(tag, indexs) in item.persons.slice(0,9)" :key="indexs" v-if="tag.status==0" :src="tag.icon&&tag.icon.length>0?tag.icon[0].url:''" mode="">
-								</image>
-							</view>
-							<view class="list_1">
-								<view class="name">
-									{{item.person_limit||0}}人即可开团成功
-								</view>
-								<view class="some">
-									<text>团长</text>
-									<text>{{item.leader.name||'暂无'}}</text>
-								</view>
-								<view class="some">
-									<text>参团人数</text>
-									<text>{{item.persons.length||0}}人</text>
-								</view>
-								<view class="some">
-									<text>开团时间</text>
-									<text>{{item.time||'暂无'}}</text>
-								</view>
-							</view>
-							<view class="other">
-								<view class="btn" @click="onJoin(item)">
-									<text>{{item.zhStatus||'暂无状态'}}</text>立即参团
-								</view>
-							</view>
-						</view>
-					</view>
-				</scroll-view>
-			</view>
-		</view>
-		<uni-popup ref="popup" background-color="#fff" type="bottom">
-			<view class="content">
-				<view class="one">
-					<text>数量</text>
-					<view class="count">
-						<uni-number-box :min="1" :max="specsInfo.num" v-model="num" @change="toCount">
-						</uni-number-box>
-					</view>
-					<text>库存{{specsInfo.num||0}}</text>
-				</view>
+				<uni-forms ref="form" v-model="form" :rules="rules" label-width="auto">
+					<uni-forms-item label="人数限制" name="person_limit">
+						<uni-easyinput type="number" v-model="form.person_limit" placeholder="请输入人数限制" />
+					</uni-forms-item>
+					<uni-forms-item label="开始时间" name="start_time">
+						<uni-datetime-picker type="datetime" v-model="form.start_time" @change="startChange" />
+					</uni-forms-item>
+					<uni-forms-item label="结束时间" name="end_time">
+						<uni-datetime-picker type="datetime" v-model="form.end_time" @change="endChange" />
+					</uni-forms-item>
+				</uni-forms>
 				<view class="btn">
-					<text @click="onSubmit" class="button">确认开团</text>
+					<button type="primary" size="mini" @click="onSubmit('form')">确认开团</button>
 				</view>
 			</view>
-		</uni-popup>
-		<uni-popup ref="popup1" background-color="#fff" type="bottom">
-			<view class="content">
-				<view class="one">
-					<text>数量</text>
-					<view class="count">
-						<uni-number-box :min="1" :max="specsInfo.num" v-model="num" @change="toCount">
-						</uni-number-box>
-					</view>
-					<text>库存{{specsInfo.num||0}}</text>
-				</view>
-				<view class="btn">
-					<text @click="onSubmit(join)" class="button">确认参团</text>
-				</view>
-			</view>
-		</uni-popup>
+		</view>
 	</mobile-frame>
 </template>
 
 <script>
-	import moment from 'moment';
 	export default {
 		data() {
 			return {
-				query: {},
 				user: {},
-				// 商品详情
-				goodsInfo: {},
-				// 规格详情
-				specsInfo: {},
-				// 店铺详情
-				shopInfo: {},
-				// 参团列表
-				list: [],
-				statusList: [],
-				// 参团数据
-				join: '',
-				num: 1,
-				total: 0,
-				skip: 0,
-				limit: 10,
-				page: 0
+				id: '',
+				form: {},
+				rules: {
+					person_limit: {
+						rules: [{
+							required: true,
+							errorMessage: '请输入人数限制',
+						}]
+					},
+					start_time: {
+						rules: [{
+							required: true,
+							errorMessage: '请选择开始时间'
+						}]
+					},
+					end_time: {
+						rules: [{
+							required: true,
+							errorMessage: '请选择结束时间'
+						}]
+					}
+				},
 			};
 		},
-		onLoad: async function(e) {
+		onLoad: function(e) {
+			const that = this;
+			that.$set(that, `form`, e || {});
+		},
+		onShow: function(e) {
 			const that = this;
-			that.$set(that, `query`, {
-				goods_id: e.goods_id || '',
-				specs_id: e.specs_id || ''
-			});
-			await that.watchLogin();
-			await that.search();
+			that.watchLogin();
 		},
 		methods: {
 			// 监听用户是否登录
@@ -132,141 +66,56 @@
 					key: 'token',
 					success: async function(res) {
 						let user = that.$jwt(res.data);
-						that.$set(that, `user`, user);
-						let status = await that.$api(`/dictData`, 'GET', {
-							code: "group_status"
-						});
-						if (status.errcode == '0') {
-							that.$set(that, `statusList`, status.data)
+						if (user) {
+							that.$set(that, `user`, user);
+							let res = await that.$api(`/goodsConfig`, `GET`, that.form, 'group');
+							if (res.errcode == '0' && res.total > 0) {
+								that.$set(that.form, `group_config`, res.data);
+							}
 						}
 					},
-					fail: function(err) {}
-				})
-			},
-			// 查询列表
-			async search() {
-				const that = this;
-				let res;
-				res = await that.$api(`/viewGoods/goodsDetail`, `POST`, {
-					id: that.query.goods_id
-				});
-				if (res.errcode == '0') {
-					that.$set(that, `goodsInfo`, res.data.goods)
-					that.$set(that, `shopInfo`, res.data.shop)
-				}
-				res = await that.$api(`/goodsSpec/${that.query.specs_id}`, 'GET')
-				if (res.errcode == '0') {
-					that.$set(that, `specsInfo`, res.data);
-				}
-				let info = {
-					skip: that.skip,
-					limit: that.limit,
-					goodsSpec: that.query.specs_id,
-					status: '0'
-				}
-				res = await that.$api(`/group`, 'GET', {
-					...info
-				})
-				if (res.errcode == '0') {
-					let list = [...that.list, ...res.data];
-					for (let val of list) {
-						val.persons = val.persons.filter(i => i.status == '0')
-						let status = that.statusList.find(i => i.value == val.status)
-						if (status) val.zhStatus = status.label;
-						val.time = moment(val.meta.createdAt).format('YYYY-MM-DD HH:mm:ss')
+					fail: function(err) {
+						uni.navigateTo({
+							url: '/pages/login/index'
+						})
 					}
-					that.$set(that, `list`, list);
-					that.$set(that, `total`, res.total)
-				}
-			},
-			// 分页
-			toPage(e) {
-				const that = this;
-				let list = that.list;
-				let limit = that.limit;
-				if (that.total > list.length) {
-					uni.showLoading({
-						title: '加载中',
-						mask: true
-					})
-					let page = that.page + 1;
-					that.$set(that, `page`, page)
-					let skip = page * limit;
-					that.$set(that, `skip`, skip)
-					that.search();
-					uni.hideLoading();
-				} else {}
-			},
-			// 开团
-			async toGroup() {
-				const that = this;
-				that.$refs.popup.open();
+				})
 			},
-			// 参团
-			async onJoin(e) {
+			// 开始时间选择
+			startChange(e) {
 				const that = this;
-				that.$set(that, `join`, e)
-				that.$refs.popup1.open();
+				that.$set(that.form, `start_time`, e);
 			},
-			// 计数器
-			toCount(e) {
+			// 结束时间选择
+			endChange(e) {
 				const that = this;
-				that.num = e;
+				that.$set(that.form, `end_time`, e);
 			},
-			// 确认开团 立即参团
-			async onSubmit(e) {
+			// 提交保存
+			onSubmit(ref) {
 				const that = this;
-				let user = that.user;
-				if (user._id) {
-					let data = {
-						customer: user._id,
-						shop: that.shopInfo._id,
-						goods: that.goodsInfo._id,
-						goodsSpec: that.specsInfo._id,
-						num: that.num,
-						type: '1'
-					}
-					if (e._id) {
-						data.group = e._id
-					}
-					let arr = await that.$api(`/util/checkCanBuy`, 'POST', data)
-					if (arr.errcode == '0') {
-						if (arr.data.result == true) {
-							if (e._id) {
+				uni.showModal({
+					title: '提示',
+					content: '确定是否开团吗?',
+					success: async function(res) {
+						that.$set(that.form, `leader`, that.user.id || '');
+						that.$refs[ref].validate().then(async params => {
+							// 创建团数据
+							let res = await that.$api(`/group`, 'POST', that.form, 'group');
+							if (res.errcode == '0') {
 								uni.navigateTo({
-									url: `/pagesHome/order/order?key=${arr.data.key}&group_id=${e._id}`
+									url: `/pagesHome/group/share?id=${res.data.goods}`
 								})
 							} else {
-								uni.navigateTo({
-									url: `/pagesHome/order/order?key=${arr.data.key}`
+								uni.showToast({
+									title: res.errmsg,
+									icon: 'none'
 								})
 							}
-						} else {
-							uni.showToast({
-								title: arr.data.msg,
-								icon: 'none'
-							})
-						}
-					} else {
-						uni.showToast({
-							title: arr.errmsg,
-							icon: 'none'
 						})
 					}
-				} else {
-					uni.navigateTo({
-						url: `/pages/login/index`
-					})
-				}
+				});
 			},
-			// 清空列表
-			clearPage() {
-				const that = this;
-				that.$set(that, `list`, [])
-				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 6)
-				that.$set(that, `page`, 0)
-			}
 		}
 	}
 </script>
@@ -279,191 +128,26 @@
 		height: 100vh;
 
 		.one {
+			padding: 2vw;
 
-			.list {
-				display: flex;
-				flex-direction: row;
-				justify-content: space-between;
-				width: 91vw;
-				border: 0.5vw dashed var(--ff0Color);
-				margin: 2vw 2vw 0 2vw;
-				padding: 2vw;
-				border-radius: 5px;
-
-				.image {
-					width: 25vw;
-					height: 25vw;
-					border-radius: 5px;
-					margin: 0 2vw 0 0;
-				}
-
-				.list_1_1 {
-					display: flex;
-					flex-direction: column;
-					justify-content: space-between;
-					flex-grow: 1;
-					padding: 2vw 0;
-
-					.name {
-						font-size: var(--font16Size);
-						margin: 0 0 1vw 0;
-					}
-
-					.specs {
-						display: flex;
-						justify-content: space-between;
-						color: var(--f85Color);
-						font-size: var(--font12Size);
-					}
-
-					.money {
-						color: var(--fFB1Color);
-						font-size: var(--font14Size);
-						margin: 0 0 1vw 0;
-
-						text {
-							font-size: var(--font16Size);
-							font-weight: bold;
-							margin: 0 1vw 0 0;
-						}
-					}
-				}
+			.toLoacl {
+				margin: 1vw 0 0 0;
 			}
-		}
-
-		.two {
-			margin: 4vw 0 0 0;
-
-			button {
-				margin: 0 2vw 2vw 2vw;
-				background-color: #FFA500;
-				color: var(--fffColor);
-			}
-
-		}
 
-		.thr {
-			position: relative;
-			flex-grow: 1;
-
-			.list {
-				display: flex;
-				flex-direction: row;
-				justify-content: space-between;
-				align-items: center;
-				width: 91vw;
-				border: 1px solid var(--f1Color);
-				margin: 2vw 2vw 0 2vw;
-				padding: 0 2vw;
+			.picker {
+				border: 1px solid #3333;
 				border-radius: 5px;
-
-				.image {
-					display: flex;
-					flex-wrap: wrap;
-					justify-content: center;
-					align-items: center;
-					width: 27vw;
-					height: 27vw;
-					border-radius: 5px;
-					margin: 0 2vw 0 0;
-
-					.file {
-						width: 9vw;
-						height: 9vw;
-					}
-				}
-
-				.list_1 {
-					display: flex;
-					flex-direction: column;
-					flex-grow: 1;
-					padding: 2vw 0;
-					width: 35vw;
-
-					.name {
-						font-size: var(--font16Size);
-						margin: 0 0 1vw 0;
-					}
-
-					.some {
-						color: var(--f85Color);
-						font-size: var(--font14Size);
-
-						text:last-child {
-							margin: 0 0 0 1vw;
-							color: var(--f00Color);
-						}
-					}
-				}
-
-				.other {
-					.btn {
-						display: flex;
-						flex-direction: column;
-						align-items: center;
-						margin: 0 2vw;
-						padding: 2vw 3vw;
-						background-color: var(--ff0Color);
-						color: var(--fffColor);
-						border-radius: 2vw;
-						font-size: var(--font14Size);
-
-						text {
-							font-size: var(--font12Size);
-						}
-					}
-				}
-			}
-		}
-	}
-
-	.scroll-view {
-		position: absolute;
-		top: 0;
-		left: 0;
-		right: 0;
-		bottom: 0;
-
-		.list-scroll-view {
-			display: flex;
-			flex-direction: column;
-		}
-	}
-
-	.content {
-		height: 60vw;
-
-		.one {
-			display: flex;
-			justify-content: flex-start;
-			align-items: center;
-			margin: 0 2vw;
-			padding: 2vw 0;
-
-			text {
-				margin: 0 2vw 0 0;
-			}
-
-			text:last-child {
-				margin: 0 0 0 2vw;
-				font-size: var(--font12Size);
-				color: var(--f85Color);
+				padding: 2vw;
 			}
-		}
 
-		.btn {
-			display: flex;
-			justify-content: space-between;
-			position: fixed;
-			bottom: 0;
-
-			.button {
-				width: 100vw;
-				padding: 4vw 0;
-				background-color: var(--fFB1Color);
+			.btn {
 				text-align: center;
-				font-size: var(--font18Szie);
-				color: var(--mainColor);
+
+				button {
+					width: 30%;
+					font-size: 14px;
+					background-color: var(--f35BColor);
+				}
 			}
 		}
 	}

+ 579 - 0
pagesHome/group/order.vue

@@ -0,0 +1,579 @@
+<template>
+	<mobile-frame>
+		<view class="main">
+			<view class="one">
+				<scroll-view scroll-y="true" class="scroll-view">
+					<view class="list-scroll-view">
+						<view class="one_1" @tap="toChoose">
+							<text class="localicon iconfont icon-dingweixiao"></text>
+							<view class="other" v-if="address._id">
+								<view class="name">
+									<text>{{address.name}},</text>{{address.phone}}
+								</view>
+								<view class="other_1">
+									<text>{{address.province}}</text><text>{{address.city}}</text>
+									<text>{{address.area}}</text><text>{{address.address}}</text>
+								</view>
+							</view>
+							<view class="address" v-else><text>请选择一个收货地址</text></view>
+							<text class="iconfont icon-jiantouyou"></text>
+						</view>
+						<view class="one_2">
+							<view class="list" v-for="(item,index) in orderList" :key="index">
+								<view class="list_1">
+									<view class="l">
+										<text class="iconfont icon-shangdian"></text>
+										<text>{{item.shop_name}}</text>
+									</view>
+								</view>
+								<view class="list_2" v-for="(tag,index) in item.goods" :key="index">
+									<view class="list_2_1">
+										<view class="l">
+											<image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''"
+												mode=""></image>
+										</view>
+										<view class="c">
+											<view class="name">
+												{{tag.goods_name}}
+											</view>
+											<view class="Spec">
+												规格:{{tag.goodsSpec_name}}
+											</view>
+										</view>
+										<view class="r">
+											<view class="price">
+												¥{{tag.price}}
+											</view>
+											<view class="num">
+												×{{tag.num}}
+											</view>
+										</view>
+									</view>
+								</view>
+								<view class="list_3">
+									<view class="other">
+										<view class="other_1">配送方式</view>
+										<view class="other_2"><text class="iconfont icon-duihao"></text>快递配送</view>
+									</view>
+									<view class="other">
+										<view class="other_1">运费</view>
+										<view class="other_2" v-if="!item.freight_total==0">¥{{item.freight_total}}
+										</view>
+										<view class="other_2" v-else>包邮</view>
+									</view>
+									<view class="other">
+										<view class="other_1">订单备注</view>
+										<view class="other_3">
+											<input type="text" v-model="item.remarks" placeholder="选填,可填写您与卖家达成一致的要求" />
+										</view>
+									</view>
+								</view>
+							</view>
+							<view class="other" v-for="(item,index) in total_detail" :key="index">
+								<view class="other_1">{{item.zh}}</view>
+								<view class="other_2">¥{{item.money}}</view>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+			</view>
+			<view class="two">
+				<view class="two_1">
+					<view>实付金额:</view>
+					<view>¥{{goods_total}}</view>
+				</view>
+				<view class="two_2">
+					<text @tap="toSubmit">提交订单</text>
+				</view>
+			</view>
+		</view>
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				// 设备平台信息
+				system: {},
+				user: {},
+				key: '',
+				address: {},
+				orderList: [],
+				shop: [],
+				goods_total: 0,
+				// 金额明细
+				total_detail: [],
+				// 收货地址
+				addressList: [],
+				total: 0,
+				page: 0,
+				skip: 0,
+				limit: 10,
+			};
+		},
+		onLoad: function(e) {
+			const that = this;
+			uni.$on("id", async (id) => {
+				let arr = await that.$api(`/address/${id}`, `GET`)
+				if (arr.errcode == '0') {
+					that.$set(that, `address`, arr.data)
+				}
+			})
+			that.$set(that, `key`, e.key || '');
+			that.watchLogin()
+		},
+		methods: {
+			// 监听用户是否登录
+			watchLogin() {
+				const that = this;
+				uni.getStorage({
+					key: 'token',
+					success: function(res) {
+						let user = that.$jwt(res.data);
+						that.$set(that, `user`, user);
+						// 设备平台信息
+						let config = that.$config;
+						that.$set(that, `system`, config.system);
+						that.search()
+					},
+					fail: function(err) {
+						uni.navigateTo({
+							url: `/pages/login/index`
+						})
+					}
+				})
+			},
+			// 查询列表
+			async search() {
+				const that = this;
+				let user = that.user;
+				const res = await that.$api(`/address`, 'GET', {
+					customer: user._id
+				})
+				if (res.errcode == '0') {
+					that.$set(that, `addressList`, res.data.reverse());
+				}
+				const arr = await that.$api(`/order/toMakeOrder`, 'POST', {
+					key: that.key
+				})
+				if (arr.errcode == '0') {
+					// 地址
+					that.$set(that, `address`, arr.data.address);
+					// 订单
+					that.$set(that, `orderList`, arr.data.goodsData);
+					// 总价
+					that.$set(that, `total_detail`, arr.data.orderTotal);
+					that.computedTotal();
+				}
+			},
+			// 选择收货地址
+			toChoose() {
+				const that = this;
+				if (that.address?._id) {
+					uni.navigateTo({
+						url: `/pagesMy/address/index?type=${"shopping"}&id=${that.address._id}`
+					})
+				} else {
+					uni.navigateTo({
+						url: `/pagesMy/address/index?type=${"shopping"}`
+					})
+				}
+			},
+			// 提交订单
+			async toSubmit() {
+				const that = this;
+				let system = that.system;
+				if (that.address) {
+					let obj = {
+						address: that.address,
+						goods: that.orderList,
+						total_detail: that.total_detail,
+						coupon: that.coupon,
+						type: that.type,
+						inviter: that.inviter,
+						plus_goods: that.plus_goods
+					}
+					if (that.group_id) obj.group = that.group_id;
+					// 创建订单
+					let p1 = await that.$api(`/order`, 'POST', obj);
+					if (p1.errcode == '0') {
+						if (system.uniPlatform == "mp-weixin") {
+							// 微信支付
+							uni.showLoading({
+								title: '加载中'
+							})
+							// 支付信息
+							let p2 = await that.$api('/pay/toPayOrder', 'POST', {
+								order_id: p1.data,
+								type: '0'
+							})
+							if (p2.errcode == '0' && p2.data.paySign) {
+								uni.requestPayment({
+									"provider": "wxpay",
+									...p2.data,
+									success: async function(res) {
+										// 获取团信息
+										let p3 = await that.$api('/group/getGroup', 'GET', {
+											order_id: p1.data,
+										})
+										if (p3.errcode == '0') {
+											uni.hideLoading();
+											if (p3.data) {
+												uni.reLaunch({
+													url: `/pagesHome/group/share?id=${p3.data}`
+												})
+											} else {
+												uni.reLaunch({
+													url: `/pagesMy/order/index?status=${'1'}`
+												})
+											}
+										} else {
+											uni.showToast({
+												title: p3.errmsg,
+												icon: 'none'
+											})
+										}
+									},
+									fail: function(err) {
+										uni.showToast({
+											title: `支付失败`,
+											icon: 'none'
+										})
+										uni.hideLoading();
+										uni.reLaunch({
+											url: `/pagesMy/order/index?status=${'0'}`
+										})
+									}
+								})
+							} else {
+								uni.showToast({
+									title: p2.errmsg,
+									icon: 'none'
+								})
+							}
+						} else if (system.uniPlatform == "app") {
+							uni.requestPayment({
+								provider: 'alipay',
+								orderInfo: 'orderInfo',
+								success: function(res) {
+									console.log('success:' + JSON.stringify(res));
+								},
+								fail: function(err) {
+									console.log('fail:' + JSON.stringify(err));
+								}
+							});
+						} else {
+							uni.showToast({
+								title: `平台不支持支付`,
+								icon: 'none'
+							})
+						}
+					} else {
+						uni.showToast({
+							title: p1.errmsg,
+							icon: 'none'
+						})
+					}
+				} else {
+					uni.showToast({
+						title: `没有收货地址`,
+						icon: 'none'
+					})
+				}
+			},
+			// 计算优惠券
+			async computedTotal() {
+				const total_detail = this.total_detail;
+				let total = 0;
+				for (let val of total_detail) total = this.$plus(total, val.money)
+				if (total >= 0) {
+					this.$set(this, `goods_total`, total);
+				} else {
+					uni.showToast({
+						title: `实付金额不能为负数 不能使用该优惠劵`,
+						icon: 'none'
+					})
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.main {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+
+		.one {
+			position: relative;
+			flex-grow: 1;
+			background-color: var(--f1Color);
+
+			.one_1 {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				width: 100vw;
+				padding: 2vw;
+				border-bottom: 1vw dashed var(--fcColor);
+
+				.address {
+					flex-grow: 1;
+					margin: 0 0 0 2vw;
+					font-size: var(--font14Size);
+					color: var(--f85Color);
+				}
+
+				.iconfont {
+					font-size: var(--font20Szie);
+				}
+
+				.other {
+					width: 82vw;
+					padding: 0 2vw;
+
+					.name {
+						font-size: var(--font16Size);
+					}
+
+					.other_1 {
+						font-size: var(--font14Size);
+						color: var(--f85Color);
+
+						text {
+							margin: 0 1vw 0 0;
+						}
+					}
+				}
+			}
+
+			.one_2 {
+				.list {
+					width: 100vw;
+					margin: 2vw 0;
+
+					.list_1 {
+						padding: 2vw;
+						background-color: var(--mainColor);
+						border-bottom: 0.1vw solid var(--fcColor);
+
+						text {
+							padding: 0 0 0 1vw;
+						}
+					}
+
+					.list_2 {
+						padding: 2vw;
+						background-color: var(--mainColor);
+
+						.list_2_1 {
+							display: flex;
+
+							.l {
+								width: 20vw;
+
+								.image {
+									width: 100%;
+									height: 20vw;
+									border-radius: 5px;
+								}
+							}
+
+							.c {
+								width: 60vw;
+								padding: 0 2vw;
+
+								.Spec {
+									font-size: var(--font12Size);
+									color: var(--f85Color);
+								}
+							}
+
+							.r {
+								width: 15vw;
+								text-align: right;
+							}
+						}
+
+						.list_2_2 {
+							padding: 0 1vw 1vw 0;
+							font-size: var(--font14Size);
+						}
+
+						.list_2_3 {
+							display: flex;
+							justify-content: space-between;
+							border: 1px solid var(--fcColor);
+							border-radius: 5px;
+							margin: 0 0 1vw 0;
+							padding: 1vw;
+
+							.left {
+								.name {
+									font-size: 14px;
+								}
+
+								.Spec {
+									font-size: var(--font12Size);
+									color: var(--f85Color);
+								}
+							}
+						}
+					}
+
+					.list_3 {
+						width: 96vw;
+						padding: 2vw;
+						background-color: var(--mainColor);
+
+						.other {
+							display: flex;
+							justify-content: space-between;
+							border-bottom: 0.1vw solid var(--fcColor);
+							margin: 0 0 2vw 0;
+							padding: 2vw 0;
+
+							.other_1 {
+								font-size: var(--font16Size);
+								color: var(--f85Color);
+							}
+
+							.other_3 {
+								flex-grow: 1;
+								margin: 0 0 0 2vw;
+								font-size: var(--font12Size);
+							}
+
+							text {
+								padding: 0 1vw 0 0;
+								font-size: var(--font20Szie);
+							}
+						}
+					}
+				}
+
+				.other {
+					display: flex;
+					justify-content: space-between;
+					background-color: var(--mainColor);
+					border-bottom: 0.1vw solid var(--fcColor);
+					width: 96vw;
+					padding: 2vw;
+
+					.other_1 {
+						font-size: var(--font16Size);
+						color: var(--f85Color);
+					}
+
+					.other_3 {
+						flex-grow: 1;
+						margin: 0 0 0 2vw;
+						font-size: var(--font12Size);
+					}
+
+					.other_4 {
+						color: var(--fFB1Color);
+					}
+
+					text {
+						padding: 0 1vw 0 0;
+						font-size: var(--font20Szie);
+					}
+				}
+			}
+		}
+
+		.two {
+			display: flex;
+			justify-content: space-between;
+			border-top: 0.1vw solid var(--fcColor);
+
+			.two_1 {
+				display: flex;
+				align-items: center;
+				padding: 0 2vw;
+				font-size: var(--font16Size);
+
+				view:last-child {
+					margin: 0 0 0 2vw;
+					color: var(--ff0Color);
+					font-weight: bold;
+				}
+			}
+
+			.two_2 {
+				padding: 3vw 4vw;
+				color: var(--mainColor);
+				font-size: var(--font16Size);
+				background-color: var(--ff0Color);
+			}
+		}
+	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: row;
+			flex-wrap: wrap;
+		}
+	}
+
+	.popup {
+		display: flex;
+		flex-direction: column;
+		height: 100vw;
+		overflow-x: hidden;
+		background-color: var(--f5Color);
+		padding: 2vw;
+
+		.list {
+			.one {
+				display: flex;
+				justify-content: space-between;
+				margin: 2vw 0 0 0;
+				padding: 2vw;
+				background-color: var(--mainColor);
+
+				.name {
+					font-size: var(--font16Size);
+				}
+
+				.address {
+					font-size: var(--font14Size);
+				}
+
+				.iconfont {
+					line-height: 15vw;
+					font-size: var(--font20Szie);
+				}
+			}
+
+			.two {
+				display: flex;
+				justify-content: space-between;
+				border-top: 0.1vw solid var(--fcColor);
+				padding: 2vw;
+				background-color: var(--mainColor);
+				font-size: var(--font14Size);
+
+				.text {
+					margin: 0 2vw 0 0;
+					border: 0.1vw solid var(--fFB1Color);
+					padding: 1vw;
+					font-size: var(--font12Size);
+					border-radius: 2vw;
+					color: var(--fFB1Color);
+				}
+			}
+		}
+	}
+</style>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 804 - 124
pagesHome/group/share.vue


+ 46 - 20
pagesHome/order/detail.vue

@@ -5,7 +5,8 @@
 				<scroll-view scroll-y="true" class="scroll-view">
 					<view class="list-scroll-view">
 						<view class="one_1">
-							<swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff" indicator-active-color="#FB1438" :interval="3000" :duration="1000">
+							<swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff"
+								indicator-active-color="#FB1438" :interval="3000" :duration="1000">
 								<swiper-item class="list" v-for="(item,index) in info.goods.file" :key="index">
 									<image class="image" :src="item.url" mode="aspectFit">
 									</image>
@@ -13,7 +14,8 @@
 							</swiper>
 							<!-- 是否关注商品 -->
 							<view class="goodsColect">
-								<text @tap="toGoodscolect" :class="['iconfont',goodsColect?'icon-yduishoucangshixin-copy':'icon-yduishoucangkongxin']"></text>
+								<text @tap="toGoodscolect"
+									:class="['iconfont',goodsColect?'icon-yduishoucangshixin-copy':'icon-yduishoucangkongxin']"></text>
 							</view>
 							<view class="acttags" v-if="info.goods.act_tags&&info.goods.act_tags.length>0">
 								<text v-for="i in info.goods.act_tags" :key="i">{{i.label}}</text>
@@ -25,8 +27,10 @@
 							<text class="money"><text>¥</text>{{infospecs.flow_money||0}}</text>
 						</view>
 						<view class="one_3" v-if="discount">
-							<text v-if="discount.full_decrement" class="act" v-for="(item,index) in discount.full_decrement" :key="index">{{item}}</text>
-							<text v-if="discount.full_fold" class="act" v-for="(item,index) in discount.full_fold" :key="index">{{item}}</text>
+							<text v-if="discount.full_decrement" class="act"
+								v-for="(item,index) in discount.full_decrement" :key="index">{{item}}</text>
+							<text v-if="discount.full_fold" class="act" v-for="(item,index) in discount.full_fold"
+								:key="index">{{item}}</text>
 						</view>
 						<view class="one_4">
 							<view class="name">
@@ -67,7 +71,9 @@
 						<view class="one_7">
 							<view class="one_7_1">
 								<view class="shop_1">
-									<image class="image" :src="info.shop.logo&&info.shop.logo.length>0?info.shop.logo[0].url:''" mode="aspectFit"></image>
+									<image class="image"
+										:src="info.shop.logo&&info.shop.logo.length>0?info.shop.logo[0].url:''"
+										mode="aspectFit"></image>
 								</view>
 								<view class="shop_2">
 									<view class="name">{{info.shop.name}}</view>
@@ -106,7 +112,8 @@
 				</scroll-view>
 			</view>
 			<view class="two">
-				<uni-goods-nav :options="options" :button-group="buttonGroup" @click="toNavleft" @buttonClick="toNavright" />
+				<uni-goods-nav :options="options" :button-group="buttonGroup" @click="toNavleft"
+					@buttonClick="toNavright" />
 			</view>
 		</view>
 		<!-- 跳转菜单 -->
@@ -114,7 +121,8 @@
 			<text @tap="toMenubar" class="iconfont icon-gengduo"></text>
 		</view>
 		<view class="bar_2" v-if="is_menu">
-			<view class="list" v-for="(item,index) in barList" :key="index" v-if="item.is_use=='0'" @click="toPath(item)">
+			<view class="list" v-for="(item,index) in barList" :key="index" v-if="item.is_use=='0'"
+				@click="toPath(item)">
 				<image class="image" :src="item.normal&&item.normal.length>0?item.normal[0].url:''"></image>
 				<text class="name"> {{item.name}}</text>
 			</view>
@@ -132,12 +140,16 @@
 								<view class="one">
 									<view class="one_1">
 										<view class="l">
-											<image class="image" :src="specsInfo.file.length>0?specsInfo.file[0].url:info.goods.file[0].url" mode="aspectFill" @tap="diaView"></image>
+											<image class="image"
+												:src="specsInfo.file.length>0?specsInfo.file[0].url:info.goods.file[0].url"
+												mode="aspectFill" @tap="diaView"></image>
 										</view>
 										<view class="r">
 											<view class="money">
-												<text v-if="specsInfo.price" class="money_1"><text>特价¥</text>{{specsInfo.price}}</text>
-												<text v-if="!specsInfo.price" class="money_1"><text>¥</text>{{specsInfo.sell_money}}</text>
+												<text v-if="specsInfo.price"
+													class="money_1"><text>特价¥</text>{{specsInfo.price}}</text>
+												<text v-if="!specsInfo.price"
+													class="money_1"><text>¥</text>{{specsInfo.sell_money}}</text>
 												<text class="money_1"><text>¥</text>{{specsInfo.flow_money}}</text>
 											</view>
 											<view class="other_1">
@@ -155,7 +167,9 @@
 											规格
 										</view>
 										<view class="one_2_2">
-											<view :class="['list',is_specs!=index&&item.num>0?'list':is_specs!=index&&item.num<=0?'huilist':is_specs==index&&item.num>0?'redlist':is_specs==index&&item.num<=0?'huiilist':'list']" v-for="(item,index) in info.specs" :key="index" @tap="toSpecs(item)">
+											<view
+												:class="['list',is_specs!=index&&item.num>0?'list':is_specs!=index&&item.num<=0?'huilist':is_specs==index&&item.num>0?'redlist':is_specs==index&&item.num<=0?'huiilist':'list']"
+												v-for="(item,index) in info.specs" :key="index" @tap="toSpecs(item)">
 												<text>{{item.name}}</text>
 											</view>
 										</view>
@@ -165,7 +179,8 @@
 											<text>数量</text>
 										</view>
 										<view class="one_3_1">
-											<uni-number-box v-model="buy_num" @change="toCount" :min="1" :max="specsInfo.num">
+											<uni-number-box v-model="buy_num" @change="toCount" :min="1"
+												:max="specsInfo.num">
 											</uni-number-box>
 										</view>
 										<view class="one_3_1">
@@ -184,7 +199,7 @@
 							<button :disabled="is_zero" :class="[is_zero?'btncolor':'']" @tap="toBuy">立即购买</button>
 						</view>
 						<view :class="[specsInfo.can_group=='0'?'btns':'btn']" v-if="specsInfo.can_group=='0'">
-							<button :disabled="is_zero" :class="[is_zero?'btncolor':'']" @tap="toGroup">团</button>
+							<button :disabled="is_zero" :class="[is_zero?'btncolor':'']" @tap="toGroup">我要开团</button>
 						</view>
 					</view>
 				</view>
@@ -207,7 +222,8 @@
 								<view class="title_2" v-if="item.type=='2'">
 									<view class="specList" v-for="(tag,indexx) in item.list" :key="indexx">
 										<view class="name">规格:{{tag.spec_name}}</view>
-										<view class="giftList" v-for="(tags,indexs) in tag.gift" :key="indexs" @tap.stop="tags.type=='0' && getDetail(tags)">
+										<view class="giftList" v-for="(tags,indexs) in tag.gift" :key="indexs"
+											@tap.stop="tags.type=='0' && getDetail(tags)">
 											<view class="left">
 												<view class="goods">{{tags.goods_name}}{{tags.spec_name}}</view>
 												<view class="goods">{{tags.desc}}</view>
@@ -229,7 +245,8 @@
 				<swiper class="swiper" circular @change="diaSpecs" :current="is_specs">
 					<swiper-item class="list" v-for="(item,index) in info.specs" :key="index">
 						<view class="list_1">
-							<image class="image" :src="item.file.length>0?item.file[0].url:info.goods.file[0].url" mode="aspectFit"></image>
+							<image class="image" :src="item.file.length>0?item.file[0].url:info.goods.file[0].url"
+								mode="aspectFit"></image>
 						</view>
 						<view class="name">
 							<text>{{item.name}}</text>
@@ -302,6 +319,8 @@
 				specsInfo: {},
 				// 是否零库存
 				is_zero: false,
+				// 商品设置
+				group_config: [],
 				// 购买数量
 				buy_num: 1,
 				// 规格弹出框
@@ -384,7 +403,13 @@
 					customer: user._id,
 					shop: that.info?.shop?._id
 				});
-				if (res.errcode == '0') that.$set(that, `shopColect`, res.data)
+				if (res.errcode == '0') that.$set(that, `shopColect`, res.data);
+				// 商品设置
+				res = await that.$api(`/goodsConfig`, `GET`, {
+					goods: that.id,
+					shop: that.info?.shop?._id
+				}, 'group');
+				if (res.errcode == '0' && res.total > 0) that.$set(that, `group_config`, res.data);
 			},
 			// 查询商品信息
 			async search() {
@@ -473,6 +498,9 @@
 				let specs = that.info.specs;
 				let dataIndex = specs.findIndex(i => i._id == e._id);
 				that.$set(that, `is_specs`, dataIndex);
+				let specsInfo = that.group_config.find(i => i.spec == e._id)
+				if (specsInfo?._id && that.user.is_leader == '0') e.can_group = '0'
+				else e.can_group = '1'
 				that.$set(that, `specsInfo`, e)
 				that.$set(that, `buy_num`, 1);
 				if (e.num <= 0) that.$set(that, `is_zero`, true)
@@ -597,13 +625,11 @@
 					})
 				}
 			},
-			// 
+			// 
 			toGroup() {
 				const that = this;
-				let specs_id = that.specsInfo._id;
-				let id = that.id;
 				uni.navigateTo({
-					url: `/pagesHome/group/index?specs_id=${specs_id}&goods_id=${id}`
+					url: `/pagesHome/group/index?shop=${that.info.shop._id}&goods=${that.id}`
 				})
 			},
 			// 关闭弹框

+ 388 - 160
pagesMy/dough/index.vue

@@ -2,47 +2,157 @@
 	<mobile-frame>
 		<view class="main">
 			<view class="one">
-				<input type="text" v-model="searchInfo.name" @blur="toInput" placeholder="搜索商品名称">
-			</view>
-			<view class="two">
 				<tabs :tabs="tabs" @tabsChange="tabsChange">
 					<view class="tabsList">
 						<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
 							<view class="list-scroll-view">
-								<view class="list" v-for="(item, index) in list" :key="index" @click="toShare(item)">
-									<view class="image">
-										<image class="file" v-for="(tag, indexs) in item.persons.slice(0,9)" :key="indexs" :src="tag.icon&&tag.icon.length>0?tag.icon[0].url:''" mode="">
-										</image>
-									</view>
-									<view class="list_1">
-										<view class="name">
-											{{item.person_limit||0}}人即可开团成功
-										</view>
-										<view class="some">
-											<text>团长</text>
-											<text>{{item.leader.name||'暂无'}}</text>
-										</view>
-										<view class="some">
-											<text>参团人数</text>
-											<text>{{item.persons.length||0}}人</text>
-										</view>
-										<view class="some">
-											<text>开团时间</text>
-											<text>{{item.time||'暂无'}}</text>
-										</view>
-									</view>
-									<view class="other">
-										<view v-if="item.status=='0'" class="btn">
-											<text>{{item.zhStatus||'暂无状态'}}</text>
-										</view>
-										<view v-else-if="item.status=='-1'" class="button">
-											{{item.zhStatus||'暂无状态'}}
+								<view class="one_1">
+									<input type="text" v-model="searchInfo.name" @blur="toInput" placeholder="搜索商品名称">
+								</view>
+								<view class="one_2">
+									<view class="list" v-for="(item, index) in list" :key="index"
+										@click="toShare(item)">
+										<view class="list_1" v-if="tabs.active=='0'">
+											<view class="list_1_1">
+												<view class="shopname">
+													<text class="iconfont icon-shangdian"></text>
+													<text>{{item.shop.name}}</text>
+												</view>
+												<view class="status">
+													{{item.zhStatus||'暂无'}}
+												</view>
+											</view>
+											<view class="list_1_2">
+												<view class="goods" v-for="(tag,indexs) in item.goods" :key="indexs">
+													<view class="goods_1">
+														<image class="image" :src="tag.url" mode=""></image>
+													</view>
+													<view class="goods_2">
+														<view class="goodsname textOver">
+															{{tag.goods.name}}
+														</view>
+														<view class="specs">
+															{{tag.name}}
+														</view>
+														<text v-if="tag.gift.length>0" class="gift">赠品</text>
+														<text v-if="tag.sp_price" class="act">特价</text>
+													</view>
+													<view class="goods_3">
+														<view v-if="item.type=='0'" class="price">
+															¥{{tag.price||tag.sell_money}}
+														</view>
+														<view v-else class="price">
+															¥{{tag.group_config.money}}
+														</view>
+														<view class="num">
+															×{{tag.buy_num}}
+														</view>
+													</view>
+												</view>
+											</view>
+											<view class="other">
+												<text>共{{item.buy_num_total||0}}件商品</text>
+												<text>实付款¥{{item.real_pay}}</text>
+											</view>
+											<view class="btn">
+												<button v-if="item.status=='0'" size="mini"
+													@tap.stop="toCancel(item)">取消订单</button>
+												<button v-if="item.status=='0'" size="mini"
+													@tap.stop="toPay(item)">支付</button>
+												<button v-if="item.status=='1'&&item.is_afterSale!=true" size="mini"
+													@tap.stop="toCancels(item)">取消订单</button>
+												<button v-if="item.status=='2'||item.status=='3'||item.status=='2-'"
+													size="mini" @tap.stop="toLogi(item)">查看物流</button>
+												<button v-if="item.status=='2'&&item.is_afterSale!=true" size="mini"
+													@tap.stop="toConfirm(item)">确认收货</button>
+												<button
+													v-if="item.status=='2'||item.status=='2-'&&item.is_afterSale!=true"
+													size="mini" @tap.stop="toReject(item)">拒收</button>
+												<button v-if="item.status=='3'" size="mini"
+													@tap.stop="toAfter(item)">申请售后</button>
+												<button v-if="item.status=='3'" type="default" size="mini"
+													@tap.stop="toAppraise(item)">{{item.rate?'追加评价':'立即评价'}}</button>
+											</view>
 										</view>
-										<view v-else-if="item.status=='2'" class="button">
-											已退团
+										<view class="list_2" v-else-if="tabs.active=='-1'">
+											<view class="list_2_1">
+												<view class="shopname">
+													<text class="iconfont icon-shangdian"></text>
+													<text>{{item.shop.name}}</text>
+												</view>
+												<view class="type">
+													{{item.zhType||'暂无'}}
+												</view>
+											</view>
+											<view class="list_2_2">
+												<image class="image"
+													:src="item.url&&item.url.length>0?item.url[0].url:''" mode="">
+												</image>
+												<view class="other">
+													<view class="name textOver">
+														{{item.goods.goods.name||'暂无'}}
+													</view>
+													<view class="other_1">
+														商品规格:<text>{{item.goods.name||'暂无'}}</text>
+													</view>
+													<view class="other_1" v-if="item.type!='3'">
+														退款:<text>¥{{item.money||0}}</text>
+													</view>
+													<view class="other_1">
+														申请时间:<text>{{item.apply_time||'暂无'}}</text>
+													</view>
+													<view class="other_1">
+														售后类型:<text>{{item.zhStatus||'暂无'}}</text>
+													</view>
+												</view>
+											</view>
+											<view class="btn">
+												<button type="default" size="mini"
+													@tap.stop="toView(item)">详细信息</button>
+												<button v-if="item.status=='0'" type="default" size="mini"
+													@tap.stop="toCancel(item)">取消售后</button>
+												<button
+													v-if="item.type!='1'&&item.status=='2'||item.status=='3'&&!item.transport.shop_receive"
+													type="default" size="mini"
+													@tap.stop="toMaintain(item)">维护单号</button>
+												<button
+													v-if="item.type=='3'&&item.status=='3'&&item.transport.shop_receive==true"
+													type="default" size="mini" @tap.stop="toLogi(item)">查看物流</button>
+												<button
+													v-if="item.type=='3'&&item.status=='3'&&item.transport.shop_receive==true&&!item.transport.customer_receive"
+													type="default" size="mini" @tap.stop="toConfirm(item)">确认收货</button>
+											</view>
 										</view>
-										<view v-else class="button">
-											{{item.zhStatus||'暂无状态'}}
+										<view class="list_2" v-else>
+											<view class="list_2_1">
+												<view class="shopname">
+													<text class="iconfont icon-shangdian"></text>
+													<text>{{item.shop_name||'暂无'}}</text>
+												</view>
+												<view class="type">
+													{{item.zhStatus||'暂无'}}
+												</view>
+											</view>
+											<view class="list_2_2">
+												<view class="other">
+													<view class="name textOver">
+														{{item.goods_name||'暂无'}}
+													</view>
+													<view class="other_1">
+														开始时间:<text>{{item.start_time||'暂无'}}</text>
+													</view>
+													<view class="other_1">
+														结束时间:<text>¥{{item.end_time||'暂无'}}</text>
+													</view>
+													<view class="other_1">
+														人数限制:<text>{{item.person_limit||'暂无'}}</text>
+													</view>
+												</view>
+											</view>
+											<view class="btn">
+												<button type="default" size="mini"
+													@tap.stop="toView(item)">详细信息</button>
+											</view>
 										</view>
 									</view>
 								</view>
@@ -75,34 +185,34 @@
 				tabs: {
 					active: '0',
 					menu: [{
-							title: '开团中',
+							title: '团购订单',
 							active: '0'
 						},
 						{
-							title: '已散团',
+							title: '团购售后',
 							active: '-1'
-						},
-						// {
-						// 	title: '已退团',
-						// 	active: '2'
-						// },
-						{
-							title: '已结束',
-							active: '1'
 						}
 					]
 				},
-				status: '0',
+				// 订单状态
+				ostatusList: [],
+				// 售后状态
+				astatusList: [],
+				// 团状态
+				gstatusList: [],
+				// 售后类型
+				typeList: [],
 			};
 		},
-		onShow: function() {
+		onShow: async function() {
 			const that = this;
-			that.watchLogin();
+			await that.searchOther();
+			await that.watchLogin();
 		},
 		onPullDownRefresh: async function() {
 			const that = this;
 			that.clearPage();
-			await that.search();
+			await that.search(that.tabs.active)
 			uni.stopPullDownRefresh();
 		},
 		methods: {
@@ -114,13 +224,13 @@
 					success: async function(res) {
 						let user = that.$jwt(res.data);
 						that.$set(that, `user`, user);
-						let status = await that.$api(`/dictData`, 'GET', {
-							code: "group_status"
-						});
-						if (status.errcode == '0') {
-							that.$set(that, `statusList`, status.data)
+						if (user.is_leader == '0' && that.tabs.menu.length <= 2) {
+							that.tabs.menu.push({
+								title: '团长处理',
+								active: '1'
+							})
 						}
-						that.search()
+						that.search(that.tabs.active)
 					},
 					fail: function(err) {
 						uni.navigateTo({
@@ -130,37 +240,63 @@
 				})
 			},
 			// 查询列表
-			async search() {
+			async search(active) {
 				const that = this;
 				let user = that.user;
-				let status = that.status;
 				if (user._id) {
 					let info = {
 						skip: that.skip,
 						limit: that.limit,
-						person: user._id,
-						status: that.status,
 					}
-					let res = await that.$api(`/group`, 'GET', {
-						...info,
-						...that.searchInfo
-					})
-					if (res.errcode == '0') {
-						let list = [...that.list, ...res.data];
-						for (let val of list) {
-							let personsstatus = val.persons.find(i => i.customer == user._id)
-							if (personsstatus?.status == '1') {
-								val.status = '2';
+					let res;
+					if (active == '0') {
+						info.customer = user._id;
+						res = await that.$api(`/orderDetail`, 'GET', {
+							...info,
+							...that.searchInfo
+						})
+						if (res.errcode == '0') {
+							let list = [...that.list, ...res.data];
+							for (let val of list) {
+								let status = that.ostatusList.find(i => i.value == val.status)
+								if (status) val.zhStatus = status.label;
 							}
-							if (that.status != '-1') {
-								val.persons = val.persons.filter(i => i.status == '0')
+							that.$set(that, `list`, list);
+							that.$set(that, `total`, res.total)
+						}
+					} else if (active == '-1') {
+						info.customer = user._id;
+						res = await that.$api(`/afterSale`, 'GET', {
+							...info,
+							...that.searchInfo
+						})
+						if (res.errcode == '0') {
+							let list = [...that.list, ...res.data];
+							for (let val of list) {
+								let type = that.typeList.find(i => i.value == val.type)
+								if (type) val.zhType = type.label;
+								let status = that.astatusList.find(i => i.value == val.status)
+								if (status) val.zhStatus = status.label;
+								val.url = val?.goods?.goods?.file;
+							}
+							that.$set(that, `list`, list);
+							that.$set(that, `total`, res.total)
+						}
+					} else {
+						info.leader = user._id;
+						res = await that.$api(`/group`, 'GET', {
+							...info,
+							...that.searchInfo
+						}, 'group')
+						if (res.errcode == '0') {
+							let list = [...that.list, ...res.data];
+							for (let val of list) {
+								let status = that.gstatusList.find(i => i.value == val.status)
+								if (status) val.zhStatus = status.label;
 							}
-							let status = that.statusList.find(i => i.value == val.status)
-							if (status) val.zhStatus = status.label;
-							val.time = moment(val.meta.createdAt).format('YYYY-MM-DD HH:mm:ss')
+							that.$set(that, `list`, list);
+							that.$set(that, `total`, res.total)
 						}
-						that.$set(that, `list`, list);
-						that.$set(that, `total`, res.total)
 					}
 				}
 			},
@@ -193,19 +329,42 @@
 			tabsChange(e) {
 				const that = this;
 				that.$set(that.tabs, `active`, e.active)
-				that.$set(that, `status`, e.active);
 				that.clearPage();
-				that.search()
+				that.search(e.active)
+			},
+			// 查询其他信息
+			async searchOther() {
+				const that = this;
+				let res;
+				// 查询状态
+				res = await that.$api(`/dictData`, 'GET', {
+					code: 'order_process'
+				})
+				if (res.errcode == '0') that.$set(that, `ostatusList`, res.data);
+				res = await that.$api(`/dictData`, 'GET', {
+					code: "afterSale_type"
+				});
+				if (res.errcode == '0') that.$set(that, `typeList`, res.data)
+				res = await that.$api(`/dictData`, 'GET', {
+					code: "afterSale_status"
+				});
+				if (res.errcode == '0') that.$set(that, `astatusList`, res.data)
+				res = await that.$api(`/dictData`, 'GET', {
+					code: "group_status"
+				});
+				if (res.errcode == '0') that.$set(that, `gstatusList`, res.data)
+
 			},
 			// 分享
 			toShare(e) {
 				const that = this;
-				that.clearPage();
-				uni.navigateTo({
-					url: `/pagesHome/group/share?id=${e._id}`
-				})
+				if (that.tabs.active == '1') {
+					uni.navigateTo({
+						url: `/pagesHome/group/share?id=${e.goods}`
+					})
+					that.clearPage();
+				}
 			},
-
 			// 清空列表
 			clearPage() {
 				const that = this;
@@ -226,17 +385,6 @@
 		height: 100vh;
 
 		.one {
-			padding: 2vw;
-
-			input {
-				padding: 2vw;
-				background-color: var(--f1Color);
-				font-size: var(--font14Size);
-				border-radius: 5px;
-			}
-		}
-
-		.two {
 			position: relative;
 			flex-grow: 1;
 			padding: 2vw 0 0 0;
@@ -244,83 +392,163 @@
 			.tabsList {
 				position: relative;
 				width: 100vw;
-				height: 82vh;
-
-				.list {
-					display: flex;
-					flex-direction: row;
-					justify-content: space-between;
-					align-items: center;
-					width: 91vw;
-					border: 1px solid var(--f1Color);
-					margin: 2vw 2vw 0 2vw;
-					padding: 0 2vw;
-					border-radius: 5px;
-
-					.image {
-						display: flex;
-						flex-wrap: wrap;
-						justify-content: center;
-						align-items: center;
-						width: 27vw;
-						height: 27vw;
-						border-radius: 5px;
-						margin: 0 2vw 0 0;
+				height: 90vh;
 
-						.file {
-							width: 9vw;
-							height: 9vw;
-						}
+				.one_1 {
+					padding: 2vw;
+
+					input {
+						padding: 2vw;
+						background-color: var(--f1Color);
+						font-size: var(--font14Size);
+						border-radius: 5px;
 					}
+				}
 
-					.list_1 {
-						display: flex;
-						flex-direction: column;
-						flex-grow: 1;
-						padding: 2vw 0;
-						width: 35vw;
+				.one_2 {
+					.list {
+						background-color: #fff;
+						border: 1px solid var(--f5Color);
+						padding: 2vw;
+						margin: 0 2vw 2vw 2vw;
+						border-radius: 5px;
 
-						.name {
-							font-size: var(--font16Size);
-							margin: 0 0 1vw 0;
-						}
+						.list_1 {
+							.list_1_1 {
+								display: flex;
+								justify-content: space-between;
+								margin: 0 0 2vw 0;
 
-						.some {
-							color: var(--f85Color);
-							font-size: var(--font14Size);
-							margin: 0 0 1vw 0;
+								.shopname {
+									text:last-child {
+										padding: 0 0 0 2vw;
+									}
+								}
 
-							text:last-child {
-								margin: 0 0 0 1vw;
-								color: var(--f00Color);
+								.status {
+									color: var(--ff0Color);
+								}
 							}
-						}
-					}
 
-					.other {
-						.btn {
-							display: flex;
-							flex-direction: column;
-							align-items: center;
-							margin: 0 2vw;
-							padding: 2vw 3vw;
-							background-color: var(--ff0Color);
-							color: var(--fffColor);
-							border-radius: 2vw;
-							font-size: var(--font14Size);
-
-							text {
-								font-size: var(--font12Size);
+							.list_1_2 {
+								border-bottom: 1px solid #f1f1f1;
+
+								.goods {
+									display: flex;
+									padding: 0 0 2vw 0;
+
+									.goods_1 {
+										width: 20vw;
+										height: 20vw;
+
+										.image {
+											width: 100%;
+											height: 100%;
+											border-radius: 5px;
+										}
+									}
+
+									.goods_2 {
+										width: 55vw;
+										padding: 0 0 0 2vw;
+
+										.goodsname {
+											font-size: 16px;
+											margin: 0 0 1vw 0;
+										}
+
+										.specs {
+											font-size: 14px;
+											color: #858585;
+										}
+									}
+
+									.goods_3 {
+										width: 15vw;
+										text-align: right;
+
+										.price {
+											color: #ff0000;
+										}
+									}
+								}
+							}
+
+							.other {
+								padding: 0 0 2vw 0;
+								margin: 2vw 0;
+								text-align: right;
+								border-bottom: 1px solid #f1f1f1;
+
+								text {
+									font-size: 14px;
+									padding: 0 0 0 2vw;
+								}
+							}
+
+							.btn {
+								text-align: right;
+
+								button {
+									margin: 0 2vw 0 0;
+								}
 							}
 						}
 
-						.button {
-							margin: 0 2vw;
-							padding: 2vw 3vw;
-							background-color: var(--fcColor);
-							color: var(--f00Color);
-							border-radius: 2vw;
-							font-size: var(--font14Size);
+						.list_2 {
+							.list_2_1 {
+								display: flex;
+								justify-content: space-between;
+								font-size: var(--font16Size);
+								margin: 0 0 2vw 0;
+
+								.shopname {
+									text {
+										margin: 0 0 0 1vw;
+									}
+								}
+
+								.type {
+									color: var(--ff0Color);
+								}
+							}
+
+							.list_2_2 {
+								display: flex;
+								justify-content: space-between;
+
+								.image {
+									width: 25vw;
+									height: 25vw;
+									margin: 0 2vw 1vw 0;
+									border: 1px solid var(--f85Color);
+								}
+
+								.other {
+									width: 65vw;
+									flex-grow: 1;
+
+									.name {
+										font-size: var(--font16Size);
+									}
+
+									.other_1 {
+										font-size: var(--font14Size);
+
+										text {
+											color: var(--f85Color);
+										}
+									}
+								}
+							}
+
+							.btn {
+								text-align: right;
+
+								button {
+									margin: 2vw 0 0 2vw;
+								}
+							}
 						}
 					}
 				}

+ 0 - 2
pagesMy/order/index.vue

@@ -573,8 +573,6 @@
 					border-radius: 5px;
 
 					.list_1 {
-
-
 						.goods {
 							.goodsList {
 								border-bottom: 1px solid #f1f1f1;