Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
hrs_app_h5
/
bill
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
54790a15
authored
May 06, 2020
by
展昭
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
62d7b541
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
54 deletions
.env.development
src/api/Bill/index.js
src/api/Bill/urls.js
src/api/More/index.js
src/api/More/urls.js
src/views/Bill/index.vue
.env.development
View file @
54790a15
VUE_APP_OIDC_CONFIG = '{ "authority": "http://106.120.107.150:5000", "client_id": "hrs-bill-web-mobile", "client_secret": "123456", "redirect_uri": "http://localhost:8080/callback.html", "response_type": "id_token token", "scope": "workapps.client api.workapps.user api.workapps.org api.workapps.open openid","post_logout_redirect_uri":"http://localhost:8080", "silent_redirect_uri": "http://localhost:8080/silent-renew-oidc.html", "automaticSilentRenew": true,"accessTokenExpiringNotificationTime":60,"filterProtocolClaims":true,"loadUserInfo":true }'
VUE_APP_API_BASEURL = 'http://organization.test.hrs100.cn:18080/api/user/'
VUE_APP_API_BASEURL = 'http://organization.test.hrs100.cn:18080/api/user/
bill/
'
VUE_APP_PUBLIC_DIR='/'
src/api/Bill/index.js
View file @
54790a15
import
{
AjaxRequest
}
from
"../index"
;
import
urls
from
"./urls"
;
import
token
from
"../../store/modules/token"
const
usermemberId
=
token
.
state
.
usermemberId
;
export
default
{
// get数据
getPeriod
()
{
let
url
=
urls
.
getPeriod
(
usermemberId
);
let
url
=
urls
.
getPeriod
();
console
.
log
(
'url='
,
url
);
return
AjaxRequest
.
get
(
url
);
},
getBillSummary
(
accountId
)
{
let
url
=
urls
.
getBillSummary
(
accountId
,
usermemberId
);
let
url
=
urls
.
getBillSummary
(
accountId
);
return
AjaxRequest
.
get
(
url
);
},
getBillHosting
(
accountId
)
{
let
url
=
urls
.
getBillHosting
(
accountId
,
usermemberId
);
let
url
=
urls
.
getBillHosting
(
accountId
);
return
AjaxRequest
.
get
(
url
);
},
getRecord
(
accountId
,
page
,
pageSize
)
{
let
url
=
urls
.
getFlow
(
accountId
,
usermemberId
,
page
,
pageSize
);
let
url
=
urls
.
getFlow
(
accountId
,
page
,
pageSize
);
return
AjaxRequest
.
get
(
url
);
},
getReceiptList
(
accountId
)
{
let
url
=
urls
.
getReceiptList
(
accountId
,
usermemberId
);
let
url
=
urls
.
getReceiptList
(
accountId
);
return
AjaxRequest
.
get
(
url
);
},
getReceiptDetail
(
accountId
,
type
)
{
let
url
=
urls
.
getReceiptDetail
(
accountId
,
usermemberId
,
type
);
let
url
=
urls
.
getReceiptDetail
(
accountId
,
type
);
return
AjaxRequest
.
get
(
url
);
}
};
src/api/Bill/urls.js
View file @
54790a15
var
VUE_APP_API_BASEURL
=
process
.
env
.
VUE_APP_API_BASEURL
export
default
{
getPeriod
(
usermember
Id
)
{
let
url
=
VUE_APP_API_BASEURL
+
'
bill/user/{usermemberId}
/period'
;
url
=
url
.
replace
(
'{
usermemberId}'
,
usermember
Id
);
getPeriod
(
account
Id
)
{
// http://organization.test.hrs100.cn:18080/api/user/bill/account/period
let
url
=
VUE_APP_API_BASEURL
+
'
account
/period'
;
url
=
url
.
replace
(
'{
accountId}'
,
account
Id
);
return
url
;
},
getBillSummary
(
accountId
,
usermemberId
)
{
let
url
=
VUE_APP_API_BASEURL
+
'bill/user/{usermemberId}/period/{accountId}/summary'
;
url
=
url
.
replace
(
'{usermemberId}'
,
usermemberId
)
;
getBillSummary
(
accountId
)
{
//account/period/2176426/summary
let
url
=
VUE_APP_API_BASEURL
+
'account/period/{accountId}/summary'
;
url
=
url
.
replace
(
'{accountId}'
,
accountId
);
return
url
;
},
getBillHosting
(
accountId
,
usermemberId
)
{
let
url
=
VUE_APP_API_BASEURL
+
'bill/user/{usermemberId}/hosting/{accountId}/summary'
url
=
url
.
replace
(
'{usermemberId}'
,
usermemberId
);
getBillHosting
(
accountId
)
{
// http://organization.test.hrs100.cn:18080/api/user/bill/account/hosting/2176426/summary
let
url
=
VUE_APP_API_BASEURL
+
'account/hosting/{accountId}/summary'
url
=
url
.
replace
(
'{accountId}'
,
accountId
);
return
url
;
},
getFlow
(
accountId
,
usermemberId
,
page
,
pageSize
)
{
let
url
=
VUE_APP_API_BASEURL
+
'bill/user/{usermemberId}/period/{accountId}/flow?page={page}&pageSize={pageSize}'
;
url
=
url
.
replace
(
'{usermemberId}'
,
usermemberId
)
;
getFlow
(
accountId
,
page
,
pageSize
)
{
// http://organization.test.hrs100.cn:18080/api/user/bill/account/period/2176426/flow?page=1&pageSize=10
let
url
=
VUE_APP_API_BASEURL
+
'account/period/{accountId}/flow?page={page}&pageSize={pageSize}'
;
url
=
url
.
replace
(
'{accountId}'
,
accountId
);
url
=
url
.
replace
(
'{page}'
,
page
);
url
=
url
.
replace
(
'{pageSize}'
,
pageSize
);
return
url
;
},
getReceiptList
(
accountId
,
usermemberId
)
{
let
url
=
VUE_APP_API_BASEURL
+
'bill/user/{usermemberId}/period/{accountId}/receipt/list'
url
=
url
.
replace
(
'{usermemberId}'
,
usermemberId
);
getReceiptList
(
accountId
)
{
// http://organization.test.hrs100.cn:18080/api/user/bill/account/period/2176426/receipt/list
let
url
=
VUE_APP_API_BASEURL
+
'account/period/{accountId}/receipt/list'
url
=
url
.
replace
(
'{accountId}'
,
accountId
);
return
url
;
},
getReceiptDetail
(
accountId
,
usermemberId
,
type
)
{
usermemberId
=
1822782
;
accountId
=
2320271
;
let
url
=
VUE_APP_API_BASEURL
+
'bill/user/{usermemberId}/period/{accountId}/receipt/{type}/detail'
url
=
url
.
replace
(
'{usermemberId}'
,
usermemberId
);
getReceiptDetail
(
accountId
,
type
)
{
// http://organization.test.hrs100.cn:18080/api/user/bill/account/period/2176426/receipt/service/detail
let
url
=
VUE_APP_API_BASEURL
+
'account/period/{accountId}/receipt/{type}/detail'
url
=
url
.
replace
(
'{accountId}'
,
accountId
);
url
=
url
.
replace
(
'{type}'
,
type
);
return
url
;
}
};
// http://10.10.10.44:8086/api/hrs/bill/account/206484/period
// http://10.10.10.44:8086/api/hrs/bill/account/206484/period/2319680/summary
// http://10.10.10.44:8086/api/hrs/bill/account/206484/hosting/2319680/summary
// http://10.10.10.44:8086/api/hrs/bill/account/206484/period/2319680/flow?page=1&pageSize=10
// http://10.10.10.44:8086/api/hrs/bill/account/206484/period/2319680/receipt/list
// http://10.10.10.44:8086/api/hrs/bill/account/{usermemberId}/period/{accountId}/receipt/{type}/detail
\ No newline at end of file
src/api/More/index.js
View file @
54790a15
import
{
AjaxRequest
}
from
"../index"
;
import
urls
from
"./urls"
;
import
token
from
"../../store/modules/token"
const
usermemberId
=
token
.
state
.
usermemberId
;
console
.
log
(
'userid='
,
usermemberId
);
export
default
{
// get数据
async
getMoreList
()
{
const
url
=
urls
.
getMoreList
(
usermemberId
);
const
url
=
urls
.
getMoreList
();
return
AjaxRequest
.
get
(
url
);
},
async
getMoreSummary
()
{
const
url
=
urls
.
getMoreSummary
(
usermemberId
);
const
url
=
urls
.
getMoreSummary
();
return
AjaxRequest
.
get
(
url
);
},
};
src/api/More/urls.js
View file @
54790a15
var
VUE_APP_API_BASEURL
=
process
.
env
.
VUE_APP_API_BASEURL
export
default
{
getMoreList
(
usermemberId
)
{
let
url
=
VUE_APP_API_BASEURL
+
'bill/account/{usermemberId}/moresvc/receipt/list'
;
url
=
url
.
replace
(
'{usermemberId}'
,
usermemberId
)
;
getMoreList
(
)
{
// http://organization.test.hrs100.cn:18080/api/user/bill/account/moresvc/receipt/list
let
url
=
VUE_APP_API_BASEURL
+
'account/moresvc/receipt/list'
;
return
url
;
},
getMoreSummary
(
usermemberId
)
{
let
url
=
VUE_APP_API_BASEURL
+
'bill/account/{usermemberId}/moresvc/summary'
;
url
=
url
.
replace
(
'{usermemberId}'
,
usermemberId
)
;
getMoreSummary
(
)
{
// http://organization.test.hrs100.cn:18080/api/user/bill/account/moresvc/summary
let
url
=
VUE_APP_API_BASEURL
+
'account/moresvc/summary'
;
return
url
;
}
};
// http://organization.test.hrs100.cn:18080/api/user/bill/account/206484/moresvc/receipt/list
// http://organization.test.hrs100.cn:18080/api/user/bill/account/206484/moresvc/summary
\ No newline at end of file
src/views/Bill/index.vue
View file @
54790a15
...
...
@@ -383,7 +383,9 @@ export default {
if
(
localPerIndex
&&
localPerIndex
!=
"undefined"
)
{
this
.
currentPerIndex
=
localPerIndex
;
console
.
log
(
"localPerIndex="
,
localPerIndex
);
this
.
currentPerId
=
this
.
period
[
localPerIndex
].
id
;
console
.
log
(
"this.currentPerId="
,
this
.
currentPerId
);
this
.
currentPerName
=
this
.
period
[
localPerIndex
].
name
;
this
.
savePerBeginDate
(
this
.
period
[
localPerIndex
].
beginDate
);
}
else
{
...
...
@@ -396,6 +398,8 @@ export default {
this
.
currentPerName
=
element
.
name
;
this
.
savePerBeginDate
(
element
.
beginDate
);
break
;
}
else
{
this
.
currentPerId
=
this
.
period
[
localPerIndex
].
id
;
}
}
}
...
...
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