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
7766596c
Commit
7766596c
authored
Apr 07, 2021
by
李超鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加图片清空
parent
40ca5a73
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
255 additions
and
606 deletions
+255
-606
cleanImage.param.json
...Cloud-tcb/cloudfunctions/cleanImage/cleanImage.param.json
+4
-0
index.js
take-order/uniCloud-tcb/cloudfunctions/cleanImage/index.js
+16
-0
index.js
...r/uniCloud-tcb/cloudfunctions/common/user-common/index.js
+1
-1
db_init.json
take-order/uniCloud-tcb/database/db_init.json
+234
-605
No files found.
take-order/uniCloud-tcb/cloudfunctions/cleanImage/cleanImage.param.json
0 → 100644
View file @
7766596c
//
本文件中的json内容将在云函数【运行】时作为参数传给云函数。
//
配置教程参考:https
:
//uniapp.dcloud.net.cn/uniCloud/quickstart?id=runparam
{
"token"
:
""
}
\ No newline at end of file
take-order/uniCloud-tcb/cloudfunctions/cleanImage/index.js
0 → 100644
View file @
7766596c
'use strict'
;
const
{
getUserId
}
=
require
(
'user-common'
)
exports
.
main
=
async
(
event
,
context
)
=>
{
let
userId
=
getUserId
(
event
.
token
)
let
result
=
{
code
:
false
,
msg
:
"用户没有权限"
}
if
(
userId
)
{
let
res
=
await
uniCloud
.
database
().
collection
(
"user_upload_file"
).
where
({
'user_id'
:
userId
}).
remove
()
result
=
{
code
:
true
,
msg
:
""
}
}
//返回数据给客户端
return
result
};
take-order/uniCloud-tcb/cloudfunctions/common/user-common/index.js
View file @
7766596c
async
function
getUserId
(
token
)
{
async
function
getUserId
(
token
)
{
const
res
=
await
uniCloud
.
httpclient
.
request
(
"https://system.
dev.
banshouhui.com/wxh-worker-rest/rest/"
+
const
res
=
await
uniCloud
.
httpclient
.
request
(
"https://system.banshouhui.com/wxh-worker-rest/rest/"
+
token
+
token
+
"/myinfo/id"
,
{
"/myinfo/id"
,
{
method
:
'GET'
,
method
:
'GET'
,
...
...
take-order/uniCloud-tcb/database/db_init.json
View file @
7766596c
This diff is collapsed.
Click to expand it.
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