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 {
......
<template> <template>
<view class=""> <view class="">
<view class="topIconView"> <view class="topIconView">
<image class="topImage" :src="icon_top" mode=""></image> <image class="topImage" :src="icon_top" mode=""></image>
</view> </view>
<view class="fatDivideLine"></view> <view class="fatDivideLine"></view>
<view class="itemView borderBottom"> <view class="itemView borderBottom">
<view class="itemTitleView"> <view class="itemTitleView">
<text class="itemTitle">联系人</text> <text class="itemTitle">联系人</text>
...@@ -122,16 +122,16 @@ ...@@ -122,16 +122,16 @@
<text class="coverItemText">下单记录</text> <text class="coverItemText">下单记录</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
//import { getworkertype} from '@/take_order_api/api.js'; //引入需要的api //import { getworkertype} from '@/take_order_api/api.js'; //引入需要的api
export default { export default {
data() { data() {
return { return {
name: '', name: '',
phone:'', phone:'',
location:'', location:'',
...@@ -160,10 +160,10 @@ ...@@ -160,10 +160,10 @@
TimeID:-1, TimeID:-1,
isMineShow:false, isMineShow:false,
} }
}, },
onLoad() { onLoad() {
this.icon_location = getApp().globalData.icon_location this.icon_location = getApp().globalData.icon_location
this.icon_notice = getApp().globalData.icon_index_notice this.icon_notice = getApp().globalData.icon_index_notice
...@@ -176,13 +176,16 @@ ...@@ -176,13 +176,16 @@
// getworkertype('parameter').then(data => { // getworkertype('parameter').then(data => {
// console.log(data); // console.log(data);
// }); // });
}, },
onShow() { onShow() {
//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()
...@@ -209,7 +212,7 @@ ...@@ -209,7 +212,7 @@
}, },
methods: { methods: {
doNothing:function(){}, doNothing:function(){},
...@@ -748,13 +751,13 @@ ...@@ -748,13 +751,13 @@
const data = res.data const data = res.data
}, },
*/ */
}
}
</script>
}
}
</script>
<style> <style>
.topIconView{ .topIconView{
...@@ -794,15 +797,15 @@ ...@@ -794,15 +797,15 @@
font-size: 40rpx; font-size: 40rpx;
font-weight: bold; font-weight: bold;
} }
.itemView { .itemView {
background-color: #FFFFFF; background-color: #FFFFFF;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
height: 104rpx; height: 104rpx;
} }
.itemTitleView{ .itemTitleView{
...@@ -1220,5 +1223,5 @@ ...@@ -1220,5 +1223,5 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
</style> </style>
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