From c57d8e0ace61601292c0e4efe7d7d21e27ac00e7 Mon Sep 17 00:00:00 2001 From: shuiqing Date: Fri, 20 Jul 2018 18:39:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/at_present/at_present.js | 19 ++++++++++++++----- pages/at_present/at_present.wxml | 10 ++++------ pages/city/city.js | 3 ++- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/pages/at_present/at_present.js b/pages/at_present/at_present.js index d7a9469..b4bfea2 100644 --- a/pages/at_present/at_present.js +++ b/pages/at_present/at_present.js @@ -12,13 +12,13 @@ var qqmapsdk; Page({ data: { resData: [], - showOrHidden: false, - showorHide: false, + showOrHidden: true, city: '', district: '', cityId: '', districtId: '', merchantNo: '', + // groupNo: "", }, onLoad: function(options) { // let that = this;  @@ -26,6 +26,9 @@ Page({ key: 'C5KBZ-RISKD-INW4P-PWYQJ-QC6C7-BQBGC' //正式的上线 key: 'JN7BZ-MJBK5-52SIH-QOKGH-FJE5F-IWFGG' }); + // this.setData({ + // groupNo: options.groupNo == undefined ? "" : options.groupNo, + // }); }, onReady: function() { var that = this; @@ -49,7 +52,8 @@ Page({ }, header: { 'Content-Type': 'application/x-www-form-urlencoded' - }, + }, + success: function(res) { // 打印对应想得到的数据 var cityId = res.data.response[0].cityId; @@ -79,14 +83,15 @@ Page({ }); wx.setStorage({ key: 'merchantNo', - data: merchantNo, + data: merchantNo, }); } }); }, fail: function(res) { - showorHide: false, + console.log(res.data) + showorHide: false, wx.showToast({ title: '加载数据失败', }); @@ -97,6 +102,10 @@ Page({ wx.getSetting({ }) + }, + openGroups: function (e) { + + }, openGroup:function(e){ wx.navigateTo({ diff --git a/pages/at_present/at_present.wxml b/pages/at_present/at_present.wxml index 5cca0a3..9980a63 100644 --- a/pages/at_present/at_present.wxml +++ b/pages/at_present/at_present.wxml @@ -2,16 +2,14 @@ 当前定位地址: - {{city}}{{district}} + {{city}}{{district}} - {{lists}} - 手动切换地址 - - + + 手动切换地址 + 确定 切换 - \ No newline at end of file diff --git a/pages/city/city.js b/pages/city/city.js index a1d4c22..d7d86b1 100644 --- a/pages/city/city.js +++ b/pages/city/city.js @@ -3,6 +3,7 @@ const app = getApp() Page({ onLoad: function (options) { + var that = this // 商家编号 wx.getStorage({ key: 'cityName', @@ -21,7 +22,6 @@ Page({ }) } }); - var that = this wx.request({ url: app.gw.hostUrl + '/mall/wxa/index/opencitylist', data: { cityName: 'cityName' }, @@ -31,6 +31,7 @@ Page({ }, success: function (res) { var citys = res.data; + console.log(citys) that.setData({ citys });