Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
和慭琛
take_order
Commits
f445953e
Commit
f445953e
authored
Dec 23, 2020
by
李超鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
云开发环境
parent
6ce387b0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
29 deletions
+55
-29
cloud_rules.js
take-order/common/api/cloud_rules.js
+18
-0
http.api.js
take-order/common/http.api.js
+5
-0
index.vue
take-order/pages/index/index.vue
+32
-29
No files found.
take-order/common/api/cloud_rules.js
0 → 100644
View file @
f445953e
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
take-order/common/http.api.js
View file @
f445953e
// 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
{
...
...
take-order/pages/index/index.vue
View file @
f445953e
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment