From dc636e30b785c89a408ae40fb73844dfe1eae5f8 Mon Sep 17 00:00:00 2001 From: ghusermoon <2673031505@qq.com> Date: Wed, 19 Aug 2020 16:59:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=BF=E5=91=8A=E4=BD=8D=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 37 +++++++++++------------------------ pages/shop/index.vue | 45 +++++++++---------------------------------- static/js/common.js | 26 ++++++++++++++++++++++++- 3 files changed, 45 insertions(+), 63 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index c495dba..9062aa8 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -221,6 +221,7 @@ diff --git a/pages/shop/index.vue b/pages/shop/index.vue index ce506a1..0058543 100644 --- a/pages/shop/index.vue +++ b/pages/shop/index.vue @@ -46,7 +46,7 @@ - + @@ -61,6 +61,7 @@ diff --git a/static/js/common.js b/static/js/common.js index 9f036ed..49a9f48 100644 --- a/static/js/common.js +++ b/static/js/common.js @@ -67,5 +67,29 @@ const common = { else result = hours + ':' + minutes + ':' + seconds; return result; }, + /** + * 广告位跳转 + * @param { String } type 跳转类型 + * @param { String | Number } id 跳转id 商品id/商家id... + * @return { undefined } undefined + */ + jumpPage({ type, id }) { + let url; + switch (type) { + case 1: + url = '/pageB/sdetails/index?id=' + id; + break; + case 2: + url = '/pageC/merchant/index?id=' + id; + break; + case 3: + url = '/pageE/tool/MineCoupon' + break; + default: + break; + } + // console.log(url); + uni.navigateTo({ url: url }); + }, } -export default common \ No newline at end of file +export default common; \ No newline at end of file