2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages2/editCms/preview"],{390:function(e,n,t){"use strict";(function(e,n){var o=t(4);t(26),t(27);o(t(25));var r=o(t(391));e.__webpack_require_UNI_MP_PLUGIN__=t,n(r.default)}).call(this,t(1)["default"],t(2)["createPage"])},391:function(e,n,t){"use strict";t.r(n);var o=t(392),r=t(394);for(var u in r)["default"].indexOf(u)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(u);t(396);var i,c=t(46),a=Object(c["default"])(r["default"],o["render"],o["staticRenderFns"],!1,null,"14a86505",null,!1,o["components"],i);a.options.__file="pages2/editCms/preview.vue",n["default"]=a.exports},392:function(e,n,t){"use strict";t.r(n);var o=t(393);t.d(n,"render",(function(){return o["render"]})),t.d(n,"staticRenderFns",(function(){return o["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return o["recyclableRender"]})),t.d(n,"components",(function(){return o["components"]}))},393:function(e,n,t){"use strict";var o;t.r(n),t.d(n,"render",(function(){return r})),t.d(n,"staticRenderFns",(function(){return i})),t.d(n,"recyclableRender",(function(){return u})),t.d(n,"components",(function(){return o}));try{o={uniNavBar:function(){return t.e("uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar").then(t.bind(null,803))},uParse:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-parse/u-parse")]).then(t.bind(null,719))},uniCard:function(){return t.e("uni_modules/uni-card/components/uni-card/uni-card").then(t.bind(null,728))},uRadioGroup:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-radio-group/u-radio-group")]).then(t.bind(null,743))},uRadio:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-radio/u-radio")]).then(t.bind(null,751))},uCheckboxGroup:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-checkbox-group/u-checkbox-group")]).then(t.bind(null,759))},uCheckbox:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-checkbox/u-checkbox")]).then(t.bind(null,767))},uTabbar:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-tabbar/u-tabbar")]).then(t.bind(null,258))},uTabbarItem:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-tabbar-item/u-tabbar-item")]).then(t.bind(null,266))},hqsPopup:function(){return t.e("components/hqs-popup/hqs-popup").then(t.bind(null,954))},uniGrid:function(){return t.e("uni_modules/uni-grid/components/uni-grid/uni-grid").then(t.bind(null,775))},uniGridItem:function(){return t.e("uni_modules/uni-grid/components/uni-grid-item/uni-grid-item").then(t.bind(null,782))},uniIcons:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(t.bind(null,578))}}}catch(c){if(-1===c.message.indexOf("Cannot find module")||-1===c.message.indexOf(".vue"))throw c;console.error(c.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var r=function(){var e=this,n=e.$createElement,t=(e._self._c,e.__map(e.cms.cmsLst,(function(n,t){var o=e.__get_orig(n),r="vote"===n.type&&n.vote.type===e.voteType[2]?e.__map(n.vote.voteLst,(function(t,o){var r=e.__get_orig(t),u=e.isCheckboxDisabled(n.vote.selectValue,t.value);return{$orig:r,m0:u}})):null;return{$orig:o,l0:r}})));e.$mp.data=Object.assign({},{$root:{l1:t}})},u=!1,i=[];r._withStripped=!0},394:function(e,n,t){"use strict";t.r(n);var o=t(395),r=t.n(o);for(var u in o)["default"].indexOf(u)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(u);n["default"]=r.a},395:function(e,n,t){"use strict";(function(e,o){var r=t(4);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var u=r(t(28)),i=r(t(31)),c=t(192),a=(e.importObject("uni-id-co"),function(){Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-radio-group/u-radio-group")]).then(function(){return resolve(t(743))}.bind(null,t)).catch(t.oe)}),l=function(){Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-radio/u-radio")]).then(function(){return resolve(t(751))}.bind(null,t)).catch(t.oe)},s=function(){Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-parse/u-parse")]).then(function(){return resolve(t(719))}.bind(null,t)).catch(t.oe)},m=function(){Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-tabbar/u-tabbar")]).then(function(){return resolve(t(258))}.bind(null,t)).catch(t.oe)},d=function(){Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-tabbar-item/u-tabbar-item")]).then(function(){return resolve(t(266))}.bind(null,t)).catch(t.oe)},p=function(){t.e("components/image-grid/media-list").then(function(){return resolve(t(796))}.bind(null,t)).catch(t.oe)},f=function(){t.e("components/cloud-image").then(function(){return resolve(t(612))}.bind(null,t)).catch(t.oe)},h=function(){Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-checkbox-group/u-checkbox-group")]).then(function(){return resolve(t(759))}.bind(null,t)).catch(t.oe)},_=function(){Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-checkbox/u-checkbox")]).then(function(){return resolve(t(767))}.bind(null,t)).catch(t.oe)},b={computed:{btn_send_commends_color:function(){return this.temp?"background-color: ".concat(this.temp.btn_send_commends_color,";"):""},btn_send_commends_font_color:function(){return this.temp?"color: ".concat(this.temp.btn_send_commends_font_color,";"):""},btn_color:function(){return this.temp?"color: ".concat(this.temp.btn_color):""},select_icon_color:function(){return this.temp?"".concat(this.temp.select_icon_color,";"):""},icon_color:function(){return this.temp?"".concat(this.temp.icon_color,";"):""},icon_font_color:function(){return this.temp?"color:".concat(this.temp.icon_color,";"):""},select_font_color:function(){return this.temp?"color: ".concat(this.temp.select_icon_color,";"):""},backgrond_color:function(){return this.temp?"background-color: ".concat(this.temp.backgrond_color,";"):""},color:function(){return this.temp?"color: ".concat(this.temp.font_color,";"):""},userInfo:function(){return c.store.userInfo},realNameStatus:function(){return this.userInfo.realNameAuth?this.userInfo.realNameAuth.authStatus:0},isExpired:function(e){return new Date>new Date(e)}},onShow:function(){var e=this;return(0,i.default)(u.default.mark((function n(){var t;return u.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t=o.getStorageSync("cms"),e.titleContent=t.title_html,e.cms=t,n.next=5,e.getTemp();case 5:case"end":return n.stop()}}),n)})))()},components:{uTabbar:m,uTabbarItem:d,mediaList:p,uParse:s,cloudImage:f,uRadioGroup:a,uRadio:l,uCheckboxGroup:h,uCheckbox:_},data:function(){return{voteType:["单选(默认)","多选,无限制","多选, 最多两项"],voteEndTime:"2025-04-20 23:59:59",cms:{},temp:{},titleContent:"",con:"<p>露从今夜白,月是故乡明</p>",tabbarValue:0,tabbarText:[{text:"模板"},{text:"音乐"},{text:"排版"}],currentTemplate:"",templateConfig:[],showPop:!1,popFrom:"bottom",list:new Array(20).fill(0),maskClick:!0}},methods:{isCheckboxDisabled:function(e,n){return console.log(e,n),!(e.length<2||e.includes(n))},checkboxChange:function(e){console.log(e)},groupChange:function(e){console.log("groupChange",e)},radioChange:function(e){console.log("radioChange",e)},formatDate:function(e,n){var t={yyyy:e.getFullYear(),MM:String(e.getMonth()+1).padStart(2,"0"),dd:String(e.getDate()).padStart(2,"0"),HH:String(e.getHours()).padStart(2,"0"),mm:String(e.getMinutes()).padStart(2,"0"),ss:String(e.getSeconds()).padStart(2,"0")};return n.replace(/yyyy|MM|dd|HH|mm|ss/g,(function(e){return t[e]}))},formatTime:function(){return this.formatDate(new Date,"yyyy-MM-dd HH:mm")},getTemp:function(){var n=this;return(0,i.default)(u.default.mark((function t(){var o;return u.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log(n.currentTemplate),"not_image"===n.currentTemplate&&(n.temp={}),n.currentTemplate){t.next=5;break}return n.temp={},t.abrupt("return");case 5:return t.next=7,e.importObject("uni-cms-articles").getTemp({temp_id:n.currentTemplate});case 7:o=t.sent,console.log(o),200===o.code&&(n.temp=o.data);case 10:case"end":return t.stop()}}),t)})))()},updateTemplate:function(e){var n=this;return(0,i.default)(u.default.mark((function t(){return u.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return console.log(e),n.currentTemplate=e,t.next=4,n.getTemp();case 4:case"end":return t.stop()}}),t)})))()},onBack:function(){o.showToast({title:"test"})},onShowPopup:function(e){this.showPop=e.detail.value},onMaskClick:function(e){this.maskClick=e.detail.value},showPopupFrom:function(e){this.showPop=!0},tabbarClick:function(e){console.log(e),this.tabbarValue=e,this.showPopupFrom()},success:function(){var n=this;return(0,i.default)(u.default.mark((function t(){var r,i,c,a,l,s,m,d,p,f,h,_,b,g;return u.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=o.getStorageSync("cms"),i=r._id,r.title,r.title_html,r.title_delta,c=n.currentTemplate,"",a="mobile",l=0,s=1,m=n.userInfo._id,r.cmsLst,d="",t.next=15,e.importObject("user-info").getIP({uid:n.userInfo._id});case 15:if(p=t.sent,f=200===p.code?p.data.last_login_ip:"",console.log(f),console.log(n.userInfo),console.log(r),console.log(i),!i){t.next=44;break}return h={},h.id=i,h.title=r.title,h.user_id=m,h.title_html=r.title_html,h.title_delta=r.title_delta,h.thumbnail=r.thumbnail,h.p_type=r.p_type,h.category_id=r.category_id,h.temp_id=c,h.edit_type=a,h.view_count=l,h.cmsLst=r.cmsLst,h.excerpt=d,h.last_modify_ip=f,h.article_status=s,t.next=40,e.importObject("uni-cms-articles").update_cms_articles(h);case 40:_=t.sent,console.log(_),t.next=64;break;case 44:return b={},b.title=r.title,b.user_id=m,b.title_html=r.title_html,b.title_delta=r.title_delta,b.thumbnail=r.thumbnail,b.p_type=r.p_type,b.category_id=r.category_id,b.temp_id=c,b.edit_type=a,b.view_count=l,b.cmsLst=r.cmsLst,b.excerpt=d,b.last_modify_ip=f,b.article_status=s,console.log(b),t.next=62,e.importObject("uni-cms-articles").add_cms_articles(b);case 62:g=t.sent,console.log(g);case 64:o.setStorageSync("cms",""),o.switchTab({url:"/pages/my/my"});case 66:case"end":return t.stop()}}),t)})))()},back:function(){return(0,i.default)(u.default.mark((function e(){return u.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:o.navigateBack({delta:1,fail:function(e){o.navigateTo({url:"/pages2/editCms/editCms"})}});case 1:case"end":return e.stop()}}),e)})))()}}};n.default=b}).call(this,t(27)["uniCloud"],t(2)["default"])},396:function(e,n,t){"use strict";t.r(n);var o=t(397),r=t.n(o);for(var u in o)["default"].indexOf(u)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(u);n["default"]=r.a},397:function(e,n,t){}},[[390,"common/runtime","common/vendor"]]]);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages2/editCms/preview.js.map
|