feat(my): 新增个人信息、帮助中心、问题详情页面并接入导航
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
cd11d711d5
commit
3a67b26ed6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "帮助中心",
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
.helpCenter {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
padding: 24rpx 32rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #F5F7FB;
|
||||
|
||||
.search {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 48rpx;
|
||||
|
||||
.search-title {
|
||||
color: #394356;
|
||||
height: 40rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: bolder;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.search-sub {
|
||||
color: #394356;
|
||||
height: 26rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 26rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.tab {
|
||||
flex: 1;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
text-align: center;
|
||||
border-radius: 48rpx;
|
||||
font-size: 24rpx;
|
||||
background-color: #FFFFFF;
|
||||
color: #77849E;
|
||||
}
|
||||
|
||||
.tab--active {
|
||||
background-color: #1385FA;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
.question {
|
||||
width: 100%;
|
||||
height: 112rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.dot {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #1385FA;
|
||||
margin-right: 12rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.question-title {
|
||||
flex: 1;
|
||||
color: #394356;
|
||||
height: 32rpx;
|
||||
font-size: 32rpx;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
width: 20rpx;
|
||||
height: 18rpx;
|
||||
flex-shrink: 0;
|
||||
|
||||
&::after {
|
||||
right: 4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// pages/helpCenter/helpCenter.ts
|
||||
Page({
|
||||
data: {
|
||||
tabs: [
|
||||
{ name: '全部', active: true },
|
||||
{ name: '连接配对', active: false },
|
||||
{ name: '使用测量', active: false },
|
||||
{ name: '数据管理', active: false }
|
||||
],
|
||||
questions: [
|
||||
{ id: 1, title: '如何连接蓝牙设备?' },
|
||||
{ id: 2, title: '设备无法连接WiFi怎么办?' },
|
||||
{ id: 3, title: '如何添加和管理成员?' },
|
||||
{ id: 4, title: '测量数据不准确如何校准?' },
|
||||
{ id: 5, title: '数据补传功能如何使用?' },
|
||||
{ id: 6, title: '设备电量消耗过快?' }
|
||||
]
|
||||
},
|
||||
|
||||
onTapTab(e: WechatMiniprogram.TouchEvent) {
|
||||
const index = e.currentTarget.dataset.index as number
|
||||
const tabs = this.data.tabs.map((t, i) => ({ ...t, active: i === index }))
|
||||
this.setData({ tabs })
|
||||
},
|
||||
|
||||
onTapQuestion(e: WechatMiniprogram.TouchEvent) {
|
||||
const title = e.currentTarget.dataset.title as string
|
||||
wx.navigateTo({
|
||||
url: '/pages/questionDetails/questionDetails?title=' + encodeURIComponent(title)
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,22 @@
|
||||
<view class="helpCenter">
|
||||
<view class="search">
|
||||
<view class="search-title">您遇到了什么问题?</view>
|
||||
<view class="search-sub">根据下方分类快速排查设备状态...</view>
|
||||
</view>
|
||||
|
||||
<view class="tabs">
|
||||
<block wx:for="{{ tabs }}" wx:key="name">
|
||||
<view class="tab {{ item.active ? 'tab--active' : '' }}" bind:tap="onTapTab" data-index="{{ index }}">{{ item.name }}</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view class="list">
|
||||
<block wx:for="{{ questions }}" wx:key="id">
|
||||
<view class="question" bind:tap="onTapQuestion" data-title="{{ item.title }}">
|
||||
<view class="dot"></view>
|
||||
<view class="question-title">{{ item.title }}</view>
|
||||
<view class="arrow"></view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user