diff --git a/src/api/index.js b/src/api/index.js index b6d9833..9289e88 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -92,7 +92,7 @@ export const cancelAppointment = (id) => put(`/appointment/status?id=${id}&statu // 提交报告 export const createReport = (data) => post('/report/create', data) -/** 触发服务回顾短片生成(异步;reportId + 操作者)durationSec: 15 | 30 */ +/** 触发服务回顾短片生成(异步)。composeMode: preset | interleave,时长由后端按素材计算 */ export const postReportHighlightStart = (data) => post('/report/highlight/start', data) // 获取报告(通过token) diff --git a/src/components/report/ReminderCard.vue b/src/components/report/ReminderCard.vue index 4c9f8e0..e61db96 100644 --- a/src/components/report/ReminderCard.vue +++ b/src/components/report/ReminderCard.vue @@ -47,7 +47,7 @@ {{ errorMsg }} - + 已为您设置提醒 @@ -57,6 +57,25 @@ 到点我们会通过微信/短信告诉你,无需惦记。 + + + 微信已关联 + 已用当前微信绑定该手机号。使用同一手机号登录本小程序,可在「我的」查看预约与宠物档案。 + + + 接收微信提醒 + 本次未拿到微信授权,提醒可能仅通过短信送达。可重新进入本报告页再次提交,或在本小程序用该手机号登录后使用。 + + + + + 微信内打开体验更佳 + 在微信中打开本链接,留资时可关联微信,便于接收服务提醒与后续报告。 + + + + + 登录后可在「我的」查看宠物档案与预约 @@ -77,6 +96,7 @@ const consent = ref(false) const submitting = ref(false) const submitted = ref(false) const savedDate = ref('') +const wechatBound = ref(false) const errorMsg = ref('') const titleText = computed(() => { @@ -139,6 +159,17 @@ const fetchMiniLoginCode = () => // #endif }) +function goLoginWithPhone() { + const p = phone.value + if (!/^1[3-9]\d{9}$/.test(p)) { + uni.showToast({ title: '请先填写有效手机号', icon: 'none' }) + return + } + uni.navigateTo({ + url: '/pages/login/Login?phone=' + encodeURIComponent(p) + }) +} + async function onSubmit() { if (!canSubmit.value) return errorMsg.value = '' @@ -148,6 +179,7 @@ async function onSubmit() { const res = await submitReportReminder(props.token, phone.value, loginCode) if (res && res.code === 200 && res.data && res.data.ok) { savedDate.value = res.data.remindDate || suggestion.value.remindDate + wechatBound.value = !!res.data.wechatBound submitted.value = true } else { errorMsg.value = (res && res.message) || '提交失败,请稍后再试' @@ -317,4 +349,53 @@ onMounted(loadSuggestion) color: #4b5563; line-height: 1.6; } +.rc-bind { + margin-top: 14px; + padding: 12px 12px; + border-radius: 12px; + text-align: left; +} +.rc-bind--ok { + background: #ecfdf5; + border: 1px solid #86efac; +} +.rc-bind--hint { + background: #f8fafc; + border: 1px solid #e2e8f0; +} +.rc-bind-title { + display: block; + font-size: 13px; + font-weight: 700; + color: #166534; + margin-bottom: 6px; +} +.rc-bind--hint .rc-bind-title { + color: #334155; +} +.rc-bind-text { + display: block; + font-size: 12px; + color: #475569; + line-height: 1.55; +} + +.rc-login-btn { + margin-top: 16px; + width: 100%; + height: 42px; + line-height: 42px; + border-radius: 10px; + border: 1px solid #16a34a; + background: #ffffff; + color: #15803d; + font-size: 14px; + font-weight: 600; +} +.rc-login-hint { + margin-top: 8px; + font-size: 11px; + color: #94a3b8; + line-height: 1.4; +} diff --git a/src/pages/login/Login.vue b/src/pages/login/Login.vue index 6b17e3d..0ec17af 100644 --- a/src/pages/login/Login.vue +++ b/src/pages/login/Login.vue @@ -154,7 +154,14 @@ const safeLine = (s, fallback = '—') => { const isHttpOk = (res) => res && (res.code === 200 || res.code === '200') -onLoad(() => { view.value = 'login' }) +onLoad((options) => { + view.value = 'login' + const raw = options && (options.phone ?? options.prefillPhone) + const p = raw == null ? '' : String(raw).trim() + if (/^1[3-9]\d{9}$/.test(p)) { + loginForm.phone = p + } +}) const backToLoginForm = () => { view.value = 'login' } diff --git a/src/pages/mine/Mine.vue b/src/pages/mine/Mine.vue index fe6c268..9857c15 100644 --- a/src/pages/mine/Mine.vue +++ b/src/pages/mine/Mine.vue @@ -61,6 +61,11 @@ 门店日程 + + + 回访池 + + diff --git a/src/pages/report-view/reportView.vue b/src/pages/report-view/reportView.vue index c3fd881..1fbcc04 100644 --- a/src/pages/report-view/reportView.vue +++ b/src/pages/report-view/reportView.vue @@ -149,6 +149,13 @@ {{ reportData.remark }} + + + @@ -156,13 +163,21 @@ 智能剪辑 - 先按「服务前 → 过程 → 服务后」整理素材,再将照片与小视频穿插编排(类相册成片),图片带轻微推拉镜头,竖屏 9:16,可选 BGM。总时长 15 秒或 30 秒;服务器需 ffmpeg(建议安装 ffprobe)。配乐请将商用授权文件配置在后端 HIGHLIGHT_BGM_PATH。 + 将服务前、过程、服务后素材自动剪成竖屏 9:16 短片。成片时长随素材量变化,并受门店服务端配置的总时长上限约束,不承诺固定秒数。请选择「预设顺序」或「穿插成片」后,再点下方「生成短片」。 + + + 预设顺序含对比封面与收尾镜头;穿插成片在阶段间均匀穿插照片与小视频。若生成失败并提示服务器环境,一般由未安装 ffmpeg/ffprobe 或未加入 PATH,需运维安装后重启应用;可选配乐由门店在服务端配置。 短片生成中,请稍候… + 可离开本页,稍后重新进入即可查看结果。 - {{ reportData.highlightVideoError || '生成失败' }} + {{ + reportData.highlightFailReasonLabel + }} + {{ highlightErrorUserText }} + 可调整编排方式后重试;若仍失败请联系门店或管理员。