From 18b812e402aaf5e77343ea34daa147b2c9f6d900 Mon Sep 17 00:00:00 2001 From: lfs3 Date: Fri, 20 Jul 2018 11:12:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=AD=A3=E5=BC=8Fv1.0.3=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 4 ++-- pages/at_present/at_present.js | 3 ++- project.config.json | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index ffdab7f..c2d7ab9 100644 --- a/app.js +++ b/app.js @@ -1,8 +1,8 @@ //app.js App({ gw: { - // hostUrl: 'https://www.1hjz.cn', - hostUrl: 'https://test.1hjz.cn/', + hostUrl: 'https://www.1hjz.cn', + //hostUrl: 'https://test.1hjz.cn/', mapUrl:'https://api.map.baidu.com', systemInfo : null,//系统信息 }, diff --git a/pages/at_present/at_present.js b/pages/at_present/at_present.js index b2ee2e0..0bdf0a3 100644 --- a/pages/at_present/at_present.js +++ b/pages/at_present/at_present.js @@ -23,7 +23,8 @@ Page({ onLoad: function(options) { // let that = this;  qqmapsdk = new QQMapWX({ - key: 'C5KBZ-RISKD-INW4P-PWYQJ-QC6C7-BQBGC' + // key: 'C5KBZ-RISKD-INW4P-PWYQJ-QC6C7-BQBGC'//测试 + key: 'JN7BZ-MJBK5-52SIH-QOKGH-FJE5F-IWFGG'//正式 }); }, //  onShow: function () { diff --git a/project.config.json b/project.config.json index 1797105..faa3154 100644 --- a/project.config.json +++ b/project.config.json @@ -8,7 +8,7 @@ "newFeature": true }, "compileType": "miniprogram", - "appid": "wx2c28390f4f2c0888", + "appid": "wxfdea8f72e0cffff0", "libVersion": "2.0.9", "projectname": "%E4%BA%8C%E5%8F%B7%E5%AE%B6%E6%94%BF%EF%BC%88%E4%BA%8C%E5%8F%B7%EF%BC%89", "condition": { From 4ec3090552fa1d2d848a27c00f116a54ddd8adb7 Mon Sep 17 00:00:00 2001 From: lfs3 Date: Fri, 20 Jul 2018 18:38:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E6=98=BE=E7=A4=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 4 +- pages/at_present/at_present.js | 69 +++++++++++++++++----------------- pages/city/city.js | 9 ++++- project.config.json | 2 +- 4 files changed, 44 insertions(+), 40 deletions(-) diff --git a/app.js b/app.js index c2d7ab9..f43c549 100644 --- a/app.js +++ b/app.js @@ -1,8 +1,8 @@ //app.js App({ gw: { - hostUrl: 'https://www.1hjz.cn', - //hostUrl: 'https://test.1hjz.cn/', + //hostUrl: 'https://www.1hjz.cn', + hostUrl: 'https://test.1hjz.cn/', mapUrl:'https://api.map.baidu.com', systemInfo : null,//系统信息 }, diff --git a/pages/at_present/at_present.js b/pages/at_present/at_present.js index 33c7332..45b1143 100644 --- a/pages/at_present/at_present.js +++ b/pages/at_present/at_present.js @@ -23,13 +23,8 @@ Page({ onLoad: function(options) { // let that = this;  qqmapsdk = new QQMapWX({ -<<<<<<< HEAD // key: 'C5KBZ-RISKD-INW4P-PWYQJ-QC6C7-BQBGC'//测试 key: 'JN7BZ-MJBK5-52SIH-QOKGH-FJE5F-IWFGG'//正式 -======= - key: 'C5KBZ-RISKD-INW4P-PWYQJ-QC6C7-BQBGC' - //正式的上线 key: 'JN7BZ-MJBK5-52SIH-QOKGH-FJE5F-IWFGG' ->>>>>>> 9ce9c0372f32b633e4de2d07306aae87a8c62664 }); }, onReady: function() { @@ -56,36 +51,40 @@ Page({ 'Content-Type': 'application/x-www-form-urlencoded' }, success: function(res) { - // 打印对应想得到的数据 - 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){ + // 打印对应想得到的数据 + 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, + }); + }else{ + showorHide: false; + } } }); diff --git a/pages/city/city.js b/pages/city/city.js index a1d4c22..dd991c3 100644 --- a/pages/city/city.js +++ b/pages/city/city.js @@ -2,7 +2,12 @@ //获取应用实例 const app = getApp() Page({ + data:{ + cityName:'', + districtName: '', + }, onLoad: function (options) { + var that = this // 商家编号 wx.getStorage({ key: 'cityName', @@ -21,7 +26,7 @@ Page({ }) } }); - var that = this + wx.request({ url: app.gw.hostUrl + '/mall/wxa/index/opencitylist', data: { cityName: 'cityName' }, @@ -32,7 +37,7 @@ Page({ success: function (res) { var citys = res.data; that.setData({ - citys + citys:citys }); }, fail: function () { diff --git a/project.config.json b/project.config.json index faa3154..1797105 100644 --- a/project.config.json +++ b/project.config.json @@ -8,7 +8,7 @@ "newFeature": true }, "compileType": "miniprogram", - "appid": "wxfdea8f72e0cffff0", + "appid": "wx2c28390f4f2c0888", "libVersion": "2.0.9", "projectname": "%E4%BA%8C%E5%8F%B7%E5%AE%B6%E6%94%BF%EF%BC%88%E4%BA%8C%E5%8F%B7%EF%BC%89", "condition": {