diff --git a/src/api/act/act-coupon.ts b/src/api/act/act-coupon.ts
new file mode 100644
index 0000000..6b76ccf
--- /dev/null
+++ b/src/api/act/act-coupon.ts
@@ -0,0 +1,40 @@
+import request from "/@/utils/request"
+
+export function fetchList(query?: Object) {
+ return request({
+ url: "/wallet/act-coupon/page",
+ method: "get",
+ params: query,
+ })
+}
+
+export function addObj(obj?: Object) {
+ return request({
+ url: "/wallet/act-coupon",
+ method: "post",
+ data: obj,
+ })
+}
+
+export function getObj(id?: string) {
+ return request({
+ url: "/wallet/act-coupon/" + id,
+ method: "get",
+ })
+}
+
+export function delObjs(ids?: Object) {
+ return request({
+ url: "/wallet/act-coupon",
+ method: "delete",
+ data: ids,
+ })
+}
+
+export function putObj(obj?: Object) {
+ return request({
+ url: "/wallet/act-coupon",
+ method: "put",
+ data: obj,
+ })
+}
diff --git a/src/hooks/dict.ts b/src/hooks/dict.ts
index a7f4c9a..420a538 100644
--- a/src/hooks/dict.ts
+++ b/src/hooks/dict.ts
@@ -1,29 +1,35 @@
-import { dict } from '/@/stores/dict';
-import { getDicts } from '/@/api/admin/dict';
-import { ref, toRefs } from 'vue';
+import { dict } from "/@/stores/dict"
+import { getDicts } from "/@/api/admin/dict"
+import { ref, toRefs } from "vue"
/**
* 获取字典数据
*/
export function useDict(...args: any): any {
- const res = ref({});
+ const res = ref({})
return (() => {
args.forEach((dictType: String) => {
// @ts-ignore
- res.value[dictType] = [];
- const dicts = dict().getDict(dictType);
+ res.value[dictType] = []
+ const dicts = dict().getDict(dictType)
if (dicts) {
// @ts-ignore
- res.value[dictType] = dicts;
+ res.value[dictType] = dicts
} else {
getDicts(dictType).then((resp) => {
// @ts-ignore
- res.value[dictType] = resp.data.map((p: any) => ({ label: p.label, value: p.value, elTagType: p.listClass, elTagClass: p.cssClass }));
+ res.value[dictType] = resp.data.map((p: any) => ({
+ label: p.label,
+ value: p.value,
+ elTagType: p.listClass,
+ elTagClass: p.cssClass,
+ remarks: p.remarks,
+ }))
// @ts-ignore
- dict().setDict(dictType, res.value[dictType]);
- });
+ dict().setDict(dictType, res.value[dictType])
+ })
}
- });
- return toRefs(res.value);
- })();
+ })
+ return toRefs(res.value)
+ })()
}
diff --git a/src/utils/other.ts b/src/utils/other.ts
index 908cccb..7c0068e 100644
--- a/src/utils/other.ts
+++ b/src/utils/other.ts
@@ -390,7 +390,7 @@ export function handleBlobFile(response: any, fileName: string) {
}
}
if (typeof (blob as any).text === "function") {
- ;(blob as any).text().then((t: string) => handleText(t))
+ (blob as any).text().then((t: string) => handleText(t))
} else {
const reader = new FileReader()
reader.onload = () => handleText(String(reader.result || ""))
diff --git a/src/views/act/act-coupon/form.vue b/src/views/act/act-coupon/form.vue
new file mode 100644
index 0000000..77362b2
--- /dev/null
+++ b/src/views/act/act-coupon/form.vue
@@ -0,0 +1,244 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ form.type == '2' ? '%' : '元' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 限领
+
+
+
+
+
+
+
+
+
+ 次
+
+
+
+
+
+ 有效期
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 天
+
+
+
+
+
+ 使用范围
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/act/act-coupon/index.vue b/src/views/act/act-coupon/index.vue
new file mode 100644
index 0000000..2296c48
--- /dev/null
+++ b/src/views/act/act-coupon/index.vue
@@ -0,0 +1,229 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+ 新 增
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ Number(row.faceValue) }}%
+ ¥{{ formatFenToYuan(row.faceValue) }}
+
+
+
+ {{ row.minPoint === '0' || row.minPoint === 0 ? '无门槛' : '满¥' +
+ formatFenToYuan(row.minPoint) }}
+
+
+ {{ Number(row.totalCount) === -1 ? '不限量' : row.totalCount }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ id }}
+
+
+
+
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/hard/hard-sh/index.vue b/src/views/hard/hard-sh/index.vue
index 718ca31..da92a6f 100644
--- a/src/views/hard/hard-sh/index.vue
+++ b/src/views/hard/hard-sh/index.vue
@@ -21,10 +21,16 @@
-
+
+
+
+
{{ $t("common.queryBtn")
}}