Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
libai
/
footseen-large-website
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8c180d07
authored
Jun 29, 2022
by
libai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
c054d744
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
166 additions
and
27 deletions
yazhaiTest/space/css/index.css
yazhaiTest/space/css/index.less
yazhaiTest/space/myRoom.html
yazhaiTest/space/css/index.css
View file @
8c180d07
...
...
@@ -864,6 +864,17 @@ body::-webkit-scrollbar {
.name-tips
{
position
:
absolute
;
left
:
300px
;
font-size
:
12px
;
}
.sex-tips
{
position
:
absolute
;
left
:
180px
;
font-size
:
12px
;
}
.birth-tips
{
position
:
absolute
;
left
:
370px
;
font-size
:
12px
;
}
.id-tips
{
position
:
absolute
;
...
...
yazhaiTest/space/css/index.less
View file @
8c180d07
...
...
@@ -891,6 +891,17 @@ body::-webkit-scrollbar {
.name-tips{
position: absolute;
left: 300px;
font-size: 12px;
}
.sex-tips{
position: absolute;
left: 180px;
font-size: 12px;
}
.birth-tips{
position: absolute;
left: 370px;
font-size: 12px;
}
.id-tips{
position: absolute;
...
...
yazhaiTest/space/myRoom.html
View file @
8c180d07
...
...
@@ -52,7 +52,7 @@
</div>
<h2
class=
"myRoom-h2"
><div></div>
基本資訊
<span
data-type=
"1"
class=
"myRoom-text-exc"
>
編輯
</span></h2>
<ul
style=
"display: none;"
class=
"myRoom-ul"
>
<ul
class=
"myRoom-ul"
>
<!-- <li>暱稱: <span>主播暱稱預留</span></li>
<li>ID: <span>1235512</span></li>
<li>性別: <span>女</span></li>
...
...
@@ -63,15 +63,16 @@
<li>職業: <span>老司機</span></li>
<li>簽名: <span>簽名預留簽名預留,簽名預留</span></li> -->
</ul>
<ul
class=
"myRoom-exc-ul"
>
<li>
暱稱 :
<input
class=
"name-input"
placeholder=
"用户昵称预留"
type=
"text"
><span
class=
"name-tips"
>
(首次免費)
</span></li>
<ul
style=
"display: none;"
class=
"myRoom-exc-ul"
>
<li>
暱稱 :
<input
maxlength=
"16"
class=
"name-input"
placeholder=
"用户昵称预留"
type=
"text"
><span
class=
"name-tips"
>
(首次免費)
</span></li>
<li>
ID :
<span
class=
"id-tips"
>
1235512
</span></li>
<li>
性別 :
<select
name=
"sex"
class=
"sex-select"
>
<option
value=
""
>
保密
</option>
<option
value=
""
>
女
</option>
<option
value=
""
>
男
</option>
<option
value=
"
-1
"
>
保密
</option>
<option
value=
"
0
"
>
女
</option>
<option
value=
"
1
"
>
男
</option>
</select>
<span
class=
"sex-tips"
>
(性別只能更改一次)
</span>
</li>
<li>
生日 :
<select
name=
"year"
id=
"year"
>
...
...
@@ -83,35 +84,36 @@
<select
id=
"days"
class=
"day"
>
<option
value=
""
>
选择日期
</option>
</select>
<span
class=
"birth-tips"
>
(生日只能更改一次)
</span>
</li>
<li>
身高 :
<select
name=
"man-height"
class=
"height-select"
>
<option
value=
""
>
180cm
</option>
<option
value=
""
>
185cm
</option>
<option
value=
""
>
保密
</option>
</select>
</li>
<li>
體重 :
<select
name=
"man-weight"
class=
"weight-select"
>
<option
value=
""
>
60kg
</option>
<option
selected
value=
""
>
65kg
</option>
<option
value=
""
>
70kg
</option>
<option
value=
""
>
保密
</option>
</select>
</li>
<li>
學歷 :
<select
name=
"man-education"
class=
"education-select"
>
<option
value=
""
>
國小
</option>
<option
value=
""
>
保密
</option>
<!-- <option value="">國小</option>
<option value="">國中</option>
<option value="">高中</option>
<option value="">五專</option>
<option value="">高職</option>
<option selected value="">本科</option>
<option value="">碩士</option>
<option
value=
""
>
博士
</option>
<option value="">博士</option>
-->
</select>
</li>
<li>
職業 :
<input
class=
"profession-input"
placeholder=
"輸入您的職業"
type=
"text"
></li>
<li>
簽名 :
<input
class=
"sign-input"
placeholder=
"請輸入簽名"
type=
"text"
></li>
<li>
職業 :
<input
maxlength=
"10"
class=
"profession-input"
placeholder=
"輸入您的職業"
type=
"text"
></li>
<li>
簽名 :
<input
maxlength=
"80"
class=
"sign-input"
placeholder=
"請輸入簽名"
type=
"text"
></li>
</ul>
</div>
</div>
...
...
@@ -125,6 +127,9 @@
<script>
$
(
function
(){
var
faceGoT
=
null
var
year
=
0
var
month
=
0
var
day
=
0
loginGo
()
$
.
ajax
({
url
:
$ip
+
'zone/userInfo/dataCard'
,
...
...
@@ -146,7 +151,9 @@ $(function(){
if(data.zoneInfo.birth=='')html+='
<
li
>
生日
:
<
span
>
未知
<
/span></
li
>
';
else html+='
<
li
>
生日
:
<
span
>
'+data.zoneInfo.birth+'
<
/span></
li
>
';
if(data.zoneInfo.height=='')html+='
<
li
>
身高
:
<
span
>
未知
<
/span></
li
>
';
html+='
<
li
>
體重
:
<
span
>
'+data.zoneInfo.height+'
<
/span></
li
>
';
else html+='
<
li
>
身高
:
<
span
>
'+data.zoneInfo.height+'
cm
<
/span></
li
>
';
if(data.zoneInfo.weight=='')html+='
<
li
>
體重
:
<
span
>
未知
<
/span></
li
>
';
else html+='
<
li
>
體重
:
<
span
>
'+data.zoneInfo.weight+'
kg
<
/span></
li
>
';
html+='
<
li
>
學歷
:
<
span
>
'+data.zoneInfo.culture+'
<
/span></
li
>
';
html+='
<
li
>
職業
:
<
span
>
'+data.zoneInfo.work+'
<
/span></
li
>
';
html+='
<
li
>
簽名
:
<
span
>
'+data.zoneInfo.sign+'
<
/span></
li
>
';
...
...
@@ -154,27 +161,137 @@ $(function(){
$(".myRoom-face-box").append('
<
a
href
=
"index.html?fid='+data.zoneInfo.uid+'"
><
span
class
=
"myRoom-go-space"
>
前往我的主頁
><
/span></
a
>
'
)
$
(
".myRoom-text-exc"
).
unbind
(
"click"
).
on
(
"click"
,
function
(){
if
(
$
(
".myRoom-text-exc"
).
attr
(
"data-type"
)
==
1
){
$
(
".myRoom-text-exc"
).
attr
(
"data-type"
,
"2"
);
$
(
".myRoom-text-exc"
).
text
(
"保存"
)
var
html
=
[];
for
(
var
i
=
120
;
i
<
251
;
i
++
){
if
(
data
.
zoneInfo
.
height
==
i
)
html
+=
'
<
option
selected
value
=
"'+i+'"
>
'+i+'
cm
<
/option>'
;
else
html
+=
'
<
option
value
=
"'+i+'"
>
'+i+'
cm
<
/option>'
;
}
$
(
".height-select"
).
append
(
html
)
var
html
=
[];
for
(
var
i
=
35
;
i
<
121
;
i
++
){
if
(
data
.
zoneInfo
.
weight
==
i
)
html
+=
'
<
option
selected
value
=
"'+i+'"
>
'+i+'
kg
<
/option>'
;
else
html
+=
'
<
option
value
=
"'+i+'"
>
'+i+'
kg
<
/option>'
;
}
$
(
".weight-select"
).
append
(
html
);
var
myCulture
=
data
.
zoneInfo
.
culture
$
.
ajax
({
url
:
$ip
+
'user/getCultureList'
,
data
:{
pageID
:
localStorage
.
canvasCode
,
uid
:
localStorage
.
uid
,
token
:
localStorage
.
token
,
},
success
:
function
(
data
){
console
.
log
(
'學歷列表接口'
,
data
)
var
html
=
[];
for
(
var
i
=
0
;
i
<
data
.
list
.
length
;
i
++
){
var
list
=
data
.
list
[
i
]
if
(
myCulture
==
list
.
name
)
html
+=
'
<
option
selected
value
=
"'+list.value+'"
>
'+list.name+'
<
/option>'
;
else
html
+=
'
<
option
value
=
"'+list.value+'"
>
'+list.name+'
<
/option>'
;
}
$
(
".education-select"
).
append
(
html
);
}
})
$
(
".myRoom-ul"
).
hide
()
$
(
".myRoom-exc-ul"
).
show
()
$
(
".name-input"
).
val
(
data
.
zoneInfo
.
nickname
)
$
(
".id-tips"
).
text
(
data
.
zoneInfo
.
uid
)
if
(
data
.
zoneInfo
.
sex
==-
1
)
$
(
".sex-select option"
).
eq
(
0
).
attr
(
"selected"
,
"true"
);
else if(data.zoneInfo.sex==0)$(".sex-select option").eq(1).attr("selected","true");
else if(data.zoneInfo.sex==1)$(".sex-select option").eq(2).attr("selected","true");
else
if
(
data
.
zoneInfo
.
sex
==
0
){
$
(
".sex-select option"
).
eq
(
1
).
attr
(
"selected"
,
"true"
);
$
(
".sex-select"
).
attr
(
"disabled"
,
"disabled"
)
}
else{
else
if
(
data
.
zoneInfo
.
sex
==
1
){
$
(
".sex-select option"
).
eq
(
2
).
attr
(
"selected"
,
"true"
);
$
(
".sex-select"
).
attr
(
"disabled"
,
"disabled"
)
}
$
(
".profession-input"
).
val
(
data
.
zoneInfo
.
work
)
$
(
".sign-input"
).
val
(
data
.
zoneInfo
.
sign
)
console
.
log
(
data
.
zoneInfo
.
birth
.
split
(
'-'
))
$
(
"#date"
).
selectDate
()
$
(
"#days"
).
focusout
(
function
(){
year
=
$
(
"#year option:selected"
).
val
()
month
=
$
(
"#month option:selected"
).
val
()
day
=
$
(
"#days option:selected"
).
val
()
})
for
(
var
i
=
0
;
i
<
$
(
"#year option"
).
length
;
i
++
){
if
(
data
.
zoneInfo
.
birth
.
split
(
'-'
)[
0
]
==
$
(
"#year option"
).
eq
(
i
).
val
()){
$
(
"#year option"
).
eq
(
i
).
attr
(
"selected"
,
"true"
)
$
(
"#month option:selected"
).
html
(
data
.
zoneInfo
.
birth
.
split
(
'-'
)[
1
]
+
'月'
)
$
(
"#days option:selected"
).
html
(
data
.
zoneInfo
.
birth
.
split
(
'-'
)[
2
]
+
'日'
)
$
(
"#year,#month,#days"
).
attr
(
"disabled"
,
"disabled"
)
}
}
// for(var i=0;i
<
$
(
"#month option"
).
length
;
i
++
){
// if(data.zoneInfo.birth.split('-')[1]==$("#month option").eq(i).val()){
// $("#month option").eq(i).attr("selected","true")
// }
// }
// for(var i=0;i
<
$
(
"#days option"
).
length
;
i
++
){
// if(data.zoneInfo.birth.split('-')[2]==$("#days option").eq(i).val()){
// $("#days option").eq(i).attr("selected","true")
// }
// }
}
else
{
if
(
$
(
".name-input"
).
val
()
!=
data
.
zoneInfo
.
nickname
){
var
nicknameNum
=
$
(
".name-input"
).
val
()
}
if
(
year
!=
0
&&
month
!=
0
&&
day
!=
0
){
var
birthNum
=
year
+
'-'
+
month
+
'-'
+
day
;
}
if
(
$
(
".sex option:selected"
).
val
()
!=
data
.
zoneInfo
.
sex
){
var
sexNum
=
$
(
".sex option:selected"
).
val
()
}
if
(
$
(
".sign-input"
).
val
()
!=
data
.
zoneInfo
.
sign
){
var
signNum
=
$
(
".sign-input"
).
val
()
}
if
(
$
(
".height-select option:selected"
).
val
()
!=
data
.
zoneInfo
.
height
){
var
heightNum
=
$
(
".height-select option:selected"
).
val
()
}
if
(
$
(
".weight-select option:selected"
).
val
()
!=
data
.
zoneInfo
.
weight
){
var
weightNum
=
$
(
".weight-select option:selected"
).
val
()
}
if
(
$
(
'.profession-input'
).
val
()
!=
data
.
zoneInfo
.
work
){
var
workNum
=
$
(
'.profession-input'
).
val
()
}
if
(
$
(
".culture-select option:selected"
).
html
()
!=
data
.
zoneInfo
.
culture
&&
$
(
".culture-select option:selected"
).
html
()
!=
'幼稚園'
){
var
cultureNum
=
$
(
".culture-select option:selected"
).
val
()
}
$
.
ajax
({
url
:
$ip
+
'user/updateUserData'
,
data
:{
uid
:
localStorage
.
uid
,
token
:
localStorage
.
token
,
pageID
:
localStorage
.
canvasCode
,
nickname
:
nicknameNum
||
''
,
birth
:
birthNum
||
''
,
sex
:
sexNum
||
''
,
sign
:
signNum
||
''
,
height
:
heightNum
||
''
,
weight
:
weightNum
||
''
,
work
:
workNum
||
''
,
culture
:
cultureNum
||
''
,
},
type
:
'post'
,
success
:
function
(
data
){
console
.
log
(
'修改个人信息'
,
data
)
if
(
data
.
code
!=
1
){
layer
.
msg
(
data
.
msg
)
return
}
window
.
location
.
reload
()
}
})
}
})
$("#date").selectDate()
$("#days").focusout(function(){
var year = $("#year option:selected").html()
var month = $("#month option:selected").html()
var day = $("#days option:selected").html()
}
})
console
.
log
(
$
(
".sex-select option:selected"
).
html
())
$
(
".myRoom-face-exc"
).
on
(
"click"
,
function
(){
localStorage
.
face
=
0
...
...
@@ -193,11 +310,11 @@ $(function(){
$
(
".myRoom-face"
).
attr
(
"src"
,
localStorage
.
face
)
clearInterval
(
faceGoT
)
$
.
ajax
({
url
:
$ip
+
'user/update
Info
'
,
url
:
$ip
+
'user/update
UserData
'
,
data
:{
uid
:
localStorage
.
uid
,
token
:
localStorage
.
token
,
base64
:
localStorage
.
face
,
faceimg
:
localStorage
.
face
,
pageID
:
localStorage
.
canvasCode
,
// nickName:$(".login-more-top-p1").text()
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment