efront 3.24.3 → 3.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/{index.html → _index.html} +1 -1
- package/apps/{zimoli/index.html → index.jsp} +22 -6
- package/apps/kugou/main.js +1 -3
- package/coms/basic/bdecode.js +38 -0
- package/coms/basic/bdecode_test.js +13 -0
- package/coms/basic/bencode.js +14 -0
- package/coms/basic/bencode_test.js +20 -0
- package/coms/basic/combine.js +21 -0
- package/coms/basic/cross_.js +11 -4
- package/coms/basic/queue.js +2 -2
- package/coms/basic/submit_.js +3 -1
- package/{apps → coms}/kugou/api.js +2 -0
- package/coms/kugou/buildList.js +7 -1
- package/coms/kugou/player.js +1 -0
- package/coms/kugou/song.html +1 -1
- package/coms/kugou/song.js +1 -0
- package/coms/kugou/song.less +12 -1
- package/coms/zimoli/button.less +49 -0
- package/coms/zimoli/cloneVisible.js +1 -0
- package/coms/zimoli/data.js +8 -2
- package/coms/zimoli/input.js +6 -4
- package/coms/zimoli/picture.js +6 -5
- package/coms/zimoli/picture_.js +4 -2
- package/coms/zimoli/render.js +2 -1
- package/package.json +1 -1
- package/public/efront.js +1 -1
- package/readme.md +0 -1
- package/apps/zimoli/book/main.js +0 -8
- package/apps/zimoli/broadcast/main.js +0 -8
- package/apps/zimoli/collection/add.html +0 -13
- package/apps/zimoli/collection/add.js +0 -14
- package/apps/zimoli/collection/add.less +0 -0
- package/apps/zimoli/collection/main.html +0 -0
- package/apps/zimoli/collection/main.js +0 -13
- package/apps/zimoli/collection/main.less +0 -8
- package/apps/zimoli/config.js +0 -14
- package/apps/zimoli/extra/pending.html +0 -1
- package/apps/zimoli/extra/pending.js +0 -8
- package/apps/zimoli/extra/pending.less +0 -15
- package/apps/zimoli/files/info.js +0 -7
- package/apps/zimoli/files/main.js +0 -108
- package/apps/zimoli/files/main.less +0 -26
- package/apps/zimoli/images/avatar.png +0 -0
- package/apps/zimoli/images/background.jpg +0 -0
- package/apps/zimoli/kugou/font/demo.css +0 -539
- package/apps/zimoli/kugou/font/demo_index.html +0 -1159
- package/apps/zimoli/kugou/font/iconfont.css +0 -189
- package/apps/zimoli/kugou/font/iconfont.eot +0 -0
- package/apps/zimoli/kugou/font/iconfont.js +0 -1
- package/apps/zimoli/kugou/font/iconfont.svg +0 -155
- package/apps/zimoli/kugou/font/iconfont.ttf +0 -0
- package/apps/zimoli/kugou/font/iconfont.woff +0 -0
- package/apps/zimoli/kugou/font/iconfont.woff2 +0 -0
- package/apps/zimoli/kugou/listen.html +0 -15
- package/apps/zimoli/kugou/listen.js +0 -37
- package/apps/zimoli/kugou/listen.less +0 -114
- package/apps/zimoli/kugou/mine.html +0 -53
- package/apps/zimoli/kugou/mine.js +0 -21
- package/apps/zimoli/kugou/mine.less +0 -106
- package/apps/zimoli/kugou/search.js +0 -109
- package/apps/zimoli/kugou/search.less +0 -50
- package/apps/zimoli/kugou/sing.js +0 -42
- package/apps/zimoli/kugou/sing.less +0 -93
- package/apps/zimoli/kugou/view.html +0 -39
- package/apps/zimoli/kugou/view.js +0 -17
- package/apps/zimoli/kugou/view.less +0 -84
- package/apps/zimoli/login/qq.js +0 -20
- package/apps/zimoli/login/qq_callback.html +0 -15
- package/apps/zimoli/main.js +0 -87
- package/apps/zimoli/main.less +0 -81
- package/apps/zimoli/message/chatList.js +0 -57
- package/apps/zimoli/message/chatList.less +0 -52
- package/apps/zimoli/message/commentList.js +0 -55
- package/apps/zimoli/message/commentList.less +0 -55
- package/apps/zimoli/message/informList.js +0 -69
- package/apps/zimoli/message/informList.less +0 -51
- package/apps/zimoli/message/main.js +0 -59
- package/apps/zimoli/message/main.less +0 -51
- package/apps/zimoli/message/praiseList.js +0 -3
- package/apps/zimoli/message/praiseList.less +0 -7
- package/apps/zimoli/nearby/main.js +0 -8
- package/apps/zimoli/skin/main.js +0 -47
- package/apps/zimoli/skin/main.less +0 -31
- package/apps/zimoli/user/getPassword.js +0 -82
- package/apps/zimoli/user/getPassword.less +0 -14
- package/apps/zimoli/user/login.html +0 -12
- package/apps/zimoli/user/login.js +0 -50
- package/apps/zimoli/user/login.less +0 -139
- package/apps/zimoli/user/profile-bg.jpg +0 -0
- package/apps/zimoli/user/profile.html +0 -32
- package/apps/zimoli/user/profile.js +0 -63
- package/apps/zimoli/user/profile.less +0 -50
- package/apps/zimoli/user/register.js +0 -20
- package/apps/zimoli/user/register.less +0 -3
- package/apps/zimoli/user/setting.js +0 -90
- package/apps/zimoli/user/setting.less +0 -11
- package/apps/zimoli/user/welcome.js +0 -36
- package/apps/zimoli/user/welcome.less +0 -136
- package/apps/zimoli/watch/main.html +0 -22
- package/apps/zimoli/watch/main.js +0 -76
- package/apps/zimoli/watch/main.less +0 -54
- package/apps/zimoli/yuanfen/main.js +0 -55
- package/apps/zimoli/yuanfen/main.json +0 -0
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
& {
|
|
2
|
-
height: 100%;
|
|
3
|
-
width: 100%;
|
|
4
|
-
position: absolute;
|
|
5
|
-
background-color: #f2f4f6;
|
|
6
|
-
left: 0;
|
|
7
|
-
top: 0;
|
|
8
|
-
right: 0;
|
|
9
|
-
bottom: 0;
|
|
10
|
-
padding-top: 50px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.options {
|
|
14
|
-
text-align: center;
|
|
15
|
-
padding: 12px 60px;
|
|
16
|
-
.button {
|
|
17
|
-
border-radius: 0;
|
|
18
|
-
max-width: 120px;
|
|
19
|
-
width: 25%;
|
|
20
|
-
@radius: 5px;
|
|
21
|
-
background-color: #fff;
|
|
22
|
-
@color: #0090ff;
|
|
23
|
-
border: 1px solid @color;
|
|
24
|
-
border-right: none;
|
|
25
|
-
color: @color;
|
|
26
|
-
&.active,
|
|
27
|
-
&.hover,
|
|
28
|
-
&:focus,
|
|
29
|
-
&.ing {
|
|
30
|
-
color: #fff;
|
|
31
|
-
background-color: @color;
|
|
32
|
-
}
|
|
33
|
-
&:first-child {
|
|
34
|
-
border-radius: @radius 0 0 @radius;
|
|
35
|
-
}
|
|
36
|
-
&:last-child {
|
|
37
|
-
border-radius: 0 @radius @radius 0;
|
|
38
|
-
border-right: 1px solid @color;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
&{
|
|
43
|
-
position: absolute;
|
|
44
|
-
padding-bottom: 60px;
|
|
45
|
-
}
|
|
46
|
-
.page{
|
|
47
|
-
height:100%;
|
|
48
|
-
>div{
|
|
49
|
-
height: 100%;
|
|
50
|
-
}
|
|
51
|
-
}
|
package/apps/zimoli/skin/main.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
var page = div();
|
|
2
|
-
titlebar("皮肤中心", ["我的"]);
|
|
3
|
-
page.innerHTML = `<hbox class=title-area>
|
|
4
|
-
<span class=active>推荐</span>
|
|
5
|
-
<span>卡通</span>
|
|
6
|
-
<span>明星</span>
|
|
7
|
-
<span>星座</span>
|
|
8
|
-
<span>个性</span>
|
|
9
|
-
</hbox>
|
|
10
|
-
<list>
|
|
11
|
-
<div>
|
|
12
|
-
官方推荐
|
|
13
|
-
</div>
|
|
14
|
-
<div>
|
|
15
|
-
<div></div>
|
|
16
|
-
</div>
|
|
17
|
-
</list>
|
|
18
|
-
`.replace(/>\s+</g, "><");
|
|
19
|
-
page.initialStyle = 'margin-left:100%';
|
|
20
|
-
var list = div();
|
|
21
|
-
render(page, {
|
|
22
|
-
hbox(element) {
|
|
23
|
-
var elements = [].slice.call(element.children, 0);
|
|
24
|
-
var container = vbox(div(), "X");
|
|
25
|
-
appendChild(container, elements);
|
|
26
|
-
return container;
|
|
27
|
-
},
|
|
28
|
-
list() {
|
|
29
|
-
return
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
var titleArea = page.querySelector(".title-area");
|
|
33
|
-
onclick(titleArea, function (event) {
|
|
34
|
-
var target = event.target;
|
|
35
|
-
if (!/span/i.test(target.tagName)) return;
|
|
36
|
-
[].forEach.call(titleArea.children, function (child) {
|
|
37
|
-
if (child !== target) {
|
|
38
|
-
removeClass(child, "active");
|
|
39
|
-
} else {
|
|
40
|
-
addClass(child, "active");
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
});
|
|
45
|
-
function main() {
|
|
46
|
-
return page;
|
|
47
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
& {
|
|
2
|
-
position: absolute;
|
|
3
|
-
left: 0;
|
|
4
|
-
top: 0;
|
|
5
|
-
bottom: 0;
|
|
6
|
-
right: 0;
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100%;
|
|
9
|
-
background-color: #fff;
|
|
10
|
-
padding-top: 50px;
|
|
11
|
-
z-index: 1;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.title-area {
|
|
15
|
-
height: auto;
|
|
16
|
-
line-height: 40px;
|
|
17
|
-
white-space: nowrap;
|
|
18
|
-
overflow-x: auto;
|
|
19
|
-
margin: 10px 0;
|
|
20
|
-
>div {
|
|
21
|
-
display: inline-block;
|
|
22
|
-
}
|
|
23
|
-
>.active {
|
|
24
|
-
color: blue;
|
|
25
|
-
border-bottom: 2px solid blue;
|
|
26
|
-
}
|
|
27
|
-
>span {
|
|
28
|
-
display: inline-block;
|
|
29
|
-
margin: 0 20px;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
var page = div();
|
|
2
|
-
titlebar(i18n("找回密码", "Retrieve password"));
|
|
3
|
-
page.innerHTML = `
|
|
4
|
-
<div step=1 ng-if=data.step==1>
|
|
5
|
-
<field>
|
|
6
|
-
<span>${i18n("账号", "Account")}</span>
|
|
7
|
-
<input ng-model=data.usercode />
|
|
8
|
-
</field>
|
|
9
|
-
<div class=option>
|
|
10
|
-
<btn ng-click='sendSMS()'>${i18n("下一步", "Next")}</btn>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
<div step=2 ng-if=data.step==2>
|
|
14
|
-
<div>
|
|
15
|
-
${i18n("已发送验证短信到", "Verified SMS has been sent to")}<span ng-bind=mask(data.usercode)></span>
|
|
16
|
-
</div>
|
|
17
|
-
<group>
|
|
18
|
-
<field>
|
|
19
|
-
<span>${i18n("验证码", "Identifying code")}</span>
|
|
20
|
-
<input/>
|
|
21
|
-
<div>
|
|
22
|
-
<btn ng-if='new Date-data.sendTime>data.waitTime' ng-click=resend()>${i18n("重新发送", "Resend")}</btn>
|
|
23
|
-
<span ng-if='new Date-data.sendTime<=data.waitTime'>
|
|
24
|
-
${i18n("<span ng-bind='String((data.sendTime-new Date+data.waitTime)/1000|0)'></span>秒后重新发送",
|
|
25
|
-
"Resend in <span ng-bind='String((data.sendTime-new Date+data.waitTime)/1000|0)'></span> seconds")}
|
|
26
|
-
</span>
|
|
27
|
-
</div>
|
|
28
|
-
</field>
|
|
29
|
-
<field><span>${i18n("新密码", "New password")}</span><input/></field>
|
|
30
|
-
<field><span>${i18n("确认密码", "Verify password")}</span><input/></field>
|
|
31
|
-
</group>
|
|
32
|
-
<div class=option>
|
|
33
|
-
<btn ng-click='setPassword()'>${i18n("确定", "Confirm")}</btn>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
`.replace(/>\s+</g, "><");
|
|
37
|
-
var data = {};
|
|
38
|
-
render(page, {
|
|
39
|
-
data,
|
|
40
|
-
input,
|
|
41
|
-
mask(code) {
|
|
42
|
-
return String(code).trim().replace(/^([\s\S]{3})(.*?)$/g, (_, a, b) => a + "*".repeat(b.length));
|
|
43
|
-
},
|
|
44
|
-
group(elem) {
|
|
45
|
-
return group([].slice.call(elem.children, 0));
|
|
46
|
-
},
|
|
47
|
-
field(elem) {
|
|
48
|
-
return field(elem.children[0], elem.children[1], elem.children[2] || false, 8);
|
|
49
|
-
},
|
|
50
|
-
btn: button,
|
|
51
|
-
sendSMS() {
|
|
52
|
-
if (!/\d{11}/.test(data.usercode)) return alert("账号错误!");
|
|
53
|
-
data.step = 2;
|
|
54
|
-
data.sendTime = +new Date;
|
|
55
|
-
state(data);
|
|
56
|
-
ticker();
|
|
57
|
-
},
|
|
58
|
-
resend() {
|
|
59
|
-
this.sendSMS();
|
|
60
|
-
},
|
|
61
|
-
setPassword() {
|
|
62
|
-
}
|
|
63
|
-
})
|
|
64
|
-
var ticker = function () {
|
|
65
|
-
if (data.step === 2 && new Date() - data.sendTime <= data.waitTime) ticker.ing = requestAnimationFrame(ticker);
|
|
66
|
-
dispatch(window, "render");
|
|
67
|
-
};
|
|
68
|
-
page.initialStyle = `z-index:1;margin-left:100%`;
|
|
69
|
-
onremove(page, function () {
|
|
70
|
-
cancelAnimationFrame(ticker.ing);
|
|
71
|
-
state(null);
|
|
72
|
-
});
|
|
73
|
-
function main() {
|
|
74
|
-
extend(data, {
|
|
75
|
-
usercode: "",
|
|
76
|
-
step: 1,
|
|
77
|
-
waitTime: 60000,
|
|
78
|
-
sendTime: +new Date,
|
|
79
|
-
}, state());
|
|
80
|
-
ticker();
|
|
81
|
-
return page;
|
|
82
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<form ng-submit="login()" onsubmit="event.preventDefault()">
|
|
2
|
-
<div class="bg"></div>
|
|
3
|
-
<div>
|
|
4
|
-
${avatar}
|
|
5
|
-
<name placeholder=${i18n`name`} ng-model='username'></name>
|
|
6
|
-
<pswd placeholder=${i18n`password`} ng-model='password'></pswd>
|
|
7
|
-
<button type="submit" ng-if='!login.ing'>
|
|
8
|
-
<span ng-if='!username'>${i18n(`游客`, "Guest")}</span>${i18n`login`}</button>
|
|
9
|
-
<button ng-if='login.ing' class='busy'>
|
|
10
|
-
<span ng-if='!username'>${i18n(`游客`, "Guest")}</span>${i18n('登录中', 'Logon')}</button>
|
|
11
|
-
</div>
|
|
12
|
-
</form>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
titlebar(i18n`login`);
|
|
3
|
-
var config=require("../config");
|
|
4
|
-
var page = div();
|
|
5
|
-
page.innerHTML = login;
|
|
6
|
-
var go_args;
|
|
7
|
-
|
|
8
|
-
render(page, {
|
|
9
|
-
loading: {},
|
|
10
|
-
go,
|
|
11
|
-
name: input,
|
|
12
|
-
pswd: password,
|
|
13
|
-
button,
|
|
14
|
-
username: user.name || "",
|
|
15
|
-
password: null,
|
|
16
|
-
request(name, password) {
|
|
17
|
-
var that = this;
|
|
18
|
-
var login = this.loading;
|
|
19
|
-
login.ing = true;
|
|
20
|
-
api("_session", {
|
|
21
|
-
name,
|
|
22
|
-
password
|
|
23
|
-
}).success(function (result) {
|
|
24
|
-
login.ing = false;
|
|
25
|
-
user.Login(result).then(function () {
|
|
26
|
-
that.password = "";
|
|
27
|
-
user.setSessionTime(60 * 60 * 1000 * 7 * 24);
|
|
28
|
-
user.saveSession(cross.getCookies(config.api_domain));
|
|
29
|
-
if (!go_args.length) go("profile");
|
|
30
|
-
else go.apply(null, go_args);
|
|
31
|
-
});
|
|
32
|
-
}).error(function (result) {
|
|
33
|
-
login.ing = false;
|
|
34
|
-
alert.error(i18n(JSON.parse(result).reason));
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
login() {
|
|
39
|
-
if (!this.username) this.request("guest", "123456");
|
|
40
|
-
else this.request(this.username, this.password);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
vbox(page);
|
|
44
|
-
page.initialStyle = 'marginLeft:100%;';
|
|
45
|
-
var [_username, _password, _loginBtn] = page.children;
|
|
46
|
-
|
|
47
|
-
function main(args) {
|
|
48
|
-
go_args = args instanceof Array ? args : [];
|
|
49
|
-
return page;
|
|
50
|
-
}
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
& {
|
|
2
|
-
position: absolute;
|
|
3
|
-
background-color: #333636;
|
|
4
|
-
top: 0;
|
|
5
|
-
bottom: 0;
|
|
6
|
-
left: 0;
|
|
7
|
-
right: 0;
|
|
8
|
-
height: 100%;
|
|
9
|
-
width: 100%;
|
|
10
|
-
text-align: center;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
input,
|
|
14
|
-
.password {
|
|
15
|
-
display: block;
|
|
16
|
-
position: relative;
|
|
17
|
-
background-color: rgba(255, 255, 255, .8);
|
|
18
|
-
height: 50px;
|
|
19
|
-
line-height: 50px;
|
|
20
|
-
font-size: 16px;
|
|
21
|
-
text-align: center;
|
|
22
|
-
padding: 0 10px;
|
|
23
|
-
width: 100%;
|
|
24
|
-
outline-offset: 0;
|
|
25
|
-
margin: 10px auto;
|
|
26
|
-
background-clip: padding-box;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
&:focus,
|
|
30
|
-
&.focus {
|
|
31
|
-
outline: 1px solid #0092cc;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.icon {
|
|
36
|
-
width: 80px;
|
|
37
|
-
height: 80px;
|
|
38
|
-
margin: 60px auto 40px auto;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.button {
|
|
42
|
-
margin: 0 auto;
|
|
43
|
-
width: 100%;
|
|
44
|
-
height: 50px;
|
|
45
|
-
line-height: 50px;
|
|
46
|
-
margin: 20px auto;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.count {
|
|
50
|
-
white-space: nowrap;
|
|
51
|
-
right: 0;
|
|
52
|
-
bottom: 0;
|
|
53
|
-
color: #888;
|
|
54
|
-
right: 0;
|
|
55
|
-
position: absolute;
|
|
56
|
-
height: 50px;
|
|
57
|
-
line-height: 50px;
|
|
58
|
-
padding: 0 16px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.anchor {
|
|
62
|
-
cursor: pointer;
|
|
63
|
-
color: #888;
|
|
64
|
-
display: inline-block;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.avatar {
|
|
68
|
-
position: relative;
|
|
69
|
-
margin-top: -100px;
|
|
70
|
-
width: 120px;
|
|
71
|
-
height: 120px;
|
|
72
|
-
box-shadow: 0 0 20px -6px rgba(0, 0, 0, .6);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
& {
|
|
76
|
-
// background: url('images/cover.jpg') no-repeat center/cover;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.bg {
|
|
80
|
-
overflow: hidden;
|
|
81
|
-
position: absolute;
|
|
82
|
-
top: 0;
|
|
83
|
-
bottom: 0;
|
|
84
|
-
right: 0;
|
|
85
|
-
left: 0;
|
|
86
|
-
margin: 0;
|
|
87
|
-
height: auto;
|
|
88
|
-
width: auto;
|
|
89
|
-
|
|
90
|
-
&:after {
|
|
91
|
-
content: "";
|
|
92
|
-
display: block;
|
|
93
|
-
top: -40px;
|
|
94
|
-
left: 50%;
|
|
95
|
-
width: 130px;
|
|
96
|
-
height: 130px;
|
|
97
|
-
border-radius: 50%;
|
|
98
|
-
position: absolute;
|
|
99
|
-
margin: -1065px;
|
|
100
|
-
border: 1000px solid rgba(255, 255, 255, .6);
|
|
101
|
-
box-shadow: 0 0 20px -6px rgba(0, 0, 0, .6);
|
|
102
|
-
box-sizing: content-box;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
form {
|
|
107
|
-
position: relative;
|
|
108
|
-
margin: -72px auto;
|
|
109
|
-
top: 50%;
|
|
110
|
-
width: 520px;
|
|
111
|
-
max-width: 100%;
|
|
112
|
-
display: block;
|
|
113
|
-
|
|
114
|
-
&:before {
|
|
115
|
-
content: "";
|
|
116
|
-
box-sizing: border-box;
|
|
117
|
-
display: block;
|
|
118
|
-
position: absolute;
|
|
119
|
-
top: -105px;
|
|
120
|
-
height: 130px;
|
|
121
|
-
width: 130px;
|
|
122
|
-
border-radius: 50%;
|
|
123
|
-
border: 1px solid #fff;
|
|
124
|
-
left: 50%;
|
|
125
|
-
margin-left: -65px;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
>div {
|
|
130
|
-
width: 100%;
|
|
131
|
-
padding: 0 16px;
|
|
132
|
-
border-radius: 4px;
|
|
133
|
-
box-sizing: border-box;
|
|
134
|
-
text-align: center;
|
|
135
|
-
display: inline-block;
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
}
|
|
Binary file
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<div class=userinfo>
|
|
2
|
-
<img class="avatar" ng-click=editavatar() ng-src="user.avatar" />
|
|
3
|
-
<div class="name" ng-bind=user.name>不枝雀</div>
|
|
4
|
-
<div class="info">兰考县 90后 天秤座</div>
|
|
5
|
-
</div>
|
|
6
|
-
<group>
|
|
7
|
-
<option ng-click="go('/extra/pending',this.innerText)" title='我的会员' content='清凉一夏·领取会员福利'></option>
|
|
8
|
-
<option ng-click="go('/extra/pending',this.innerText)" title='积分充值' content='8041'></option>
|
|
9
|
-
<option ng-click="go('/extra/pending',this.innerText)" title='我的账户' content=''></option>
|
|
10
|
-
</group>
|
|
11
|
-
<group>
|
|
12
|
-
<option ng-click="go('/extra/pending',this.innerText)" title="通讯录"></option>
|
|
13
|
-
<option ng-click="go('/extra/pending',this.innerText)" title="分享"></option>
|
|
14
|
-
</group>
|
|
15
|
-
<group>
|
|
16
|
-
<option ng-click="go('/extra/pending',this.innerText)" title="访客"></option>
|
|
17
|
-
<option ng-click="go('/extra/pending',this.innerText)" title="喜欢我"></option>
|
|
18
|
-
</group>
|
|
19
|
-
<group>
|
|
20
|
-
<option ng-click="go('/extra/pending',this.innerText)" title="魅力"></option>
|
|
21
|
-
<option ng-click="go('/extra/pending',this.innerText)" title="我的礼物"></option>
|
|
22
|
-
</group>
|
|
23
|
-
<group>
|
|
24
|
-
<option ng-click="go('/extra/pending',this.innerText)" title="房车号"></option>
|
|
25
|
-
<option ng-click="go('/extra/pending',this.innerText)" title="社交账号" content="QQ:WeChat"></option>
|
|
26
|
-
</group>
|
|
27
|
-
<group>
|
|
28
|
-
<option title="设置" ng-click='go("setting")'></option>
|
|
29
|
-
</group>
|
|
30
|
-
<group>
|
|
31
|
-
<option title="退出" ng-click='logout()'></option>
|
|
32
|
-
</group>
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
var tbar = titlebar("个人中心");
|
|
2
|
-
var avatar = createElement(div);
|
|
3
|
-
css(avatar, "border-radius:50%;background-color:#ccc;width:60px;height:60px;");
|
|
4
|
-
var avatarArea = createElement(div, avatar);
|
|
5
|
-
css(avatarArea, "width:100%;height:120px;background-color:#fff;");
|
|
6
|
-
var page = createVboxWithState(state);
|
|
7
|
-
page.innerHTML = profile;
|
|
8
|
-
|
|
9
|
-
on("scroll")(page, function () {
|
|
10
|
-
var deltaHeight = page.querySelector(".userinfo").offsetHeight - page.scrollTop;
|
|
11
|
-
var calcHeight = 30;
|
|
12
|
-
var titlebarHeight = tbar.offsetHeight;
|
|
13
|
-
var totalHeight = calcHeight + titlebarHeight;
|
|
14
|
-
var ratio;
|
|
15
|
-
if (deltaHeight < titlebarHeight) {
|
|
16
|
-
ratio = 1;
|
|
17
|
-
} else if (deltaHeight < totalHeight) {
|
|
18
|
-
ratio = (totalHeight - deltaHeight) / calcHeight;
|
|
19
|
-
} else {
|
|
20
|
-
ratio = 0;
|
|
21
|
-
}
|
|
22
|
-
tbar.style.backgroundColor = `rgba(${[44, 162, 249, ratio]})`;
|
|
23
|
-
tbar.style.color = `rgba(${[0xff, 0xff, 0xff, ratio]})`;
|
|
24
|
-
});
|
|
25
|
-
render(page, {
|
|
26
|
-
user,
|
|
27
|
-
group,
|
|
28
|
-
editavatar() {
|
|
29
|
-
var editor = avatarEditor(this);
|
|
30
|
-
editor.initialStyle = "opacity:0;";
|
|
31
|
-
popup(editor);
|
|
32
|
-
},
|
|
33
|
-
avatar() {
|
|
34
|
-
return avatarArea;
|
|
35
|
-
},
|
|
36
|
-
upload(file) {
|
|
37
|
-
if (!file) return console.info("未选择文件");
|
|
38
|
-
var ext = /\.(png|jpe?g|gif)/i.exec(file.name);
|
|
39
|
-
if (!ext) return alert.error("只能上传png,jpg,gif格式的文件");
|
|
40
|
-
var xhr = new XMLHttpRequest;
|
|
41
|
-
xhr.open("put", user.avatarref);
|
|
42
|
-
xhr.setRequestHeader("Content-type", "image/" + ext[1].toLowerCase());
|
|
43
|
-
xhr.send(file);
|
|
44
|
-
xhr.onload = function () {
|
|
45
|
-
alert("上传成功!");
|
|
46
|
-
user.refresh();
|
|
47
|
-
};
|
|
48
|
-
},
|
|
49
|
-
go,
|
|
50
|
-
option(elem) {
|
|
51
|
-
return option(elem.title, elem.getAttribute("content"), 96);
|
|
52
|
-
},
|
|
53
|
-
logout() {
|
|
54
|
-
user.Logout().then(e => go(0));
|
|
55
|
-
}
|
|
56
|
-
})
|
|
57
|
-
// appendChild(page, beian, tbar, money_about, life_circle, live_connect, recived_gift, id_account, setting_about);
|
|
58
|
-
css(page, "font-size:40px;color:#fff;");
|
|
59
|
-
page.initialStyle = "margin-left:100%;z-index:1;transition:all .2s ease-out";
|
|
60
|
-
login();
|
|
61
|
-
function main() {
|
|
62
|
-
return page;
|
|
63
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
& {
|
|
2
|
-
position: absolute;
|
|
3
|
-
left: 0;
|
|
4
|
-
top: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
height: 100%;
|
|
8
|
-
width: 100%;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
&+.titlebar {
|
|
12
|
-
background: transparent;
|
|
13
|
-
box-shadow: none;
|
|
14
|
-
border: none !important;
|
|
15
|
-
color: transparent;
|
|
16
|
-
>.button {
|
|
17
|
-
>.track {
|
|
18
|
-
box-shadow: none;
|
|
19
|
-
}
|
|
20
|
-
color: #ccc;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.avatar {
|
|
25
|
-
border-radius: 50%;
|
|
26
|
-
background-color: #ccc;
|
|
27
|
-
width: 60px;
|
|
28
|
-
height: 60px;
|
|
29
|
-
position: relative;
|
|
30
|
-
margin: 0 auto;
|
|
31
|
-
display: block;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.userinfo {
|
|
35
|
-
>* {
|
|
36
|
-
z-index: 3;
|
|
37
|
-
}
|
|
38
|
-
text-align: center;
|
|
39
|
-
.name {
|
|
40
|
-
font-size: 20px;
|
|
41
|
-
}
|
|
42
|
-
.info {
|
|
43
|
-
font-size: 18px;
|
|
44
|
-
display: inline-block;
|
|
45
|
-
}
|
|
46
|
-
padding: 20px 0;
|
|
47
|
-
width: 100%;
|
|
48
|
-
height: auto;
|
|
49
|
-
background: #ccc url('user/profile-bg.jpg') no-repeat center / cover;
|
|
50
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
var page = createElement("div");
|
|
2
|
-
var usernameElement = createElement(input);
|
|
3
|
-
var passwordElement = createElement(input);
|
|
4
|
-
passwordElement.type = "password";
|
|
5
|
-
var repeatpwElement = createElement(passwordElement);
|
|
6
|
-
var submitButton = button("立即注册");
|
|
7
|
-
css(submitButton, "height:36px;vertical-align:middle;width:100%");
|
|
8
|
-
var headWidth = 8;
|
|
9
|
-
var options = group(
|
|
10
|
-
field("用户名", usernameElement, false, headWidth),
|
|
11
|
-
field("密码", passwordElement, false, headWidth),
|
|
12
|
-
field("确认密码", repeatpwElement, false, headWidth),
|
|
13
|
-
field("", submitButton, false, headWidth)
|
|
14
|
-
);
|
|
15
|
-
appendChild(page, options);
|
|
16
|
-
titlebar("注册", ["提交"]);
|
|
17
|
-
page.initialStyle = 'marginLeft:100%';
|
|
18
|
-
function register() {
|
|
19
|
-
return page;
|
|
20
|
-
}
|