Files
szjs/pages/sexChart/sexChart.js
2025-03-15 00:02:01 +08:00

172 lines
3.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// pages/sexChart/sexChart.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
// 基础数据
gender: 'female', // 默认选择女性
activeTab: 'integrated', // 默认显示综合表格
// 图片路径
images: {
female: '/pages/image/xfytb01.png',
male: '/pages/image/xfytb02.png'
},
// 女孩发育分期数据
femaleStages: [
{
stage: 1,
breast: '幼儿型',
pubic: '无',
other: ''
},
{
stage: 2,
breast: '出现硬结,乳头及乳晕稍增大',
pubic: '少许稀疏直毛,色浅;女孩限阴唇处;男孩限阴茎根部',
other: '生长增速'
},
{
stage: 3,
breast: '乳房和乳晕更增大,侧面呈半圆状',
pubic: '毛色变深、变粗,见于耻骨联合上',
other: '生长速率渐达高峰;女孩出现腋毛;男孩渐见胡须、痤疮、声音变调'
},
{
stage: 4,
breast: '乳晕、乳头增大,侧面观突起于乳房半圆上',
pubic: '如同成人,但分布面积小',
other: '生长速率开始下降,女孩见初潮'
},
{
stage: 5,
breast: '成人型',
pubic: '成人型',
other: ''
}
],
// 男孩发育分期数据
maleStages: [
{
stage: 1,
genital: '幼儿型,睾丸直径<2.5cm (1~3ml)',
pubic: '无',
other: ''
},
{
stage: 2,
genital: '双睾和阴囊增大;睾丸直径>2.5cm (4~8ml);阴囊皮肤变红、薄、起皱纹;阴茎稍增大',
pubic: '少许稀疏直毛,色浅;限阴茎根部',
other: '生长增速'
},
{
stage: 3,
genital: '阴囊、双睾增大睾丸长径约3.5cm (10~15ml);阴茎开始增长',
pubic: '毛色变深、变粗,见于耻骨联合上',
other: '生长速率渐达高峰;渐见胡须、痤疮、声音变调'
},
{
stage: 4,
genital: '阴囊皮肤色泽变深阴茎增长、增粗龟头发育睾丸长径约4cm (15~20ml)',
pubic: '如同成人,但分布面积小',
other: '生长速率开始下降'
},
{
stage: 5,
genital: '成人型,睾丸长径>4cm (>20ml)',
pubic: '成人型',
other: ''
}
]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
// 切换性别
switchGender(e) {
this.setData({
gender: e.currentTarget.dataset.gender
});
},
// 切换标签页
switchTab(e) {
this.setData({
activeTab: e.currentTarget.dataset.tab
});
},
// 返回上一页
onClickLeft() {
wx.navigateBack();
},
// 预览图片
previewImage(e) {
const imagePath = e.currentTarget.dataset.image;
wx.previewImage({
current: imagePath,
urls: ['/pages/image/xfytb01.jpg', '/pages/image/xfytb02.jpg']
});
}
})