Chad há 1 semana atrás
pai
commit
f49a797d8d

+ 10 - 5
src/components/PageContainer/index.vue

@@ -36,7 +36,7 @@
           <view class="nav-btn">
             <selectLang :isBall="true" />
           </view>
-          <view class="ml-2 avatar-wrapper">
+          <view class="ml-2 avatar-wrapper"  @click="router.pushTab({ name: 'My' })">
             <u-avatar
                 :src="userInfo.avatar || 'https://img.yzcdn.cn/vant/cat.jpeg'"
                 size="72"
@@ -332,7 +332,7 @@ import {ref, useSlots, onMounted, onUnmounted, reactive, computed, watch} from '
 import {useI18n} from "vue-i18n";
 import {onShow} from "@dcloudio/uni-app";
 import {useOrderStore} from '@/store/bettingSheet.js'
-import {getBalance, submitOrder, userGuestRegister} from "@/request/api.js";
+import {getBalance, getUserInfo, submitOrder, userGuestRegister} from "@/request/api.js";
 import {useWebsocketDataStore} from "@/store/websocketData";
 import SystemNoticeModal from '@/pages/common/SystemNoticeModal/index.vue'
 import RechargeModal from '@/pages/common/rechargeModal/index.vue'
@@ -887,10 +887,15 @@ onShow(() => {
   isAutoAccept.value = uni.getStorageSync('autoAcceptOdds') !== false && uni.getStorageSync('autoAcceptOdds') !== 'false';
   if (token.value) {
     getData();
+    getUserInfo().then(res => {
+
+      userInfo.value = res.data
+
+      uni.setStorageSync('user_info', res.data)
+
+    })
   }
-  if(uni.getStorageSync('user_info')) {
-    userInfo.value = uni.getStorageSync('user_info');
-  }
+
 
 })
 

+ 10 - 0
src/pages.json

@@ -78,6 +78,16 @@
       },
       "type": "WorldCup"
     },
+    {
+      "path": "pages/WorkModule/League/index",
+      "aliasPath": "/League",
+      "name": "League",
+      "style": {
+        "navigationStyle": "custom",
+        "navigationBarTitleText": "联赛"
+      },
+      "type": "League"
+    },
     {
       "path": "pages/Tabbar/Entertainment/index",
       "aliasPath": "/Entertainment",

+ 21 - 8
src/pages/Tabbar/Home/index.vue

@@ -37,7 +37,11 @@
         </scroll-view>
 
         <view style="display: flex;align-items: center;margin-top: 10px">
-          <u-notice-bar mode="horizontal" :list="[
+          <u-notice-bar
+              :volume-size="28"
+              :fontSize="20"
+              :border-radius="12"
+              mode="horizontal" :list="[
             'F1bet国际官宣:请认准官网F1bet.cc 永久网址:F1bet.cc',
         ]"></u-notice-bar>
           <view class="url-right-badge">
@@ -100,8 +104,8 @@
                       <u-image :src="item.league_logo" width="16px" height="16px" shape="circle"></u-image>
                       <text class="league-name">{{ locale === 'zh' ? item.league : item.league_en }}</text>
                     </view>
-                    <text class="match-time">{{ item.game_time || '--:--' }}</text>
-                    <view class="match-more-btn" @click.stop="goDetail(item)">
+
+                    <view class="match-more-btn" @click.stop="goLeagueDetail(item)">
                       <text class="more-count">{{ item.sport_count || 0}}</text>
                       <u-icon name="arrow-right" color="#fff" size="10"></u-icon>
                     </view>
@@ -118,9 +122,13 @@
 
                     <view class="vs-block">
                       <text class="vs-text">VS</text>
-                      <text class="vs-sub">{{ t('全场让球') }}</text>
+<!--                      <text class="vs-sub">{{ t('全场让球') }}</text>-->
+
+                      <text class="match-time">{{ item.game_time || '--:--' }}</text>
                     </view>
 
+
+
                     <view class="team-block">
                       <u-image :src="item.guest_team_logo" width="32px" height="32px" shape="circle"></u-image>
                       <view class="team-name-group">
@@ -372,7 +380,7 @@ let suffixTimer = null;
 onMounted(() => {
   suffixTimer = setInterval(() => {
     currentSuffixIndex.value = (currentSuffixIndex.value + 1) % suffixList.length;
-  }, 2500);
+  }, 1000);
 });
 
 onUnmounted(() => {
@@ -706,6 +714,9 @@ function handleWebsocketData(data) {
 const goDetail = (item) => {
   router.push({ name: 'sportDetail', query: { data_id: item.data_id } });
 };
+const goLeagueDetail = (item) => {
+  router.push({ name: 'SportsBetting', query: { league: item.league } });
+}
 const toMoreRollBall = (name) => {
   uni.navigateTo({
     url: '/pages/Tabbar/SportsBetting/index'
@@ -1033,7 +1044,7 @@ onQuery();
 .roll-ball-scroll { width: 100%; white-space: nowrap; }
 .roll-ball-flex { display: flex; flex-direction: row; gap: 12px; padding-bottom: 4px; }
 .match-card {
-  width: 78vw;
+  width: 74vw;
   flex-shrink: 0;
   display: inline-block;
   background: #fff;
@@ -1064,7 +1075,9 @@ onQuery();
   line-height: 1.3;
 }
 .match-time {
-  font-size: 11px;
+  font-size: 10px;
+  min-width: 90px;
+  text-align: center;
   color: #666;
 }
 .match-more-btn {
@@ -1197,7 +1210,7 @@ onQuery();
 .lottery-scroll { width: 100%; white-space: nowrap; }
 .lottery-flex { display: flex; flex-direction: row; gap: 12px; padding-bottom: 4px; }
 .lottery-card {
-  width: 78vw;
+  width: 70vw;
   flex-shrink: 0;
   display: inline-block;
   white-space: normal;

+ 7 - 0
src/pages/Tabbar/SportsBetting/index.vue

@@ -207,6 +207,7 @@ const WebsocketData = useWebsocketDataStore();
 const sportList = ref([]);
 const skeletonLoading = ref(true);
 const router = useRouter();
+const route = useRoute();
 const currentDate = ref('');
 const isAndroid = uni.getSystemInfoSync().platform === 'android';
 
@@ -299,6 +300,12 @@ onMounted(() => {
       }
     }).exec();
   });
+
+  if(route.query.league) {
+    currentTabIndex.value = 0
+    keyword.value = route.query.league
+    onSearch()
+  }
 });
 
 const onLoadMore = () => {

+ 11 - 0
src/pages/WorkModule/League/index.vue

@@ -0,0 +1,11 @@
+<script setup>
+import list  from '@/pages/Tabbar/SportsBetting/LeagueList'
+</script>
+
+<template>
+  <list />
+</template>
+
+<style scoped lang="scss">
+
+</style>