Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
_milo
Great Teamwork
提交
c46cd6a5
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看板
提交
c46cd6a5
编写于
5月 10, 2023
作者:
M
m0_74163447
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加图标、修改提示框
上级
6540c9a4
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
236 addition
and
150 deletion
+236
-150
teamwork/pages/my/my-modify.vue
teamwork/pages/my/my-modify.vue
+120
-87
teamwork/pages/my/my-resetpassword.vue
teamwork/pages/my/my-resetpassword.vue
+72
-39
teamwork/pages/my/my-running-record.vue
teamwork/pages/my/my-running-record.vue
+4
-5
teamwork/pages/my/my-setting.vue
teamwork/pages/my/my-setting.vue
+36
-18
teamwork/pages/my/my-walking-record.vue
teamwork/pages/my/my-walking-record.vue
+4
-1
teamwork/static/my/my-record/run.png
teamwork/static/my/my-record/run.png
+0
-0
teamwork/static/my/my-record/walk.png
teamwork/static/my/my-record/walk.png
+0
-0
teamwork/static/my/my-record/walking.png
teamwork/static/my/my-record/walking.png
+0
-0
未找到文件。
teamwork/pages/my/my-modify.vue
浏览文件 @
c46cd6a5
...
...
@@ -45,7 +45,10 @@
</view>
<button
class=
"save"
@
tap=
"savaInfo"
>
保 存 修 改
</button>
</view>
<uni-popup
ref=
"alertDialog"
type=
"dialog"
>
<uni-popup-dialog
cancelText=
"取消"
confirmText=
"确定"
title=
"提示"
content=
"确定修改你的信息吗?"
@
confirm=
"dialogConfirm"
></uni-popup-dialog>
</uni-popup>
</view>
</view>
</
template
>
...
...
@@ -112,41 +115,70 @@
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
({
desc
:
'
用于完善会员资料
'
,
// 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success
:
(
res
)
=>
{
console
.
log
(
res
);
uni
.
showToast
({
title
:
'
已授权
'
,
icon
:
'
none
'
,
duration
:
2000
})
}
dialogConfirm
()
{
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
headimg
=
that
.
avatar
;
let
updata
=
{};
if
(
!
nickname
)
{
uni
.
showToast
({
title
:
'
请填写昵称
'
,
icon
:
'
none
'
,
duration
:
2000
});
return
;
}
updata
.
nickname
=
nickname
;
if
(
!
headimg
)
{
headimg
=
that
.
avater
;
}
updata
.
headimg
=
headimg
;
updata
.
gender
=
gender
;
updata
.
school
=
school
;
if
(
that
.
isPoneAvailable
(
mobile
))
{
updata
.
mobile
=
mobile
;
}
else
{
uni
.
showToast
({
title
:
'
手机号码有误,请重填
'
,
icon
:
'
none
'
,
duration
:
2000
});
return
;
}
this
.
Upload
(
updata
);
getApp
().
globalData
.
icon
=
updata
.
headimg
;
getApp
().
globalData
.
name
=
updata
.
nickname
;
getApp
().
globalData
.
moblie
=
updata
.
mobile
;
getApp
().
globalData
.
gender
=
updata
.
gender
;
getApp
().
globalData
.
school
=
updata
.
school
;
uni
.
navigateBack
({
delta
:
1
,
//返回层数,2则上上页
})
this
.
$refs
.
alertDialog
.
close
();
},
dialogClose
()
{
//console.log('点击关闭')
this
.
$refsalertDialog
.
close
();
},
// getUserInfo() {
// uni.getUserProfile({
// desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
// success: (res) => {
// console.log(res);
// uni.showToast({
// title: '已授权',
// icon: 'none',
// duration: 2000
// })
// }
// })
// },
// getphonenumber(e) {
// if (e.detail.iv) {
// console.log(e.detail.iv) //传后台解密换取手机号
...
...
@@ -158,59 +190,60 @@
// }
// },
savaInfo
()
{
uni
.
showModal
({
title
:
'
温馨提示
'
,
//提示标题
content
:
'
确认修改你的个人信息吗
'
,
//提示内容
showCancel
:
true
,
//是否显示取消按钮
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
headimg
=
that
.
avatar
;
let
updata
=
{};
if
(
!
nickname
)
{
uni
.
showToast
({
title
:
'
请填写昵称
'
,
icon
:
'
none
'
,
duration
:
2000
});
return
;
}
updata
.
nickname
=
nickname
;
if
(
!
headimg
)
{
headimg
=
that
.
avater
;
}
updata
.
headimg
=
headimg
;
updata
.
gender
=
gender
;
updata
.
school
=
school
;
if
(
that
.
isPoneAvailable
(
mobile
))
{
updata
.
mobile
=
mobile
;
}
else
{
uni
.
showToast
({
title
:
'
手机号码有误,请重填
'
,
icon
:
'
none
'
,
duration
:
2000
});
return
;
}
this
.
Upload
(
updata
);
getApp
().
globalData
.
icon
=
updata
.
headimg
;
getApp
().
globalData
.
name
=
updata
.
nickname
;
getApp
().
globalData
.
moblie
=
updata
.
mobile
;
getApp
().
globalData
.
gender
=
updata
.
gender
;
getApp
().
globalData
.
school
=
updata
.
school
;
uni
.
navigateBack
({
delta
:
1
,
//返回层数,2则上上页
})
// that.updata(updata);
}
else
if
(
res
.
cancel
)
{
//cancel为ture,代表用户点击取消
console
.
log
(
'
点击了取消按钮
'
);
}
}
})
this
.
$refs
.
alertDialog
.
open
();
// uni.showModal({
// title: '温馨提示', //提示标题
// content: '确认修改你的个人信息吗', //提示内容
// showCancel: true, //是否显示取消按钮
// 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 headimg = that.avatar;
// let updata = {};
// if (!nickname) {
// uni.showToast({
// title: '请填写昵称',
// icon: 'none',
// duration: 2000
// });
// return;
// }
// updata.nickname = nickname;
// if (!headimg) {
// headimg = that.avater;
// }
// updata.headimg = headimg;
// updata.gender = gender;
// updata.school = school;
// if (that.isPoneAvailable(mobile)) {
// updata.mobile = mobile;
// } else {
// uni.showToast({
// title: '手机号码有误,请重填',
// icon: 'none',
// duration: 2000
// });
// return;
// }
// this.Upload(updata);
// getApp().globalData.icon=updata.headimg;
// getApp().globalData.name=updata.nickname;
// getApp().globalData.moblie=updata.mobile;
// getApp().globalData.gender=updata.gender;
// getApp().globalData.school=updata.school;
// uni.navigateBack({
// delta: 1, //返回层数,2则上上页
// })
// // that.updata(updata);
// } else if (res.cancel) { //cancel为ture,代表用户点击取消
// console.log('点击了取消按钮');
// }
// }
// })
},
...
...
teamwork/pages/my/my-resetpassword.vue
浏览文件 @
c46cd6a5
...
...
@@ -30,6 +30,10 @@
<view
class=
"confirm"
>
<button
class=
"confirm-btn"
@
click=
"confirmModification()"
>
确认修改
</button>
</view>
<uni-popup
ref=
"alertDialog"
type=
"dialog"
>
<uni-popup-dialog
cancelText=
"取消"
confirmText=
"确定"
title=
"提示"
content=
"确定修改你的密码吗?"
@
confirm=
"dialogConfirm"
></uni-popup-dialog>
</uni-popup>
</view>
</
template
>
...
...
@@ -53,46 +57,75 @@
bindConfirmPassword
(
e
)
{
this
.
confirmPassword
=
e
.
detail
.
value
;
},
// showPwd: function() {
// this.showPassword = !this.showPassword;
// },
dialogConfirm
()
{
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位!
'
,
icon
:
'
none
'
,
duration
:
2000
});
return
;
}
else
if
(
!
that
.
isConfirmPasswordAvailable
(
newPassword
,
confirmPassword
))
{
uni
.
showToast
({
title
:
'
两次密码不一致
'
,
icon
:
'
none
'
,
duration
:
2000
});
return
;
}
else
{
updata
.
password
=
password
;
updata
.
newPassword
=
newPassword
;
}
this
.
Upload
(
updata
);
this
.
$refs
.
alertDialog
.
close
();
},
dialogClose
()
{
//console.log('点击关闭')
this
.
$refsalertDialog
.
close
();
},
confirmModification
()
{
uni
.
showModal
({
title
:
'
温馨提示
'
,
//提示标题
content
:
'
确认修改密码吗
'
,
//提示内容
showCancel
:
true
,
//是否显示取消按钮
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位!
'
,
icon
:
'
none
'
,
duration
:
2000
});
return
;
}
else
if
(
!
that
.
isConfirmPasswordAvailable
(
newPassword
,
confirmPassword
))
{
uni
.
showToast
({
title
:
'
两次密码不一致
'
,
icon
:
'
none
'
,
duration
:
2000
});
return
;
}
else
{
updata
.
password
=
password
;
updata
.
newPassword
=
newPassword
;
}
this
.
Upload
(
updata
);
}
else
if
(
res
.
cancel
)
{
//cancel为ture,代表用户点击取消
console
.
log
(
'
点击了取消按钮
'
);
}
}
})
this
.
$refs
.
alertDialog
.
open
();
//
uni.showModal({
//
title: '温馨提示', //提示标题
//
content: '确认修改密码吗', //提示内容
//
showCancel: true, //是否显示取消按钮
//
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位!',
//
icon: 'none',
//
duration: 2000
//
});
//
return;
//
} else if (!that.isConfirmPasswordAvailable(newPassword, confirmPassword)) {
//
uni.showToast({
//
title: '两次密码不一致',
//
icon: 'none',
//
duration: 2000
//
});
//
return;
//
} else {
//
updata.password = password;
//
updata.newPassword = newPassword;
//
}
//
this.Upload(updata);
//
} else if (res.cancel) { //cancel为ture,代表用户点击取消
//
console.log('点击了取消按钮');
//
}
//
}
//
})
},
isPasswordAvailable
(
newPassword
)
{
...
...
teamwork/pages/my/my-running-record.vue
浏览文件 @
c46cd6a5
...
...
@@ -24,7 +24,6 @@
<image
class=
"duration-icon"
:src=
"'/static/my/my-record/duration.png'"
></image>
<view
class=
"pace"
>
{{
parseInt
(
item
.
pace
/
60
).
toString
().
padStart
(
2
,
0
)
}}
'
{{
parseInt
(
item
.
pace
%
60
).
toString
().
padStart
(
2
,
0
)
}}
''
<!--
{{
runningrecord
.
pace
}}
-->
</view>
<image
class=
"pace-icon"
:src=
"'/static/my/my-record/pace.png'"
></image>
<view
class=
"date"
>
...
...
@@ -134,7 +133,7 @@
onLoad
()
{
//console.log(this.formatSeconds(10));
plus
.
navigator
.
setStatusBarBackground
(
'
#EDEEF0
'
);
//
plus.navigator.setStatusBarBackground('#EDEEF0');
this
.
getData
();
}
}
...
...
@@ -197,9 +196,9 @@
height
:
150
rpx
;
margin-top
:
20
rpx
;
margin-left
:
30
rpx
;
/*
background-size:100% 100%;
background-image:url("/static/my/my-record/run.png");
background-repeat:no-repeat;
*/
background-size
:
100%
100%
;
background-image
:
url("/static/my/my-record/run.png
/
")
;
background-repeat
:
no-repeat
;
float
:
left
;
}
...
...
teamwork/pages/my/my-setting.vue
浏览文件 @
c46cd6a5
...
...
@@ -25,6 +25,10 @@
<view
class=
"exit"
>
<button
class=
"exit-btn"
@
click=
"confirmExit()"
>
退出账号
</button>
</view>
<uni-popup
ref=
"alertDialog"
type=
"dialog"
>
<uni-popup-dialog
cancelText=
"取消"
confirmText=
"确定"
title=
"提示"
content=
"确定退出你的账号吗?"
@
confirm=
"dialogConfirm"
></uni-popup-dialog>
</uni-popup>
</view>
</
template
>
...
...
@@ -37,26 +41,40 @@
}
},
methods
:{
dialogConfirm
()
{
uni
.
reLaunch
({
url
:
'
/pages/login/login
'
,
animationType
:
'
pop-in
'
,
animationDuration
:
300
})
this
.
$refs
.
alertDialog
.
close
();
},
dialogClose
()
{
//console.log('点击关闭')
this
.
$refsalertDialog
.
close
();
},
confirmExit
(){
uni
.
showModal
({
title
:
'
温馨提示
'
,
//提示标题
content
:
'
确认退出你的账号吗
'
,
//提示内容
showCancel
:
true
,
//是否显示取消按钮
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
//confirm为ture,代表用户点击确定
// uni.navigateTo({
// url: '/pages/login/login'
// })
uni
.
reLaunch
({
url
:
'
/pages/login/login
'
,
animationType
:
'
pop-in
'
,
animationDuration
:
300
})
}
else
if
(
res
.
cancel
)
{
//cancel为ture,代表用户点击取消
this
.
$refs
.
alertDialog
.
open
();
// uni.showModal({
// title: '温馨提示', //提示标题
// content: '确认退出你的账号吗', //提示内容
// showCancel: true, //是否显示取消按钮
// success: function (res) {
// if (res.confirm) { //confirm为ture,代表用户点击确定
// // uni.navigateTo({
// // url: '/pages/login/login'
// // })
// uni.reLaunch({
// url: '/pages/login/login',
// animationType: 'pop-in',
// animationDuration: 300
// })
// } else if (res.cancel) { //cancel为ture,代表用户点击取消
}
}
})
//
}
//
}
//
})
},
goBack
(){
uni
.
navigateBack
({
...
...
teamwork/pages/my/my-walking-record.vue
浏览文件 @
c46cd6a5
...
...
@@ -121,7 +121,7 @@
},
onLoad
()
{
plus
.
navigator
.
setStatusBarBackground
(
'
#EDEEF0
'
);
//
plus.navigator.setStatusBarBackground('#EDEEF0');
this
.
getData
();
}
}
...
...
@@ -184,6 +184,9 @@
height
:
150
rpx
;
margin-top
:
20
rpx
;
margin-left
:
30
rpx
;
background-size
:
100%
100%
;
background-image
:
url("/static/my/my-record/walk.png/")
;
background-repeat
:
no-repeat
;
float
:
left
;
}
...
...
teamwork/static/my/my-record/run.png
查看替换文件 @
6540c9a4
浏览文件 @
c46cd6a5
7.8 KB
|
W:
|
H:
6.9 KB
|
W:
|
H:
2-up
Swipe
Onion skin
teamwork/static/my/my-record/walk.png
查看替换文件 @
6540c9a4
浏览文件 @
c46cd6a5
6.1 KB
|
W:
|
H:
6.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
teamwork/static/my/my-record/walking.png
查看替换文件 @
6540c9a4
浏览文件 @
c46cd6a5
4.6 KB
|
W:
|
H:
6.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录