(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/zc/wzDetail"],{"1c13":function(e,t,n){"use strict";var o=n("cf85"),i=n.n(o);i.a},"1f55":function(e,t,n){"use strict";n.r(t);var o=n("9c89"),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=i.a},"9c89":function(e,t,n){"use strict";(function(e){var o=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n("9523")),a=n("82ba"),r=n("cd04"),c=o(n("f6c5")),s=n("26cb");function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var f={data:function(){return{id:"",info:{},shareShow:!1,shareImage:""}},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,s.mapState)("user",["hasLogin","userInfo"])),onLoad:function(t){if(t.id&&(this.id=t.id),t.scene&&"string"==typeof t.scene){var n=("{"+t.scene+"}").replace("qr%26","").replace(/%3D/g,":").replace(/%26/g,",").replace("id",'"id"').replace("pid",'"pid"').replace(/=/g,":").replace(/&/g,",");console.log(n,"scene");var o=JSON.parse(n);console.log(o),this.id=o.id,o.pid&&e.setStorageSync("spread",o.pid)}},onShow:function(){this.loadData()},onReachBottom:function(){},onReady:function(){},onShareAppMessage:function(e){if(console.log(this.share),"button"===e.from){var t=getCurrentPages(),n=t[t.length-1],o="/"+n.route+"?";for(var i in n.options)o+=i+"="+n.options[i]+"&";o+="pid="+this.userInfo.uid;var a={path:o,imageUrl:this.info.share_images[0],title:this.info.title};return console.log("data",a),a}},methods:{loadData:function(){var e=this;(0,a.details)({},this.id).then((function(t){var n=t.data;n.content=n.content.replace(/<img/g,'<img class="rich-img"').replace(/<p>\s*<img/g,'<p class="pHeight"><img'),n.content=e.getVideo(n.content),e.info=n}))},wzdz:function(){var e=this;(0,r.article_good)({},this.id).then((function(t){0==e.info.user_good?(e.info.user_good=1,e.info.goods_count+=1):(e.info.user_good=0,e.info.goods_count-=1)}))},shareLink:function(e){console.log("dainjideniang"),this.shareShow=!0},navTo:function(t){e.navigateTo({url:t})},shareToFriend:function(){var t=this,n=this;e.showLoading({title:"Loading...",mask:!0}),(0,r.article_poster)({},this.id).then((function(o){var i=o.data;n.shareImage=i.url,console.log(n.shareImage,"123456"),e.hideLoading(),t.$refs.popupshare.open()})).catch((function(t){e.hideLoading()}))},copy:function(){var e=this;(0,r.short_link)({url:"pages/zc/wzDetail?id="+this.id}).then((function(t){var n=t.data;console.log(n),e.comfirm(n.link)}))},comfirm:function(t){console.log(t);var n=(0,c.default)(t);!1===n?e.showToast({title:"不支持"}):e.showToast({title:"复制成功",icon:"none"})},cancel:function(){this.shareShow=!1},saveImg:function(t){console.log(t);e.downloadFile({url:this.shareImage,success:function(t){console.log(t.tempFilePath),e.saveImageToPhotosAlbum({filePath:t.tempFilePath,success:function(t){e.showToast({title:"保存成功",icon:"none"})}})}})},getVideo:function(e){var t=[],n=/src=[\'\"]?([^\'\"]*)[\'\"]?/i,o=e.match(/<video.*?(?:>|\/>)/gi)||[],i=e.split("</video>");o.forEach((function(e,o){var i=e.match(n);t.push(i[1])}));var a=[];return i.forEach((function(e,n){""!=e&&void 0!=e&&a.push({type:"rich-text",value:e+"</video>"});var o=i.length;n<o&&void 0!=t[n]&&a.push({type:"video",value:t[n]})})),a}}};t.default=f}).call(this,n("543d")["default"])},a698:function(e,t,n){"use strict";(function(e,t){var o=n("4ea4");n("d1cd");o(n("66fd"));var i=o(n("f9da"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},cf85:function(e,t,n){},f9da:function(e,t,n){"use strict";n.r(t);var o=n("fa53"),i=n("1f55");for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("1c13");var r=n("f0c5"),c=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);t["default"]=c.exports},fa53:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return o}));var o={uniPopup:function(){return n.e("components/uni-popup/uni-popup").then(n.bind(null,"1808"))}},i=function(){var e=this.$createElement;this._self._c},a=[]}},[["a698","common/runtime","common/vendor"]]]);