|
@@ -69,16 +69,15 @@
|
|
|
//console.log(localStorage.getItem('userData') == 'undefined')
|
|
|
window.onload=function(){
|
|
|
// if(localStorage.getItem('userData') == 'undefined') {
|
|
|
- // alert('请重新扫码登陆')
|
|
|
- // window.location.href = '../index.html'
|
|
|
- // return false;
|
|
|
- // }
|
|
|
+ alert('请重新扫码登陆')
|
|
|
+ window.location.href = '../index.html'
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- // var user = JSON.parse(localStorage.getItem('userData'));
|
|
|
- // var uid = user.uid;
|
|
|
- // var avatar = user.avatar ? user.avatar : '';
|
|
|
- // var name = user.wechatName ? user.wechatName : '小朋友';
|
|
|
- var uid = 36;
|
|
|
+ var user = JSON.parse(localStorage.getItem('userData'));
|
|
|
+ var uid = user.uid;
|
|
|
+ var avatar = user.avatar ? user.avatar : '';
|
|
|
+ var name = user.wechatName ? user.wechatName : '小朋友';
|
|
|
//获取Canvas对象(画布)
|
|
|
var canvas = document.getElementById("myCanvas");
|
|
|
var data = {
|