|
@@ -1,36 +1,219 @@
|
|
|
<template>
|
|
|
-<div class='My'>悦·互动</div>
|
|
|
+ <div class='My'>
|
|
|
+ <!-- 输入框 -->
|
|
|
+ <div class="inputBox" @keydown.enter="searchFu()">
|
|
|
+ <div class="searInco">
|
|
|
+ <van-icon name="search" />
|
|
|
+ </div>
|
|
|
+ <div class="searBtn" @click="searchFu()">搜索</div>
|
|
|
+ <van-field maxlength="10" v-model="txt" placeholder="请输入要搜索的内容" />
|
|
|
+ </div>
|
|
|
+ <!-- 精彩必体验 -->
|
|
|
+ <div class="titleTit">精彩必体验</div>
|
|
|
+ <div class="bsBox">
|
|
|
+ <div v-for="item in bsData" :key="item.id">{{ item.name }}</div>
|
|
|
+ </div>
|
|
|
+ <!-- 主体内容 -->
|
|
|
+ <div class="mainBox">
|
|
|
+ <div class="row" v-for="item in spotData" :key="item.id">
|
|
|
+ <img :src="require(`@/assets/img/interact/row${item.id}.png`)" alt="">
|
|
|
+ <div class="name">{{ item.name }}</div>
|
|
|
+ <div class="author">
|
|
|
+ <div class="author_ll">
|
|
|
+ <img src="../../assets/img/interact/user.png" alt="" />
|
|
|
+ <span>{{ item.author }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="author_rr">{{ item.time }}</div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- +号 -->
|
|
|
+ <div class="issue">
|
|
|
+ <img src="../../assets/img/interact/issue.png" alt="" />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
export default {
|
|
|
-components: {},
|
|
|
-data() {
|
|
|
-return {
|
|
|
-
|
|
|
-};
|
|
|
-},
|
|
|
-computed: {},
|
|
|
-watch: {},
|
|
|
-methods: {
|
|
|
-
|
|
|
-},
|
|
|
-created() {
|
|
|
-
|
|
|
-},
|
|
|
-mounted() {
|
|
|
-
|
|
|
-},
|
|
|
-beforeCreate() {}, //生命周期 - 创建之前
|
|
|
-beforeMount() {}, //生命周期 - 挂载之前
|
|
|
-beforeUpdate() {}, //生命周期 - 更新之前
|
|
|
-updated() {}, //生命周期 - 更新之后
|
|
|
-beforeDestroy() {}, //生命周期 - 销毁之前
|
|
|
-destroyed() {}, //生命周期 - 销毁完成
|
|
|
-activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
+ components: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ txt: '',
|
|
|
+ bsData: [
|
|
|
+ { id: 1, name: '梦幻游乐王国' },
|
|
|
+ { id: 2, name: '古建筑' },
|
|
|
+ { id: 3, name: '美食' },
|
|
|
+ { id: 4, name: '周边风景游玩' },
|
|
|
+ { id: 5, name: '美景' },
|
|
|
+ ],
|
|
|
+ spotData: [
|
|
|
+ { id: 1, name: '方特梦幻王国万圣夜', author: '王大锤', time: '2022-11-16' },
|
|
|
+ { id: 2, name: '芜湖老海关', author: '王大锤', time: '2022-11-16' },
|
|
|
+ { id: 3, name: '中江塔', author: '王大锤', time: '2022-11-16' },
|
|
|
+ { id: 4, name: '鸠兹古镇', author: '王大锤', time: '2022-11-16' },
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {},
|
|
|
+ watch: {},
|
|
|
+ methods: {
|
|
|
+ searchFu() {
|
|
|
+ console.log('---------');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+
|
|
|
+ },
|
|
|
+ beforeCreate() { }, //生命周期 - 创建之前
|
|
|
+ beforeMount() { }, //生命周期 - 挂载之前
|
|
|
+ beforeUpdate() { }, //生命周期 - 更新之前
|
|
|
+ updated() { }, //生命周期 - 更新之后
|
|
|
+ beforeDestroy() { }, //生命周期 - 销毁之前
|
|
|
+ destroyed() { }, //生命周期 - 销毁完成
|
|
|
+ activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
}
|
|
|
</script>
|
|
|
<style lang='less' scoped>
|
|
|
+.My {
|
|
|
+ width: 100%;
|
|
|
+ height: calc(100% - 80px);
|
|
|
+ overflow-y: auto;
|
|
|
+ padding: 20px 15px;
|
|
|
+ position: relative;
|
|
|
+ .issue{
|
|
|
+ margin: 20px 0;
|
|
|
+ text-align: center;
|
|
|
+ &>img{
|
|
|
+ width: 40px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .inputBox {
|
|
|
+ margin: 0px auto;
|
|
|
+ width: 100%;
|
|
|
+ height: 30px;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ .searBtn {
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ top: 0;
|
|
|
+ width: 40px;
|
|
|
+ height: 30px;
|
|
|
+ border-radius: 3px;
|
|
|
+ z-index: 2;
|
|
|
+ background-color: #FE6E69;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #fff;
|
|
|
+ line-height: 30px;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .searInco {
|
|
|
+ color: #A0A0A0;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 16px;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 10px;
|
|
|
+ z-index: 3;
|
|
|
+ width: 20px;
|
|
|
+ height: 30px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/.van-cell {
|
|
|
+ width: 100%;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
+ padding: 0px 0 0px 36px;
|
|
|
+ background-color: #F4F4F4;
|
|
|
+ border-radius: 15px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .titleTit {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 700;
|
|
|
+ margin: 15px 0;
|
|
|
+ color: #000000;
|
|
|
+ }
|
|
|
+
|
|
|
+ .bsBox {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+
|
|
|
+ &>div {
|
|
|
+ text-align: center;
|
|
|
+ min-width: 60px;
|
|
|
+ padding: 0 5px;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
+ border-radius: 2px;
|
|
|
+ background-color: #F4F4F4;
|
|
|
+ margin: 0 15px 15px 0;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #333333;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ .mainBox {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+
|
|
|
+ .row {
|
|
|
+ margin-right: 4%;
|
|
|
+ margin-bottom: 4%;
|
|
|
+ overflow: hidden;
|
|
|
+ width: 48%;
|
|
|
+ height: 260px;
|
|
|
+ background-color: #F7F8FA;
|
|
|
+ border-radius: 4px;
|
|
|
+ color: #333333;
|
|
|
+
|
|
|
+ &:nth-of-type(2n) {
|
|
|
+ margin-right: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ &>img {
|
|
|
+ width: 100%;
|
|
|
+ height: 180px;
|
|
|
+ object-fit: cover;
|
|
|
+ }
|
|
|
+
|
|
|
+ .name {
|
|
|
+ padding: 10px 10px 5px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 700;
|
|
|
+ }
|
|
|
+
|
|
|
+ .author {
|
|
|
+ margin-top: 12px;
|
|
|
+ padding: 0 10px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ font-size: 12px;
|
|
|
+
|
|
|
+ .author_ll {
|
|
|
+ vertical-align: middle;
|
|
|
+
|
|
|
+ &>img {
|
|
|
+ margin-right: 5px;
|
|
|
+ width: 12px;
|
|
|
+ height: 12px;
|
|
|
+ border-radius: 50%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|