weixin_52219567 1 lună în urmă
părinte
comite
8802e11c16
4 a modificat fișierele cu 70 adăugiri și 1 ștergeri
  1. 27 0
      src/api/home/diy.ts
  2. 2 1
      src/permission.ts
  3. 6 0
      src/router/index.ts
  4. 35 0
      src/views/home/diy.vue

+ 27 - 0
src/api/home/diy.ts

@@ -8,3 +8,30 @@ export function getPlatformIndexDiyPcPage(query: any) {
     params: query
   });
 }
+
+//咨询
+export function getAnnouncementPage(query: any) {
+  return request({
+    url: '/system/diySystem/getAnnouncementPage',
+    method: 'get',
+    params: query
+  });
+}
+
+//商品
+export function getDiyProductPage(query: any) {
+  return request({
+    url: '/product/diyProduct/getDiyProductPage',
+    method: 'get',
+    params: query
+  });
+}
+
+//商品
+export function getServiceCaseList(query: any) {
+  return request({
+    url: '/product/diyProduct/getServiceCaseList',
+    method: 'get',
+    params: query
+  });
+}

+ 2 - 1
src/permission.ts

@@ -25,7 +25,8 @@ const whiteList = [
   '/search',
   '/item',
   '/breg',
-  '/greg'
+  '/greg',
+  '/diy'
 ];
 
 const isWhiteList = (path: string) => {

+ 6 - 0
src/router/index.ts

@@ -86,6 +86,12 @@ export const constantRoutes: RouteRecordRaw[] = [
         name: 'IndexFuli',
         meta: { title: '福礼商城', icon: 'dashboard', affix: true, nav: true }
       },
+      {
+        path: '/diy',
+        component: () => import('@/views/home/diy.vue'),
+        name: 'IndexDiy',
+        meta: { title: 'Diy商城', icon: 'dashboard', affix: true, nav: true }
+      },
       {
         path: '/indexData',
         component: () => import('@/views/home/index-data.vue'),

+ 35 - 0
src/views/home/diy.vue

@@ -0,0 +1,35 @@
+<template>
+  <div class="pay-pages"></div>
+</template>
+
+<script setup lang="ts">
+import { getAnnouncementPage, getDiyProductPage, getServiceCaseList,getPlatformIndexDiyPcPage } from '@/api/home/diy';
+
+getAnnouncementPage({
+  pageNum: 1,
+  pageSize: 10,
+  ids: '1,2,3'
+}).then((res) => {
+  if (res.code == 200) {
+    // carouselList.value = res.data;
+  }
+});
+getDiyProductPage({ pageNum: 1, pageSize: 10, ids: '434643,434645' }).then((res) => {
+  if (res.code == 200) {
+    // carouselList.value = res.data;
+  }
+});
+getServiceCaseList({ pageNum: 1, pageSize: 10, ids: '1031,1032' }).then((res) => {
+  if (res.code == 200) {
+    // carouselList.value = res.data;
+  }
+});
+
+getPlatformIndexDiyPcPage({}).then((res) => {
+  if (res.code == 200) {
+    // carouselList.value = res.data;
+  }
+});
+</script>
+
+<style lang="scss" scoped></style>