From 8d6ee03d88fd67df4736be141f7cc777ff2b44a8 Mon Sep 17 00:00:00 2001 From: mabo Date: Mon, 2 Aug 2021 18:13:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=B1=95=E7=A4=BA=E7=A7=92?= =?UTF-8?q?=E6=9D=80=E5=95=86=E5=93=81=EF=BC=8C=E6=A5=BC=E5=B1=82=E8=A3=85?= =?UTF-8?q?=E4=BF=AE=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/package.json | 1 + buyer/src/components/Search.vue | 11 +- .../indexDecorate/ModelFormItem.vue | 8 +- .../indexDecorate/modelFormItem.vue | 8 +- .../indexDecorate/modelList/Seckill.vue | 301 ++++++++--- .../indexDecorate/modelList/seckill.vue | 301 ++++++++--- buyer/src/pages/Index.vue | 18 + buyer/src/pages/payment/PayDone.vue | 8 +- buyer/src/pages/promotion/seckill.vue | 4 + buyer/yarn.lock | 33 ++ .../lili-floor-renovation/modelFormItem.vue | 2 +- .../modelList/seckill.vue | 511 +++++++++--------- 12 files changed, 777 insertions(+), 429 deletions(-) diff --git a/buyer/package.json b/buyer/package.json index 2f20c8d4..010633f1 100644 --- a/buyer/package.json +++ b/buyer/package.json @@ -68,6 +68,7 @@ "shelljs": "^0.7.6", "uglifyjs-webpack-plugin": "^1.1.1", "url-loader": "^0.5.8", + "vue-awesome-swiper": "^3.1.3", "vue-loader": "^13.3.0", "vue-style-loader": "^3.0.1", "vue-template-compiler": "^2.5.2", diff --git a/buyer/src/components/Search.vue b/buyer/src/components/Search.vue index 3ddcd784..d82ef8cc 100644 --- a/buyer/src/components/Search.vue +++ b/buyer/src/components/Search.vue @@ -62,7 +62,7 @@ export default { }, data () { return { - searchData: '', // 搜索内容 + searchData: '' // 搜索内容 }; }, methods: { @@ -80,7 +80,7 @@ export default { this.$emit('search', this.searchData) } }, - computed:{ + computed: { promotionTags () { return JSON.parse(this.$store.state.hotWordsList) } @@ -90,19 +90,18 @@ export default { if (!this.hover) { // 首页顶部固定搜索栏不调用热词接口 // 搜索热词每一小时请求一次 const reloadTime = storage.getItem('hotWordsReloadTime') - const time = new Date().getTime() - 60*60*1000 + const time = new Date().getTime() - 5 * 60 * 1000 if (!reloadTime) { hotWords({count: 5}).then(res => { if (res.success) storage.setItem('hotWordsList', res.result) }) - storage.setItem('hotWordsReloadTime',new Date().getTime()) + storage.setItem('hotWordsReloadTime', new Date().getTime()) } else if (reloadTime && time > reloadTime) { hotWords({count: 5}).then(res => { if (res.success) storage.setItem('hotWordsList', res.result) }) - storage.setItem('hotWordsReloadTime',new Date().getTime()) + storage.setItem('hotWordsReloadTime', new Date().getTime()) } - } } }; diff --git a/buyer/src/components/indexDecorate/ModelFormItem.vue b/buyer/src/components/indexDecorate/ModelFormItem.vue index c854011b..2330e581 100644 --- a/buyer/src/components/indexDecorate/ModelFormItem.vue +++ b/buyer/src/components/indexDecorate/ModelFormItem.vue @@ -30,14 +30,14 @@ - + - + @@ -23,7 +26,6 @@ export default { margin: 100px; display: flex; flex-direction: column; - justify-content: center; align-items: center; } .pay-btn{ diff --git a/buyer/src/pages/promotion/seckill.vue b/buyer/src/pages/promotion/seckill.vue index 46b21558..bdcc7d82 100644 --- a/buyer/src/pages/promotion/seckill.vue +++ b/buyer/src/pages/promotion/seckill.vue @@ -68,6 +68,10 @@ export default { nowHour: new Date().getHours() // 当前小时数 } }, + beforeDestroy () { + // 销毁前清除定时器 + clearInterval(this.interval); + }, watch: { currIndex (val) { clearInterval(this.interval) diff --git a/buyer/yarn.lock b/buyer/yarn.lock index 9f463fb0..924202e2 100644 --- a/buyer/yarn.lock +++ b/buyer/yarn.lock @@ -2724,6 +2724,13 @@ "domelementtype" "^2.0.1" "entities" "^2.0.0" +"dom7@^2.1.3": + "integrity" "sha512-xnhwVgyOh3eD++/XGtH+5qBwYTgCm0aW91GFgPJ3XG+jlsRLyJivnbP0QmUBFhI+Oaz9FV0s7cxgXHezwOEBYA==" + "resolved" "https://registry.npmjs.org/dom7/-/dom7-2.1.5.tgz" + "version" "2.1.5" + dependencies: + "ssr-window" "^2.0.0" + "domain-browser@^1.1.1": "integrity" "sha1-PTH1AZGmdJ3RN1p/Ui6CPULlTto=" "resolved" "https://registry.npm.taobao.org/domain-browser/download/domain-browser-1.2.0.tgz?cache=0&sync_timestamp=1604239910191&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdomain-browser%2Fdownload%2Fdomain-browser-1.2.0.tgz" @@ -7728,6 +7735,16 @@ "safer-buffer" "^2.0.2" "tweetnacl" "~0.14.0" +"ssr-window@^1.0.1": + "integrity" "sha512-dgFqB+f00LJTEgb6UXhx0h+SrG50LJvti2yMKMqAgzfUmUXZrLSv2fjULF7AWGwK25EXu8+smLR3jYsJQChPsg==" + "resolved" "https://registry.npmjs.org/ssr-window/-/ssr-window-1.0.1.tgz" + "version" "1.0.1" + +"ssr-window@^2.0.0": + "integrity" "sha512-NXzN+/HPObKAx191H3zKlYomE5WrVIkoCB5IaSdvKokxTpjBdWfr0RaP+1Z5KOfDT0ZVz+2tdtiBkhsEQ9p+0A==" + "resolved" "https://registry.npmjs.org/ssr-window/-/ssr-window-2.0.0.tgz" + "version" "2.0.0" + "ssri@^5.2.4": "integrity" "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==" "resolved" "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz" @@ -7991,6 +8008,14 @@ "unquote" "~1.1.1" "util.promisify" "~1.0.0" +"swiper@^4.0.7": + "integrity" "sha512-se6I7PWWu950NAMXXT+ENtF/6SVb8mPyO+bTfNxbQBILSeLqsYp3Ndap+YOA0EczOIUlea274PKejT6gKZDseA==" + "resolved" "https://registry.npmjs.org/swiper/-/swiper-4.5.1.tgz" + "version" "4.5.1" + dependencies: + "dom7" "^2.1.3" + "ssr-window" "^1.0.1" + "table@4.0.2": "integrity" "sha1-ozRHN1OR52atNNNIbm4q7chNLjY= sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==" "resolved" "https://registry.npm.taobao.org/table/download/table-4.0.2.tgz" @@ -8487,6 +8512,14 @@ "resolved" "https://registry.npm.taobao.org/vm-browserify/download/vm-browserify-1.1.2.tgz" "version" "1.1.2" +"vue-awesome-swiper@^3.1.3": + "integrity" "sha512-E7suzkyApO8vNZbgdEnjSmnpsmQZyRvSVXJ7sey3XYwKPOkLhH3+GnHroBw+5PZIQXvWBwdCeQsPG1xQ1r1Rhg==" + "resolved" "https://registry.npmjs.org/vue-awesome-swiper/-/vue-awesome-swiper-3.1.3.tgz" + "version" "3.1.3" + dependencies: + "object-assign" "^4.1.1" + "swiper" "^4.0.7" + "vue-eslint-parser@^2.0.3": "integrity" "sha1-wmjJbG2Uz+PZOKX3WTlZsMozYNE= sha512-ZezcU71Owm84xVF6gfurBQUGg8WQ+WZGxgDEQu1IHFBZNx7BFZg3L1yHxrCBNNwbwFtE1GuvfJKMtb6Xuwc/Bw==" "resolved" "https://registry.npm.taobao.org/vue-eslint-parser/download/vue-eslint-parser-2.0.3.tgz?cache=0&sync_timestamp=1608030990315&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-eslint-parser%2Fdownload%2Fvue-eslint-parser-2.0.3.tgz" diff --git a/manager/src/views/lili-floor-renovation/modelFormItem.vue b/manager/src/views/lili-floor-renovation/modelFormItem.vue index ec19150b..fc47c4a6 100644 --- a/manager/src/views/lili-floor-renovation/modelFormItem.vue +++ b/manager/src/views/lili-floor-renovation/modelFormItem.vue @@ -35,7 +35,7 @@