业务更名为撞车并切换crash路由
用户可见文案与页面/API路径改为撞车与crash,保留mohong表与权限码兼容;移动端入口去掉租/撞图标。
This commit is contained in:
@@ -123,11 +123,11 @@ async function handleBuy() {
|
||||
const payment = await startMohongPayment(order.id, payWay)
|
||||
if (payment.paid || payment.status === 'paid') {
|
||||
showToast({ message: '支付成功', icon: 'passed' })
|
||||
await router.push(`/m/mohong/orders/${order.id}`)
|
||||
await router.push(`/m/crash/orders/${order.id}`)
|
||||
return
|
||||
}
|
||||
await openMobilePaymentCashier(payment, async () => {
|
||||
await router.push(`/m/mohong/orders/${order.id}`)
|
||||
await router.push(`/m/crash/orders/${order.id}`)
|
||||
})
|
||||
} catch (error) {
|
||||
showToast({ message: readError(error, '下单失败'), icon: 'cross' })
|
||||
|
||||
@@ -165,11 +165,11 @@ function syncQuery() {
|
||||
const query: Record<string, string> = {}
|
||||
if (keyword.value.trim()) query.keyword = keyword.value.trim()
|
||||
if (activeCategoryId.value) query.category_id = String(activeCategoryId.value)
|
||||
router.replace({ path: '/mohong', query })
|
||||
router.replace({ path: '/crash', query })
|
||||
}
|
||||
|
||||
function goDetail(id: number) {
|
||||
router.push(`/mohong/${id}`)
|
||||
router.push(`/crash/${id}`)
|
||||
}
|
||||
|
||||
function markCoverFailed(id: number) {
|
||||
@@ -188,7 +188,7 @@ async function handleSupportClick() {
|
||||
if (supportLoading.value) return
|
||||
supportLoading.value = true
|
||||
try {
|
||||
const chat = await ensureSupportChat('mohong')
|
||||
const chat = await ensureSupportChat('crash')
|
||||
router.push(`/m/chats/${chat.id}`)
|
||||
} catch {
|
||||
showToast({ message: '联系客服失败,请稍后重试', icon: 'cross' })
|
||||
@@ -224,7 +224,7 @@ async function handleSupportClick() {
|
||||
>
|
||||
{{ supportLoading ? '...' : '客服' }}
|
||||
</button>
|
||||
<button type="button" class="orders-btn" @click="router.push('/mohong/orders')">订单</button>
|
||||
<button type="button" class="orders-btn" @click="router.push('/crash/orders')">订单</button>
|
||||
</header>
|
||||
|
||||
<div class="shop-body">
|
||||
|
||||
@@ -35,7 +35,7 @@ async function loadOrders() {
|
||||
<button type="button" class="back-btn" @click="router.back()">
|
||||
<van-icon name="arrow-left" :size="20" />
|
||||
</button>
|
||||
<h1>摸大红订单</h1>
|
||||
<h1>撞车订单</h1>
|
||||
</header>
|
||||
|
||||
<van-loading v-if="loading" class="state-loading" size="24px" vertical>加载中...</van-loading>
|
||||
@@ -46,7 +46,7 @@ async function loadOrders() {
|
||||
:key="item.id"
|
||||
type="button"
|
||||
class="card"
|
||||
@click="router.push(`/mohong/orders/${item.id}`)"
|
||||
@click="router.push(`/crash/orders/${item.id}`)"
|
||||
>
|
||||
<div class="top">
|
||||
<span>{{ item.order_no }}</span>
|
||||
|
||||
@@ -146,11 +146,11 @@ async function handleBuy() {
|
||||
const payment = await startMohongPayment(order.id, payWay)
|
||||
if (payment.paid || payment.status === 'paid') {
|
||||
ElMessage.success('支付成功')
|
||||
await router.push(`/mohong/orders/${order.id}`)
|
||||
await router.push(`/crash/orders/${order.id}`)
|
||||
return
|
||||
}
|
||||
await cashier.openPaymentCashier(payment, async () => {
|
||||
await router.push(`/mohong/orders/${order.id}`)
|
||||
await router.push(`/crash/orders/${order.id}`)
|
||||
})
|
||||
} catch (error) {
|
||||
ElMessage.error(readError(error, '下单失败'))
|
||||
@@ -184,7 +184,7 @@ async function handleBuy() {
|
||||
</div>
|
||||
|
||||
<div class="info-panel">
|
||||
<p class="eyebrow">摸大红商品</p>
|
||||
<p class="eyebrow">撞车商品</p>
|
||||
<h1>{{ product.title }}</h1>
|
||||
<p class="desc">{{ product.description || '暂无说明' }}</p>
|
||||
|
||||
@@ -238,7 +238,7 @@ async function handleBuy() {
|
||||
<el-button size="large" class="btn-outline" @click="openCart">
|
||||
购物车{{ cartCount > 0 ? `(${cartCount})` : '' }}
|
||||
</el-button>
|
||||
<el-button size="large" class="btn-outline" @click="router.push('/mohong')">
|
||||
<el-button size="large" class="btn-outline" @click="router.push('/crash')">
|
||||
返回列表
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
@@ -180,7 +180,7 @@ function syncQuery() {
|
||||
const query: Record<string, string> = {}
|
||||
if (keyword.value.trim()) query.keyword = keyword.value.trim()
|
||||
if (activeCategoryId.value) query.category_id = String(activeCategoryId.value)
|
||||
router.replace({ path: '/mohong', query })
|
||||
router.replace({ path: '/crash', query })
|
||||
}
|
||||
|
||||
const activeCategoryName = () => {
|
||||
@@ -196,7 +196,7 @@ async function handleSupportClick() {
|
||||
if (supportLoading.value) return
|
||||
supportLoading.value = true
|
||||
try {
|
||||
const chat = await ensureSupportChat('mohong')
|
||||
const chat = await ensureSupportChat('crash')
|
||||
router.push(`/messages/${chat.id}`)
|
||||
} catch {
|
||||
ElMessage.error('联系客服失败,请稍后重试')
|
||||
@@ -210,7 +210,7 @@ async function handleSupportClick() {
|
||||
<section class="mohong-pc-page">
|
||||
<header class="toolbar">
|
||||
<div class="title-block">
|
||||
<h1>摸大红</h1>
|
||||
<h1>撞车</h1>
|
||||
<span class="count">{{ total }} 件</span>
|
||||
<span class="tip">{{ activeCategoryName() }} · 支付后扫码联系客服</span>
|
||||
</div>
|
||||
@@ -228,7 +228,7 @@ async function handleSupportClick() {
|
||||
<el-icon><ShoppingCart /></el-icon>
|
||||
<span>购物车{{ cartCount > 0 ? `(${cartCount})` : '' }}</span>
|
||||
</button>
|
||||
<button type="button" class="toolbar-btn outline" @click="router.push('/mohong/orders')">
|
||||
<button type="button" class="toolbar-btn outline" @click="router.push('/crash/orders')">
|
||||
<el-icon><Tickets /></el-icon>
|
||||
<span>我的订单</span>
|
||||
</button>
|
||||
|
||||
@@ -135,7 +135,7 @@ async function copyText() {
|
||||
<h1>{{ statusText }}</h1>
|
||||
<p class="sub">订单号 {{ order.order_no }} · {{ formatDateTime(order.created_at) }}</p>
|
||||
</div>
|
||||
<button type="button" class="toolbar-btn outline" @click="router.push('/mohong/orders')">
|
||||
<button type="button" class="toolbar-btn outline" @click="router.push('/crash/orders')">
|
||||
返回列表
|
||||
</button>
|
||||
</header>
|
||||
@@ -207,7 +207,7 @@ async function copyText() {
|
||||
<button v-if="order.copy_text" type="button" class="btn outline" @click="copyText">
|
||||
复制订单信息
|
||||
</button>
|
||||
<button type="button" class="btn outline" @click="router.push('/mohong')">
|
||||
<button type="button" class="btn outline" @click="router.push('/crash')">
|
||||
继续选购
|
||||
</button>
|
||||
</aside>
|
||||
|
||||
@@ -34,10 +34,10 @@ async function loadOrders() {
|
||||
<section class="mohong-orders-page">
|
||||
<header class="page-header">
|
||||
<div>
|
||||
<h1>摸大红订单</h1>
|
||||
<h1>撞车订单</h1>
|
||||
<p class="sub">查看支付状态、复制订单信息、扫码联系客服</p>
|
||||
</div>
|
||||
<button type="button" class="toolbar-btn outline" @click="router.push('/mohong')">
|
||||
<button type="button" class="toolbar-btn outline" @click="router.push('/crash')">
|
||||
返回商品列表
|
||||
</button>
|
||||
</header>
|
||||
@@ -69,7 +69,7 @@ async function loadOrders() {
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100" fixed="right" align="center">
|
||||
<template #default="{ row }">
|
||||
<button type="button" class="link-btn" @click="router.push(`/mohong/orders/${row.id}`)">
|
||||
<button type="button" class="link-btn" @click="router.push(`/crash/orders/${row.id}`)">
|
||||
详情
|
||||
</button>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user