Commit 740d6328 authored by 王晓旭's avatar 王晓旭

站点编排添加背景修改

parent 6f64534a
<template> <template>
<div class="station w-full h-auto flex flex-col justify-between"> <div class="station w-full h-auto flex flex-col justify-between"
:style="{ backgroundImage: `url(${imgUrl})` }">
<!-- 删除常用 --> <!-- 删除常用 -->
<div class="del-box" :class="['del-box', { active: isDel }]"> <div class="del-box" :class="['del-box', { active: isDel }]">
<draggable <draggable
...@@ -130,6 +131,7 @@ ...@@ -130,6 +131,7 @@
<script> <script>
import { appsListInterface, getCollect, saveCollect } from "@/api/siteArrange"; import { appsListInterface, getCollect, saveCollect } from "@/api/siteArrange";
import { getSlogan } from "@/api/user.js";
import Storage from "@/utils/js/Storage"; import Storage from "@/utils/js/Storage";
import { mapState } from "vuex"; import { mapState } from "vuex";
export default { export default {
...@@ -146,6 +148,7 @@ export default { ...@@ -146,6 +148,7 @@ export default {
placeholder: "将模块拖到此处删除", placeholder: "将模块拖到此处删除",
delList: [], delList: [],
isDel: false, isDel: false,
imgUrl: "",
}; };
}, },
...@@ -159,9 +162,21 @@ export default { ...@@ -159,9 +162,21 @@ export default {
: ""; : "";
this.getCollect(); this.getCollect();
this.appsListInterface(); this.appsListInterface();
this.getTitle();
}, },
methods: { methods: {
getTitle() {
getSlogan("siteImg").then((res) => {
if (res.code == 1) {
res.data
? (this.imgUrl = res.data)
: (this.imgUrl = require("@/assets/images/siteArrange/bg_3.jpg"));
} else {
this.imgUrl = require("@/assets/images/siteArrange/bg_3.jpg");
}
});
},
// 获取用户常用站点列表 // 获取用户常用站点列表
async getCollect() { async getCollect() {
let res = await getCollect({ let res = await getCollect({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment