重构项目文件夹目录
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
const userApi = require('../../api/user')
|
||||
const navigation = require('../../utils/navigation')
|
||||
const theme = require('../../utils/theme')
|
||||
|
||||
Page({
|
||||
data: Object.assign(theme.pageThemeData(getApp().globalData.shopTheme), {
|
||||
loading: false,
|
||||
contact: null
|
||||
}),
|
||||
|
||||
onShow() {
|
||||
this.loadContact()
|
||||
},
|
||||
|
||||
handleBack() {
|
||||
navigation.goBack('/pages/profile/index')
|
||||
},
|
||||
|
||||
async loadContact() {
|
||||
this.setData({ loading: true })
|
||||
try {
|
||||
const contact = await userApi.getPlatformContact()
|
||||
this.setData({ contact })
|
||||
} catch (error) {
|
||||
this.setData({ contact: null })
|
||||
} finally {
|
||||
this.setData({ loading: false })
|
||||
}
|
||||
},
|
||||
|
||||
openRoute(event) {
|
||||
const route = event.currentTarget.dataset.route
|
||||
const pureRoute = String(route || '').split('?')[0]
|
||||
if (navigation.isTabPage(pureRoute)) {
|
||||
navigation.switchTab(pureRoute)
|
||||
return
|
||||
}
|
||||
navigation.navigate(route)
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"navigation-bar": "/components/navigation-bar/navigation-bar"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<navigation-bar title="帮助与客�? showBack="{{true}}" fallbackPath="/pages/profile/index" color="{{navThemeColor || '#4A443F'}}" background="{{navThemeBackground || '#FDFBF9'}}"></navigation-bar>
|
||||
|
||||
<view class="page-shell" style="{{themeVars}}">
|
||||
<view class="page-content">
|
||||
<view class="page-hero">
|
||||
<text class="hero-kicker">Fingertip Designer Support</text>
|
||||
<text class="hero-title">帮助与客�?/text>
|
||||
<text class="hero-desc">订单、预约��售后和账号问题都可以从这里继续处理�?/text>
|
||||
</view>
|
||||
|
||||
<view class="page-card contact-card">
|
||||
<text class="section-title">平台联系信息</text>
|
||||
<block wx:if="{{contact}}">
|
||||
<text wx:if="{{contact.contactName}}" class="contact-line">{{contact.contactName}} {{contact.roleLabel || ''}}</text>
|
||||
<text wx:if="{{contact.phoneAvailable && contact.phone}}" class="contact-line">电话:{{contact.phone}}</text>
|
||||
<text wx:if="{{contact.wechatAvailable && contact.wechatId}}" class="contact-line">微信:{{contact.wechatId}}</text>
|
||||
<text wx:if="{{contact.platformContactText}}" class="contact-line">{{contact.platformContactText}}</text>
|
||||
</block>
|
||||
<text wx:else class="contact-line">暂无可展示的客服信息,请稍后重试或从订单详情联系服务人员�?/text>
|
||||
</view>
|
||||
|
||||
<view class="quick-grid">
|
||||
<view class="page-card quick-card" data-route="/pages/orders/index" bindtap="openRoute">
|
||||
<text class="quick-title">订单中心</text>
|
||||
<text class="quick-desc">查看预约、支付��评�?/text>
|
||||
</view>
|
||||
<view class="page-card quick-card" data-route="/pages/after-sales/index" bindtap="openRoute">
|
||||
<text class="quick-title">售后记录</text>
|
||||
<text class="quick-desc">查看逢�款和处理进度</text>
|
||||
</view>
|
||||
<view class="page-card quick-card" data-route="/pages/notifications/index" bindtap="openRoute">
|
||||
<text class="quick-title">消息中心</text>
|
||||
<text class="quick-desc">查看系统通知</text>
|
||||
</view>
|
||||
<view class="page-card quick-card" data-route="/pages/settings/index" bindtap="openRoute">
|
||||
<text class="quick-title">账号设置</text>
|
||||
<text class="quick-desc">修改资料、手机号和密�?/text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,42 @@
|
||||
.contact-card {
|
||||
margin-top: 22rpx;
|
||||
padding: 26rpx;
|
||||
}
|
||||
|
||||
.contact-line,
|
||||
.quick-title,
|
||||
.quick-desc {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.contact-line {
|
||||
margin-top: 12rpx;
|
||||
color: #504444;
|
||||
font-size: 25rpx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.quick-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 18rpx;
|
||||
margin-top: 22rpx;
|
||||
}
|
||||
|
||||
.quick-card {
|
||||
min-height: 180rpx;
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.quick-title {
|
||||
color: var(--text-primary);
|
||||
font-size: 29rpx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.quick-desc {
|
||||
margin-top: 12rpx;
|
||||
color: #504444;
|
||||
font-size: 23rpx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
Reference in New Issue
Block a user