chore: initial import

This commit is contained in:
liangjian
2026-06-29 09:42:53 +08:00
commit 9fea127de1
241 changed files with 82767 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,190 @@
<template>
<view v-if="activeAlert" class="contract-alert-float">
<view class="alert-panel" :class="{ 'is-collapsed': !isExpanded }" @click="handleBoxClick">
<view class="alert-icon-wrap">
<text class="tn-icon-edit-write-fill"></text>
</view>
<view class="alert-main">
<view class="alert-text">
<view class="alert-title">{{ activeAlert.title }}</view>
<view class="alert-desc">{{ activeAlert.desc }}</view>
</view>
<view class="alert-action" @click.stop="handlePrimaryAction">{{ activeAlert.actionText }}</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'ContractAlert',
props: {
pendingContracts: {
type: Array,
default: () => []
}
},
data() {
return {
isExpanded: true,
collapseTimer: null
}
},
computed: {
activeAlert() {
if (!Array.isArray(this.pendingContracts) || !this.pendingContracts.length) {
return null
}
return {
title: this.t('pendingTitle'),
desc: this.t('pendingDesc', { count: this.pendingContracts.length }),
actionText: this.t('actionText')
}
}
},
watch: {
activeAlert: {
immediate: true,
handler(value) {
if (!value) {
this.clearCollapseTimer()
return
}
this.isExpanded = true
this.startCollapseTimer()
}
}
},
beforeDestroy() {
this.clearCollapseTimer()
},
methods: {
t(key, params) {
return this.$translate(this.i18n, key, params)
},
clearCollapseTimer() {
if (this.collapseTimer) {
clearTimeout(this.collapseTimer)
this.collapseTimer = null
}
},
startCollapseTimer() {
this.clearCollapseTimer()
this.collapseTimer = setTimeout(() => {
this.isExpanded = false
}, 3000)
},
handleBoxClick() {
if (!this.activeAlert) {
return
}
if (!this.isExpanded) {
this.isExpanded = true
this.startCollapseTimer()
return
}
this.handlePrimaryAction()
},
handlePrimaryAction() {
const contract = this.pendingContracts[0]
if (!contract) {
return
}
uni.navigateTo({
url: `/pkgService/contract_sign/contract_sign?no=${encodeURIComponent(contract.no || contract.contractNo || '')}&orderNo=${encodeURIComponent(contract.orderNo || '')}`
})
}
}
}
</script>
<style lang="scss" scoped>
.contract-alert-float {
position: fixed;
right: 0;
bottom: calc(180rpx + env(safe-area-inset-bottom));
z-index: 999;
}
.alert-panel {
display: flex;
align-items: center;
max-width: 530rpx;
padding: 16rpx 18rpx;
border-radius: 28rpx 0 0 28rpx;
background: rgba(255, 255, 255, 0.98);
border: 1px solid rgba($brand-primary, 0.12);
border-right: none;
box-shadow: 0 16rpx 36rpx rgba($brand-primary, 0.12);
backdrop-filter: blur(16px);
transition: all 0.35s ease;
}
.alert-panel.is-collapsed {
transform: translateX(calc(100% - 106rpx));
padding-right: 0;
}
.alert-panel.is-collapsed .alert-main {
width: 0;
margin-left: 0;
opacity: 0;
}
.alert-icon-wrap {
width: 68rpx;
height: 68rpx;
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 16rpx;
flex-shrink: 0;
color: #ffffff;
background: linear-gradient(135deg, rgba($brand-primary, 0.9) 0%, $brand-primary 100%);
box-shadow: 0 6rpx 16rpx rgba($brand-primary, 0.2);
}
.alert-main {
display: flex;
align-items: center;
overflow: hidden;
opacity: 1;
transition: all 0.35s ease;
}
.alert-text {
margin-right: 18rpx;
max-width: 260rpx;
}
.alert-title {
font-size: 26rpx;
font-weight: 700;
color: #1f2d3d;
}
.alert-desc {
margin-top: 6rpx;
font-size: 22rpx;
color: #7c8da0;
white-space: nowrap;
}
.alert-action {
padding: 10rpx 28rpx;
border-radius: 30rpx;
font-size: 24rpx;
font-weight: 700;
color: #ffffff;
background: linear-gradient(135deg, rgba($brand-primary, 0.9) 0%, $brand-primary 100%);
box-shadow: 0 6rpx 16rpx rgba($brand-primary, 0.2);
white-space: nowrap;
transition: all 0.3s;
}
.alert-action:active {
transform: scale(0.96);
box-shadow: 0 4rpx 10rpx rgba($brand-primary, 0.15);
}
</style>

View File

@@ -0,0 +1,417 @@
<template>
<view
v-if="openModal"
class="wx-modal"
>
<view
class="wam__mask"
@touchmove.prevent=""
@tap.stop="closeModal"
></view>
<!-- 内容区域 -->
<view class="wam__wrapper">
<!-- 关闭按钮 -->
<view class="wam__close-btn" @tap.stop="closeModal">
<tn-button size="lg" shape="icon" backgroundColor="#00000000" fontColor="#AAAAAA">
<text class="tn-icon-close"></text>
</tn-button>
<!-- <text class="ri-close-circle-fill tn-color-white"></text> -->
</view>
<view class="tn-margin-left tn-flex tn-flex-col-center">
<view class="tn-text-bold tn-text-lg">综合筛选</view>
</view>
<view class="tn-margin-top-sm" style="border-top: 1rpx solid #F8F7F8;">
<scroll-view scroll-y="true" style="max-height: 55vh;">
<!-- 内容 start-->
<view class="tn-padding-top-sm" style="margin: 30rpx;">
<view class="">
应用权益
</view>
<view class="justify-content-item">
<view class="tn-tag-content tn-text-justify">
<view v-for="(item, index) in redpacket" :key="index" class="tn-tag-content__item tn-margin-right tn-text-sm" :class="[item.select ? 'bg-select' : 'bg-select-no']" @click="handleRedpacketClick(index)">
{{ item.title }}
</view>
</view>
</view>
<view class="tn-margin-top-xl">
价格区间
</view>
<view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin-top">
<view class="" style="width:30vw;border-radius: 100rpx;background-color: #F5F5F5;">
<view class="tn-color-gray tn-color-black tn-text-center" style="padding: 14rpx;">
<input type="number" placeholder="最低价" name="input" placeholder-style="color:#AAAAAA;margin-left: 10rpx" value=""></input>
</view>
</view>
<view class="tn-icon-sort">
</view>
<view class="" style="width:30vw;border-radius: 100rpx;background-color: #F5F5F5;">
<view class="tn-color-gray tn-color-black tn-text-center" style="padding: 14rpx;">
<input type="number" placeholder="最高价" name="input" placeholder-style="color:#AAAAAA;margin-left: 10rpx" value=""></input>
</view>
</view>
</view>
</view>
<!-- 内容 end-->
</scroll-view>
<!-- 悬浮按钮-->
<view class="tn-flex tn-footerfixed" style="border-top: 1rpx solid #F8F7F8;">
<view class="tn-flex-1 justify-content-item tn-text-center tn-margin-right-sm">
<tn-button :plain="true" backgroundColor="#AAAAAA " padding="39rpx 0" width="100%" :fontSize="28" fontColor="#AAAAAA" shape="round" @click="tn('')">
<text class="">重 置</text>
</tn-button>
</view>
<view class="tn-flex-1 justify-content-item tn-text-center tn-margin-left-sm">
<tn-button backgroundColor="$brand-primary " padding="40rpx 0" width="100%" :fontSize="28" fontColor="#FFFFFF" shape="round" @click="tn('')">
<text class="">确 定</text>
</tn-button>
</view>
</view>
<view class="tn-tabbar-height"></view>
</view>
</view>
</view>
</template>
<script>
export default {
options: {
// 在微信小程序中将组件节点渲染为虚拟节点,更加接近Vue组件的表现(不会出现shadow节点下再去创建元素)
virtualHost: true
},
props: {
value: {
type: Boolean,
default: false
}
},
data() {
return {
openModal: false,
content: [{
play: '12K',
number: '16',
title: '类型名称',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '1.08W',
number: '17',
title: '类型名称',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '2.06K',
number: '12',
title: '那只猪不见了',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '1.02W',
number: '22',
title: '那只猪不见了',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '2.92W',
number: '12',
title: '那只猪不见了',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '2.03W',
number: '5',
title: '那只猪不见了',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '1.69W',
number: '8',
title: '那只猪不见了',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '118K',
number: '6',
title: '那只猪不见了',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '2.03W',
number: '16',
title: '那只猪不见了',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '2.16W',
number: '8',
title: '那只猪不见了',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '1.89W',
number: '6',
title: '那只猪不见了',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '3.03W',
number: '6',
title: '那只猪不见了',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '1.32W',
number: '18',
title: '那只猪不见了',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '1.92W',
number: '6',
title: '那只猪不见了',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '1.52W',
number: '16',
title: '那只猪不见了',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '4.35W',
number: '15',
title: '那只猪不见了',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '4.57W',
number: '19',
title: '那只猪不见了',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '4.86W',
number: '12',
title: '那只猪不见了',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
}
],
redpacket: [
{
title: "包邮",
select: true
},
{
title: "积分抵扣",
select: false
},
{
title: "24小时发货",
select: false
},
{
title: "赠送运险费",
select: false
},
{
title: "会员折扣",
select: false
},
],
}
},
watch: {
value: {
handler(val) {
this.openModal = val
},
immediate: true
}
},
methods: {
// 跳转
tn(e) {
uni.navigateTo({
url: e,
});
},
// 关闭弹框
closeModal() {
this.$emit('input', false)
},
// 处理点击事件
handleRedpacketClick(index) {
this.redpacket[index].select = !this.redpacket[index].select
},
}
}
</script>
<style lang="scss" scoped>
/* 文字截取*/
.clamp-text-1 {
-webkit-line-clamp: 1;
display: -webkit-box;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
overflow: hidden;
}
.clamp-text-2 {
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
overflow: hidden;
}
.wx-modal {
position: fixed;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
z-index: 99998 !important;
view {
box-sizing: border-box;
}
.image {
width: 100%;
height: 100%;
border-radius: inherit;
}
.wam {
z-index: 9999 !important;
/* mask */
&__mask {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
opacity: 0;
animation: showMask 0.25s linear 0s forwards;
}
/* close-btn */
&__close-btn {
position: absolute;
top: 20rpx;
right: 10rpx;
z-index: 99999;
font-size: 40rpx;
}
/* wrapper */
&__wrapper {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
background-color: #FFFFFF;
border-radius: 40rpx 40rpx 0rpx 0rpx;
padding-top: 40rpx;
// padding-bottom: 40rpx;
// padding-bottom: calc(constant(safe-area-inset-bottom) + 40rpx);
// padding-bottom: calc(env(safe-area-inset-bottom) + 40rpx);
transform-origin: center bottom;
transform: scaleY(0);
animation: showWrapper 0.25s linear 0s forwards;
z-index: 99999;
}
}
}
@keyframes showMask {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes showWrapper {
0% {
transform: scaleY(0);
opacity: 0;
}
100% {
transform: scaleY(1);
opacity: 1;
}
}
/* 底部悬浮按钮 start*/
.tn-tabbar-height {
min-height: 20rpx;
height: calc(40rpx + env(safe-area-inset-bottom) / 2);
height: calc(40rpx + constant(safe-area-inset-bottom));
}
.tn-footerfixed {
width: 100%;
margin-bottom: calc(env(safe-area-inset-bottom)- 20rpx );
padding: 30rpx;
z-index: 1024;
box-shadow: 0 1rpx 6rpx rgba(0, 0, 0, 0);
}
/* 底部悬浮按钮 end*/
/* 标签内容 start*/
.tn-tag-content {
&__item {
display: inline-block;
line-height: 45rpx;
padding: 8rpx 24rpx;
margin: 24rpx 30rpx 5rpx 0rpx;
border-radius: 100rpx;
min-width: 140rpx;
text-align: center;
&--prefix {
padding-right: 10rpx;
}
}
}
/* 标签内容 end*/
.bg-select-no{
background-color: #F5F5F5;
border: 1rpx solid #F5F5F5;
}
.bg-select{
background-color: rgba($brand-primary, 0.125);
border: 1rpx solid $brand-primary;
color: $brand-primary;
}
</style>

304
components/filter/type.vue Normal file
View File

@@ -0,0 +1,304 @@
<template>
<view
v-if="openModal"
class="wx-modal"
>
<view
class="wam__mask"
@touchmove.prevent=""
@tap.stop="closeModal"
></view>
<!-- 内容区域 -->
<view class="wam__wrapper">
<!-- 关闭按钮 -->
<view class="wam__close-btn" @tap.stop="closeModal">
<tn-button size="lg" shape="icon" backgroundColor="#00000000" fontColor="#AAAAAA">
<text class="tn-icon-close"></text>
</tn-button>
<!-- <text class="ri-close-circle-fill tn-color-white"></text> -->
</view>
<view class="tn-margin-left tn-flex tn-flex-col-center">
<view class="tn-text-bold tn-text-lg">应用类型</view>
</view>
<view class="tn-margin-top-sm" style="border-top: 1rpx solid #F8F7F8;">
<scroll-view scroll-y="true" style="max-height: 55vh;">
<!-- 内容 start-->
<view class="tn-flex tn-flex-wrap tn-padding-top-sm" style="margin: 0 20rpx;">
<block v-for="(item, index) in content" :key="index">
<view class="" style="width: 50%;" @click="tn('/pageA/video/video')">
<view class="real-content">
<view class="image-pic2" :style="'background-image:url(' + item.mainImage + ')'">
<view class="image-real">
<view class="tn-flex tn-flex-col-center tn-text-center" style="height: 38rpx;position: absolute;top: 10rpx;left:10rpx;background-color: #00000080;border-radius: 10rpx;">
<view class="tn-margin-xs tn-color-white">热门</view>
</view>
<view class="tn-text-df" style="width: 100%;height: 40rpx;background: linear-gradient(0deg, rgba(0,0,0,0.6), rgba(0,0,0,0));position: absolute;bottom: 0;">
<view class="tn-padding-left-xs tn-padding-right-xs tn-color-white clamp-text-1">
<text class="tn-icon-my"></text>
<text class="tn-padding-left-xs">{{ item.play }} 人选择</text>
</view>
</view>
</view>
</view>
<view class="tn-text-justify tn-padding-top-sm">
<text class="clamp-text-1">{{ item.title }}</text>
</view>
</view>
</view>
</block>
</view>
<!-- 内容 end-->
</scroll-view>
<!-- 悬浮按钮-->
<view class="tn-flex tn-footerfixed" style="border-top: 1rpx solid #F8F7F8;">
<view class="tn-flex-1 justify-content-item tn-text-center">
<tn-button backgroundColor="$brand-primary " padding="40rpx 0" width="100%" :fontSize="28" fontColor="#FFFFFF" shape="round" @click="tn('')">
<text class="">确定选择</text>
</tn-button>
</view>
</view>
<view class="tn-tabbar-height"></view>
</view>
</view>
</view>
</template>
<script>
export default {
options: {
// 在微信小程序中将组件节点渲染为虚拟节点,更加接近Vue组件的表现(不会出现shadow节点下再去创建元素)
virtualHost: true
},
props: {
value: {
type: Boolean,
default: false
}
},
data() {
return {
openModal: false,
content: [{
play: '12K',
number: '16',
title: '经营策略',
mainImage: 'https://cdn.nlark.com/yuque/0/2023/jpeg/280373/1685709204898-assets/web-upload/30641b38-b047-4df8-abc3-034dd7b44b0f.jpeg',
},
{
play: '1.08W',
number: '17',
title: '动作射击',
mainImage: 'https://cdn.nlark.com/yuque/0/2023/jpeg/280373/1685709204901-assets/web-upload/f665e2cd-9e54-42b2-b347-c4fac4ff7c49.jpeg',
},
{
play: '2.06K',
number: '12',
title: '角色扮演',
mainImage: 'https://cdn.nlark.com/yuque/0/2023/jpeg/280373/1685709204932-assets/web-upload/8323e8a1-b33e-47ac-96e1-82bc2e84e180.jpeg',
},
{
play: '1.02W',
number: '22',
title: '休闲益智',
mainImage: 'https://cdn.nlark.com/yuque/0/2023/jpeg/280373/1685709204911-assets/web-upload/f97f8bf5-ec93-4a35-b28e-d37387af66a0.jpeg',
},
{
play: '2.92W',
number: '12',
title: '体育竞速',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '2.03W',
number: '5',
title: '棋牌桌游',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
play: '1.69W',
number: '8',
title: '其他',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
}
],
}
},
watch: {
value: {
handler(val) {
this.openModal = val
},
immediate: true
}
},
methods: {
// 跳转
tn(e) {
uni.navigateTo({
url: e,
});
},
// 关闭弹框
closeModal() {
this.$emit('input', false)
},
}
}
</script>
<style lang="scss" scoped>
/* 文字截取*/
.clamp-text-1 {
-webkit-line-clamp: 1;
display: -webkit-box;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
overflow: hidden;
}
.clamp-text-2 {
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
overflow: hidden;
}
.wx-modal {
position: fixed;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
z-index: 99998 !important;
view {
box-sizing: border-box;
}
.image {
width: 100%;
height: 100%;
border-radius: inherit;
}
.wam {
z-index: 9999 !important;
/* mask */
&__mask {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
opacity: 0;
animation: showMask 0.25s linear 0s forwards;
}
/* close-btn */
&__close-btn {
position: absolute;
top: 20rpx;
right: 10rpx;
z-index: 99999;
font-size: 40rpx;
}
/* wrapper */
&__wrapper {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
background-color: #FFFFFF;
border-radius: 40rpx 40rpx 0rpx 0rpx;
padding-top: 40rpx;
// padding-bottom: 40rpx;
// padding-bottom: calc(constant(safe-area-inset-bottom) + 40rpx);
// padding-bottom: calc(env(safe-area-inset-bottom) + 40rpx);
transform-origin: center bottom;
transform: scaleY(0);
animation: showWrapper 0.25s linear 0s forwards;
z-index: 99999;
}
}
}
@keyframes showMask {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes showWrapper {
0% {
transform: scaleY(0);
opacity: 0;
}
100% {
transform: scaleY(1);
opacity: 1;
}
}
/* 底部悬浮按钮 start*/
.tn-tabbar-height {
min-height: 20rpx;
height: calc(40rpx + env(safe-area-inset-bottom) / 2);
height: calc(40rpx + constant(safe-area-inset-bottom));
}
.tn-footerfixed {
width: 100%;
margin-bottom: calc(env(safe-area-inset-bottom)- 20rpx );
padding: 30rpx;
z-index: 1024;
box-shadow: 0 1rpx 6rpx rgba(0, 0, 0, 0);
}
/* 底部悬浮按钮 end*/
/* 内容 start*/
.real-content {
// box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
border-radius: 15rpx;
// background-color: rgba(255, 255, 255, 1);
margin: 10rpx 10rpx 30rpx 10rpx;
}
.image-real {
height: 200rpx;
font-size: 16rpx;
font-weight: 300;
position: relative;
border-radius: 15rpx;
overflow: hidden;
}
.image-pic2 {
background-size: cover;
background-repeat: no-repeat;
// background-attachment:fixed;
background-position: center;
border-radius: 15rpx;
}
</style>

351
components/user/user.vue Normal file
View File

@@ -0,0 +1,351 @@
<template>
<view
v-if="openModal"
class="wx-modal"
>
<view
class="wam__mask"
@touchmove.prevent="closeModal"
@tap.stop="closeModal"
></view>
<!-- 内容区域 -->
<view class="wam__wrapper dd-glass">
<!-- 关闭按钮 -->
<!-- <view class="wam__close-btn" @tap.stop="closeModal">
<text class="tn-icon-close"></text>
</view> -->
<view class="tn-flex tn-flex-col-top" :style="{paddingTop: vuex_custom_bar_height - 40 +'px'}">
<view class="tn-padding-bottom">
<view class="logo-pic">
<view class="logo-image" style="background-image:url('https://resource.tuniaokj.com/images/flower/guye1.jpg');width: 90rpx;height: 90rpx;background-size: cover;overflow: hidden;">
</view>
</view>
<!-- <view class="tn-icon-fire tn-color-red" style="position: absolute;margin: -105rpx 0 0 72rpx;border-radius: 100rpx;padding: 5rpx;"></view> -->
</view>
<view class="tn-padding-left-sm" style="width: 100%;">
<view class="tn-padding-top-xs">
<text class="tn-text-bold tn-text-lg">抓住那只猪</text>
</view>
<view class="tn-flex tn-flex-row-between tn-flex-col-between tn-padding-top-xs">
<view class="justify-content-item">
<text class="tn-text-sm">眼里有光,世界将为你亮起!</text>
</view>
<view class="justify-content-item tn-round tn-text-xs tn-color-gray--light">
<!-- <text class="tn-padding-right-xs"></text> 预留 -->
</view>
</view>
</view>
</view>
<scroll-view scroll-y="true" style="max-height: 70vh;margin: 20rpx 0;">
<view class="tn-margin-top-sm" style="border-radius: 24rpx;color: #1D1F24;">
<view class="tn-flex tn-flex-row-between tn-flex-col-center" v-for="(item,index) in app" :key="index" @click="tn('')" style="padding: 30rpx 10rpx;">
<view class="justify-content-item tn-flex tn-flex-col-center">
<view class="app-pic">
<view class="app-image" :style="'background-image:url(' + item.mainImage + ');background-size: cover;'">
</view>
</view>
<view class="tn-padding-left-xs clamp-text-1">{{ item.title }}</view>
</view>
<view class="justify-content-item">
<text class="tn-icon-right"></text>
</view>
</view>
</view>
<view class="tn-padding-bottom">
</view>
</scroll-view>
<!-- 悬浮按钮-->
<!-- <view class="tn-flex tn-footerfixed">
<view class="tn-flex-1 justify-content-item tn-text-center">
<tn-button backgroundColor="$brand-primary" padding="40rpx 0" width="100%" :fontSize="28" fontColor="#FFFFFF" shape="round" @click="tn('')">
<text class="">添加应用</text>
</tn-button>
</view>
</view> -->
</view>
</view>
</template>
<script>
export default {
options: {
// 在微信小程序中将组件节点渲染为虚拟节点,更加接近Vue组件的表现(不会出现shadow节点下再去创建元素)
virtualHost: true
},
props: {
value: {
type: Boolean,
default: false
}
},
data() {
return {
openModal: false,
app: [
{
title: '蛋仔派对',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/jpeg/280373/1716013944651-assets/web-upload/32eafb0d-1e25-452b-9ad9-d14c18ec90f6.jpeg',
},
{
title: '保卫萝卜',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
title: '旅行青蛙',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/jpeg/280373/1716014232876-assets/web-upload/5e1d7c68-048e-4b54-afda-68164a5bebd0.jpeg',
},
{
title: '辐射避难所',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/jpeg/280373/1716025506668-assets/web-upload/b6d123a2-4f1d-46c9-9474-f62a87d05a74.jpeg',
},
{
title: '王国保卫战',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/jpeg/280373/1716025891640-assets/web-upload/8b4440ce-710b-4d3c-afff-5d49e6c7a16a.jpeg',
},
{
title: '崩坏 · 星穹铁道',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/jpeg/280373/1716040399286-assets/web-upload/7a715327-f597-4a8e-ac3c-2ba7ab45b6b9.jpeg',
},
{
title: '纪念碑谷',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/jpeg/280373/1716014593433-assets/web-upload/6e1ba4f3-4757-4693-b827-b8803072c5c9.jpeg',
},
{
title: '蛋仔派对',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/jpeg/280373/1716013944651-assets/web-upload/32eafb0d-1e25-452b-9ad9-d14c18ec90f6.jpeg',
},
{
title: '保卫萝卜',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/png/280373/1715960090731-assets/web-upload/156084cd-aa5a-41dc-98ca-eb681d4afcc5.png',
},
{
title: '旅行青蛙',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/jpeg/280373/1716014232876-assets/web-upload/5e1d7c68-048e-4b54-afda-68164a5bebd0.jpeg',
},
{
title: '辐射避难所',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/jpeg/280373/1716025506668-assets/web-upload/b6d123a2-4f1d-46c9-9474-f62a87d05a74.jpeg',
},
{
title: '王国保卫战',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/jpeg/280373/1716025891640-assets/web-upload/8b4440ce-710b-4d3c-afff-5d49e6c7a16a.jpeg',
},
{
title: '崩坏 · 星穹铁道',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/jpeg/280373/1716040399286-assets/web-upload/7a715327-f597-4a8e-ac3c-2ba7ab45b6b9.jpeg',
},
{
title: '纪念碑谷',
mainImage: 'https://cdn.nlark.com/yuque/0/2024/jpeg/280373/1716014593433-assets/web-upload/6e1ba4f3-4757-4693-b827-b8803072c5c9.jpeg',
},
],
}
},
watch: {
value: {
handler(val) {
this.openModal = val
},
immediate: true
}
},
methods: {
// 跳转
tn(e) {
if (typeof uni !== 'undefined' && uni.vibrateShort) {
uni.vibrateShort({ fail: () => {} });
}
uni.navigateTo({
url: e,
});
},
// 关闭弹框
closeModal() {
this.$emit('input', false)
},
}
}
</script>
<style lang="scss" scoped>
/* 用户头像 start */
.logo-image {
width: 90rpx;
height: 90rpx;
position: relative;
overflow: hidden;
border-radius: 100rpx;
}
.logo-pic {
background-size: cover;
background-repeat: no-repeat;
// background-attachment:fixed;
background-position: top;
border: 6rpx solid rgba(255,255,255,0.6);
box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.1);
border-radius: 100rpx;
overflow: hidden;
// background-color: #FFFFFF;
}
/* 应用头像 start */
.app-image {
width: 40rpx;
height: 40rpx;
position: relative;
overflow: hidden;
border-radius: 50%;
}
.app-pic {
background-size: cover;
background-repeat: no-repeat;
// background-attachment:fixed;
background-position: top;
border: 1rpx solid rgba(255,255,255,0.6);
box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.1);
border-radius: 50%;
overflow: hidden;
// background-color: #FFFFFF;
}
.wx-modal {
position: fixed;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
z-index: 99998 !important;
view {
box-sizing: border-box;
}
.image {
width: 100%;
height: 100%;
border-radius: inherit;
}
.wam {
/* mask */
&__mask {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.2);
opacity: 0;
animation: showMask 0.25s ease 0s forwards;
}
/* close-btn */
&__close-btn {
position: absolute;
top: 30rpx;
right: 30rpx;
z-index: 99999;
font-size: 40rpx;
}
/* wrapper */
&__wrapper {
position: absolute;
left: 0;
top: 0;
width: 64%;
height: 100%;
border-radius: 0rpx;
padding: 20rpx;
padding-top: 60rpx;
padding-bottom: 40rpx;
padding-bottom: calc(constant(safe-area-inset-bottom) + 40rpx);
padding-bottom: calc(env(safe-area-inset-bottom) + 40rpx);
transform-origin: center bottom;
transform: scaleY(0);
animation: showWrapper 0.4s ease 0.05s forwards;
z-index: 99999;
}
}
}
.tn-btn-hover-class {
box-shadow: inset 10rpx 2rpx 40rpx 0rpx rgba(0, 0, 0, 0.05);
}
@keyframes showMask {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes showWrapper {
0% {
transform: translateX(-80vw);
}
100% {
transform: translateX(0vw);
}
}
/* 文字截取*/
.clamp-text-1 {
-webkit-line-clamp: 1;
display: -webkit-box;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
overflow: hidden;
}
.clamp-text-2 {
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
overflow: hidden;
}
/* 毛玻璃*/
.dd-glass {
width: 100%;
backdrop-filter: blur(8rpx);
-webkit-backdrop-filter: blur(8rpx);
// background-color: rgba(255,255,255,0.4);
background: linear-gradient(90deg, #56FFFF80, #FFFFFF80);
border-right: 2rpx solid #e1e1e1e0;
}
/* 底部悬浮按钮 start*/
.tn-footerfixed {
width: 100%;
margin-top: 30rpx;
margin-bottom: calc(60rpx + env(safe-area-inset-bottom) / 2);
margin-bottom: calc(60rpx + constant(safe-area-inset-bottom));
z-index: 1024;
box-shadow: 0 1rpx 6rpx rgba(0, 0, 0, 0);
}
/* 底部悬浮按钮 end*/
</style>