Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
_milo
Great Teamwork
提交
8fff3fbe
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看板
提交
8fff3fbe
编写于
5月 06, 2023
作者:
R
Renic1
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'frontend' of
https://gitcode.net/qq_50679803/great-teamwork
into frontend
上级
50caa504
4baf8177
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
797 addition
and
337 deletion
+797
-337
teamwork/js_sdk/mmmm-image-tools/index.js
teamwork/js_sdk/mmmm-image-tools/index.js
+0
-196
teamwork/js_sdk/mmmm-image-tools/package.json
teamwork/js_sdk/mmmm-image-tools/package.json
+0
-11
teamwork/pages.json
teamwork/pages.json
+10
-0
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-running-record.vue
teamwork/pages/my/my-running-record.vue
+170
-0
teamwork/pages/my/my-setting.vue
teamwork/pages/my/my-setting.vue
+4
-2
teamwork/pages/team/activity-detail.vue
teamwork/pages/team/activity-detail.vue
+283
-0
teamwork/pages/team/main.vue
teamwork/pages/team/main.vue
+65
-14
teamwork/pages/team/member-list.vue
teamwork/pages/team/member-list.vue
+115
-0
teamwork/static/my/my-running-record/duration.png
teamwork/static/my/my-running-record/duration.png
+0
-0
teamwork/static/my/my-running-record/pace.png
teamwork/static/my/my-running-record/pace.png
+0
-0
teamwork/static/my/my-running-record/running.png
teamwork/static/my/my-running-record/running.png
+0
-0
teamwork/static/my/my-running-record/walking.png
teamwork/static/my/my-running-record/walking.png
+0
-0
teamwork/static/team/out.png
teamwork/static/team/out.png
+0
-0
未找到文件。
teamwork/js_sdk/mmmm-image-tools/index.js
已删除
100644 → 0
浏览文件 @
50caa504
function
getLocalFilePath
(
path
)
{
if
(
path
.
indexOf
(
'
_www
'
)
===
0
||
path
.
indexOf
(
'
_doc
'
)
===
0
||
path
.
indexOf
(
'
_documents
'
)
===
0
||
path
.
indexOf
(
'
_downloads
'
)
===
0
)
{
return
path
}
if
(
path
.
indexOf
(
'
file://
'
)
===
0
)
{
return
path
}
if
(
path
.
indexOf
(
'
/storage/emulated/0/
'
)
===
0
)
{
return
path
}
if
(
path
.
indexOf
(
'
/
'
)
===
0
)
{
var
localFilePath
=
plus
.
io
.
convertAbsoluteFileSystem
(
path
)
if
(
localFilePath
!==
path
)
{
return
localFilePath
}
else
{
path
=
path
.
substr
(
1
)
}
}
return
'
_www/
'
+
path
}
function
dataUrlToBase64
(
str
)
{
var
array
=
str
.
split
(
'
,
'
)
return
array
[
array
.
length
-
1
]
}
var
index
=
0
function
getNewFileId
()
{
return
Date
.
now
()
+
String
(
index
++
)
}
function
biggerThan
(
v1
,
v2
)
{
var
v1Array
=
v1
.
split
(
'
.
'
)
var
v2Array
=
v2
.
split
(
'
.
'
)
var
update
=
false
for
(
var
index
=
0
;
index
<
v2Array
.
length
;
index
++
)
{
var
diff
=
v1Array
[
index
]
-
v2Array
[
index
]
if
(
diff
!==
0
)
{
update
=
diff
>
0
break
}
}
return
update
}
export
function
pathToBase64
(
path
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
if
(
typeof
window
===
'
object
'
&&
'
document
'
in
window
)
{
if
(
typeof
FileReader
===
'
function
'
)
{
var
xhr
=
new
XMLHttpRequest
()
xhr
.
open
(
'
GET
'
,
path
,
true
)
xhr
.
responseType
=
'
blob
'
xhr
.
onload
=
function
()
{
if
(
this
.
status
===
200
)
{
let
fileReader
=
new
FileReader
()
fileReader
.
onload
=
function
(
e
)
{
resolve
(
e
.
target
.
result
)
}
fileReader
.
onerror
=
reject
fileReader
.
readAsDataURL
(
this
.
response
)
}
}
xhr
.
onerror
=
reject
xhr
.
send
()
return
}
var
canvas
=
document
.
createElement
(
'
canvas
'
)
var
c2x
=
canvas
.
getContext
(
'
2d
'
)
var
img
=
new
Image
img
.
onload
=
function
()
{
canvas
.
width
=
img
.
width
canvas
.
height
=
img
.
height
c2x
.
drawImage
(
img
,
0
,
0
)
resolve
(
canvas
.
toDataURL
())
canvas
.
height
=
canvas
.
width
=
0
}
img
.
onerror
=
reject
img
.
src
=
path
return
}
if
(
typeof
plus
===
'
object
'
)
{
plus
.
io
.
resolveLocalFileSystemURL
(
getLocalFilePath
(
path
),
function
(
entry
)
{
entry
.
file
(
function
(
file
)
{
var
fileReader
=
new
plus
.
io
.
FileReader
()
fileReader
.
onload
=
function
(
data
)
{
resolve
(
data
.
target
.
result
)
}
fileReader
.
onerror
=
function
(
error
)
{
reject
(
error
)
}
fileReader
.
readAsDataURL
(
file
)
},
function
(
error
)
{
reject
(
error
)
})
},
function
(
error
)
{
reject
(
error
)
})
return
}
if
(
typeof
wx
===
'
object
'
&&
wx
.
canIUse
(
'
getFileSystemManager
'
))
{
wx
.
getFileSystemManager
().
readFile
({
filePath
:
path
,
encoding
:
'
base64
'
,
success
:
function
(
res
)
{
resolve
(
'
data:image/png;base64,
'
+
res
.
data
)
},
fail
:
function
(
error
)
{
reject
(
error
)
}
})
return
}
reject
(
new
Error
(
'
not support
'
))
})
}
export
function
base64ToPath
(
base64
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
if
(
typeof
window
===
'
object
'
&&
'
document
'
in
window
)
{
base64
=
base64
.
split
(
'
,
'
)
var
type
=
base64
[
0
].
match
(
/:
(
.*
?)
;/
)[
1
]
var
str
=
atob
(
base64
[
1
])
var
n
=
str
.
length
var
array
=
new
Uint8Array
(
n
)
while
(
n
--
)
{
array
[
n
]
=
str
.
charCodeAt
(
n
)
}
return
resolve
((
window
.
URL
||
window
.
webkitURL
).
createObjectURL
(
new
Blob
([
array
],
{
type
:
type
})))
}
var
extName
=
base64
.
split
(
'
,
'
)[
0
].
match
(
/data
\:\S
+
\/(\S
+
)
;/
)
if
(
extName
)
{
extName
=
extName
[
1
]
}
else
{
reject
(
new
Error
(
'
base64 error
'
))
}
var
fileName
=
getNewFileId
()
+
'
.
'
+
extName
if
(
typeof
plus
===
'
object
'
)
{
var
basePath
=
'
_doc
'
var
dirPath
=
'
uniapp_temp
'
var
filePath
=
basePath
+
'
/
'
+
dirPath
+
'
/
'
+
fileName
if
(
!
biggerThan
(
plus
.
os
.
name
===
'
Android
'
?
'
1.9.9.80627
'
:
'
1.9.9.80472
'
,
plus
.
runtime
.
innerVersion
))
{
plus
.
io
.
resolveLocalFileSystemURL
(
basePath
,
function
(
entry
)
{
entry
.
getDirectory
(
dirPath
,
{
create
:
true
,
exclusive
:
false
,
},
function
(
entry
)
{
entry
.
getFile
(
fileName
,
{
create
:
true
,
exclusive
:
false
,
},
function
(
entry
)
{
entry
.
createWriter
(
function
(
writer
)
{
writer
.
onwrite
=
function
()
{
resolve
(
filePath
)
}
writer
.
onerror
=
reject
writer
.
seek
(
0
)
writer
.
writeAsBinary
(
dataUrlToBase64
(
base64
))
},
reject
)
},
reject
)
},
reject
)
},
reject
)
return
}
var
bitmap
=
new
plus
.
nativeObj
.
Bitmap
(
fileName
)
bitmap
.
loadBase64Data
(
base64
,
function
()
{
bitmap
.
save
(
filePath
,
{},
function
()
{
bitmap
.
clear
()
resolve
(
filePath
)
},
function
(
error
)
{
bitmap
.
clear
()
reject
(
error
)
})
},
function
(
error
)
{
bitmap
.
clear
()
reject
(
error
)
})
return
}
if
(
typeof
wx
===
'
object
'
&&
wx
.
canIUse
(
'
getFileSystemManager
'
))
{
var
filePath
=
wx
.
env
.
USER_DATA_PATH
+
'
/
'
+
fileName
wx
.
getFileSystemManager
().
writeFile
({
filePath
:
filePath
,
data
:
dataUrlToBase64
(
base64
),
encoding
:
'
base64
'
,
success
:
function
()
{
resolve
(
filePath
)
},
fail
:
function
(
error
)
{
reject
(
error
)
}
})
return
}
reject
(
new
Error
(
'
not support
'
))
})
}
\ No newline at end of file
teamwork/js_sdk/mmmm-image-tools/package.json
已删除
100644 → 0
浏览文件 @
50caa504
{
"id"
:
"mmmm-image-tools"
,
"name"
:
"image-tools"
,
"version"
:
"1.4.0"
,
"description"
:
"图像转换工具,可用于图像和base64的转换"
,
"keywords"
:
[
"base64"
,
"保存"
,
"图像"
]
}
\ No newline at end of file
teamwork/pages.json
浏览文件 @
8fff3fbe
...
...
@@ -94,6 +94,16 @@
"style"
:
{
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"pages/team/member-list"
,
"style"
:
{
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"pages/team/activity-detail"
,
"style"
:
{
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"pages/my/main"
,
"style"
:
{
...
...
teamwork/pages/my/main.vue
浏览文件 @
8fff3fbe
...
...
@@ -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
浏览文件 @
8fff3fbe
...
...
@@ -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
浏览文件 @
8fff3fbe
...
...
@@ -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-running-record.vue
0 → 100644
浏览文件 @
8fff3fbe
<
template
>
<view
class=
"main"
>
<view
class=
"top"
>
<image
@
click=
"goBack"
class=
"back"
:src=
"'/static/my/exit-icon.png'"
></image>
<view
class=
"title"
>
运动记录
</view>
<span
class=
"empty"
></span>
</view>
<view
class=
"record"
>
<view
class=
"icon"
>
</view>
<view
class=
"content"
>
<view
class=
"content1"
>
<view
class=
"distance"
>
{{
distance
}}
公里
</view>
<image
class=
"type-icon"
:src=
"'/static/my/my-running-record/running.png/'"
></image>
</view>
<view
class=
"content2"
>
<view
class=
"duration"
>
00:04:25
</view>
<image
class=
"duration-icon"
:src=
"'/static/my/my-running-record/duration.png'"
></image>
<view
class=
"pace"
>
04'35"
</view>
<image
class=
"pace-icon"
:src=
"'/static/my/my-running-record/pace.png'"
></image>
<view
class=
"date"
>
2023.04.29
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
distance
:
'
1.04
'
,
duration
:
'
00:04:25
'
,
pace
:
'
04
\'
35
\
"
'
,
date
:
'
2023.04.29
'
,
}
},
methods
:{
goBack
()
{
uni
.
navigateBack
({
delta
:
1
,
//返回层数,2则上上页
})
},
onload
()
{
plus
.
navigator
.
setStatusBarBackground
(
'
#EDEEF0
'
);
}
}
}
</
script
>
<
style
>
.main
{
position
:
absolute
;
width
:
100%
;
height
:
100%
;
/* background-color: #EDEEF0; */
}
.top
{
width
:
100%
;
height
:
50px
;
background-color
:
#EDEEF0
;
text-align
:
center
;
}
.back
{
width
:
40px
;
height
:
30px
;
margin-top
:
10px
;
margin-bottom
:
10px
;
float
:
left
;
margin-left
:
10px
;
}
.empty
{
width
:
40px
;
height
:
30px
;
margin-top
:
10px
;
margin-bottom
:
10px
;
float
:
right
;
margin-right
:
10px
;
}
.title
{
font-size
:
20px
;
margin-top
:
10px
;
font-weight
:
bold
;
color
:
#f1992d
;
display
:
inline-block
;
}
.record
{
border-bottom
:
2
rpx
solid
#EDEEF0
;
width
:
100%
;
height
:
200
rpx
;
/* display: flex;
flex-direction: row; */
}
.icon
{
border
:
2
rpx
solid
#EDEEF0
;
width
:
150
rpx
;
height
:
150
rpx
;
margin-top
:
20
rpx
;
margin-left
:
30
rpx
;
float
:
left
;
}
.content
{
width
:
72%
;
height
:
100%
;
/* margin: 10rpx 0 10rpx 30rpx; */
float
:
right
;
}
.content1
{
height
:
50%
;
}
.distance
{
width
:
70%
;
font-weight
:
bold
;
font-size
:
65
rpx
;
margin-top
:
15
rpx
;
float
:
left
;
}
.type-icon
{
float
:
right
;
margin-top
:
50
rpx
;
margin-right
:
70
rpx
;
width
:
50
rpx
;
height
:
50
rpx
;
}
.content2
{
margin-top
:
20
rpx
;
display
:
flex
;
flex-direction
:
row
;
font-size
:
25
rpx
;
}
.duration
{
}
.duration-icon
{
width
:
35
rpx
;
height
:
35
rpx
;
}
.pace
{
margin-left
:
60
rpx
;
}
.pace-icon
{
width
:
35
rpx
;
height
:
35
rpx
;
}
.date
{
margin-left
:
90
rpx
;
}
</
style
>
\ No newline at end of file
teamwork/pages/my/my-setting.vue
浏览文件 @
8fff3fbe
...
...
@@ -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
(
'
点击了取消按钮
'
);
}
}
})
...
...
teamwork/pages/team/activity-detail.vue
0 → 100644
浏览文件 @
8fff3fbe
<
template
>
<view>
<view
class=
"detail"
>
<view
class=
"top"
>
<image
class=
"back"
src=
"/static/login/returnBack.png"
@
click=
"goBack()"
></image>
<view
class=
"title"
>
活动详情
</view>
<span
class=
"empty"
></span>
</view>
<view
class=
"icon-with-name"
>
<image
:src=
"icon"
class=
"icon"
/>
<text
class=
"name"
>
{{
name
}}
</text>
</view>
<view
class=
"activity-production"
>
<image
class=
"activity-production-icon"
src=
"/static/discover/production.png"
></image>
<text
class=
"activity-production-text"
>
活动内容:
</text>
<view
class=
"production-detail"
>
{{
production
}}
</view>
</view>
<view
class=
"activity-time"
>
<image
class=
"activity-production-icon"
src=
"/static/discover/time.png"
></image>
<text
class=
"activity-time-text"
>
活动开始时间:
</text>
<view
class=
"production-detail"
>
{{
startDate
}}
</view>
</view>
<view
class=
"activity-time"
>
<image
class=
"activity-production-icon"
src=
"/static/discover/time.png"
></image>
<text
class=
"activity-time-text"
>
活动结束时间:
</text>
<view
class=
"production-detail"
>
{{
endDate
}}
</view>
</view>
<view
class=
"activity-place"
>
<image
class=
"activity-production-icon"
src=
"/static/discover/place.png"
></image>
<text
class=
"activity-place-text"
>
活动地点:
</text>
<view
class=
"production-detail"
>
{{
place
}}
</view>
</view>
<view
class=
"activity-object"
>
<image
class=
"activity-production-icon"
src=
"/static/discover/object.png"
></image>
<text
class=
"activity-object-text"
>
参与人数:
</text>
<view
class=
"production-detail"
>
{{
object
}}
</view>
</view>
<view
class=
"activity-contact"
>
<image
class=
"activity-production-icon"
src=
"/static/discover/contact.png"
></image>
<text
class=
"activity-contact-text"
>
联系方式:
</text>
<view
class=
"production-detail"
>
{{
contact
}}
</view>
</view>
</view>
<view
class=
"btn"
>
<button
class=
"loginButton"
@
click=
"apply()"
>
报名
</button>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
userId
:
'
644a643a0c801ca878983559
'
,
icon
:
'
/static/icon/1.png
'
,
activityId
:
'
64508598819ce8deee7ed255
'
,
name
:
'
不会取名字
'
,
production
:
'
111111111111111111111111111111111111111111
'
,
object
:
0
,
startDate
:
'
2023-05-03 19:00
'
,
endDate
:
'
2023-05-03 19:00
'
,
place
:
'
风雨操场
'
,
contact
:
'
1612737522@qq.com
'
,
applyCode
:
200
}
},
methods
:
{
goBack
()
{
uni
.
reLaunch
({
url
:
'
/pages/team/main
'
,
animationType
:
'
pop-in
'
,
animationDuration
:
300
})
},
apply
(){
uniCloud
.
callFunction
({
name
:
'
fe-team-applyActivity
'
,
data
:
{
userId
:
this
.
userId
,
activityId
:
this
.
activityId
}
})
.
then
(
res
=>
{
console
.
log
(
res
),
this
.
applyCode
=
res
.
result
.
code
,
console
.
log
(
res
.
result
.
message
),
console
.
log
(
this
.
applyCode
)
})
if
(
this
.
applyCode
==
200
){
uni
.
showToast
({
title
:
'
报名成功
'
,
duration
:
2000
});
}
else
{
uni
.
showToast
({
title
:
'
您已报名,请勿重复报名
'
,
duration
:
2000
});
}
}
},
onLoad
(
option
)
{
this
.
activityId
=
option
.
activityId
console
.
log
(
option
.
activityId
)
uniCloud
.
callFunction
({
name
:
'
fe-team-activityDetail
'
,
data
:
{
activityId
:
this
.
activityId
}
})
.
then
(
res
=>
{
console
.
log
(
res
),
this
.
name
=
res
.
result
.
data
.
username
,
this
.
production
=
res
.
result
.
data
.
content
,
this
.
startDate
=
res
.
result
.
data
.
startDate
,
this
.
endDate
=
res
.
result
.
data
.
endDate
,
this
.
object
=
res
.
result
.
data
.
participants
,
this
.
place
=
res
.
result
.
data
.
place
,
this
.
contact
=
res
.
result
.
data
.
contact
,
this
.
icon
=
res
.
result
.
data
.
icon
})
}
}
</
script
>
<
style
>
.returnBack
{
height
:
55
rpx
;
width
:
55
rpx
;
margin-top
:
60
rpx
;
margin-left
:
20
rpx
;
margin-right
:
auto
;
}
.top
{
width
:
100%
;
height
:
50px
;
background-color
:
#EDEEF0
;
text-align
:
center
;
}
.back
{
width
:
40px
;
height
:
30px
;
margin-top
:
10px
;
margin-bottom
:
10px
;
float
:
left
;
margin-left
:
10px
;
}
.empty
{
width
:
40px
;
height
:
30px
;
margin-top
:
10px
;
margin-bottom
:
10px
;
float
:
right
;
margin-right
:
10px
;
}
.title
{
font-size
:
20px
;
margin-top
:
10px
;
font-weight
:
bold
;
color
:
#f1992d
;
display
:
inline-block
;
}
.icon-with-name
{
width
:
100%
;
height
:
45px
;
margin-left
:
10px
;
margin-top
:
15px
;
margin-bottom
:
20px
;
float
:
left
;
overflow
:
auto
;
}
.icon
{
width
:
45px
;
height
:
45px
;
border-radius
:
50%
;
float
:
left
;
}
.out-team
{
float
:
right
;
margin-right
:
30px
;
width
:
30px
;
margin-top
:
11px
;
height
:
30px
;
}
.name
{
float
:
left
;
margin-bottom
:
auto
;
margin-left
:
10px
;
margin-top
:
9px
;
font-size
:
18px
;
font-weight
:
bold
;
width
:
60%
;
}
.activity-production
{
margin-top
:
10px
;
}
.activity-production-text
{
font-weight
:
bold
;
}
.activity-object
{
margin-top
:
10px
;
}
.activity-object-text
{
font-weight
:
bold
;
}
.activity-contact-text
{
font-weight
:
bold
;
}
.activity-time
{
margin-top
:
10px
;
}
.activity-time-text
{
font-weight
:
bold
;
}
.activity-place
{
margin-top
:
10px
;
}
.activity-place-text
{
font-weight
:
bold
;
}
.activity-contact
{
margin-top
:
10px
;
}
.activity-contact-text
{
font-weight
:
bold
;
}
.activity-production-icon
{
width
:
40px
;
height
:
40px
;
margin-left
:
30px
;
}
.production-detail
{
width
:
90%
;
background-color
:
rgb
(
245
154
35
/
30%
);
margin-top
:
10px
;
margin-left
:
auto
;
margin-right
:
auto
;
border-radius
:
5px
;
padding
:
10px
;
/* 文字换行处理 */
word-wrap
:
break-word
;
word-break
:
break-all
;
}
.loginButton
{
width
:
50%
;
background-color
:
#f1992d
;
color
:
#fff
;
border
:
0
;
border-radius
:
15px
;
margin-top
:
30px
;
margin-bottom
:
15px
;
}
.loginButton
::after
{
border
:
0
;
}
</
style
>
\ No newline at end of file
teamwork/pages/team/main.vue
浏览文件 @
8fff3fbe
...
...
@@ -19,11 +19,12 @@
<!-- 我的小队 -->
<view
v-if=
"current == 0"
>
<view
class=
"icon-with-name"
>
<image
src=
"../../static/icon/1.png"
class=
"icon"
/>
<text
class=
"name"
>
{{
name
}}
</text>
<image
:src=
"icon"
class=
"icon"
@
click=
"showMember"
/>
<text
class=
"name"
@
click=
"showMember"
>
{{
name
}}
</text>
<image
src=
"../../static/team/out.png"
class=
"out-team"
@
click=
"toggleMessage()"
/>
</view>
<view
class=
"content"
v-if=
"join==null"
>
<view
class=
"one-activity"
v-for=
"item in activityList"
>
<view
class=
"one-activity"
v-for=
"item in activityList"
@
click=
"showActivityDetail(item.activityId)"
>
<image
class=
"horn-icon"
:src=
"'../../static/team/horn.png'"
style=
"width: 60px;height: 60px;margin-left: 10px;"
/>
<text
class=
"text-content"
>
{{
item
.
title
}}
</text>
...
...
@@ -33,17 +34,19 @@
<view
class=
"no-join"
>
<view
class=
"nojoin-icon-view"
>
<image
class=
"nojoin-icon"
:src=
"'../../static/team/nojoin.png'"
style=
"width: 230px;height: 200px;"
/>
style=
"width: 230px;height: 200px;"
/>
</view>
<view
class=
"text-no-view"
>
<text
class=
"text-no"
>
您还没有加入任何小队哦~-
</text>
</view>
</view>
</view>
<uni-popup
ref=
"popupDialog"
type=
"dialog"
>
<uni-popup-dialog
title=
"提示"
content=
"是否确定退出小队?"
:before-close=
"true"
@
confirm=
"dialogConfirm"
@
close=
"dialogClose"
/>
</uni-popup>
</view>
<!-- 加入小队 -->
<view
v-if=
"current == 1"
>
...
...
@@ -61,10 +64,11 @@
data
()
{
return
{
icon
:
'
/static/icon/1.png
'
,
current
:
0
,
show
:
false
,
value1
:
""
,
join
:
'
true
'
,
join
:
null
,
userId
:
'
644a643a0c801ca878983559
'
,
list
:
[{
name
:
'
我的小队
'
...
...
@@ -83,11 +87,44 @@
]
};
},
methods
:
{
tabChange
(
index
)
{
this
.
current
=
index
.
index
;
},
showActivityDetail
(
activityId
){
uni
.
reLaunch
({
url
:
'
/pages/team/activity-detail?activityId=
'
+
activityId
,
animationType
:
'
pop-in
'
,
animationDuration
:
300
})
},
showMember
(){
uni
.
reLaunch
({
url
:
'
/pages/team/member-list
'
,
animationType
:
'
pop-in
'
,
animationDuration
:
300
})
},
toggleMessage
()
{
this
.
$refs
[
'
popupDialog
'
].
open
();
},
dialogConfirm
()
{
uniCloud
.
callFunction
({
name
:
'
fe-team-leaveTeam
'
,
data
:
{
userId
:
this
.
userId
}
})
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
join
=
false
console
.
log
(
this
.
join
)
})
this
.
$refs
[
'
popupDialog
'
].
close
();
},
dialogClose
()
{
this
.
$refs
.
popupDialog
.
close
();
},
},
onLoad
()
{
...
...
@@ -102,6 +139,7 @@
this
.
name
=
res
.
result
.
data
.
username
,
this
.
activityList
=
res
.
result
.
data
.
activityList
,
this
.
join
=
res
.
result
.
join
,
this
.
icon
=
res
.
result
.
data
.
icon
console
.
log
(
this
.
join
)
})
}
...
...
@@ -114,7 +152,7 @@
}
.icon-with-name
{
width
:
8
0%
;
width
:
10
0%
;
height
:
45px
;
margin-left
:
10px
;
margin-top
:
15px
;
...
...
@@ -131,6 +169,14 @@
float
:
left
;
}
.out-team
{
float
:
right
;
margin-right
:
30px
;
width
:
30px
;
margin-top
:
11px
;
height
:
30px
;
}
.name
{
float
:
left
;
margin-bottom
:
auto
;
...
...
@@ -175,28 +221,33 @@
justify-content
:
center
;
word-wrap
:
break-word
;
}
.text-no
{
.text-no
{
font-weight
:
bold
;
display
:
flex
;
margin
:
auto
;
flex-direction
:
column
;
color
:
#F1992D
;
}
.horn-icon
{
flex-shrink
:
0
;
margin
:
auto
0
;
}
.nojoin-icon
{
.nojoin-icon
{
display
:
flex
;
flex-direction
:
column
;
margin
:
auto
;
display
:
block
;
}
.nojoin-icon-view
{
.nojoin-icon-view
{
margin-top
:
50px
;
}
.text-no-view
{
.text-no-view
{
margin
:
30px
auto
;
}
</
style
>
\ No newline at end of file
teamwork/pages/team/member-list.vue
0 → 100644
浏览文件 @
8fff3fbe
<
template
>
<view>
<view
class=
"top"
>
<image
class=
"back"
src=
"/static/login/returnBack.png"
@
click=
"goBack()"
></image>
<view
class=
"title"
>
成员列表
</view>
<span
class=
"empty"
></span>
</view>
<view
class=
"memList"
v-for=
"(item,index) in memList"
:key=
"index"
>
<image
class=
"icon"
:src=
"item.memberIcon"
></image>
<view
class=
"membername"
>
{{
item
.
memberName
}}
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
userId
:
'
644a643a0c801ca878983559
'
,
memList
:
[{
memberIcon
:
'
/static/icon/1.png
'
,
memberName
:
"
不会取名字
"
,
},{
memberIcon
:
'
/static/sport/icon.jpg
'
,
memberName
:
"
不会取名字
"
,
}]
}
},
methods
:
{
goBack
()
{
uni
.
reLaunch
({
url
:
'
/pages/team/main
'
,
animationType
:
'
pop-in
'
,
animationDuration
:
300
})
}
},
onLoad
()
{
uniCloud
.
callFunction
({
name
:
'
fe-team-memberList
'
,
data
:
{
userId
:
this
.
userId
}
})
.
then
(
res
=>
{
console
.
log
(
res
),
this
.
memList
=
res
.
result
.
data
})
}
}
</
script
>
<
style
>
.returnBack
{
height
:
55
rpx
;
width
:
55
rpx
;
margin-top
:
60
rpx
;
margin-left
:
20
rpx
;
margin-right
:
auto
;
}
.top
{
width
:
100%
;
height
:
50px
;
background-color
:
#EDEEF0
;
text-align
:
center
;
}
.back
{
width
:
40px
;
height
:
30px
;
margin-top
:
10px
;
margin-bottom
:
10px
;
float
:
left
;
margin-left
:
10px
;
}
.empty
{
width
:
40px
;
height
:
30px
;
margin-top
:
10px
;
margin-bottom
:
10px
;
float
:
right
;
margin-right
:
10px
;
}
.title
{
font-size
:
20px
;
margin-top
:
10px
;
font-weight
:
bold
;
color
:
#f1992d
;
display
:
inline-block
;
}
.memList
{
margin-top
:
20px
;
}
.icon
{
position
:
relative
;
top
:
2px
;
left
:
38px
;
width
:
50px
;
height
:
50px
;
border-radius
:
50%
;
}
.membername
{
display
:
inline
;
position
:
relative
;
font-size
:
20px
;
font-weight
:
bold
;
bottom
:
20px
;
left
:
48px
;
color
:
#7F7F7F
;
}
</
style
>
\ No newline at end of file
teamwork/static/my/my-running-record/duration.png
0 → 100644
浏览文件 @
8fff3fbe
6.1 KB
teamwork/static/my/my-running-record/pace.png
0 → 100644
浏览文件 @
8fff3fbe
6.2 KB
teamwork/static/my/my-running-record/running.png
0 → 100644
浏览文件 @
8fff3fbe
6.6 KB
teamwork/static/my/my-running-record/walking.png
0 → 100644
浏览文件 @
8fff3fbe
4.6 KB
teamwork/static/team/out.png
0 → 100644
浏览文件 @
8fff3fbe
3.8 KB
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录