Commit a4ccf566 authored by zL's avatar zL

新增一个veux数据

parent b0feca44
......@@ -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;
......
......@@ -47,6 +47,9 @@ const mutations: MutationTree<StateTypes> = {
},
setTheAnchor(state, num) {
state.theAnchor = num
},
setChainStatus(state, str) {
state.chainStatus = str
}
};
......
......@@ -13,7 +13,8 @@ const state: StateTypes = {
existingEvidenceList: [],
userInfos: {},
templateNum: 0, //模板数量
theAnchor: -1
theAnchor: -1,
chainStatus: ''
};
export default state;
......@@ -12,6 +12,7 @@ export interface StateTypes {
existingEvidenceList: any
userInfos: object, // 用户信息
templateNum: number, // 模板数量
theAnchor: number //用于记录增量列表的展开
theAnchor: number, //用于记录增量列表的展开
chainStatus: string
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment