-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyaccount.html
206 lines (197 loc) · 6.89 KB
/
myaccount.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>我的帳戶</title>
<link rel="stylesheet" type="text/css" href="./css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="./css/normalize.css"/>
<link rel="stylesheet" type="text/css" href="./css/stackedCards.css"/>
<link rel="stylesheet" type="text/css" href="./css/swiper.css"/>
<link rel="stylesheet" type="text/css" href="./css/hsycmsAlert.css"/>
<link rel="stylesheet" type="text/css" href="./css/style.css"/>
<link rel="stylesheet" type="text/css" href="./css/media.css"/>
<script src="./js/jquery-2.1.1.min.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/web3-provider.min.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/web3.min.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/stackedCards.min.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/chEnText.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/hsycmsAlert.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/function.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/chainProvider.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/common_1.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/upload.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css">
#preview img{
height: 100% !important;
}
.pwdMessage{
color:#e4393c;
margin-bottom: 30px;
display: none;
}
.input-position{
position: relative;
}
.input-position .pwdMessage{
position: absolute;
bottom:-20px;
left: 0;
font-size: 12px;
}
.pswrule{
position: absolute;
left: 0;
font-size: 12px;
color: #fff;
opacity: 0.4;
bottom: 5px;
}
</style>
</head>
<body>
<!-- head -->
<div id="myaccount" v-cloak>
<div class="headerpage"></div>
<div class="bzy-title center-80"><span class="language-tc">{{chEnTextHtml[lang].title}}</span></div>
<div class="my-account center-80 my-assets flex">
<div class="my-account-left flex">
<div class="my-account-left-img">
<!--<img src="./images/headicon.png" alt="">-->
<div id="drop_area"></div>
</div>
<div class="my-account-left-des">{{chEnTextHtml[lang].switchtx}}</div>
</div>
<div class="my-account-right">
<div class="my-account-right-top">
<div class="my-account-right-tit">{{chEnTextHtml[lang].mynickname}}</div>
<div class="my-account-right-name my-account-name">----</div>
<div class="my-account-right-change modify-tc-pc tc-show flex accountclass" id="changeName" onclick="changeName()"><span class="language-tc">{{chEnTextHtml[lang].switch}}</span></div>
</div>
<div class="my-account-right-center flex">
<div class="my-account-right-center-item">
<div class="my-account-right-tit">{{chEnTextHtml[lang].email}}</div>
<div class="my-account-right-name my-account-email">----</div>
<!--<div class="my-account-right-change modify-tc-pc tc-show accountclass flex flex" onclick="changeEmail()">Change</div>-->
</div>
<div class="my-account-right-center-item">
<div class="my-account-right-tit">{{chEnTextHtml[lang].phone}}</div>
<div class="my-account-right-name my-account-phone">----</div>
<!--<div class="my-account-right-change modify-tc-pc tc-show accountclass flex flex" onclick="changePhone()">Change</div>-->
</div>
</div>
<div class="my-account-right-bottom">
<a class="flex modify-tc-pc tc-show accountclass flex" href="javascript:void(0)" onclick="changePwd()"><span class="language-tc">{{chEnTextHtml[lang].switchpsw}}</span></a>
</div>
</div>
</div>
<!-- foot -->
<div class="footerpage"></div>
<!-- modify -->
<div class="modify none">
<div class="modify-container flex">
<div class="modify-form">
<div class="modify-tit flex" data-type="name"><span>title</span><img class="none" onclick="cancelMobile()" src="./images/Close.png" ></div>
<div class="modify-ipt"></div>
<div class="modify-btn flex">
<button class="add modify-btn-active" type="button"></button>
<button class="cancel" type="button" onclick="cancel()">取消</button>
<button class="cancel cancel-mobile none" type="button" onclick="cancelMobile()">取消</button>
</div>
<div class="modify-close" onclick="cancel()"><img src="./images/Close.png" ></div>
</div>
</div>
</div>
<div class="tips"></div>
</div>
</body>
<script src="./js/myaccount.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
var dragImgUpload = new DragImgUpload("#drop_area",{
callback:function (files) {
//回调函数,可以传递给后台等等
var file = files[0];
if (file.type.indexOf('image') == -1) {
// tips('上传图片格式不正确,请重新上传');
alert("請使用圖像文件~");
$('.my-account-left-img img').attr('src',tximg);
return;
}
var form = new FormData();
form.append("file", file);
$.ajax({
type: 'POST',
url: '/file/upload',
data: form,
processData: false,
contentType: false,
success: function (res) {
if(res.code == '0'){
var head_pic = res.data[0];
update_info(head_pic);
}
}
})
function update_info(headIcon)
{
if(headIcon != ''){
$.ajax({
type:"POST",
url:"/user/update",
contentType: 'application/json',
dataType: 'json',
data:JSON.stringify({
headIcon:headIcon
}),
success:function(res){
//window.location.reload()
}
})
}
}
}
})
</script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
var app = new Vue({
el: '#myaccount',
data: function () {
return {
chEnTextHtml: {
"TC":{
title : "我的帳戶",
switchtx : "單擊更換頭像",
mynickname : "我的暱稱",
switch : "更換",
email : "電子信箱",
phone : "手机號碼",
switchpsw : "更換密碼"
},
"EN":{
title : "My Account",
switchtx : "Click to change your avatar",
mynickname : "My nickname",
switch : "change",
email : "E-mail",
phone : "Cell phone",
switchpsw : "Change password"
}
},
lang:''
}
},
created() {
let self = this;
this.lang = getCookie("lang")?getCookie("lang"):'TC';
if(this.lang == 'TC'){
document.title = '我的帳戶';
}else{
document.title = 'My Account';
}
}
})
</script>
</html>