parent
725a37eae5
commit
220b21b6b6
|
@ -9,6 +9,15 @@ export function getBargainActivityList(count) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获得砍价活动详情
|
||||||
|
export function getBargainActivityDetail(id) {
|
||||||
|
return request.get("app-api/promotion/bargain-activity/get-detail", {
|
||||||
|
id
|
||||||
|
}, {
|
||||||
|
noAuth: true // TODO 芋艿:后续要做调整
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 获得砍价活动分页
|
// 获得砍价活动分页
|
||||||
export function getBargainActivityPage(count) {
|
export function getBargainActivityPage(count) {
|
||||||
return request.get("app-api/promotion/bargain-activity/page", {
|
return request.get("app-api/promotion/bargain-activity/page", {
|
||||||
|
|
|
@ -12,26 +12,24 @@
|
||||||
<view class='wrapper'>
|
<view class='wrapper'>
|
||||||
<view class='pictxt acea-row row-between' @tap="goProduct">
|
<view class='pictxt acea-row row-between' @tap="goProduct">
|
||||||
<view class='pictrue'>
|
<view class='pictrue'>
|
||||||
<image :src='bargainInfo.image'></image>
|
<image :src='bargainInfo.picUrl' />
|
||||||
</view>
|
</view>
|
||||||
<view class='text acea-row row-column-around'>
|
<view class='text acea-row row-column-around'>
|
||||||
<view class='line1'>{{bargainInfo.title}}</view>
|
<view class='line1'>{{ bargainInfo.name }}</view>
|
||||||
<view class="surplus">最低价:¥{{bargainInfo.minPrice}}</view>
|
<view class="surplus">最低价:¥{{ fen2yuan(bargainInfo.bargainPrice) }}</view>
|
||||||
<view class="surplus">剩余:{{bargainInfo.quota}}{{bargainInfo.unitName}}</view>
|
<view class="surplus">剩余:{{ bargainInfo.stock }} {{bargainInfo.unitName}}</view>
|
||||||
<view class='money font-color-red'>
|
<view class='money font-color-red'>
|
||||||
当前: ¥
|
当前: ¥ <text class='num'>{{ fen2yuan(buyPrice) }}</text>
|
||||||
<text class='num'>{{buyPrice}}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="acea-row"
|
<view class="acea-row" v-if="bargainInfo.endTime > new Date().getTime() && bargainInfo.stock > 0">
|
||||||
v-if="new Date().getTime()- bargainInfo.stopTime < 0 && bargainInfo.quota>0">
|
|
||||||
<countDown :tipText="' '" :bgColor="bgColor" :dayText="':'" :hourText="':'"
|
<countDown :tipText="' '" :bgColor="bgColor" :dayText="':'" :hourText="':'"
|
||||||
:minuteText="':'" :secondText="' '" :datatime="datatime" :isDay="true"></countDown>
|
:minuteText="':'" :secondText="' '" :datatime="bargainInfo.endTime / 1000" :isDay="true" />
|
||||||
<text style="font-size: 22rpx;margin-left: 4rpx;line-height: 36rpx;">后结束</text>
|
<text style="font-size: 22rpx;margin-left: 4rpx;line-height: 36rpx;">后结束</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="new Date().getTime()- bargainInfo.stopTime >=0">
|
<view v-else-if="bargainInfo.endTime <= new Date().getTime()">
|
||||||
<view style="font-size: 22rpx;" @tap='currentBargainUser'>已结束</view>
|
<view style="font-size: 22rpx;" @tap='currentBargainUser'>已结束</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="bargainInfo.quota==0">
|
<view v-else-if="bargainInfo.stock <= 0">
|
||||||
<view style="font-size: 22rpx;" @tap='currentBargainUser'>已售罄</view>
|
<view style="font-size: 22rpx;" @tap='currentBargainUser'>已售罄</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -39,6 +37,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
|
<!-- 自己砍价:1-可以参与砍价、5-砍价中 -->
|
||||||
|
<!-- 别人砍价:5-可以帮砍 -->
|
||||||
<block
|
<block
|
||||||
v-if="(startBargainUid == uid && (bargainStatus==1 || bargainStatus==3)) || (startBargainUid != uid && bargainStatus==5)">
|
v-if="(startBargainUid == uid && (bargainStatus==1 || bargainStatus==3)) || (startBargainUid != uid && bargainStatus==5)">
|
||||||
<view class='money acea-row row-center'
|
<view class='money acea-row row-center'
|
||||||
|
@ -63,14 +63,12 @@
|
||||||
|
|
||||||
<!-- 自己砍价 -->
|
<!-- 自己砍价 -->
|
||||||
<view
|
<view
|
||||||
v-if="startBargainUid == uid && parseFloat(bargainUserInfo.surplusPrice) > 0 && bargainStatus==1">
|
v-if="startBargainUid === uid && parseFloat(bargainUserInfo.surplusPrice) > 0 && bargainStatus==1">
|
||||||
<view class='bargainBnt' @tap='userBargain' v-if="quota>0">
|
<view class='bargainBnt' @tap='userBargain' v-if="bargainInfo.stock > 0">立即参与砍价</view>
|
||||||
立即参与砍价
|
<view class='bargainBnt grey' v-else>商品暂无库存</view>
|
||||||
</view>
|
|
||||||
<view class='bargainBnt grey' v-if="quota<=0">商品暂无库存</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
v-if="startBargainUid == uid && parseFloat(bargainUserInfo.surplusPrice) > 0 && bargainStatus==3">
|
v-if="startBargainUid === uid && parseFloat(bargainUserInfo.surplusPrice) > 0 && bargainStatus==3">
|
||||||
<!-- #ifdef H5 -->
|
<!-- #ifdef H5 -->
|
||||||
<view class='bargainBnt' v-if="$wechat.isWeixin()" @click="H5ShareBox = true">邀请好友帮砍价</view>
|
<view class='bargainBnt' v-if="$wechat.isWeixin()" @click="H5ShareBox = true">邀请好友帮砍价</view>
|
||||||
<view class='bargainBnt' v-else @tap='getBargainUserBargainPricePoster'>邀请好友帮砍价</view>
|
<view class='bargainBnt' v-else @tap='getBargainUserBargainPricePoster'>邀请好友帮砍价</view>
|
||||||
|
@ -80,18 +78,19 @@
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 别人砍价 -->
|
||||||
<view
|
<view
|
||||||
v-if="startBargainUid != uid && bargainStatus==5 && parseFloat(bargainUserInfo.surplusPrice) > 0">
|
v-if="startBargainUid !== uid && bargainStatus==5 && parseFloat(bargainUserInfo.surplusPrice) > 0">
|
||||||
<view class='bargainBnt' @tap='setBargainHelp'>帮好友砍一刀</view>
|
<view class='bargainBnt' @tap='setBargainHelp'>帮好友砍一刀</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="startBargainUid != uid && bargainStatus==4 && parseFloat(bargainUserInfo.surplusPrice) == 0" >
|
<view v-if="startBargainUid !== uid && bargainStatus==4 && parseFloat(bargainUserInfo.surplusPrice) == 0" >
|
||||||
<view class='bargainSuccess'>
|
<view class='bargainSuccess'>
|
||||||
<image src="../static/cheng.png"></image>
|
<image src="../static/cheng.png"></image>
|
||||||
好友已砍成功
|
好友已砍成功
|
||||||
</view>
|
</view>
|
||||||
<view class='bargainBnt' @tap='currentBargainUser'>我也要参与</view>
|
<view class='bargainBnt' @tap='currentBargainUser'>我也要参与</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="startBargainUid != uid && bargainStatus === 7">
|
<view v-if="startBargainUid !== uid && bargainStatus === 7">
|
||||||
<view class='bargainSuccess'>
|
<view class='bargainSuccess'>
|
||||||
<image src="../static/cheng.png"></image>
|
<image src="../static/cheng.png"></image>
|
||||||
您已帮其他好友砍过此商品
|
您已帮其他好友砍过此商品
|
||||||
|
@ -130,10 +129,10 @@
|
||||||
<view v-if="new Date().getTime()- bargainInfo.stopTime >=0">
|
<view v-if="new Date().getTime()- bargainInfo.stopTime >=0">
|
||||||
<view class='huiBtn' @tap='currentBargainUser'>活动已结束</view>
|
<view class='huiBtn' @tap='currentBargainUser'>活动已结束</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="bargainInfo.quota==0">
|
<view v-else-if="bargainInfo.stock == 0">
|
||||||
<view class='huiBtn' @tap='currentBargainUser'>商品已售罄</view>
|
<view class='huiBtn' @tap='currentBargainUser'>商品已售罄</view>
|
||||||
</view>
|
</view>
|
||||||
<navigator v-if="new Date().getTime()- bargainInfo.stopTime >=0 || bargainInfo.quota==0"
|
<navigator v-if="new Date().getTime()- bargainInfo.stopTime >=0 || bargainInfo.stock === 0"
|
||||||
url="/pages/activity/goods_bargain/index" hover-class="none">
|
url="/pages/activity/goods_bargain/index" hover-class="none">
|
||||||
<view class="go">再去逛逛<text class="iconfont icon-jiantou"></text></view>
|
<view class="go">再去逛逛<text class="iconfont icon-jiantou"></text></view>
|
||||||
</navigator>
|
</navigator>
|
||||||
|
@ -202,11 +201,9 @@
|
||||||
</view>
|
</view>
|
||||||
<view class='goodsDetails borRadius14'>
|
<view class='goodsDetails borRadius14'>
|
||||||
<view class='conter borRadius14'>
|
<view class='conter borRadius14'>
|
||||||
<jyf-parser v-if="bargainInfo.content" :html="bargainInfo.content" ref="article"
|
<jyf-parser v-if="bargainInfo.description" :html="bargainInfo.description" ref="article" :tag-style="tagStyle" />
|
||||||
:tag-style="tagStyle" />
|
|
||||||
<view v-else class="contentNo">
|
<view v-else class="contentNo">
|
||||||
<text class="iconfont icon-xiaolian mr8"></text>
|
<text class="iconfont icon-xiaolian mr8" /> 暂无商品详情
|
||||||
暂无商品详情
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -258,8 +255,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='mask' catchtouchmove="true" v-show='active==true || posters==true || canvasStatus'
|
<view class='mask' catchtouchmove="true" v-show='active || posters || canvasStatus' @tap='close' />
|
||||||
@tap='close'></view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 发送给朋友图片 -->
|
<!-- 发送给朋友图片 -->
|
||||||
|
@ -302,6 +298,8 @@
|
||||||
import home from '@/components/home';
|
import home from '@/components/home';
|
||||||
import parser from "@/components/jyf-parser/jyf-parser";
|
import parser from "@/components/jyf-parser/jyf-parser";
|
||||||
import { silenceBindingSpread } from "@/utils";
|
import { silenceBindingSpread } from "@/utils";
|
||||||
|
import * as BargainApi from '@/api/promotion/bargain.js';
|
||||||
|
import * as Util from '@/utils/util.js';
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -314,41 +312,40 @@
|
||||||
*/
|
*/
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
bgColor: {
|
// ========== 拼团活动 ==========
|
||||||
'bgColor': '#333333',
|
id: 0, // 砍价商品 id
|
||||||
'Color': '#fff',
|
bargainInfo: {}, // 砍价活动
|
||||||
'width': '44rpx',
|
buyPrice: '', // 最后砍价购买价格
|
||||||
'timeTxtwidth': '16rpx',
|
bgColor: {
|
||||||
'isDay': true
|
'bgColor': '#333333',
|
||||||
},
|
'Color': '#fff',
|
||||||
countDownDay: '00',
|
'width': '44rpx',
|
||||||
countDownHour: '00',
|
'timeTxtwidth': '16rpx',
|
||||||
countDownMinute: '00',
|
'isDay': true
|
||||||
countDownSecond: '00',
|
},
|
||||||
|
|
||||||
|
// ========== 拼团记录 ==========
|
||||||
|
storeBargainId: 0, // 砍价活动 id
|
||||||
|
|
||||||
|
// TODO 芋艿:未整理
|
||||||
|
|
||||||
active: false,
|
active: false,
|
||||||
id: 0, //砍价商品id
|
|
||||||
bargainStatus: 0, //当前用户砍价状态:1-可以参与砍价,2-参与次数已满,3-砍价中,4-已完成,5-可以帮砍,6-已帮砍,7-帮砍次数已满,8-已生成订单未支付,9-已支付
|
bargainStatus: 0, //当前用户砍价状态:1-可以参与砍价,2-参与次数已满,3-砍价中,4-已完成,5-可以帮砍,6-已帮砍,7-帮砍次数已满,8-已生成订单未支付,9-已支付
|
||||||
startBargainUid: 0, //开启砍价用户uid
|
startBargainUid: 0, // 开启砍价用户 uid
|
||||||
bargainUserInfo: {}, //开启砍价用户信息
|
bargainUserInfo: {}, //开启砍价用户信息
|
||||||
//bargainUserId: 0, //开启砍价编号
|
|
||||||
storeBargainId: 0, // 砍价活动id
|
|
||||||
bargainInfo: {}, //砍价产品
|
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 5,
|
limit: 5,
|
||||||
limitStatus: false,
|
limitStatus: false,
|
||||||
bargainUserHelpList: [],
|
bargainUserHelpList: [],
|
||||||
bargainUserHelpInfo: [],
|
bargainUserHelpInfo: [],
|
||||||
bargainUserBargainPrice: 0, //砍了多少钱
|
bargainUserBargainPrice: 0, //砍了多少钱
|
||||||
bargainCount: [], //分享人数 浏览人数 参与人数
|
|
||||||
retunTop: true,
|
retunTop: true,
|
||||||
bargainPartake: 0,
|
bargainPartake: 0,
|
||||||
isHelp: false,
|
isHelp: false,
|
||||||
interval: null,
|
interval: null,
|
||||||
productStock: 0, //判断是否售罄;
|
productStock: 0, //判断是否售罄;
|
||||||
quota: 0, //判断是否已限量;
|
|
||||||
userBargainStatusHelp: true,
|
userBargainStatusHelp: true,
|
||||||
navH: '',
|
navH: '',
|
||||||
bargainPrice: 0,
|
|
||||||
datatime: 0,
|
datatime: 0,
|
||||||
offest: '',
|
offest: '',
|
||||||
tagStyle: {
|
tagStyle: {
|
||||||
|
@ -361,7 +358,6 @@
|
||||||
loading: false,
|
loading: false,
|
||||||
loadend: false,
|
loadend: false,
|
||||||
posters: false,
|
posters: false,
|
||||||
buyPrice: '', //最后砍价购买价格
|
|
||||||
qrcodeSize: 600,
|
qrcodeSize: 600,
|
||||||
posterbackgd: '/static/images/canbj.png',
|
posterbackgd: '/static/images/canbj.png',
|
||||||
PromotionCode: '', //二维码
|
PromotionCode: '', //二维码
|
||||||
|
@ -375,62 +371,102 @@
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function(options) {
|
onLoad: function(options) {
|
||||||
var that = this;
|
|
||||||
that.$store.commit("PRODUCT_TYPE", 'normal');
|
|
||||||
// #ifdef MP
|
// #ifdef MP
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: function(res) {
|
success: res => {
|
||||||
that.systemH = res.statusBarHeight
|
this.systemH = res.statusBarHeight
|
||||||
that.navH = that.systemH + 10
|
this.navH = this.systemH + 10
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// #endif
|
// #endif
|
||||||
var pages = getCurrentPages();
|
const pages = getCurrentPages();
|
||||||
if (pages.length <= 1) {
|
if (pages.length <= 1) {
|
||||||
that.retunTop = false
|
this.retunTop = false
|
||||||
}
|
}
|
||||||
//扫码携带参数处理
|
uni.setNavigationBarTitle({
|
||||||
|
title: '砍价详情'
|
||||||
|
})
|
||||||
|
|
||||||
|
// 通过 scene 解析到 id 和 startBargainUid
|
||||||
|
// 扫码携带参数处理
|
||||||
// #ifdef MP
|
// #ifdef MP
|
||||||
if (options.scene) {
|
if (options.scene) {
|
||||||
var value = util.getUrlParams(decodeURIComponent(options.scene));
|
const value = util.getUrlParams(decodeURIComponent(options.scene));
|
||||||
if (typeof value === 'object') {
|
if (typeof value === 'object') {
|
||||||
value.id ? options.id = value.id : options.id = ''
|
value.id ? options.id = value.id : options.id = ''
|
||||||
if (value.startBargainUid) options.startBargainUid = value.startBargainUid;
|
if (value.startBargainUid) {
|
||||||
//记录推广人uid
|
options.startBargainUid = value.startBargainUid;
|
||||||
if (value.pid) app.globalData.spid = value.pid;
|
}
|
||||||
|
// 记录推广人uid
|
||||||
|
if (value.pid) {
|
||||||
|
app.globalData.spid = value.pid;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
app.globalData.spid = value;
|
app.globalData.spid = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//记录推广人uid
|
// 记录推广人uid
|
||||||
if (options.spid) app.globalData.spid = options.spid;
|
if (options.spid) {
|
||||||
|
app.globalData.spid = options.spid;
|
||||||
|
}
|
||||||
// #endif
|
// #endif
|
||||||
if (options.hasOwnProperty('id')) {
|
|
||||||
options.id ? that.id = options.id : that.id = ''
|
// 获得 id、startBargainUid 参数
|
||||||
|
if (options.hasOwnProperty('id')) {
|
||||||
|
options.id ? this.id = options.id : this.id = ''
|
||||||
}
|
}
|
||||||
options.startBargainUid === 'undefined' ? that.startBargainUid = 0 : that.startBargainUid = Number(options
|
if (options.startBargainUid === 'undefined') {
|
||||||
.startBargainUid);
|
this.startBargainUid = 0
|
||||||
|
} else {
|
||||||
|
this.startBargainUid = Number(options.startBargainUid);
|
||||||
|
}
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
if (that.startBargainUid === 0) {
|
if (this.startBargainUid === 0) {
|
||||||
that.startBargainUid = Number(that.$store.state.app.uid)
|
this.startBargainUid = Number(this.$store.state.app.uid)
|
||||||
}
|
}
|
||||||
this.storeBargainId = options.storeBargainId ? Number(options.storeBargainId) : 0;
|
this.storeBargainId = options.storeBargainId ? Number(options.storeBargainId) : 0;
|
||||||
this.page = 1;
|
|
||||||
} else {
|
|
||||||
this.$Cache.set('login_back_url',
|
|
||||||
'/pages/activity/goods_bargain_details/index?id=' + options.id +
|
|
||||||
'&startBargainUid=' + this
|
|
||||||
.uid + '&spid=' + this.uid + '&storeBargainId=' + this.storeBargainId
|
|
||||||
);
|
|
||||||
toLogin();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isLogin && silenceBindingSpread();
|
// TODO 芋艿:分销逻辑
|
||||||
uni.setNavigationBarTitle({
|
if (this.isLogin) {
|
||||||
title: '砍价详情'
|
silenceBindingSpread();
|
||||||
})
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// ========== 拼团活动 ==========
|
||||||
|
/**
|
||||||
|
* 获取砍价产品详情
|
||||||
|
*/
|
||||||
|
getBargainDetails: function() {
|
||||||
|
BargainApi.getBargainActivityDetail(this.id).then(res => {
|
||||||
|
const bargainInfo = res.data;
|
||||||
|
this.bargainInfo = bargainInfo;
|
||||||
|
this.buyPrice = this.bargainInfo.price;
|
||||||
|
this.pages = '/pages/activity/goods_bargain_details/index?id=' + this.id +
|
||||||
|
'&startBargainUid=' + this.uid + '&scene=' + this.uid + '&storeBargainId=' + this.storeBargainId;
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: bargainInfo.name.substring(0, 13) + '...'
|
||||||
|
})
|
||||||
|
// 有库存,且未结束的情况下,获取当前砍价记录
|
||||||
|
if (this.isLogin && bargainInfo.stock > 0 && new Date().getTime() < bargainInfo.endTime) {
|
||||||
|
// this.gobargainUserInfo();
|
||||||
|
}
|
||||||
|
//#ifdef H5
|
||||||
|
this.getImageBase64(bargainInfo.picUrl);
|
||||||
|
//#endif
|
||||||
|
}).catch(function (err) {
|
||||||
|
console.log(err, '=====');
|
||||||
|
// this.$util.Tips({
|
||||||
|
// title: err
|
||||||
|
// }, {
|
||||||
|
// tab: 2,
|
||||||
|
// url: '/pages/activity/goods_bargain/index'
|
||||||
|
// });
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// TODO 芋艿:未整理
|
||||||
|
|
||||||
//去支付
|
//去支付
|
||||||
goConfirm() {
|
goConfirm() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -461,9 +497,7 @@
|
||||||
"onMenuShareTimeline"
|
"onMenuShareTimeline"
|
||||||
],
|
],
|
||||||
configTimeline
|
configTimeline
|
||||||
)
|
).catch(res => {
|
||||||
.then(res => {})
|
|
||||||
.catch(res => {
|
|
||||||
if (res.is_ready) {
|
if (res.is_ready) {
|
||||||
res.wx.updateAppMessageShareData(configTimeline);
|
res.wx.updateAppMessageShareData(configTimeline);
|
||||||
res.wx.updateTimelineShareData(configTimeline);
|
res.wx.updateTimelineShareData(configTimeline);
|
||||||
|
@ -480,7 +514,7 @@
|
||||||
// 去商品页
|
// 去商品页
|
||||||
goProduct() {
|
goProduct() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/goods_details/index?id=${this.bargainInfo.productId}`
|
url: `/pages/goods_details/index?id=${this.bargainInfo.spuId}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 自己砍价;
|
// 自己砍价;
|
||||||
|
@ -567,39 +601,6 @@
|
||||||
}]);
|
}]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//获取砍价产品详情
|
|
||||||
getBargainDetails: function() {
|
|
||||||
var that = this;
|
|
||||||
getBargainDetail(that.id).then(function(res) {
|
|
||||||
let bargainInfo = res.data;
|
|
||||||
that.bargainInfo = bargainInfo;
|
|
||||||
that.bargainPrice = bargainInfo.price;
|
|
||||||
that.quota = bargainInfo.quota;
|
|
||||||
that.datatime = bargainInfo.stopTime / 1000;
|
|
||||||
that.pages = '/pages/activity/goods_bargain_details/index?id=' + that.id +
|
|
||||||
'&startBargainUid=' + that
|
|
||||||
.uid + '&scene=' + that.uid + '&storeBargainId=' + that.storeBargainId;
|
|
||||||
uni.setNavigationBarTitle({
|
|
||||||
title: bargainInfo.title.substring(0, 13) + '...'
|
|
||||||
})
|
|
||||||
that.bargainUserHelpList = []
|
|
||||||
if (that.isLogin && that.quota > 0 && new Date().getTime() - bargainInfo.stopTime < 0) {
|
|
||||||
that.gobargainUserInfo();
|
|
||||||
} else {
|
|
||||||
that.buyPrice = that.bargainPrice;
|
|
||||||
}
|
|
||||||
//#ifdef H5
|
|
||||||
that.getImageBase64(bargainInfo.image);
|
|
||||||
//#endif
|
|
||||||
}).catch(function(err) {
|
|
||||||
that.$util.Tips({
|
|
||||||
title: err
|
|
||||||
}, {
|
|
||||||
tab: 2,
|
|
||||||
url: '/pages/activity/goods_bargain/index'
|
|
||||||
});
|
|
||||||
})
|
|
||||||
},
|
|
||||||
currentBargainUser: function() { //当前用户砍价
|
currentBargainUser: function() { //当前用户砍价
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -696,7 +697,11 @@
|
||||||
this.$set(this, 'active', false);
|
this.$set(this, 'active', false);
|
||||||
this.$set(this, 'posters', false);
|
this.$set(this, 'posters', false);
|
||||||
this.$set(this, 'canvasStatus', false);
|
this.$set(this, 'canvasStatus', false);
|
||||||
}
|
},
|
||||||
|
|
||||||
|
fen2yuan(price) {
|
||||||
|
return Util.fen2yuan(price)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
|
|
|
@ -75,7 +75,6 @@
|
||||||
import * as BannerApi from '@/api/promotion/banner.js';
|
import * as BannerApi from '@/api/promotion/banner.js';
|
||||||
import * as Util from '@/utils/util.js';
|
import * as Util from '@/utils/util.js';
|
||||||
import home from '@/components/home/index.vue'
|
import home from '@/components/home/index.vue'
|
||||||
import {getCombinationRecordSummary} from "../../../api/promotion/combination";
|
|
||||||
let app = getApp();
|
let app = getApp();
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
Loading…
Reference in New Issue