diff --git a/package-lock.json b/package-lock.json index 828e5bf..4acba4f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,21 @@ "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": { "version": "3.7.2", "resolved": "https://registry.npm.taobao.org/animate.css/download/animate.css-3.7.2.tgz", @@ -392,6 +407,12 @@ "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": { "version": "1.2.6", "resolved": "https://registry.npm.taobao.org/vue-ydui/download/vue-ydui-1.2.6.tgz", diff --git a/package.json b/package.json index 4dc3c88..8b20679 100644 --- a/package.json +++ b/package.json @@ -17,5 +17,9 @@ "miniapp-color-thief": "^1.0.5", "vue-ydui": "^1.2.6", "wechat-jssdk": "^5.0.4" + }, + "devDependencies": { + "@types/html5plus": "^1.0.1", + "@types/uni-app": "^1.4.3" } } diff --git a/pages/activity/GoodsSeckill/index.vue b/pages/activity/GoodsSeckill/index.vue index 7a2229b..9dc0081 100644 --- a/pages/activity/GoodsSeckill/index.vue +++ b/pages/activity/GoodsSeckill/index.vue @@ -46,9 +46,10 @@ 马上抢 + @click="goDetail(itemSeckill.id,item.status)">马上抢 已售磬 - 即将开始 + 即将开始 + 已结束 @@ -175,14 +176,15 @@ uni.hideLoading(); }); }, - goDetail: function (id) { + goDetail: function (id, status) { var that = this; var time = that.timeList[that.active].stop; this.$yrouter.push({ path: "/pages/activity/SeckillDetails/index", query: { id, - time + time, + status } }); } diff --git a/pages/activity/SeckillDetails/index.vue b/pages/activity/SeckillDetails/index.vue index 2ca96a4..6332601 100644 --- a/pages/activity/SeckillDetails/index.vue +++ b/pages/activity/SeckillDetails/index.vue @@ -58,7 +58,11 @@ 收藏 - + 单独购买 @@ -66,6 +70,24 @@ 立即购买 + +
+
原价购买
+
已售罄
+
+
+
原价购买
+
即将开始
+
+
+
原价购买
+
已结束
+
+ @@ -112,6 +134,7 @@ props: {}, data: function () { return { + seckillStatus: '', domStatus: false, posterData: { image: "", @@ -138,23 +161,15 @@ userCollect: false }; }, - watch: { - $yroute: function (n) { - var that = this; - if (n.name === NAME) { - that.mountedStart(); - } - } - }, - mounted: function () { + onShow: function () { this.mountedStart(); }, methods: { - onShareAppMessage: function() { + onShareAppMessage: function () { return { title: this.storeInfo.title, 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) { uni.showToast({ title: '分享成功' @@ -199,7 +214,9 @@ }, mountedStart: function () { var that = this; + console.log(this) let id = that.$yroute.query.id; + this.seckillStatus = that.$yroute.query.status; that.datatime = parseInt(that.$yroute.query.time); getSeckillDetail(id).then(res => { that.userCollect = res.data.userCollect;