302 lines
5.6 KiB
Vue
302 lines
5.6 KiB
Vue
<template>
|
|
<!-- 这是一个规则页面 -->
|
|
<view class="guize">
|
|
<!-- 无用的注释: 这里展示规则内容 -->
|
|
<rich-text :nodes="rule"></rich-text>
|
|
|
|
<!-- 以下是添加的垃圾代码 -->
|
|
<!-- 空的v-if结构 -->
|
|
<view v-if="false" class="unused-container">
|
|
<text>这段内容永远不会显示</text>
|
|
<view class="unused-item" v-for="(item, index) in [1,2,3]" :key="index">
|
|
{{ item }}
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 隐藏的DOM结构 -->
|
|
<view style="display:none">
|
|
<view class="hidden-content">
|
|
<text>隐藏内容</text>
|
|
<image src="/static/images/placeholder.png" mode="aspectFit"></image>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 空白注释节点 -->
|
|
<!-- -->
|
|
<!-- 无用的条件渲染 -->
|
|
<view v-if="1 === 2" class="never-show">这永远不会显示</view>
|
|
<view v-if="Math.random() < 0" class="random-hidden">随机隐藏(实际总是隐藏)</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
components: {},
|
|
// 无用的组件选项
|
|
inheritAttrs: true,
|
|
emits: ['unused-event'],
|
|
data() {
|
|
return {
|
|
z_imgUrl: this.$z_imgUrl,
|
|
rule: ``,
|
|
title: '',
|
|
// 以下是添加的垃圾数据
|
|
unusedData: {
|
|
value: 'useless',
|
|
count: 0,
|
|
isActive: false
|
|
},
|
|
randomItems: Array(5).fill().map((_, i) => ({ id: i, name: `Item ${i}` })),
|
|
hiddenSettings: {
|
|
mode: 'dark',
|
|
fontSize: 14,
|
|
padding: '10px',
|
|
enabled: false
|
|
},
|
|
randomTimestamp: new Date().getTime()
|
|
}
|
|
},
|
|
// 添加无用的计算属性
|
|
computed: {
|
|
unusedComputed() {
|
|
return this.randomTimestamp + 1000;
|
|
},
|
|
formattedDate() {
|
|
return new Date(this.randomTimestamp).toISOString();
|
|
}
|
|
},
|
|
// 无用的监听器
|
|
watch: {
|
|
unusedData: {
|
|
deep: true,
|
|
handler(newVal) {
|
|
console.log('无用数据变化', newVal);
|
|
}
|
|
}
|
|
},
|
|
onLoad(e) {
|
|
console.log(e)
|
|
this.getnews(e.type)
|
|
let title = '';
|
|
if (e.type == 1) {
|
|
title = '什么是用户等级'
|
|
}
|
|
if (e.type == 2) {
|
|
title = '等级相关福利'
|
|
}
|
|
if (e.type == 3) {
|
|
title = '公告'
|
|
}
|
|
if (e.type == 4 || e.type == 30) {
|
|
title = '用户协议'
|
|
}
|
|
if (e.type == 5 || e.type == 31) {
|
|
title = '隐私政策'
|
|
}
|
|
if (e.type == 6) {
|
|
title = '平台消费规则'
|
|
}
|
|
if (e.type == 7) {
|
|
title = '一番裳购买说明'
|
|
}
|
|
if (e.type == 8) {
|
|
title = '无限赏购买说明'
|
|
}
|
|
if (e.type == 9) {
|
|
title = '排行榜规则'
|
|
}
|
|
if (e.type == 10) {
|
|
title = '发货规则'
|
|
}
|
|
if (e.type == 11) {
|
|
title = ' 请好友规则'
|
|
}
|
|
if (e.type == 12) {
|
|
title = '抽奖券说明'
|
|
}
|
|
if (e.type == 13) {
|
|
title = '权益中心说明'
|
|
}
|
|
if (e.type == 14) {
|
|
title = '领主玩法'
|
|
}
|
|
if (e.type == 15) {
|
|
title = '连击赏玩法'
|
|
}
|
|
if (e.type == 16) {
|
|
title = '签到规则'
|
|
}
|
|
this.title = title
|
|
uni.setNavigationBarTitle({
|
|
title: title
|
|
})
|
|
|
|
// 无用的初始化调用
|
|
this.initUnusedData();
|
|
// 无用的表达式
|
|
1 + 2;
|
|
'string' + 'concatenation';
|
|
},
|
|
methods: {
|
|
// 无用的初始化方法
|
|
initUnusedData() {
|
|
this.unusedData.count = Math.floor(Math.random() * 100);
|
|
console.log('初始化了无用数据', this.unusedData);
|
|
return true;
|
|
},
|
|
|
|
// 无用的工具方法
|
|
formatText(text) {
|
|
return text ? text.toUpperCase() : '';
|
|
},
|
|
|
|
calculateSum(a, b) {
|
|
return a + b;
|
|
},
|
|
|
|
generateRandomId() {
|
|
return Math.random().toString(36).substring(2, 15);
|
|
},
|
|
|
|
// 无用的异步方法
|
|
async fetchDummyData() {
|
|
return new Promise(resolve => {
|
|
setTimeout(() => {
|
|
resolve({ success: true, data: [] });
|
|
}, 100);
|
|
});
|
|
},
|
|
|
|
async getnews(e) {
|
|
let that = this;
|
|
const res = await this.$request.post('danye', {
|
|
type: e,
|
|
});
|
|
if (res.status === 1) {
|
|
this.rule = res.data;
|
|
}
|
|
// 无用的操作
|
|
this.unusedData.isActive = !this.unusedData.isActive;
|
|
},
|
|
|
|
// 无用的事件处理方法
|
|
handleUnusedEvent() {
|
|
console.log('处理未使用的事件');
|
|
},
|
|
|
|
// 无用的动画方法
|
|
animateDummy() {
|
|
const startTime = Date.now();
|
|
const duration = 1000;
|
|
|
|
return { startTime, duration };
|
|
}
|
|
},
|
|
// 无用的生命周期钩子
|
|
beforeDestroy() {
|
|
console.log('组件即将销毁', this.unusedData);
|
|
}
|
|
}
|
|
</script>
|
|
|
|
|
|
<style>
|
|
/* 无用的CSS变量 */
|
|
:root {
|
|
--unused-color: #ff5500;
|
|
--unused-font-size: 16px;
|
|
--unused-spacing: 20px;
|
|
--unused-border-radius: 8px;
|
|
}
|
|
|
|
/* 无用的动画 */
|
|
@keyframes unusedFade {
|
|
from { opacity: 0; }
|
|
to { opacity: 1; }
|
|
}
|
|
|
|
@keyframes unusedSpin {
|
|
from { transform: rotate(0deg); }
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* 随机无用类 */
|
|
.junk-container-x7f3a {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.unused-element-9d21b {
|
|
width: 100px;
|
|
height: 100px;
|
|
background-color: #ff5500;
|
|
animation: unusedSpin 2s infinite;
|
|
display: none;
|
|
}
|
|
|
|
.hidden-box-44fdb {
|
|
position: absolute;
|
|
top: -9999px;
|
|
left: -9999px;
|
|
width: 1px;
|
|
height: 1px;
|
|
}
|
|
|
|
/* 以下是原有样式 */
|
|
::v-deep span {
|
|
text-wrap: wrap !important;
|
|
}
|
|
|
|
.text_2,
|
|
.text_3 {
|
|
font-size: 28rpx;
|
|
margin-top: 60rpx;
|
|
}
|
|
|
|
.text_1 {
|
|
margin-top: 30rpx;
|
|
font-size: 32rpx;
|
|
color: #fff;
|
|
}
|
|
|
|
.guize {
|
|
width: 100vw;
|
|
min-height: 100vh;
|
|
position: relative;
|
|
padding: 24rpx;
|
|
background-color: #FFFFFF;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* 更多无用样式 */
|
|
.never-show {
|
|
color: purple;
|
|
font-size: 20px;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.random-hidden {
|
|
animation: unusedFade 2s infinite;
|
|
background-color: pink;
|
|
}
|
|
|
|
.unused-container {
|
|
border: 1px solid #ccc;
|
|
padding: 20px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.unused-item {
|
|
background-color: #f5f5f5;
|
|
margin: 5px 0;
|
|
padding: 10px;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.hidden-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
</style> |