Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
夏新然
/
appweb
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2d289783
authored
Apr 24, 2019
by
周志凯
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
接口管理
1 parent
45a5c346
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
120 additions
and
24 deletions
api/configApi.js
api/fetch.js
pages/passenger/conditions/groupTimeOption.vue
store/date.js
store/modules/condition.js
api/configApi.js
0 → 100644
View file @
2d28978
const
baseUrl
=
'https://store.keliuyun.com/report'
;
// window.url;
export
default
{
LOAD_ACCOUNT_LIST
:
`
${
baseUrl
}
/accounts`
,
LOAD_MALL_LIST
:
`
${
baseUrl
}
/malls`
,
LOAD_FLOOR_LIST
:
`
${
baseUrl
}
/floors`
,
LOAD_ZONE_LIST
:
`
${
baseUrl
}
/zones`
,
LOAD_GATE_LIST
:
`
${
baseUrl
}
/gates`
,
LOAD_DICT_LIST
:
`
${
baseUrl
}
/dataDics`
,
LOAD_FACERECOGNITION_LIST
:
`
${
baseUrl
}
/faceRecognitions`
,
}
\ No newline at end of file
\ No newline at end of file
api/fetch.js
View file @
2d28978
import
configApi
from
'./configApi'
// 第一种写法
export
function
fetch
(
method
=
'GET'
,
url
,
params
=
null
,
headers
=
{})
{
export
function
fetch
(
method
=
'GET'
,
url
,
params
=
null
,
headers
=
{})
{
method
=
method
.
toLocaleUpperCase
();
method
=
method
.
toLocaleUpperCase
();
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -16,8 +19,88 @@ export function fetch(method = 'GET', url, params = null, headers = {}) {
...
@@ -16,8 +19,88 @@ export function fetch(method = 'GET', url, params = null, headers = {}) {
})
})
}
}
// export default {
// getMallList() {
// return fetch('get', '/malls')
// }
// }
\ No newline at end of file
\ No newline at end of file
// 第二种写法
const
http
=
(
options
)
=>
{
const
{
method
=
'get'
,
data
,
url
,
headers
=
{}
}
=
options
;
method
=
method
.
toLocaleUpperCase
();
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
request
({
url
:
url
,
method
:
method
,
data
:
data
,
header
:
headers
,
success
:
(
res
)
=>
{
resolve
(
res
)
},
fail
:
(
err
)
=>
{
reject
(
err
);
}
})
})
}
export
default
{
// 集团列表
loadAccountList
(
data
,
headers
)
{
return
http
({
url
:
configApi
.
LOAD_ACCOUNT_LIST
,
method
:
'get'
,
data
:
data
,
headers
:
headers
})
},
// 商场列表
loadMallList
(
data
,
headers
)
{
return
http
({
url
:
configApi
.
LOAD_MALL_LIST
,
method
:
'get'
,
data
:
data
,
headers
:
headers
})
},
// 楼层列表
loadFloorList
(
data
,
headers
)
{
return
http
({
url
:
configApi
.
LOAD_FLOOR_LIST
,
method
:
'get'
,
data
:
data
,
headers
:
headers
})
},
// 店铺列表
loadZoneList
(
data
,
headers
)
{
return
http
({
url
:
configApi
.
LOAD_ZONE_LIST
,
method
:
'get'
,
data
:
data
,
headers
:
headers
})
},
// 监控点列表
loadGateList
(
data
,
headers
)
{
return
http
({
url
:
configApi
.
LOAD_GATE_LIST
,
method
:
'get'
,
data
:
data
,
headers
:
headers
})
},
// 字典列表
loadDictList
(
data
,
headers
)
{
return
http
({
url
:
configApi
.
LOAD_DICT_LIST
,
method
:
'get'
,
data
:
data
,
headers
:
headers
})
},
// 抓拍记录列表
loadFacerecognitionList
(
data
,
headers
)
{
return
http
({
url
:
configApi
.
LOAD_FACERECOGNITION_LIST
,
method
:
'get'
,
data
:
data
,
headers
:
headers
})
}
}
pages/passenger/conditions/groupTimeOption.vue
View file @
2d28978
...
@@ -193,7 +193,7 @@
...
@@ -193,7 +193,7 @@
},
},
goGateList
()
{
goGateList
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"../../conditionList/multiGateList?backUrl=../passenger/conditions/groupTime
Condi
tion&analysisLevel="
+
this
.
activeType
,
url
:
"../../conditionList/multiGateList?backUrl=../passenger/conditions/groupTime
Op
tion&analysisLevel="
+
this
.
activeType
,
animationType
:
'slide-in-right'
,
animationType
:
'slide-in-right'
,
animationDuration
:
200
animationDuration
:
200
})
})
...
...
store/date.js
0 → 100644
View file @
2d28978
// 生成年月日时分秒数据
let
dic
=
{
'Y'
:
'年'
,
'EnY'
:
'year'
,
'M'
:
'月'
,
'EnM'
:
'month'
,
'D'
:
'日'
,
'EnD'
:
'day'
,
'h'
:
'时'
,
'Enh'
:
'hour'
,
'm'
:
'分'
,
'Enm'
:
'minutes'
,
's'
:
'秒'
,
'Ens'
:
'seconds'
,
}
function
createDateData
(
formatString
)
{
// if(dic[formatString])
}
\ No newline at end of file
\ No newline at end of file
store/modules/condition.js
View file @
2d28978
...
@@ -25,22 +25,4 @@ const conditionList = {
...
@@ -25,22 +25,4 @@ const conditionList = {
}
}
}
}
/*
* 获取门店列表
*/
function
getMallId
()
{
return
new
Promise
((
reslove
,
reject
)
=>
{
//
})
}
/*
* 获取出入口列表
*/
function
getGateId
()
{
return
new
Promise
((
reslove
,
reject
)
=>
{
//
})
}
export
default
conditionList
;
export
default
conditionList
;
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment