Initial commit

This commit is contained in:
ChuXun
2025-12-07 22:53:46 +08:00
commit 5a2d39293d
27 changed files with 3188 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
value: false
},
historyCase: {
type: Object,
value: null
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
closeModal: function() {
this.triggerEvent('close');
},
preventBubble: function(e) {
// 阻止冒泡,防止点击内容区域关闭模态框
}
}
})

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1,17 @@
<!--components/HistoryModal/HistoryModal.wxml-->
<view class="modal-mask" wx:if="{{show}}" bindtap="closeModal">
<view class="modal-content" catchtap="preventBubble">
<view class="modal-header">
<text class="modal-title">历史案例参考</text>
<view class="modal-close" bindtap="closeModal">×</view>
</view>
<view class="modal-body">
<view class="case-title">{{historyCase.title}}</view>
<view class="case-image"></view>
<view class="case-desc">{{historyCase.description}}</view>
</view>
<view class="modal-footer">
<view class="btn" bindtap="closeModal">了解了</view>
</view>
</view>
</view>

View File

@@ -0,0 +1,111 @@
/* components/HistoryModal/HistoryModal.wxss */
.modal-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
display: flex;
justify-content: center;
align-items: center;
z-index: 999;
}
.modal-content {
width: 80%;
background: #fff;
border-radius: 10rpx;
overflow: hidden;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.2);
animation: modalShow 0.3s ease;
}
@keyframes modalShow {
from {
opacity: 0;
transform: scale(0.9);
}
to {
opacity: 1;
transform: scale(1);
}
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx;
border-bottom: 1px solid #eee;
background-color: #F9F2E6;
}
.modal-title {
font-size: 32rpx;
font-weight: bold;
color: #8B0000;
}
.modal-close {
font-size: 36rpx;
color: #999;
width: 60rpx;
height: 60rpx;
display: flex;
justify-content: center;
align-items: center;
}
.modal-body {
padding: 30rpx;
}
.case-title {
font-size: 30rpx;
font-weight: bold;
margin-bottom: 20rpx;
text-align: center;
color: #333;
}
.case-image {
width: 100%;
height: 320rpx;
margin-bottom: 20rpx;
background-color: #f0f0f0;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.case-image::after {
content: "历史案例图片";
color: #999;
font-size: 28rpx;
}
.case-desc {
font-size: 28rpx;
color: #666;
line-height: 1.5;
text-align: justify;
}
.modal-footer {
padding: 20rpx;
display: flex;
justify-content: center;
border-top: 1px solid #eee;
background-color: #F9F2E6;
}
.btn {
background: #8B0000;
color: #fff;
border-radius: 8rpx;
padding: 20rpx 60rpx;
text-align: center;
font-size: 28rpx;
}