-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMyInfo.html
509 lines (444 loc) · 26.8 KB
/
MyInfo.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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
<!DOCTYPE html>
<html lang="zh-hant">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="./favicon.ico"/>
<link rel="bookmark" href="./favicon.ico"/>
<!-- TweenMax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.3/TweenMax.min.js"
integrity="sha512-DkPsH9LzNzZaZjCszwKrooKwgjArJDiEjA5tTgr3YX4E6TYv93ICS8T41yFHJnnSmGpnf0Mvb5NhScYbwvhn2w=="
crossorigin="anonymous"></script>
<!-- icon -->
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous"/>
<!-- 裁減圖片css -->
<link rel="stylesheet" href="./js/croppie/croppie.css">
<!-- css -->
<link rel="stylesheet" href="./css/style.css">
<!-- hamburgers_css -->
<link rel="stylesheet" href="./css/hamburgers.css">
<!-- jq -->
<script src="./js/jquery/dist/jquery.min.js"></script>
<!-- vue -->
<script src="./js/vue.min.js"></script>
<!-- croppie -->
<script src="./js/croppie/croppie.js"></script>
<!-- 加密 js -->
<script src="./js/crypto-js/crypto-js.js"></script>
<!-- 發信 js -->
<script src="./js/smtp.js"></script>
<!-- axios js -->
<script src="./js/axios/dist/axios.min.js"></script>
<title>個人資料</title>
</head>
<body class="mList">
<!------------------------------header---------------------------------->
<header class="header">
<nav class="nav" id="nav">
<a href="./main.html" class="Logo"><img src="./images/logo.png"></a>
<ul class="navlist">
<!-- 換登出圖 -->
<li class="username" v-if="userid != null" @click="logout"></li>
<div class="log_out"></div>
<!-- 換會員圖 -->
<li class="user" v-if="userid != null"><a :href="member">
<!-- <i class="fas fa-user fa-2x"> 原本方法-->
<!-- <img src="images/header/member_icon.png"> img方法不行-->
<div class="userlog"><img :src=navimg></div> <!--背景圖方法可行-->
</a></li>
<!-- 換會員圖 -->
<li class="user" v-else="userid == null"><a href="#" @click="login">
<!-- <i class="fas fa-user fa-2x"> 原本方法-->
<!-- img方法試試<img src="images/header/member_icon.png"> img方法不行-->
<div class="user"></div> <!--背景圖方法可行-->
</a></li>
<!-- 換購物車圖 -->
<li class="car"><a href="./moonShopCar.html">
<!-- <i class="fas fa-shopping-cart fa-2x"></i> 原本方法-->
<!-- <img src="../images/header/shopping_cart_55.png"> img方法不行-->
<div class="shop_cart"></div> <!--背景圖方法可行-->
</a></li>
<li class="bars">
<button class="hamburger hamburger--collapse" type="button">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</button>
<!-- <a><i class="fas fa-bars fa-2x" id="icon"></i></a> -->
<ul class="barList">
<li><a href="./moonMapList.html">月老地圖</a></li>
<li><a href="./moondrawl.html">月老求籤</a></li>
<li v-if="userid != null"><a href="./moonMatch.html">月老牽線</a></li>
<li v-else="userid == null" @click="warning"><a href="#">月老牽線</a></li>
<li><a href="./know.html">月老小知識</a></li>
<li><a href="./moonShop.html">月老商城</a></li>
</ul>
</li>
</ul>
</nav>
</header>
<!-- 登入登出 -->
<div class="login_pop" v-bind:class="{block:pop_block}" id="pop">
<div class="login_pop_in">
<!-- 登入 -->
<div class="account_login" v-bind:class="{flex:log_flex}">
<i class="fas fa-times-circle fa-2x" @click="close"><i class="in_btn"></i></i>
<div class="account_inbox">
<h1 class="account_text_login">會員登入</h1>
<form method="post" action="./php/loginR.php">
<div class="inputbox">
<h3 class="input_text">帳號</h3>
<input class="input_login" type="text" name="username" :placeholder = "lgUsp" id="input_log_username" :change="clearChineseLogin('login_username')" v-model="login_username" :class="{inp_error : lgUser == 1}" @click="input_log_user" @keydown.enter.prevent>
</div>
<div class="inputbox">
<h3 class="input_text">密碼</h3>
<input class="input_login" type="password" name="password" :placeholder="lgPsp" id="input_log_pwd" v-model="login_pwd" :class="{inp_error : lgPwd == 1}" @click="input_log_pwd" @keydown.enter.prevent>
</div>
<div class="inputbox">
<span class="input_text"></span>
<p class="str_error h0" v-if="login_error">帳號或密碼錯誤<p>
</div>
<div class="submit_login">
<button class="btn_signup btnBlue_signup" @click="btn_signup">註冊</button>
<button class="btn_signup btnRed_signup" @click="login($event,login_username,login_pwd,'login')">登入</button>
</div>
</form>
</div>
</div>
<!-- 註冊 -->
<div class="account_signup" id="signup" v-bind:class="{flex:sign_flex}">
<i class="fas fa-times-circle fa-2x" @click="close"><i class="in_btn"></i></i>
<div class="account_inbox">
<h1 class="account_text_signup">註冊</h1>
<form method="post" action="./php/signupR.php" @submit="signup($event,signup_username,signup_pwd,signup_repwd,signup_email,'signup')">
<div class="inputbox inputbox_signup">
<h3 class="input_text">帳號</h3>
<input class="input_signup" type="text" name="username" :placeholder="siUsp" id="input_sign_username" :change="clearChinese('signup_username')" v-model="signup_username" :class="{inp_error : siUser == 1}" @click="input_sign_user" @keyup="checkUser(signup_username)" @keydown.enter.prevent>
<p class="right_space str_error" v-if="user_error == 2">此帳號有人使用</p>
<p class="right_space str_clear" v-else-if="user_error == '1'">此帳號可以使用</p>
<span class="right_space" v-else="user_error"></span>
</div>
<div class="inputbox inputbox_signup">
<h3 class="input_text">密碼</h3>
<input class="input_signup" type="password" name="password" :placeholder="siPsp" id="input_sign_pwd" v-model="signup_pwd" :class="{inp_error : siPwd == 1}" @click="input_sign_pwd" @keydown.enter.prevent>
<input type="hidden" name="hide" id="hide" />
<span class="right_space"></span>
</div>
<div class="inputbox inputbox_signup">
<h3 class="input_text">確認密碼</h3>
<input class="input_signup" type="password" id="input_repwd" :placeholder="siRePsp" v-model="signup_repwd" :class="{inp_error : siRePwd == 1}" @click="input_sign_repwd" @keydown.enter.prevent>
<span class="right_space"></span>
</div>
<div class="inputbox inputbox_signup">
<h3 class="input_text">信箱</h3>
<input class="input_signup" type="email" name="email" id="email" v-model="signup_email" :placeholder="email" :class="{inp_error : siEmail == 1}" @click="input_sign_email">
<button class="btnBlue_Ver" @click.prevent="submit_ver(signup_email)">{{send_email}}</button>
</div>
<div class="inputbox inputbox_signup" v-if="checked_mail != ''">
<h3 class="input_text">驗證碼</h3>
<input class="input_signup" type="number" name="number" :placeholder="ver" v-model="check_ver" :class="{inp_error : siVer == 1}" @click="siVer = 0" @keydown.enter.prevent>
<button class="btnBlue_Ver" @click.prevent="ver_check">確認驗證碼</button>
</div>
<div class="submit_signup">
<button type='submit' v-if="result" class="btn_signup btnRed_signup">送出</button>
<button type='submit' v-else="result" @click.prevent="remind" class="btn_signup btnRed_signup" style="background-color: gray;">送出</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- 燈箱結束 -->
<!-- 背景雲 -->
<div class="membercloud">
<div class="cloud cloud1" id="rtct">
<img src="./images/style/rtct.png">
</div>
<div class="cloud cloud2" id="rtcb">
<img src="./images/style/rtcb.png">
</div>
<div class="cloud cloud3" id="ltcr">
<img src="./images/style/ltcr.png">
</div>
<div class="cloud cloud4" id="ltcl">
<img src="./images/style/ltcl.png">
</div>
<div class="cloud cloud5" id="rbcr">
<img src="./images/style/rbcr.png">
</div>
<div class="cloud cloud6" id="rbcl">
<img src="./images/style/rbcl.png">
</div>
<div class="cloud cloud7" id="lbcb">
<img src="./images/style/lbcb.png">
</div>
<div class="cloud cloud8" id="lbct">
<img src="./images/style/lbct.png">
</div>
</div>
<div id="member" class="MyInfo-wrapper">
<!------------------------------內容---------------------------------->
<!------------------------------側邊選單---------------------------------->
<aside>
<ul class="option">
<li class="list" v-for="(list,key) in lists" :key="key">
<a :href="list.href">
<h3 class="listName">
{{list.list}}
</h3>
</a>
</li>
</ul>
</aside>
<!------------------------------主要內容---------------------------------->
<main>
<div class="pinkBox_account">
<!---------------- 吉祥物---------------- -->
<div class="inBox_account ALeft">
<div class="mascotimg">
<img v-if="hasMascot" :src="mascot" class="mascot">
<div class="nomascot" v-else="hasMascot">
<img src="./images/MyInfo/mascot.png" class="mascot">
<h3>還沒有吉祥物哦 !</h3>
<button class="btnBlue_NewMascot">
<a href="./MyMascot.html">
創建吉祥物
</a>
</button>
</div>
</div>
</div>
<!---------------------------- 會員資料------------------------------------>
<div class="inBox_account ARight">
<!---------------- btn------------------>
<button v-if="modify" class="btnBlue_submit submit" @click="submitInfo">
<h4>
修改完成
</h4>
</button>
<button v-else="modify" class="btnRed_submit submit" @click="changeInfo">
<h4>
修改資料
</h4>
</button>
<!---------------- 表單------------------>
<form name="account" method="post" action="./php/modifyR.php" class="MyInfoform" :class="{modify : modify}">
<div class="mainInfo">
<div class="inputRow">
<h4 class="name mainH4">帳號</h4>
<h4>{{username}}</h4>
</div>
<div class="inputRow" v-if="modify">
<h4 class="name mainH4">密碼</h4>
<input type="password" class="member_input type_text" name="password" v-model="pwd" @click="pwd_error = false" :disabled ="oldpwd == true" :placeholder="mcusp" :class="{disabled: oldpwd == true,inp_error : pwd_error == true,str_error : pwd_error == true}">
<i class="fas fa-edit" v-if="modify" @click="modifyPwd"></i>
</div>
<div class="inputRow" v-if="modify" v-show="oldpwd == false">
<h4 class="name mainH4">重新輸入密碼</h4>
<input type="password" class="member_input type_text" v-model="repwd" @click="pwd_error = false" :placeholder="mcusp" :class="{inp_error : pwd_error == true,str_error : pwd_error == true}">
</div>
<div class="inputRow">
<h4 class="name mainH4">信箱</h4>
<input type="email" class="member_input type_text" v-if="modify" :class="{ disabled: changeEmail == false }" v-model="email" :disabled ="changeEmail != true" name="email">
<i class="fas fa-edit" v-if="modify" @click="modifyEmail"></i>
<h4 v-else="modify">{{email}}</h4>
</div>
<div class="inputRow verify" v-if="changeEmail">
<button class="btnBlue_Ver btn" @click.prevent="submit_ver(email)">
<h4>{{send_email}}</h4>
</button>
</div>
<div class="inputRow" v-if="changeEmail">
<h4 class="name mainH4">輸入驗證碼</h4>
<input class="member_input type_text" type="number" name="number" :placeholder="ver" v-model="check_ver" :class="{inp_error : siVer == 1}" @click="siVer = 0">
</div>
<div class="inputRow verify" v-if="changeEmail">
<button class="btnBlue_Ver btn" @click.prevent="ver_check">
<h4>確認驗證碼</h4>
</button>
</div>
</div>
<!---------------- 更新大頭貼------------------>
<div class="profile">
<div class="inprofile">
<div class="img">
<img :src="profile" id="newImg">
</div>
<div class="upload_btn">
<label>
<input id="upload_img" style="display:none;" type="file" accept="image/*" >
<i class="fas fa-camera"></i>
</label>
</div>
</div>
<!-- 更新大頭貼照片button,位置需要再調整 -->
<button id="crop_img" class="btnBlue_crop btn" style="display:none"><i class="fa fa-scissors"></i> 裁剪圖片</button>
</div>
<!---------------- 分界線------------------>
<div class="border"></div>
<!---------------- 會員資料第二部分------------------>
<div class="moreInfo">
<div class="inputRow">
<h4 class="name more">
暱稱
</h4>
<input type="text" class="member_input type_text" v-if="modify" v-model="nickname" name="nickname">
<h4 v-else="modify" :class="{gray : nickname == '還沒填寫哦'}">
{{nickname}}
</h4>
</div>
<div class="inputRow">
<h4 class="name more">
關於會員
</h4>
<input type="text" class="member_input type_text" v-if="modify" v-model="about" name="about">
<h4 v-else="modify" :class="{gray : about == '還沒填寫哦'}">
{{about}}
</h4>
</div>
<div class="inputRow">
<h4 class="name more">
年齡
</h4>
<select name="ages" v-if="modify" v-model="myage">
<option v-for="age in ages" :selected="ages == 'myage'">
{{age}}
</option>
</select>
<h4 v-else="modify" :class="{gray : myage == '還沒填寫哦'}">
{{myage}}
</h4>
</div>
<div class="inputRow row_mult">
<h4 class="name more checkboxH4">
興趣
</h4>
<div class="check_box" v-if="modify">
<interests v-for="interest in interests" :the-text="interest.interest" :checked="interest.checked" @click.native="checkInt(interest.interest)"></interests>
</div>
<h4 v-else="modify" :class="{gray : interest == '還沒填寫哦'}">
{{interest}}
</h4>
</div>
<div class="inputRow row_mult">
<h4 class="name more">
居住地
</h4>
<select name="area" v-if="modify" v-model="city">
<option v-for="city in area" :selected="city == area">
{{city}}
</option>
</select>
<h4 v-else="modify" :class="{gray : city == '還沒填寫哦'}">
{{city}}
</h4>
</div>
<div class="inputRow selectAndInput row_mult">
<h4 class="name more">
職業
</h4>
<div class="selection" v-if="modify">
<select name="job" v-model="job">
<option v-for="job in jobs" :selected="job == jobs">
{{job}}
</option>
</select>
<h4 class="h4space"> / </h4>
<input type="text" class="member_input type_text" v-model="work" name="work">
</div>
<h4 v-else="modify" :class="{gray : job == '還沒填寫哦' || work == '還沒填寫哦'}">
{{job}} / {{work}}
</h4>
</div>
<div class="inputRow row_mult">
<h4 class="name more">
學歷
</h4>
<div class="selection" v-if="modify">
<select name="education" v-model="education">
<option v-for="education in educations" :seleceted="education == educations">
{{education}}
</option>
</select>
<h4> / </h4>
<input type="text" class="member_input type_text" v-model="school" name="school">
</div>
<h4 v-else="modify" :class="{gray : education == '還沒填寫哦' || school == '還沒填寫哦'}">
{{education}} / {{school}}
</h4>
</div>
<div class="inputRow">
<h4 class="name more checkboxH4">
我是
</h4>
<div class="check_box" v-if="modify">
<sexs v-for="sex in sexs" :the-text="sex.sex" :checked="sex.checked" @click.native="checktrue(sex.sex,'sex')"></sexs>
</div>
<h4 v-else="modify" :class="{gray : sex == '還沒填寫哦'}">
{{sex}}
</h4>
</div>
<div class="inputRow">
<h4 class="name more checkboxH4">
性取向
</h4>
<div class="check_box" v-if="modify">
<seo v-for="seo in seos" :the-text="seo.seo" :checked="seo.checked" @click.native="checktrue(seo.seo,'seo')"></seo>
</div>
<h4 v-else="modify" :class="{gray : seo == '還沒填寫哦'}">
{{seo}}
</h4>
</div>
</div>
<!---------------- 分界線------------------>
<div class="border"></div>
<!---------------- 第三部分------------------>
<div class="privaty">
<div class="inputRow">
<h4 class="name">
控管您的個人資料
</h4>
<i class="fas fa-info"></i>
</div>
<div class="inputRow">
<h4 class="name">
接受月老配對
</h4>
<div class="check_box" v-if="modify">
<match v-for="match in matchs" :the-text="match.title" :checked="match.checked" @click.native="checktrue(match.title,'match')"></match>
</div>
<h4 v-else="modify" >
{{match}}
</h4>
</div>
<div class="inputRow">
<h4 class="name">
對外公開個人資訊
</h4>
<div class="check_box" v-if="modify">
<pri v-for="pri in pris" :the-text="pri.title" :checked="pri.checked" @click.native="checktrue(pri.title,'pri')"></pri>
</div>
<h4 v-else="modify" >
{{pri}}
</h4>
</div>
</div>
</form>
</div>
</div>
</main>
<!-- 背景漂浮雲 -->
<div class="cloud_one"></div>
<div class="cloud_second"></div>
<!-- 背景漂浮雲結束 -->
</div>
<!-- header -->
<script src="./js/1_new.js"></script>
<!-- 登入註冊,需要再新增登入成功後介面 -->
<script src="./js/login.js"></script>
<!-- scroll.js -->
<script src="./js/srcoll.js"></script>
<!-- 個人資料js -->
<script src="./js/member.js"></script>
</body>
</html>