|
@@ -3,8 +3,34 @@
|
|
|
<head>
|
|
|
<meta charset="UTF-8">
|
|
|
<title>Title</title>
|
|
|
+ <script>
|
|
|
+ //初始化用户信息数据
|
|
|
+ window.user_info = {
|
|
|
+ logo:'http://img5q.duitang.com/uploads/item/201502/25/20150225060808_wuANL.jpeg',//用户头像
|
|
|
+ nickname:'不羡鸳鸯',//用户昵称,
|
|
|
+ textmsg:'GOOD GOOD STUDY,DAY DAY UP'//寄语
|
|
|
+ };
|
|
|
+
|
|
|
+ //获取URL参数 url格式xxx=yyyy&xxx1=yyy1
|
|
|
+ //通过act 确定是否是海报页,act=hbshare 代表是海报页
|
|
|
+ var URLParams = new Array();
|
|
|
+ var params = document.location.search.substr(1).split('&');
|
|
|
+ for (i=0; i < params.length ; i++){
|
|
|
+ var aParam = params[i].split('=');
|
|
|
+ URLParams[aParam[0]] = aParam[1];
|
|
|
+ }
|
|
|
+ if(URLParams['act']=='hbshare'){
|
|
|
+ document.write('<h1>这里是海报页</h1>');
|
|
|
+ document.write('头像<img src="'+window.user_info.logo+'" width=40 height=40 /><br>');
|
|
|
+ document.write('昵称:'+window.user_info.nickname+'<br>');
|
|
|
+ document.write('寄语:'+window.user_info.textmsg);
|
|
|
+ }else{
|
|
|
+ document.write('<h1>这是首页哦</h1>');
|
|
|
+ }
|
|
|
+ </script>
|
|
|
</head>
|
|
|
<body>
|
|
|
-<h1>这是个首页</h1>
|
|
|
+
|
|
|
+
|
|
|
</body>
|
|
|
</html>
|