1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- //index.js
- //获取应用实例
- const app = getApp()
- Page({
- data: {
- username:'未登录'
- },
- getPhoneNumber (e) {
- console.log(e.detail.errMsg)
- console.log(e.detail.iv)
- console.log(e.detail.encryptedData)
- },
- //事件处理函数
- bindViewTap: function() {
- wx.navigateTo({
- url: '../logs/logs'
- })
- },
- getmenu:function(){
- wx.request({
- url: 'http://192.168.20.53:9999/admin/menu/tree',
- method: 'get',
- header: {
- 'Authorization': 'Bearer '+wx.getStorageSync('token')
- },
- success(r) {
- console.log(r)
- console.log(r)
- }
- })
-
- },
- login:function(){
- // var self = this
- // wx.login({
- // success(res){
- // wx.request({
- // url: 'http://192.168.20.53:9999/auth/mobile/token/social?grant_type=mobil&mobile=MINI@'+res.code,
- // method: 'post',
- // header: {
- // 'Authorization': 'Basic dGVzdDp0ZXN0'
- // },
- // success(res){
- // console.log(res)
- // wx.setStorageSync('token', res.data.access_token);
- // if (res.statusCode === 401){
- // console.log(res.data)
- // wx.navigateTo({
- // url: '../bind/bind',
- // })
- // }else{
- // self.setData({
- // username: res.data.username
- // })
- // }
- // }
- // })
- // }
- // })
- }
- })
|