Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
和慭琛
take_order
Commits
6bba43b6
Commit
6bba43b6
authored
Apr 02, 2021
by
李超鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改用户token 增加提示
parent
0f115d95
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
748 additions
and
730 deletions
+748
-730
list.vue
take-order/pages/photo/list.vue
+301
-297
preview.vue
take-order/pages/photo/preview.vue
+2
-2
setting.vue
take-order/pages/photo/setting.vue
+430
-423
index.js
...r/uniCloud-tcb/cloudfunctions/common/user-common/index.js
+1
-1
index.js
...r/uniCloud-tcb/cloudfunctions/getGroupStandardV2/index.js
+4
-0
index.js
...der/uniCloud-tcb/cloudfunctions/getUserWatermark/index.js
+3
-0
index.js
take-order/uniCloud-tcb/cloudfunctions/saveImage/index.js
+3
-3
index.js
...er/uniCloud-tcb/cloudfunctions/saveUserWatermark/index.js
+3
-3
db_init.json
take-order/uniCloud-tcb/database/db_init.json
+1
-1
No files found.
take-order/pages/photo/list.vue
View file @
6bba43b6
This diff is collapsed.
Click to expand it.
take-order/pages/photo/preview.vue
View file @
6bba43b6
...
...
@@ -146,7 +146,7 @@
"url"
:
s
,
}).
then
(
res
=>
{
console
.
log
(
res
,
"云服务保存图片"
);
if
(
res
.
result
)
{
if
(
res
.
result
.
code
)
{
// TODO 参数是否要来回传递
const
photo
=
getApp
().
globalData
.
photo
photo
.
currentItemLength
++
...
...
@@ -166,7 +166,7 @@
},
2000
)
}
else
{
uni
.
showToast
({
title
:
'图片上传失败
'
title
:
'图片上传失败
'
+
res
.
result
.
msg
})
}
})
...
...
take-order/pages/photo/setting.vue
View file @
6bba43b6
This diff is collapsed.
Click to expand it.
take-order/uniCloud-tcb/cloudfunctions/common/user-common/index.js
View file @
6bba43b6
...
...
@@ -5,7 +5,7 @@ async function getUserId(token) {
method
:
'GET'
,
dataType
:
'text'
})
return
res
&&
res
.
status
===
200
?
res
.
data
:
token
return
res
&&
res
.
status
===
200
?
res
.
data
:
""
}
module
.
exports
=
{
...
...
take-order/uniCloud-tcb/cloudfunctions/getGroupStandardV2/index.js
View file @
6bba43b6
...
...
@@ -7,6 +7,10 @@ exports.main = async (event, context) => {
const
_
=
db
.
command
const
$
=
db
.
command
.
aggregate
const
user_id
=
await
getUserId
(
event
.
token
)
if
(
!
user_id
){
return
{
error_code
:
'user_auth'
,
error_msg
:
"用户没有权限"
}
}
let
res
=
await
db
.
collection
(
"standardV2"
).
aggregate
().
lookup
({
from
:
'user_upload_file'
,
let
:
{
...
...
take-order/uniCloud-tcb/cloudfunctions/getUserWatermark/index.js
View file @
6bba43b6
...
...
@@ -5,6 +5,9 @@ const {
exports
.
main
=
async
(
event
,
context
)
=>
{
//event为客户端上传的参数
const
user_id
=
await
getUserId
(
event
.
token
)
if
(
!
user_id
){
return
{
error_code
:
'user_auth'
,
error_msg
:
"用户没有权限"
}
}
const
collection
=
uniCloud
.
database
().
collection
(
"user_watermark"
).
field
({
'_id'
:
false
})
...
...
take-order/uniCloud-tcb/cloudfunctions/saveImage/index.js
View file @
6bba43b6
...
...
@@ -12,8 +12,8 @@ exports.main = async (event, context) => {
url
:
"https://img2.banshouhui.com/"
+
event
.
url
,
create_date
:
new
Date
()
})
return
true
return
{
code
:
true
}
}
else
{
return
{
code
:
false
,
msg
:
"用户没有权限"
}
}
return
false
};
take-order/uniCloud-tcb/cloudfunctions/saveUserWatermark/index.js
View file @
6bba43b6
...
...
@@ -5,7 +5,6 @@ const {
exports
.
main
=
async
(
event
,
context
)
=>
{
let
user_id
=
await
getUserId
(
event
.
token
)
console
.
log
(
user_id
);
const
watermark
=
event
.
watermark
if
(
user_id
)
{
watermark
.
user_id
=
user_id
...
...
@@ -19,7 +18,8 @@ exports.main = async (event, context) => {
}
else
{
await
collection
.
add
(
watermark
)
}
return
{
code
:
true
}
}
else
{
return
{
code
:
false
,
msg
:
"用户没有权限"
}
}
//返回数据给客户端
return
true
};
take-order/uniCloud-tcb/database/db_init.json
View file @
6bba43b6
...
...
@@ -71,7 +71,7 @@
}
}
},
"standardV
5
"
:
{
"standardV
2
"
:
{
"data"
:
[{
"classify_id"
:
"79550af260555cc20afb34146966a2c4"
,
"system_id"
:
"79550af260555cc20afb34156c94b32c"
,
...
...
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