|
@@ -34,9 +34,9 @@ export default {
|
|
firstList: [],
|
|
firstList: [],
|
|
myList: [],
|
|
myList: [],
|
|
}),
|
|
}),
|
|
- created() {
|
|
|
|
- this.search({ type: 'first' });
|
|
|
|
- this.search({ type: 'my' });
|
|
|
|
|
|
+ async created() {
|
|
|
|
+ await this.search({ type: 'my' });
|
|
|
|
+ await this.search({ type: 'first' });
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user']),
|
|
...mapState(['user']),
|
|
@@ -66,6 +66,14 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.$message.error(result.errmsg ? result.errmsg : 'error');
|
|
this.$message.error(result.errmsg ? result.errmsg : 'error');
|
|
}
|
|
}
|
|
|
|
+ if (type === 'first') {
|
|
|
|
+ let arr = this.firstList.map(item => {
|
|
|
|
+ let res = this.myList.filter(fil => fil.fairid === item.id);
|
|
|
|
+ item.is_join = res.length > 0 ? '已申请' : '未申请';
|
|
|
|
+ return item;
|
|
|
|
+ });
|
|
|
|
+ this.$set(this, `${type}List`, arr);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
async proMyList(list) {
|
|
async proMyList(list) {
|
|
let arr = [];
|
|
let arr = [];
|