Commit 8806f0ce9e075a2802e471b5f2a42f12fe1b9212

Authored by yvan.ni
1 parent 3d7b94b2

getjscode2session 优化

Showing 1 changed file with 7 additions and 1 deletions
pages/test/test.js
1 1 var ut = require("../../utils/util.js");
2 2 var os=getApp().globalData.setting;
  3 +
  4 +var regeneratorRuntime = require('../../utils/runtime.js');
  5 +
3 6 Page({
4 7 data:{
5 8 store:null,
... ... @@ -9,6 +12,9 @@ Page({
9 12 },
10 13  
11 14 onLoad:function(t){
  15 +
  16 + var that=this;
  17 +
12 18 wx.qy.login({
13 19 success: function (res) {
14 20 //var qyid = that.data.qyid;
... ... @@ -19,7 +25,7 @@ Page({
19 25  
20 26  
21 27 //调用接口获取userid
22   - that.globalData.request.promiseGet('api/weshop/qywechat/getjscode2session', {
  28 + getApp().request.promiseGet('/api/weshop/qywechat/getjscode2session', {
23 29 data: req_data
24 30 }).then(rs => {
25 31 if (rs.data.code == 0) {
... ...