|
|
@@ -1,65 +1,60 @@
|
|
|
<template>
|
|
|
- <view class="app-content">
|
|
|
- <!-- 页面标题 -->
|
|
|
+ <view class="app-content level-page">
|
|
|
<view class="page-header">
|
|
|
- <view class="page-title">会员等级</view>
|
|
|
- <view class="page-subtitle">充值或消费1元获得一个成长值</view>
|
|
|
- <view class="page-subtitle">欠款充值没有成长值</view>
|
|
|
+ <view class="page-title">会员等级设置</view>
|
|
|
+ <view class="page-subtitle">设置不同会员等级的消费/充值金额标准</view>
|
|
|
+ <view class="title-decor"></view>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 主要内容区域 -->
|
|
|
<view class="main-content">
|
|
|
- <!-- 会员等级表格 -->
|
|
|
- <view class="table-container">
|
|
|
- <t-table :headerBackgroundColor="'#f0f9f0'">
|
|
|
- <view>
|
|
|
- <t-tr header>
|
|
|
- <t-th width="20%">
|
|
|
- <view class="table-header">图标</view>
|
|
|
- </t-th>
|
|
|
- <t-th width="30%">
|
|
|
- <view class="table-header">等级</view>
|
|
|
- </t-th>
|
|
|
- <t-th width="50%">
|
|
|
- <view class="table-header">成长值</view>
|
|
|
- </t-th>
|
|
|
- </t-tr>
|
|
|
+ <view class="table-head">
|
|
|
+ <view class="col-icon">图标</view>
|
|
|
+ <view class="col-level">等级</view>
|
|
|
+ <view class="col-amount">金额(元)</view>
|
|
|
+ <view class="col-discount">折扣</view>
|
|
|
+ </view>
|
|
|
+ <view class="level-card" v-for="(item, index) in map" :key="index">
|
|
|
+ <view class="card-top">
|
|
|
+ <view class="member-icon col-icon">
|
|
|
+ <image v-if="item.member == 1" class="member-badge-icon" src="@/static/member-icons/member-1.svg" mode="aspectFit" />
|
|
|
+ <image v-else-if="item.member == 2" class="member-badge-icon" src="@/static/member-icons/member-2.svg" mode="aspectFit" />
|
|
|
+ <image v-else-if="item.member == 3" class="member-badge-icon" src="@/static/member-icons/member-3.svg" mode="aspectFit" />
|
|
|
+ <image v-else-if="item.member == 4" class="member-badge-icon" src="@/static/member-icons/member-4.svg" mode="aspectFit" />
|
|
|
+ <image v-else-if="item.member == 5" class="member-badge-icon" src="@/static/member-icons/member-5.svg" mode="aspectFit" />
|
|
|
+ </view>
|
|
|
+ <view class="col-level">
|
|
|
+ <view class="level-name">{{ item.name }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="field-inline col-amount">
|
|
|
+ <input v-model="item.amount" type="digit" class="field-inp" placeholder="金额" @focus="() => clearDiscount(index)" />
|
|
|
</view>
|
|
|
- <view>
|
|
|
- <view v-for="(item, inIndex) in map" :key="inIndex">
|
|
|
- <t-tr>
|
|
|
- <t-td align="center" color="info" width="20%">
|
|
|
- <view class="member-icon">
|
|
|
- <image v-if="item.member == 1" class="member-badge-icon" style="width:54upx;height:54upx;" src="@/static/member-icons/member-1.svg" mode="aspectFit"></image>
|
|
|
- <image v-else-if="item.member == 2" class="member-badge-icon" style="width:52upx;height:52upx;" src="@/static/member-icons/member-2.svg" mode="aspectFit"></image>
|
|
|
- <image v-else-if="item.member == 3" class="member-badge-icon" style="width:51upx;height:51upx;" src="@/static/member-icons/member-3.svg" mode="aspectFit"></image>
|
|
|
- <image v-else-if="item.member == 4" class="member-badge-icon" style="width:57upx;height:57upx;" src="@/static/member-icons/member-4.svg" mode="aspectFit"></image>
|
|
|
- <image v-else-if="item.member == 5" class="member-badge-icon" style="width:54upx;height:54upx;" src="@/static/member-icons/member-5.svg" mode="aspectFit"></image>
|
|
|
- </view>
|
|
|
- </t-td>
|
|
|
- <t-td align="center" color="info" width="30%">
|
|
|
- <view class="level-name">{{ item.name }}</view>
|
|
|
- </t-td>
|
|
|
- <t-td align="center" color="info" width="50%">
|
|
|
- <view class="input-wrapper">
|
|
|
- <input
|
|
|
- v-model="item.amount"
|
|
|
- type="digit"
|
|
|
- class="amount-input"
|
|
|
- @focus="() => clearDiscount(inIndex)"
|
|
|
- placeholder="请填写消费金额"
|
|
|
- />
|
|
|
- </view>
|
|
|
- </t-td>
|
|
|
- </t-tr>
|
|
|
- </view>
|
|
|
+ <view class="field-inline col-discount">
|
|
|
+ <input v-model="item.discount" type="digit" class="field-inp short" placeholder="如9.5" />
|
|
|
</view>
|
|
|
- </t-table>
|
|
|
+ </view>
|
|
|
+ <view class="card-section">
|
|
|
+ <view class="section-label">生日权益</view>
|
|
|
+ <input
|
|
|
+ v-model="item.birthdayBenefit"
|
|
|
+ class="section-inp"
|
|
|
+ maxlength="50"
|
|
|
+ placeholder="请输入生日权益内容"
|
|
|
+ />
|
|
|
+ <view class="char-count">{{ (item.birthdayBenefit || '').length }}/50</view>
|
|
|
+ </view>
|
|
|
+ <view class="card-section">
|
|
|
+ <view class="section-label">会员权益说明</view>
|
|
|
+ <textarea
|
|
|
+ v-model="item.benefitDesc"
|
|
|
+ class="section-textarea"
|
|
|
+ maxlength="500"
|
|
|
+ placeholder="请输入会员权益说明内容"
|
|
|
+ />
|
|
|
+ <view class="char-count">{{ (item.benefitDesc || '').length }}/500</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
|
|
|
- <!-- 底部按钮 -->
|
|
|
<view class="app-footer">
|
|
|
<view class="footer-btn admin-button-com big default" style="border:1upx solid #CCCCCC;" @click="goBack()">返回上页</view>
|
|
|
<view class="footer-btn admin-button-com big blue" @click="saveData">提交修改</view>
|
|
|
@@ -67,38 +62,35 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import list from '@/mixins/list';
|
|
|
-import ModalModule from "@/components/plugin/modal";
|
|
|
import { getLevelInitData, modifyLevel } from '@/api/member';
|
|
|
|
|
|
export default {
|
|
|
name: "MemberLevel",
|
|
|
- components: {
|
|
|
- AppWrapperEmpty,
|
|
|
- ModalModule
|
|
|
- },
|
|
|
mixins: [list],
|
|
|
data() {
|
|
|
return {
|
|
|
- // 会员等级数据
|
|
|
map: [],
|
|
|
- // 降级天数设置
|
|
|
reduceDay: 30
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- /**
|
|
|
- * 初始化页面数据
|
|
|
- */
|
|
|
init() {
|
|
|
getLevelInitData().then(res => {
|
|
|
if (res.code === 1) {
|
|
|
this.map = res.data.member || [];
|
|
|
- // 为每个等级添加member字段用于显示对应图标
|
|
|
this.map.forEach((item, index) => {
|
|
|
if (!item.member) {
|
|
|
- item.member = index + 1; // 等级1-5对应member值1-5
|
|
|
+ item.member = index + 1;
|
|
|
+ }
|
|
|
+ if (item.discount === undefined || item.discount === null || item.discount === '') {
|
|
|
+ item.discount = 10;
|
|
|
+ }
|
|
|
+ if (!item.birthdayBenefit) {
|
|
|
+ item.birthdayBenefit = '';
|
|
|
+ }
|
|
|
+ if (!item.benefitDesc) {
|
|
|
+ item.benefitDesc = '';
|
|
|
}
|
|
|
});
|
|
|
this.reduceDay = res.data.reduceDay || 30;
|
|
|
@@ -108,66 +100,34 @@ export default {
|
|
|
this.$msg('获取数据失败,请重试');
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
- /**
|
|
|
- * 清空指定等级的消费金额
|
|
|
- * @param {number} index - 等级索引
|
|
|
- */
|
|
|
clearDiscount(index) {
|
|
|
this.$set(this.map[index], 'amount', '');
|
|
|
},
|
|
|
-
|
|
|
- /**
|
|
|
- * 清空降级天数设置
|
|
|
- */
|
|
|
- clearReduceDay() {
|
|
|
- this.reduceDay = '';
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * 返回上一页
|
|
|
- */
|
|
|
goBack() {
|
|
|
uni.navigateBack();
|
|
|
},
|
|
|
-
|
|
|
- /**
|
|
|
- * 保存数据
|
|
|
- */
|
|
|
saveData() {
|
|
|
- // 数据验证
|
|
|
if (!this.validateData()) {
|
|
|
return;
|
|
|
}
|
|
|
- const confirmContent = '确认提交?';
|
|
|
- this.$util.confirmModal({ content: confirmContent }, () => {
|
|
|
- const requestData = {
|
|
|
+ this.$util.confirmModal({ content: '确认提交?' }, () => {
|
|
|
+ modifyLevel({
|
|
|
data: this.map,
|
|
|
reduceDay: this.reduceDay
|
|
|
- };
|
|
|
- modifyLevel(requestData).then(res => {
|
|
|
+ }).then(res => {
|
|
|
if (res.code === 1) {
|
|
|
this.$msg(res.msg);
|
|
|
- setTimeout(() => {
|
|
|
- uni.navigateBack();
|
|
|
- }, 900);
|
|
|
+ setTimeout(() => uni.navigateBack(), 900);
|
|
|
}
|
|
|
- })
|
|
|
- })
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
- /**
|
|
|
- * 验证表单数据
|
|
|
- * @returns {boolean} 验证结果
|
|
|
- */
|
|
|
validateData() {
|
|
|
- // 检查是否有空的消费金额
|
|
|
const hasEmptyAmount = this.map.some(item => !item.amount || item.amount === '');
|
|
|
if (hasEmptyAmount) {
|
|
|
this.$msg('请填写完整的消费金额');
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
- // 检查消费金额是否为正数
|
|
|
const hasInvalidAmount = this.map.some(item => {
|
|
|
const amount = parseFloat(item.amount);
|
|
|
return isNaN(amount) || amount < 0;
|
|
|
@@ -176,343 +136,229 @@ export default {
|
|
|
this.$msg('请输入有效的消费金额');
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
- // 检查降级天数
|
|
|
- if (this.reduceDay !== '' && this.reduceDay !== 0) {
|
|
|
- const reduceDayNum = parseInt(this.reduceDay);
|
|
|
- if (isNaN(reduceDayNum) || reduceDayNum < 0) {
|
|
|
- this.$msg('请输入有效的降级天数');
|
|
|
- return false;
|
|
|
- }
|
|
|
+ const hasLongBenefit = this.map.some(item => (item.birthdayBenefit || '').length > 50);
|
|
|
+ if (hasLongBenefit) {
|
|
|
+ this.$msg('生日权益不超过50字');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ const hasLongDesc = this.map.some(item => (item.benefitDesc || '').length > 500);
|
|
|
+ if (hasLongDesc) {
|
|
|
+ this.$msg('会员权益说明不超过500字');
|
|
|
+ return false;
|
|
|
}
|
|
|
-
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-.app-content {
|
|
|
- background: linear-gradient(135deg, #f0f9f0 0%, #a8e6a8 100%);
|
|
|
- min-height: 100vh;
|
|
|
- padding: 0;
|
|
|
- padding-bottom: 180upx; /* 为底部固定按钮预留足够空间 */
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
+.level-page {
|
|
|
position: relative;
|
|
|
- z-index: 1;
|
|
|
+ background: linear-gradient(180deg, #eff9ef 0%, #f8fcf8 44%, #f7fbf7 100%);
|
|
|
+ min-height: 100vh;
|
|
|
+ padding: 0 16upx 160upx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
|
|
|
-/* 页面头部 */
|
|
|
.page-header {
|
|
|
- background: #fff;
|
|
|
- padding: 40upx 30upx 30upx;
|
|
|
- margin-bottom: 30upx;
|
|
|
- box-shadow: 0 2upx 12upx rgba(0, 0, 0, 0.08);
|
|
|
- border-radius: 0 0 20upx 20upx;
|
|
|
-
|
|
|
+ position: relative;
|
|
|
+ z-index: 1;
|
|
|
+ padding: 44upx 30upx 28upx;
|
|
|
.page-title {
|
|
|
- font-size: 44upx;
|
|
|
- font-weight: 600;
|
|
|
- color: #2c3e50;
|
|
|
+ font-size: 42upx;
|
|
|
+ font-weight: 700;
|
|
|
+ color: #1f6f40;
|
|
|
text-align: center;
|
|
|
- margin-bottom: 12upx;
|
|
|
+ letter-spacing: 2upx;
|
|
|
}
|
|
|
-
|
|
|
.page-subtitle {
|
|
|
- font-size: 30upx;
|
|
|
- color: #7f8c8d;
|
|
|
+ font-size: 22upx;
|
|
|
+ color: #a5aaa8;
|
|
|
text-align: center;
|
|
|
- opacity: 0.8;
|
|
|
+ margin-top: 12upx;
|
|
|
+ }
|
|
|
+ .title-decor {
|
|
|
+ width: 10upx;
|
|
|
+ height: 10upx;
|
|
|
+ margin: 18upx auto 0;
|
|
|
+ position: relative;
|
|
|
+ background: #4ec56a;
|
|
|
+ transform: rotate(45deg);
|
|
|
+ }
|
|
|
+ .title-decor::before,
|
|
|
+ .title-decor::after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ top: 4upx;
|
|
|
+ width: 28upx;
|
|
|
+ height: 1upx;
|
|
|
+ background: #d8ead6;
|
|
|
+ transform: rotate(-45deg);
|
|
|
+ }
|
|
|
+ .title-decor::before {
|
|
|
+ right: 24upx;
|
|
|
+ }
|
|
|
+ .title-decor::after {
|
|
|
+ left: 24upx;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-/* 主要内容区域 */
|
|
|
.main-content {
|
|
|
- padding: 0 30upx;
|
|
|
- flex: 1;
|
|
|
-}
|
|
|
-
|
|
|
-/* 表格容器 */
|
|
|
-.table-container {
|
|
|
+ position: relative;
|
|
|
+ z-index: 1;
|
|
|
background: #fff;
|
|
|
- border-radius: 16upx;
|
|
|
- box-shadow: 0 4upx 20upx rgba(0, 0, 0, 0.08);
|
|
|
- overflow: hidden;
|
|
|
- margin-bottom: 40upx;
|
|
|
-
|
|
|
- /* 覆盖表格组件默认样式 */
|
|
|
- :deep(.t-table) {
|
|
|
- border: none;
|
|
|
-
|
|
|
- .t-tr {
|
|
|
- border-bottom: 1upx solid #e8f5e8;
|
|
|
-
|
|
|
- &:last-child {
|
|
|
- border-bottom: none;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .t-th, .t-td {
|
|
|
- padding: 24upx 12upx;
|
|
|
- border-right: 1upx solid #e8f5e8;
|
|
|
-
|
|
|
- &:last-child {
|
|
|
- border-right: none;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .t-th:first-child, .t-td:first-child {
|
|
|
- padding: 24upx 8upx; /* 图标列更紧凑 */
|
|
|
- }
|
|
|
-
|
|
|
- .t-th:last-child, .t-td:last-child {
|
|
|
- padding: 24upx 16upx; /* 消费金额列稍微宽松一些 */
|
|
|
- }
|
|
|
-
|
|
|
- .t-th {
|
|
|
- background: #f0f9f0 !important;
|
|
|
- }
|
|
|
- }
|
|
|
+ border-radius: 18upx;
|
|
|
+ padding: 0 18upx 2upx;
|
|
|
+ box-shadow: 0 8upx 28upx rgba(35, 121, 63, 0.08);
|
|
|
}
|
|
|
-
|
|
|
-.table-header {
|
|
|
- color: #2d5f3f;
|
|
|
- font-size: 32upx;
|
|
|
+.table-head {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ height: 74upx;
|
|
|
+ font-size: 28upx;
|
|
|
font-weight: 600;
|
|
|
+ color: #28884d;
|
|
|
+ border-bottom: 1upx solid #edf3ed;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+.table-head .col-icon,
|
|
|
+.table-head .col-level,
|
|
|
+.table-head .col-amount,
|
|
|
+.table-head .col-discount {
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+.level-card {
|
|
|
+ padding: 22upx 0 24upx;
|
|
|
+ border-bottom: 1upx solid #f1f4f0;
|
|
|
+}
|
|
|
+.level-card:last-child {
|
|
|
+ border-bottom: 0;
|
|
|
+}
|
|
|
+.card-top {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 18upx;
|
|
|
+}
|
|
|
+.col-icon {
|
|
|
+ width: 112upx;
|
|
|
+ flex-shrink: 0;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+.col-level {
|
|
|
+ width: 170upx;
|
|
|
+ flex-shrink: 0;
|
|
|
+}
|
|
|
+.col-amount {
|
|
|
+ flex: 1;
|
|
|
+ margin-left: 6upx;
|
|
|
+}
|
|
|
+.col-discount {
|
|
|
+ width: 114upx;
|
|
|
+ flex-shrink: 0;
|
|
|
+ margin-left: 18upx;
|
|
|
}
|
|
|
-
|
|
|
.member-icon {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
- flex-shrink: 0;
|
|
|
}
|
|
|
-
|
|
|
.member-badge-icon {
|
|
|
- flex-shrink: 0;
|
|
|
- filter: drop-shadow(0 2upx 6upx rgba(0,0,0,0.3));
|
|
|
+ width: 92upx;
|
|
|
+ height: 92upx;
|
|
|
}
|
|
|
-
|
|
|
.level-name {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 152upx;
|
|
|
+ height: 56upx;
|
|
|
+ background: linear-gradient(90deg, #67d85a, #41b94e);
|
|
|
color: #fff;
|
|
|
+ padding: 0 14upx;
|
|
|
+ border-radius: 24upx;
|
|
|
+ font-size: 24upx;
|
|
|
font-weight: 600;
|
|
|
- font-size: 32upx;
|
|
|
- padding: 8upx 16upx;
|
|
|
- background: linear-gradient(45deg, #4caf50 0%, #2e7d32 100%);
|
|
|
- background: -webkit-linear-gradient(45deg, #4caf50 0%, #2e7d32 100%);
|
|
|
- color: #fff;
|
|
|
- border-radius: 20upx;
|
|
|
- display: inline-block;
|
|
|
- min-width: 120upx;
|
|
|
- text-align: center;
|
|
|
- box-shadow: 0 2upx 8upx rgba(76, 175, 80, 0.3);
|
|
|
+ box-shadow: 0 4upx 10upx rgba(67, 183, 78, 0.2);
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
|
-
|
|
|
-.input-wrapper {
|
|
|
- padding: 8upx;
|
|
|
+.field-inline {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
-
|
|
|
-.amount-input {
|
|
|
- width: 200upx;
|
|
|
- height: 70upx;
|
|
|
- border: 2upx solid #c8e6c9;
|
|
|
- border-radius: 12upx;
|
|
|
- padding: 0 20upx;
|
|
|
- font-size: 30upx;
|
|
|
- color: #2d5f3f;
|
|
|
+.field-inp {
|
|
|
+ width: 100%;
|
|
|
+ height: 54upx;
|
|
|
+ line-height: 54upx;
|
|
|
+ border: 1upx solid #edf0ed;
|
|
|
+ border-radius: 8upx;
|
|
|
+ padding: 0 8upx;
|
|
|
+ font-size: 26upx;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #368753;
|
|
|
text-align: center;
|
|
|
+ box-sizing: border-box;
|
|
|
background: #fff;
|
|
|
- transition: all 0.3s ease;
|
|
|
-
|
|
|
- &:focus {
|
|
|
- border-color: #4caf50;
|
|
|
- box-shadow: 0 0 0 6upx rgba(76, 175, 80, 0.15);
|
|
|
- outline: none;
|
|
|
- }
|
|
|
-
|
|
|
- &::placeholder {
|
|
|
- color: #81c784;
|
|
|
- font-size: 26upx;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-/* 降级规则设置 */
|
|
|
-.rule-container {
|
|
|
- background: #fff;
|
|
|
- border-radius: 16upx;
|
|
|
- padding: 40upx 30upx;
|
|
|
- box-shadow: 0 4upx 20upx rgba(0, 0, 0, 0.08);
|
|
|
- margin-bottom: 60upx; /* 增加底部间距,避免被按钮遮挡 */
|
|
|
}
|
|
|
-
|
|
|
-.rule-title {
|
|
|
- font-size: 36upx;
|
|
|
- font-weight: 600;
|
|
|
- color: #2d5f3f;
|
|
|
- margin-bottom: 24upx;
|
|
|
- text-align: center;
|
|
|
+.field-inp.short {
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
-
|
|
|
-.rule-content {
|
|
|
+.card-section {
|
|
|
+ position: relative;
|
|
|
display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- flex-wrap: wrap;
|
|
|
- gap: 16upx;
|
|
|
- margin-bottom: 20upx;
|
|
|
+ align-items: flex-start;
|
|
|
+ margin-top: 18upx;
|
|
|
}
|
|
|
-
|
|
|
-.rule-text {
|
|
|
- font-size: 32upx;
|
|
|
- color: #2d5f3f;
|
|
|
- font-weight: 500;
|
|
|
+.section-label {
|
|
|
+ width: 132upx;
|
|
|
+ flex-shrink: 0;
|
|
|
+ line-height: 54upx;
|
|
|
+ font-size: 24upx;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #3b3f3c;
|
|
|
}
|
|
|
-
|
|
|
-.day-input {
|
|
|
- width: 120upx;
|
|
|
- height: 60upx;
|
|
|
- border: 2upx solid #c8e6c9;
|
|
|
- border-radius: 12upx;
|
|
|
- padding: 0 16upx;
|
|
|
- font-size: 30upx;
|
|
|
- color: #2d5f3f;
|
|
|
- text-align: center;
|
|
|
- background: #fff;
|
|
|
- transition: all 0.3s ease;
|
|
|
-
|
|
|
- &:focus {
|
|
|
- border-color: #4caf50;
|
|
|
- box-shadow: 0 0 0 6upx rgba(76, 175, 80, 0.15);
|
|
|
- outline: none;
|
|
|
- }
|
|
|
-
|
|
|
- &::placeholder {
|
|
|
- color: #81c784;
|
|
|
- font-size: 26upx;
|
|
|
- }
|
|
|
+.section-inp {
|
|
|
+ flex: 1;
|
|
|
+ height: 58upx;
|
|
|
+ line-height: 58upx;
|
|
|
+ border: 1upx solid #edf0ed;
|
|
|
+ border-radius: 8upx;
|
|
|
+ padding: 0 18upx;
|
|
|
+ font-size: 24upx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ color: #333;
|
|
|
}
|
|
|
-
|
|
|
-.rule-tip {
|
|
|
+.section-textarea {
|
|
|
+ flex: 1;
|
|
|
+ height: 140upx;
|
|
|
+ min-height: 130upx;
|
|
|
+ border: 1upx solid #edf0ed;
|
|
|
+ border-radius: 8upx;
|
|
|
+ padding: 14upx 18upx 28upx;
|
|
|
font-size: 24upx;
|
|
|
- color: #66bb6a;
|
|
|
- text-align: center;
|
|
|
+ line-height: 34upx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ color: #333;
|
|
|
+}
|
|
|
+.char-count {
|
|
|
+ position: absolute;
|
|
|
+ right: 16upx;
|
|
|
+ bottom: 8upx;
|
|
|
+ font-size: 22upx;
|
|
|
+ color: #a8a8a8;
|
|
|
+ line-height: 1;
|
|
|
}
|
|
|
-
|
|
|
-/* 底部按钮区域 */
|
|
|
.app-footer {
|
|
|
position: fixed;
|
|
|
- bottom: 0;
|
|
|
left: 0;
|
|
|
right: 0;
|
|
|
- width: 100%;
|
|
|
- background: #fff;
|
|
|
- padding: 20upx 30upx;
|
|
|
- padding-bottom: calc(20upx + constant(safe-area-inset-bottom));
|
|
|
- padding-bottom: calc(20upx + env(safe-area-inset-bottom));
|
|
|
- box-shadow: 0 -2upx 10upx rgba(0, 0, 0, 0.08);
|
|
|
- z-index: 9999;
|
|
|
+ bottom: 0;
|
|
|
display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- gap: 20upx;
|
|
|
- height: auto;
|
|
|
- box-sizing: border-box;
|
|
|
- border-top: 1upx solid #f0f0f0;
|
|
|
-}
|
|
|
-
|
|
|
-.footer-btn {
|
|
|
- flex: 1;
|
|
|
- height: 80upx;
|
|
|
- line-height: 80upx;
|
|
|
- min-width: 120upx;
|
|
|
- border-radius: 8upx;
|
|
|
- font-size: 32upx;
|
|
|
- font-weight: 500;
|
|
|
- border: none;
|
|
|
- margin: 0;
|
|
|
- padding: 0;
|
|
|
- text-align: center;
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-/* 响应式设计 */
|
|
|
-@media screen and (max-width: 750upx) {
|
|
|
- .page-header {
|
|
|
- padding: 30upx 20upx 20upx;
|
|
|
-
|
|
|
- .page-title {
|
|
|
- font-size: 38upx;
|
|
|
- }
|
|
|
-
|
|
|
- .page-subtitle {
|
|
|
- font-size: 26upx;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .main-content {
|
|
|
- padding: 0 20upx;
|
|
|
- }
|
|
|
-
|
|
|
- .rule-content {
|
|
|
- flex-direction: column;
|
|
|
- gap: 12upx;
|
|
|
- }
|
|
|
-
|
|
|
- .app-footer {
|
|
|
- padding: 20upx 30upx;
|
|
|
- padding-bottom: calc(20upx + constant(safe-area-inset-bottom));
|
|
|
- padding-bottom: calc(20upx + env(safe-area-inset-bottom));
|
|
|
- gap: 16upx;
|
|
|
- }
|
|
|
-
|
|
|
+ padding: 20upx 24upx;
|
|
|
+ background: #fff;
|
|
|
+ box-shadow: 0 -4upx 12upx rgba(0, 0, 0, 0.06);
|
|
|
.footer-btn {
|
|
|
flex: 1;
|
|
|
- height: 76upx;
|
|
|
- line-height: 76upx;
|
|
|
- min-width: 100upx;
|
|
|
- font-size: 30upx;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-/* 动画效果 */
|
|
|
-.table-container {
|
|
|
- animation: slideInUp 0.6s ease-out;
|
|
|
-}
|
|
|
-
|
|
|
-.rule-container {
|
|
|
- animation: slideInUp 0.8s ease-out;
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-@keyframes slideInUp {
|
|
|
- from {
|
|
|
- opacity: 0;
|
|
|
- transform: translateY(30upx);
|
|
|
- }
|
|
|
- to {
|
|
|
- opacity: 1;
|
|
|
- transform: translateY(0);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-/* 高亮聚焦效果 */
|
|
|
-.amount-input:focus,
|
|
|
-.day-input:focus {
|
|
|
- animation: focusGlow 0.3s ease-in-out;
|
|
|
-}
|
|
|
-
|
|
|
-@keyframes focusGlow {
|
|
|
- 0% {
|
|
|
- box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
|
|
|
- }
|
|
|
- 50% {
|
|
|
- box-shadow: 0 0 0 8upx rgba(76, 175, 80, 0.2);
|
|
|
- }
|
|
|
- 100% {
|
|
|
- box-shadow: 0 0 0 6upx rgba(76, 175, 80, 0.15);
|
|
|
+ margin: 0 10upx;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|