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

@ -8,9 +8,11 @@ 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() {
profileUtil.postEncryptedData(function(res){
that.globalData.wechatUserType = res.data.wechat_user_type 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`,
success: function(res) { that.globalData.featureManager = res.data } success: function(res) { that.globalData.featureManager = res.data }

@ -59,6 +59,7 @@ 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