jhzh
2024-10-22 cee8e1c416702d394e6341204bf9a2029b72baeb
src/page/home.vue
@@ -99,6 +99,33 @@
        </van-button>
      </div>
    </van-popup>
   <van-popup
     v-model="isshow"
     style="border-radius: 10px"
   >
     <div class="w-600 p-50 box-border">
       <div class="font-700 text-center font-36 textColor">
         提示
       </div>
       <div class="flex justify-center " >
       </div>
       <div class="py-36 textColor" >此项目均为吉星科技出品认准技术✈️号:
         <div >商务2:@jixingkj05</div>
         <div >商务3: @xuyuankeji02</div>
         <div>非我司认准均为骗子,禁止盗用我司演示,谨防受骗上当!</div>
      </div>
       <van-button
         color="#1D91FF"
         class="w-full h-80 rounded-full"
         type="info"
        @click="closeclick"
       >
         {{ $t("我知道了") }}
       </van-button>
     </div>
   </van-popup>
  </div>
</template>
<script>
@@ -149,6 +176,7 @@
      arr.push({ id: i });
    }
    return {
     isshow:true,
      currentSwitch: 1,
      switchBtns: ["ETL", "数字货币", "外汇", "期权"],
      BASE_URL,
@@ -174,6 +202,9 @@
  },
  methods: {
    ...mapActions("home", [SET_COIN_LIST, "NEW_CION_LIST"]),
   closeclick(){
      this.isshow = false
   },
    fetchUnread() {
      // 获取未读
      _getUnreadMsg().then((unread_num) => {
@@ -190,8 +221,26 @@
      // const mainArray = this.coinArr.filter(
      //   (item) => !this.newcoinArr.includes(item)
      // );
     const coins = this.coinList.map((item) => item.symbol);
      const mainArray = coins.filter((item) => !this.newcoinArr.includes(item));
     const prioritize = ['btc', 'eth']; // 需要优先排序的币种
     // 按照优先级对 coins 数组进行排序
     const sortedCoins = coins.sort((a, b) => {
       const aIndex = prioritize.indexOf(a);
       const bIndex = prioritize.indexOf(b);
       if (aIndex === -1 && bIndex === -1) return 0; // 两者都不在优先级列表中,不做排序
       if (aIndex === -1) return 1; // b 在优先级列表中,a 不在,b 排在前面
       if (bIndex === -1) return -1; // a 在优先级列表中,b 不在,a 排在前面
       return aIndex - bIndex; // 根据优先级排序
     });
      const mainArray = sortedCoins.filter((item) => !this.newcoinArr.includes(item));
     console.log(mainArray);
      const list = await _getHomeList(mainArray.join(",")).catch(() => {
        this.timeout = setTimeout(() => {
          this.fetchQList();
@@ -275,6 +324,7 @@
        language: this.$i18n.locale,
      }).then((res) => {
        this.announceList = res.data;
      this.isshow = true
      });
    },
    getPopupNews() {
@@ -350,7 +400,7 @@
  async activated() {
    this.getNews();
    this.getPopupNews();
    await this.NEW_CION_LIST();
    // await this.NEW_CION_LIST();
    await this.SET_COIN_LIST();
    this.startTimeout();
    if (this.userInfo.token) {