Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
traceSourceMb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yanyanhong
traceSourceMb
Commits
0ec17fe6
Commit
0ec17fe6
authored
Aug 05, 2020
by
yyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proofCount store
parent
a19135b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
index.ts
src/store/index.ts
+11
-0
Index.vue
src/views/template/Index.vue
+4
-5
No files found.
src/store/index.ts
View file @
0ec17fe6
...
...
@@ -8,6 +8,7 @@ export default new Vuex.Store({
userInfo
:
{},
authInfo
:
{},
// 个人认证信息
companyAuthInfo
:
{},
// 企业认证信息
proofCount
:
0
,
},
getters
:
{
},
...
...
@@ -27,6 +28,9 @@ export default new Vuex.Store({
updateCompanyAuthInfo
(
state
:
any
,
payload
:
any
)
{
state
.
companyAuthInfo
=
payload
;
},
updateProofCount
(
state
:
any
,
payload
:
any
)
{
state
.
proofCount
=
payload
;
},
},
actions
:
{
getUserInfo
({
commit
})
{
...
...
@@ -38,6 +42,13 @@ export default new Vuex.Store({
commit
(
'updateIsLogin'
,
false
);
});
},
getProofCount
(
{
commit
}
)
{
Vue
.
prototype
.
$api
.
proof
.
count
().
then
((
res
:
any
)
=>
{
commit
(
'updateProofCount'
,
res
.
total
);
}).
catch
((
err
:
any
)
=>
{
commit
(
'updateProofCount'
,
0
);
});
},
isSetPwd
({
commit
,
state
})
{
const
{
phone
,
email
}
=
state
.
userInfo
;
Vue
.
prototype
.
$api
.
user
.
isSetPwd
({
phone
,
email
}).
then
((
res
:
any
)
=>
{
...
...
src/views/template/Index.vue
View file @
0ec17fe6
...
...
@@ -56,7 +56,7 @@
import
{
Component
,
Prop
,
Vue
,
Watch
}
from
'vue-property-decorator'
;
import
{
List
,
Image
}
from
'vant'
;
import
{
TEMPLATETYPE
}
from
'@/const/enum'
;
import
{
State
}
from
'vuex-class'
;
import
{
State
,
Action
}
from
'vuex-class'
;
@
Component
({
components
:
{
[
List
.
name
]:
List
,
...
...
@@ -65,6 +65,8 @@ import { State } from 'vuex-class';
})
export
default
class
Index
extends
Vue
{
@
State
(
'isLogin'
)
private
isLogin
!
:
boolean
;
@
State
(
'proofCount'
)
private
proofCount
!
:
number
;
@
Action
(
'getProofCount'
)
private
getProofCount
!
:
any
;
private
systemList
:
any
[]
=
[];
private
list
:
any
[]
=
[];
private
page
:
number
=
1
;
...
...
@@ -73,16 +75,13 @@ export default class Index extends Vue {
private
loading
:
boolean
=
false
;
private
finished
:
boolean
=
false
;
private
proofCount
:
number
=
0
;
private
addFolderShow
:
boolean
=
false
;
@
Watch
(
'isLogin'
,
{
immediate
:
true
})
private
onIsLoginChange
(
newVal
:
boolean
,
oldVal
:
boolean
)
{
if
(
newVal
)
{
this
.
$api
.
proof
.
count
().
then
((
res
:
any
)
=>
{
this
.
proofCount
=
res
.
total
;
});
this
.
getProofCount
();
this
.
$api
.
template
.
folderList
({
template_type
:
1
,
}).
then
((
res
:
any
)
=>
{
...
...
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