init version kelfy-mini for new gitea

This commit is contained in:
terry.wang
2025-11-13 13:38:59 +08:00
commit 493fa4f1e1
763 changed files with 55626 additions and 0 deletions

View File

@@ -0,0 +1,94 @@
// pages/department/department.js
Page({
/**
* 页面的初始数据
*/
data: {
curNav:1,
curIndex:0,
scrollTop:0,
},
changeTab:function(e){
let id = e.target.dataset.id,
index = parseInt(e.target.dataset.index);
// 把点击到的某一项设为当前index
this.setData({
curNav: id,
curIndex: index,
})
},
toDetail:function(e){
console.log(e)
const id = e.target.id;
const title = e.target.dataset.title;
wx.navigateTo({
url: '../register/register?id='+id+'&title='+title,
success: function(res) {
console.log(111)
},
fail:function(res){
console.log(res)
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,7 @@
{
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "科室列表",
"backgroundColor": "#fff",
"backgroundTextStyle": "light"
}

View File

@@ -0,0 +1,27 @@
<!--pages/department/department.wxml科室列表-->
<view class="list">
<scroll-view class='menu' scroll-y="true">
<view class="cd {{curNav==item.id?'active' :''}}"
bindtap="changeTab" wx:for="{{classifyList}}"
wx:key="id" data-id="{{item.id}}"
data-index="{{index}}">
{{item.name}}
</view>
</scroll-view>
<scroll-view class="content" scroll-y="true" scroll-top="{{scrollTop}}">
<view class="goods_con" wx:if="{{classifyList[curIndex].children}}">
<block wx:for="{{classifyList[curIndex].children}}" wx:key="id">
<view class="goodslist"
bindtap="toDetail"
id="{{item.id}}"
data-title="{{item.title}}"
>
{{item.title}}
</view>
</block>
</view>
<view class='nodata' wx:else>该分类暂无数据</view>
</scroll-view>
</view>

View File

@@ -0,0 +1,60 @@
/* pages/department/department.wxss */
page{
background: #F1F7F5;
}
.menu{
font-size: 28rpx;
color: #666;
background: #F1F7F5;
width: 206rpx;
position: absolute;
left: 0;
top: 20rpx;
bottom: 0;
padding-bottom: 30rpx;
}
.cd{
width: 200rpx;
height: 100rpx;
line-height: 100rpx;
border-bottom: 1px solid #eee;
border-left: 6rpx solid #F1F7F5;
text-indent: 30rpx;
}
.content{
width: 550rpx;
background: #fff;
position: absolute;
top: 20rpx;
bottom: 0;
right: 0;
}
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.active{
width: 200rpx;
background: #fff;
border-left: 6rpx solid green;
}
.goods_con{
margin-left: 30rpx;
padding-bottom: 30rpx;
}
.goodslist{
width: 100%;
height:100rpx;
line-height: 100rpx;
font-size: 28rpx;
color: #333;
border-bottom: 1px solid #eee;
}
.nodata{
margin-top: 60rpx;
text-align: center;
font-size: 28rpx;
}