详情开发

This commit is contained in:
duan
2024-05-11 14:18:06 +08:00
parent 4d5c78932e
commit 6ff09f5961
12 changed files with 2271 additions and 53 deletions

View File

@@ -1,22 +1,104 @@
<template>
<view>
2
<view class="Box">
<view class="fontStyle">
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/Meituanquan.png"
style="width: 39.46rpx;height: 40rpx;" mode=""></image>
<text>美团券</text>
</view>
<view class="content">
{{info.expDate}}
</view>
<button v-if="info.refundAble=='1'" class="buttonStyle" @click="makephone(info.phone)">申请退款</button>
<view style="height: 2rpx;width: 100%;background-color: #EFEFEF;margin-top: 16rpx;"> </view>
<view class="rightStyle" v-for="(item,i) in info.coupons" >
<text>
{{item.couponNo}}
</text>
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/QRcode.png" v-if="info.status=='unused'"
style="width: 39.46rpx;height: 40rpx;margin-right: 50rpx;" mode="" @click="openQR"></image>
<text v-else>已退款</text>
</view>
</view>
</template>
<script>
export default {
props: ['info'],
data() {
return {
}
},
methods: {
makephone(e) {
uni.makePhoneCall({
phoneNumber: e
});
},
openQR() {
this.$emit('clickEvent')
}
}
}
</script>
<style>
<style lang="less" scoped>
.Box {
width: 750rpx;
background: #FFFFFF;
border-radius: 16rpx 16rpx 16rpx 16rpx;
padding: 32rpx 64rpx;
margin-top: 32rpx;
position: relative;
</style>
.fontStyle {
.df;
>text {
font-weight: 500;
font-size: 28rpx;
color: #333333;
margin-left: 12rpx
}
}
.content {
font-weight: 400;
font-size: 24rpx;
color: #999999;
margin-top: 16rpx;
}
.buttonStyle {
position: absolute;
right: 58rpx;
top: 56rpx;
width: 180rpx;
height: 70rpx;
line-height: 70rpx;
background: #FFFFFF;
border-radius: 10rpx 10rpx 10rpx 10rpx;
border: 2rpx solid #E8E8E8;
font-size: 28rpx;
color: #000;
}
.rightStyle {
.df(space-between);
margin-top: 16rpx;
font-weight: bold;
font-size: 28rpx;
color: #333333;
}
}
.ml-20 {
margin-left: 20rpx;
}
.df(@start: flex-start, @position: center) {
display: flex;
justify-content: @start;
align-items: @position;
}
</style>

View File

@@ -1,22 +1,103 @@
<template>
<view>
3
<view class="Box">
<view class="fontStyle">
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/shangdian.png"
style="width: 40rpx;height: 36.44rpx;" mode=""></image>
<text>商家信息</text>
</view>
<view class="content">
{{info.shopName}}
</view>
<view class="addreeStyle">
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/dingwei.png"
style="width: 17.9rpx;height: 22rpx;margin-right: 6rpx;" mode=""></image>{{info.distances}}km |
{{info.address}}
</view>
<view class="rightStyle">
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/dianhua.png" @click="makephone(info.phone)"
style="width: 39.46rpx;height: 40rpx;margin-right: 50rpx;" mode=""></image>
</view>
</view>
</template>
<script>
export default {
props: ['info'],
data() {
return {
}
},
methods: {
makephone(e) {
uni.makePhoneCall({
phoneNumber: e
});
}
}
}
</script>
<style>
<style lang="less" scoped>
.Box {
width: 750rpx;
background: #FFFFFF;
border-radius: 16rpx 16rpx 16rpx 16rpx;
padding: 32rpx 64rpx;
margin-top: 32rpx;
position: relative;
</style>
.fontStyle {
.df;
>text {
font-weight: 500;
font-size: 28rpx;
color: #333333;
margin-left: 12rpx
}
}
.content {
font-weight: 400;
font-size: 28rpx;
color: #333333;
margin-top: 32rpx;
}
.buttonStyle {
width: 158rpx;
height: 56rpx;
background: #FFFFFF;
border-radius: 10rpx 10rpx 10rpx 10rpx;
border: 2rpx solid #E8E8E8;
position: absolute;
right: 58rpx;
top: 56rpx;
}
.addreeStyle {
font-weight: 400;
font-size: 24rpx;
color: #999999;
margin-top: 22rpx;
.df;
}
.rightStyle {
position: absolute;
right: 30rpx;
top: 126rpx;
}
}
.ml-20 {
margin-left: 20rpx;
}
.df(@start: flex-start, @position: center) {
display: flex;
justify-content: @start;
align-items: @position;
}
</style>

View File

@@ -0,0 +1,127 @@
<template>
<view class="Box">
<view class="fontStyle">
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/sfmoney.png"
style="width: 28.29rpx;height: 31.93rpx;" mode=""></image>
<text>订单信息</text>
</view>
<view class="content">
<view>
<text></text> <text></text> <text>:</text>
</view>
<text>{{info.orderNo}}</text>
</view>
<view class="content">
<view>
<text></text> <text></text> <text>:</text>
</view>
<text>{{info.phone}}</text>
</view>
<view class="content">
<view>
<text></text> <text></text> <text></text> <text>:</text>
</view>
<text>{{info.payTime}}</text>
</view>
<view class="content">
<view>
<text></text> <text>:</text>
</view>
<text>{{info.number}}</text>
</view>
<view class="content">
<view>
<text></text> <text>:</text>
</view>
<text>{{info.orderAmount}}</text>
</view>
<view class="content">
<view>
<text></text> <text></text> <text></text> <text>:</text>
</view>
<text style="color: #FF4C11;">{{info.saveAmount}}</text>
</view>
<view class="content">
<view>
<text></text><text></text> <text>:</text>
</view>
<text>{{info.payAmount}}</text>
</view>
</view>
</template>
<script>
export default {
props: ['info'],
data() {
return {}
},
methods: {
}
}
</script>
<style lang="less" scoped>
.Box {
width: 750rpx;
background: #FFFFFF;
border-radius: 16rpx 16rpx 16rpx 16rpx;
padding: 32rpx 64rpx;
margin-top: 32rpx;
position: relative;
.fontStyle {
.df;
>text {
font-weight: 500;
font-size: 28rpx;
color: #333333;
margin-left: 12rpx
}
}
.content {
.df(flex-start, stretch);
margin-top: 16rpx;
margin-left: 20rpx;
>view {
>text {
font-weight: 400;
font-size: 24rpx;
color: #666666;
}
font-weight: 400;
font-size: 24rpx;
color: #666666;
margin-right: 50rpx;
width: 120rpx;
.df(space-between)
}
>text {
font-weight: 400;
font-size: 24rpx;
color: #333333;
}
}
}
.ml-20 {
margin-left: 20rpx;
}
.df(@start: flex-start, @position: center) {
display: flex;
justify-content: @start;
align-items: @position;
}
</style>

View File

@@ -1,22 +1,131 @@
<template>
<view>
6
<view class="Box">
<view class="fontStyle">
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/sfmoney.png"
style="width: 28.29rpx;height: 31.93rpx;" mode=""></image>
<text>实付金额</text>
<text>{{info.payAmount}}</text>
</view>
<view class="content">
<view>
<text></text> <text></text> <text>:</text>
</view>
<text>{{info.orderNo}}</text>
</view>
<view class="content">
<view>
<text></text> <text></text> <text>:</text>
</view>
<text>{{info.phone}}</text>
</view>
<view class="content">
<view>
<text></text> <text></text> <text></text> <text>:</text>
</view>
<text>{{info.payTime}}</text>
</view>
<view class="content">
<view>
<text></text> <text>:</text>
</view>
<text>{{info.number}}</text>
</view>
<view class="content">
<view>
<text></text> <text>:</text>
</view>
<text>{{info.orderAmount}}</text>
</view>
<view class="content">
<view>
<text></text> <text>:</text>
</view>
<text>{{info.payAmount}}</text>
</view>
</view>
</template>
<script>
export default {
props: ['info'],
data() {
return {
}
return {}
},
methods: {
}
}
</script>
<style>
<style lang="less" scoped>
.Box {
width: 750rpx;
background: #FFFFFF;
border-radius: 16rpx 16rpx 16rpx 16rpx;
padding: 32rpx 64rpx;
margin-top: 32rpx;
position: relative;
</style>
.fontStyle {
.df;
>text {
font-weight: 500;
font-size: 28rpx;
color: #333333;
margin-left: 12rpx
}
}
.content {
.df(flex-start, stretch);
margin-top: 16rpx;
margin-left: 20rpx;
>view {
>text {
font-weight: 400;
font-size: 24rpx;
color: #666666;
}
font-weight: 400;
font-size: 24rpx;
color: #666666;
margin-right: 50rpx;
width: 120rpx;
.df(space-between)
}
>text {
font-weight: 400;
font-size: 24rpx;
color: #333333;
}
}
}
.ml-20 {
margin-left: 20rpx;
}
.df(@start: flex-start, @position: center) {
display: flex;
justify-content: @start;
align-items: @position;
}
</style>

View File

@@ -1,22 +1,152 @@
<template>
<view>
5
<view class="Box">
<view class="fontStyle">
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/dengpao.png"
style="width: 33.19rpx;height: 43.92rpx;" mode=""></image>
<text>温馨提示</text>
</view>
<view class="content">
<view>
有效期:
</view>
<text>{{info.notice.dateUsed}}</text>
</view>
<view class="content">
<view>
使用时间:
</view>
<text>{{info.notice.availableTime}}</text>
</view>
<view class="content">
<view>
使用规则:
</view>
<text>{{info.notice.invoiceInfo}}</text>
</view>
<view @click="clickEvent" class="lookstyle" v-if="islook">
查看更多<u-icon name="arrow-down" color="#575B66" size="28"></u-icon>
</view>
<view class="More" v-else>
{{info.notice.usageRules}}
</view>
</view>
</template>
<script>
export default {
props: ['info'],
data() {
return {
islook: true
}
},
methods: {
clickEvent() {
this.islook = false
}
}
}
</script>
<style>
<style lang="less" scoped>
.Box {
width: 750rpx;
background: #FFFFFF;
border-radius: 16rpx 16rpx 16rpx 16rpx;
padding: 32rpx 64rpx;
margin-top: 32rpx;
position: relative;
</style>
.fontStyle {
.df;
>text {
font-weight: 500;
font-size: 28rpx;
color: #333333;
margin-left: 12rpx
}
}
.content {
.df(flex-start, stretch);
margin-top: 16rpx;
>view {
font-weight: 400;
font-size: 24rpx;
color: #999999;
width: 120rpx;
}
>text {
font-weight: 400;
font-size: 24rpx;
color: #666666;
}
}
.More {
margin-left: 119rpx;
font-weight: 400;
font-size: 24rpx;
color: #666666;
}
.buttonStyle {
width: 158rpx;
height: 56rpx;
background: #FFFFFF;
border-radius: 10rpx 10rpx 10rpx 10rpx;
border: 2rpx solid #E8E8E8;
position: absolute;
right: 58rpx;
top: 56rpx;
}
.addreeStyle {
font-weight: 400;
font-size: 24rpx;
color: #999999;
margin-top: 22rpx;
.df;
}
.rightStyle {
margin-top: 16rpx;
font-weight: 400;
font-size: 24rpx;
color: #333;
.df(space-between);
>view>text {
margin-left: 8rpx;
color: #999999;
font-size: 24rpx;
}
}
.lookstyle {
width: 100%;
font-weight: 400;
font-size: 28rpx;
color: #333333;
.df(center);
}
}
.ml-20 {
margin-left: 20rpx;
}
.df(@start: flex-start, @position: center) {
display: flex;
justify-content: @start;
align-items: @position;
}
</style>

View File

@@ -1,22 +1,110 @@
<template>
<view>
4
<view class="Box">
<view class="fontStyle">
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/canyin.png"
style="width: 40rpx;height: 36.44rpx;" mode=""></image>
<text>到店吃套餐</text>
</view>
<view v-for="(item ,i ) in info.tagVos" :key="i">
<view class="content">
{{item.title}} {{item.goods.length}} {{item.number}}
</view>
<view class="rightStyle" v-for="(ele,index) in item.goods" :key="index">
<view>
{{ele.name}} <text>({{ele.unitName}})</text>
</view>
<text>{{ele.lowPrice}}</text>
</view>
</view>
</view>
</template>
<script>
export default {
props: ['info'],
data() {
return {
}
},
methods: {
makephone(e) {
uni.makePhoneCall({
phoneNumber: e
});
}
}
}
</script>
<style>
<style lang="less" scoped>
.Box {
width: 750rpx;
background: #FFFFFF;
border-radius: 16rpx 16rpx 16rpx 16rpx;
padding: 32rpx 64rpx;
margin-top: 32rpx;
position: relative;
</style>
.fontStyle {
.df;
>text {
font-weight: 500;
font-size: 28rpx;
color: #333333;
margin-left: 12rpx
}
}
.content {
margin-top: 20rpx;
font-weight: 400;
font-size: 24rpx;
color: #999999;
}
.buttonStyle {
width: 158rpx;
height: 56rpx;
background: #FFFFFF;
border-radius: 10rpx 10rpx 10rpx 10rpx;
border: 2rpx solid #E8E8E8;
position: absolute;
right: 58rpx;
top: 56rpx;
}
.addreeStyle {
font-weight: 400;
font-size: 24rpx;
color: #999999;
margin-top: 22rpx;
.df;
}
.rightStyle {
margin-top: 16rpx;
font-weight: 400;
font-size: 24rpx;
color: #333;
.df(space-between);
>view>text {
margin-left: 8rpx;
color: #999999;
font-size: 24rpx;
}
}
}
.ml-20 {
margin-left: 20rpx;
}
.df(@start: flex-start, @position: center) {
display: flex;
justify-content: @start;
align-items: @position;
}
</style>

View File

@@ -1,22 +1,82 @@
<template>
<view>
1
<view class="title">
<text class="fontStyle">{{info.proName}}</text>
<view class="titleBox">
<image :src="info.proImg" mode="" style="width: 102rpx;height: 102rpx;border-radius: 12rpx 12rpx 12rpx 12rpx;"></image>
<view class="ml-20 rightText">
<view >
{{info.avaTime}}
</view>
<view style="margin-top: 8rpx;">{{info.proDetail}}</view>
</view>
</view>
<view class="moneyStyle">
<text class="moneys">{{info.orderAmount}}</text>
<u-icon name="arrow-right" color="#000" size="28"></u-icon>
</view>
</view>
</template>
<script>
export default {
props: ['info'],
data() {
return {
}
},
methods: {
}
}
</script>
<style>
<style lang="less">
.title {
width: 750rpx;
height: 206rpx;
background: #FFFFFF;
border-radius: 16rpx 16rpx 16rpx 16rpx;
padding: 32rpx 64rpx;
margin-top: 32rpx;
position: relative;
</style>
.fontStyle {
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
.titleBox {
.df();
.rightText {
font-weight: 400;
font-size: 24rpx;
color: #999999;
}
}
.moneyStyle {
position: absolute;
right: 30rpx;
top: 80rpx;
.df();
.moneys{
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
}
}
.ml-20 {
margin-left: 20rpx;
}
.df(@start: flex-start, @position: center) {
display: flex;
justify-content: @start;
align-items: @position;
}
</style>

View File

@@ -2,27 +2,57 @@
<!-- 团购订单详情 -->
<view>
<!-- 头部 -->
<groupTitle></groupTitle>
<!-- -->
<groupCoupons></groupCoupons>
<groupTitle :info="listinfo"></groupTitle>
<!--
if (e == 'closed') return '已完成'
else if (e == 'unpaid') return '待付款'
else if (e == 'unused') return '待使用'
else if (e == 'refund') return '已退款'
else if (e == 'cancelled') return '已取消'
else return "1"
-->
<groupCoupons :info="listinfo" @clickEvent='clickEvent'
v-if="listinfo.status=='unused'||listinfo.status=='refund'"></groupCoupons>
<!-- 商家信息 -->
<groupMerchants></groupMerchants>
<groupMerchants :info="listinfo"></groupMerchants>
<!-- 到店 -->
<groupStore></groupStore>
<groupStore :info="listinfo"></groupStore>
<!-- 提示 -->
<groupPrompt></groupPrompt>
<groupPrompt :info="listinfo"></groupPrompt>
<!-- 实付 -->
<groupPay></groupPay>
<groupPay :info="listinfo" v-if="listinfo.status=='unused'||listinfo.status=='refund'"></groupPay>
<!-- 订单信息 -->
<groupOrderInfo :info="listinfo" v-else></groupOrderInfo>
<view class="customerService" @click="makephone(listinfo.phone)">
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/kefu.png"
style="width: 40rpx;height: 43.21rpx;" mode=""></image>
联系客服
</view>
<!-- 待支付按钮 -->
<button v-if="listinfo.status == 'unpaid'" @click="payEvent" class="payStyle">立即支付</button>
<!-- 二维码展示 -->
<view class="qrimg" v-if="isQrimg" @click="clickEvent">
<tki-qrcode ref="qrcode" size="400" :val="qrValue" :loadMake="true" @result="qrR" />
</view>
</view>
</template>
<script>
/**
* 只有两个有变动,美团券和实付金额、订单信息
* 1.支付完成/已退款/有美团券、
* 待支付/已完成没有美团券
* 2.支付完成、已退款有实付金额
* 待支付、已完成有订单信息没有实付金额
**/
import groupTitle from './components/groupTitle.vue'
import groupCoupons from './components/groupCoupons.vue'
import groupMerchants from './components/groupMerchants.vue'
import groupStore from './components/groupStore.vue'
import groupPrompt from './components/groupPrompt.vue'
import groupPay from './components/groupPay.vue'
import groupOrderInfo from './components/groupOrderInfo.vue'
import tkiQrcode from "@/components/tki-qrcode/tki-qrcode.vue"
export default {
components: {
groupTitle,
@@ -30,7 +60,9 @@
groupMerchants,
groupStore,
groupPrompt,
groupPay
groupPay,
tkiQrcode,
groupOrderInfo
},
onLoad(e) {
this.orderId = e.orderId
@@ -39,36 +71,126 @@
data() {
return {
orderId: "",
listinfo: null
listinfo: null,
isQrimg: false,
qrValue: ""
}
},
methods: {
async payEvent() {
console.log('调试1')
let res = await this.api.payOrderPay({
payType:'wechatPay',
orderId:this.listinfo.id,
})
console.log('调试2')
if (res) {
return
uni.requestPayment({
provider: 'wxpay', //支付类型-固定值
partnerid: res.data.payAppId, // 微信支付商户号
timeStamp: res.data.payTimeStamp, // 时间戳(单位:秒)
nonceStr: res.data.paynonceStr, // 随机字符串
package: res.data.payPackage, // 固定值
signType: res.data.paySignType, //固定值
paySign: res.data.paySign, //签名
success: (res) => {
uni.showToast({
title: "支付成功"
})
uni.navigateBack()
},
fail: (err) => {
setTimeout(res => {
uni.showToast({
icon: 'none',
title: '支付失败'
})
uni.hideLoading()
}, 2000)
}
});
}
},
clickEvent() {
this.qrValue = this.qrEvent()
this.isQrimg = !this.isQrimg
},
qrR(e) {
console.log(112312)
},
// 拼接code值
qrEvent() {
let str = ''
this.listinfo.coupons.forEach(res => {
if (res.couponNo) {
str += res.couponNo + ','
}
})
return str
},
orderorderInfo() {
let _this = this
uni.getStorage({
key: "getLocationstorage",
success: function(data) {
success: async function(data) {
let {
lat,
lng
} = data.data
let res = _this.api.groupOrderInfoDetail({
let res = await _this.api.groupOrderInfoDetail({
id: _this.orderId,
lat,
lng
})
if (res.code == 0) {
_this.listinfo = res.data
// this.mountedcreateSelectorQuery()
}
}
});
},
makephone(e) {
uni.makePhoneCall({
phoneNumber: e
});
}
}
}
</script>
<style>
<style lang="less" scoped>
.qrimg {
width: 55vh;
height: 100vh;
background-color: rgba(0, 0, 0, .6);
display: flex;
justify-content: center;
align-items: center;
position: fixed;
top: 0%;
left: 0%;
}
.payStyle {
background-color: #fe7620;
position: fixed;
bottom: 0%;
left: 50%;
transform: translate(-50%);
color: #fff;
width: 90%;
border: 10rpx solid #fff;
}
.customerService {
font-weight: 400;
font-size: 28rpx;
color: #333333;
width: 100%;
padding: 78rpx 0;
display: flex;
align-items: center;
justify-content: center;
}
</style>