|
@@ -10,15 +10,20 @@
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="main">
|
|
|
- <div class="item" v-for="item,index in list" :key="index">
|
|
|
+ <div
|
|
|
+ class="item"
|
|
|
+ @click="() => toH5Editor(item)"
|
|
|
+ v-for="(item, index) in list"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
<component :is="components[item.type]" :item="item"></component>
|
|
|
<div class="main_item" v-text="item.title"></div>
|
|
|
<div class="body">
|
|
|
- <img style="width: 20px;float: left;" :src="defaultIcon" />
|
|
|
- <span>
|
|
|
- <img style="width: 20px;" :src="eyeIcon" />
|
|
|
- <span style="vertical-align: middle;" v-text="item.hot"></span>
|
|
|
- </span>
|
|
|
+ <img style="width: 20px; float: left" :src="defaultIcon" />
|
|
|
+ <span>
|
|
|
+ <img style="width: 20px" :src="eyeIcon" />
|
|
|
+ <span style="vertical-align: middle" v-text="item.hot"></span>
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -27,20 +32,20 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { ref } from 'vue';
|
|
|
-// import { useRouter, useRoute } from 'vue-router';
|
|
|
-import defaultIcon from "../../assets/img/default_user.png";
|
|
|
-import eyeIcon from "../../assets/img/eye.png"
|
|
|
-import H5 from "./components/H5.vue";
|
|
|
-import LONGPAGE from "./components/LONGPAGE.vue";
|
|
|
-import POSTER from "./components/POSTER.vue";
|
|
|
+import { useRouter } from 'vue-router';
|
|
|
+import defaultIcon from '../../assets/img/default_user.png';
|
|
|
+import eyeIcon from '../../assets/img/eye.png';
|
|
|
+import H5 from './components/H5.vue';
|
|
|
+import LONGPAGE from './components/LONGPAGE.vue';
|
|
|
+import POSTER from './components/POSTER.vue';
|
|
|
import { getH5Mall } from '../../api/index.js';
|
|
|
|
|
|
const components = {
|
|
|
- H5,
|
|
|
- LONGPAGE,
|
|
|
- POSTER
|
|
|
-}
|
|
|
-// const router = useRouter();
|
|
|
+ H5,
|
|
|
+ LONGPAGE,
|
|
|
+ POSTER,
|
|
|
+};
|
|
|
+const router = useRouter();
|
|
|
// const route = useRoute();
|
|
|
|
|
|
const searchText = ref('');
|
|
@@ -49,6 +54,15 @@ const list = ref([]);
|
|
|
getH5Mall({}).then(r => {
|
|
|
list.value = r.list || [];
|
|
|
});
|
|
|
+
|
|
|
+const toH5Editor = item => {
|
|
|
+ router.push({
|
|
|
+ path: '/h5editor',
|
|
|
+ query: {
|
|
|
+ item: JSON.stringify(item),
|
|
|
+ },
|
|
|
+ });
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
@@ -85,44 +99,50 @@ getH5Mall({}).then(r => {
|
|
|
color: var(--el-border-color);
|
|
|
}
|
|
|
|
|
|
-.main{
|
|
|
- font-weight: 500;
|
|
|
- margin-top: 1em;
|
|
|
- padding: 1em 0 1em 1em;
|
|
|
+.main {
|
|
|
+ font-weight: 500;
|
|
|
+ margin-top: 1em;
|
|
|
+ padding: 1em 0 1em 1em;
|
|
|
}
|
|
|
|
|
|
.main .item {
|
|
|
- display: inline-block;
|
|
|
- width: 184px;
|
|
|
- height: 363px;
|
|
|
- transition: all .3s;
|
|
|
- border-radius: 2px;
|
|
|
- vertical-align: middle;
|
|
|
- margin-right: 1em;
|
|
|
- border-radius: 5px;
|
|
|
- overflow: hidden;
|
|
|
+ display: inline-block;
|
|
|
+ width: 184px;
|
|
|
+ height: 363px;
|
|
|
+ transition: all 0.3s;
|
|
|
+ border-radius: 2px;
|
|
|
+ vertical-align: middle;
|
|
|
+ margin-right: 1em;
|
|
|
+ border-radius: 5px;
|
|
|
+ overflow: hidden;
|
|
|
+ cursor: pointer;
|
|
|
+ box-shadow: var(--el-box-shadow-lighter);
|
|
|
}
|
|
|
|
|
|
-.main_item{
|
|
|
- color: #666;
|
|
|
- padding: 0 5px;
|
|
|
- margin: 5px 0;
|
|
|
- font-size: 14px;
|
|
|
- overflow: hidden;
|
|
|
- white-space: nowrap;
|
|
|
- text-overflow: ellipsis;
|
|
|
+.el-image {
|
|
|
+ height: 280px;
|
|
|
+}
|
|
|
+
|
|
|
+.main_item {
|
|
|
+ color: #666;
|
|
|
+ padding: 0 5px;
|
|
|
+ margin: 5px 0;
|
|
|
+ font-size: 14px;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
}
|
|
|
|
|
|
-.main .item:hover{
|
|
|
- box-shadow: var(--el-box-shadow);
|
|
|
- margin-top: -15px;
|
|
|
+.main .item:hover {
|
|
|
+ box-shadow: var(--el-box-shadow);
|
|
|
+ margin-top: -15px;
|
|
|
}
|
|
|
|
|
|
-.main .body{
|
|
|
- padding: 0 5px;
|
|
|
- text-align: right;
|
|
|
+.main .body {
|
|
|
+ padding: 0 5px;
|
|
|
+ text-align: right;
|
|
|
}
|
|
|
-.main img{
|
|
|
- vertical-align: middle;
|
|
|
+.main img {
|
|
|
+ vertical-align: middle;
|
|
|
}
|
|
|
</style>
|