feat: 同步管理端、用户端与后端业务,并接通线上 Web 接口

补齐平台订阅、外部登录、CRM 同步与用户端页面;Nginx 转发用户端接口,登录页使用 Google 与 Apple 标志。

Co-authored-by: Cursor <cursoragent@cursor.com>
这个提交包含在:
wikiboss
2026-09-23 18:01:47 +08:00
父节点 8ea9c25386
当前提交 62e0ae4435
共有 227 个文件被更改,包括 21855 次插入 和 5264 次删除

查看文件

@@ -36,8 +36,8 @@
:src="item.coverImage!"
mode="aspectFill"
/>
<view v-else class="case-item-cover-placeholder">
<text class="placeholder-text">{{ placeholderCoverText }}</text>
<view v-else class="case-item-cover-placeholder">
<text class="placeholder-text">{{ t('coverPlaceholder') }}</text>
</view>
<view class="case-item-body">
@@ -49,7 +49,7 @@
</view>
<view v-if="item.client != null && item.client !== ''" class="case-item-meta">
<text class="case-meta-label">{{ clientPrefixText }}</text>
<text class="case-meta-label">{{ t('clientPrefix') }}</text>
<text class="case-meta-value">{{ item.client }}</text>
</view>
@@ -98,7 +98,7 @@
class="form-input"
type="text"
v-model="editForm.title"
placeholder="例如:全球智能硬件数字化交付方案"
:placeholder="t('phTitle')"
/>
</view>
@@ -109,7 +109,7 @@
class="form-input"
type="text"
v-model="editForm.client"
placeholder="例如:阿联酋国际商业联合会"
:placeholder="t('phClient')"
/>
</view>
@@ -120,29 +120,18 @@
class="form-input"
type="text"
v-model="editForm.duration"
placeholder="例如:2025.06 - 2025.12"
:placeholder="t('phDuration')"
/>
</view>
<!-- 量化成效标签快捷选择 -->
<!-- 成效标签(用户自填,禁止预填假 KPI) -->
<view class="form-field">
<text class="form-label">{{ t('fieldMetrics') }}</text>
<view class="metrics-pill-group">
<view
v-for="metric in PRESET_CASE_METRICS"
:key="metric"
class="preset-metric-pill"
:class="{ 'preset-metric-pill-active': editForm.metrics === metric }"
@click="handleSelectMetric(metric)"
>
<text class="preset-metric-text">{{ metric }}</text>
</view>
</view>
<input
class="form-input"
type="text"
v-model="editForm.metrics"
placeholder="或自定义输入成效,如:触达 10,000+ 买家"
:placeholder="t('phMetrics')"
/>
</view>
@@ -162,7 +151,7 @@
<textarea
class="form-textarea"
v-model="editForm.description"
placeholder="简述方案背景、关键成效或客户反馈..."
:placeholder="t('phDesc')"
maxlength="500"
></textarea>
</view>
@@ -179,7 +168,7 @@
:disabled="state.saving"
@click="handleSave"
>
<text class="primary-cta-btn-text">{{ state.saving ? savingText : t('saveBtn') }}</text>
<text class="primary-cta-btn-text">{{ state.saving ? t('saving') : t('saveBtn') }}</text>
</button>
</view>
</view>
@@ -194,7 +183,6 @@ import {
loadCases,
saveCase,
deleteCase,
PRESET_CASE_METRICS,
resolveCasesText,
CasesCopyKey,
} from './useCardCases.uts';
@@ -224,18 +212,6 @@ const pageRtlClass = computed<string>(() => {
return isRtl(getCurrentLocale()) ? 'page-rtl' : '';
});
const clientPrefixText = computed<string>(() => {
return getCurrentLocale() === 'zh-CN' ? '合作客户: ' : 'Client: ';
});
const placeholderCoverText = computed<string>(() => {
return getCurrentLocale() === 'zh-CN' ? '产品展示' : 'Showcase';
});
const savingText = computed<string>(() => {
return getCurrentLocale() === 'zh-CN' ? '保存中...' : 'Saving...';
});
const pageTheme: Record<string, string> = {
'--oc-primary': utsLightColors.primary,
'--oc-primary-gradient': utsLightColors.primaryGradient,
@@ -291,10 +267,6 @@ function handleCloseDrawer(): void {
state.drawerVisible = false;
}
function handleSelectMetric(val: string): void {
editForm.metrics = val;
}
function handleImagesChange(imgs: string[]): void {
uploadedImages.value = imgs;
if (imgs.length > 0) {
@@ -308,7 +280,7 @@ async function handleSave(): Promise<void> {
const success = await saveCase(state, editForm);
if (success) {
uni.showToast({
title: getCurrentLocale() === 'zh-CN' ? '案例已保存' : 'Case Saved',
title: t('savedToast'),
icon: 'none',
});
} else if (state.errorMessage !== '') {
@@ -319,20 +291,19 @@ async function handleSave(): Promise<void> {
}
}
async function handleDelete(item: CardCase): void {
async function handleDelete(item: CardCase): Promise<void> {
if (item.id == null) return;
const zh = getCurrentLocale() === 'zh-CN';
uni.showModal({
title: zh ? '确认删除' : 'Confirm Delete',
content: zh ? '确定要删除该案例吗?此操作无法撤销。' : 'Are you sure you want to delete this case?',
confirmText: zh ? '删除' : 'Delete',
cancelText: zh ? '取消' : 'Cancel',
title: t('deleteConfirmTitle'),
content: t('deleteConfirmContent'),
confirmText: t('deleteConfirmOk'),
cancelText: t('cancelBtn'),
success: async (res: any) => {
if (res.confirm) {
const ok = await deleteCase(state, item.id!);
if (ok) {
uni.showToast({
title: zh ? '已删除' : 'Deleted',
title: t('deletedToast'),
icon: 'none',
});
}
@@ -711,32 +682,6 @@ onLoad((options: any) => {
height: 90px;
}
.metrics-pill-group {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 6px;
}
.preset-metric-pill {
background-color: var(--oc-bg);
border: 1px solid var(--oc-border);
padding: 6px 12px;
border-radius: 9999px;
}
.preset-metric-pill-active {
background-color: var(--oc-primary-soft);
border-color: var(--oc-primary);
}
.preset-metric-text {
font-size: 12px;
font-weight: 500;
color: var(--oc-text);
}
.drawer-action-bar {
display: flex;
flex-direction: row;