feat(sync): 后端功能模块与前端模块数据同源 + 后台13个业务模块可管
前端不再写死运营数据: - 首页 Banner/保障条/教程卡 改由 /api/home/index 下发(fa_banner + fa_config), 数据缺失或停用自动回落内置兜底文案 - 订单状态提示改由后端 OrderStatus::tip() 下发 status_tip,前后端一套口径 后台可管(FastAdmin 生成器): - 新增 13 个业务后台模块:运营位/订单/师傅/商家/优惠券/评价/消息/服务/服务类目/申诉/开票/提现/结算单 (controller + model + view + fa_auth_rule 菜单 78 条) 修复: - nginx /admin/* 改为 301 到 /admin.php/*,否则后台菜单点开全部 404 验证:tests/phase5_data_sync.js 新增 16 项联动断言;全量回归 202 项断言 0 失败
这个提交包含在:
@@ -93,14 +93,14 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 下单教程 -->
|
||||
<!-- 下单教程(文案由后端 fa_config 下发) -->
|
||||
<view class="tutorial" @tap="onLearn">
|
||||
<view class="tutorial-ic">
|
||||
<view class="ti-play"></view>
|
||||
</view>
|
||||
<view class="tutorial-txt">
|
||||
<text class="tutorial-title">下单找师傅教程</text>
|
||||
<text class="tutorial-sub">3 分钟看懂,下单不踩坑</text>
|
||||
<text class="tutorial-title">{{ tutorial.title }}</text>
|
||||
<text class="tutorial-sub">{{ tutorial.sub }}</text>
|
||||
</view>
|
||||
<view class="tutorial-btn">
|
||||
<text class="tutorial-btn-txt">立即学习</text>
|
||||
@@ -108,20 +108,20 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 大促 Banner -->
|
||||
<view class="banner">
|
||||
<!-- 大促 Banner(数据由后端 fa_banner 下发) -->
|
||||
<view class="banner" v-if="banner">
|
||||
<view class="banner-deco bd1"></view>
|
||||
<view class="banner-deco bd2"></view>
|
||||
<view class="banner-deco bd3"></view>
|
||||
<view class="banner-close" @tap="onCloseBanner">×</view>
|
||||
<view class="banner-inner">
|
||||
<view class="banner-tags">
|
||||
<view class="banner-tag">家装季</view>
|
||||
<view class="banner-tag">{{ banner.badge }}</view>
|
||||
<view class="banner-tag ghost">限时</view>
|
||||
</view>
|
||||
<text class="banner-title">双11 狂欢大促</text>
|
||||
<text class="banner-desc">下单立减 · 满额再返券</text>
|
||||
<view class="banner-date">10.23 - 11.15</view>
|
||||
<text class="banner-title">{{ banner.title }}</text>
|
||||
<text class="banner-desc">{{ banner.subtitle }}</text>
|
||||
<view class="banner-date">{{ banner.date_text }}</view>
|
||||
</view>
|
||||
<view class="banner-cta" @tap="onBanner">立即抢购</view>
|
||||
</view>
|
||||
@@ -230,7 +230,10 @@
|
||||
const greeting = hh < 6 ? '夜深了' : hh < 11 ? '上午好' : hh < 14 ? '中午好' : hh < 18 ? '下午好' : '晚上好'
|
||||
|
||||
/* ---------- 服务保障 ---------- */
|
||||
const assures = ['平台认证', '先行赔付', '极速上门', '售后无忧']
|
||||
/* ---------- 服务保障 / 教程 / Banner(均由后端下发) ---------- */
|
||||
const assures = ref(['平台认证', '先行赔付', '极速上门', '售后无忧'])
|
||||
const banner = ref(null)
|
||||
const tutorial = ref({ title: '下单找师傅教程', sub: '3 分钟看懂,下单不踩坑' })
|
||||
|
||||
/* ---------- 服务图标:纯 CSS 图元,零图片依赖
|
||||
o=描边框 l=实心线 d=圆形描边 t=三角
|
||||
@@ -252,6 +255,9 @@
|
||||
const res = await api.home()
|
||||
cats.value = res.cats || []
|
||||
badge.value = res.badge || { coupon: 0, unread: 0 }
|
||||
if (res.assures && res.assures.length) assures.value = res.assures
|
||||
if (res.banners && res.banners.length) banner.value = res.banners[0]
|
||||
if (res.tutorial) tutorial.value = res.tutorial
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户