diff --git a/src/views/user/active/index.vue b/src/views/user/active/index.vue index 145338f..bd3ec17 100644 --- a/src/views/user/active/index.vue +++ b/src/views/user/active/index.vue @@ -1,147 +1,10 @@ - - + \ No newline at end of file diff --git a/src/views/user/active/indexconfig/Content.vue b/src/views/user/active/indexconfig/Content.vue new file mode 100644 index 0000000..14870ef --- /dev/null +++ b/src/views/user/active/indexconfig/Content.vue @@ -0,0 +1,241 @@ + + + \ No newline at end of file diff --git a/src/views/user/active/indexconfig/api.ts b/src/views/user/active/indexconfig/api.ts new file mode 100644 index 0000000..3af6c5b --- /dev/null +++ b/src/views/user/active/indexconfig/api.ts @@ -0,0 +1,60 @@ +import request from "@/utils/request"; +const baseURL = "/account/admin/activate"; +// XXX-配置 +const AuthAPI = { + // 列表 + getList(params: any) { + return request({ + url: `${baseURL}/list`, + method: "get", + params, + }); + }, + /** 分页*/ + getPage(params: any) { + return request({ + url: `${baseURL}`, + method: "get", + params, + }); + }, + // 新增 + add(data: any) { + return request({ + url: `${baseURL}`, + method: "post", + data: { ...data }, + }); + }, + // 详情 + getinfo(id: number) { + return request({ + url: `${baseURL}/${id}`, + method: "get", + }); + }, + // 编辑 + update(data: Object) { + return request({ + url: `${baseURL}`, + method: "put", + data, + }); + }, + // 删除 + deleteByIds(id: number | String) { + return request({ + url: `${baseURL}/${id}`, + method: "delete", + }); + }, + +}; +export interface Responseres { + code?: number | null; + data?: any; + msg?: null | string; + [property: string]: any; +} + +export default AuthAPI; \ No newline at end of file diff --git a/src/views/user/active/indexconfig/component/AddButton.vue b/src/views/user/active/indexconfig/component/AddButton.vue new file mode 100644 index 0000000..90eb9aa --- /dev/null +++ b/src/views/user/active/indexconfig/component/AddButton.vue @@ -0,0 +1,19 @@ + + \ No newline at end of file diff --git a/src/views/user/active/indexconfig/component/Paging.vue b/src/views/user/active/indexconfig/component/Paging.vue new file mode 100644 index 0000000..ee9b056 --- /dev/null +++ b/src/views/user/active/indexconfig/component/Paging.vue @@ -0,0 +1,24 @@ + + \ No newline at end of file diff --git a/src/views/user/active/indexconfig/component/Table.vue b/src/views/user/active/indexconfig/component/Table.vue new file mode 100644 index 0000000..907b18d --- /dev/null +++ b/src/views/user/active/indexconfig/component/Table.vue @@ -0,0 +1,38 @@ + + + diff --git a/src/views/user/active/indexconfig/component/shopList.vue b/src/views/user/active/indexconfig/component/shopList.vue new file mode 100644 index 0000000..2ce3131 --- /dev/null +++ b/src/views/user/active/indexconfig/component/shopList.vue @@ -0,0 +1,55 @@ + + \ No newline at end of file diff --git a/src/views/user/active/indexconfig/component/shopListconfig/content2.ts b/src/views/user/active/indexconfig/component/shopListconfig/content2.ts new file mode 100644 index 0000000..45b2822 --- /dev/null +++ b/src/views/user/active/indexconfig/component/shopListconfig/content2.ts @@ -0,0 +1,36 @@ +import type { IContentConfig } from "@/components/CURD/types"; +import UserAPI from "@/api/account/coupon"; + +const contentConfig: IContentConfig = { + pageName: "sys:user", + table: { + showOverflowTooltip: true, + }, + toolbar: [], + pagination: { + background: true, + layout: "prev,pager,next,jumper,total,sizes", + pageSize: 10, + pageSizes: [10, 20, 30, 50], + }, + indexAction: function (params) { + return UserAPI.getList(params); + }, + modifyAction(data) { + // 模拟发起网络请求修改字段 + // console.log("modifyAction:", data); + ElMessage.success(JSON.stringify(data)); + return Promise.resolve(null); + }, + + cols: [ + { type: "selection", width: 50, align: "center" }, + // { label: "封面图", align: "center", prop: "coverImg", templet: "image" }, + { label: "名称", align: "center", prop: "title" }, + { label: "已使用数量", align: "center", prop: "useNumber", }, + { label: "剩余数量", align: "center", prop: "leftNumber", }, + { label: "有效天数", align: "center", prop: "validDays", }, + ], +}; + +export default contentConfig; diff --git a/src/views/user/active/indexconfig/component/shopListconfig/search.ts b/src/views/user/active/indexconfig/component/shopListconfig/search.ts new file mode 100644 index 0000000..678a169 --- /dev/null +++ b/src/views/user/active/indexconfig/component/shopListconfig/search.ts @@ -0,0 +1,26 @@ +import DeptAPI from "@/api/product/specificationsconfig"; + +import type { ISearchConfig } from "@/components/CURD/types"; + +const searchConfig: ISearchConfig = { + pageName: "sys:user", + formItems: [ + { + type: "select", + label: "优惠卷类型", + prop: "categoryId", + attrs: { + placeholder: "请选择商品分类", + clearable: true, + style: { + width: "200px", + }, + }, + options: [{ label: "满减", value: "1" }, { label: "商品", value: "2" },], + + }, + + ], +}; + +export default searchConfig;