Răsfoiți Sursa

fix: 修复

shuisheng 1 an în urmă
părinte
comite
1e84afa7d2

+ 8 - 6
src/api/signin.ts

@@ -1,16 +1,18 @@
-import { IList, IPaging, ISignin } from '@/interface';
+import { IList, IPaging, ISigninStatistics } from '@/interface';
 import request from '@/utils/request';
 
-export function fetchSigninList(params: IList<ISignin>) {
-  return request.get<IPaging<ISignin>>('/signin/list', { params });
+export function fetchSigninList(params: IList<ISigninStatistics>) {
+  return request.get<IPaging<ISigninStatistics>>('/signin_statistics/list', {
+    params,
+  });
 }
 
-export function fetchCreateSignin(data: ISignin) {
-  return request.post('/signin/create', data);
+export function fetchCreateSignin(data: ISigninStatistics) {
+  return request.post('/signin_record/create', data);
 }
 
 export function fetchTodayIsSignin({ liveRoomId }) {
-  return request.get('/signin/today_is_signin', {
+  return request.get('/signin_record/today_is_signin', {
     params: {
       live_room_id: liveRoomId,
     },

+ 3 - 4
src/api/user.ts

@@ -51,8 +51,7 @@ export function fetchBlogUserList(params: {
   orderName: string;
   orderBy: string;
 }) {
-  return request.get<IPaging<IUser>>(
-    'https://api.hsslive.cn/prodapi/user/list',
-    { params }
-  );
+  return request.get<IPaging<IUser>>('https://cdnapi.hsslive.cn/user/list', {
+    params,
+  });
 }

+ 25 - 1
src/interface.ts

@@ -136,13 +136,37 @@ export interface IGiftRecord {
   deleted_at?: string;
 }
 
-export interface ISignin {
+export interface ISigninStatistics {
   id?: number;
   user_id?: number;
   live_room_id?: number;
+  /** 当前连续签到次数 */
   nums?: number;
+  /** 历史最高连续签到次数 */
+  max_nums?: number;
+  /** 累计签到次数 */
+  sum_nums?: number;
+  /** 上次签到日期 */
+  recently_signin_time?: string;
 
   /** 用户信息 */
+  username?: string;
+  user?: IUser;
+  /** 直播间信息 */
+  live_room?: ILiveRoom;
+
+  created_at?: string;
+  updated_at?: string;
+  deleted_at?: string;
+}
+
+export interface ISigninRecord {
+  id?: number;
+  user_id?: number;
+  live_room_id?: number;
+
+  /** 用户信息 */
+  username?: string;
   user?: IUser;
   /** 直播间信息 */
   live_room?: ILiveRoom;

+ 3 - 0
src/layout/pc/head/index.vue

@@ -242,6 +242,9 @@
           </template>
           <template #list>
             <div class="list">
+              <a class="item">
+                <div class="txt">腾讯云开播</div>
+              </a>
               <a
                 class="item"
                 @click.prevent="handleStartLive(LiveRoomTypeEnum.user_srs)"

+ 2 - 0
src/types/ILiveRoom.ts

@@ -17,6 +17,8 @@ export enum LiveRoomTypeEnum {
   user_wertc,
   /** 主播使用srs直播 */
   user_srs,
+  /** 主播使用腾讯云css直播 */
+  user_tencent_css,
   /** 主播使用obs/ffmpeg直播 */
   user_obs,
   /** 主播使用msr直播 */

+ 1 - 1
src/views/area/id/index.vue

@@ -50,7 +50,7 @@
     </div>
     <div
       class="paging-wrap"
-      v-if="pageParams.hasMore"
+      v-if="pageParams.total > pageParams.pageSize"
     >
       <n-pagination
         v-model:page="pageParams.nowPage"

+ 11 - 0
src/views/privatizationDeployment/index.vue

@@ -17,6 +17,16 @@
         ,注明作者版权。
       </div>
       <div class="list">
+        <div class="hr"></div>
+        <div class="item">
+          <h2>简介</h2>
+          <p>目前核心实现:</p>
+          <ol>
+            <li>服务器自建SRS直播。</li>
+            <li>服务器自建WebRTC直播。</li>
+            <li>接入第三方腾讯云直播。</li>
+          </ol>
+        </div>
         <div class="hr"></div>
         <div class="item">
           <h2>远程协助</h2>
@@ -46,6 +56,7 @@
     </div>
     <div class="aside">
       <div class="title">本页目录</div>
+      <div class="item">简介</div>
       <div class="item">远程协助</div>
       <div class="item">定制服务</div>
       <div class="item">收费标准</div>

+ 12 - 12
src/views/rank/index.vue

@@ -18,7 +18,7 @@
       <div class="top">
         <div
           v-for="(item, index) in [rankList[1], rankList[0], rankList[2]]"
-          :key="index"
+          :key="currRankType + '-' + index"
           :class="{ item: 1, [`rank-${item.rank}`]: 1 }"
         >
           <div
@@ -58,7 +58,7 @@
             class="signin"
             v-if="currRankType === RankTypeEnum.signin"
           >
-            连续签到:{{ item.signin_nums }}天
+            累计签到:{{ item.signin_nums }}天
           </div>
         </div>
       </div>
@@ -97,7 +97,7 @@
               class="signin"
               v-if="currRankType === RankTypeEnum.signin"
             >
-              (连续签到:{{ item.signin_nums }}天)
+              (累计签到:{{ item.signin_nums }}天)
             </div>
             <div
               v-if="item.live?.live && currRankType === RankTypeEnum.liveRoom"
@@ -177,8 +177,8 @@ const mockRank: {
       },
     ],
     rank: 1,
-    level: -1,
-    score: -1,
+    level: 0,
+    score: 0,
     balance: 0,
     signin_nums: 0,
     live: undefined,
@@ -192,8 +192,8 @@ const mockRank: {
       },
     ],
     rank: 2,
-    level: -1,
-    score: -1,
+    level: 0,
+    score: 0,
     balance: 0,
     signin_nums: 0,
     live: undefined,
@@ -207,8 +207,8 @@ const mockRank: {
       },
     ],
     rank: 3,
-    level: -1,
-    score: -1,
+    level: 0,
+    score: 0,
     balance: 0,
     signin_nums: 0,
     live: undefined,
@@ -222,8 +222,8 @@ const mockRank: {
       },
     ],
     rank: 4,
-    level: -1,
-    score: -1,
+    level: 0,
+    score: 0,
     balance: 0,
     signin_nums: 0,
     live: undefined,
@@ -404,7 +404,7 @@ async function getSigninList() {
           level: 0,
           score: 0,
           balance: 0,
-          signin_nums: item.nums || 0,
+          signin_nums: item.sum_nums || 0,
         };
       });
       if (length < mockDataNums) {

+ 93 - 270
test/test.html

@@ -1,285 +1,108 @@
 <!doctype html>
 <html lang="en">
   <head>
-    <meta charset="UTF-8" />
+    <meta
+      name="renderer"
+      content="webkit"
+    />
     <meta
       http-equiv="X-UA-Compatible"
-      content="IE=edge"
+      content="IE=Edge"
     />
+    <meta charset="utf-8" />
     <meta
       name="viewport"
-      content="width=device-width, initial-scale=1.0"
+      content="width=device-width, initial-scale=1.0, maximum-scale=1.0"
+    />
+    <meta
+      name="description"
+      content=""
+    />
+    <meta
+      name="author"
+      content="ThemeBucket"
+    />
+    <link
+      rel="shortcut icon"
+      href="#"
+      type="image/png"
     />
-    <title>项目概览</title>
-  </head>
-
-  <body>
-    <h1>这只是一个中转页,列出了目前我个人业余(非工作)的大部分项目~</h1>
-    <p>最后更新:2023年12月17日00:46:58</p>
-    <p>
-      概览:
-      <a
-        target="_blank"
-        href="https://www.hsslive.cn/works"
-      >
-        https://www.hsslive.cn/works
-      </a>
-    </p>
-    <ul>
-      <h2>直播</h2>
-      <li>
-        直播前台(web)
-        <a
-          target="_blank"
-          href="https://live.hsslive.cn"
-        >
-          https://live.hsslive.cn
-        </a>
-      </li>
-      <li>
-        直播后台(web)
-        <a
-          target="_blank"
-          href="https://live-admin.hsslive.cn"
-        >
-          https://live-admin.hsslive.cn
-        </a>
-      </li>
-      <li>
-        直播客户端(flutter)
-        <a
-          target="_blank"
-          href="https://github.com/galaxy-s10/billd-live-flutter"
-        >
-          https://github.com/galaxy-s10/billd-live-flutter
-        </a>
-      </li>
-    </ul>
-
-    <ul>
-      <h2>博客</h2>
-      <li>
-        博客后台(vue3)
-        <a
-          target="_blank"
-          href="https://admin.hsslive.cn"
-        >
-          https://admin.hsslive.cn
-        </a>
-      </li>
-      <li>
-        博客前台(nuxt3)
-        <a
-          target="_blank"
-          href="https://nuxt2.hsslive.cn"
-        >
-          https://nuxt2.hsslive.cn
-        </a>
-      </li>
-      <li>
-        博客前台(nuxt2)
-        <a
-          target="_blank"
-          href="https://www.hsslive.cn"
-        >
-          https://www.hsslive.cn
-        </a>
-      </li>
-      <li>
-        博客前台(next12)
-        <a
-          target="_blank"
-          href="https://next.hsslive.cn"
-        >
-          https://next.hsslive.cn
-        </a>
-      </li>
-      <li>
-        博客前台(react18)
-        <a
-          target="_blank"
-          href="https://project.hsslive.cn/react18-blog-client/"
-        >
-          https://project.hsslive.cn/react18-blog-client/
-        </a>
-      </li>
-    </ul>
 
-    <ul>
-      <h2>billd系列</h2>
-      <li>
-        billd-monorepo(monorepo)
-        <a
-          target="_blank"
-          href="https://project.hsslive.cn/billd-monorepo/"
-        >
-          https://project.hsslive.cn/billd-monorepo/
-        </a>
-      </li>
-      <li>
-        billd-ui(vue2组件库)
-        <a
-          target="_blank"
-          href="https://project.hsslive.cn/billd-ui/"
-        >
-          https://project.hsslive.cn/billd-ui/
-        </a>
-      </li>
-      <li>
-        billd-utils(积累常用 js 方法 )
-        <a
-          target="_blank"
-          href="https://github.com/galaxy-s10/billd-utils"
-        >
-          https://github.com/galaxy-s10/billd-utils
-        </a>
-      </li>
-      <li>
-        billd-scss(积累常用 scss 类 )
-        <a
-          target="_blank"
-          href="https://github.com/galaxy-s10/billd-scss"
-        >
-          https://github.com/galaxy-s10/billd-scss
-        </a>
-      </li>
-      <li>
-        billd-deploy(部署插件)
-        <a
-          target="_blank"
-          href="https://github.com/galaxy-s10/billd-deploy"
-        >
-          https://github.com/galaxy-s10/billd-deploy
-        </a>
-      </li>
-      <li>
-        babel-plugin-import-billd(按需加载插件)
-        <a
-          target="_blank"
-          href="https://github.com/galaxy-s10/babel-plugin-import-billd"
-        >
-          https://github.com/galaxy-s10/babel-plugin-import-billd
-        </a>
-      </li>
-    </ul>
+    <title>管理后台登陆</title>
+    <link
+      rel="stylesheet"
+      type="text/css"
+      href="/common/js/bootstrap/css/bootstrap.min.css"
+    />
+    <link
+      rel="stylesheet"
+      type="text/css"
+      href="/common/fonts/css/font-awesome.min.css"
+    />
+    <link
+      href="/assets/backend/css/style.css?v=2"
+      rel="stylesheet"
+    />
+    <link
+      href="/assets/backend/css/style-responsive.css"
+      rel="stylesheet"
+    />
 
-    <ul>
-      <h2>project.hsslive.cn</h2>
-      <li>
-        仿网易云官网(react17)
-        <a
-          target="_blank"
-          href="https://project.hsslive.cn/netease-cloud-music/"
-        >
-          https://project.hsslive.cn/netease-cloud-music/
-        </a>
-      </li>
-      <li>
-        react17项目模板(实现cra)
-        <a
-          target="_blank"
-          href="https://project.hsslive.cn/react17-webpack5-template/"
-        >
-          https://project.hsslive.cn/react17-webpack5-template/
-        </a>
-      </li>
-      <li>
-        vue3项目模板(实现vue-cli)
-        <a
-          target="_blank"
-          href="https://project.hsslive.cn/vue3-webpack5-template/"
-        >
-          https://project.hsslive.cn/vue3-webpack5-template/
-        </a>
-      </li>
-      <li>
-        overview(umi)
-        <a
-          target="_blank"
-          href="https://project.hsslive.cn/overview/"
-        >
-          https://project.hsslive.cn/overview/
-        </a>
-      </li>
-      <li>
-        多环境部署-prod(生产环境)
-        <a
-          target="_blank"
-          href="https://project.hsslive.cn/multi-env-project/prod/"
-        >
-          https://project.hsslive.cn/multi-env-project/prod/
-        </a>
-      </li>
-      <li>
-        多环境部署-preview(预发布环境)
-        <a
-          target="_blank"
-          href="https://project.hsslive.cn/multi-env-project/preview/"
-        >
-          https://project.hsslive.cn/multi-env-project/preview/
-        </a>
-      </li>
-      <li>
-        多环境部署-beta(测试环境)
-        <a
-          target="_blank"
-          href="https://project.hsslive.cn/multi-env-project/beta/"
-        >
-          https://project.hsslive.cn/multi-env-project/beta/
-        </a>
-      </li>
-      <li>
-        根据浏览器语言跳转(国际化)
-        <a
-          target="_blank"
-          href="https://project.hsslive.cn/lang/"
-        >
-          https://project.hsslive.cn/lang/
-        </a>
-      </li>
-    </ul>
+    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
+    <!--[if lt IE 9]>
+      <script src="/common/js/html5shiv.js"></script>
+      <script src="/common/js/respond.min.js"></script>
+    <![endif]-->
+  </head>
 
-    <ul>
-      <h2>基建</h2>
-      <li>
-        私有仓库(verdaccio)
-        <a
-          target="_blank"
-          href="http://registry.hsslive.cn"
-          >http://registry.hsslive.cn
-        </a>
-      </li>
-      <li>
-        线上部署(jenkins)
-        <a
-          target="_blank"
-          href="https://jenkins.hsslive.cn"
-        >
-          https://jenkins.hsslive.cn
-        </a>
-      </li>
-    </ul>
+  <body class="login-body">
+    <div class="container">
+      <form
+        class="form-signin"
+        action="/admin/auth/login"
+        method="POST"
+      >
+        <div class="form-signin-heading text-center">
+          <img
+            style="max-height: 45px"
+            src="/assets/backend/images/logo.png?v=4"
+            alt=""
+          />
+        </div>
+        <div class="login-wrap">
+          <input
+            type="hidden"
+            name="_token"
+            value="k32pH8wdW5qsnnUo6nMYAk9eQWI9tq29OCw7e30b"
+          />
+          <input
+            type="hidden"
+            name="back"
+            value="https://vip.cneiie9.com/admin/user/ajaxuserlist?page=1"
+          />
+          <input
+            type="text"
+            name="login"
+            class="form-control"
+            placeholder="用户名"
+            value=""
+            autofocus
+          />
+          <input
+            type="password"
+            name="password"
+            class="form-control"
+            placeholder="密码"
+          />
 
-    <ul>
-      <h2>其他</h2>
-      <li>
-        github主页:
-        <a
-          target="_blank"
-          href="https://github.com/galaxy-s10"
-        >
-          https://github.com/galaxy-s10
-        </a>
-      </li>
-      <li>
-        发布的npm包:
-        <a
-          target="_blank"
-          href="https://www.npmjs.com/~huangshuisheng"
-        >
-          https://www.npmjs.com/~huangshuisheng
-        </a>
-      </li>
-    </ul>
+          <button
+            class="btn btn-lg btn-login btn-block"
+            type="submit"
+          >
+            <i class="fa fa-check"></i>
+          </button>
+        </div>
+      </form>
+    </div>
   </body>
 </html>