| | |
| | | coinList: "home/coinList", |
| | | currency: "home/currency", |
| | | coinArr: "home/coinArr", |
| | | newcoinArr: "home/newcoinArr", |
| | | hotArr: "home/hotArr", |
| | | userInfo: "user/userInfo", |
| | | theme: "home/theme", |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | ...mapActions("home", [SET_COIN_LIST]), |
| | | ...mapActions("home", [SET_COIN_LIST, "NEW_CION_LIST"]), |
| | | fetchUnread() { |
| | | // 获取未读 |
| | | _getUnreadMsg().then((unread_num) => { |
| | |
| | | }, |
| | | async fetchQList() { |
| | | // 获取行情 |
| | | const list = await _getHomeList(this.coinArr.join(",")).catch(() => { |
| | | // console.log(this.newcoinArr, "[[[[[]]]]]"); |
| | | const mainArray = this.coinArr.filter( |
| | | (item) => !this.newcoinArr.includes(item) |
| | | ); |
| | | |
| | | const list = await _getHomeList(mainArray.join(",")).catch(() => { |
| | | this.timeout = setTimeout(() => { |
| | | this.fetchQList(); |
| | | }, 1000); |
| | |
| | | }, |
| | | }, |
| | | async created() { |
| | | await this.NEW_CION_LIST(); |
| | | this.getIsSave(); |
| | | this.getNews(); |
| | | this.getPopupNews(); |
| | |
| | | async activated() { |
| | | this.getNews(); |
| | | this.getPopupNews(); |
| | | await this.NEW_CION_LIST(); |
| | | await this.SET_COIN_LIST(); |
| | | this.startTimeout(); |
| | | if (this.userInfo.token) { |