togoin.js
866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
var t = require("../../utils/common.js"); var os = getApp().globalData.setting;
Page({
    data: {
      store: null,
      imghots: os.imghost,
    },
    onLoad: function () {
      var th = this, app = getApp();
      app.getConfig(function (e) {
        th.setData({ store: e });
      })
    },
    onShow(){
    },
    bindGetUserInfo: function(e) {
      var that = this, app = getApp();
      //此处授权得到userInfo
      console.log(e.detail.userInfo);
      app.globalData.getu = e.detail.userInfo;
      //接下来写业务代码
      //最后,记得返回刚才的页面
      app.auth.wxLogin_fir(function(){
          console.log("togoin");
          console.log("1");
          wx.navigateBack({
            delta: 1
          })
      })
   
    },
	
	cancle_bind:function(){		
	   getApp().goto('/pages/user/index/index');		
	}
	
	
});