diff --git a/buyer/src/components/verify/index.vue b/buyer/src/components/verify/index.vue index eb6b7705..eb6cc5ef 100644 --- a/buyer/src/components/verify/index.vue +++ b/buyer/src/components/verify/index.vue @@ -72,19 +72,25 @@ export default { xPos: this.distance }; postVerifyImg(params).then(res => { - if (res.result) { - this.bgColor = 'green'; - this.verifyText = '解锁成功'; - this.$emit('change', { status: true, distance: this.distance }); + if (res.success) { + if (res.result) { + this.bgColor = 'green'; + this.verifyText = '解锁成功'; + this.$emit('change', { status: true, distance: this.distance }); + } else { + this.bgColor = 'red'; + this.verifyText = '解锁失败'; + let that = this; + setTimeout(() => { + that.refresh(); + }, 1000); + this.$emit('change', { status: false, distance: this.distance }); + } } else { - this.bgColor = 'red'; - this.verifyText = '解锁失败'; - let that = this; - setTimeout(() => { - that.refresh(); - }, 1000); - this.$emit('change', { status: false, distance: this.distance }); + this.refresh() } + }).catch(() => { + this.refresh() }); }, refresh () { // 刷新滑块 diff --git a/manager/package.json b/manager/package.json index 427ac89e..8c458b60 100644 --- a/manager/package.json +++ b/manager/package.json @@ -47,7 +47,7 @@ "vue-router": "^3.1.3", "vuedraggable": "^2.23.2", "vuex": "^3.4.0", - "wangeditor": "^4.5.3", + "wangeditor": "^4.7.5", "xlsx": "^0.16.2", "xss": "^1.0.7" }, diff --git a/manager/src/api/pages.js b/manager/src/api/pages.js index d8775679..8a8283f3 100644 --- a/manager/src/api/pages.js +++ b/manager/src/api/pages.js @@ -80,11 +80,11 @@ export const updateArticleCategory = (params, id) => { } //文章添加 export const saveArticle = (params) => { - return postRequest('/article', params) + return postRequest('/article', params, {"Content-Type": "application/json"}) } //文章修改 export const updateArticle = (params) => { - return putRequest(`/article/update/${params.id}`, params) + return putRequest(`/article/update/${params.id}`, params, {"Content-Type": "application/json"}) } //文章是否展示修改 export const updateArticleStatus = (id,params) => { diff --git a/manager/src/config/index.js b/manager/src/config/index.js index 680fb1b1..8b6b162f 100644 --- a/manager/src/config/index.js +++ b/manager/src/config/index.js @@ -17,14 +17,14 @@ export default { * @description api请求基础路径 */ api_dev: { - common: "https://common-api.pickmall.cn", - buyer: "https://buyer-api.pickmall.cn", - seller: "https://store-api.pickmall.cn", - manager: "https://admin-api.pickmall.cn" - // common: 'http://192.168.0.109:8890', - // buyer: 'http://192.168.0.109:8888', - // seller: 'http://192.168.0.109:8889', - // manager: 'http://192.168.0.109:8887' + // common: "https://common-api.pickmall.cn", + // buyer: "https://buyer-api.pickmall.cn", + // seller: "https://store-api.pickmall.cn", + // manager: "https://admin-api.pickmall.cn" + common: 'http://192.168.0.109:8890', + buyer: 'http://192.168.0.109:8888', + seller: 'http://192.168.0.109:8889', + manager: 'http://192.168.0.109:8887' }, api_prod: { common: "https://common-api.pickmall.cn", diff --git a/manager/src/views/distribution/distributionCash.vue b/manager/src/views/distribution/distributionCash.vue index 6855ac6c..a6c4d84e 100644 --- a/manager/src/views/distribution/distributionCash.vue +++ b/manager/src/views/distribution/distributionCash.vue @@ -37,8 +37,8 @@ - 通过 - 拒绝 + 通过 + 拒绝 @@ -67,7 +67,7 @@ export default { loading: true, // 表单加载状态 modalVisible: false, // 添加或编辑显示 modalTitle: "", // 添加或编辑标题 - result: -1, // 是否通过 + result: 'REFUSE', // 是否通过 searchForm: { // 搜索框初始化对象 pageNumber: 1, // 当前页数 pageSize: 10, // 页面大小 @@ -80,9 +80,6 @@ export default { memberName: "", price: "", }, - auditForm: { // 编辑表单 - result: -1 - }, submitLoading: false, // 添加或编辑提交状态 selectList: [], // 多选数据 selectCount: 0, // 多选计数 @@ -101,11 +98,9 @@ export default { title: "申请金额", key: "price", minWidth: 90, - render: (h, params) => { - if (params.row.price) { - return h("div", this.$options.filters.unitPrice(params.row.price,'¥')); - } - } + render: (h, params) => { + return h("div", this.$options.filters.unitPrice(params.row.price,'¥')); + } }, { title: "申请时间", @@ -193,23 +188,27 @@ export default { }; }, methods: { + // 初始化数据 init() { this.getDataList(); }, + // 改变页码 changePage(v) { this.searchForm.pageNumber = v; this.getDataList(); - this.clearSelectAll(); }, + // 改变页数 changePageSize(v) { this.searchForm.pageSize = v; this.getDataList(); }, + // 搜索表格 handleSearch() { this.searchForm.pageNumber = 1; this.searchForm.pageSize = 10; this.getDataList(); }, + // 排序 changeSort(e) { this.searchForm.sort = e.key; this.searchForm.order = e.order; @@ -218,14 +217,7 @@ export default { } this.getDataList(); }, - clearSelectAll() { - this.$refs.table.selectAll(false); - }, - changeSelect(e) { - this.selectList = e; - this.selectCount = e.length; - }, - + // 获取列表数据 getDataList() { this.loading = true; // 带多条件搜索参数获取表单数据 请自行修改接口 @@ -241,7 +233,7 @@ export default { }, handleSubmit() { let result = "拒绝" - if(this.result == 0){ + if(this.result == 'PASS'){ result = "通过" } this.$refs.form.validate(valid => { @@ -251,13 +243,14 @@ export default { content: "您确认要审核"+result+"么?", loading: true, onOk: () => { - this.auditForm.result = this.result; - auditDistributionCash(this.form.id,this.auditForm).then(res => { + auditDistributionCash(this.form.id,{result:this.result}).then(res => { if (res.success) { this.$Modal.remove(); this.$Message.success("审核成功"); this.getDataList(); this.modalVisible = false; + } else { + this.modalVisible = false; } }); } @@ -275,9 +268,7 @@ export default { v[attr] = ""; } } - let str = JSON.stringify(v); - let data = JSON.parse(str); - this.form = data; + this.form = JSON.parse(JSON.stringify(v)); this.modalVisible = true; }, view(v){ diff --git a/manager/src/views/my-components/lili/editor.vue b/manager/src/views/my-components/lili/editor.vue index 697bc9ed..e871d5b5 100644 --- a/manager/src/views/my-components/lili/editor.vue +++ b/manager/src/views/my-components/lili/editor.vue @@ -122,6 +122,7 @@ export default { // 如果服务器端返回的不是 {errno:0, data: [...]} 这种格式,可使用该配置 customInsert: function (insertImg, result, editor) { if (result.success == true) { + console.log(insertImg,result,editor); let url = result.result; insertImg(url); that.$Message.success("上传图片成功"); diff --git a/manager/src/views/my-components/verify/index.vue b/manager/src/views/my-components/verify/index.vue index eb6b7705..5f13fee8 100644 --- a/manager/src/views/my-components/verify/index.vue +++ b/manager/src/views/my-components/verify/index.vue @@ -72,19 +72,26 @@ export default { xPos: this.distance }; postVerifyImg(params).then(res => { - if (res.result) { - this.bgColor = 'green'; - this.verifyText = '解锁成功'; - this.$emit('change', { status: true, distance: this.distance }); + if (res.success) { + if (res.result) { + this.bgColor = 'green'; + this.verifyText = '解锁成功'; + this.$emit('change', { status: true, distance: this.distance }); + } else { + this.bgColor = 'red'; + this.verifyText = '解锁失败'; + let that = this; + setTimeout(() => { + that.refresh(); + }, 1000); + this.$emit('change', { status: false, distance: this.distance }); + } } else { - this.bgColor = 'red'; - this.verifyText = '解锁失败'; - let that = this; - setTimeout(() => { - that.refresh(); - }, 1000); - this.$emit('change', { status: false, distance: this.distance }); + this.refresh() } + + }).catch(()=>{ + this.refresh() }); }, refresh () { // 刷新滑块 diff --git a/manager/src/views/page/article-manage/ArticleCategory.vue b/manager/src/views/page/article-manage/ArticleCategory.vue index 2d269156..84c46072 100644 --- a/manager/src/views/page/article-manage/ArticleCategory.vue +++ b/manager/src/views/page/article-manage/ArticleCategory.vue @@ -1,6 +1,6 @@