<template>
<view>
<view class="content">
<button @click="search_admin_menus()">点击:在表里查找数据</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
async search_admin_menus() {
const db = uniCloud.database()
db.collection('opendb-admin-menus')
.where('name == "首页"')
.get()
.then((res)=>{
console.log(res);
}
).catch((err)=>{
console.log('未查询到符合条件的数据');
})
}
}
}
</script>