hxz 2 vuotta sitten
vanhempi
commit
755115551e
3 muutettua tiedostoa jossa 1 lisäystä ja 4 poistoa
  1. 1 1
      https/request.js
  2. 0 2
      pages/scene/scene.js
  3. 0 1
      pages/sign/sign.js

+ 1 - 1
https/request.js

@@ -2,7 +2,7 @@ const { baseUrl } = require('./env').prod
 module.exports = {
     request : function(url, type , data = {}){
     let fullUrl = `${baseUrl}${url}`
-    let token = wx.getStorageSync('token')
+    var token = wx.getStorageSync('token')
     return new Promise((resolve,reject)=>{
       wx.request({url: fullUrl,method:type,data,header: {'content-type': 'application/json','Authorization': token},
         success(res){resolve(res)},

+ 0 - 2
pages/scene/scene.js

@@ -34,7 +34,6 @@ Page({
     })
     var that = this
     getGroup().then(res => {
-      console.log(wx.getStorageSync('token'))
       if(res.data.code == 0){
         var data = res.data.data
         console.log(data)
@@ -117,7 +116,6 @@ Page({
   //添加分组
   apption:function(){
     var that = this
-    wx.setStorageSync('token','eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhdWRpZW5jZSIsImV4cCI6MTcwMjk2NjA5MCwiaXNzIjoiaXNzdXNlciIsIm5iZiI6MTY2NDUyODIxOCwidXNlcl9pZCI6MX0.rAj-_qHq-hbNQxBr18nOlnyJAfRS7lvnjflax4iQEhCt-8BiTZ2d3m1CzBegcT0sD5VeNR9Wr1EQsOg8DFN_CQ')
     wx.showModal({
       title:'添加工程',
       editable:true,

+ 0 - 1
pages/sign/sign.js

@@ -31,7 +31,6 @@ Page({
           success:function(res){
             if(res.data.code == 0){
               let time = new Date()
-              console.log(res.data.data.access_token)
               wx.setStorageSync('time',time) //登录时间
               wx.setStorageSync('currentTime', res.data.data.expires_in)//过期时间
               wx.setStorageSync('token', res.data.data.access_token)