Browse Source

列表页,公共样式,按钮

gdy96 4 years ago
parent
commit
aff386b7c7

+ 68 - 36
src/api/index.ts

@@ -1,4 +1,4 @@
-import { AxiosPromise } from "axios";
+import {AxiosPromise} from "axios";
 import axios from "./config";
 import axios from "./config";
 
 
 // NOTE: 暂时使用ts-ignore忽略module not exported的问题
 // NOTE: 暂时使用ts-ignore忽略module not exported的问题
@@ -22,7 +22,7 @@ import {
   AdGroupData,
   AdGroupData,
   AdgroupList,
   AdgroupList,
   IUserAdmin,
   IUserAdmin,
-  AccountPlanConfig
+  AccountPlanConfig,
 } from "@/types/api";
 } from "@/types/api";
 
 
 /**
 /**
@@ -43,10 +43,10 @@ export const getDeliveryBookList = (
     official_name: string;
     official_name: string;
     book_name: string;
     book_name: string;
     page: number;
     page: number;
-  }> = { page: 1 }
+  }> = {page: 1}
 ): AxiosPromise<IList<IDeliveryBook>> => {
 ): AxiosPromise<IList<IDeliveryBook>> => {
   return axios("/getUserDeliveryBooks", {
   return axios("/getUserDeliveryBooks", {
-    params: query
+    params: query,
   });
   });
 };
 };
 
 
@@ -66,7 +66,7 @@ export const getBooksByName = (
   key_word: string,
   key_word: string,
   page = 1
   page = 1
 ): AxiosPromise<IList<IBookSearchResult>> => {
 ): AxiosPromise<IList<IBookSearchResult>> => {
-  return axios("/searchBooks", { params: { key_word, page } });
+  return axios("/searchBooks", {params: {key_word, page}});
 };
 };
 
 
 /**
 /**
@@ -79,9 +79,9 @@ export const getAdPushList = (
     account_id: string;
     account_id: string;
     advertiser_id: string;
     advertiser_id: string;
     page: number;
     page: number;
-  }> = { page: 1 }
+  }> = {page: 1}
 ): AxiosPromise<IList<ADpushSimple>> => {
 ): AxiosPromise<IList<ADpushSimple>> => {
-  return axios("/ad/userAdAdvertisers", { params: query });
+  return axios("/ad/userAdAdvertisers", {params: query});
 };
 };
 
 
 /**
 /**
@@ -93,7 +93,7 @@ export const getOfficialAccounts = (query: {
   platform: string;
   platform: string;
   page: number;
   page: number;
 }): AxiosPromise<IList<IOfficials>> => {
 }): AxiosPromise<IList<IOfficials>> => {
-  return axios("/userOfficialAccounts", { params: query });
+  return axios("/userOfficialAccounts", {params: query});
 };
 };
 
 
 /**
 /**
@@ -110,9 +110,9 @@ export const getADPlanlist = (
     end_date: any;
     end_date: any;
     cost_order: number;
     cost_order: number;
     page: number;
     page: number;
-  }> = { page: 1 }
+  }> = {page: 1}
 ): AxiosPromise<IList<ADPlanItem>> => {
 ): AxiosPromise<IList<ADPlanItem>> => {
-  return axios("/ad/adData", { params: query });
+  return axios("/ad/adData", {params: query});
 };
 };
 
 
 /**
 /**
@@ -126,9 +126,9 @@ export const getDeliveryStatList = (
     book_name: string;
     book_name: string;
     page: number;
     page: number;
     day_num: number;
     day_num: number;
-  }> = { page: 1 }
+  }> = {page: 1}
 ): AxiosPromise<any> => {
 ): AxiosPromise<any> => {
-  return axios("/delivery/stat", { params: query });
+  return axios("/delivery/stat", {params: query});
 };
 };
 
 
 /*
 /*
@@ -162,7 +162,7 @@ export const logout = () => {
  * @param id 记录id
  * @param id 记录id
  */
  */
 export const onStopDeliveryBook = (id: number) => {
 export const onStopDeliveryBook = (id: number) => {
-  return axios("/stopDeliveryBook", { params: { id } });
+  return axios("/stopDeliveryBook", {params: {id}});
 };
 };
 
 
 /**
 /**
@@ -184,9 +184,9 @@ export const getDeliveryMoreStatList = (
     official_name: string;
     official_name: string;
     book_name: string;
     book_name: string;
     page: number;
     page: number;
-  }> = { page: 1 }
+  }> = {page: 1}
 ): AxiosPromise<IList<any>> => {
 ): AxiosPromise<IList<any>> => {
-  return axios("/delivery/moreStat", { params: query });
+  return axios("/delivery/moreStat", {params: query});
 };
 };
 
 
 /* 广告授权
 /* 广告授权
@@ -235,9 +235,9 @@ export const opertaroLog = (
     end_time: string;
     end_time: string;
     page: number;
     page: number;
     ad_id: string;
     ad_id: string;
-  }> = { page: 1 }
+  }> = {page: 1}
 ): AxiosPromise<IList<adPlanLog>> => {
 ): AxiosPromise<IList<adPlanLog>> => {
-  return axios("/ad/adOptLogs", { params: query });
+  return axios("/ad/adOptLogs", {params: query});
 };
 };
 
 
 /* 获取广告状态
 /* 获取广告状态
@@ -254,7 +254,7 @@ export const getAdplanTable = (query: {
   desc: string;
   desc: string;
   name: string;
   name: string;
 }>> => {
 }>> => {
-  return axios("/ad/adStatFields", { params: query });
+  return axios("/ad/adStatFields", {params: query});
 };
 };
 
 
 //广告计划字段
 //广告计划字段
@@ -265,7 +265,7 @@ export const getAdplanData = (query: {
   ids: string;
   ids: string;
   page: number;
   page: number;
 }): AxiosPromise<any> => {
 }): AxiosPromise<any> => {
-  return axios("/ad/adStats", { params: query });
+  return axios("/ad/adStats", {params: query});
 };
 };
 
 
 //获取计划的回传配置
 //获取计划的回传配置
@@ -273,7 +273,7 @@ export const getAdBackPlan = (query: {
   ad_lid: string;
   ad_lid: string;
   back_platform: string;
   back_platform: string;
 }): AxiosPromise<any> => {
 }): AxiosPromise<any> => {
-  return axios("/getReportConfig", { params: query });
+  return axios("/getReportConfig", {params: query});
 };
 };
 
 
 //设置回传配置
 //设置回传配置
@@ -298,9 +298,9 @@ export const getRegisterData = (
     is_paid: number;
     is_paid: number;
     show_all: number;
     show_all: number;
     page: number;
     page: number;
-  }> = { page: 1 }
+  }> = {page: 1}
 ): AxiosPromise<IList<RegisterData>> => {
 ): AxiosPromise<IList<RegisterData>> => {
-  return axios("/getAdMatchUsers", { params: query });
+  return axios("/getAdMatchUsers", {params: query});
 };
 };
 
 
 //强制回传
 //强制回传
@@ -327,7 +327,7 @@ export const getDesignList = (query: {
   desc: string;
   desc: string;
   name: string;
   name: string;
 }>> => {
 }>> => {
-  return axios("/delivery/getDeliveryStatFields", { params: query });
+  return axios("/delivery/getDeliveryStatFields", {params: query});
 };
 };
 
 
 //财务数据
 //财务数据
@@ -336,9 +336,9 @@ export const getFinanceList = (
     start_ymd: string;
     start_ymd: string;
     end_ymd: string;
     end_ymd: string;
     page: number;
     page: number;
-  }> = { page: 1 }
+  }> = {page: 1}
 ): AxiosPromise<IList<FinanceData>> => {
 ): AxiosPromise<IList<FinanceData>> => {
-  return axios("/ad/adFinanceStat", { params: query });
+  return axios("/ad/adFinanceStat", {params: query});
 };
 };
 
 
 //广告组数据
 //广告组数据
@@ -351,9 +351,9 @@ export const getAdgroupList = (
     end_date: string;
     end_date: string;
     page: number;
     page: number;
     uids: string;
     uids: string;
-  }> = { page: 1 }
+  }> = {page: 1}
 ): AxiosPromise<IList<AdGroupData>> => {
 ): AxiosPromise<IList<AdGroupData>> => {
-  return axios("/ad/adCampaigns", { params: query });
+  return axios("/ad/adCampaigns", {params: query});
 };
 };
 
 
 //修改广告组状态
 //修改广告组状态
@@ -373,9 +373,9 @@ export const getAdgroupData = (
     begin_date: string;
     begin_date: string;
     end_date: string;
     end_date: string;
     uids: string;
     uids: string;
-  }> = { page: 1 }
+  }> = {page: 1}
 ): AxiosPromise<IList<AdgroupList>> => {
 ): AxiosPromise<IList<AdgroupList>> => {
-  return axios("/ad/adAdvertisers", { params: query });
+  return axios("/ad/adAdvertisers", {params: query});
 };
 };
 
 
 //更新账户日预算
 //更新账户日预算
@@ -402,7 +402,7 @@ export const setChannelRate = (data: {
 
 
 //保存自定义列
 //保存自定义列
 export const setCoustomClomuns = (data: any): any => {
 export const setCoustomClomuns = (data: any): any => {
-  return axios.post("/ad/saveFields", { fields: data });
+  return axios.post("/ad/saveFields", {fields: data});
 };
 };
 
 
 //获取组统计
 //获取组统计
@@ -416,7 +416,7 @@ export const ALLadGroupData = (
     uids: string;
     uids: string;
   }>
   }>
 ) => {
 ) => {
-  return axios("/ad/adCampaignSum", { params: query });
+  return axios("/ad/adCampaignSum", {params: query});
 };
 };
 
 
 //获取🐖统计
 //获取🐖统计
@@ -430,7 +430,7 @@ export const ALLAcountGroupData = (
     uids: string;
     uids: string;
   }>
   }>
 ) => {
 ) => {
-  return axios("/ad/adAdvertiserSum", { params: query });
+  return axios("/ad/adAdvertiserSum", {params: query});
 };
 };
 
 
 //获取广告计划汇总
 //获取广告计划汇总
@@ -445,7 +445,7 @@ export const getadDataSum = (
     status: number | string;
     status: number | string;
   }>
   }>
 ) => {
 ) => {
-  return axios("/ad/adSumData", { params: query });
+  return axios("/ad/adSumData", {params: query});
 };
 };
 
 
 //设置回传付费最低金额
 //设置回传付费最低金额
@@ -463,7 +463,7 @@ export const statusAdChange = (data: {
   advertiser_id: string | number;
   advertiser_id: string | number;
   is_enable: string | number;
   is_enable: string | number;
 }) => {
 }) => {
-  return axios("/ad/updateAdvertiserStatus", { params: data });
+  return axios("/ad/updateAdvertiserStatus", {params: data});
 };
 };
 
 
 /**
 /**
@@ -478,7 +478,7 @@ export const getAuthorUser = (): AxiosPromise<IUserAdmin> => {
 export const getOfficialBackConfig = (
 export const getOfficialBackConfig = (
   channel_id: number
   channel_id: number
 ): AxiosPromise<AccountPlanConfig> => {
 ): AxiosPromise<AccountPlanConfig> => {
-  return axios("/channel/reportConfig", { params: { channel_id } });
+  return axios("/channel/reportConfig", {params: {channel_id}});
 };
 };
 
 
 // 保存公众号回传配置
 // 保存公众号回传配置
@@ -493,6 +493,38 @@ export const onUpdateOfficialReportType = (
 ) => {
 ) => {
   return axios.post("/channel/switchReportModule", {
   return axios.post("/channel/switchReportModule", {
     channel_id,
     channel_id,
-    report_module
+    report_module,
   });
   });
 };
 };
+
+/**
+ * 获取落地页列表
+ * @returns
+ */
+export const getLandingPageList = (data: {
+  page: number | 1;
+  title?: string;
+  link_source?: string;
+  gzh_name?: string;
+  start_time?: string;
+  end_time?: string;
+  status?: number;
+}) => {
+  return axios("/landingPage/list", {params: data});
+};
+
+/**
+ * 删除落地页
+ * @returns
+ */
+export const landingDelete = (data: {id: string | number}) => {
+  return axios("/landingPage/delete", {params: data});
+};
+
+/**
+ * 落地页 提交审核
+ * @returns
+ */
+ export const landingSubmit = (data: {id: string | number}) => {
+  return axios("/landingPage/submit", {params: data});
+};

+ 59 - 0
src/components/confirm-button.vue

@@ -0,0 +1,59 @@
+<template>
+  <div class="confirm-button">
+    <a-popconfirm
+      :title="title"
+      :ok-text="okText"
+      :cancel-text="cancelText"
+      @confirm="confirm"
+      @cancel="close"
+    >
+      <a-button v-if="buttonStatus" :type="buttonType">{{ text }}</a-button>
+      <div v-else class="button_blue">{{ text }}</div>
+    </a-popconfirm>
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent } from "vue";
+
+export default defineComponent({
+  emits: ["confirm", "close"],
+  props: {
+    title: {
+      type: String,
+      default: "确认该操作吗?", //提示信息
+    },
+    okText: {
+      type: String,
+      default: "确认", //确认按钮
+    },
+    cancelText: {
+      type: String,
+      default: "取消", //取消按钮
+    },
+    text: {
+      type: String,
+      default: "确认", //按钮文案
+    },
+    buttonStatus: {
+      type: Boolean,
+      default: true, //按钮类型 默认为按钮
+    },
+    buttonType: {
+      type: String,
+      default: "primary", //按钮类型 默认为按钮
+    },
+  },
+  setup() {},
+  methods: {
+    confirm() {
+      this.$emit("confirm");
+      //   确认
+    },
+    close() {
+      this.$emit("close");
+      //   取消
+    },
+  },
+});
+</script>

+ 13 - 4
src/plugins/install.ts

@@ -1,4 +1,9 @@
-import { App } from "vue";
+/*
+ * @Author: pikachu
+ * @Date: 2021-04-28 09:20:56
+ * @LastEditors: pikachu
+ */
+import {App} from "vue";
 import {
 import {
   Button,
   Button,
   ConfigProvider,
   ConfigProvider,
@@ -22,19 +27,22 @@ import {
   Tooltip,
   Tooltip,
   InputNumber,
   InputNumber,
   Affix,
   Affix,
-  Descriptions
+  Descriptions,
+  Card,
 } from "ant-design-vue";
 } from "ant-design-vue";
 
 
 import VueClipboard3 from "./vue-clipboard";
 import VueClipboard3 from "./vue-clipboard";
 import VueConfirmDirective from "./vue-confirm";
 import VueConfirmDirective from "./vue-confirm";
 import VueQrCode from "./vue-qrcode";
 import VueQrCode from "./vue-qrcode";
 
 
-import { ModalConfirmKey } from "./injectionKey";
+import {ModalConfirmKey} from "./injectionKey";
+import confirmButton from "@/components/confirm-button.vue"
 
 
 const install = (app: App<Element>) => {
 const install = (app: App<Element>) => {
   app.provide(ModalConfirmKey, Modal.confirm);
   app.provide(ModalConfirmKey, Modal.confirm);
   app.config.globalProperties.$confirm = Modal.confirm;
   app.config.globalProperties.$confirm = Modal.confirm;
   app.config.globalProperties.$message = message;
   app.config.globalProperties.$message = message;
+  app.component('confirm-button',confirmButton)
 
 
   return app
   return app
     .use(VueClipboard3)
     .use(VueClipboard3)
@@ -61,7 +69,8 @@ const install = (app: App<Element>) => {
     .use(Switch)
     .use(Switch)
     .use(Modal)
     .use(Modal)
     .use(Descriptions)
     .use(Descriptions)
-    .use(Drawer);
+    .use(Drawer)
+    .use(Card);
 };
 };
 
 
 export default install;
 export default install;

+ 68 - 1
src/scss/index.scss

@@ -129,4 +129,71 @@ body {
   span {
   span {
     font-weight: bold;
     font-weight: bold;
   }
   }
-}
+}
+
+.cursor {
+  cursor: pointer;
+}
+
+.theme {
+  color: $theme-color;
+}
+
+.a-input-50 {
+  width: 50px !important;
+  margin-right: 10px !important;
+}
+
+.a-input-100 {
+  width: 100px !important;
+  margin-right: 10px !important;
+}
+
+.a-input-200 {
+  width: 200px !important;
+  margin-right: 10px !important;
+}
+
+.a-input-300 {
+  width: 300px !important;
+  margin-right: 10px !important;
+}
+
+.a-input-400 {
+  width: 400px !important;
+  margin-right: 10px !important;
+}
+
+.button_blue {
+  color: #39a4ff;
+  cursor: pointer;
+  margin: 0 5px;
+}
+
+.button_no {
+  color: #999;
+  cursor: no-drop;
+  margin: 0 5px;
+}
+
+.search {
+  .ant-card-body {
+    display: flex;
+    width: 100%;
+    padding: 10px;
+    align-items: center;
+    div {
+      margin-right: 10px;
+    }
+  }
+}
+
+.icon-button {
+  color: #39a4ff !important;
+  cursor: pointer;
+}
+
+.flex-box {
+  display: flex;
+  align-items: center;
+}

+ 186 - 127
src/views/_pageOptions/table-put.ts

@@ -18,7 +18,7 @@ export const TableColumnOfPutBooks = [
     title: "公众号名称",
     title: "公众号名称",
     dataIndex: "official_name",
     dataIndex: "official_name",
     width: 150,
     width: 150,
-    slots: { customRender: "official_name" },
+    slots: {customRender: "official_name"},
   },
   },
   {
   {
     title: "书籍",
     title: "书籍",
@@ -33,18 +33,18 @@ export const TableColumnOfPutBooks = [
     title: "开始时间/结束时间",
     title: "开始时间/结束时间",
     dataIndex: "start_time",
     dataIndex: "start_time",
     width: 200,
     width: 200,
-    slots: { customRender: "time" },
+    slots: {customRender: "time"},
   },
   },
   {
   {
     title: "监测链接",
     title: "监测链接",
     dataIndex: "monitor_link",
     dataIndex: "monitor_link",
-    slots: { customRender: "link" },
+    slots: {customRender: "link"},
     width: 120,
     width: 120,
   },
   },
   {
   {
     title: "操作",
     title: "操作",
     key: "operator",
     key: "operator",
-    slots: { customRender: "operator" },
+    slots: {customRender: "operator"},
     width: 100,
     width: 100,
   },
   },
 ];
 ];
@@ -62,7 +62,7 @@ export const TableColumnOfPutAdAccount = [
     dataIndex: "account_id",
     dataIndex: "account_id",
     key: "account_id",
     key: "account_id",
     ellipsis: true,
     ellipsis: true,
-    slots: { customRender: "email" },
+    slots: {customRender: "email"},
   },
   },
   {
   {
     title: "用户名",
     title: "用户名",
@@ -89,7 +89,7 @@ export const TableColumnOfPutAdAccount = [
   {
   {
     title: "是否同步",
     title: "是否同步",
     key: "operator",
     key: "operator",
-    slots: { customRender: "operator" },
+    slots: {customRender: "operator"},
     width: 100,
     width: 100,
   },
   },
 ];
 ];
@@ -202,7 +202,7 @@ export const TableColumnOfPutLog = [
     title: "日志",
     title: "日志",
     key: "content_log",
     key: "content_log",
     width: 500,
     width: 500,
-    slots: { customRender: "log" },
+    slots: {customRender: "log"},
   },
   },
 ];
 ];
 
 
@@ -309,126 +309,126 @@ export const TableColumnOfMoreStat = [
     title: "bid",
     title: "bid",
     dataIndex: "bid",
     dataIndex: "bid",
   },
   },
-  { title: "1日回本率", dataIndex: "d1_recovery_rate", width: 150 },
-  { title: "2日回本率", dataIndex: "d2_recovery_rate", width: 150 },
-  { title: "3日回本率", dataIndex: "d3_recovery_rate", width: 150 },
-  { title: "4日回本率", dataIndex: "d4_recovery_rate", width: 150 },
-  { title: "5日回本率", dataIndex: "d5_recovery_rate", width: 150 },
-  { title: "6日回本率", dataIndex: "d6_recovery_rate", width: 150 },
-  { title: "7日回本率", dataIndex: "d7_recovery_rate", width: 150 },
-  { title: "8日回本率", dataIndex: "d8_recovery_rate", width: 150 },
-  { title: "9日回本率", dataIndex: "d9_recovery_rate", width: 150 },
-  { title: "10日回本率", dataIndex: "d10_recovery_rate", width: 150 },
-  { title: "11日回本率", dataIndex: "d11_recovery_rate", width: 150 },
-  { title: "12日回本率", dataIndex: "d12_recovery_rate", width: 150 },
-  { title: "13日回本率", dataIndex: "d13_recovery_rate", width: 150 },
-  { title: "14日回本率", dataIndex: "d14_recovery_rate", width: 150 },
-  { title: "15日回本率", dataIndex: "d15_recovery_rate", width: 150 },
-  { title: "16日回本率", dataIndex: "d16_recovery_rate", width: 150 },
-  { title: "17日回本率", dataIndex: "d17_recovery_rate", width: 150 },
-  { title: "18日回本率", dataIndex: "d18_recovery_rate", width: 150 },
-  { title: "19日回本率", dataIndex: "d19_recovery_rate", width: 150 },
-  { title: "20日回本率", dataIndex: "d20_recovery_rate", width: 150 },
-  { title: "21日回本率", dataIndex: "d21_recovery_rate", width: 150 },
-  { title: "22日回本率", dataIndex: "d22_recovery_rate", width: 150 },
-  { title: "23日回本率", dataIndex: "d23_recovery_rate", width: 150 },
-  { title: "24日回本率", dataIndex: "d24_recovery_rate", width: 150 },
-  { title: "25日回本率", dataIndex: "d25_recovery_rate", width: 150 },
-  { title: "26日回本率", dataIndex: "d26_recovery_rate", width: 150 },
-  { title: "27日回本率", dataIndex: "d27_recovery_rate", width: 150 },
-  { title: "28日回本率", dataIndex: "d28_recovery_rate", width: 150 },
-  { title: "29日回本率", dataIndex: "d29_recovery_rate", width: 150 },
-  { title: "30日回本率", dataIndex: "d30_recovery_rate", width: 150 },
-  { title: "31日回本率", dataIndex: "d31_recovery_rate", width: 150 },
-  { title: "32日回本率", dataIndex: "d32_recovery_rate", width: 150 },
-  { title: "33日回本率", dataIndex: "d33_recovery_rate", width: 150 },
-  { title: "34日回本率", dataIndex: "d34_recovery_rate", width: 150 },
-  { title: "35日回本率", dataIndex: "d35_recovery_rate", width: 150 },
-  { title: "36日回本率", dataIndex: "d36_recovery_rate", width: 150 },
-  { title: "37日回本率", dataIndex: "d37_recovery_rate", width: 150 },
-  { title: "38日回本率", dataIndex: "d38_recovery_rate", width: 150 },
-  { title: "39日回本率", dataIndex: "d39_recovery_rate", width: 150 },
-  { title: "40日回本率", dataIndex: "d40_recovery_rate", width: 150 },
-  { title: "41日回本率", dataIndex: "d41_recovery_rate", width: 150 },
-  { title: "42日回本率", dataIndex: "d42_recovery_rate", width: 150 },
-  { title: "43日回本率", dataIndex: "d43_recovery_rate", width: 150 },
-  { title: "44日回本率", dataIndex: "d44_recovery_rate", width: 150 },
-  { title: "45日回本率", dataIndex: "d45_recovery_rate", width: 150 },
-  { title: "46日回本率", dataIndex: "d46_recovery_rate", width: 150 },
-  { title: "47日回本率", dataIndex: "d47_recovery_rate", width: 150 },
-  { title: "48日回本率", dataIndex: "d48_recovery_rate", width: 150 },
-  { title: "49日回本率", dataIndex: "d49_recovery_rate", width: 150 },
-  { title: "50日回本率", dataIndex: "d50_recovery_rate", width: 150 },
-  { title: "51日回本率", dataIndex: "d51_recovery_rate", width: 150 },
-  { title: "52日回本率", dataIndex: "d52_recovery_rate", width: 150 },
-  { title: "53日回本率", dataIndex: "d53_recovery_rate", width: 150 },
-  { title: "54日回本率", dataIndex: "d54_recovery_rate", width: 150 },
-  { title: "55日回本率", dataIndex: "d55_recovery_rate", width: 150 },
-  { title: "56日回本率", dataIndex: "d56_recovery_rate", width: 150 },
-  { title: "57日回本率", dataIndex: "d57_recovery_rate", width: 150 },
-  { title: "58日回本率", dataIndex: "d58_recovery_rate", width: 150 },
-  { title: "59日回本率", dataIndex: "d59_recovery_rate", width: 150 },
-  { title: "60日回本率", dataIndex: "d60_recovery_rate", width: 150 },
-  { title: "61日回本率", dataIndex: "d61_recovery_rate", width: 150 },
-  { title: "62日回本率", dataIndex: "d62_recovery_rate", width: 150 },
-  { title: "63日回本率", dataIndex: "d63_recovery_rate", width: 150 },
-  { title: "64日回本率", dataIndex: "d64_recovery_rate", width: 150 },
-  { title: "65日回本率", dataIndex: "d65_recovery_rate", width: 150 },
-  { title: "66日回本率", dataIndex: "d66_recovery_rate", width: 150 },
-  { title: "67日回本率", dataIndex: "d67_recovery_rate", width: 150 },
-  { title: "68日回本率", dataIndex: "d68_recovery_rate", width: 150 },
-  { title: "69日回本率", dataIndex: "d69_recovery_rate", width: 150 },
-  { title: "70日回本率", dataIndex: "d70_recovery_rate", width: 150 },
-  { title: "71日回本率", dataIndex: "d71_recovery_rate", width: 150 },
-  { title: "72日回本率", dataIndex: "d72_recovery_rate", width: 150 },
-  { title: "73日回本率", dataIndex: "d73_recovery_rate", width: 150 },
-  { title: "74日回本率", dataIndex: "d74_recovery_rate", width: 150 },
-  { title: "75日回本率", dataIndex: "d75_recovery_rate", width: 150 },
-  { title: "76日回本率", dataIndex: "d76_recovery_rate", width: 150 },
-  { title: "77日回本率", dataIndex: "d77_recovery_rate", width: 150 },
-  { title: "78日回本率", dataIndex: "d78_recovery_rate", width: 150 },
-  { title: "79日回本率", dataIndex: "d79_recovery_rate", width: 150 },
-  { title: "80日回本率", dataIndex: "d80_recovery_rate", width: 150 },
-  { title: "81日回本率", dataIndex: "d81_recovery_rate", width: 150 },
-  { title: "82日回本率", dataIndex: "d82_recovery_rate", width: 150 },
-  { title: "83日回本率", dataIndex: "d83_recovery_rate", width: 150 },
-  { title: "84日回本率", dataIndex: "d84_recovery_rate", width: 150 },
-  { title: "85日回本率", dataIndex: "d85_recovery_rate", width: 150 },
-  { title: "86日回本率", dataIndex: "d86_recovery_rate", width: 150 },
-  { title: "87日回本率", dataIndex: "d87_recovery_rate", width: 150 },
-  { title: "88日回本率", dataIndex: "d88_recovery_rate", width: 150 },
-  { title: "89日回本率", dataIndex: "d89_recovery_rate", width: 150 },
-  { title: "90日回本率", dataIndex: "d90_recovery_rate", width: 150 },
-  { title: "91日回本率", dataIndex: "d91_recovery_rate", width: 150 },
-  { title: "92日回本率", dataIndex: "d92_recovery_rate", width: 150 },
-  { title: "93日回本率", dataIndex: "d93_recovery_rate", width: 150 },
-  { title: "94日回本率", dataIndex: "d94_recovery_rate", width: 150 },
-  { title: "95日回本率", dataIndex: "d95_recovery_rate", width: 150 },
-  { title: "96日回本率", dataIndex: "d96_recovery_rate", width: 150 },
-  { title: "97日回本率", dataIndex: "d97_recovery_rate", width: 150 },
-  { title: "98日回本率", dataIndex: "d98_recovery_rate", width: 150 },
-  { title: "99日回本率", dataIndex: "d99_recovery_rate", width: 150 },
-  { title: "100日回本率", dataIndex: "d100_recovery_rate", width: 150 },
-  { title: "101日回本率", dataIndex: "d101_recovery_rate", width: 150 },
-  { title: "102日回本率", dataIndex: "d102_recovery_rate", width: 150 },
-  { title: "103日回本率", dataIndex: "d103_recovery_rate", width: 150 },
-  { title: "104日回本率", dataIndex: "d104_recovery_rate", width: 150 },
-  { title: "105日回本率", dataIndex: "d105_recovery_rate", width: 150 },
-  { title: "106日回本率", dataIndex: "d106_recovery_rate", width: 150 },
-  { title: "107日回本率", dataIndex: "d107_recovery_rate", width: 150 },
-  { title: "108日回本率", dataIndex: "d108_recovery_rate", width: 150 },
-  { title: "109日回本率", dataIndex: "d109_recovery_rate", width: 150 },
-  { title: "110日回本率", dataIndex: "d110_recovery_rate", width: 150 },
-  { title: "111日回本率", dataIndex: "d111_recovery_rate", width: 150 },
-  { title: "112日回本率", dataIndex: "d112_recovery_rate", width: 150 },
-  { title: "113日回本率", dataIndex: "d113_recovery_rate", width: 150 },
-  { title: "114日回本率", dataIndex: "d114_recovery_rate", width: 150 },
-  { title: "115日回本率", dataIndex: "d115_recovery_rate", width: 150 },
-  { title: "116日回本率", dataIndex: "d116_recovery_rate", width: 150 },
-  { title: "117日回本率", dataIndex: "d117_recovery_rate", width: 150 },
-  { title: "118日回本率", dataIndex: "d118_recovery_rate", width: 150 },
-  { title: "119日回本率", dataIndex: "d119_recovery_rate", width: 150 },
-  { title: "120日回本率", dataIndex: "d120_recovery_rate", width: 150 },
+  {title: "1日回本率", dataIndex: "d1_recovery_rate", width: 150},
+  {title: "2日回本率", dataIndex: "d2_recovery_rate", width: 150},
+  {title: "3日回本率", dataIndex: "d3_recovery_rate", width: 150},
+  {title: "4日回本率", dataIndex: "d4_recovery_rate", width: 150},
+  {title: "5日回本率", dataIndex: "d5_recovery_rate", width: 150},
+  {title: "6日回本率", dataIndex: "d6_recovery_rate", width: 150},
+  {title: "7日回本率", dataIndex: "d7_recovery_rate", width: 150},
+  {title: "8日回本率", dataIndex: "d8_recovery_rate", width: 150},
+  {title: "9日回本率", dataIndex: "d9_recovery_rate", width: 150},
+  {title: "10日回本率", dataIndex: "d10_recovery_rate", width: 150},
+  {title: "11日回本率", dataIndex: "d11_recovery_rate", width: 150},
+  {title: "12日回本率", dataIndex: "d12_recovery_rate", width: 150},
+  {title: "13日回本率", dataIndex: "d13_recovery_rate", width: 150},
+  {title: "14日回本率", dataIndex: "d14_recovery_rate", width: 150},
+  {title: "15日回本率", dataIndex: "d15_recovery_rate", width: 150},
+  {title: "16日回本率", dataIndex: "d16_recovery_rate", width: 150},
+  {title: "17日回本率", dataIndex: "d17_recovery_rate", width: 150},
+  {title: "18日回本率", dataIndex: "d18_recovery_rate", width: 150},
+  {title: "19日回本率", dataIndex: "d19_recovery_rate", width: 150},
+  {title: "20日回本率", dataIndex: "d20_recovery_rate", width: 150},
+  {title: "21日回本率", dataIndex: "d21_recovery_rate", width: 150},
+  {title: "22日回本率", dataIndex: "d22_recovery_rate", width: 150},
+  {title: "23日回本率", dataIndex: "d23_recovery_rate", width: 150},
+  {title: "24日回本率", dataIndex: "d24_recovery_rate", width: 150},
+  {title: "25日回本率", dataIndex: "d25_recovery_rate", width: 150},
+  {title: "26日回本率", dataIndex: "d26_recovery_rate", width: 150},
+  {title: "27日回本率", dataIndex: "d27_recovery_rate", width: 150},
+  {title: "28日回本率", dataIndex: "d28_recovery_rate", width: 150},
+  {title: "29日回本率", dataIndex: "d29_recovery_rate", width: 150},
+  {title: "30日回本率", dataIndex: "d30_recovery_rate", width: 150},
+  {title: "31日回本率", dataIndex: "d31_recovery_rate", width: 150},
+  {title: "32日回本率", dataIndex: "d32_recovery_rate", width: 150},
+  {title: "33日回本率", dataIndex: "d33_recovery_rate", width: 150},
+  {title: "34日回本率", dataIndex: "d34_recovery_rate", width: 150},
+  {title: "35日回本率", dataIndex: "d35_recovery_rate", width: 150},
+  {title: "36日回本率", dataIndex: "d36_recovery_rate", width: 150},
+  {title: "37日回本率", dataIndex: "d37_recovery_rate", width: 150},
+  {title: "38日回本率", dataIndex: "d38_recovery_rate", width: 150},
+  {title: "39日回本率", dataIndex: "d39_recovery_rate", width: 150},
+  {title: "40日回本率", dataIndex: "d40_recovery_rate", width: 150},
+  {title: "41日回本率", dataIndex: "d41_recovery_rate", width: 150},
+  {title: "42日回本率", dataIndex: "d42_recovery_rate", width: 150},
+  {title: "43日回本率", dataIndex: "d43_recovery_rate", width: 150},
+  {title: "44日回本率", dataIndex: "d44_recovery_rate", width: 150},
+  {title: "45日回本率", dataIndex: "d45_recovery_rate", width: 150},
+  {title: "46日回本率", dataIndex: "d46_recovery_rate", width: 150},
+  {title: "47日回本率", dataIndex: "d47_recovery_rate", width: 150},
+  {title: "48日回本率", dataIndex: "d48_recovery_rate", width: 150},
+  {title: "49日回本率", dataIndex: "d49_recovery_rate", width: 150},
+  {title: "50日回本率", dataIndex: "d50_recovery_rate", width: 150},
+  {title: "51日回本率", dataIndex: "d51_recovery_rate", width: 150},
+  {title: "52日回本率", dataIndex: "d52_recovery_rate", width: 150},
+  {title: "53日回本率", dataIndex: "d53_recovery_rate", width: 150},
+  {title: "54日回本率", dataIndex: "d54_recovery_rate", width: 150},
+  {title: "55日回本率", dataIndex: "d55_recovery_rate", width: 150},
+  {title: "56日回本率", dataIndex: "d56_recovery_rate", width: 150},
+  {title: "57日回本率", dataIndex: "d57_recovery_rate", width: 150},
+  {title: "58日回本率", dataIndex: "d58_recovery_rate", width: 150},
+  {title: "59日回本率", dataIndex: "d59_recovery_rate", width: 150},
+  {title: "60日回本率", dataIndex: "d60_recovery_rate", width: 150},
+  {title: "61日回本率", dataIndex: "d61_recovery_rate", width: 150},
+  {title: "62日回本率", dataIndex: "d62_recovery_rate", width: 150},
+  {title: "63日回本率", dataIndex: "d63_recovery_rate", width: 150},
+  {title: "64日回本率", dataIndex: "d64_recovery_rate", width: 150},
+  {title: "65日回本率", dataIndex: "d65_recovery_rate", width: 150},
+  {title: "66日回本率", dataIndex: "d66_recovery_rate", width: 150},
+  {title: "67日回本率", dataIndex: "d67_recovery_rate", width: 150},
+  {title: "68日回本率", dataIndex: "d68_recovery_rate", width: 150},
+  {title: "69日回本率", dataIndex: "d69_recovery_rate", width: 150},
+  {title: "70日回本率", dataIndex: "d70_recovery_rate", width: 150},
+  {title: "71日回本率", dataIndex: "d71_recovery_rate", width: 150},
+  {title: "72日回本率", dataIndex: "d72_recovery_rate", width: 150},
+  {title: "73日回本率", dataIndex: "d73_recovery_rate", width: 150},
+  {title: "74日回本率", dataIndex: "d74_recovery_rate", width: 150},
+  {title: "75日回本率", dataIndex: "d75_recovery_rate", width: 150},
+  {title: "76日回本率", dataIndex: "d76_recovery_rate", width: 150},
+  {title: "77日回本率", dataIndex: "d77_recovery_rate", width: 150},
+  {title: "78日回本率", dataIndex: "d78_recovery_rate", width: 150},
+  {title: "79日回本率", dataIndex: "d79_recovery_rate", width: 150},
+  {title: "80日回本率", dataIndex: "d80_recovery_rate", width: 150},
+  {title: "81日回本率", dataIndex: "d81_recovery_rate", width: 150},
+  {title: "82日回本率", dataIndex: "d82_recovery_rate", width: 150},
+  {title: "83日回本率", dataIndex: "d83_recovery_rate", width: 150},
+  {title: "84日回本率", dataIndex: "d84_recovery_rate", width: 150},
+  {title: "85日回本率", dataIndex: "d85_recovery_rate", width: 150},
+  {title: "86日回本率", dataIndex: "d86_recovery_rate", width: 150},
+  {title: "87日回本率", dataIndex: "d87_recovery_rate", width: 150},
+  {title: "88日回本率", dataIndex: "d88_recovery_rate", width: 150},
+  {title: "89日回本率", dataIndex: "d89_recovery_rate", width: 150},
+  {title: "90日回本率", dataIndex: "d90_recovery_rate", width: 150},
+  {title: "91日回本率", dataIndex: "d91_recovery_rate", width: 150},
+  {title: "92日回本率", dataIndex: "d92_recovery_rate", width: 150},
+  {title: "93日回本率", dataIndex: "d93_recovery_rate", width: 150},
+  {title: "94日回本率", dataIndex: "d94_recovery_rate", width: 150},
+  {title: "95日回本率", dataIndex: "d95_recovery_rate", width: 150},
+  {title: "96日回本率", dataIndex: "d96_recovery_rate", width: 150},
+  {title: "97日回本率", dataIndex: "d97_recovery_rate", width: 150},
+  {title: "98日回本率", dataIndex: "d98_recovery_rate", width: 150},
+  {title: "99日回本率", dataIndex: "d99_recovery_rate", width: 150},
+  {title: "100日回本率", dataIndex: "d100_recovery_rate", width: 150},
+  {title: "101日回本率", dataIndex: "d101_recovery_rate", width: 150},
+  {title: "102日回本率", dataIndex: "d102_recovery_rate", width: 150},
+  {title: "103日回本率", dataIndex: "d103_recovery_rate", width: 150},
+  {title: "104日回本率", dataIndex: "d104_recovery_rate", width: 150},
+  {title: "105日回本率", dataIndex: "d105_recovery_rate", width: 150},
+  {title: "106日回本率", dataIndex: "d106_recovery_rate", width: 150},
+  {title: "107日回本率", dataIndex: "d107_recovery_rate", width: 150},
+  {title: "108日回本率", dataIndex: "d108_recovery_rate", width: 150},
+  {title: "109日回本率", dataIndex: "d109_recovery_rate", width: 150},
+  {title: "110日回本率", dataIndex: "d110_recovery_rate", width: 150},
+  {title: "111日回本率", dataIndex: "d111_recovery_rate", width: 150},
+  {title: "112日回本率", dataIndex: "d112_recovery_rate", width: 150},
+  {title: "113日回本率", dataIndex: "d113_recovery_rate", width: 150},
+  {title: "114日回本率", dataIndex: "d114_recovery_rate", width: 150},
+  {title: "115日回本率", dataIndex: "d115_recovery_rate", width: 150},
+  {title: "116日回本率", dataIndex: "d116_recovery_rate", width: 150},
+  {title: "117日回本率", dataIndex: "d117_recovery_rate", width: 150},
+  {title: "118日回本率", dataIndex: "d118_recovery_rate", width: 150},
+  {title: "119日回本率", dataIndex: "d119_recovery_rate", width: 150},
+  {title: "120日回本率", dataIndex: "d120_recovery_rate", width: 150},
 ];
 ];
 
 
 export const TableColumnOfPutAdPlan = [
 export const TableColumnOfPutAdPlan = [
@@ -780,3 +780,62 @@ export const AdCoundCloumn: Array<colunm> = [
     },
     },
   },
   },
 ];
 ];
+
+export const landingCloumn: Array<colunm> = [
+  {
+    title: "序号",
+    dataIndex: "id",
+    width: 100,
+  },
+  // {
+  //   title: "简介",
+  //   dataIndex: "balance",
+  //   width: 100,
+  // },
+  {
+    title: "落地页名称",
+    dataIndex: "title",
+    width: 100,
+  },
+  {
+    title: "公众号",
+    dataIndex: "gzh_name",
+    width: 100,
+    slots: {
+      customRender: "gzh",
+    },
+  },
+  {
+    title: "落地页渠道",
+    dataIndex: "link_source",
+    width: 130,
+  },
+  {
+    title: "状态",
+    dataIndex: "status_info",
+    width: 100,
+  },
+  // {
+  //   title: "公众号",
+  //   dataIndex: "balance",
+  //   width: 100,
+  // },
+  {
+    title: "备注",
+    dataIndex: "remark",
+    width: 100,
+  },
+  {
+    title: "创建日期",
+    dataIndex: "created_at",
+    width: 100,
+  },
+  {
+    title: "操作",
+    dataIndex: "",
+    width: 160,
+    slots: {
+      customRender: "setting",
+    },
+  },
+];

+ 144 - 2
src/views/put/landing/index.vue

@@ -1,3 +1,145 @@
+<!--
+ * @Author: pikachu
+ * @Date: 2021-04-29 09:46:36
+ * @LastEditors: pikachu
+-->
 <template>
 <template>
-  <div>落地页列表</div>
-</template>
+  <a-card class="landing-list">
+    <a-card class="search">
+      <a-input placeholder="请输入标题" class="a-input-200" v-model:value="title" />
+      <a-input placeholder="请输入公众号名称或ID" class="a-input-200" v-model:value="gzh_name" />
+      <!-- <a-input placeholder="请输入公众号" class="a-input-200" v-model:value="book_name" /> -->
+      <a-select v-model:value="status" class="a-input-200" ref="select" placeholder="请选择审核状态">
+        <a-select-option :value="1">待提交</a-select-option>
+        <a-select-option :value="2">待审核</a-select-option>
+        <a-select-option :value="3">审核未通过</a-select-option>
+        <a-select-option :value="4">审核通过</a-select-option>
+        <a-select-option :value="''">全部</a-select-option>
+      </a-select>
+      <a-button type="primary" @click="getdata">查询</a-button>
+      <a-button style="margin-left:20px" @click="getdataclean">重置</a-button>
+    </a-card>
+    <a-card class="search create-box">
+      <a-button type="primary" @click="" class="create">+新建</a-button>
+    </a-card>
+    <a-table
+      rowKey="id"
+      :loading="loading"
+      :columns="columns"
+      :data-source="list"
+      :pagination="tablePageOptions"
+      @change="getdata"
+    >
+      <template #gzh="{record}">
+        <div>{{record.gzh_name}}</div>
+        <div>ID:{{record.gzh_code}}</div>
+      </template>
+      <template #setting="{record}">
+        <div
+          class="button_blue"
+          v-show="record.status==3"
+          @click="copylink(record.cdn_link)"
+        >复制落地页链接</div>
+        <div class="button_blue">编辑</div>
+        <div class="button_blue" v-show="record.status==1" @click="confirmData(record.id)">提交审核</div>
+        <!-- <confirm-button
+          v-show="record.status==1"
+          @confirm="confirmData(record.id)"
+          @close="close"
+          :buttonStatus="false"
+          title="确认提交审核?"
+          text="提交审核"
+        ></confirm-button>-->
+        <confirm-button
+          @confirm="deleteData(record.id)"
+          @close="close"
+          :buttonStatus="false"
+          title="确认删除?"
+          text="删除"
+        ></confirm-button>
+      </template>
+    </a-table>
+  </a-card>
+</template>
+<script lang='ts'>
+import { defineComponent, ref, reactive, toRefs } from "vue";
+import { landingCloumn } from "@/views/_pageOptions/table-put";
+import usePagination from "@/hooks/usePagination";
+import { getLandingPageList, landingDelete, landingSubmit } from "@/api";
+
+export default defineComponent({
+  setup() {
+    const { meta, loading, tablePageOptions } = usePagination();
+    const data = reactive({
+      columns: landingCloumn,
+      list: ref<any[]>([]),
+      status: ref(),
+      title: ref(),
+      gzh_name: ref(),
+      book_name: ref(),
+    });
+    const getdata = (pagination?: { current: number }) => {
+      loading.value = true;
+      const page = pagination?.current ?? 1;
+      let params = {
+        status: data.status,
+        title: data.title,
+        gzh_name: data.gzh_name,
+      };
+      //   请求
+      getLandingPageList({ page, ...params }).then((r) => {
+        loading.value = false;
+        data.list = r.data.list;
+        meta.value = r.data.meta;
+      });
+    };
+    const getdataclean = () => {
+      data.status = undefined;
+      data.title = undefined;
+      data.gzh_name = undefined;
+      getdata();
+    };
+    getdata();
+    return {
+      ...toRefs(data),
+      getdata,
+      tablePageOptions,
+      loading,
+      getdataclean,
+    };
+  },
+  methods: {
+    confirmData(id: string | number) {
+      landingSubmit({ id: id }).then((r) => {
+        this.$message.success("已提交审核");
+        this.getdata();
+      });
+    },
+    deleteData(id: string | number) {
+      landingDelete({ id: id }).then((r) => {
+        this.$message.success("删除成功");
+        this.getdata();
+      });
+    },
+    copylink(data: string) {
+      this.$copyText(data).then((_) => {
+        this.$message.success("复制成功");
+      });
+    },
+  },
+});
+</script>
+<style  lang='scss'>
+.landing-list {
+  .create-box {
+    position: relative;
+    width: 100%;
+    display: flex;
+    height: 50px;
+    .create {
+      position: absolute;
+      right: 10px;
+    }
+  }
+}
+</style>