diff --git a/pages.json b/pages.json index 9e85d8a..00b2c9e 100644 --- a/pages.json +++ b/pages.json @@ -9,6 +9,12 @@ "navigationStyle": "custom", "enablePullDownRefresh": false } + }, { + "path": "pages/register/register", + "style": { + "navigationBarTitleText": "注册", + "enablePullDownRefresh": false + } }, { "path": "pages/message/message", "style": { @@ -28,12 +34,6 @@ "enablePullDownRefresh": false, "navigationStyle": "custom" } - }, { - "path": "pages/register/register", - "style": { - "navigationBarTitleText": "注册", - "enablePullDownRefresh": false - } }, { "path": "pages/medicalservice/medicalservice", "style": { diff --git a/pages/login/login.vue b/pages/login/login.vue index 7bab419..b6f7309 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -70,7 +70,7 @@ }; }, onShow() { - if (uni.getStorageSync('location') && uni.getStorageSync('region')) {} else { + if (!uni.getStorageSync('location') || !uni.getStorageSync('region')) { this.getAddress() } this.phonecode = undefined @@ -120,11 +120,7 @@ }, method: "GET", success(res) { - if (uni.getStorageSync('location')) { - uni.setStorageSync('location', res.data.result.address_component - .city) - var address = uni.getStorageSync('location') - } + var address = res.data.result.address_component.city if (address == '德州市') { uni.setStorageSync("region", 1) } else if (address == '东营市') { @@ -132,6 +128,8 @@ } else if (address == '济南市') { uni.setStorageSync("region", 3) } + uni.setStorageSync('location', res.data.result.address_component + .city) }, fail: res => { console.log(res.errMsg, '解析失败返回的错误信息'); diff --git a/pages/register/register.vue b/pages/register/register.vue index 93811b8..c18affc 100644 --- a/pages/register/register.vue +++ b/pages/register/register.vue @@ -7,10 +7,18 @@ + 身份证号 + + + 姓名 + 手机号 + + + 性别 @@ -30,14 +38,6 @@ - 手机号 - - - - 身份证号 - - - 户主身份证号 @@ -64,12 +64,6 @@ - 所在位置 @@ -125,7 +119,7 @@ + @funcValue="getpickerParentValue" pickerSize="3"> @@ -134,6 +128,9 @@