From 861e97b7756a7666a2d1278cbeaec2d0fc902e6b Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Thu, 19 Sep 2024 14:33:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=97=E9=93=BA=E6=94=B6=E6=AC=BE=E7=A0=81?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagesQueueUp/index/index.vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pagesQueueUp/index/index.vue b/pagesQueueUp/index/index.vue index 7c803be..822ef1e 100644 --- a/pagesQueueUp/index/index.vue +++ b/pagesQueueUp/index/index.vue @@ -130,9 +130,10 @@ }; }, onLoad(options) { - if (options.shopId) { - this.shopId = options.shopId; + if (options.q) { + this.shopId = this.getQueryString(decodeURIComponent(options.q), 'shopId') } + }, onShow() { this.getQueueUpState(); @@ -144,6 +145,19 @@ }, methods: { + /** + * 解码 + * @param {Object} url + * @param {Object} name + */ + getQueryString(url, name) { + var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i') + var r = url.substr(1).match(reg) + if (r != null) { + return r[2] + } + return null; + }, /** * 获取排号状态