榆钱落尽槿花稀 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

226 lines
5.0 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 class="tn-landscape-class tn-landscape">
<view v-if="showValue" class="tn-landscape__container" :style="[containerStyle]">
<slot></slot>
<view
v-if="closeBtn"
class="tn-landscape__icon tn-icon-close-fill"
:class="[{
'tn-landscape__icon--left-top': closePosition === 'leftTop',
'tn-landscape__icon--right-top': closePosition === 'rightTop',
'tn-landscape__icon--bottom': closePosition === 'bottom'
}]"
:style="[closeBtnStyle]"
@tap="close"
></view>
</view>
<view
v-if="mask"
class="tn-landscape__mask"
:class="[{'tn-landscape__mask--show': showValue}]"
:style="[maskStyle]"
@tap="closeMask"
></view>
</view>
</template>
<script>
export default {
name: 'tn-landscape',
props: {
// 显示
show: {
type: Boolean,
default: false
},
// 显示关闭图标
closeBtn: {
type: Boolean,
default: true
},
// 关闭图标颜色
closeColor: {
type: String,
default: ''
},
// 关闭图标大小单位rpx
closeSize: {
type: Number,
default: 0
},
// 关闭图标位置
// leftTop -> 左上角 rightTop -> 右上角 bottom -> 底部
closePosition: {
type: String,
default: 'rightTop'
},
// 关闭图标top值单位rpx
// 当关闭图标在leftTop或者rightTop时生效
closeTop: {
type: Number,
default: 0
},
// 关闭图标right值单位rpx
// 当关闭图标在RightTop时生效
closeRight: {
type: Number,
default: 0
},
// 关闭图标bottom值单位rpx
// 当关闭图标在bottom时生效
closeBottom: {
type: Number,
default: 0
},
// 关闭图标left值单位rpx
// 当关闭图标在leftTop时生效
closeLeft: {
type: Number,
default: 0
},
// 显示遮罩
mask: {
type: Boolean,
default: true
},
// 点击遮罩可以关闭
maskCloseable: {
type: Boolean,
default: true
},
// zIndex
zIndex: {
type: Number,
default: 0
}
},
computed: {
containerStyle() {
let style = {}
style.zIndex = this.zIndex ? this.zIndex : this.$t.zIndex.landsacpe
return style
},
closeBtnStyle() {
let style = {}
if (this.closePosition === 'leftTop') {
if (this.closeTop) {
style.top = this.closeTop + 'rpx'
}
if (this.closeLeft) {
style.left = this.closeLeft + 'rpx'
}
} else if (this.closePosition === 'rightTop') {
if (this.closeTop) {
style.top = this.closeTop + 'rpx'
}
if (this.closeRight) {
style.right = this.closeRight + 'rpx'
}
} else if (this.closePosition === 'bottom') {
if (this.closeBottom) {
style.bottom = this.closeBottom + 'rpx'
}
}
if (this.closeSize) {
style.fontSize = this.closeSize + 'rpx'
}
if (this.closeColor) {
style.color = this.closeColor
}
return style
},
maskStyle() {
let style = {}
style.zIndex = this.zIndex ? this.zIndex - 1 : this.$t.zIndex.landsacpe - 1
return style
}
},
watch: {
show: {
handler(val) {
this.showValue = val
},
immediate: true
}
},
data() {
return {
showValue: false
}
},
methods: {
// 关闭压屏窗
close() {
this.showValue = false
this.$emit('close')
},
// 点击遮罩关闭
closeMask() {
if (!this.maskCloseable) return
this.close()
}
}
}
</script>
<style lang="scss" scoped>
.tn-landscape {
width: 100%;
overflow: hidden;
&__container {
max-width: 100%;
position: fixed;
display: inline-flex;
flex-direction: column;
align-items: center;
justify-content: center;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
&__icon {
position: absolute;
text-align: center;
font-size: 50rpx;
color: #FFFFFF;
&--left-top {
top: -40rpx;
left: 20rpx;
}
&--right-top {
top: -40rpx;
right: 40rpx;
}
&--bottom {
left: 50%;
bottom: -40rpx;
transform: translateX(-50%);
}
}
&__mask {
position: fixed;
width: 100%;
height: 100%;
background-color: $tn-mask-bg-color;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0;
transform: scale3d(1, 1, 0);
transition: all 0.25s ease-in;
&--show {
opacity: 1 !important;
transform: scale3d(1, 1, 1);
}
}
}
</style>