Files
medical-mall/pages/mall/admin/marketing/checkin/config.uvue
2026-02-25 11:39:54 +08:00

197 lines
6.3 KiB
Plaintext
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.
<template>
<view class="marketing-checkin-config">
<view class="config-card border-shadow">
<view class="config-header">
<text class="config-title">用户签到配置</text>
</view>
<view class="config-body">
<view class="config-item">
<view class="item-label">
<text class="label-txt">签到开关:</text>
<text class="label-desc">签到开关,商城是否开启签到功能,关闭后隐藏签到入口</text>
</view>
<view class="item-content">
<view class="radio-group">
<view class="radio-item" @click="config.is_open = true">
<view class="radio-circle" :class="{ checked: config.is_open }"></view>
<text class="radio-txt">开启</text>
</view>
<view class="radio-item ml-20" @click="config.is_open = false">
<view class="radio-circle" :class="{ checked: !config.is_open }"></view>
<text class="radio-txt">关闭</text>
</view>
</view>
</view>
</view>
<view class="config-item">
<view class="item-label">
<text class="label-txt">签到模式:</text>
<text class="label-desc">无限制累积和连续签到不会清零周循环每周一会清理累积和连续的记录为0重新开始计算月循环每月一号会清理累积和连续的记录为0重新开始计算</text>
</view>
<view class="item-content">
<view class="radio-group">
<view class="radio-item" @click="config.mode = 'none'">
<view class="radio-circle" :class="{ checked: config.mode === 'none' }"></view>
<text class="radio-txt">无限制</text>
</view>
<view class="radio-item ml-20" @click="config.mode = 'week'">
<view class="radio-circle" :class="{ checked: config.mode === 'week' }"></view>
<text class="radio-txt">周循环</text>
</view>
<view class="radio-item ml-20" @click="config.mode = 'month'">
<view class="radio-circle" :class="{ checked: config.mode === 'month' }"></view>
<text class="radio-txt">月循环</text>
</view>
</view>
</view>
</view>
<view class="config-item">
<view class="item-label">
<text class="label-txt">签到提醒:</text>
<text class="label-desc">是否开启签到提醒,提醒方式为短信以及站内信</text>
</view>
<view class="item-content">
<view class="radio-group">
<view class="radio-item" @click="config.notice_enabled = true">
<view class="radio-circle" :class="{ checked: config.notice_enabled }"></view>
<text class="radio-txt">开启</text>
</view>
<view class="radio-item ml-20" @click="config.notice_enabled = false">
<view class="radio-circle" :class="{ checked: !config.notice_enabled }"></view>
<text class="radio-txt">关闭</text>
</view>
</view>
</view>
</view>
<view class="config-item">
<view class="item-label">
<text class="label-txt">签到赠送积分:</text>
<text class="label-desc">签到赠送积分,每日签到赠送的积分值</text>
</view>
<view class="item-content">
<input class="config-input" type="number" v-model="config.integral" />
</view>
</view>
<view class="config-item">
<view class="item-label">
<text class="label-txt">签到赠送经验:</text>
<text class="label-desc">签到赠送用户经验值</text>
</view>
<view class="item-content">
<input class="config-input" type="number" v-model="config.exp" />
</view>
</view>
<view class="config-footer">
<button class="btn-submit" @click="handleSave">提交</button>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { reactive } from 'vue'
const config = reactive({
is_open: true,
mode: 'none',
notice_enabled: false,
integral: 10,
exp: 1
})
const handleSave = () => {
uni.showToast({ title: '保存成功', icon: 'success' })
}
</script>
<style scoped lang="scss">
.marketing-checkin-config {
padding: 0px;
}
.border-shadow {
background: #fff;
border-radius: 4px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
}
.config-card { padding: 24px; }
.config-header {
border-bottom: 1px solid #e8eaec;
padding-bottom: 16px;
margin-bottom: 24px;
}
.config-title {
font-size: 16px;
font-weight: bold;
color: #17233d;
position: relative;
padding-left: 12px;
}
.config-title::before {
content: '';
position: absolute;
left: 0;
top: 4px;
bottom: 4px;
width: 3px;
background: #1890ff;
}
.config-item {
display: flex;
flex-direction: row;
margin-bottom: 30px;
align-items: flex-start;
}
.item-label { width: 220px; display: flex; flex-direction: column; }
.label-txt { font-size: 14px; color: #333; margin-bottom: 4px; }
.label-desc { font-size: 12px; color: #999; line-height: 1.5; padding-right: 20px; }
.item-content { flex: 1; }
.radio-group { display: flex; flex-direction: row; padding-top: 4px; flex-wrap: wrap; }
.radio-item { display: flex; flex-direction: row; align-items: center; cursor: pointer; margin-bottom: 10px; }
.radio-circle { width: 14px; height: 14px; border: 1px solid #dcdfe6; border-radius: 50%; margin-right: 6px; position: relative; }
.radio-circle.checked { border-color: #1890ff; }
.radio-circle.checked::after { content: ''; position: absolute; width: 8px; height: 8px; background: #1890ff; border-radius: 50%; top: 2px; left: 2px; }
.radio-txt { font-size: 14px; color: #606266; }
.ml-20 { margin-left: 20px; }
.config-input {
width: 400px;
height: 36px;
border: 1px solid #dcdfe6;
border-radius: 4px;
padding: 0 12px;
font-size: 14px;
}
.config-footer {
margin-top: 40px;
padding-left: 220px;
}
.btn-submit {
width: 80px;
height: 36px;
line-height: 36px;
background: #1890ff;
color: #fff;
border: none;
border-radius: 4px;
font-size: 14px;
cursor: pointer;
}
</style>