Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
_milo
Great Teamwork
提交
4baf8177
Great Teamwork
项目概览
_milo
/
Great Teamwork
通知
13
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Great Teamwork
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
4baf8177
编写于
5月 06, 2023
作者:
M
m0_74163447
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
后端交互
上级
7f31d405
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
154 addition
and
116 deletion
+154
-116
teamwork/pages/my/main.vue
teamwork/pages/my/main.vue
+48
-54
teamwork/pages/my/my-modify.vue
teamwork/pages/my/my-modify.vue
+79
-52
teamwork/pages/my/my-resetpassword.vue
teamwork/pages/my/my-resetpassword.vue
+23
-8
teamwork/pages/my/my-setting.vue
teamwork/pages/my/my-setting.vue
+4
-2
未找到文件。
teamwork/pages/my/main.vue
浏览文件 @
4baf8177
...
...
@@ -8,7 +8,7 @@
</view>
<view
class=
"info"
>
<view
class=
"info1"
>
<view
class=
"head-portrait"
></view>
<view
class=
"head-portrait"
:style=
"'background: url('+headPortraitIcon+') no-repeat center/cover #eeeeee;'"
></view>
<view
class=
"nickname"
>
{{
nickname
}}
</view>
</view>
<view
class=
"info2"
>
...
...
@@ -20,10 +20,7 @@
<view
class=
"team-icon"
></view>
<view
class=
"team-name"
>
运动小队:
{{
teamName
}}
</view>
</view>
<view
class=
"point"
>
<view
class=
"point-icon"
></view>
<view
class=
"point-num"
>
运动积分:
{{
point
}}
</view>
</view>
</view>
</view>
<view>
...
...
@@ -33,7 +30,7 @@
<view>
我的帖子
</view>
</view>
<view
class=
"running-record"
>
<view
class=
"running-record-icon"
></view>
<view
class=
"running-record-icon"
@
click=
"goToRunningRecord()"
></view>
<view>
运动记录
</view>
</view>
<view
class=
"setting"
>
...
...
@@ -55,11 +52,11 @@
export
default
{
data
()
{
return
{
iStatusBarHeight
:
0
,
nickname
:
'
王二蛋
'
,
schoolName
:
'
福州大学
'
,
teamName
:
'
must go
'
,
point
:
'
1250
'
headPortraitIcon
:
''
,
nickname
:
''
,
schoolName
:
''
,
teamName
:
''
,
point
:
''
}
},
methods
:{
...
...
@@ -77,10 +74,31 @@
uni
.
navigateTo
({
url
:
'
/pages/my/my-resetpassword
'
})
}
},
goToRunningRecord
()
{
uni
.
navigateTo
({
url
:
'
/pages/my/my-running-record
'
})
},
getData
()
{
uniCloud
.
callFunction
({
name
:
'
fe-my-information
'
,
data
:
{
userId
:
'
6450da43e1a35c371b3699cc
'
}
})
.
then
(
res
=>
{
this
.
headPortraitIcon
=
res
.
result
.
data
.
icon
,
this
.
nickname
=
res
.
result
.
data
.
username
,
this
.
schoolName
=
res
.
result
.
data
.
school
,
this
.
teamName
=
res
.
result
.
data
.
team
,
//this.activityList=res.result.data.activityList,
console
.
log
(
res
);
});
},
},
onLoad
()
{
plus
.
navigator
.
setStatusBarBackground
(
'
#EDEEF0
'
);
this
.
getData
()
}
}
</
script
>
...
...
@@ -120,8 +138,8 @@
height
:
200
rpx
;
border-radius
:
50%
;
background-size
:
100%
100%
;
background-image
:
url("/static/my/main/head-portrait.png")
;
background-repeat
:
no-repeat
;
/*
background-image:url("/static/my/main/head-portrait.png") ;
background-repeat:no-repeat;
*/
float
:
left
;
}
.nickname
{
...
...
@@ -139,21 +157,21 @@
border-radius
:
20
rpx
;
background-color
:
#FFFFFF
;
width
:
75%
;
height
:
6
0%
;
height
:
4
0%
;
margin-top
:
50px
;
margin-left
:
auto
;
margin-right
:
auto
;
}
.school
{
height
:
3
0%
;
margin-top
:
20
rpx
;
height
:
5
0%
;
}
.school-icon
{
width
:
7
0
rpx
;
height
:
7
0
rpx
;
margin-top
:
5
0
rpx
;
width
:
10
0
rpx
;
height
:
10
0
rpx
;
margin-top
:
3
0
rpx
;
margin-left
:
50
rpx
;
background-size
:
100%
100%
;
background-image
:
url("/static/my/main/school-icon.png")
;
...
...
@@ -162,23 +180,23 @@
}
.school-name
{
width
:
3
2
0
rpx
;
width
:
3
4
0
rpx
;
height
:
30
rpx
;
margin-top
:
60
rpx
;
margin-right
:
5
5
rpx
;
margin-right
:
4
5
rpx
;
font-size
:
35
rpx
;
text-align
:
left
;
float
:
right
;
}
.team
{
height
:
3
0%
;
height
:
5
0%
;
}
.team-icon
{
width
:
7
0
rpx
;
height
:
7
0
rpx
;
margin-top
:
5
0
rpx
;
width
:
10
0
rpx
;
height
:
10
0
rpx
;
margin-top
:
4
0
rpx
;
margin-left
:
50
rpx
;
background-size
:
100%
100%
;
background-image
:
url("/static/my/main/team-icon.png")
;
...
...
@@ -187,43 +205,19 @@
}
.team-name
{
width
:
320
rpx
;
height
:
30
rpx
;
margin-top
:
60
rpx
;
margin-right
:
55
rpx
;
font-size
:
35
rpx
;
text-align
:
left
;
float
:
right
;
}
.point
{
height
:
30%
;
}
.point-icon
{
width
:
70
rpx
;
height
:
70
rpx
;
margin-top
:
50
rpx
;
margin-left
:
50
rpx
;
background-size
:
100%
100%
;
background-image
:
url("/static/my/main/point-icon.png")
;
background-repeat
:
no-repeat
;
float
:
left
;
}
.point-num
{
width
:
320
rpx
;
width
:
340
rpx
;
height
:
30
rpx
;
margin-top
:
60
rpx
;
margin-right
:
5
5
rpx
;
margin-right
:
4
5
rpx
;
font-size
:
35
rpx
;
text-align
:
left
;
float
:
right
;
}
.func
{
width
:
75%
;
margin-top
:
30
rpx
;
/* margin-top: 10rpx; */
margin-left
:
auto
;
margin-right
:
auto
;
display
:
flex
;
...
...
teamwork/pages/my/my-modify.vue
浏览文件 @
4baf8177
...
...
@@ -6,15 +6,14 @@
<span
class=
"empty"
></span>
</view>
<view
class=
"container"
>
<view
class=
"ui-all"
>
<view
class=
"avatar"
@
tap=
"avatarChoose"
>
<view
class=
"avatar"
@
tap=
"avatarChoose"
>
<view
class=
"imgAvatar"
>
<view
class=
"iavatar"
:style=
"'background: url('+avatar+') no-repeat center/cover #eeeeee;'"
>
</view>
</view>
<text
v-if=
"avatar"
>
修改头像
</text>
<text
v-if=
"!avatar"
>
设置头像
</text>
<view
class=
"iavatar"
:style=
"'background: url('+avatar+') no-repeat center/cover #eeeeee;'"
></view>
</view>
<text>
修改头像
</text>
<button
v-if=
"!avatar"
open-type=
"getUserInfo"
@
tap=
"getUserInfo"
class=
"getInfo"
></button>
</view>
<view
class=
"ui-list"
>
...
...
@@ -30,9 +29,9 @@
</view>
<view
class=
"ui-list right"
>
<text>
性别
</text>
<picker
@
change=
"bindPickerChange"
mode=
'selector'
range-key=
"name"
:value=
"index1"
:range=
"sex"
>
<picker
@
change=
"bindPickerChange"
mode=
'selector'
range-key=
"name"
:value=
"index1"
:range=
"se
lectSe
x"
>
<view
class=
"picker"
>
{{
sex
[
index1
].
name
}}
{{
se
lectSe
x
[
index1
].
name
}}
</view>
</picker>
</view>
...
...
@@ -46,27 +45,25 @@
</view>
<button
class=
"save"
@
tap=
"savaInfo"
>
保 存 修 改
</button>
</view>
</view>
</view>
</
template
>
<
script
>
import
{
pathToBase64
,
base64ToPath
}
from
'
js_sdk/mmmm-image-tools/index.js
'
;
export
default
{
data
()
{
return
{
sex
:
[{
se
lectSe
x
:
[{
id
:
1
,
name
:
'
男
'
},
{
id
:
2
,
name
:
'
女
'
}],
index1
:
0
,
index1
:
'
0
'
,
school
:
[{
id
:
1
,
name
:
'
福州大学
'
...
...
@@ -74,13 +71,13 @@
id
:
2
,
name
:
'
xx大学
'
}],
index2
:
0
,
index2
:
'
0
'
,
avatar
:
''
,
// url:
'',
nickName
:
'
王二蛋
'
,
mobile
:
'
15305986885
'
,
headimg
:
''
schoolName
:
''
,
nickName
:
''
,
mobile
:
''
,
sex
:
''
,
}
},
...
...
@@ -101,26 +98,41 @@
this
.
mobile
=
e
.
detail
.
value
;
},
avatarChoose
()
{
let
that
=
this
;
uni
.
chooseImage
({
count
:
1
,
sizeType
:
[
'
original
'
,
'
compressed
'
],
sourceType
:
[
'
album
'
,
'
camera
'
],
success
:
function
(
res
)
{
var
tempFilePaths
=
res
.
tempFilePaths
;
pathToBase64
(
tempFilePaths
[
0
])
//图像转base64工具
.
then
(
base64
=>
{
that
.
avatar
=
base64
;
//将文件转化为base64并显示
// that.avatarUpload(base64); //同时将头像上传至数据库进行存储
}).
catch
(
error
=>
{
console
.
error
(
error
)
})
}
uniCloud
.
chooseAndUploadFile
({
type
:
'
image
'
,
success
(
res
)
{
that
.
avatar
=
res
[
"
tempFiles
"
][
0
][
"
url
"
];
//console.log(res);
//console.log(this.avatar);
},
fail
()
{},
complete
()
{}
});
},
// avatarChoose() {
// let that = this;
// uni.chooseImage({
// count: 1,
// sizeType: ['original', 'compressed'],
// sourceType: ['album', 'camera'],
// success: function(res) {
// var tempFilePaths = res.tempFilePaths;
// pathToBase64(tempFilePaths[0]) //图像转base64工具
// .then(base64 => {
// that.avatar = base64;
// //将文件转化为base64并显示
// // that.avatarUpload(base64); //同时将头像上传至数据库进行存储
// }).catch(error => {
// console.error(error)
// })
// }
// });
// },
getUserInfo
()
{
uni
.
getUserProfile
({
...
...
@@ -145,18 +157,20 @@
// })
// }
// },
savaInfo
()
{
savaInfo
()
{
uni
.
showModal
({
title
:
'
温馨提示
'
,
//提示标题
content
:
'
确认修改你的个人信息吗
'
,
//提示内容
showCancel
:
true
,
//是否显示取消按钮
success
:
res
=>
{
success
:
res
=>
{
if
(
res
.
confirm
)
{
//confirm为ture,代表用户点击确定
let
that
=
this
;
let
gender
=
that
.
selectSex
[
that
.
index1
].
name
;
let
school
=
that
.
school
[
that
.
index2
].
name
;
let
nickname
=
that
.
nickName
;
let
mobile
=
that
.
mobile
;
//
let updata = {};
let
headimg
=
that
.
avatar
;
let
updata
=
{};
if
(
!
nickname
)
{
uni
.
showToast
({
title
:
'
请填写昵称
'
,
...
...
@@ -165,14 +179,15 @@
});
return
;
}
// updata.nickname = nickname;
// if (!headimg) {
// headimg = that.avater;
// }
// updata.headimg = headimg;
// updata.gender = gender;
updata
.
nickname
=
nickname
;
if
(
!
headimg
)
{
headimg
=
that
.
avater
;
}
updata
.
headimg
=
headimg
;
updata
.
gender
=
gender
;
updata
.
school
=
school
;
if
(
that
.
isPoneAvailable
(
mobile
))
{
//
updata.mobile = mobile;
updata
.
mobile
=
mobile
;
}
else
{
uni
.
showToast
({
title
:
'
手机号码有误,请重填
'
,
...
...
@@ -181,7 +196,7 @@
});
return
;
}
this
.
Upload
(
updata
);
// that.updata(updata);
}
else
if
(
res
.
cancel
)
{
//cancel为ture,代表用户点击取消
console
.
log
(
'
点击了取消按钮
'
);
...
...
@@ -190,7 +205,7 @@
})
},
isPoneAvailable
(
poneInput
)
{
var
myreg
=
/^
[
1
][
3,4,5,7,8
][
0-9
]{9}
$/
;
if
(
!
myreg
.
test
(
poneInput
))
{
...
...
@@ -232,10 +247,22 @@
uni
.
navigateBack
({
delta
:
1
,
//返回层数,2则上上页
})
}
},
Upload
(
updata
)
{
uniCloud
.
callFunction
({
name
:
'
fe-my-modifyinformation
'
,
data
:
{
userId
:
'
6450da43e1a35c371b3699cc
'
,
icon
:
updata
.
headimg
,
username
:
updata
.
nickname
,
school
:
updata
.
school
,
phone
:
updata
.
mobile
,
gender
:
updata
.
gender
}
})
.
then
(
res
=>
{
console
.
log
(
res
);
});
},
},
onLoad
()
{
plus
.
navigator
.
setStatusBarBackground
(
'
#EDEEF0
'
);
//this.getData();
}
}
...
...
teamwork/pages/my/my-resetpassword.vue
浏览文件 @
4baf8177
...
...
@@ -10,22 +10,22 @@
<span
class=
"empty"
></span>
</view>
<view
class=
"content"
>
<v
ei
w
class=
"password"
>
<v
ie
w
class=
"password"
>
<span>
原
 
密
 
码:
</span>
<input
placeholder=
"请输入原密码"
type=
"text"
:password=
"showPassword"
name=
"input"
></input>
<!--
<text
:class=
"[!showPassword ?'cuIcon-attentionfill' : 'cuIcon-attentionforbidfill']"
class=
"text-gray"
@
click=
"showPwd"
></text>
-->
<!--
<input
type=
"safe-password"
:value=
"originalPassword"
:valplaceholder=
'请输入原密码'
></input>
-->
</v
ei
w>
<v
ei
w
class=
"password"
>
</v
ie
w>
<v
ie
w
class=
"password"
>
<span>
新
 
密
 
码:
</span>
<input
placeholder=
"请输入新密码"
type=
"text"
@
input=
"bindNewPassword"
:password=
"showPassword"
name=
"input"
></input>
</v
ei
w>
<v
ei
w
class=
"password"
>
</v
ie
w>
<v
ie
w
class=
"password"
>
<span>
确认密码:
</span>
<input
placeholder=
"请确认密码"
type=
"text"
@
input=
"bindConfirmPassword"
:password=
"showPassword"
name=
"input"
></input>
</v
ei
w>
</v
ie
w>
</view>
<view
class=
"confirm"
>
<button
class=
"confirm-btn"
@
click=
"confirmModification()"
>
确认修改
</button>
...
...
@@ -38,6 +38,7 @@
data
()
{
return
{
showPassword
:
true
,
password
:
'
1223
'
,
newPassword
:
''
,
confirmPassword
:
''
,
}
...
...
@@ -61,8 +62,10 @@
success
:
res
=>
{
if
(
res
.
confirm
)
{
//confirm为ture,代表用户点击确定
let
that
=
this
;
let
password
=
that
.
password
;
let
newPassword
=
that
.
newPassword
;
let
confirmPassword
=
that
.
confirmPassword
;
let
updata
=
{};
if
(
!
that
.
isPasswordAvailable
(
newPassword
))
{
uni
.
showToast
({
title
:
'
密码长度在8-20位!
'
,
...
...
@@ -78,9 +81,10 @@
});
return
;
}
else
{
// updata.mobile = mobile
;
//return
;
updata
.
password
=
password
;
updata
.
newPassword
=
newPassword
;
}
this
.
Upload
(
updata
);
}
else
if
(
res
.
cancel
)
{
//cancel为ture,代表用户点击取消
console
.
log
(
'
点击了取消按钮
'
);
}
...
...
@@ -109,6 +113,17 @@
delta
:
1
,
//返回层数,2则上上页
})
},
Upload
(
updata
)
{
uniCloud
.
callFunction
({
name
:
'
fe-my-resetpassword
'
,
data
:
{
userId
:
'
6450da43e1a35c371b3699cc
'
,
password
:
updata
.
password
,
newPassword
:
updata
.
newPassword
}
})
.
then
(
res
=>
{
console
.
log
(
res
);
});
},
onload
()
{
plus
.
navigator
.
setStatusBarBackground
(
'
#EDEEF0
'
);
}
...
...
teamwork/pages/my/my-setting.vue
浏览文件 @
4baf8177
...
...
@@ -44,9 +44,11 @@
showCancel
:
true
,
//是否显示取消按钮
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
//confirm为ture,代表用户点击确定
console
.
log
(
'
点击了确定按钮
'
);
uni
.
navigateTo
({
url
:
'
/pages/login/login
'
})
}
else
if
(
res
.
cancel
)
{
//cancel为ture,代表用户点击取消
console
.
log
(
'
点击了取消按钮
'
);
}
}
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录