wang hou sheng 11 months ago
parent 8f37827c22
commit 2c46fedac3
  1. 1
      src/api/api.config.js
  2. 13
      src/api/store.js
  3. 72
      src/views/store/auth.vue
  4. 12
      src/views/store/modules/Commit.vue

@ -29,6 +29,7 @@ export default {
addTotemplate: 'wxserve/addTotemplate', addTotemplate: 'wxserve/addTotemplate',
qrcode: 'wxserve/qrcode', qrcode: 'wxserve/qrcode',
commit: 'wxserve/commit', commit: 'wxserve/commit',
getVersion: 'wxserve/getVersion',
// 商家功能模块管理 // 商家功能模块管理
module: { module: {

@ -1,5 +1,17 @@
import api from './api.config' import api from './api.config'
import { axios } from '@/utils/request' import { axios } from '@/utils/request'
/**
* 获取列表
* @param {*} params
*/
export function getVersion(params) {
return axios({
url: api.store.getVersion,
method: 'get',
params,
})
}
/** /**
* 获取列表 * 获取列表
* @param {*} params * @param {*} params
@ -11,7 +23,6 @@ export function delTemplatelist(params) {
params, params,
}) })
} }
/** /**
* 获取列表 * 获取列表
* @param {*} params * @param {*} params

@ -25,20 +25,24 @@
<div class="row-item-tab clearfix"></div> <div class="row-item-tab clearfix"></div>
</div> </div>
<a-table <a-table :rowKey="(record) => record.id" :columns="columns" :data-source="list" bordered :pagination="false">
:rowKey="(record) => record.order_id" <span slot="exp_info" slot-scope="text, item">
:columns="columns" <p v-if="item.exp_info.exp_version">版本:{{ item.exp_info.exp_version }}</p>
:data-source="list" <p v-if="item.exp_info.exp_time">时间:{{ item.exp_info.exp_time }}</p>
:scroll="{ x: 1300 }" </span>
bordered <span slot="release_info" slot-scope="text, item">
:pagination="false" <p v-if="item.release_info.release_version">版本:{{ item.release_info.release_version }}</p>
> <p v-if="item.release_info.release_time">时间:{{ item.release_info.release_time }}</p>
<span slot="head_image" slot-scope="text"> </span>
<img :src="text" width="80" /> <span slot="experience_code" slot-scope="text">
<a title="点击查看原图" :href="text" target="_blank">
<img width="50" height="50" :src="text" alt="服务图片" />
</a>
</span> </span>
<!-- 操作项 --> <!-- 操作项 -->
<span class="actions" slot="action" slot-scope="text, item"> <span class="actions" slot="action" slot-scope="text, item">
<a @click="handleCommit(item)">版本发布</a> <a @click="handleCommit(item)">发布体验版</a>
<a @click="handleVersion(item)">刷新版本信息</a>
</span> </span>
</a-table> </a-table>
<Qrcode ref="qrcode" /> <Qrcode ref="qrcode" />
@ -67,41 +71,55 @@ import { ContentHeader, STable } from '@/components'
const columns = [ const columns = [
{ {
title: '商城ID', title: '商城ID',
width: '100px',
dataIndex: 'store_id', dataIndex: 'store_id',
ellipsis: true,
}, },
{ {
title: '商城名称', title: '商城名称',
width: '180px',
dataIndex: 'store_name', dataIndex: 'store_name',
ellipsis: true,
},
{
title: '小程序头像',
dataIndex: 'head_image',
ellipsis: true,
scopedSlots: { customRender: 'head_image' },
}, },
{ {
title: 'APPID', title: 'APPID',
width: '180px',
dataIndex: 'appid', dataIndex: 'appid',
ellipsis: true,
}, },
{ {
title: '小程序名称', title: '小程序名称',
width: '180px',
dataIndex: 'nick_name', dataIndex: 'nick_name',
ellipsis: true,
}, },
{ {
title: '当前版本信息', title: '体验版',
dataIndex: 'version', width: '200px',
ellipsis: true, key: 'exp_info',
scopedSlots: { customRender: 'exp_info' },
},
{
title: '线上版',
width: '200px',
key: 'release_info',
scopedSlots: { customRender: 'release_info' },
}, },
{
title: '体验二维码',
dataIndex: 'experience_code',
key: 'experience_code',
width: '100px',
scopedSlots: { customRender: 'experience_code' },
},
{ {
title: '授权时间', title: '授权时间',
width: '200px',
dataIndex: 'create_time', dataIndex: 'create_time',
}, },
{ {
title: '操作', title: '操作',
width: '300px',
key: 'action',
fixed: 'right',
scopedSlots: { customRender: 'action' }, scopedSlots: { customRender: 'action' },
}, },
] ]
@ -187,6 +205,12 @@ export default {
}) })
.finally(() => (this.isLoading = false)) .finally(() => (this.isLoading = false))
}, },
handleVersion(item) {
this.isLoading = true
Api.getVersion({ appid: item.appid }).then(() => {
this.fetchData()
})
},
// //
handleReset() { handleReset() {
this.searchForm.resetFields() this.searchForm.resetFields()

@ -1,7 +1,7 @@
<template> <template>
<a-modal <a-modal
title="新增商城" title="发布体验版"
:width="400" :width="500"
:visible="visible" :visible="visible"
:confirmLoading="confirmLoading" :confirmLoading="confirmLoading"
:maskClosable="false" :maskClosable="false"
@ -12,9 +12,9 @@
<a-form> <a-form>
<a-form-item label="选择模板" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="选择模板" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select v-model="form.template_id"> <a-select v-model="form.template_id">
<a-select-option v-for="(item, index) in templateList" :key="index" :value="item.template_id">{{ <a-select-option v-for="(item, index) in templateList" :key="index" :value="item.template_id"
item.user_version >{{ item.user_version }}-{{ item.user_desc }}</a-select-option
}}</a-select-option> >
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-form> </a-form>
@ -33,7 +33,7 @@ export default {
}, },
// //
wrapperCol: { wrapperCol: {
span: 13, span: 15,
}, },
// modal() // modal()
visible: false, visible: false,

Loading…
Cancel
Save