wang hou sheng 7 months ago
parent a3fe026a57
commit 513f494070
  1. 2
      src/api/api.config.js
  2. 7
      src/api/store.js
  3. 67
      src/views/store/auth.vue

@ -32,7 +32,7 @@ export default {
getVersion: 'wxserve/getVersion',
auditBeforeCheck: 'wxserve/auditBeforeCheck',
audit: 'wxserve/audit',
auditOne: 'wxserve/auditOne',
// 商家功能模块管理
module: {
default: 'store.module/default',

@ -67,6 +67,13 @@ export function audit (params) {
params
})
}
export function auditOne (params) {
return axios({
url: api.store.auditOne,
method: 'get',
params
})
}
/**
* 获取列表
* @param {*} params

@ -55,7 +55,7 @@
<!-- 操作项 -->
<span class="actions" slot="action" slot-scope="text, item">
<a @click="handleCommit(item.appid)">发布体验版</a>
<a @click="handleAudit(item.appid)">发布正式版</a>
<a @click="handleAuditOne(item.appid)">发布正式版</a>
<a @click="handleVersion(item)">刷新版本</a>
</span>
</a-table>
@ -81,62 +81,64 @@
<script>
import * as Api from '@/api/store'
import { ContentHeader, STable } from '@/components'
import Qrcode from './modules/Qrcode'
import Commit from './modules/Commit'
//
const columns = [
{
title: '商城ID',
width: '100px',
dataIndex: 'store_id',
dataIndex: 'store_id'
},
{
title: '商城名称',
width: '180px',
dataIndex: 'store_name',
dataIndex: 'store_name'
},
{
title: 'APPID',
width: '180px',
dataIndex: 'appid',
dataIndex: 'appid'
},
{
title: '小程序名称',
width: '180px',
dataIndex: 'nick_name',
dataIndex: 'nick_name'
},
{
title: '审核状态(正式版)',
width: '180px',
dataIndex: 'audit_status_text',
dataIndex: 'audit_status_text'
},
{
title: '拒绝原因(正式版)',
width: '180px',
dataIndex: 'audit_reason',
dataIndex: 'audit_reason'
},
{
title: '体验版',
width: '200px',
key: 'exp_info',
scopedSlots: { customRender: 'exp_info' },
scopedSlots: { customRender: 'exp_info' }
},
{
title: '正式版',
width: '200px',
key: 'release_info',
scopedSlots: { customRender: 'release_info' },
scopedSlots: { customRender: 'release_info' }
},
{
title: '体验二维码',
dataIndex: 'experience_code',
key: 'experience_code',
width: '100px',
scopedSlots: { customRender: 'experience_code' },
scopedSlots: { customRender: 'experience_code' }
},
{
title: '授权时间',
width: '200px',
dataIndex: 'create_time',
dataIndex: 'create_time'
},
{
@ -144,18 +146,16 @@ const columns = [
width: '240px',
key: 'action',
fixed: 'right',
scopedSlots: { customRender: 'action' },
},
scopedSlots: { customRender: 'action' }
}
]
import Qrcode from './modules/Qrcode'
import Commit from './modules/Commit'
export default {
name: 'AuthList',
components: {
ContentHeader,
STable,
Qrcode,
Commit,
Commit
},
data () {
return {
@ -171,7 +171,7 @@ export default {
appid: '',
store_id: '',
page: 1,
pageSize: 15,
pageSize: 15
},
pageSizeOptions: ['15', '30', '50', '100', '200', '300', '400', '500'],
showTotal: (total) => `${total} 条记录`, //
@ -183,7 +183,7 @@ export default {
//
selectedRowKeys: [],
// Promise
list: [],
list: []
}
},
created () {
@ -194,9 +194,9 @@ export default {
rowSelection () {
return {
selectedRowKeys: this.selectedRowKeys,
onChange: this.onSelectChange,
onChange: this.onSelectChange
}
}
},
},
methods: {
//
@ -211,7 +211,7 @@ export default {
this.$refs.commit.show(appid)
},
handleBatchTest () {
let appids = this.selectedRowKeys.join(',')
const appids = this.selectedRowKeys.join(',')
if (appids === '') {
this.$message.error('请选择需要提交的APPID')
return false
@ -219,7 +219,7 @@ export default {
this.$refs.commit.show(appids)
},
handleBatch () {
let appids = this.selectedRowKeys.join(',')
const appids = this.selectedRowKeys.join(',')
if (appids === '') {
this.$message.error('请选择需要提交的APPID')
return false
@ -276,9 +276,24 @@ export default {
handleAcceptance (item) {
this.$refs.acceptance.add(item)
},
handleAuditOne (appid) {
const self = this
this.$confirm({
title: '您确定要发布正式版吗?',
content: '',
onOk () {
return Api.auditOne({ appid: appid })
.then((result) => {
self.$message.success(result.message, 1.5)
self.fetchData()
})
.finally(self.fetchData())
}
})
},
handleAudit (appid) {
const self = this
const modal = this.$confirm({
this.$confirm({
title: '您确定要发布正式版吗?',
content: '',
onOk () {
@ -288,7 +303,7 @@ export default {
self.fetchData()
})
.finally(self.fetchData())
},
}
})
},
/**
@ -298,8 +313,8 @@ export default {
handleRefresh (bool = false) {
this.selectedRowKeys = []
this.fetchData()
},
},
}
}
}
</script>
<style lang="less" scoped>

Loading…
Cancel
Save