From 3725ca00056b904de139c16f1ad9c26ab3c878de Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Sun, 15 Oct 2023 11:40:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/login/register.vue | 6 +++++- pages/machine/machineToCharge.vue | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pages/login/register.vue b/pages/login/register.vue index 3a3fed1..7ef6113 100644 --- a/pages/login/register.vue +++ b/pages/login/register.vue @@ -126,12 +126,16 @@ } }, _doRegister: function(e) { + let _communityId = un.getStorageSync("DEFAULT_COMMUNITY_ID") + if(!_communityId){ + _communityId = conf.DEFAULT_COMMUNITY_ID; + } let obj = { "link": this.link, "msgCode": this.msgCode, "password": this.password, "openId": uni.getStorageSync(constant.mapping.CURRENT_OPEN_ID), - "defaultCommunityId": conf.DEFAULT_COMMUNITY_ID + "defaultCommunityId": _communityId } if(!this.readme){ wx.showToast({ diff --git a/pages/machine/machineToCharge.vue b/pages/machine/machineToCharge.vue index ec30d20..8d61664 100644 --- a/pages/machine/machineToCharge.vue +++ b/pages/machine/machineToCharge.vue @@ -197,6 +197,9 @@ this.couponCount = chargeCoupons.length; }, _toLogin:function(){ + if(this.communityId){ + uni.setStorageSync("DEFAULT_COMMUNITY_ID",this.communityId); + } uni.navigateTo({ url: '/pages/login/login' })