团购券购买数量bug修复
This commit is contained in:
@@ -106,7 +106,7 @@ export default {
|
|||||||
if(options?.path?.includes('ticketsBuy/ticketsBuy') && options?.query.couponsId) {
|
if(options?.path?.includes('ticketsBuy/ticketsBuy') && options?.query.couponsId) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: 'pages/common/groupbuy/detail?id=' + options?.query.couponsId
|
url: 'pages/common/groupbuy/detail?couponId=' + options?.query.couponsId
|
||||||
});
|
});
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class='price c-flex-column' style='flex: 1'>
|
<view class='price c-flex-column' style='flex: 1'>
|
||||||
<text>{{ groupBuyBean?.payPrice || 0 }}</text>
|
<text>{{ groupBuyBean?.payPrice || 0 }}</text>
|
||||||
<text>¥{{ groupBuyBean?.price || 0 }}</text>
|
<text v-if='(groupBuyBean?.price||0)>0&&!isCouponGoodsDetail'>¥{{ groupBuyBean?.price || 0 }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if='isPending()' class='countdown-time c-flex-column'>
|
<view v-if='isPending()' class='countdown-time c-flex-column'>
|
||||||
<view class='c-flex-row'>{{ countdownTime?.days || 0 }}天
|
<view class='c-flex-row'>{{ countdownTime?.days || 0 }}天
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 商品详情优惠券 -->
|
<!-- 商品详情优惠券 -->
|
||||||
<view class='card-view coupon-container' v-if='groupBuyBean?.couponsList'>
|
<view class='card-view coupon-container' v-if='groupBuyBean?.couponsList&&groupBuyBean?.couponsList?.length>0'>
|
||||||
<text class='card-view-title'>赠送优惠券</text>
|
<text class='card-view-title'>赠送优惠券</text>
|
||||||
<view class='c-flex-column'>
|
<view class='c-flex-column'>
|
||||||
<coupon-item v-for='(item,index) in groupBuyBean?.couponsList' :key='index' :item='item' />
|
<coupon-item v-for='(item,index) in groupBuyBean?.couponsList' :key='index' :item='item' />
|
||||||
@@ -646,6 +646,8 @@ const placeOrder = async () => {
|
|||||||
.goods-container {
|
.goods-container {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 200rpx;
|
width: 200rpx;
|
||||||
@@ -688,7 +690,14 @@ const placeOrder = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.coupon-container {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.record-container {
|
.record-container {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
|
||||||
.item-view {
|
.item-view {
|
||||||
margin: 10rpx 30rpx;
|
margin: 10rpx 30rpx;
|
||||||
|
@@ -75,7 +75,11 @@ onLoad((e: any) => {
|
|||||||
|
|
||||||
const countChange = (isPlus: boolean) => {
|
const countChange = (isPlus: boolean) => {
|
||||||
if(isPlus) {
|
if(isPlus) {
|
||||||
goodsCount.value += 1;
|
if(goodsCount.value < (groupBuyBean.value?.publicNum || 0)) {
|
||||||
|
goodsCount.value += 1;
|
||||||
|
} else {
|
||||||
|
showToast('超出最大购买数量');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if(goodsCount.value > 1) {
|
if(goodsCount.value > 1) {
|
||||||
goodsCount.value -= 1;
|
goodsCount.value -= 1;
|
||||||
@@ -178,7 +182,7 @@ const payment = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.date {
|
.date {
|
||||||
font-size: 25rpx;
|
font-size: 30rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
|
@@ -3,20 +3,21 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import { getQueryParam } from '@/utils';
|
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
getApp().globalData?.logger?.info('ticketsBuy options: ', options);
|
getApp().globalData?.logger?.info('ticketsBuy share options: ', options);
|
||||||
let couponId = options?.couponsId;
|
let couponId = options?.couponsId;
|
||||||
if(options?.query && couponId == undefined) {
|
if(couponId) {
|
||||||
const params = decodeURIComponent(options?.query);
|
setTimeout(() => {
|
||||||
couponId = getQueryParam(params, 'couponsId');
|
uni.reLaunch({
|
||||||
}
|
url: `/pages/common/groupbuy/detail?couponId=${couponId}`
|
||||||
setTimeout(() => {
|
});
|
||||||
|
}, 300);
|
||||||
|
} else {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: `/pages/common/groupbuy/detail?couponId=${couponId}`
|
url: '/pages/home/index'
|
||||||
});
|
});
|
||||||
}, 350);
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@@ -87,7 +87,8 @@ const submenuList = [
|
|||||||
icon: assetsUrl('ic_register_gift2.png'),
|
icon: assetsUrl('ic_register_gift2.png'),
|
||||||
path: '/pages/common/register/reward'
|
path: '/pages/common/register/reward'
|
||||||
// path: '/pages/common/groupbuy/detail?shareId=1797548579864748033'
|
// path: '/pages/common/groupbuy/detail?shareId=1797548579864748033'
|
||||||
// path: '/pages/coupons/ticketsBuy/ticketsBuy?couponsId=1799264392762138626'
|
// path: '/pages/coupons/ticketsBuy/ticketsBuy?couponsId=1746159008308854786'
|
||||||
|
//1799264392762138626
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '团购秒杀',
|
title: '团购秒杀',
|
||||||
|
@@ -3,27 +3,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import { getQueryParam } from '@/utils';
|
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
getApp().globalData?.logger?.info('app share index/index options: ', options);
|
getApp().globalData?.logger?.info('app share index/index options: ', options);
|
||||||
|
|
||||||
let goodsShareId = '';
|
let goodsShareId = '';
|
||||||
if(options?.scene) {
|
if(options?.shareId) {
|
||||||
const scene = decodeURIComponent(options?.scene);
|
|
||||||
goodsShareId = scene.split('=')[1];
|
|
||||||
getApp().globalData?.logger?.info('app share index/index options: scene goodsShareId ', goodsShareId);
|
|
||||||
} else if(options?.shareId) {
|
|
||||||
goodsShareId = options?.shareId;
|
goodsShareId = options?.shareId;
|
||||||
}
|
}
|
||||||
getApp().globalData?.logger?.info('app share index/index options: scene ', options);
|
getApp().globalData?.logger?.info('app share index/index options: goodsShareId ', goodsShareId);
|
||||||
|
|
||||||
if(options?.query) {
|
|
||||||
const params = decodeURIComponent(options?.query);
|
|
||||||
goodsShareId = getQueryParam(params, 'shareId') || '';
|
|
||||||
getApp().globalData?.logger?.info('app goods share options: params ', params, goodsShareId);
|
|
||||||
}
|
|
||||||
getApp().globalData?.logger?.info('app share index/index options: query ', options);
|
|
||||||
|
|
||||||
if(goodsShareId) {
|
if(goodsShareId) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
Reference in New Issue
Block a user