拼团修复
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<view class="min-page bg-f7 u-font-28">
|
||||
<up-sticky :offsetTop="0" :customNavHeight="0">
|
||||
<view class="top" :style="topStyle">
|
||||
<up-navbar bg-color="transparent" :fixed="false" :placeholder="false" title="拼团特惠"
|
||||
<up-navbar bg-color="transparent" :fixed="false" :placeholder="false" title="拼团特惠" @leftClick="uni.navigateBack()"
|
||||
left-icon-color="#fff" title-color="#fff"></up-navbar>
|
||||
<view class="u-flex info u-col-center">
|
||||
<image :src="imgs.map" class="map"></image>
|
||||
@@ -57,7 +57,7 @@
|
||||
<text class="numbers">{{item.groupPeopleNum}}人团</text>
|
||||
<text class="u-line-1 font-bold u-m-l-18 name">{{item.wareName}}</text>
|
||||
</view>
|
||||
<view class="members">已团:9999</view>
|
||||
<view class="members">已团:{{item.groupedNum}}</view>
|
||||
<view class="info">
|
||||
<view class="left">
|
||||
<view class="">
|
||||
@@ -110,17 +110,30 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="btns" v-if="showBtns(item)">
|
||||
<view class="btn " @click.stop="refund(item)">申请退款</view>
|
||||
<view class="btn " @click.stop="cancelRefund(item)" v-if="item.status=='退款中'">取消退款</view>
|
||||
<button open-type="share" class="btn black" @click.stop="share(item)">邀请好友</button>
|
||||
<template v-if="item.status=='待核销'">
|
||||
<view class="btn " @click.stop="lookCode(item)">查看券码</view>
|
||||
<button class="btn black" @click.stop="refund(item)">申请退款</button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="btn " @click.stop="refund(item)" v-if="canRefund(item)">申请退款</view>
|
||||
<view class="btn " @click.stop="cancelRefund(item)" v-if="item.status=='退款中'">取消退款</view>
|
||||
<button open-type="share" class="btn black" @click.stop="share(item)"
|
||||
v-if="showShare(item)">邀请好友</button>
|
||||
</template>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<LookQrcode v-model="modalData.show" :qrcode="qrcode"></LookQrcode>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import LookQrcode from "@/components/look-qrcode/look-qrcode.vue";
|
||||
import {
|
||||
wxShare
|
||||
} from '@/utils/share.js'
|
||||
@@ -139,6 +152,24 @@
|
||||
watch
|
||||
} from 'vue'
|
||||
|
||||
const canRefundStatus = ['待成团', '待核销']
|
||||
|
||||
function canRefund(item) {
|
||||
if (canRefundStatus.includes(item.status)) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
const modalData = reactive({
|
||||
show: false,
|
||||
});
|
||||
const qrcode = ref("");
|
||||
|
||||
function lookCode(item) {
|
||||
qrcode.value = item.verifyCode
|
||||
modalData.show = true;
|
||||
}
|
||||
|
||||
const imgs = {
|
||||
bg: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/1/d21f2dfd7bec44618f2d5e4b88372b08.png',
|
||||
bg1: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/1/604c3f917daa41af9239145196c6d3f3.png',
|
||||
@@ -300,7 +331,7 @@
|
||||
})
|
||||
}
|
||||
|
||||
function camcelRefund(item) {
|
||||
function cancelRefund(item) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否取消退款?',
|
||||
@@ -336,11 +367,18 @@
|
||||
return true
|
||||
}
|
||||
|
||||
function showTime(item) {
|
||||
if (item.status == '已退款') {
|
||||
return false
|
||||
function showShare(item) {
|
||||
if (item.status == '待成团') {
|
||||
return true
|
||||
}
|
||||
return true
|
||||
return false
|
||||
}
|
||||
|
||||
function showTime(item) {
|
||||
if (item.status == '待成团') {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
@@ -353,11 +391,11 @@
|
||||
onShareAppMessage(() => {
|
||||
console.log('onShareAppMessage')
|
||||
console.log(shareItem)
|
||||
const query=`groupOrderNo=${shareItem.groupOrderNo}&shopId=${shareItem.shopId}`
|
||||
const query = `groupOrderNo=${shareItem.groupOrderNo}&shopId=${shareItem.shopId}`
|
||||
return wxShare({
|
||||
title: shareItem.wareJson.wareName,
|
||||
imageUrl: shareItem.goodsImg,
|
||||
path:'/groupBuying/detail/index' +'?'+query,
|
||||
path: '/groupBuying/detail/index' + '?' + query,
|
||||
query,
|
||||
})
|
||||
})
|
||||
@@ -526,6 +564,7 @@
|
||||
.orderStatus {
|
||||
padding: 26rpx 28rpx;
|
||||
justify-content: space-between;
|
||||
height: 100rpx;
|
||||
|
||||
.orderState {
|
||||
color: #999;
|
||||
@@ -558,23 +597,7 @@
|
||||
line-height: 36rpx;
|
||||
}
|
||||
|
||||
.status {
|
||||
padding: 8rpx 18rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid transparent;
|
||||
|
||||
&.success {
|
||||
border-color: rgba(123, 209, 54, 1);
|
||||
color: rgba(123, 209, 54, 1);
|
||||
background: rgba(123, 209, 54, 0.12);
|
||||
}
|
||||
|
||||
&.error {
|
||||
border-color: #FF1C1C;
|
||||
color: #FF1C1C;
|
||||
background: rgba(255, 28, 28, 0.18);
|
||||
}
|
||||
}
|
||||
|
||||
.price {
|
||||
color: #ED5A2E;
|
||||
@@ -632,4 +655,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.copy {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user