From 5918f28f0574cbf72bfc8994e4b2de93e86b7896 Mon Sep 17 00:00:00 2001 From: Ge Hao Date: Tue, 20 Dec 2016 17:15:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=86=E7=A0=81=E7=99=BB=E5=BD=95=E5=8A=A0?= =?UTF-8?q?=E4=B8=8A=E4=BA=86API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mine/mine.js | 2 +- pages/mine/mine.wxml | 2 +- pages/show_product/show_product.js | 19 ++++++++++--------- utils/profile.js | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/pages/mine/mine.js b/pages/mine/mine.js index e53e11f..7e64c0b 100644 --- a/pages/mine/mine.js +++ b/pages/mine/mine.js @@ -90,7 +90,7 @@ Page({ }, bindLoginPassword: function(e) { - var data = {mobile: e.detail.mobile, password: e.detail.password} + var data = {mobile: e.detail.value.mobile, password: e.detail.value.password} profile.getCustomerInfo(data, this.infoCallback) }, diff --git a/pages/mine/mine.wxml b/pages/mine/mine.wxml index 3459b5f..307ba44 100644 --- a/pages/mine/mine.wxml +++ b/pages/mine/mine.wxml @@ -30,7 +30,7 @@ - 使用手机验证码登录 + 使用验证码绑定手机 diff --git a/pages/show_product/show_product.js b/pages/show_product/show_product.js index dc1b175..05f4853 100644 --- a/pages/show_product/show_product.js +++ b/pages/show_product/show_product.js @@ -59,17 +59,18 @@ Page({ var that = this //管到屏蔽 - if (this.data.product && (parseInt(this.data.product['category-id']) === 18)) { - wx.showModal({ - title: '管到商品暂未开放', - content: '目前无法在小程序上购买管到商品,如有需要,可以在巴爷微信商城上进行购买。', - showCancel: false, - success: function(res) {} - }) - return + if (!app.globalData.featureManager.enableGuanDao) { + if (this.data.product && (parseInt(this.data.product['category-id']) === 18)) { + wx.showModal({ + title: '管到商品暂未开放', + content: '目前无法在小程序上购买管到商品,如有需要,可以在巴爷微信商城上进行购买。', + showCancel: false, + success: function(res) {} + }) + return + } } - var cartItems = wx.getStorageSync('cartItems') || [] var exist = cartItems.filter(function(ele){ diff --git a/utils/profile.js b/utils/profile.js index 2352ca9..2e97431 100644 --- a/utils/profile.js +++ b/utils/profile.js @@ -17,7 +17,7 @@ function getCustomerInfo (data, cb) { success: function(res) { if (res.data.code === 4) { return - } else if (res.data.code === 5) { + } else if (parseInt(res.statusCode) === 403) { wx.showModal({ title: '错误', content: `${res.data.msg}`,