feat(微信订阅): 接入歌曲排期模板并加固部署流程
订阅消息(小程序侧唯一能主动触达用户的通道): - 新增 server/utils/wechatSubscribeFields.ts:按微信字段类型裁剪值(thing≤20、 phrase 必须 5 个汉字、time/date/character_string 各自上限),空白压成一行, 北京时间 time 由 playTime 的开始时间生成,解析不出退化为当天 00:00。 - wechatSubscribeService 内置 SONG_SELECTED 模板(站长新给的那个模板 ID), 并转发上述纯函数;notificationService.createSongSelectedNotification 现在会带上 playDate/playTime/sequence,三个排期接口(schedule / publish / bulk-publish)补传 sequence。 - 新增 test/wechatSubscribeFields.test.mjs(10 例,node --test 全绿)。 - test-subscribe 管理接口支持 vars 覆盖并返回真实发送值,方便站长核对字段名。 部署流程(Gitea Actions 容器里没有 buildx 插件,旧流程在此硬失败): - 每个 job 各自安装/探测 docker-buildx(v0.19.3,走 gh-proxy 再退直连), 不把 `buildx version` 当唯一依据;装不上时降级为普通 `docker build` 继续发布, 不再因为缺插件整条流水线失败。 注意:SONG_SELECTED 的字段名(thing2/date4/time1/character_string3/phrase5)是按常见 命名推断的,需在公众平台后台核对;不一致时用环境变量覆盖,模板 ID 变更后老用户需重新授权。
This commit is contained in:
@@ -21,15 +21,6 @@
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
/* ===== 前台页面强制浅色 color-scheme(防止系统深色干扰)===== */
|
||||
body[data-frontend="true"]:not(.admin-body),
|
||||
body[data-frontend="true"]:not(.admin-body) input,
|
||||
body[data-frontend="true"]:not(.admin-body) textarea,
|
||||
body[data-frontend="true"]:not(.admin-body) select,
|
||||
body[data-frontend="true"]:not(.admin-body) button {
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
/* 保护表单元素外观,但不强锁 color-scheme = none(none 会导致控件 fallback 到浅色) */
|
||||
input[type='text'],
|
||||
input[type='email'],
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
</div>
|
||||
<h3 class="text-lg font-bold text-zinc-700">暂无API密钥</h3>
|
||||
<p class="text-xs text-zinc-500 mt-2 max-w-xs leading-relaxed">
|
||||
您还没有创建任何访问密钥。创建密钥后,您可以安全地将 VoiceHub 集成到第三方应用程序中。
|
||||
您还没有创建任何访问密钥。创建密钥后,您可以安全地将宝一外校园点歌系统集成到第三方应用程序中。
|
||||
</p>
|
||||
<button
|
||||
class="mt-8 flex items-center gap-2 px-6 py-3 bg-white border border-zinc-200 hover:border-zinc-200 text-zinc-600 text-xs font-bold rounded-2xl transition-all"
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
{{ selectedFile ? selectedFile.name : '点击选择或拖拽备份文件' }}
|
||||
</h5>
|
||||
<p class="text-[10px] text-zinc-600 font-bold uppercase mt-1 tracking-widest">
|
||||
仅支持 VoiceHub 导出的 .json 格式
|
||||
仅支持宝一外校园点歌系统导出的 .json 格式
|
||||
</p>
|
||||
<input
|
||||
ref="fileInput"
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
<h4 class="text-zinc-900 font-bold flex items-center gap-1.5 text-sm">
|
||||
<Icon name="info" :size="14" /> 如何启动酷狗 sidecar?
|
||||
</h4>
|
||||
<p>推荐方式 B:部署开源 KuGouMusicApi 项目到本机 3000 端口(与 VoiceHub 同一台机器即可)。</p>
|
||||
<p>推荐方式 B:部署开源 KuGouMusicApi 项目到本机 3000 端口(与宝一外校园点歌系统同一台机器即可)。</p>
|
||||
<pre class="bg-zinc-900 text-zinc-100 text-[11px] rounded-xl p-3 overflow-x-auto font-mono"><code>git clone https://github.com/MakcRe/KuGouMusicApi
|
||||
cd KuGouMusicApi
|
||||
npm install
|
||||
|
||||
@@ -344,7 +344,7 @@
|
||||
<Bell :size="14" />
|
||||
</div>
|
||||
<span class="text-[10px] font-black text-zinc-600 uppercase tracking-widest"
|
||||
>VoiceHub 系统</span
|
||||
>宝一外校园点歌系统</span
|
||||
>
|
||||
</div>
|
||||
<span class="text-[9px] text-zinc-700 font-bold uppercase tracking-wider"
|
||||
|
||||
@@ -284,7 +284,7 @@ const drawCanvas = () => {
|
||||
}
|
||||
ctx.font = '12px "Inter", "system-ui", sans-serif'
|
||||
ctx.textAlign = 'center'
|
||||
ctx.fillText('Generated by VoiceHub', 200, height - 20)
|
||||
ctx.fillText('Generated by 宝一外校园点歌系统', 200, height - 20)
|
||||
}
|
||||
|
||||
const downloadCard = () => {
|
||||
|
||||
Binary file not shown.
@@ -260,7 +260,7 @@
|
||||
<!-- 页面头部 -->
|
||||
<div class="page-header">
|
||||
<div class="logo-section">
|
||||
<img :src="logoUrl" alt="VoiceHub Logo" class="logo" >
|
||||
<img :src="logoUrl" alt="宝一外校园点歌系统 Logo" class="logo" >
|
||||
<!-- 竖线分割 -->
|
||||
<div class="logo-divider" />
|
||||
<!-- 学校logo -->
|
||||
@@ -356,7 +356,7 @@
|
||||
>备注:{{ settings.remark }}</span
|
||||
>
|
||||
</div>
|
||||
<span class="footer-right">Generated by VoiceHub | 广播管理系统</span>
|
||||
<span class="footer-right">Generated by 宝一外校园点歌系统 | 广播管理系统</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="flex-shrink-0 group-hover:scale-110 transition-all duration-300">
|
||||
<img
|
||||
:src="logo"
|
||||
alt="VoiceHub Logo"
|
||||
alt="宝一外校园点歌系统 Logo"
|
||||
class="w-8 h-8 object-contain"
|
||||
width="32"
|
||||
height="32"
|
||||
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
<!-- 品牌文字 -->
|
||||
<div class="flex flex-col justify-center">
|
||||
<h1 class="font-bold text-lg text-zinc-900 leading-none tracking-tight">VoiceHub</h1>
|
||||
<h1 class="font-bold text-lg text-zinc-900 leading-none tracking-tight">宝一外校园点歌系统</h1>
|
||||
<p
|
||||
class="text-[10px] text-zinc-500 mt-1.5 uppercase tracking-widest font-bold leading-none"
|
||||
>
|
||||
|
||||
@@ -467,7 +467,7 @@ const saveConfig = async () => {
|
||||
saving.value = true
|
||||
const configToSave = {
|
||||
...formData.value,
|
||||
siteTitle: (formData.value.siteTitle || '').trim() || '校园广播站点歌系统',
|
||||
siteTitle: (formData.value.siteTitle || '').trim() || '宝一外校园点歌系统',
|
||||
siteLogoUrl: (formData.value.siteLogoUrl || '').trim() || '/images/site-logo.png',
|
||||
siteVersion: (formData.value.siteVersion || '').trim() || null,
|
||||
submissionGuidelines:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="form-header">
|
||||
<h2>{{ isBindMode ? '绑定账号' : '欢迎回来' }}</h2>
|
||||
<p v-if="isBindMode">即将绑定 {{ providerName }} 账号: {{ providerUsername }}</p>
|
||||
<p v-else>登录您的VoiceHub账户</p>
|
||||
<p v-else>登录宝一外校园点歌系统账户</p>
|
||||
</div>
|
||||
|
||||
<form :class="['auth-form', { 'has-error': !!error }]" @submit.prevent="handleLogin">
|
||||
@@ -146,7 +146,7 @@
|
||||
<AuthOAuthButtons v-if="!isBindMode" :always-show="true" />
|
||||
|
||||
<div class="form-footer">
|
||||
<p class="help-text">不同VoiceHub平台的账号不互通</p>
|
||||
<p class="help-text">不同宝一外校园点歌系统平台的账号不互通</p>
|
||||
<div style="margin-top: 16px;">
|
||||
<NuxtLink to="/register" class="register-link-btn">
|
||||
还没有账号?去注册
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="login-form">
|
||||
<div class="form-header">
|
||||
<h2>注册账号</h2>
|
||||
<p>创建您的VoiceHub账户</p>
|
||||
<p>创建您的宝一外校园点歌系统账户</p>
|
||||
</div>
|
||||
|
||||
<form :class="['auth-form', { 'has-error': !!error }]" @submit.prevent="handleRegister">
|
||||
|
||||
@@ -96,9 +96,8 @@ onMounted(() => {
|
||||
text-align: center;
|
||||
padding: 20px 0;
|
||||
margin-top: 30px;
|
||||
border-top: 1px solid #E5E7EB;
|
||||
border-top: 1px solid var(--border-primary);
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.footer-info {
|
||||
@@ -110,7 +109,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.footer-item {
|
||||
color: #374151;
|
||||
color: var(--text-tertiary);
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@@ -118,7 +117,7 @@ onMounted(() => {
|
||||
.footer-item:not(:last-child)::after {
|
||||
content: ' | ';
|
||||
margin: 0 10px;
|
||||
color: #6B7280;
|
||||
color: var(--text-quaternary);
|
||||
}
|
||||
|
||||
.footer-item a {
|
||||
@@ -128,7 +127,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.footer-item a:hover {
|
||||
color: #7C3AED;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.icp-link,
|
||||
@@ -140,7 +139,7 @@ onMounted(() => {
|
||||
|
||||
.icp-link:hover,
|
||||
.voicehub-link:hover {
|
||||
color: #7C3AED;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.netlify-badge {
|
||||
@@ -151,7 +150,7 @@ onMounted(() => {
|
||||
|
||||
.netlify-badge img {
|
||||
height: 16px;
|
||||
opacity: 0.9;
|
||||
opacity: 0.8;
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
<template>
|
||||
<svg viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg" style="display:block; width:100%; height:auto; max-width:100%; max-width:320px; margin:0 auto;">
|
||||
<defs>
|
||||
<linearGradient id="petalGrad" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0%" stop-color="#A855F7"/>
|
||||
<stop offset="50%" stop-color="#EC4899"/>
|
||||
<stop offset="100%" stop-color="#3B82F6"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="micGrad" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0%" stop-color="#1f2937"/>
|
||||
<stop offset="100%" stop-color="#111827"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
|
||||
<ellipse cx="200" cy="80" rx="50" ry="110" fill="url(#petalGrad)" opacity="0.92" transform="rotate(0 200 190)"/>
|
||||
<ellipse cx="200" cy="80" rx="50" ry="110" fill="url(#petalGrad)" opacity="0.92" transform="rotate(60 200 190)"/>
|
||||
<ellipse cx="200" cy="80" rx="50" ry="110" fill="url(#petalGrad)" opacity="0.92" transform="rotate(120 200 190)"/>
|
||||
<ellipse cx="200" cy="80" rx="50" ry="110" fill="url(#petalGrad)" opacity="0.92" transform="rotate(180 200 190)"/>
|
||||
<ellipse cx="200" cy="80" rx="50" ry="110" fill="url(#petalGrad)" opacity="0.92" transform="rotate(240 200 190)"/>
|
||||
<ellipse cx="200" cy="80" rx="50" ry="110" fill="url(#petalGrad)" opacity="0.92" transform="rotate(300 200 190)"/>
|
||||
|
||||
<circle cx="310" cy="190" r="4" fill="url(#petalGrad)"/>
|
||||
<circle cx="255" cy="285.26" r="4" fill="url(#petalGrad)"/>
|
||||
<circle cx="145" cy="285.26" r="4" fill="url(#petalGrad)"/>
|
||||
<circle cx="90" cy="190" r="4" fill="url(#petalGrad)"/>
|
||||
<circle cx="145" cy="94.74" r="4" fill="url(#petalGrad)"/>
|
||||
<circle cx="255" cy="94.74" r="4" fill="url(#petalGrad)"/>
|
||||
|
||||
<circle cx="200" cy="200" r="170" stroke="url(#petalGrad)" stroke-width="1" stroke-dasharray="2 6" fill="none"/>
|
||||
<circle cx="200" cy="200" r="185" stroke="url(#petalGrad)" stroke-width="1" stroke-dasharray="2 6" fill="none"/>
|
||||
<circle cx="200" cy="200" r="200" stroke="url(#petalGrad)" stroke-width="1" stroke-dasharray="2 6" fill="none"/>
|
||||
|
||||
<circle cx="200" cy="190" r="46" fill="#ffffff" stroke="url(#petalGrad)" stroke-width="3"/>
|
||||
<circle cx="200" cy="190" r="28" fill="url(#micGrad)"/>
|
||||
<rect x="195" y="216" width="10" height="80" rx="5" fill="#1f2937"/>
|
||||
<rect x="170" y="288" width="60" height="10" rx="5" fill="#111827"/>
|
||||
<line x1="150" y1="304" x2="250" y2="304" stroke="#D1D5DB" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
</script>
|
||||
@@ -1,40 +0,0 @@
|
||||
<template>
|
||||
<nav
|
||||
class="fixed bottom-0 left-0 right-0 z-40 lg:hidden bg-white border-t border-gray-200 px-4 py-2 pb-[max(8px,env(safe-area-inset-bottom))] backdrop-blur-sm shadow-[0_-2px_16px_rgba(0,0,0,0.04)]"
|
||||
>
|
||||
<div class="grid grid-cols-3 gap-2">
|
||||
<button
|
||||
type="button"
|
||||
class="flex flex-col items-center justify-center gap-1 py-1 text-gray-500"
|
||||
@click="$emit('navigate', 'request-section')"
|
||||
>
|
||||
<Music :size="20" />
|
||||
<span class="text-[11px] font-semibold">点歌</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="flex flex-col items-center justify-center gap-1 py-1 text-gray-500"
|
||||
@click="$emit('navigate', 'schedule-section')"
|
||||
>
|
||||
<CalendarDays :size="20" />
|
||||
<span class="text-[11px] font-semibold">排期</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="flex flex-col items-center justify-center gap-1 py-1 text-gray-500"
|
||||
@click="$emit('navigate', 'account')"
|
||||
>
|
||||
<User :size="20" />
|
||||
<span class="text-[11px] font-semibold">我的</span>
|
||||
</button>
|
||||
</div>
|
||||
</nav>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { Music, CalendarDays, User } from '@lucide/vue'
|
||||
|
||||
defineEmits(['navigate'])
|
||||
</script>
|
||||
@@ -6,7 +6,7 @@
|
||||
<BookOpen class="w-5 h-5 text-primary" />
|
||||
使用指南
|
||||
</h3>
|
||||
<p class="text-xs text-text-secondary mt-1">快速了解如何使用 VoiceHub 校园广播系统</p>
|
||||
<p class="text-xs text-text-secondary mt-1">快速了解如何使用宝一外校园点歌系统</p>
|
||||
</div>
|
||||
<button
|
||||
class="start-tour-btn"
|
||||
@@ -92,7 +92,7 @@ const windowSize = ref({ width: 0, height: 0 })
|
||||
const tourSteps = [
|
||||
{
|
||||
element: '.user-tutorial-container',
|
||||
title: '欢迎来到 VoiceHub!',
|
||||
title: '欢迎来到宝一外校园点歌系统!',
|
||||
description: '这是一个简单的引导,带您快速了解如何使用校园广播系统。',
|
||||
position: 'top'
|
||||
},
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div v-show="active" class="content">
|
||||
<div class="year-bg">{{ data.year }}</div>
|
||||
<div class="sub-title">年度点歌报告</div>
|
||||
<h1 class="main-title">VoiceHub</h1>
|
||||
<h1 class="main-title">宝一外校园点歌系统</h1>
|
||||
</div>
|
||||
</Transition>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<div class="card-content">
|
||||
<div class="header">
|
||||
<div class="logo">VoiceHub</div>
|
||||
<div class="logo">宝一外校园点歌系统</div>
|
||||
<div class="year">{{ data.year }}</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -13,10 +13,8 @@ import { SpeedInsights } from '@vercel/speed-insights/nuxt'
|
||||
|
||||
const { initSiteConfig } = useSiteConfig()
|
||||
|
||||
// 初始化站点配置
|
||||
onMounted(() => {
|
||||
if (typeof document !== 'undefined' && document.body) {
|
||||
document.body.setAttribute('data-frontend', 'true')
|
||||
}
|
||||
initSiteConfig()
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user