wenhongquan 3 жил өмнө
parent
commit
157e090fa6

BIN
src/assets/images/bg.png


+ 2 - 1
src/components/Breadcrumb/index.vue

@@ -18,10 +18,11 @@ const levelList = ref([])
 function getBreadcrumb() {
   // only show routes with meta.title
   let matched = route.matched.filter(item => item.meta && item.meta.title);
+  console.log(matched)
   const first = matched[0]
   // 判断是否为首页
   if (!isDashboard(first)) {
-    matched = [{ path: '/index', meta: { title: '首页' } }].concat(matched)
+    matched = [].concat(matched)
   }
 
   levelList.value = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)

+ 11 - 8
src/router/index.js

@@ -60,14 +60,17 @@ export const constantRoutes = [{
     {
         path: "",
         component: Layout,
-        redirect: "/index",
-        children: [{
-            path: "/index",
-            component: () =>
-                import ("@/views/index"),
-            name: "Index",
-            meta: { title: "首页", icon: "dashboard", affix: true },
-        }, ],
+        hidden: true,
+        redirect: "/task/list/1",
+        children: [
+            // {
+            //     path: "/index",
+            //     component: () =>
+            //         import ("@/views/index"),
+            //     name: "Index",
+            //     meta: { title: "首页", icon: "dashboard", affix: true },
+            // },
+        ],
     },
     {
         path: "/task",

+ 9 - 6
src/views/mb/home/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="mbhome">
      <div class="headerpic">
-        <img src="http://gimg1.baidu.com/searchbox_feed/app=2001&g=4n&n=0&q=85&refer=http%3A%2F%2Fwww.baidu.com&size=f9999_10000&src=http%3A%2F%2Fcontentcms-bj.cdn.bcebos.com%2Fcmspic%2F2630adecb9edc231a9d7a583aecbd7be.jpeg%3Fx-bce-process%3Dimage%2Fcrop%2Cx_0%2Cy_0%2Cw_1242%2Ch_699?sec=0&t=36e419603fa30a788071b99471e4b65a"/>
+
      </div>
      <div class="body">
        <div class="an">
@@ -41,16 +41,19 @@ body{
 }
 .mbhome{
   .headerpic{
-    img{
-      width:100vw;
-      object-fit: contain;
-    }
+    width: 100vw;
+    height: 40vh;
+    background: url('@/assets/images/bg.png');
+    background-size: cover;
+    background-position-x: -74vw;
+    background-position-y: -11vw;
+    background-repeat: no-repeat;
   }
   .body{
     .an{
       width:100%;
       text-align: center;
-      margin-top: 60px;
+      margin-top: 40px;
       position: relative;
       .van-button{
         width:80%;

+ 3 - 3
src/views/mb/task/index.vue

@@ -90,15 +90,15 @@ const { task_status, task_event_category, task_event_type } = useDict(
 const bodyheight = ref(0);
 bodyheight.value = document.body.clientHeight - 48 - 46;
 const value1 = ref(0);
-const value2 = ref("1");
+const value2 = ref("0");
 const option1 = [
   { text: "我的", value: 0 },
   { text: "全部", value: 1 },
 ];
 const option2 = computed(() => {
-  return task_status.value.map((i) => {
+  return [{ text: "全部", value: "0" }].concat(task_status.value.map((i) => {
     return { text: i.label, value: i.value };
-  });
+  }));
 });
 
 const pagec = ref(1);