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', getVersion: 'wxserve/getVersion',
auditBeforeCheck: 'wxserve/auditBeforeCheck', auditBeforeCheck: 'wxserve/auditBeforeCheck',
audit: 'wxserve/audit', audit: 'wxserve/audit',
auditOne: 'wxserve/auditOne',
// 商家功能模块管理 // 商家功能模块管理
module: { module: {
default: 'store.module/default', default: 'store.module/default',

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

@ -55,7 +55,7 @@
<!-- 操作项 --> <!-- 操作项 -->
<span class="actions" slot="action" slot-scope="text, item"> <span class="actions" slot="action" slot-scope="text, item">
<a @click="handleCommit(item.appid)">发布体验版</a> <a @click="handleCommit(item.appid)">发布体验版</a>
<a @click="handleAudit(item.appid)">发布正式版</a> <a @click="handleAuditOne(item.appid)">发布正式版</a>
<a @click="handleVersion(item)">刷新版本</a> <a @click="handleVersion(item)">刷新版本</a>
</span> </span>
</a-table> </a-table>
@ -81,62 +81,64 @@
<script> <script>
import * as Api from '@/api/store' import * as Api from '@/api/store'
import { ContentHeader, STable } from '@/components' import { ContentHeader, STable } from '@/components'
import Qrcode from './modules/Qrcode'
import Commit from './modules/Commit'
// //
const columns = [ const columns = [
{ {
title: '商城ID', title: '商城ID',
width: '100px', width: '100px',
dataIndex: 'store_id', dataIndex: 'store_id'
}, },
{ {
title: '商城名称', title: '商城名称',
width: '180px', width: '180px',
dataIndex: 'store_name', dataIndex: 'store_name'
}, },
{ {
title: 'APPID', title: 'APPID',
width: '180px', width: '180px',
dataIndex: 'appid', dataIndex: 'appid'
}, },
{ {
title: '小程序名称', title: '小程序名称',
width: '180px', width: '180px',
dataIndex: 'nick_name', dataIndex: 'nick_name'
}, },
{ {
title: '审核状态(正式版)', title: '审核状态(正式版)',
width: '180px', width: '180px',
dataIndex: 'audit_status_text', dataIndex: 'audit_status_text'
}, },
{ {
title: '拒绝原因(正式版)', title: '拒绝原因(正式版)',
width: '180px', width: '180px',
dataIndex: 'audit_reason', dataIndex: 'audit_reason'
}, },
{ {
title: '体验版', title: '体验版',
width: '200px', width: '200px',
key: 'exp_info', key: 'exp_info',
scopedSlots: { customRender: 'exp_info' }, scopedSlots: { customRender: 'exp_info' }
}, },
{ {
title: '正式版', title: '正式版',
width: '200px', width: '200px',
key: 'release_info', key: 'release_info',
scopedSlots: { customRender: 'release_info' }, scopedSlots: { customRender: 'release_info' }
}, },
{ {
title: '体验二维码', title: '体验二维码',
dataIndex: 'experience_code', dataIndex: 'experience_code',
key: 'experience_code', key: 'experience_code',
width: '100px', width: '100px',
scopedSlots: { customRender: 'experience_code' }, scopedSlots: { customRender: 'experience_code' }
}, },
{ {
title: '授权时间', title: '授权时间',
width: '200px', width: '200px',
dataIndex: 'create_time', dataIndex: 'create_time'
}, },
{ {
@ -144,24 +146,22 @@ const columns = [
width: '240px', width: '240px',
key: 'action', key: 'action',
fixed: 'right', fixed: 'right',
scopedSlots: { customRender: 'action' }, scopedSlots: { customRender: 'action' }
}, }
] ]
import Qrcode from './modules/Qrcode'
import Commit from './modules/Commit'
export default { export default {
name: 'AuthList', name: 'AuthList',
components: { components: {
ContentHeader, ContentHeader,
STable, STable,
Qrcode, Qrcode,
Commit, Commit
}, },
data() { data () {
return { return {
// //
searchForm: this.$form.createForm(this), searchForm: this.$form.createForm(this),
// //
applyStatusList: [], applyStatusList: [],
visibleQrcode: false, visibleQrcode: false,
qrcode_img: '', qrcode_img: '',
@ -171,9 +171,9 @@ export default {
appid: '', appid: '',
store_id: '', store_id: '',
page: 1, 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} 条记录`, // showTotal: (total) => `${total} 条记录`, //
total: 0, total: 0,
// //
@ -183,43 +183,43 @@ export default {
// //
selectedRowKeys: [], selectedRowKeys: [],
// Promise // Promise
list: [], list: []
} }
}, },
created() { created () {
// //
this.fetchData() this.fetchData()
}, },
computed: { computed: {
rowSelection() { rowSelection () {
return { return {
selectedRowKeys: this.selectedRowKeys, selectedRowKeys: this.selectedRowKeys,
onChange: this.onSelectChange, onChange: this.onSelectChange
} }
}, }
}, },
methods: { methods: {
// //
onSelectChange(selectedRowKeys) { onSelectChange (selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys this.selectedRowKeys = selectedRowKeys
}, },
handleQrcode() { handleQrcode () {
this.$refs.qrcode.show() this.$refs.qrcode.show()
}, },
handleCommit(appid) { handleCommit (appid) {
this.$refs.commit.show(appid) this.$refs.commit.show(appid)
}, },
handleBatchTest() { handleBatchTest () {
let appids = this.selectedRowKeys.join(',') const appids = this.selectedRowKeys.join(',')
if (appids === '') { if (appids === '') {
this.$message.error('请选择需要提交的APPID') this.$message.error('请选择需要提交的APPID')
return false return false
} }
this.$refs.commit.show(appids) this.$refs.commit.show(appids)
}, },
handleBatch() { handleBatch () {
let appids = this.selectedRowKeys.join(',') const appids = this.selectedRowKeys.join(',')
if (appids === '') { if (appids === '') {
this.$message.error('请选择需要提交的APPID') this.$message.error('请选择需要提交的APPID')
return false return false
@ -231,17 +231,17 @@ export default {
}) })
.finally(() => this.fetchData()) .finally(() => this.fetchData())
}, },
handleSearch() { handleSearch () {
this.queryParam.page = 1 this.queryParam.page = 1
this.fetchData() this.fetchData()
}, },
// //
handleCancel() { handleCancel () {
this.qrcode_img = '' this.qrcode_img = ''
this.visibleQrcode = false this.visibleQrcode = false
}, },
// //
fetchData() { fetchData () {
this.isLoading = true this.isLoading = true
Api.authList(this.queryParam) Api.authList(this.queryParam)
.then((result) => { .then((result) => {
@ -250,7 +250,7 @@ export default {
}) })
.finally(() => (this.isLoading = false)) .finally(() => (this.isLoading = false))
}, },
handleVersion(item) { handleVersion (item) {
this.isLoading = true this.isLoading = true
Api.getVersion({ appid: item.appid }).then((result) => { Api.getVersion({ appid: item.appid }).then((result) => {
this.$message.success(result.message, 1.5) this.$message.success(result.message, 1.5)
@ -258,48 +258,63 @@ export default {
}) })
}, },
// //
handleReset() { handleReset () {
this.searchForm.resetFields() this.searchForm.resetFields()
}, },
handlePageChange(current, size) { handlePageChange (current, size) {
this.queryParam.page = current this.queryParam.page = current
this.queryParam.pageSize = size this.queryParam.pageSize = size
this.fetchData() this.fetchData()
}, },
handleSizeChange(current, size) { handleSizeChange (current, size) {
this.queryParam.page = current this.queryParam.page = current
this.queryParam.pageSize = size this.queryParam.pageSize = size
this.fetchData() this.fetchData()
}, },
// //
handleAcceptance(item) { handleAcceptance (item) {
this.$refs.acceptance.add(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 self = this
const modal = this.$confirm({ this.$confirm({
title: '您确定要发布正式版吗?', title: '您确定要发布正式版吗?',
content: '', content: '',
onOk() { onOk () {
return Api.audit({ appid: appid }) return Api.audit({ appid: appid })
.then((result) => { .then((result) => {
self.$message.success(result.message, 1.5) self.$message.success(result.message, 1.5)
self.fetchData() self.fetchData()
}) })
.finally(self.fetchData()) .finally(self.fetchData())
}, }
}) })
}, },
/** /**
* 刷新列表 * 刷新列表
* @param Boolean bool 强制刷新到第一页 * @param Boolean bool 强制刷新到第一页
*/ */
handleRefresh(bool = false) { handleRefresh (bool = false) {
this.selectedRowKeys = [] this.selectedRowKeys = []
this.fetchData() this.fetchData()
}, }
}, }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

Loading…
Cancel
Save