Commit f445953e authored by 李超鹏's avatar 李超鹏

云开发环境

parent 6ce387b0
const db = uniCloud.database({
spaceId: 'tcb-nikbzhlwnpd5n913e1c5e-50f4bbo'
})
let cloudRulesApiFun = function(vm){
/* 通过unionid查询用户 */
let getAllBrand = async () => await db.collection("config").where({type: "brand"}).get();
const rulesApi = {
getAllBrand,
}
return rulesApi
}
module.exports = {
cloudRulesApiFun
}
\ No newline at end of file
// import {codeApiFun} from '@/common/api/code.js'; // import {codeApiFun} from '@/common/api/code.js';
// import {datumApiFun} from '@/common/api/datum.js'; // import {datumApiFun} from '@/common/api/datum.js';
import {apiFun} from '@/common/api/index.js'; import {apiFun} from '@/common/api/index.js';
import {cloudRulesApiFun} from "@/common/api/cloud_rules.js"
const upload = async function(path, params = {}, vm) { const upload = async function(path, params = {}, vm) {
...@@ -247,6 +248,10 @@ const install = (Vue, vm) => { ...@@ -247,6 +248,10 @@ const install = (Vue, vm) => {
goAskPost, goAskPost,
getQiniuToken getQiniuToken
}; };
let cloudRules = cloudRulesApiFun(vm)
vm.$u.cloudApi = {
...cloudRules
}
} }
export default { export default {
......
...@@ -182,7 +182,10 @@ ...@@ -182,7 +182,10 @@
//this.getWorkerType() //this.getWorkerType()
//this.getPerson() //this.getPerson()
console.log('onShow') console.log('onShow')
this.$u.cloudApi.getAllBrand().then(res =>{
console.log(res,"执行")
}
)
this.checkClean() this.checkClean()
......
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