Commit 20c7bde2 authored by 刘世达's avatar 刘世达

Merge branch 'feat-link-add-vccChannel' into 'master'

feat: 生成链接上增加vccChannel

See merge request !108
parents 174bfa4f f2da41cd
...@@ -9,113 +9,118 @@ ...@@ -9,113 +9,118 @@
</QGTable> </QGTable>
</template> </template>
<script> <script>
import editorApi from '@api/editor.api'; import editorApi from "@api/editor.api";
import QGTable from '@editor/component/QgTable/index.vue'; import QGTable from "@editor/component/QgTable/index.vue";
import config from '@/config/index'; import config from "@/config/index";
export default { export default {
components: { components: {
QGTable, QGTable,
}, },
data(){ data() {
return { return {
columns: [ columns: [
{ {
key: 'id', key: "id",
title: '编号', title: "编号",
formType: 'input', formType: "input",
hideSearch: true hideSearch: true,
}, },
{ {
key: 'pageName', key: "pageName",
title: '名称', title: "名称",
formType: 'input', formType: "input",
}, },
{ {
key: 'pageDescribe', key: "pageDescribe",
title: '描述', title: "描述",
formType: 'input', formType: "input",
}, },
{ {
key: 'uuid', key: "uuid",
title: 'uuid', title: "uuid",
formType: 'input', formType: "input",
hideTable: true, hideTable: true,
}, },
{ {
key: 'author', key: "author",
title: '作者', title: "作者",
formType: 'input', formType: "input",
}, },
{ {
key: 'coverImage', key: "coverImage",
title: '封面', title: "封面",
hideSearch: true, hideSearch: true,
render: (h, params) => { render: (h, params) => {
return h( return h(
'div', "div",
{ {
style: { style: {
textAlign: 'left', textAlign: "left",
display: 'flex', display: "flex",
alignItems: 'center', alignItems: "center",
justifyContent: 'center', justifyContent: "center",
padding: '10px 0' padding: "10px 0",
}, },
}, },
[h( [
'img',{ h("img", {
attrs: { attrs: {
src: params.row.coverImage + '?imageMogr2/format/jpg/thumbnail/!10p', src:
params.row.coverImage +
"?imageMogr2/format/jpg/thumbnail/!10p",
}, },
style: { style: {
width: '37.5px', width: "37.5px",
height: '66.7px', height: "66.7px",
objectFit: 'contain' objectFit: "contain",
} },
} }),
)] ]
); );
}, },
}, },
{ {
key: 'id', key: "id",
title: '链接', title: "链接",
hideSearch: true, hideSearch: true,
render: (h, params) => { render: (h, params) => {
return h('span', `${config.h5Host}/activity/${params.row.uuid}?tenantId=${params.row.tenantId}&vccToken={token}&appChannel={appChannel}`) return h(
} "span",
`${config.h5Host}/activity/${params.row.uuid}?tenantId=${params.row.tenantId}&vccToken={token}&appChannel={appChannel}&vccChannel={registerFrom}`
);
},
}, },
{ {
key: 'isTemplate', key: "isTemplate",
title: '是否模板', title: "是否模板",
formType: 'select', formType: "select",
number: true, number: true,
hideSearch: true, hideSearch: true,
valueEnum: { valueEnum: {
0: '', 0: "",
1: '', 1: "",
} },
}, },
{ {
key: 'updatedAt', key: "updatedAt",
title: '更新时间', title: "更新时间",
hideSearch: true hideSearch: true,
}, },
{ {
key: 'action', key: "action",
title: '操作', title: "操作",
width: 250, width: 250,
render: (h, params) => { render: (h, params) => {
const props = { const props = {
type: 'primary', type: "primary",
}; };
const style = { const style = {
display: 'inline-block', display: "inline-block",
margin: '5px', margin: "5px",
}; };
const btnArr = [ const btnArr = [
h( h(
'Button', "Button",
{ {
props, props,
style: { style: {
...@@ -123,14 +128,16 @@ export default { ...@@ -123,14 +128,16 @@ export default {
}, },
on: { on: {
click: () => { click: () => {
window.open(`${config.h5Host}/activity/${params.row.uuid}?tenantId=${params.row.tenantId}&isPreview=1`); window.open(
`${config.h5Host}/activity/${params.row.uuid}?tenantId=${params.row.tenantId}&isPreview=1`
);
}, },
}, },
}, },
'预览' "预览"
), ),
h( h(
'Button', "Button",
{ {
props, props,
style: { style: {
...@@ -143,15 +150,18 @@ export default { ...@@ -143,15 +150,18 @@ export default {
}, },
}, },
}, },
'修改' "修改"
), ),
h( h(
'Button', "Button",
{ {
props, props,
style: { style: {
...style, ...style,
display: params.row.pageHistory && params.row.pageHistory.length ? 'inline-block' : 'none' display:
params.row.pageHistory && params.row.pageHistory.length
? "inline-block"
: "none",
}, },
on: { on: {
click: () => { click: () => {
...@@ -159,21 +169,21 @@ export default { ...@@ -159,21 +169,21 @@ export default {
}, },
}, },
}, },
'历史记录' "历史记录"
), ),
h( h(
'Poptip', "Poptip",
{ {
props: { props: {
confirm: true, confirm: true,
transfer: true, transfer: true,
title: '确认删除?', title: "确认删除?",
}, },
style: { style: {
...style, ...style,
}, },
on: { on: {
'on-ok': async () => { "on-ok": async () => {
await editorApi.delPageById(params.row.id); await editorApi.delPageById(params.row.id);
this.$refs.qgTable.query(); this.$refs.qgTable.query();
}, },
...@@ -181,20 +191,20 @@ export default { ...@@ -181,20 +191,20 @@ export default {
}, },
[ [
h( h(
'Button', "Button",
{ {
props, props,
}, },
'删除' "删除"
), ),
] ]
), ),
]; ];
return h( return h(
'div', "div",
{ {
style: { style: {
textAlign: 'center', textAlign: "center",
}, },
}, },
btnArr btnArr
...@@ -202,25 +212,25 @@ export default { ...@@ -202,25 +212,25 @@ export default {
}, },
}, },
], ],
} };
}, },
methods: { methods: {
async query(data) { async query(data) {
return editorApi.getPageList({ type: 'list', ...data }); return editorApi.getPageList({ type: "list", ...data });
}, },
addPage() { addPage() {
this.$router.push('/detail'); this.$router.push("/detail");
}, },
async refreshData() { async refreshData() {
try { try {
await editorApi.refreshCache(); await editorApi.refreshCache();
this.$Notice.success({ title: '刷新成功!' }); this.$Notice.success({ title: "刷新成功!" });
} catch (error) { } catch (error) {
console.log(error); console.log(error);
this.$Notice.warning({ title: '刷新失败!' }); this.$Notice.warning({ title: "刷新失败!" });
} }
}, },
}, },
mounted(){} mounted() {},
} };
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment