فهرست منبع

数据测试更新

flyzto 4 ماه پیش
والد
کامیت
f6a6cc6847
1فایلهای تغییر یافته به همراه63 افزوده شده و 1 حذف شده
  1. 63 1
      web/apps/web-antd/src/views/match/datatest/index.vue

+ 63 - 1
web/apps/web-antd/src/views/match/datatest/index.vue

@@ -23,6 +23,41 @@
           </div>
         </div>
 
+        <div class="radio-options">
+          <div class="radio-group">
+            <label class="radio-label">
+              <input
+                type="radio"
+                name="testMode"
+                value="1"
+                v-model="selectedTestMode"
+                class="radio-input"
+              >
+              <span class="radio-text">今日</span>
+            </label>
+            <label class="radio-label">
+              <input
+                type="radio"
+                name="testMode"
+                value="0"
+                v-model="selectedTestMode"
+                class="radio-input"
+              >
+              <span class="radio-text">早盘</span>
+            </label>
+            <label class="radio-label">
+              <input
+                type="radio"
+                name="testMode"
+                value=""
+                v-model="selectedTestMode"
+                class="radio-input"
+              >
+              <span class="radio-text">全部</span>
+            </label>
+          </div>
+        </div>
+
         <div class="action-buttons">
           <button class="btn btn-primary" @click="refreshData">
             刷新数据
@@ -43,6 +78,7 @@ import { requestClient } from '#/api/request';
 const currentTime = ref('');
 const gamesRelation = ref([]);
 const gamesSolution = ref({});
+const selectedTestMode = ref('1');
 
 const updateTime = () => {
   currentTime.value = new Date().toLocaleString('zh-CN')
@@ -51,7 +87,7 @@ const updateTime = () => {
 const refreshData = () => {
   updateTime();
   Promise.all([
-    requestClient.get('/pstery/get_games_relation', { params: { mk: 1 } }),
+    requestClient.get('/pstery/get_games_relation', { params: { mk: selectedTestMode.value } }),
     requestClient.get('/pstery/get_solutions')
   ])
   .then(([relations, solutions]) => {
@@ -158,6 +194,32 @@ onMounted(() => {
         }
       }
 
+      .radio-options {
+        margin-bottom: 20px;
+
+        .radio-group {
+          display: flex;
+          gap: 20px;
+
+          .radio-label {
+            display: flex;
+            align-items: center;
+            cursor: pointer;
+            user-select: none;
+
+            .radio-input {
+              margin-right: 8px;
+              cursor: pointer;
+            }
+
+            .radio-text {
+              font-size: 14px;
+              color: #333;
+            }
+          }
+        }
+      }
+
       .action-buttons {
         display: flex;
         gap: 12px;