密码登录加上了API

wechat_user_type
Ge Hao 8 years ago
parent 21961fc37b
commit 5918f28f05
  1. 2
      pages/mine/mine.js
  2. 2
      pages/mine/mine.wxml
  3. 19
      pages/show_product/show_product.js
  4. 2
      utils/profile.js

@ -90,7 +90,7 @@ Page({
}, },
bindLoginPassword: function(e) { 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) profile.getCustomerInfo(data, this.infoCallback)
}, },

@ -30,7 +30,7 @@
<view class="password-second-line"><input type="password" name="password" placeholder="密码"></input></view> <view class="password-second-line"><input type="password" name="password" placeholder="密码"></input></view>
<view class="third-line"><button formType="submit">登录</button></view> <view class="third-line"><button formType="submit">登录</button></view>
</form> </form>
<view class="login-type" bindtap="changeLoginType"><text>使用手机验证码登录</text></view> <view class="login-type" bindtap="changeLoginType"><text>使用验证码绑定手机</text></view>
</view> </view>
</view> </view>
<view wx:else> <view wx:else>

@ -59,17 +59,18 @@ Page({
var that = this var that = this
//管到屏蔽 //管到屏蔽
if (this.data.product && (parseInt(this.data.product['category-id']) === 18)) { if (!app.globalData.featureManager.enableGuanDao) {
wx.showModal({ if (this.data.product && (parseInt(this.data.product['category-id']) === 18)) {
title: '管到商品暂未开放', wx.showModal({
content: '目前无法在小程序上购买管到商品,如有需要,可以在巴爷微信商城上进行购买。', title: '管到商品暂未开放',
showCancel: false, content: '目前无法在小程序上购买管到商品,如有需要,可以在巴爷微信商城上进行购买。',
success: function(res) {} showCancel: false,
}) success: function(res) {}
return })
return
}
} }
var cartItems = wx.getStorageSync('cartItems') || [] var cartItems = wx.getStorageSync('cartItems') || []
var exist = cartItems.filter(function(ele){ var exist = cartItems.filter(function(ele){

@ -17,7 +17,7 @@ function getCustomerInfo (data, cb) {
success: function(res) { success: function(res) {
if (res.data.code === 4) { if (res.data.code === 4) {
return return
} else if (res.data.code === 5) { } else if (parseInt(res.statusCode) === 403) {
wx.showModal({ wx.showModal({
title: '错误', title: '错误',
content: `${res.data.msg}`, content: `${res.data.msg}`,

Loading…
Cancel
Save