榆钱落尽槿花稀 448712ece5 feat: 添加积分申请系统基础功能与UI组件
本次提交主要包含以下内容:

1. 新增积分申请系统核心功能:
   - 添加登录页面及API接口
   - 实现积分申请记录查看功能
   - 集成微信小程序分享功能
   - 添加请求管理工具类

2. 引入Tuniao UI组件库:
   - 添加时间线、折叠面板、表格等UI组件
   - 集成头像组、单选框组等交互组件
   - 配置全局样式和主题颜色

3. 基础架构搭建:
   - 配置项目manifest和pages.json路由
   - 添加状态管理store
   - 实现自定义导航栏适配
   - 添加工具函数(加解密、数字处理等)

4. 静态资源:
   - 添加项目logo和背景图片
   - 配置uni.scss全局样式变量

本次提交为系统基础功能搭建,后续将进一步完善积分申请流程和审批功能。
2025-05-27 16:40:02 +08:00

210 lines
4.8 KiB
Vue
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
v-if="showNotice"
class="tn-notice-bar-class tn-notice-bar"
:style="{
borderRadius: radius + 'rpx'
}"
>
<block v-if="mode === 'horizontal' && circular">
<tn-row-notice
:backgroundColor="backgroundColor"
:fontColor="fontColor"
:fontSize="fontSize"
:fontUnit="fontUnit"
:list="list"
:show="show"
:playStatus="playStatus"
:leftIcon="leftIcon"
:leftIconName="leftIconName"
:leftIconSize="leftIconSize"
:rightIcon="rightIcon"
:rightIconName="rightIconName"
:rightIconSize="rightIconSize"
:closeBtn="closeBtn"
:autoplay="autoplay"
:radius="radius"
:padding="padding"
:speed="speed"
@click="click"
@close="close"
@clickLeft="clickLeftIcon"
@clickRight="clickRightIcon"
></tn-row-notice>
</block>
<block v-if="mode === 'vertical' || (mode === 'horizontal' && !circular)">
<tn-column-notice
:backgroundColor="backgroundColor"
:fontColor="fontColor"
:fontSize="fontSize"
:fontUnit="fontUnit"
:list="list"
:show="show"
:mode="mode"
:playStatus="playStatus"
:leftIcon="leftIcon"
:leftIconName="leftIconName"
:leftIconSize="leftIconSize"
:rightIcon="rightIcon"
:rightIconName="rightIconName"
:rightIconSize="rightIconSize"
:closeBtn="closeBtn"
:autoplay="autoplay"
:radius="radius"
:padding="padding"
:duration="duration"
@click="click"
@close="close"
@clickLeft="clickLeftIcon"
@clickRight="clickRightIcon"
@end="end"
></tn-column-notice>
</block>
</view>
</template>
<script>
import componentsColorMixin from '../../libs/mixin/components_color.js'
export default {
name: 'tn-notice-bar',
mixins: [componentsColorMixin],
props: {
// 显示的内容
list: {
type: Array,
default() {
return []
}
},
// 是否显示
show: {
type: Boolean,
default: true
},
// 播放状态
// play -> 播放 paused -> 暂停
playStatus: {
type: String,
default: 'play'
},
// 滚动方向
// horizontal -> 水平滚动 vertical -> 垂直滚动
mode: {
type: String,
default: 'horizontal'
},
// 是否显示左边图标
leftIcon: {
type: Boolean,
default: true
},
// 左边图标的名称
leftIconName: {
type: String,
default: 'sound'
},
// 左边图标的大小
leftIconSize: {
type: Number,
default: 34
},
// 是否显示右边的图标
rightIcon: {
type: Boolean,
default: false
},
// 右边图标的名称
rightIconName: {
type: String,
default: 'right'
},
// 右边图标的大小
rightIconSize: {
type: Number,
default: 26
},
// 是否显示关闭按钮
closeBtn: {
type: Boolean,
default: false
},
// 圆角
radius: {
type: Number,
default: 0
},
// 内边距
padding: {
type: String,
default: '18rpx 24rpx'
},
// 自动播放
autoplay: {
type: Boolean,
default: true
},
// 滚动周期
duration: {
type: Number,
default: 2000
},
// 水平滚动时的速度即每秒滚动多少rpx
speed: {
type: Number,
default: 160
},
// 水平滚动的时候是否采用衔接的模式
circular: {
type: Boolean,
default: true
},
// 没有数据时是否显示通知
autoHidden: {
type: Boolean,
default: true
}
},
computed: {
// 当设置了show为false或者autoHidden为true且list为空时不显示通知
showNotice() {
if (this.show === false || (this.autoHidden && this.list.length === 0)) return false
else return true
}
},
data() {
return {
}
},
methods: {
// 点击了通知栏
click(index) {
this.$emit('click', index)
},
// 点击了关闭按钮
close() {
this.$emit('close')
},
// 点击了左边图标
clickLeftIcon() {
this.$emit('clickLeft')
},
// 点击了右边图标
clickRightIcon() {
this.$emit('clickRight')
},
// 一个周期滚动结束
end() {
this.$emit('end')
}
}
}
</script>
<style lang="scss" scoped>
.tn-notice-bar {
overflow: hidden;
}
</style>