Commit 7766596c authored by 李超鹏's avatar 李超鹏

增加图片清空

parent 40ca5a73
// 本文件中的json内容将在云函数【运行】时作为参数传给云函数。
// 配置教程参考:https://uniapp.dcloud.net.cn/uniCloud/quickstart?id=runparam
{"token":""
}
\ No newline at end of file
'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
};
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',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment