chore: establish V1.1 recovery baseline
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
// pages/counseling-intro/counseling-intro.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "公益婚恋咨询"
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
Page({
|
||||
data: {
|
||||
services: [] as Array<{ type: string; name: string; description: string; icon: string }>
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.loadServices();
|
||||
},
|
||||
|
||||
async loadServices() {
|
||||
try {
|
||||
const res = await wx.request({
|
||||
url: `${app.globalData.apiBase}/counseling/services/intro`,
|
||||
header: { 'Authorization': `Bearer ${app.globalData.token}` }
|
||||
});
|
||||
if (res.statusCode === 200 && res.data.success) {
|
||||
this.setData({ services: res.data.data });
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载咨询介绍失败', e);
|
||||
}
|
||||
},
|
||||
|
||||
onSelectService(e: any) {
|
||||
const type = e.currentTarget.dataset.type;
|
||||
wx.navigateTo({
|
||||
url: `/pages/counseling-request/counseling-request?type=${type}`
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,21 @@
|
||||
<view class="container">
|
||||
<view class="header">
|
||||
<text class="title">公益婚恋咨询</text>
|
||||
<text class="subtitle">专业红娘为您提供情感支持</text>
|
||||
</view>
|
||||
|
||||
<view class="service-list">
|
||||
<view class="service-item" wx:for="{{services}}" wx:key="type" bindtap="onSelectService" data-type="{{item.type}}">
|
||||
<view class="service-icon">{{item.icon}}</view>
|
||||
<view class="service-info">
|
||||
<text class="service-name">{{item.name}}</text>
|
||||
<text class="service-desc">{{item.description}}</text>
|
||||
</view>
|
||||
<text class="arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="notice">
|
||||
<text>所有咨询服务均为公益免费,无需支付任何费用。</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,14 @@
|
||||
.container { padding: 24rpx; }
|
||||
.header { text-align: center; margin-bottom: 32rpx; }
|
||||
.title { font-size: 36rpx; font-weight: bold; color: #333; }
|
||||
.subtitle { font-size: 26rpx; color: #888; margin-top: 8rpx; display: block; }
|
||||
.service-list { background: #fff; border-radius: 16rpx; overflow: hidden; }
|
||||
.service-item { display: flex; align-items: center; padding: 28rpx 24rpx; border-bottom: 1rpx solid #f0f0f0; }
|
||||
.service-item:last-child { border-bottom: none; }
|
||||
.service-icon { font-size: 40rpx; margin-right: 20rpx; }
|
||||
.service-info { flex: 1; }
|
||||
.service-name { font-size: 30rpx; color: #333; display: block; }
|
||||
.service-desc { font-size: 24rpx; color: #999; margin-top: 6rpx; display: block; }
|
||||
.arrow { font-size: 36rpx; color: #ccc; }
|
||||
.notice { margin-top: 24rpx; padding: 20rpx; background: #fff8e1; border-radius: 12rpx; text-align: center; }
|
||||
.notice text { font-size: 24rpx; color: #f57c00; }
|
||||
Reference in New Issue
Block a user