提交 b813970ac66365bb9d36ef9a1941ac1a006b6ef0

作者 wangyu
1 个父辈 930d8081

优化

正在显示 2 个修改的文件 包含 48 行增加31 行删除
... ... @@ -71,6 +71,7 @@ App({
71 71 that.globalData.wx_open_id = user.wx_open_id;
72 72 that.globalData.Authorization = "Bearer " + res.data.access_token;
73 73 that.globalData.refresh_token = res.data.refresh_token;
  74 + that.globalData.real_auth_status = res.data.user.real_auth_status;
74 75 if (user && user.type == "0") { //匿名用户
75 76 wx.redirectTo({
76 77 url: '../../getPhone/getPhone'
... ... @@ -154,6 +155,7 @@ App({
154 155 refresh_token: "",
155 156 tenant_id: "",
156 157 wx_open_id: "",
  158 + real_auth_status:'',
157 159 newComerOrder: null
158 160 }
159 161 })
\ No newline at end of file
... ...
... ... @@ -36,39 +36,54 @@ Page({
36 36 checkUserInfo: function() {
37 37 var that = this;
38 38 Authorization = getApp().globalData.Authorization;
  39 + var real_auth_status = getApp().globalData.real_auth_status
  40 + console.log("Authorization", Authorization)
39 41 console.log("Authorization", Authorization)
40 42 if (Authorization && Authorization.length > 10) {
41   - wx.request({
42   - url: baseUrl + 'socialwork/v1/employees/verify',
43   - data: {},
44   - header: {
45   - 'content-type': 'application/json',
46   - "Authorization": Authorization
47   - },
48   - success: function(res) {
49   - if (res.statusCode && res.statusCode >= 300) {
50   - wx.showToast({
51   - title: res.data.message,
52   - icon: 'none',
53   - duration: 1000
54   - })
55   - } else {
56   - // that.setData({
57   - // has_verify: false
58   - // })
59   - if (!res.data.need_verify) { //不需要再实名认证
60   - that.setData({
61   - has_verify: true
62   - })
63   - that.taxconfirm();
64   - } else {
65   - that.setData({
66   - has_verify: false
67   - })
68   - }
69   - }
70   - }
71   - })
  43 + // that.setData({
  44 + // has_verify: false
  45 + // })
  46 + if (real_auth_status == 'active') {
  47 + that.setData({
  48 + has_verify: true
  49 + })
  50 + that.taxconfirm();
  51 + } else { //不需要再实名认证
  52 + that.setData({
  53 + has_verify: false
  54 + })
  55 + }
  56 + // wx.request({
  57 + // url: baseUrl + 'socialwork/v1/employees/verify',
  58 + // data: {},
  59 + // header: {
  60 + // 'content-type': 'application/json',
  61 + // "Authorization": Authorization
  62 + // },
  63 + // success: function(res) {
  64 + // if (res.statusCode && res.statusCode >= 300) {
  65 + // wx.showToast({
  66 + // title: res.data.message,
  67 + // icon: 'none',
  68 + // duration: 1000
  69 + // })
  70 + // } else {
  71 + // // that.setData({
  72 + // // has_verify: false
  73 + // // })
  74 + // if (!res.data.need_verify) { //不需要再实名认证
  75 + // that.setData({
  76 + // has_verify: true
  77 + // })
  78 + // that.taxconfirm();
  79 + // } else {
  80 + // that.setData({
  81 + // has_verify: false
  82 + // })
  83 + // }
  84 + // }
  85 + // }
  86 + // })
72 87 }
73 88 },
74 89
... ...
注册登录 后发表评论