Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
source-trace-manage-go
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
Tracing
source-trace-manage-go
Commits
a4ccf566
Commit
a4ccf566
authored
Dec 22, 2020
by
zL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增一个veux数据
parent
b0feca44
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
3 deletions
+31
-3
ProductList.vue
src/components/category/ProductList.vue
+24
-1
mutations.ts
src/store/mutations.ts
+3
-0
state.ts
src/store/state.ts
+2
-1
types.ts
src/store/types.ts
+2
-1
No files found.
src/components/category/ProductList.vue
View file @
a4ccf566
...
...
@@ -208,7 +208,29 @@ export default {
};
},
created
()
{
this
.
getList
();
// 获取所有商品
// 获取所有商品
this
.
label
=
this
.
$store
.
state
.
chainStatus
||
"全部"
;
switch
(
this
.
$store
.
state
.
chainStatus
)
{
case
"全部"
:
this
.
chainStatus
=
null
;
break
;
case
"未上链"
:
this
.
chainStatus
=
0
;
break
;
case
"上链中"
:
this
.
chainStatus
=
1
;
break
;
case
"已上链"
:
this
.
chainStatus
=
2
;
break
;
case
"上链失败"
:
this
.
chainStatus
=
3
;
break
;
default
:
this
.
chainStatus
=
null
;
break
;
}
this
.
getList
();
},
methods
:
{
async
hiddenCertificate
()
{
...
...
@@ -440,6 +462,7 @@ export default {
Select
(
val
)
{
this
.
isShowMenu
=
false
;
this
.
label
=
val
;
this
.
$store
.
commit
(
"setChainStatus"
,
val
);
switch
(
val
)
{
case
"全部"
:
this
.
chainStatus
=
null
;
...
...
src/store/mutations.ts
View file @
a4ccf566
...
...
@@ -47,6 +47,9 @@ const mutations: MutationTree<StateTypes> = {
},
setTheAnchor
(
state
,
num
)
{
state
.
theAnchor
=
num
},
setChainStatus
(
state
,
str
)
{
state
.
chainStatus
=
str
}
};
...
...
src/store/state.ts
View file @
a4ccf566
...
...
@@ -13,7 +13,8 @@ const state: StateTypes = {
existingEvidenceList
:
[],
userInfos
:
{},
templateNum
:
0
,
//模板数量
theAnchor
:
-
1
theAnchor
:
-
1
,
chainStatus
:
''
};
export
default
state
;
src/store/types.ts
View file @
a4ccf566
...
...
@@ -12,6 +12,7 @@ export interface StateTypes {
existingEvidenceList
:
any
userInfos
:
object
,
// 用户信息
templateNum
:
number
,
// 模板数量
theAnchor
:
number
//用于记录增量列表的展开
theAnchor
:
number
,
//用于记录增量列表的展开
chainStatus
:
string
}
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