wechat_user_type
Ge Hao 8 years ago
parent 017cccb2b8
commit 4d9ac4cfe9
  1. 6
      app.js
  2. 3
      utils/profile.js

@ -8,8 +8,10 @@ App({
this.jsonModel = jsonApi.JsonApiDataStoreModel this.jsonModel = jsonApi.JsonApiDataStoreModel
this.globalData.code = wx.getStorageSync('code') this.globalData.code = wx.getStorageSync('code')
this.getUserInfo(function(res) { this.getUserInfo(function() {
that.globalData.wechatUserType = res.data.wechat_user_type profileUtil.postEncryptedData(function(res){
that.globalData.wechatUserType = res.data.wechat_user_type
})
}) })
this.request({ this.request({
url: `${that.globalData.API_URL}/manage_features`, url: `${that.globalData.API_URL}/manage_features`,

@ -58,7 +58,8 @@ function getPassCode (mobile, cb) {
}) })
} }
function postEncryptedData(resolve) { function postEncryptedData (resolve) {
var app = getApp()
app.request({ app.request({
method: 'POST', method: 'POST',
url: `${app.globalData.API_URL}/sessions/wechat_user_type`, url: `${app.globalData.API_URL}/sessions/wechat_user_type`,

Loading…
Cancel
Save