trade:完善砍价的界面
parent
6a6f022eac
commit
cab431c25e
|
@ -11,11 +11,11 @@
|
||||||
<div class="line1" style="width: 100%;">{{ item.activityName }}</div>
|
<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="'天'"
|
<count-down :justify-left="'justify-content:left'" :bgColor="bgColor" :is-day="true" :tip-text="'倒计时 '" :day-text="'天'"
|
||||||
:hour-text="' 时 '" :minute-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="successTxt font-color-red" v-else-if="item.status === 2">砍价成功</div>
|
||||||
<div class="endTxt" v-else>活动已结束</div>
|
<div class="endTxt" v-else>活动已结束</div>
|
||||||
<div class="money">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
<view v-if="item.stock === 0">
|
<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 style="font-size: 22rpx;" @tap="openSubscribe('/pages/activity/goods_bargain_details/index?id='+ item.id +'&startBargainUid='+ uid)">已售罄</view>
|
||||||
</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>
|
||||||
<view v-if="item.stock > 0" class='cutBnt bg-color'>参与砍价</view>
|
<view v-if="item.stock > 0" class='cutBnt bg-color'>参与砍价</view>
|
||||||
<view v-if="item.stock === 0" class='cutBnt bg-color-hui'>已售罄</view>
|
<view v-if="item.stock === 0" class='cutBnt bg-color-hui'>已售罄</view>
|
||||||
|
@ -130,8 +130,8 @@
|
||||||
*/
|
*/
|
||||||
getBargainHeader: function() {
|
getBargainHeader: function() {
|
||||||
BargainApi.getBargainRecordSummary().then(res => {
|
BargainApi.getBargainRecordSummary().then(res => {
|
||||||
this.bargainTotal = res.data.userCount;
|
this.bargainTotal = res.data.successUserCount;
|
||||||
this.bargainSuccessList = res.data.successRecords;
|
this.bargainSuccessList = res.data.successList;
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
return this.$util.Tips({
|
return this.$util.Tips({
|
||||||
title: err
|
title: err
|
||||||
|
|
|
@ -373,8 +373,11 @@
|
||||||
SeckillApi.getSeckillActivity(this.id).then(res => {
|
SeckillApi.getSeckillActivity(this.id).then(res => {
|
||||||
this.activity = res.data;
|
this.activity = res.data;
|
||||||
// 计算活动状态
|
// 计算活动状态
|
||||||
|
if (this.activity) {
|
||||||
const now = new Date().getTime();
|
const now = new Date().getTime();
|
||||||
if (this.activity.status !== 0) {
|
if (this.activity.status === 1) {
|
||||||
|
this.status = 0;
|
||||||
|
} else {
|
||||||
if (this.activity.startTime > now) {
|
if (this.activity.startTime > now) {
|
||||||
this.status = 1;
|
this.status = 1;
|
||||||
} else if (now <= this.activity.endTime) {
|
} else if (now <= this.activity.endTime) {
|
||||||
|
@ -382,8 +385,7 @@
|
||||||
} else {
|
} else {
|
||||||
this.status = 3;
|
this.status = 3;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
this.status = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得商品详情
|
// 获得商品详情
|
||||||
|
|
|
@ -16,7 +16,9 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="text lines1">
|
<view class="text lines1">
|
||||||
<view class="name line1">{{ item.name }}</view>
|
<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 class="btn">参与砍价</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -113,6 +113,10 @@
|
||||||
<view>商品总价:</view>
|
<view>商品总价:</view>
|
||||||
<view class='money'>¥{{ fen2yuan(orderInfoVo.price.totalPrice || 0 ) }}</view>
|
<view class='money'>¥{{ fen2yuan(orderInfoVo.price.totalPrice || 0 ) }}</view>
|
||||||
</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 class='item acea-row row-between-wrapper' v-if="orderInfoVo.price.couponPrice > 0">
|
||||||
<view>优惠券抵扣:</view>
|
<view>优惠券抵扣:</view>
|
||||||
<view class='money'>-¥{{ fen2yuan(orderInfoVo.price.couponPrice) }}</view>
|
<view class='money'>-¥{{ fen2yuan(orderInfoVo.price.couponPrice) }}</view>
|
||||||
|
@ -169,7 +173,6 @@
|
||||||
import { toLogin } from '@/libs/login.js';
|
import { toLogin } from '@/libs/login.js';
|
||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
import * as Util from '@/utils/util.js';
|
import * as Util from '@/utils/util.js';
|
||||||
import {getTradeConfig} from "../../../api/trade/config";
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
couponListWindow,
|
couponListWindow,
|
||||||
|
@ -187,9 +190,9 @@
|
||||||
},
|
},
|
||||||
mark: '', // 备注信息
|
mark: '', // 备注信息
|
||||||
|
|
||||||
bargain: false, // 是否是砍价
|
bargainRecordId: false, // 是否是砍价
|
||||||
combination: false, // 是否是拼团
|
combination: false, // 是否是拼团
|
||||||
secKill: false, // 是否是秒杀
|
seckillActivityId: false, // 是否是秒杀
|
||||||
|
|
||||||
// ========== 积分 ==========
|
// ========== 积分 ==========
|
||||||
pointStatus: false, //是否使用积分
|
pointStatus: false, //是否使用积分
|
||||||
|
@ -250,6 +253,8 @@
|
||||||
count: options.count | 1
|
count: options.count | 1
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
this.seckillActivityId = options.seckillActivityId;
|
||||||
|
this.bargainRecordId = options.bargainRecordId;
|
||||||
this.getloadPreOrder();
|
this.getloadPreOrder();
|
||||||
|
|
||||||
// 处理 address 地址
|
// 处理 address 地址
|
||||||
|
@ -363,6 +368,8 @@
|
||||||
receiverMobile: this.deliveryType === 2 ? this.contactsTel : undefined,
|
receiverMobile: this.deliveryType === 2 ? this.contactsTel : undefined,
|
||||||
couponId: this.couponId > 0 ? this.couponId : undefined,
|
couponId: this.couponId > 0 ? this.couponId : undefined,
|
||||||
pointStatus: this.pointStatus,
|
pointStatus: this.pointStatus,
|
||||||
|
seckillActivityId: this.seckillActivityId,
|
||||||
|
bargainRecordId: this.bargainRecordId,
|
||||||
// TODO 芋艿:秒杀等等
|
// TODO 芋艿:秒杀等等
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue