const cloudTest = async () => {
await uni.request({
url: baseUrl + '/order/test',
method: 'POST',
data: {
token: uni.getStorageSync('uni_id_token')
}
}).then((res) => {
console.log('cloudTest', res);
})
}
_before: function () { // 通用预处理器
this.startTime = Date.now()
this.uniID = uniID.createInstance({ // 创建uni-id实例,其上方法同uniID
clientInfo: this.getClientInfo()
})
if(this.getHttpInfo().body) {
params = JSON.parse(this.getHttpInfo().body)
}
query = this.getHttpInfo().queryStringParameters
dbJQL = uniCloud.databaseForJQL({ // 获取JQL database引用,此处需要传入云对象的clientInfo
clientInfo: this.getClientInfo()
})
},
test: async function () {
let {token} = params;
const res = await this.uniID.checkToken(token)
return {
token,
res
}
},
m***@163.com (作者)
params 变量是存在的
2024-09-12 18:25