| | |
| | | </div> |
| | | </div> --> |
| | | <!-- <ex-hot :listData="hList"></ex-hot> --> |
| | | <list-quatation :listData="qList" /> |
| | | <list-quatation :listData="qList" @onfetchQList="fetchQList"/> |
| | | <van-popup v-model:show="item.showPopUp" style="border-radius:10px;" :close-on-click-overlay="false" |
| | | v-for="item in popupNewsList" :key="item.id"> |
| | | <div class="w-350 p-20 box-border"> |
| | |
| | | currency: 'home/currency', |
| | | coinArr: 'home/coinArr', |
| | | hotArr: 'home/hotArr', |
| | | userInfo: 'user/userInfo' |
| | | userInfo: 'user/userInfo', |
| | | }), |
| | | }, |
| | | data() { |
| | |
| | | unreadMsg_timer: null, |
| | | unreadMsg_num: '', |
| | | popupNewsList: [], |
| | | getVal: 1, |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | //console.log('\n *** \n'+unread_num*1+'\n *** \n') |
| | | }) |
| | | }, |
| | | async fetchQList() { // 获取行情 |
| | | const list = await _getHomeList(this.coinArr.join(',')).catch(() => { |
| | | async fetchQList(v) { // 获取行情 |
| | | let coninArr = '' |
| | | if (v) { this.getVal = v } |
| | | if(this.getVal == 2) { |
| | | let arr = getStorage('qoutes').coins |
| | | arr.map((item) => { |
| | | coninArr += item.symbol + ',' |
| | | }) |
| | | }else{ |
| | | coninArr = this.coinArr.join(',') |
| | | } |
| | | console.log('fetchQList', v, coninArr) |
| | | // if() |
| | | const list = await _getHomeList(coninArr).catch(() => { |
| | | //TODO: 轮询 |
| | | // this.timeout = setTimeout(() => { |
| | | // this.fetchQList() |
| | |
| | | if (!(list instanceof Array)) { |
| | | return |
| | | } |
| | | // console.log('接口:_getHomeList 热门:',list) |
| | | this.loading = false |
| | | // this.qList = list.slice(0,10); |
| | | this.qList = list; |