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',
qrcode: 'wxserve/qrcode',
commit: 'wxserve/commit',
getVersion: 'wxserve/getVersion',
// 商家功能模块管理
module: {

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

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

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

Loading…
Cancel
Save