代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html>
<head>
<meta name="screen-orientation" content="portrait">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"/>
<title>年会抽奖小程序</title>
<link rel="stylesheet" type="text/css" href="css/reset.css">
<link rel="stylesheet" type="text/css" href="css/wall.css">
<style type="text/css">
.wall {
overflow: scroll;
background-repeat: repeat;
}
::-webkit-scrollbar {
display: none;
}
body, html {
width: 100%;
height: 100%;
}
.mask {
-webkit-filter:blur(5px);
filter:blur(5px);
}
#main {
-webkit-transition: all 1s;
transition: all 1s;
}
.result-list {
text-align: center;
color: #4de7c8;
font-size: 30px;
line-height: 50px;
margin-top: 50px;
margin-bottom: 50px;
font-family: '幼圆';
}
.result-title {
text-align: center;
color: #4de7c8;
font-size: 40px;
margin-top: 100px;
font-family: '幼圆';
}
</style>
</head>
<body>
<div id="main" class="wall">
<div class="result-title">获奖名单</div>
<div class="result-list" v-for="result in results">
<div v-for="item in result">
{{item}}
</div>
</div>
</div>
<script type="text/javascript" src="js/vue.js"></script>
<script type="text/javascript">
new Vue({
el: '#main',
data: {
results: []
},
mounted () {
let vm = this
let locals = window.localStorage
let str_results = []
// 遍历(排除choosed)
for(let i = 0; i<localStorage.length; i++){
if (localStorage.key(i) !== 'choosed') {
str_results.push(localStorage.getItem(localStorage.key(i)))
}
}
// 分割每个string, 并将</br>换成空格
let results = []
for(let nameList of str_results) {
let temp = JSON.parse(nameList)
temp = temp.map(item => {return item.replace('<br/>', ' ')})
results.push(temp)
}
// 根据长度进行排序,名单短的放在前面
results = results.sort((x, y) => { return x.length - y.length;})
this.results = results
},
})
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。