wang hou sheng 7 months ago
parent a3fe026a57
commit 513f494070
  1. 2
      src/api/api.config.js
  2. 7
      src/api/store.js
  3. 109
      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,24 +146,22 @@ 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() {
data () {
return {
//
searchForm: this.$form.createForm(this),
//
//
applyStatusList: [],
visibleQrcode: false,
qrcode_img: '',
@ -171,9 +171,9 @@ export default {
appid: '',
store_id: '',
page: 1,
pageSize: 15,
pageSize: 15
},
pageSizeOptions: ['15', '30', '50', '100','200','300','400','500'],
pageSizeOptions: ['15', '30', '50', '100', '200', '300', '400', '500'],
showTotal: (total) => `${total} 条记录`, //
total: 0,
//
@ -183,43 +183,43 @@ export default {
//
selectedRowKeys: [],
// Promise
list: [],
list: []
}
},
created() {
created () {
//
this.fetchData()
},
computed: {
rowSelection() {
rowSelection () {
return {
selectedRowKeys: this.selectedRowKeys,
onChange: this.onSelectChange,
onChange: this.onSelectChange
}
},
}
},
methods: {
//
onSelectChange(selectedRowKeys) {
onSelectChange (selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys
},
handleQrcode() {
handleQrcode () {
this.$refs.qrcode.show()
},
handleCommit(appid) {
handleCommit (appid) {
this.$refs.commit.show(appid)
},
handleBatchTest() {
let appids = this.selectedRowKeys.join(',')
handleBatchTest () {
const appids = this.selectedRowKeys.join(',')
if (appids === '') {
this.$message.error('请选择需要提交的APPID')
return false
}
this.$refs.commit.show(appids)
},
handleBatch() {
let appids = this.selectedRowKeys.join(',')
handleBatch () {
const appids = this.selectedRowKeys.join(',')
if (appids === '') {
this.$message.error('请选择需要提交的APPID')
return false
@ -231,17 +231,17 @@ export default {
})
.finally(() => this.fetchData())
},
handleSearch() {
handleSearch () {
this.queryParam.page = 1
this.fetchData()
},
//
handleCancel() {
handleCancel () {
this.qrcode_img = ''
this.visibleQrcode = false
},
//
fetchData() {
fetchData () {
this.isLoading = true
Api.authList(this.queryParam)
.then((result) => {
@ -250,7 +250,7 @@ export default {
})
.finally(() => (this.isLoading = false))
},
handleVersion(item) {
handleVersion (item) {
this.isLoading = true
Api.getVersion({ appid: item.appid }).then((result) => {
this.$message.success(result.message, 1.5)
@ -258,48 +258,63 @@ export default {
})
},
//
handleReset() {
handleReset () {
this.searchForm.resetFields()
},
handlePageChange(current, size) {
handlePageChange (current, size) {
this.queryParam.page = current
this.queryParam.pageSize = size
this.fetchData()
},
handleSizeChange(current, size) {
handleSizeChange (current, size) {
this.queryParam.page = current
this.queryParam.pageSize = size
this.fetchData()
},
//
handleAcceptance(item) {
handleAcceptance (item) {
this.$refs.acceptance.add(item)
},
handleAudit(appid) {
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() {
onOk () {
return Api.audit({ appid: appid })
.then((result) => {
self.$message.success(result.message, 1.5)
self.fetchData()
})
.finally(self.fetchData())
},
}
})
},
/**
* 刷新列表
* @param Boolean bool 强制刷新到第一页
*/
handleRefresh(bool = false) {
handleRefresh (bool = false) {
this.selectedRowKeys = []
this.fetchData()
},
},
}
}
}
</script>
<style lang="less" scoped>

Loading…
Cancel
Save