wechat_user_type
Ge Hao 8 years ago
parent b280843b54
commit 81ad935d69
  1. 2
      pages/mine/mine.js
  2. 8
      utils/profile.js

@ -29,7 +29,7 @@ Page({
bindSubmitMobile: function(e) { bindSubmitMobile: function(e) {
var mobile = this.data.mobile var mobile = this.data.mobile
var data = {mobile_code: this.data.mobile, code: e.detail.value.code} var data = {mobile: this.data.mobile, mobile_code: e.detail.value.code}
profile.getCustomerInfo(data, function(currentCustomer){ profile.getCustomerInfo(data, function(currentCustomer){
var baye_rank = currentCustomer.baye_rank var baye_rank = currentCustomer.baye_rank

@ -20,6 +20,10 @@ function getCustomerInfo (data, cb) {
success: function(res) { success: function(res) {
app.globalData.currentCustomer = res.data.customer app.globalData.currentCustomer = res.data.customer
app.globalData.token = res.data.token app.globalData.token = res.data.token
wx.setStorage({
key: 'userToken',
data: res.data.token
})
typeof cb == "function" && cb(app.globalData.currentCustomer) typeof cb == "function" && cb(app.globalData.currentCustomer)
}, },
fail: function(res) { fail: function(res) {
@ -46,8 +50,8 @@ module.exports = {
getZichanSlides (resolve) { getZichanSlides (resolve) {
return getZichanSlides(resolve) return getZichanSlides(resolve)
}, },
getCustomerInfo (resolve) { getCustomerInfo (data, resolve) {
return getCustomerInfo(resolve) return getCustomerInfo(data, resolve)
}, },
getPassCode (mobile) { getPassCode (mobile) {
return getPassCode(mobile) return getPassCode(mobile)

Loading…
Cancel
Save