py 1 年間 前
親
コミット
923eb5a01d

+ 3 - 1
api/common.js

@@ -32,4 +32,6 @@ export const getDeliveryMoney = (data) => request(commonUrl + 'delivery_money',
 // 是否是小程序上架审核
 export const commonApplet = (data) => request(commonUrl + 'applet', 'post', { ...data })
 // 获取弹窗通知公告
-export const commonPopNotice = (data) => request(commonUrl + 'pop_notice', 'post', { ...data })
+export const commonPopNotice = (data) => request(commonUrl + 'pop_notice', 'post', { ...data })
+// 获取退款原因
+export const commonRefundReason = (data) => request(commonUrl + 'refund_reason', 'post', { ...data })

+ 1 - 1
api/group.js

@@ -8,7 +8,7 @@ export const groupShopInfo = (data) => request(newsUrl + 'shop_info', 'post', {
 // 获取团购商品列表
 export const groupList = (data) => request(newsUrl + 'list', 'post', { ...data },false)
 // 获取团购商品详情
-export const groupInfo = (data) => request(newsUrl + 'info', 'post', { ...data },true)
+export const groupInfo = (data) => request(newsUrl + 'info', 'post', { ...data },false)
 // 下单
 export const groupCreate = (data) => request(newsUrl + 'create', 'post', { ...data },false)
 // 获取顶部团购商品列表

+ 2 - 0
api/groupOrder.js

@@ -18,3 +18,5 @@ export const groupOrderInfo = (data) => request(newsUrlTwo + 'info', 'post', { .
 export const groupOrderStatus = (data) => request(newsUrlTwo + 'status', 'post', { ...data },false)
 // 回显上传订单用户信息
 export const groupOrderFoster = (data) => request(newsUrlTwo + 'foster', 'post', { ...data },false)
+// 申请退款
+export const groupOrderRefund = (data) => request(newsUrlTwo + 'refund', 'post', { ...data },false)

+ 3 - 1
common/css/common.css

@@ -420,7 +420,9 @@ image {
 .b-b-F9F9F9 {
 	border-bottom: 1rpx solid #F9F9F9;
 }
-
+.b-b-999 {
+	border-bottom: 1rpx solid #999;
+}
 .b-r-ccc {
 	border: 1rpx solid #ccc;
 }

+ 212 - 22
pages-buy/group-pay.vue

@@ -3,12 +3,50 @@
 		<Nav title='提交订单' bgckgroundBox='transparent'></Nav>
 		<scroll-view :scroll-y="true" class="scroll-view-css" @scrolltolower="scrolltolower">
 			<view class="p-24 box-border-box bgc-f b-rad-20 mb-20">
-				<view class="align-items-flex-start">
-					<image :src="goods_info.cover_img" mode="aspectFit" class="goods-img mr-12"></image>
+				<view class="align-items-flex-end flex-justify-space p-b-20 b-b-F9F9F9 mb-20">
+					<view class="align-items-flex-start">
+						<image :src="goods_info.cover_img" mode="scaleToFill" class="goods-img mr-18"></image>
+						<view class="">
+							<view class="fs-32 w-150 text-overflow-ellipsis-one mb-10">
+								{{goods_info.title}}
+							</view>
+							<view class="mb-10 fs-22 fc-9">
+								可用时间:
+								{{goods_info.usable_time == 1?'24小时可用':goods_info.timeData}}
+							</view>
+							<view class="fs-22 fc-9 mb-10">
+								{{goods_info.is_quota == 0?'不限购':'限购'+ goods_info.quota_num +'张'}} .
+								{{goods_info.pre_book == 1?'无需预约':'需预约'}}
+							</view>
+							<view class="fs-22 fc-9">
+								随时退 . 过期自动退 . 到店
+							</view>
+						</view>
+					</view>
 					<view class="">
-						<view class="fs-32 w-150">
-							
+						<view class="align-items-center mb-10 flex-justify-end">
+							<view class="fs-22 fc-9 mr-6 sc-class">
+								{{goods_info.line_price}}
+							</view>
+							<view class="goods_info.price fs-22">
+								现价¥<span class="fs-28">{{goods_info.price}}</span>
+							</view>
 						</view>
+						<view class="align-items-center">
+							<image src="@/static/img/takeout/j.png" mode="" class="j" @click="setNum(1)"></image>
+							<input type="number" v-model="fromData.number" class="input" @blur='blur' />
+							<image src="@/static/img/takeout/add.png" mode="" class="j" @click="setNum(2)"></image>
+						</view>
+					</view>
+				</view>
+				<view class="text-align-center flex-justify-end">
+					<view class="fs-28 mr-20">
+						优惠 <span
+							class="fc-41ABF5 fs-28">¥{{((Number(goods_info.line_price) - Number(goods_info.price)) * Number(fromData.number)).toFixed(2)}}</span>
+					</view>
+					<view class="fs-28">
+						小计 <span
+							class="fc-41ABF5 fs-28 fw-600">¥{{(Number(goods_info.price) * Number(fromData.number)).toFixed(2)}}</span>
 					</view>
 				</view>
 			</view>
@@ -16,14 +54,16 @@
 		<view class="but-box align-items-center flex-justify-space bgc-f p-24 box-border-box">
 			<view class="">
 				<view class="fs-34 fw-600 fc-41ABF5">
-					<span class="fs-24 fc-41ABF5 fw-400 mr-12">合计</span><span class="fs-20 fw-600 fc-41ABF5">¥</span>{{goods_info.price}}
-			    </view>
+					<span class="fs-24 fc-41ABF5 fw-400 mr-12">合计</span><span
+						class="fs-20 fw-600 fc-41ABF5">¥</span>{{(Number(goods_info.price) * Number(fromData.number))}}
+				</view>
 				<view class="fc-9">
-					<span class="mr-12">共{{fromData.number}}件</span>已优惠¥{{Number(goods_info.line_price) - Number(goods_info.price)}}
+					<span
+						class="mr-12">共{{fromData.number}}件</span>已优惠¥{{((Number(goods_info.line_price) - Number(goods_info.price)) * Number(fromData.number)).toFixed(2)}}
 				</view>
 			</view>
-			<view class="but bgc-41ABF5 fc-f b-rad-200 text-align-center fs-34">
-				提交订单
+			<view class="but bgc-41ABF5 fc-f b-rad-200 text-align-center fs-34" @click="toSave()">
+				立即支付
 			</view>
 		</view>
 	</view>
@@ -31,8 +71,13 @@
 
 <script>
 	import {
-		groupInfo
+		groupInfo,
+		groupCreate
 	} from '@/api/group.js'
+	import {
+		groupPay
+	} from '@/api/groupOrder.js';
+	import tools from '@/service/tools';
 	export default {
 		components: {},
 		data() {
@@ -42,12 +87,14 @@
 					shop_id: 0,
 					number: 1
 				},
-				goods_info: {}
+				goods_info: {},
+				usable_time: '',
+				isAJAX: false
 			};
 		},
 		onLoad(data) {
 			console.log(data);
-			if(data) {
+			if (data) {
 				this.fromData.id = data.goods_id
 				this.fromData.shop_id = data.shop_id
 				this.groupInfo()
@@ -55,12 +102,135 @@
 		},
 		mounted() {},
 		methods: {
+			toSave() {
+				if (this.isAJAX) {
+					return
+				}
+				this.isAJAX = true;
+				this.fromData.school_id = uni.getStorageSync('school_id');
+				groupCreate(this.fromData).then((res) => {
+					if (res.code === 1) {
+						groupPay({
+							order_id: res.data.order_id
+						}).then((ret) => {
+							if (ret.code === 1) {
+								uni.requestPayment({
+									provider: "wxpay", //支付类型-固定值
+									timeStamp: ret.data.wx_pay.timeStamp + "", // 时间戳(单位:秒)
+									nonceStr: ret.data.wx_pay.nonceStr, // 随机字符串
+									package: ret.data.wx_pay.package, // 固定值
+									signType: ret.data.wx_pay.signType, //固定值
+									paySign: ret.data.wx_pay.paySign, //签名
+									success: (ren) => {
+										this.isAJAX = false;
+										tools.success("支付成功");
+										uni.setStorageSync('orderPayType', 3)
+										setTimeout(() => {
+											uni.switchTab({
+												url: "/pages/order/index"
+											})
+										}, 1000)
+									},
+									fail: (err) => {
+										this.isAJAX = false;
+										tools.error("支付失败");
+										uni.setStorageSync('orderPayType', 3)
+										setTimeout(() => {
+											uni.switchTab({
+												url: "/pages/order/index"
+											})
+										}, 1000)
+									},
+								});
+							} else {
+								this.isAJAX = false;
+								tools.error("支付失败");
+								uni.setStorageSync('orderPayType', 3)
+								setTimeout(() => {
+									uni.switchTab({
+										url: "/pages/order/index"
+									})
+								}, 1000)
+							}
+						})
+					} else {
+						this.isAJAX = false;
+						tools.error(res.msg);
+					}
+				})
+			},
 			scrolltolower() {
 				console.log('触底');
 			},
+			blur() {
+				if (this.goods_info.is_quota == 1) {
+					if (this.fromData.number >= this.goods_info.quota_num) {
+						tools.error('购买数量已达限购数量')
+						this.fromData.number = this.goods_info.quota_num
+					}
+				}
+				if (this.fromData.number >= 99) {
+					tools.error('购买数量最大为99')
+					this.fromData.number = 99
+				} else if (this.fromData.number <= 0) {
+					tools.error('购买数量最少为1')
+					this.fromData.number = 1
+				}
+			},
+			setNum(num) {
+				if (num === 1) {
+					// 减
+					if (this.fromData.number <= 1) {
+						tools.error('购买数量最少为1')
+						return
+					}
+					--this.fromData.number
+				} else {
+					// 加
+					if (this.goods_info.is_quota == 1) {
+						if (this.fromData.number >= this.goods_info.quota_num) {
+							tools.error('购买数量已达限购数量')
+							return
+						} else if (this.fromData.number >= 99) {
+							tools.error('购买数量已达最大值')
+							return
+						}
+					}
+					++this.fromData.number
+				}
+			},
+			setTimeData(timeData) {
+				let time = ''
+				let array = ''
+				timeData.forEach((v, k) => {
+					v.forEach((i, j) => {
+						let timeTwo = ''
+						if (j == 0 || j == 3) {
+							timeTwo = i + '-'
+						} else {
+							timeTwo = i
+						}
+						array = array + timeTwo
+					})
+					if (timeData.length === k + 1) {
+						time = time + array + ''
+					} else {
+						time = time + array + ' / '
+					}
+					array = ''
+				})
+				console.log(time);
+				return time
+			},
 			groupInfo() {
-				groupInfo({id: this.fromData.id,shop_id: this.fromData.shop_id}).then((res) => {
-					if(res.code === 1) {
+				groupInfo({
+					id: this.fromData.id,
+					shop_id: this.fromData.shop_id
+				}).then((res) => {
+					if (res.code === 1) {
+						if (res.data.usable_time === 2) {
+							res.data.timeData = this.setTimeData(res.data.usable_time_arr)
+						}
 						this.goods_info = res.data
 					}
 				})
@@ -70,14 +240,34 @@
 </script>
 
 <style lang="scss" scoped>
-	.goods-img{
-		width: 80rpx;
-		height: 80rpx;
+	.sc-class {
+		text-decoration: line-through
+	}
+
+	.goods-img {
+		width: 120rpx;
+		height: 120rpx;
 		border-radius: 20rpx;
 	}
-.but{
-	width: 40%;
-	height: 80rpx;
-	line-height: 80rpx;
-}
+
+	.but {
+		width: 40%;
+		height: 80rpx;
+		line-height: 80rpx;
+	}
+
+	.w-150 {
+		width: 340rpx;
+	}
+
+	.j {
+		width: 40rpx;
+		height: 40rpx;
+	}
+
+	.input {
+		max-width: 50rpx;
+		margin: 0 10rpx;
+		text-align: center;
+	}
 </style>

+ 256 - 0
pages-buy/group-refund.vue

@@ -0,0 +1,256 @@
+<template>
+	<view class="flex-common-css iPhone-bottom box-border-box">
+		<Nav title="申请退款" leftIconColor="#333" titleColor="#333" bgckgroundBox='transparent'></Nav>
+		<scroll-view :scroll-y="true" class="scroll-view-css p-24 box-border-box" @scrolltolower="scrolltolower">
+			<view class="b-rad-20 bgc-f p-24 box-border-box">
+				<view class="align-items-center p-b-20 mb-20 b-b-F9F9F9">
+					<image :src="goods_info.goods_img" mode="scaleToFill" class="goods-img mr-24"></image>
+					<view class="fs-28 fc-3 fw-500">
+						{{goods_info.goods_name}}
+					</view>
+				</view>
+				<view class="align-items-center flex-justify-space p-b-20 mb-20 b-b-F9F9F9">
+					<view class="">
+						<view class="mb-8 fs-30 fc-3 fw-b">
+							退款数量
+						</view>
+						<view class="fs-24 fc-9">
+							最多可退 {{(Number(this.goods_info.goods_number) - Number(this.goods_info.finish_number))}} 张
+						</view>
+					</view>
+					<view class="align-items-center">
+						<image src="@/static/img/takeout/j.png" mode="" class="j" @click="setNum(1)"></image>
+						<input type="number" v-model="fromData.number" class="input" @blur='blur' />
+						<image src="@/static/img/takeout/add.png" mode="" class="j" @click="setNum(2)"></image>
+					</view>
+				</view>
+				<view class="p-b-20 mb-20 b-b-F9F9F9">
+					<view class="align-items-center flex-justify-space mb-8">
+						<view class="fs-30 fc-3 fw-b">
+							退款金额
+						</view>
+						<view class="fs-20 fw-600 fc-41ABF5">
+							¥<span
+								class="fs-34 fw-600 fc-41ABF5">{{(Number(goods_info.goods_price) * Number(fromData.number)).toFixed(2)}}</span>
+						</view>
+					</view>
+					<view class="fs-22 fc-9">
+						1-3 个工作日退还至原支付方,以实际退款金额为准
+					</view>
+				</view>
+				<view class="align-items-center flex-justify-space">
+					<view class="fs-30 fc-3 fw-b flex-shrink0">
+						退款原因
+					</view>
+					<view class="align-items-center flex-justify-end flex-1" @click="openPop">
+						<view class="fs-26 fc-3 mr-8">
+							{{refund_id != 0?fromData.refund_msg:'请选择'}}
+						</view>
+						<uni-icons type="right" size="13" color='#333'></uni-icons>
+					</view>
+				</view>
+			</view>
+		</scroll-view>
+		<view class="bgc-f p-24 box-border-box align-items-flex-end flex-justify-space">
+			<view class="fs-34 fw-600 fc-41ABF5">
+				<span class="fs-24 fc-41ABF5 fw-400 mr-12">退款金额</span>
+				<span class="fs-20 fw-600 fc-41ABF5">¥</span>
+				{{(Number(goods_info.goods_price) * Number(fromData.number)).toFixed(2)}}
+			</view>
+			<view class="but bgc-41ABF5 fc-f b-rad-200 text-align-center fs-34" @click="groupOrderRefund">
+				提交
+			</view>
+		</view>
+		<uni-popup ref="popup" type="bottom" border-radius="10px 10px 0 0" background-color='#fff'>
+			<view class="pop-box p-24 box-border-box">
+				<view class="fs-30 fc-3 fw-b mb-20 text-align-center">
+					退款原因
+				</view>
+				<uni-icons class="pop-gb" type="closeempty" size="20"></uni-icons>
+				<view class="scroll-view-css">
+					<view class="align-items-center flex-justify-space p-24 box-border-box"
+						v-for="(item,index) in refund_reason" :key="index" @click="popSelect(item.id,index)">
+						<view class="fs-30" :class="refund_id == item.id?'fc-41ABF5':'fc-3'">
+							{{item.refund_msg}}
+						</view>
+						<uni-icons color='#41ABF5' v-if="refund_id == item.id" type="checkbox-filled"
+							size="20"></uni-icons>
+						<uni-icons color='#333' v-else type="circle" size="20"></uni-icons>
+					</view>
+				</view>
+				<view class="align-items-center p-24 box-border-box">
+					<view class="pop-b flex-1 mr-16 text-align-center fs-30 fc-3 b-rad-200 bgc-E6E6E6" @click="popOn">
+						取消
+					</view>
+					<view class="pop-b flex-1 text-align-center fs-30 fc-f b-rad-200 bgc-41ABF5" @click="popOk">
+						确定
+					</view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import {
+		groupOrderInfo,
+		groupOrderRefund
+	} from "@/api/groupOrder.js"
+	import {
+		commonRefundReason
+	} from "@/api/common.js"
+	import tools from "@/service/tools";
+	export default {
+		components: {},
+		data() {
+			return {
+				fromData: {
+					order_id: 0,
+					number: 1,
+					refund_msg: '请选择'
+				},
+				refund_id: 0,
+				refund_index: 0,
+				refund_reason: [],
+				goods_info: {},
+				is_ajax: false
+			};
+		},
+		onLoad(data) {
+			if (data) {
+				this.fromData.order_id = data.order_id
+				this.groupOrderInfo()
+				this.commonRefundReason()
+			}
+		},
+		mounted() {},
+		methods: {
+			groupOrderRefund() {
+				if (this.refund_id === 0) {
+					tools.error('请选择退款原因')
+					return
+				}
+				if (this.is_ajax) {
+					return
+				}
+				this.is_ajax = true
+				groupOrderRefund(this.fromData).then((res) => {
+					if (res.code === 1) {
+						tools.success(res.msg)
+						this.is_ajax = false
+						setTimeout(() => {
+							uni.$emit('groupRefund', this.fromData.order_id)
+							tools.leftClick()
+						}, 1000)
+					} else {
+						tools.error(res.msg)
+						this.is_ajax = false
+					}
+				})
+			},
+			popOk() {
+				this.$refs.popup.close()
+				this.fromData.refund_msg = this.refund_reason[this.refund_index].refund_msg
+			},
+			popSelect(id, index) {
+				this.refund_id = id
+				this.refund_index = index
+			},
+			commonRefundReason() {
+				commonRefundReason().then((res) => {
+					if (res.code === 1) {
+						this.refund_reason = res.data
+					}
+				})
+			},
+			openPop() {
+				this.$refs.popup.open()
+			},
+			popOn() {
+				this.$refs.popup.close()
+			},
+			blur() {
+				if (this.fromData.number >= (Number(this.goods_info.goods_number) - Number(this.goods_info
+						.finish_number))) {
+					tools.error('退款数量最大为' + (Number(this.goods_info.goods_number) - Number(this.goods_info.finish_number)))
+					this.fromData.number = (Number(this.goods_info.goods_number) - Number(this.goods_info.finish_number))
+				} else if (this.fromData.number <= 0) {
+					tools.error('退款数量最少为1')
+					this.fromData.number = 1
+				}
+			},
+			setNum(num) {
+				if (num === 1) {
+					// 减
+					if (this.fromData.number <= 1) {
+						tools.error('退款数量最少为1')
+						return
+					}
+					--this.fromData.number
+				} else {
+					// 加
+					if (this.fromData.number >= (Number(this.goods_info.goods_number) - Number(this.goods_info
+							.finish_number))) {
+						tools.error('退款数量已是最大值')
+						return
+					}
+					++this.fromData.number
+				}
+			},
+			scrolltolower() {
+				console.log('触底');
+			},
+			groupOrderInfo() {
+				groupOrderInfo({
+					order_id: this.fromData.order_id
+				}).then((res) => {
+					if (res.code === 1) {
+						this.goods_info = res.data
+					}
+				})
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.pop-b {
+		height: 60rpx;
+		line-height: 60rpx;
+	}
+
+	.pop-box {
+		max-height: 60vh;
+		border-radius: 20rpx 20rpx 0 0;
+		position: relative;
+	}
+
+	.pop-gb {
+		position: absolute;
+		right: 24rpx;
+		top: 24rpx;
+	}
+
+	.but {
+		width: 40%;
+		height: 80rpx;
+		line-height: 80rpx;
+	}
+
+	.goods-img {
+		width: 80rpx;
+		height: 80rpx;
+		border-radius: 20rpx;
+	}
+
+	.j {
+		width: 40rpx;
+		height: 40rpx;
+	}
+
+	.input {
+		max-width: 50rpx;
+		margin: 0 10rpx;
+		text-align: center;
+	}
+</style>

+ 34 - 20
pages-buy/group-shop.vue

@@ -14,19 +14,7 @@
 			</template>
 		</Nav>
 		<scroll-view :scroll-y="true" class="scroll-view-box" @scroll='scroll' @scrolltolower="scrolltolower">
-			<view class="uni-margin-wrap">
-				<swiper class="swiper" :circular='true' :autoplay="true" :interval="3000" :duration="500">
-					<swiper-item>
-						<view class="swiper-item bgc-B3DDFB">A</view>
-					</swiper-item>
-					<swiper-item>
-						<view class="swiper-item bgc-3">B</view>
-					</swiper-item>
-					<swiper-item>
-						<view class="swiper-item fc-65420c">C</view>
-					</swiper-item>
-				</swiper>
-			</view>
+			<image :src="shopInfo.shop_logo" mode="scaleToFill" class="nav-img"></image>
 			<view class="shop-box p-24 box-border-box">
 				<view class="fs-38 fw-600 fc-3 letter-spacing-6 mb-18">
 					{{shopInfo.shop_name || ''}}
@@ -37,6 +25,19 @@
 					</view>
 					<image src="@/static/img/takeout/info-phone.png" mode="" class="phone"></image>
 				</view>
+				<view class="uni-margin-wrap mb-18">
+					<swiper class="swiper" :circular='true' :autoplay="true" :interval="3000" :duration="500">
+						<swiper-item>
+							<view class="swiper-item bgc-B3DDFB">A</view>
+						</swiper-item>
+						<swiper-item>
+							<view class="swiper-item bgc-3">B</view>
+						</swiper-item>
+						<swiper-item>
+							<view class="swiper-item fc-65420c">C</view>
+						</swiper-item>
+					</swiper>
+				</view>
 				<view class="p-b-20 b-b-F9F9F9 mb-18">
 					<view class="fs-26 fc-3 mb-10">
 						{{shopInfo.city_name || ''}} {{shopInfo.address || ''}}
@@ -55,7 +56,8 @@
 					</view>
 				</view>
 				<view class="list-box bgc-f b-rad-16 p-24 box-border-box">
-					<view class="item-box align-items-flex-start" v-for="(item,index) in shopList" :key="index" @click="goToUrl(item)">
+					<view class="item-box align-items-flex-start" v-for="(item,index) in shopList" :key="index"
+						@click="goToUrl(item)">
 						<image :src="item.cover_img" mode="aspectFit" class="shop-img mr-16 flex-shrink0"></image>
 						<view class="flex-1">
 							<view class="align-items-center mb-10">
@@ -145,7 +147,8 @@
 		methods: {
 			goToUrl(item) {
 				uni.navigateTo({
-					url: '/pages-buy/group-goods-info?shop_id=' + item.shop_id + '&goods_id=' + item.id + '&shop_name=' + this.shopInfo.shop_name
+					url: '/pages-buy/group-goods-info?shop_id=' + item.shop_id + '&goods_id=' + item.id +
+						'&shop_name=' + this.shopInfo.shop_name
 				});
 			},
 			leftClick() {
@@ -199,18 +202,21 @@
 </script>
 
 <style lang="scss" scoped>
-	.item-box{
+	.item-box {
 		margin-bottom: 20rpx;
 	}
+
 	.item-box:last-child {
 		margin-bottom: 0;
 	}
-	.item-but{
+
+	.item-but {
 		background: #57CAFF;
 		border-radius: 40rpx;
 		padding: 15rpx 30rpx;
 		box-sizing: border-box;
 	}
+
 	.line-price {
 		text-decoration: line-through;
 	}
@@ -266,22 +272,30 @@
 		transition: all 0.3s ease-in-out;
 	}
 
+	.nav-img {
+		width: 100%;
+		height: 200rpx;
+	}
+
 	.uni-margin-wrap {
 		width: 100%;
+		border-radius: 20rpx;
 		// position: absolute;
 		// left: 0;
 		// top: 0;
 	}
 
 	.swiper {
-		height: 400rpx;
+		height: 200rpx;
+		border-radius: 20rpx;
 	}
 
 	.swiper-item {
 		display: block;
-		height: 400rpx;
-		line-height: 400rpx;
+		height: 200rpx;
+		line-height: 200rpx;
 		text-align: center;
+		border-radius: 20rpx;
 	}
 
 	.nav-left-box {

+ 80 - 61
pages-order/group-info.vue

@@ -12,9 +12,12 @@
 				</view>
 			</view>
 			<view class="mb-24">
-				<view class="fs-48 fc-3 fw-600">
+				<view class="fs-48 fc-3 fw-600 mb-16">
 					{{infoData.order_status_str}}
 				</view>
+				<view class="fs-30 fc-9">
+					请在{{infoData.end_time}}前到店消费
+				</view>
 			</view>
 			<view class="bgc-f b-rad-20 p-24 box-border-box">
 				<view class="p-b-20 mb-24 b-b-F9F9F9 fs-32 fc-3" v-show="infoData.order_status == 1">
@@ -38,6 +41,13 @@
 							再来一单
 						</view>
 					</view>
+					<view @click="goRefund" class="w-33 flex-direction align-items-center"
+						v-show="infoData.order_status == 2">
+						<image class="mb-4 icon" src="@/static/img/order/tk.png" mode=""></image>
+						<view class="fs-24 fc-3">
+							极速退款
+						</view>
+					</view>
 					<view class="w-33 flex-direction align-items-center">
 						<button class="item-box-button" open-type="contact" :bindcontact="handleContact"></button>
 						<image class="mb-4 icon" src="@/static/img/order/lxkf.png" mode=""></image>
@@ -50,9 +60,6 @@
 		</view>
 		<scroll-view :scroll-y="true" class="scroll-view-css p-24 box-border-box" @scrolltolower="scrolltolower">
 			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
-				<!-- 				<view class="w-420 fc-3 fs-32 fw-600 text-overflow-ellipsis-one mb-24">
-					{{infoData.site_name}}
-				</view> -->
 				<view class="goods-box">
 					<view class="align-items-center flex-justify-space mb-20">
 						<image class="goods-img mr-16 flex-shrink0" :src="infoData.goods_img" mode=""></image>
@@ -65,48 +72,18 @@
 									¥{{(Number(infoData.goods_price)*Number(infoData.goods_number)).toFixed(2)}}
 								</view>
 							</view>
-							<!-- 				<view class="mb-2 fs-24 fc-9">
-								{{item.goods_name}}
-							</view> -->
 							<view class="fs-24 fc-9">
 								x{{infoData.goods_number}}
 							</view>
 						</view>
 					</view>
 				</view>
-				<!-- 				<view class="align-items-center flex-justify-space mb-24">
-					<view class="fs-28 fc-3">
-						打包费
-					</view>
-					<view class="fs-32 fc-3">
-						打包费
-					</view>
-				</view>
-				<view class="align-items-center flex-justify-space mb-24">
-					<view class="fs-28 fc-3">
-						配送费
-					</view>
-					<view class="fs-32 fc-3">
-						打包费
-					</view>
-				</view> -->
-				<!-- 				<view class="align-items-center flex-justify-space pb-36 b-b-F9F9F9 mb-22">
-					<view class="align-items-center">
-						<image class="mr-6 icon-right" src="@/static/img/order/yhq.png" mode=""></image>
-						<view class="fs-28 fc-3">
-							优惠券
-						</view>
-					</view>
-					<view class="fs-32 fc-FB3D03">
-						-¥{{infoData.coupon_money}}
-					</view>
-				</view> -->
 				<view class="align-items-center flex-justify-end">
 					<view class="fs-28 fc-9">
 						共{{infoData.goods_number}}件,
 					</view>
 					<view class="fs-28 fc-3">
-						定金
+						合计
 					</view>
 					<view class="fs-24 fw-600 fc-3">
 						¥
@@ -117,30 +94,25 @@
 				</view>
 			</view>
 			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
-				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						联系地址
+				<view class="align-items-center flex-justify-space mb-20">
+					<view class="text-overflow-ellipsis-one fs-32 fc-3 fw-600">
+						{{infoData.shop.shop_name}}
 					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.address?infoData.address:'无'}}
+					<view class="align-items-center flex-shrink0" @click="contactShop(infoData.shop.shop_phone)">
+						<uni-icons type="phone-filled" size="15" class="mr-12"></uni-icons>
+						<view class="fs-24">
+							联系商家
+						</view>
 					</view>
 				</view>
-				<!-- 				<view class="display-flex flex-justify-space mb-26">
-					<view class="fs-28 fc-9">
-						配送时间
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						预约配送
-					</view>
-				</view> -->
-				<!-- 				<view class="display-flex flex-justify-space pb-20 b-b-F9F9F9 mb-26" v-show="infoData.order_status == 3">
-					<view class="fs-28 fc-9">
-						骑手信息
-					</view>
-					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.rider.rider_name}}{{infoData.rider.phone}}
-					</view>
-				</view> -->
+				<view class="fs-26 fc-9 mb-20">
+					营业时间:{{timeData}}
+				</view>
+				<view class="fs-26 fc-9">
+					店铺地址:{{infoData.shop.city_name}} {{infoData.shop.address}}
+				</view>
+			</view>
+			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
 				<view class="display-flex flex-justify-space mb-26">
 					<view class="fs-28 fc-9">
 						订单编号
@@ -149,7 +121,8 @@
 						<view class="fs-28 fc-3 w-480 mr-8 text-align-right">
 							{{infoData.order_sn}}
 						</view>
-						<image class="icon-fz" src="@/static/img/order/fz.png" mode="" @click="copy(infoData.order_sn)"></image>
+						<image class="icon-fz" src="@/static/img/order/fz.png" mode="" @click="copy(infoData.order_sn)">
+						</image>
 					</view>
 				</view>
 				<view class="display-flex flex-justify-space mb-26">
@@ -183,11 +156,9 @@
 
 <script>
 	import {
-		groupOrderInfo
-	} from "@/api/groupOrder.js"
-	import {
+		groupOrderInfo,
 		groupPay
-	} from '@/api/groupOrder.js';
+	} from "@/api/groupOrder.js"
 	import tools from "@/service/tools";
 	export default {
 		components: {},
@@ -205,9 +176,16 @@
 					m: '',
 					s: '',
 				},
+				timeData: '',
 				isAJAX: false
 			};
 		},
+		onShow() {
+			uni.$on('groupRefund', (data) => {
+				console.log(data, '^^^^^^^^^^^^^^^^^^^^^^^^^');
+				this.groupOrderInfo(data)
+			})
+		},
 		onLoad(data) {
 			if (data) {
 				this.groupOrderInfo(data.orderId)
@@ -228,6 +206,46 @@
 			})
 		},
 		methods: {
+			goRefund() {
+				uni.navigateTo({
+					url: '/pages-buy/group-refund?order_id=' + this.infoData.id
+				})
+			},
+			contactShop(phone) {
+				uni.makePhoneCall({
+					phoneNumber: phone, // 电话号码
+					success: function() {
+						console.log('拨打电话成功');
+					},
+					fail: function() {
+						console.log('拨打电话失败');
+					}
+				});
+			},
+			setTimeData(timeData) {
+				let time = ''
+				let array = ''
+				console.log(timeData,'11111');
+				timeData.forEach((v, k) => {
+					v.forEach((i, j) => {
+						let timeTwo = ''
+						if (j == 0 || j == 3) {
+							timeTwo = i + '-'
+						} else {
+							timeTwo = i
+						}
+						array = array + timeTwo
+					})
+					if (timeData.length === k + 1) {
+						time = time + array + ''
+					} else {
+						time = time + array + ' / '
+					}
+					array = ''
+				})
+				console.log(time);
+				return time
+			},
 			copy(value) {
 				uni.setClipboardData({
 					data: value,
@@ -288,6 +306,7 @@
 					order_id: id
 				}).then((res) => {
 					if (res.code == 1) {
+						this.timeData = this.setTimeData(res.data.shop.business_hours)
 						this.infoData = res.data
 						if (this.infoData.order_status == 1) {
 							let createDate = new Date(res.data.created_at); //格式化订单创建时候的时间

+ 6 - 0
pages.json

@@ -133,6 +133,12 @@
 						"navigationBarTitleText": "团购支付订单"
 					}
 				},
+				{
+					"path": "group-refund",
+					"style": {
+						"navigationBarTitleText": "团购申请退款"
+					}
+				},
 				{
 					"path": "save-order",
 					"style": {

BIN
static/img/order/tk.png