Browse Source

我的关注,登录后打开两次已经修改

xuchunyang 8 years ago
parent
commit
f3fc381aab
2 changed files with 16 additions and 8 deletions
  1. 1 1
      app/html/myaccount.html
  2. 15 7
      app/js/myaccount.js

+ 1 - 1
app/html/myaccount.html

@ -20,7 +20,7 @@
20 20
				<div class="maincon personinfo2">
21 21
					<div class="headbox2" >
22 22
					    <a class="mui-pull-left proinfor">
23
		                    <img class="mui-pull-left headimg2 headRadius" src="../images/default-photo.jpg" id="userImg">
23
		                    <img class="mui-pull-left headimg2 headRadius" src="" id="userImg">
24 24
		                    <div class="mui-pull-left infobasic">
25 25
		                        <span class="listtit">
26 26
		                        	<span id="userName"></span>

+ 15 - 7
app/js/myaccount.js

@ -10,8 +10,8 @@ mui.ready(function() {
10 10
	var goZixun = document.getElementById("goZixun");
11 11
	var oEdit = document.getElementById("editbox");
12 12
	var goFollow = document.getElementById("goFollow");
13
	var userImg= document.getElementById("userImg");
13 14
	
14

15 15
	mui.plusReady(function() {
16 16

17 17
		var userId = plus.storage.getItem('userid');
@ -62,8 +62,14 @@ mui.ready(function() {
62 62

63 63
				/*我的关注*/
64 64
				goFollow.addEventListener('tap', function() {
65
					plus.nativeUI.showWaiting(); //显示原生等待框
66
					plus.webview.create("../html/attentions.html","../html/attentions.html");
65
					mui.openWindow({
66
						url: '../html/attentions.html',
67
						id: '../html/attentions.html',
68
						show: {
69
							autoShow: false,
70
							aniShow: "slide-in-right"
71
						}
72
					});
67 73
				})
68 74

69 75
				/*我的修改*/
@ -134,16 +140,16 @@ mui.ready(function() {
134 140
							start[i].classList.remove("icon-favor");
135 141
						}
136 142
						if($info.hasHeadImage == 1) {
137
							document.getElementById("userImg").setAttribute("src", baseUrl + "/images/head/" + $info.id + "_l.jpg");
143
							userImg.setAttribute("src",baseUrl + "/images/head/" + $info.id + "_l.jpg");
138 144
						} else {
139
							document.getElementById("userImg").setAttribute("src", baseUrl +  "/images/default-photo.jpg");
145
							userImg.setAttribute("src", baseUrl +  "/images/default-photo.jpg");
140 146
						}
141 147
						if($info.authentication) {
142 148
							document.querySelector('.authicon').style.display = "inline";
143 149
						} else {
144 150
							document.querySelector('.unauthicon').style.display = "inline";
145 151
						}
146

152
							
147 153
					}
148 154
				},
149 155
				error: function() {
@ -155,4 +161,6 @@ mui.ready(function() {
155 161

156 162
	});
157 163

158
});
164
});
165

166