wanghousheng 4 months ago
parent 6ab97c0f67
commit 85ee991a84
  1. 3
      src/api/api.config.js
  2. 8
      src/api/store.js
  3. 4
      src/views/store/auth.vue
  4. 19
      src/views/store/modules/Commit.vue

@ -29,7 +29,8 @@ export default {
addTotemplate: 'wxwholesaler/addTotemplate', addTotemplate: 'wxwholesaler/addTotemplate',
qrcode: 'wxwholesaler/qrcode', qrcode: 'wxwholesaler/qrcode',
commit: 'wxwholesaler/commit', commit: 'wxwholesaler/commit',
auditOne: 'wxwholesaler/commitOne', commitOne: 'wxwholesaler/commitOne',
auditOne: 'wxwholesaler/auditOne',
getVersion: 'wxwholesaler/getVersion', getVersion: 'wxwholesaler/getVersion',
auditBeforeCheck: 'wxwholesaler/auditBeforeCheck', auditBeforeCheck: 'wxwholesaler/auditBeforeCheck',
audit: 'wxwholesaler/audit', audit: 'wxwholesaler/audit',

@ -45,6 +45,14 @@ export function commit (params) {
params params
}) })
} }
export function commitOne (params) {
return axios({
url: api.store.commitOne,
method: 'get',
params
})
}
/** /**
* 获取列表 * 获取列表
* @param {*} params * @param {*} params

@ -208,7 +208,7 @@ export default {
this.$refs.qrcode.show() this.$refs.qrcode.show()
}, },
handleCommit (appid) { handleCommit (appid) {
this.$refs.commit.show(appid) this.$refs.commit.show(appid, 1)
}, },
handleBatchTest () { handleBatchTest () {
const appids = this.selectedRowKeys.join(',') const appids = this.selectedRowKeys.join(',')
@ -216,7 +216,7 @@ export default {
this.$message.error('请选择需要提交的APPID') this.$message.error('请选择需要提交的APPID')
return false return false
} }
this.$refs.commit.show(appids) this.$refs.commit.show(appids, 0)
}, },
handleBatch () { handleBatch () {
const appids = this.selectedRowKeys.join(',') const appids = this.selectedRowKeys.join(',')

@ -43,6 +43,7 @@ export default {
// modal() loading // modal() loading
confirmLoading: false, confirmLoading: false,
templateList: [], templateList: [],
type: 0,
// //
form: { form: {
template_id: '', template_id: '',
@ -54,7 +55,8 @@ export default {
/** /**
* 显示对话框 * 显示对话框
*/ */
show (appid) { show (appid, type) {
this.type = type
this.form.appid = appid this.form.appid = appid
this.visible = true this.visible = true
this.getTemplatelist() this.getTemplatelist()
@ -78,6 +80,7 @@ export default {
*/ */
handleSubmit (values) { handleSubmit (values) {
this.confirmLoading = true this.confirmLoading = true
if (this.type === 0) {
Api.commit(this.form) Api.commit(this.form)
.then((result) => { .then((result) => {
// //
@ -90,6 +93,20 @@ export default {
.finally((result) => { .finally((result) => {
this.confirmLoading = false this.confirmLoading = false
}) })
} else {
Api.commitOne(this.form)
.then((result) => {
//
this.$message.success(result.message, 1.2)
//
this.handleCancel()
//
this.$emit('handleSubmit', values)
})
.finally((result) => {
this.confirmLoading = false
})
}
} }
} }
} }

Loading…
Cancel
Save