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
72c5442d
authored
Apr 20, 2020
by
e
Browse files
Options
_('Browse Files')
Download
Plain Diff
more修改数据
parents
4339bf56
89e53cef
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
106 additions
and
44 deletions
src/api/More/index.js
src/router/index.js
src/views/Bill/index.vue
src/views/Bill/record.vue
src/views/More/index.vue
src/views/test.vue
src/api/More/index.js
0 → 100644
View file @
72c5442d
File mode changed
src/router/index.js
View file @
72c5442d
...
...
@@ -4,7 +4,7 @@ import moreRouters from './more-router.js'
import
billRouters
from
'./bill-router.js'
import
{
vuexOidcCreateRouterMiddleware
}
from
'vuex-oidc'
import
store
from
'../store'
import
Mgr
from
"../assets/js/SecurityService"
Vue
.
use
(
VueRouter
)
...
...
@@ -30,6 +30,58 @@ const router = new VueRouter({
}
})
const
mgr
=
new
Mgr
();
function
loginByAuthcode
(
authCode
)
{
let
loginArgs
=
{
extraQueryParams
:
{
authcode
:
authCode
}
};
mgr
.
signIn
(
loginArgs
);
}
function
autoLogin
(
comid
,
authcode
,
next
)
{
localStorage
.
setItem
(
"comid"
,
comid
);
mgr
.
getUser
().
then
(
user
=>
{
if
(
user
==
null
)
{
loginByAuthcode
(
authcode
);
}
else
{
let
companyId
=
localStorage
.
getItem
(
"companyId"
);
if
(
comid
!=
companyId
)
{
//如果已经登录,则先退出
localStorage
.
setItem
(
"authcode"
,
authcode
);
mgr
.
signOut
();
}
else
{
next
();
}
}
})
}
router
.
beforeEach
(
vuexOidcCreateRouterMiddleware
(
store
));
// router.beforeEach((to, from, next) => {
// let authcode = localStorage.getItem("authcode")
// if (authcode) {
// localStorage.removeItem("authcode");
// loginByAuthcode(authcode)
// }
// else {
// authcode = to.query.authcode;
// const comid = to.query.comId || to.query.comid;
// if (comid && authcode) {
// localStorage.setItem("autoCallback", to.path);
// autoLogin(comid, authcode, next);
// } else {
// mgr.getUser().then(user => {
// if (user == null) {
// mgr.signIn();
// } else {
// next()
// }
// });
// }
// }
// });
export
default
router
src/views/Bill/index.vue
View file @
72c5442d
...
...
@@ -11,7 +11,7 @@
<img
src=
"../../assets/images/triangle-arrow-l.png"
alt
/>
</div>
<div
class=
"month"
>
{{
month4choose
}}
</div>
<div
class=
"arrow-r"
@
click=
"chooseMonth('right')"
>
<div
class=
"arrow-r"
@
click=
"chooseMonth('right')"
>
<img
src=
"../../assets/images/triangle-arrow-r.png"
alt
/>
</div>
</div>
...
...
@@ -159,6 +159,7 @@ import { Icon } from "vant";
import
{
TabHeader
}
from
"@/components"
;
import
*
as
utils
from
"../../utils/common"
;
import
{
mapGetters
,
mapActions
}
from
"vuex"
;
import
api
from
"../../api/Bill"
;
export
default
{
components
:
{
...
...
@@ -168,48 +169,44 @@ export default {
data
()
{
return
{
title
:
"人事服务"
,
month4choose
:
"
2019年11月
"
,
cycle
:
"
11.01-11.30
"
,
data
:{
balance
:
0
,
toBePayAmount
:
0
,
hosting
:
8000.0
0
,
socical
:{
toPayAmount
:
600.0
0
,
toBePayAmount
:
600.0
0
month4choose
:
""
,
cycle
:
""
,
data
:
{
balance
:
0
,
toBePayAmount
:
0
,
hosting
:
0
,
socical
:
{
toPayAmount
:
0
,
toBePayAmount
:
0
},
fund
:{
toPayAmount
:
600.0
0
,
toBePayAmount
:
600.0
0
fund
:
{
toPayAmount
:
0
,
toBePayAmount
:
0
},
tax
:{
toPayAmount
:
600.0
0
,
toBePayAmount
:
600.0
0
tax
:
{
toPayAmount
:
0
,
toBePayAmount
:
0
},
service
:{
toPayAmount
:
600.0
0
,
toBePayAmount
:
600.0
0
service
:
{
toPayAmount
:
0
,
toBePayAmount
:
0
},
annual
:{
toPayAmount
:
600.0
0
,
toBePayAmount
:
600.0
0
annual
:
{
toPayAmount
:
0
,
toBePayAmount
:
0
},
other
:{
toPayAmount
:
600.0
0
,
toBePayAmount
:
600.0
0
other
:
{
toPayAmount
:
0
,
toBePayAmount
:
0
}
}
};
},
computed
:
{
computed
:
{
...
mapGetters
([
"getMonth4choose"
,
"getCycle"
,
"getData"
])
},
methods
:
{
...
mapActions
([
"loadBillMonth"
,
"loadBillCycle"
,
"loadBillData"
]),
...
mapActions
([
"loadBillMonth"
,
"loadBillCycle"
,
"loadBillData"
]),
toPage
(
flag
)
{
switch
(
flag
)
{
case
1
:
// 充值
...
...
@@ -234,13 +231,19 @@ export default {
break
;
}
},
chooseMonth
(
dirct
){
if
(
dirct
===
'left'
)
{
console
.
log
(
'-----'
);
chooseMonth
(
dirct
)
{
if
(
dirct
===
"left"
)
{
console
.
log
(
"-----"
);
}
if
(
dirct
===
'right'
)
{
console
.
log
(
'+++++++'
);
if
(
dirct
===
"right"
)
{
console
.
log
(
"+++++++"
);
}
},
async
getData
()
{
await
api
.
getData
(
1
,
1
,
"a"
).
then
(
res
=>
{
console
.
log
(
res
.
data
);
this
.
data
.
balance
=
res
.
data
.
balance
;
});
}
}
};
...
...
@@ -264,8 +267,9 @@ export default {
.choose-month
{
display
:
grid
;
grid-template-columns
:
5%
90%
5%
;
justify-items
:
center
;
.arrow-l,.arrow_right{
justify-items
:
center
;
.arrow-l,
.arrow_right
{
widows
:
16px
;
height
:
16px
;
}
...
...
src/views/Bill/record.vue
View file @
72c5442d
...
...
@@ -51,7 +51,7 @@
<i>
-160.00
</i>
</div>
<p>
<span>
11-20 12:20
</span>
<span>
{{
test
}}
</span>
</p>
</div>
...
...
@@ -69,7 +69,10 @@ export default {
},
data
()
{
return
{
title
:
"11月资金记录"
title
:
"11月资金记录"
,
data
:{
test
:
''
}
};
},
methods
:
{
...
...
src/views/More/index.vue
View file @
72c5442d
...
...
@@ -74,11 +74,15 @@ export default {
onClickLeft
()
{
console
.
log
(
1
);
},
toPage
(
flag
){
toPage
(
flag
)
{
if
(
flag
===
2
)
{
this
.
$router
.
push
({
name
:
"morerecord"
});
}
},
getData
()
{
const
res
=
null
;
this
.
data
.
topay
=
res
.
money
;
},
navLeftArrowClick
()
{
this
.
$router
.
go
(
-
1
);
}
...
...
@@ -90,7 +94,6 @@ export default {
</
script
>
<
style
lang=
"less"
scoped
>
.contener
{
.header
{
height
:
136px
;
...
...
src/views/test.vue
View file @
72c5442d
...
...
@@ -48,7 +48,7 @@ export default {
// this.getOidcUser().then(res => {
// console.log("res=", JSON.stringify(res));
// });
const
token
=
store
.
state
.
oidc
.
access_t
oken
;
const
token
=
this
.
oidcAccessT
oken
;
console
.
log
(
'token='
,
token
);
}
...
...
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