refactor: 确立独立子工程架构 (backend, admin, mpuniapp) 并同步更新 AGENTS.md 规范
这个提交包含在:
@@ -0,0 +1,22 @@
|
||||
// 云对象教程: https://uniapp.dcloud.net.cn/uniCloud/cloud-obj
|
||||
// jsdoc语法提示教程:https://ask.dcloud.net.cn/docs/#//ask.dcloud.net.cn/article/129
|
||||
module.exports = {
|
||||
_before() {
|
||||
const clientInfo = this.getClientInfo()
|
||||
const secretType = clientInfo.secretType
|
||||
const methodName = this.getMethodName()
|
||||
const clientInfos = uniCloud.getClientInfos()
|
||||
// methodName 是客户端调用的方法名
|
||||
// secretType 是客户端调用 uniCloud.importObject 传递的参数 secretMethods
|
||||
if (methodName === 'secureTest' && secretType !== 'both') {
|
||||
const error = new Error('客户端指定的secretType不为both,拒绝此次请求')
|
||||
error.code = 'INVALID_SECRET_TYPE'
|
||||
throw error // 拒绝本次请求
|
||||
}
|
||||
},
|
||||
secureTest() {
|
||||
return {
|
||||
returnBy: "encryption-object.secureTest"
|
||||
}
|
||||
}
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户