秒杀详情即将开始点进详情显示不对,首先立刻购买文字因该是即将开始且灰色按钮不能点击下单
This commit is contained in:
21
package-lock.json
generated
21
package-lock.json
generated
@ -17,6 +17,21 @@
|
|||||||
"defer-to-connect": "^1.0.1"
|
"defer-to-connect": "^1.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@types/html5plus": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npm.taobao.org/@types/html5plus/download/@types/html5plus-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-EjFll+Qvb4fLJbnJOGD1fNObOQY=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@types/uni-app": {
|
||||||
|
"version": "1.4.3",
|
||||||
|
"resolved": "https://registry.npm.taobao.org/@types/uni-app/download/@types/uni-app-1.4.3.tgz",
|
||||||
|
"integrity": "sha1-JRwBK9JAi2m/UB/g3I92rbOwV2w=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"vue": "^2.6.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"animate.css": {
|
"animate.css": {
|
||||||
"version": "3.7.2",
|
"version": "3.7.2",
|
||||||
"resolved": "https://registry.npm.taobao.org/animate.css/download/animate.css-3.7.2.tgz",
|
"resolved": "https://registry.npm.taobao.org/animate.css/download/animate.css-3.7.2.tgz",
|
||||||
@ -392,6 +407,12 @@
|
|||||||
"prepend-http": "^2.0.0"
|
"prepend-http": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"vue": {
|
||||||
|
"version": "2.6.12",
|
||||||
|
"resolved": "https://registry.npm.taobao.org/vue/download/vue-2.6.12.tgz",
|
||||||
|
"integrity": "sha1-9evU+mvShpQD4pqJau1JBEVskSM=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"vue-ydui": {
|
"vue-ydui": {
|
||||||
"version": "1.2.6",
|
"version": "1.2.6",
|
||||||
"resolved": "https://registry.npm.taobao.org/vue-ydui/download/vue-ydui-1.2.6.tgz",
|
"resolved": "https://registry.npm.taobao.org/vue-ydui/download/vue-ydui-1.2.6.tgz",
|
||||||
|
@ -17,5 +17,9 @@
|
|||||||
"miniapp-color-thief": "^1.0.5",
|
"miniapp-color-thief": "^1.0.5",
|
||||||
"vue-ydui": "^1.2.6",
|
"vue-ydui": "^1.2.6",
|
||||||
"wechat-jssdk": "^5.0.4"
|
"wechat-jssdk": "^5.0.4"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/html5plus": "^1.0.1",
|
||||||
|
"@types/uni-app": "^1.4.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,9 +46,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="grab bg-color-red" v-if="item.status === 1 && itemSeckill.stock > 0"
|
<view class="grab bg-color-red" v-if="item.status === 1 && itemSeckill.stock > 0"
|
||||||
@click="goDetail(itemSeckill.id)">马上抢</view>
|
@click="goDetail(itemSeckill.id,item.status)">马上抢</view>
|
||||||
<view class="grab" v-if="item.status === 1 && itemSeckill.stock <= 0">已售磬</view>
|
<view class="grab" v-if="item.status === 1 && itemSeckill.stock <= 0">已售磬</view>
|
||||||
<view class="grab bg-color-red" @click="goDetail(itemSeckill.id)" v-if="item.status === 2">即将开始</view>
|
<view class="grab bg-color-red" @click="goDetail(itemSeckill.id,item.status)" v-if="item.status === 2">即将开始
|
||||||
|
</view>
|
||||||
<view class="grab bg-color-red" v-if="item.status === 0">已结束</view>
|
<view class="grab bg-color-red" v-if="item.status === 0">已结束</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -175,14 +176,15 @@
|
|||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
goDetail: function (id) {
|
goDetail: function (id, status) {
|
||||||
var that = this;
|
var that = this;
|
||||||
var time = that.timeList[that.active].stop;
|
var time = that.timeList[that.active].stop;
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
path: "/pages/activity/SeckillDetails/index",
|
path: "/pages/activity/SeckillDetails/index",
|
||||||
query: {
|
query: {
|
||||||
id,
|
id,
|
||||||
time
|
time,
|
||||||
|
status
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,11 @@
|
|||||||
<view class="iconfont icon-shoucang"></view>
|
<view class="iconfont icon-shoucang"></view>
|
||||||
<text>收藏</text>
|
<text>收藏</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="bnt acea-row">
|
<view class="bnt acea-row" v-if="
|
||||||
|
seckillStatus == 1 &&
|
||||||
|
storeInfo.num > 0 &&
|
||||||
|
storeInfo.stock > 0
|
||||||
|
">
|
||||||
<view class="joinCart" @click="openAlone">
|
<view class="joinCart" @click="openAlone">
|
||||||
<text>单独购买</text>
|
<text>单独购买</text>
|
||||||
</view>
|
</view>
|
||||||
@ -66,6 +70,24 @@
|
|||||||
<text>立即购买</text>
|
<text>立即购买</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<div class="bnt acea-row" v-if="
|
||||||
|
seckillStatus == 1 &&
|
||||||
|
storeInfo.num <= 0 &&
|
||||||
|
storeInfo.stock <= 0
|
||||||
|
">
|
||||||
|
<div class="joinCart" @click="openAlone">原价购买</div>
|
||||||
|
<div class="buy bg-color-hui">已售罄</div>
|
||||||
|
</div>
|
||||||
|
<div class="bnt acea-row" v-if="seckillStatus == 2">
|
||||||
|
<div class="joinCart" @click="openAlone">原价购买</div>
|
||||||
|
<div class="buy bg-color-hui">即将开始</div>
|
||||||
|
</div>
|
||||||
|
<div class="bnt acea-row" v-if="seckillStatus == 0">
|
||||||
|
<div class="joinCart" @click="openAlone">原价购买</div>
|
||||||
|
<div class="buy bg-color-hui">已结束</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow>
|
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow>
|
||||||
@ -112,6 +134,7 @@
|
|||||||
props: {},
|
props: {},
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
|
seckillStatus: '',
|
||||||
domStatus: false,
|
domStatus: false,
|
||||||
posterData: {
|
posterData: {
|
||||||
image: "",
|
image: "",
|
||||||
@ -138,23 +161,15 @@
|
|||||||
userCollect: false
|
userCollect: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
onShow: function () {
|
||||||
$yroute: function (n) {
|
|
||||||
var that = this;
|
|
||||||
if (n.name === NAME) {
|
|
||||||
that.mountedStart();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted: function () {
|
|
||||||
this.mountedStart();
|
this.mountedStart();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onShareAppMessage: function() {
|
onShareAppMessage: function () {
|
||||||
return {
|
return {
|
||||||
title: this.storeInfo.title,
|
title: this.storeInfo.title,
|
||||||
imageUrl: this.storeInfo.image,
|
imageUrl: this.storeInfo.image,
|
||||||
path: "pages/activity/GoodsSeckill/index?id="+this.storeInfo.id+"&spread=" + uni.getStorageSync("uid"),
|
path: "pages/activity/GoodsSeckill/index?id=" + this.storeInfo.id + "&spread=" + uni.getStorageSync("uid"),
|
||||||
success(res) {
|
success(res) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '分享成功'
|
title: '分享成功'
|
||||||
@ -199,7 +214,9 @@
|
|||||||
},
|
},
|
||||||
mountedStart: function () {
|
mountedStart: function () {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
console.log(this)
|
||||||
let id = that.$yroute.query.id;
|
let id = that.$yroute.query.id;
|
||||||
|
this.seckillStatus = that.$yroute.query.status;
|
||||||
that.datatime = parseInt(that.$yroute.query.time);
|
that.datatime = parseInt(that.$yroute.query.time);
|
||||||
getSeckillDetail(id).then(res => {
|
getSeckillDetail(id).then(res => {
|
||||||
that.userCollect = res.data.userCollect;
|
that.userCollect = res.data.userCollect;
|
||||||
|
Reference in New Issue
Block a user