trade:完善砍价的界面

pull/5/head
YunaiV 2023-10-05 17:22:38 +08:00
parent 6a6f022eac
commit cab431c25e
5 changed files with 29 additions and 18 deletions

View File

@ -11,11 +11,11 @@
<div class="line1" style="width: 100%;">{{ item.activityName }}</div>
<count-down :justify-left="'justify-content:left'" :bgColor="bgColor" :is-day="true" :tip-text="' '" :day-text="'天'"
:hour-text="' 时 '" :minute-text="' 分 '"
:second-text="' 秒 '" :datatime="item.expireTime / 1000" v-if="item.status === 1"></count-down>
:second-text="' 秒 '" :datatime="item.endTime / 1000" v-if="item.status === 1"></count-down>
<div class="successTxt font-color-red" v-else-if="item.status === 2">砍价成功</div>
<div class="endTxt" v-else></div>
<div class="money">
已砍至<span class="symbol font-color-red"></span><span class="num font-color-red">{{ fen2yuan(item.payPrice) }}</span>
已砍至<span class="symbol font-color-red"></span><span class="num font-color-red">{{ fen2yuan(item.bargainPrice) }}</span>
</div>
</div>
</div>

View File

@ -46,7 +46,7 @@
<view v-if="item.stock === 0">
<view style="font-size: 22rpx;" @tap="openSubscribe('/pages/activity/goods_bargain_details/index?id='+ item.id +'&startBargainUid='+ uid)">已售罄</view>
</view>
<view class='money font-color'>最低: <text class='price'>{{ fen2yuan(item.bargainPrice) }}</text></view>
<view class='money font-color'>最低: <text class='price'>{{ fen2yuan(item.bargainMinPrice) }}</text></view>
</view>
<view v-if="item.stock > 0" class='cutBnt bg-color'>参与砍价</view>
<view v-if="item.stock === 0" class='cutBnt bg-color-hui'>已售罄</view>
@ -130,8 +130,8 @@
*/
getBargainHeader: function() {
BargainApi.getBargainRecordSummary().then(res => {
this.bargainTotal = res.data.userCount;
this.bargainSuccessList = res.data.successRecords;
this.bargainTotal = res.data.successUserCount;
this.bargainSuccessList = res.data.successList;
}).catch(err => {
return this.$util.Tips({
title: err

View File

@ -373,17 +373,19 @@
SeckillApi.getSeckillActivity(this.id).then(res => {
this.activity = res.data;
//
const now = new Date().getTime();
if (this.activity.status !== 0) {
if (this.activity.startTime > now) {
this.status = 1;
} else if (now <= this.activity.endTime) {
this.status = 2;
if (this.activity) {
const now = new Date().getTime();
if (this.activity.status === 1) {
this.status = 0;
} else {
this.status = 3;
if (this.activity.startTime > now) {
this.status = 1;
} else if (now <= this.activity.endTime) {
this.status = 2;
} else {
this.status = 3;
}
}
} else {
this.status = 0;
}
//

View File

@ -16,7 +16,9 @@
</view>
<view class="text lines1">
<view class="name line1">{{ item.name }}</view>
<view class="money">¥<text class="num">{{ fen2yuan(item.bargainPrice) }}</text></view>
<view class="money">
¥<text class="num">{{ fen2yuan(item.bargainMinPrice) }}</text>
</view>
<view class="btn">参与砍价</view>
</view>
</view>

View File

@ -113,6 +113,10 @@
<view>商品总价</view>
<view class='money'>{{ fen2yuan(orderInfoVo.price.totalPrice || 0 ) }}</view>
</view>
<view class='item acea-row row-between-wrapper'>
<view>订单优惠</view>
<view class='money'>-{{ fen2yuan(orderInfoVo.price.discountPrice) }}</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="orderInfoVo.price.couponPrice > 0">
<view>优惠券抵扣</view>
<view class='money'>-{{ fen2yuan(orderInfoVo.price.couponPrice) }}</view>
@ -169,7 +173,6 @@
import { toLogin } from '@/libs/login.js';
import { mapGetters } from "vuex";
import * as Util from '@/utils/util.js';
import {getTradeConfig} from "../../../api/trade/config";
export default {
components: {
couponListWindow,
@ -187,9 +190,9 @@
},
mark: '', //
bargain: false, //
bargainRecordId: false, //
combination: false, //
secKill: false, //
seckillActivityId: false, //
// ========== ==========
pointStatus: false, //使
@ -250,6 +253,8 @@
count: options.count | 1
}]
}
this.seckillActivityId = options.seckillActivityId;
this.bargainRecordId = options.bargainRecordId;
this.getloadPreOrder();
// address
@ -363,6 +368,8 @@
receiverMobile: this.deliveryType === 2 ? this.contactsTel : undefined,
couponId: this.couponId > 0 ? this.couponId : undefined,
pointStatus: this.pointStatus,
seckillActivityId: this.seckillActivityId,
bargainRecordId: this.bargainRecordId,
// TODO
}
},