From 12d11817eeb239921e36020f95f8b3a0f4872b91 Mon Sep 17 00:00:00 2001 From: shuiqing Date: Fri, 20 Jul 2018 18:53:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/at_present/at_present.js | 45 ++++++-------------------------- pages/at_present/at_present.wxml | 2 +- pages/city/city.js | 4 --- 3 files changed, 9 insertions(+), 42 deletions(-) diff --git a/pages/at_present/at_present.js b/pages/at_present/at_present.js index b6cdd37..9ff7347 100644 --- a/pages/at_present/at_present.js +++ b/pages/at_present/at_present.js @@ -55,39 +55,7 @@ Page({ }, success: function(res) { -<<<<<<< HEAD - // 打印对应想得到的数据 - var cityId = res.data.response[0].cityId; - var cityName = res.data.response[0].cityName; - var districtId = res.data.response[0].districtId; - var districtName = res.data.response[0].districtName; - var merchantNo = res.data.response[0].merchantNo; - var lists = res.data.msg - that.setData({ - lists - }); - wx.setStorage({ - key: 'cityId', - data: cityId, - }); - wx.setStorage({ - key: 'cityName', - data: cityName, - }); - wx.setStorage({ - key: 'districtId', - data: districtId, - }); - wx.setStorage({ - key: 'districtName', - data: districtName, - }); - wx.setStorage({ - key: 'merchantNo', - data: merchantNo, - }); -======= - if (res.code== 0){ + if (res.data.code== 0){ // 打印对应想得到的数据 var cityId = res.data.response[0].cityId; var cityName = res.data.response[0].cityName; @@ -119,16 +87,19 @@ Page({ data: merchantNo, }); }else{ - showorHide: false; + that.setData({ + showOrHidden: false + }); + } ->>>>>>> 4ec3090552fa1d2d848a27c00f116a54ddd8adb7 } }); }, fail: function(res) { - console.log(res.data) - showorHide: false, + that.setData({ + showOrHidden: false + }); wx.showToast({ title: '加载数据失败', }); diff --git a/pages/at_present/at_present.wxml b/pages/at_present/at_present.wxml index 9980a63..8202273 100644 --- a/pages/at_present/at_present.wxml +++ b/pages/at_present/at_present.wxml @@ -4,7 +4,7 @@ {{city}}{{district}} - {{lists}} + {{lists}} 手动切换地址 diff --git a/pages/city/city.js b/pages/city/city.js index dfcfddb..81f08ca 100644 --- a/pages/city/city.js +++ b/pages/city/city.js @@ -26,10 +26,6 @@ Page({ }) } }); -<<<<<<< HEAD -======= - ->>>>>>> 4ec3090552fa1d2d848a27c00f116a54ddd8adb7 wx.request({ url: app.gw.hostUrl + '/mall/wxa/index/opencitylist', data: { cityName: 'cityName' },