Commit 2a36259a by 庄冰

uikefu

parent 96d7a485
......@@ -12,6 +12,7 @@ class TemplatelinkService extends ServiceBase {
this.launchtypeDao = system.getObject("db.configmag.launchtypeDao");
this.marketingsubjectDao = system.getObject("db.configmag.marketingsubjectDao");
this.redisClient = system.getObject("util.redisClient");
this.templateLinkInfoCache={};
}
/**
* 获取模板链接配置参数
......@@ -425,10 +426,17 @@ class TemplatelinkService extends ServiceBase {
lauch_type_code:ab.lauch_type_code,
marketing_subject_code:ab.marketing_subject_code
};
console.log(JSON.stringify(linkObj),"222222222222222222222222222222222");
console.log(this.templateLinkInfoCache,"222222222222222222222222222222222");
shaStr = await sha256(JSON.stringify(linkObj));
shaStr = "templink_"+ab.template_id+"_"+shaStr;
rtn = await this.redisClient.get(shaStr); // 先试图从redis读取数据
if(this.templateLinkInfoCache[shaStr]){
rtn = this.templateLinkInfoCache[shaStr]; //从内存缓存读取数据
}else{
rtn = await this.redisClient.get(shaStr); //从redis读取数据
if(rtn){
this.templateLinkInfoCache[shaStr] = rtn;
}
}
//---- 从redis中读取到数据
if (rtn) {
rtnObj = JSON.parse(rtn);
......@@ -463,6 +471,8 @@ class TemplatelinkService extends ServiceBase {
templateinfo,
linkinfo
};
//将数据保存
this.templateLinkInfoCache[shaStr] = JSON.stringify(rtnObj);
// 将数据保存到redis中
await this.redisClient.set(shaStr, JSON.stringify(rtnObj));
// await this.redisClient.setWithEx(shaStr, JSON.stringify(rtnObj), 60); // 保存的同时设置过期时间
......
.tfhref[data-v-f79a62ac]{width:100%;height:100%;overflow:auto}.tfhref .tfhref_wrapper[data-v-f79a62ac]{display:-webkit-box;display:-ms-flexbox;display:flex}
\ No newline at end of file
.tfhref[data-v-4cccc5f2]{width:100%;height:100%;overflow:auto}.tfhref .tfhref_wrapper[data-v-4cccc5f2]{display:-webkit-box;display:-ms-flexbox;display:flex}.tfhref .kefu[data-v-4cccc5f2]{position:fixed;bottom:0;right:0;z-index:999;width:500px;height:514px;background:#fff;padding:30px 0 0 0;border-radius:10px}.tfhref .kefu .kefu_close[data-v-4cccc5f2]{width:30px;height:30px;background:#fff;border-radius:100px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:20px;cursor:pointer;position:absolute;top:0;right:0}.tfhref .iframeIm[data-v-4cccc5f2]{width:100%;height:100%}
\ No newline at end of file
.tfhref[data-v-2ea3fe64]{width:100%;height:100%;overflow:auto}.tfhref .tfhref_wrapper[data-v-2ea3fe64]{display:-webkit-box;display:-ms-flexbox;display:flex}.tfhref .kefu[data-v-2ea3fe64]{position:fixed;bottom:0;right:0;z-index:999;width:500px;height:514px;background:#fff;padding:30px 0 0 0;border-radius:10px}.tfhref .kefu .kefu_close[data-v-2ea3fe64]{width:30px;height:30px;background:#fff;border-radius:100px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:20px;cursor:pointer;position:absolute;top:0;right:0}.tfhref .iframeIm[data-v-2ea3fe64]{width:100%;height:100%}
\ No newline at end of file
.tfhref[data-v-955a1af6]{width:100%;height:100%;overflow:auto}.tfhref .tfhref_wrapper[data-v-955a1af6]{display:-webkit-box;display:-ms-flexbox;display:flex}.tfhref .iframeIm[data-v-955a1af6]{position:fixed;bottom:0;right:0;z-index:999;width:500px;height:514px}
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/ccc.png><link rel=stylesheet href=//at.alicdn.com/t/font_1996389_21r6b2e5cqci.css><title></title><link href=/css/chunk-10382ef4.45a3c893.css rel=prefetch><link href=/css/chunk-14b9857b.0dc416de.css rel=prefetch><link href=/css/chunk-2c359864.0dc416de.css rel=prefetch><link href=/css/chunk-30cd2266.c8b122a1.css rel=prefetch><link href=/css/chunk-3385141a.0dc416de.css rel=prefetch><link href=/css/chunk-48f0ebf0.e39310ad.css rel=prefetch><link href=/css/chunk-68802b38.5c30cb40.css rel=prefetch><link href=/css/chunk-70a7a49f.2895b44a.css rel=prefetch><link href=/css/chunk-c2e406ea.2a62fa9e.css rel=prefetch><link href=/css/chunk-cc77621c.8797b2b5.css rel=prefetch><link href=/js/chunk-10382ef4.300b7486.js rel=prefetch><link href=/js/chunk-14b9857b.ae43b7c1.js rel=prefetch><link href=/js/chunk-1f11ec07.766ad876.js rel=prefetch><link href=/js/chunk-2c359864.f1f45686.js rel=prefetch><link href=/js/chunk-2d210f61.9e612a95.js rel=prefetch><link href=/js/chunk-30cd2266.a064b746.js rel=prefetch><link href=/js/chunk-3385141a.16d7705b.js rel=prefetch><link href=/js/chunk-48f0ebf0.d23cff46.js rel=prefetch><link href=/js/chunk-5a4e13d5.6ebd883c.js rel=prefetch><link href=/js/chunk-68802b38.6712f94a.js rel=prefetch><link href=/js/chunk-70a7a49f.0768ef12.js rel=prefetch><link href=/js/chunk-780401d4.2594e2ad.js rel=prefetch><link href=/js/chunk-7bbfd8be.a7984e05.js rel=prefetch><link href=/js/chunk-c2e406ea.1241e966.js rel=prefetch><link href=/js/chunk-cc77621c.209c3f4a.js rel=prefetch><link href=/js/chunk-d710b6d2.9eff4b27.js rel=prefetch><link href=/css/app.a0c5a847.css rel=preload as=style><link href=/css/chunk-vendors.a0428467.css rel=preload as=style><link href=/js/app.0ca34b80.js rel=preload as=script><link href=/js/chunk-vendors.0726fb51.js rel=preload as=script><link href=/css/chunk-vendors.a0428467.css rel=stylesheet><link href=/css/app.a0c5a847.css rel=stylesheet></head><body><noscript><strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.0726fb51.js></script><script src=/js/app.0ca34b80.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/ccc.png><link rel=stylesheet href=//at.alicdn.com/t/font_1996389_21r6b2e5cqci.css><title></title><link href=/css/chunk-01de7173.68d73be0.css rel=prefetch><link href=/css/chunk-14b9857b.0dc416de.css rel=prefetch><link href=/css/chunk-2c359864.0dc416de.css rel=prefetch><link href=/css/chunk-3385141a.0dc416de.css rel=prefetch><link href=/css/chunk-60962e1f.73690a1f.css rel=prefetch><link href=/css/chunk-68802b38.5c30cb40.css rel=prefetch><link href=/css/chunk-6feb7ee6.c24e44b5.css rel=prefetch><link href=/css/chunk-c2e406ea.2a62fa9e.css rel=prefetch><link href=/css/chunk-cc77621c.8797b2b5.css rel=prefetch><link href=/css/chunk-e2a007e0.71b15854.css rel=prefetch><link href=/js/chunk-01de7173.d51429dd.js rel=prefetch><link href=/js/chunk-14b9857b.ae43b7c1.js rel=prefetch><link href=/js/chunk-1f11ec07.766ad876.js rel=prefetch><link href=/js/chunk-2c359864.f1f45686.js rel=prefetch><link href=/js/chunk-2d210f61.9e612a95.js rel=prefetch><link href=/js/chunk-3385141a.16d7705b.js rel=prefetch><link href=/js/chunk-5a4e13d5.6ebd883c.js rel=prefetch><link href=/js/chunk-60962e1f.166552bd.js rel=prefetch><link href=/js/chunk-68802b38.6712f94a.js rel=prefetch><link href=/js/chunk-6feb7ee6.9d37210b.js rel=prefetch><link href=/js/chunk-780401d4.2594e2ad.js rel=prefetch><link href=/js/chunk-7bbfd8be.a7984e05.js rel=prefetch><link href=/js/chunk-c2e406ea.1241e966.js rel=prefetch><link href=/js/chunk-cc77621c.209c3f4a.js rel=prefetch><link href=/js/chunk-d710b6d2.9eff4b27.js rel=prefetch><link href=/js/chunk-e2a007e0.7f527d11.js rel=prefetch><link href=/css/app.a0c5a847.css rel=preload as=style><link href=/css/chunk-vendors.a0428467.css rel=preload as=style><link href=/js/app.182f04b6.js rel=preload as=script><link href=/js/chunk-vendors.4f6ffd43.js rel=preload as=script><link href=/css/chunk-vendors.a0428467.css rel=stylesheet><link href=/css/app.a0c5a847.css rel=stylesheet></head><body><noscript><strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.4f6ffd43.js></script><script src=/js/app.182f04b6.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-10382ef4"],{"0b52":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"tfhref"},e._l(e.moduleList,(function(t){return n("div",{key:t.id,staticClass:"tfhref_wrapper"},e._l(t.acraoList,(function(e){return n("Acrao",{key:e.id,attrs:{config:e}})})),1)})),0)},i=[],c=(n("5ab2"),n("e10e"),n("5748")),o=(n("6d57"),n("ce3c")),a=(n("6a61"),n("cf7f")),s=n("8586"),u=n("9f3a"),l=n("6205"),f=n("759e"),d=n.n(f);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){Object(o["a"])(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}console.log(d.a);var b={components:{Acrao:s["a"]},data:function(){return{moduleList:[]}},mounted:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getModuleList();case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:m({getModuleList:function(){var e=this,t=this.$route.query,n={channel_code:t.source,business_type_code:t.business,lauch_type_code:t.type,marketing_subject_code:t.for,else_channel_param:t.event,template_id:t.id,device:t.device};Object(l["g"])(n).then((function(t){if(200==t.status&&0==t.data.status){var n=t.data.data;e.setIcon(n.templateinfo),e.setWebKey(n.templateinfo),e.saveLinkinfo(n.linkinfo),n.templateinfo.template_content&&(e.moduleList=JSON.parse(d.a.inflate(n.templateinfo.template_content,{to:"string"})).list,e.moduleList.forEach((function(t){t.id>e.moduleIndex&&(e.moduleIndex=t.id+1)})))}}))},setWebKey:function(e){document.title=e.title;var t=document.getElementsByTagName("head")[0],n=document.createElement("meta"),r=document.createElement("meta"),i=n,c=r;i.setAttribute("name","keywords"),i.setAttribute("content",e.keyword),c.setAttribute("name","description"),c.setAttribute("content",e.describe),t.appendChild(i),t.appendChild(c)},setIcon:function(e){var t=Object(c["a"])(document.getElementsByTagName("link")),n=t.filter((function(e){return"icon"==e.rel}))[0];n.setAttribute("href",e.pic_url)}},Object(u["d"])({saveLinkinfo:"template/saveLinkinfo"}))},h=b,y=(n("79b9"),n("9ca4")),O=Object(y["a"])(h,r,i,!1,null,"f79a62ac",null);t["default"]=O.exports},"79b9":function(e,t,n){"use strict";var r=n("7e38"),i=n.n(r);i.a},"7e38":function(e,t,n){}}]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-60962e1f"],{bf42:function(e,t,r){},e1fd:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"tfhref"},[e._l(e.moduleList,(function(t){return r("div",{key:t.id,staticClass:"tfhref_wrapper"},e._l(t.acraoList,(function(e){return r("Acrao",{key:e.id,attrs:{config:e}})})),1)})),r("div",{directives:[{name:"show",rawName:"v-show",value:e.isIframeShow,expression:"isIframeShow"}],staticClass:"kefu"},[r("div",{staticClass:"kefu_close"},[r("Icon",{attrs:{type:"md-close"},on:{click:e.closeKefu}})],1),r("iframe",{staticClass:"iframeIm",attrs:{src:"https://swt.gongsibao.com/LR/Chatpre.aspx?id=MGF22027130&lng=cn",frameborder:"0"}})])],2)},o=[],s=(r("5ab2"),r("e10e"),r("6d57"),r("ce3c")),a=r("759e"),c=r.n(a),i=r("8586"),f=r("6205"),u=r("9f3a");function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){Object(s["a"])(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p={components:{Acrao:i["a"]},data:function(){return{moduleList:[]}},computed:d({},Object(u["e"])({isIframeShow:function(e){return e.template.isIframeShow}})),mounted:function(){this.getTemplateConfig()},methods:d({getTemplateConfig:function(){var e=this,t=this.$route.query.template_code;Object(f["c"])(t).then((function(t){if(200==t.status&&0==t.data.status){var r=t.data.data;r&&r.template_content&&(e.moduleList=JSON.parse(c.a.inflate(r.template_content,{to:"string"})).list,e.moduleList.forEach((function(t){t.id>e.moduleIndex&&(e.moduleIndex=t.id+1)})))}}))},closeKefu:function(){this.setIsIframeShow(!1)}},Object(u["d"])({setIsIframeShow:"template/setIsIframeShow"})),destroyed:function(){this.setIsIframeShow(!1)}},m=p,h=(r("e8f5"),r("9ca4")),b=Object(h["a"])(m,n,o,!1,null,"4cccc5f2",null);t["default"]=b.exports},e8f5:function(e,t,r){"use strict";var n=r("bf42"),o=r.n(n);o.a}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6feb7ee6"],{"0675":function(e,t,n){"use strict";var r=n("6fbb"),a=n.n(r);a.a},"0b52":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"tfhref"},[e._l(e.moduleList,(function(t){return n("div",{key:t.id,staticClass:"tfhref_wrapper"},e._l(t.acraoList,(function(e){return n("Acrao",{key:e.id,attrs:{config:e}})})),1)})),n("div",{directives:[{name:"show",rawName:"v-show",value:e.isIframeShow,expression:"isIframeShow"}],staticClass:"kefu"},[n("div",{staticClass:"kefu_close"},[n("Icon",{attrs:{type:"md-close"},on:{click:e.closeKefu}})],1),n("iframe",{staticClass:"iframeIm",attrs:{src:"https://swt.gongsibao.com/LR/Chatpre.aspx?id=MGF22027130&lng=cn",frameborder:"0"}})])],2)},a=[],i=(n("5ab2"),n("e10e"),n("5748")),o=(n("6d57"),n("6a61"),n("cf7f")),s=n("ce3c"),c=n("759e"),u=n.n(c),f=n("8586"),l=n("9f3a"),d=n("6205");function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){Object(s["a"])(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b={components:{Acrao:f["a"]},data:function(){return{moduleList:[]}},computed:p({},Object(l["e"])({isIframeShow:function(e){return e.template.isIframeShow}})),mounted:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getModuleList();case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:p(p({getModuleList:function(){var e=this,t=this.$route.query,n={channel_code:t.source,business_type_code:t.business,lauch_type_code:t.type,marketing_subject_code:t.for,else_channel_param:t.event,template_id:t.id,device:t.device};Object(d["g"])(n).then((function(t){if(200==t.status&&0==t.data.status){var n=t.data.data;e.setIcon(n.templateinfo),e.setWebKey(n.templateinfo),e.saveLinkinfo(n.linkinfo),n.templateinfo.template_content&&(e.moduleList=JSON.parse(u.a.inflate(n.templateinfo.template_content,{to:"string"})).list,e.moduleList.forEach((function(t){t.id>e.moduleIndex&&(e.moduleIndex=t.id+1)})))}}))},setWebKey:function(e){document.title=e.title;var t=document.getElementsByTagName("head")[0],n=document.createElement("meta"),r=document.createElement("meta"),a=n,i=r;a.setAttribute("name","keywords"),a.setAttribute("content",e.keyword),i.setAttribute("name","description"),i.setAttribute("content",e.describe),t.appendChild(a),t.appendChild(i)},setIcon:function(e){var t=Object(i["a"])(document.getElementsByTagName("link")),n=t.filter((function(e){return"icon"==e.rel}))[0];n.setAttribute("href",e.pic_url)},closeKefu:function(){this.setIsIframeShow(!1)}},Object(l["d"])({setIsIframeShow:"template/setIsIframeShow",saveLinkinfo:"template/saveLinkinfo"})),{},{destroyed:function(){this.setIsIframeShow(!1)}})},h=b,w=(n("0675"),n("9ca4")),v=Object(w["a"])(h,r,a,!1,null,"2ea3fe64",null);t["default"]=v.exports},"6fbb":function(e,t,n){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-70a7a49f"],{"9f0a":function(t,e,n){"use strict";var a=n("fd44"),o=n.n(a);o.a},e1fd:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"tfhref"},t._l(t.moduleList,(function(e){return n("div",{key:e.id,staticClass:"tfhref_wrapper"},t._l(e.acraoList,(function(t){return n("Acrao",{key:t.id,attrs:{config:t}})})),1)})),0)},o=[],i=(n("6d57"),n("8586")),s=n("6205"),c=n("759e"),u=n.n(c),d={components:{Acrao:i["a"]},data:function(){return{moduleList:[]}},mounted:function(){this.getTemplateConfig()},methods:{getTemplateConfig:function(){var t=this,e=this.$route.query.template_code;Object(s["c"])(e).then((function(e){if(console.log(e),200==e.status&&0==e.data.status){console.log(e.data.data);var n=e.data.data;n&&n.template_content&&(t.moduleList=JSON.parse(u.a.inflate(n.template_content,{to:"string"})).list,console.log(t.moduleList),t.moduleList.forEach((function(e){e.id>t.moduleIndex&&(t.moduleIndex=e.id+1)})))}}))}}},l=d,r=(n("9f0a"),n("9ca4")),f=Object(r["a"])(l,a,o,!1,null,"955a1af6",null);e["default"]=f.exports},fd44:function(t,e,n){}}]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
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