Commit fe5d3569 by chenxin

fix:智能引擎-营销事件/公众号被关注回复/关键字回复可添加小程序的自定义页面路径

parent b7350fd6
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/main.bead719aa4954befa4b9b828a01a19de.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.22.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/member-group.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.31.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.1.80.js></script><script type=text/javascript src=/marketing/static/js/manifest.c5cd1622ec6089a70a3e.js></script><script type=text/javascript src=/marketing/static/js/vendor.4f54dc53154967b3adc7.js></script><script type=text/javascript src=/marketing/static/js/main.949fc9b6a672743a453a.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/main.b900faa7f2d18ca38103a55924ce3f23.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.22.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/member-group.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.31.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.1.80.js></script><script type=text/javascript src=/marketing/static/js/manifest.06876b0a7575b9c57ad6.js></script><script type=text/javascript src=/marketing/static/js/vendor.4f54dc53154967b3adc7.js></script><script type=text/javascript src=/marketing/static/js/main.949fc9b6a672743a453a.js></script></body></html>
\ No newline at end of file
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(n,o,c){for(var f,i,u,s=0,l=[];s<n.length;s++)i=n[s],t[i]&&l.push(t[i][0]),t[i]=0;for(f in o)Object.prototype.hasOwnProperty.call(o,f)&&(e[f]=o[f]);for(r&&r(n,o,c);l.length;)l.shift()();if(c)for(s=0;s<c.length;s++)u=a(a.s=c[s]);return u};var n={},t={11:0};function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=t[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var n=new Promise(function(n,a){r=t[e]=[n,a]});r[2]=n;var o=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,a.nc&&c.setAttribute("nonce",a.nc),c.src=a.p+"static/js/"+({0:"game",1:"card",2:"wechat",3:"evaluation",4:"message",5:"ecm",6:"recharge",7:"msg",8:"calllog"}[e]||e)+"."+{0:"0ea5eee276916402d464",1:"57d774a0eee201771e11",2:"5aa3ca7e326ef2ff5b56",3:"650a38a154a63ff404db",4:"b240fe6b93138b5f102a",5:"736c7a8174ec65f408fc",6:"727cccae0b80bca129d5",7:"8b5caebf83a79ac810ca",8:"73199fa96bf2a53581b9"}[e]+".js";var f=setTimeout(i,12e4);function i(){c.onerror=c.onload=null,clearTimeout(f);var r=t[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=i,o.appendChild(c),n},a.m=e,a.c=n,a.d=function(e,r,n){a.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="/marketing/",a.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(n,o,c){for(var i,f,u,s=0,l=[];s<n.length;s++)f=n[s],t[f]&&l.push(t[f][0]),t[f]=0;for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);for(r&&r(n,o,c);l.length;)l.shift()();if(c)for(s=0;s<c.length;s++)u=a(a.s=c[s]);return u};var n={},t={11:0};function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=t[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var n=new Promise(function(n,a){r=t[e]=[n,a]});r[2]=n;var o=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,a.nc&&c.setAttribute("nonce",a.nc),c.src=a.p+"static/js/"+({0:"game",1:"card",2:"wechat",3:"evaluation",4:"message",5:"ecm",6:"recharge",7:"msg",8:"calllog"}[e]||e)+"."+{0:"0ea5eee276916402d464",1:"57d774a0eee201771e11",2:"5aa3ca7e326ef2ff5b56",3:"650a38a154a63ff404db",4:"b240fe6b93138b5f102a",5:"05668b6d94780bfa9a5c",6:"727cccae0b80bca129d5",7:"8b5caebf83a79ac810ca",8:"73199fa96bf2a53581b9"}[e]+".js";var i=setTimeout(f,12e4);function f(){c.onerror=c.onload=null,clearTimeout(i);var r=t[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=f,o.appendChild(c),n},a.m=e,a.c=n,a.d=function(e,r,n){a.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="/marketing/",a.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
<template>
<el-dialog title="添加小程序链接" :visible.sync="show" width="600px" class="add-replay-content" :before-close="close">
<el-form label-position="right" ref="form" :model="form" label-width="100px">
<el-form label-position="right" ref="form" :model="form" label-width="100px" v-loading="loading">
<el-form-item class="text-content" label="文本内容">
<el-input v-model="form.title" @keyup.native="toInput(form.title, $event)"></el-input>
<span class="text-num">{{ inputNum }}/{{ inputLength }}</span>
......@@ -54,6 +54,7 @@ export default {
},
data() {
return {
loading: false,
form: {
title: '',
linkStyle: '0',
......@@ -73,11 +74,11 @@ export default {
{
value: 4,
label: '二级功能页'
},
{
value: 5,
label: '自定义页面'
}
// {
// value: 5,
// label: '自定义页面'
// }
],
options2: [],
wechatContent: {}
......@@ -97,16 +98,24 @@ export default {
this.wechatContent = {};
if (val && this.item.ecmMarketingTypeRelationId) {
this.form = JSON.parse(JSON.stringify(this.item));
console.log('编辑', this.item);
// console.log('编辑', this.item);
const pagePath = this.form.pagePath ? JSON.parse(this.form.pagePath) : {};
this.wechatContent.type = pagePath.type;
this.wechatContent.objId = '';
this.wechatContent.title = pagePath.title;
this.wechatContent.pageType = pagePath.pageType;
this.preValue = pagePath.pageType;
this.getNextList(this.preValue).then(res => {
this.nextValue = pagePath.type;
});
if (pagePath.pageType === 5) {
// 自定义链接
this.getCustonList().then(res => {
this.nextValue = pagePath.pageId;
});
} else {
this.getNextList(this.preValue).then(res => {
this.nextValue = pagePath.type;
});
}
}
}
},
......@@ -148,12 +157,12 @@ export default {
},
// 链接类型
changePreValue(val) {
// val==3 导航tabbar页 val==4 二级功能页
// val==3 导航tabbar页 val==4 二级功能页 val==5 自定义链接
this.nextValue = '';
this.options2 = [];
if (val === 5) {
console.log(111);
this.getCustonList();
} else {
this.nextValue = '';
this.getNextList(val);
}
},
......@@ -169,6 +178,40 @@ export default {
this.wechatContent.pageType = this.preValue;
}
},
// 获取自定义链接list
getCustonList() {
return new Promise((resolve, reject) => {
this.loading = true;
this.axios
.post(
'/api-admin/list-custom-page',
qs.stringify({
requestProject: 'gic-web'
})
)
.then(res => {
this.loading = false;
//成功后回调
var data = res.data;
if (data.errorCode == 0) {
this.options2 = data.result.map(v => {
return {
linkId: v.pageId,
name: v.name,
url: v.url
};
});
resolve();
} else {
this.loading = false;
this.$message({
type: 'error',
message: data.message
});
}
});
});
},
// 获得链接类型的二级
getNextList(type) {
return new Promise((resolve, reject) => {
......@@ -183,7 +226,6 @@ export default {
.then(res => {
//成功后回调
var data = res.data;
console.log(data);
if (data.errorCode == 0) {
this.options2 = data.result;
resolve();
......@@ -201,9 +243,21 @@ export default {
ecmMarketingTypeRelationId: this.item.ecmMarketingTypeRelationId,
comName: 'wxa',
title: this.form.title,
mediaId: this.form.mediaId,
pagePath: JSON.stringify(this.wechatContent)
mediaId: this.form.mediaId
};
// 自定义链接
if (this.preValue === 5) {
sendData.pagePath = JSON.stringify({
customUrl: this.options2.find(v => {
return v.linkId === this.nextValue;
}).url,
pageId: this.nextValue,
pageType: 5
});
} else {
sendData.pagePath = JSON.stringify(this.wechatContent);
}
if (!sendData.title) {
this.$message({ type: 'warning', message: '简介未填写' });
return;
......@@ -212,12 +266,11 @@ export default {
this.$message({ type: 'warning', message: '图片未上传' });
return;
}
if (!sendData.pagePath) {
if (!this.preValue || !this.nextValue) {
this.$message({ type: 'warning', message: '链接选择' });
return;
}
console.log(sendData);
return;
this.$emit('sendItem', sendData);
this.close();
},
......
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