1.

最近学习了关于微信小程序中的安全性的问题。

2.

以下是关于配置信息的代码,仅供参考!

//app.jsvarhost""App({onLaunch:function(){//展示本地存储能力varlogswx.getStorageSync('logs')||[]logs.unshift(Date.now())wx.setStorageSync('logs',logs)//varurlapp.globalData.index//登录wx.login({success:res{//console.log(res);//发送res.code到后台换取openId,sessionKey,unionIdwx.request({url:this.globalData.session,data:{code:res.code,},success:res{//console.log(res.header['Set-Cookie']);wx.setStorage({key:'session_id',data:res.header['Set-Cookie'],})}})}})//获取用户信息//wx.getSetting({//success:res{//if(res.authSetting['scope.userInfo']){////已经授权,可以直接调用getUserInfo获取头像昵称,不会弹框//wx.getUserInfo({//success:res{////可以将res发送给后台解码出unionId//this.globalData.userInfores.userInfo////由于getUserInfo是网络请求,可能会在Page.onLoad之后才返回////所以此处加入callback以防止这种情况//if(this.userInfoReadyCallback){//this.userInfoReadyCallback(res)//}//}//})//}//}//})},globalData:{userInfo:null,index:`${host}/home/index/index`,add:`${host}/home/index/add`,session:`${host}/home/index/session`,upload:`${host}/home/index/upload`,getstu:`${host}/home/index/getstu`,login:`${host}/home/index/login`}})

TAG标签: 关于微信小程序中的安全性小程序如何安全测试小程序安全测试

http://www.xiaochengxub.com/read-96111.html