diff --git a/src/components/UploadFile/index.vue b/src/components/UploadFile/index.vue index a7d3567..642b26e 100644 --- a/src/components/UploadFile/index.vue +++ b/src/components/UploadFile/index.vue @@ -42,8 +42,10 @@ export default defineComponent({ }, }, setup() { - const action = process.env.VUE_APP_URL + "/file/upload/file"; //地址 - const headers = {}; + const action = process.env.VUE_APP_URL + "util/upload"; //地址 + const headers = { + + }; const filePath = ''; return { action, headers, filePath diff --git a/src/router/index.js b/src/router/index.js index 1bad46b..cb97463 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -186,6 +186,15 @@ const routes = [ title: '奖励规则', }, }, + { + path: "/basicSetting/addReward", + name: "AddReward", + component: () => import("@/views/BasicSetting/_addReward/index.vue"), + meta: { + title: '添加奖励规则', + }, + hidden: true + }, ] }, { diff --git a/src/views/BasicSetting/_addReward/index.vue b/src/views/BasicSetting/_addReward/index.vue new file mode 100644 index 0000000..956d1d1 --- /dev/null +++ b/src/views/BasicSetting/_addReward/index.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/src/views/BasicSetting/_dicSetting/index.vue b/src/views/BasicSetting/_dicSetting/index.vue index 94859fd..86d2e3a 100644 --- a/src/views/BasicSetting/_dicSetting/index.vue +++ b/src/views/BasicSetting/_dicSetting/index.vue @@ -5,7 +5,22 @@
- 添加 + +
添加
+ + + + + + + 确定 + 取消 + + + +
@@ -49,6 +64,12 @@ export default defineComponent({ const form = reactive({ status: 1, }); + const signForm = reactive({ + title: '', + }); + const brandForm = reactive({ + name: '', + }); const tableData = reactive({ data: [], }); @@ -59,8 +80,9 @@ export default defineComponent({ pageSize: 10 }) const index = ref(1); + const visible = ref(false); return { - form,proxy, + form,proxy,visible,signForm,brandForm, index,tableData,pagination, statusFormatter } @@ -102,15 +124,41 @@ export default defineComponent({ }, goRelease() { + }, + //添加品牌/标签 + addConfirm() { + if(this.index == 1) { + this.proxy.$post("/tag/add", this.signForm).then(res => { + this.getData(); + this.visible = false; + this.$message.success(res.data) + }).catch(() => {}); + } else if (this.index == 2) { + this.proxy.$post("/brand/add", this.brandForm).then(res => { + this.getData(); + this.visible = false; + this.$message.success(res.data) + }).catch(() => {}); + } }, //删除 singleDel(id) { this.$alert( - '是否删除'+id+'?', //文字 + '是否删除?', //文字 '删除', //标题 {type: 'warning'} ).then(() => { - this.$message.success('删除成功') + if(this.index == 1) { + this.proxy.$post("/tag/del", {id: id}).then(res => { + this.getData(); + this.$message.success(res.data) + }).catch(() => {}); + } else if (this.index == 2) { + this.proxy.$post("/brand/del", {id: id}).then(res => { + this.getData(); + this.$message.success(res.data) + }).catch(() => {}); + } }).catch(() => {}) } } diff --git a/src/views/BasicSetting/_rewardRule/index.vue b/src/views/BasicSetting/_rewardRule/index.vue index 4a406dc..1330d69 100644 --- a/src/views/BasicSetting/_rewardRule/index.vue +++ b/src/views/BasicSetting/_rewardRule/index.vue @@ -3,21 +3,7 @@
- -
添加规则
- - - - - - 确定 - 取消 - - - -
+ 添加奖励规则
@@ -76,7 +62,6 @@ export default defineComponent({ const setForm = reactive({ name: '' }); - const visible = ref(false); const drawerVisible = ref(false); const { proxy } = getCurrentInstance(); const drawerData = reactive({ @@ -89,7 +74,7 @@ export default defineComponent({ tableData, pagination, statusFormatter, - visible,drawerVisible,drawerData + drawerVisible,drawerData } }, mounted() { @@ -105,8 +90,7 @@ export default defineComponent({ getData() { let obj = Object.assign({pageNum: this.pagination.current,pageSize: this.pagination.pageSize}) this.proxy.$post("/rewardRuleTemplate/list", obj).then(res => { - const data = res.data - console.log(data) + const data = res.data; this.tableData.data = data; }).catch(() => {}); }, @@ -115,15 +99,34 @@ export default defineComponent({ }, handlerEdit(value) { + }, + goAdd() { + this.$router.push({name: 'AddReward'}) + }, + //设为默认 + setDefault(id) { + this.$alert( + '是否设为默认?', //文字 + '设为默认', //标题 + {type: 'info'} + ).then(() => { + this.proxy.$post("/referenceRuleTemplate/setDefault", {id: id}).then(res => { + this.getData(); + this.$message.success(res.data) + }).catch(() => {}); + }).catch(() => {}) }, //删除 singleDel(id) { this.$alert( - '是否删除'+id+'?', //文字 + '是否删除?', //文字 '删除', //标题 {type: 'warning'} ).then(() => { - this.$message.success('删除成功') + this.proxy.$post("/referenceRuleTemplate/del", {id: id}).then(res => { + this.getData(); + this.$message.success(res.data) + }).catch(() => {}); }).catch(() => {}) } } diff --git a/src/views/MatManage/_matUpload/index.vue b/src/views/MatManage/_matUpload/index.vue index f39be8e..53657d9 100644 --- a/src/views/MatManage/_matUpload/index.vue +++ b/src/views/MatManage/_matUpload/index.vue @@ -3,22 +3,32 @@
- - - - - + + - - - - +
+ + + {{item.name}} + + +
+
+ + + + + - + + + {{item.title}} + + @@ -37,7 +47,7 @@