From 973bd96b867a3f3e289c1d7eb8452431ced44c9c Mon Sep 17 00:00:00 2001 From: Gao xiaosong <704041637@qq.com> Date: Sun, 13 Sep 2020 02:07:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=92=E6=9D=80=E8=AF=A6=E6=83=85=E5=8D=B3?= =?UTF-8?q?=E5=B0=86=E5=BC=80=E5=A7=8B=E7=82=B9=E8=BF=9B=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=AF=B9=EF=BC=8C=E9=A6=96=E5=85=88?= =?UTF-8?q?=E7=AB=8B=E5=88=BB=E8=B4=AD=E4=B9=B0=E6=96=87=E5=AD=97=E5=9B=A0?= =?UTF-8?q?=E8=AF=A5=E6=98=AF=E5=8D=B3=E5=B0=86=E5=BC=80=E5=A7=8B=E4=B8=94?= =?UTF-8?q?=E7=81=B0=E8=89=B2=E6=8C=89=E9=92=AE=E4=B8=8D=E8=83=BD=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E4=B8=8B=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 21 +++++++++++++ package.json | 4 +++ pages/activity/GoodsSeckill/index.vue | 10 +++--- pages/activity/SeckillDetails/index.vue | 41 +++++++++++++++++-------- 4 files changed, 60 insertions(+), 16 deletions(-) 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;