From 3c09170a0434d722d88028bf41114f547c1e09d3 Mon Sep 17 00:00:00 2001 From: fengchengzhi Date: Fri, 21 Sep 2018 05:23:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=20url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/poster.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/view/poster.vue b/src/view/poster.vue index 95d5994..0ac32fd 100644 --- a/src/view/poster.vue +++ b/src/view/poster.vue @@ -257,7 +257,9 @@ var coupon = this.getParam("no") var sourceType = this.sourceType var merchantNo = this.getParam("merchantNo") - var urls = encodeURIComponent(location.href) + var urls = location.href.toString(); + var arrUrl = urls.split("?"); + var urls = encodeURIComponent(arrUrl[0]) var imgUrl = encodeURIComponent(this.imgUrl) if ( sourceType == 2 ){ //指定优惠券 this.wxShare({"couponNo":coupon,"source":10,"url":urls,"imgUrl":imgUrl}) @@ -272,7 +274,8 @@ } }, mounted() { - this.getNo() + + this.getNo() } };