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
Hide 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 {datumApiFun} from '@/common/api/datum.js';
import
{
apiFun
}
from
'@/common/api/index.js'
;
import
{
cloudRulesApiFun
}
from
"@/common/api/cloud_rules.js"
const
upload
=
async
function
(
path
,
params
=
{},
vm
)
{
...
...
@@ -247,6 +248,10 @@ const install = (Vue, vm) => {
goAskPost
,
getQiniuToken
};
let
cloudRules
=
cloudRulesApiFun
(
vm
)
vm
.
$u
.
cloudApi
=
{
...
cloudRules
}
}
export
default
{
...
...
take-order/pages/index/index.vue
View file @
f445953e
<
template
>
<
template
>
<view
class=
""
>
<view
class=
"topIconView"
>
<image
class=
"topImage"
:src=
"icon_top"
mode=
""
></image>
</view>
<view
class=
"fatDivideLine"
></view>
<view
class=
"fatDivideLine"
></view>
<view
class=
"itemView borderBottom"
>
<view
class=
"itemTitleView"
>
<text
class=
"itemTitle"
>
联系人
</text>
...
...
@@ -122,16 +122,16 @@
<text
class=
"coverItemText"
>
下单记录
</text>
</view>
</view>
</view>
</view>
</
template
>
</view>
</view>
</
template
>
<
script
>
//import { getworkertype} from '@/take_order_api/api.js'; //引入需要的api
//import { getworkertype} from '@/take_order_api/api.js'; //引入需要的api
export
default
{
data
()
{
return
{
data
()
{
return
{
name
:
''
,
phone
:
''
,
location
:
''
,
...
...
@@ -160,10 +160,10 @@
TimeID
:
-
1
,
isMineShow
:
false
,
}
}
},
onLoad
()
{
this
.
icon_location
=
getApp
().
globalData
.
icon_location
this
.
icon_notice
=
getApp
().
globalData
.
icon_index_notice
...
...
@@ -176,13 +176,16 @@
// getworkertype('parameter').then(data => {
// console.log(data);
// });
},
onShow
()
{
//this.getWorkerType()
//this.getPerson()
console
.
log
(
'onShow'
)
this
.
$u
.
cloudApi
.
getAllBrand
().
then
(
res
=>
{
console
.
log
(
res
,
"执行"
)
}
)
this
.
checkClean
()
...
...
@@ -209,7 +212,7 @@
},
methods
:
{
doNothing
:
function
(){},
...
...
@@ -748,13 +751,13 @@
const data = res.data
},
*/
*/
}
}
</
script
>
}
}
</
script
>
<
style
>
.topIconView
{
...
...
@@ -794,15 +797,15 @@
font-size
:
40
rpx
;
font-weight
:
bold
;
}
.itemView
{
background-color
:
#FFFFFF
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
background-color
:
#FFFFFF
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
width
:
100%
;
height
:
104
rpx
;
height
:
104
rpx
;
}
.itemTitleView
{
...
...
@@ -1220,5 +1223,5 @@
align-items
:
center
;
justify-content
:
center
;
}
</
style
>
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