zx/public/static/js/pages-store-settled-index.2...

1 line
44 KiB
JavaScript
Raw Normal View History

2024-07-02 15:32:59 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-store-settled-index"],{"00f0":function(t,e,i){"use strict";i.r(e);var a=i("292c"),n=i("3424");for(var r in n)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(r);i("2b95");var o=i("828b"),s=Object(o["a"])(n["default"],a["b"],a["c"],!1,null,"34bb09ab",null,!1,a["a"],void 0);e["default"]=s.exports},"0d43":function(module,exports,__webpack_require__){"use strict";__webpack_require__("6a54");var _interopRequireDefault=__webpack_require__("f5bd").default;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _createForOfIteratorHelper2=_interopRequireDefault(__webpack_require__("3471"));__webpack_require__("5ef2"),__webpack_require__("4626"),__webpack_require__("5ac7"),__webpack_require__("5c47"),__webpack_require__("2c10"),__webpack_require__("a1c1"),__webpack_require__("e838"),__webpack_require__("c223"),__webpack_require__("aa9c");var rpx=uni.getSystemInfoSync().screenWidth/750,cfg=__webpack_require__("dc04"),_default={name:"parser",data:function(){return{uid:this._uid,scaleAm:"",showAm:"",imgs:[],nodes:[]}},props:{html:null,autopause:{type:Boolean,default:!0},autosetTitle:{type:Boolean,default:!0},domain:String,gestureZoom:Boolean,lazyLoad:Boolean,selectable:Boolean,tagStyle:Object,showWithAnimation:Boolean,useAnchor:Boolean},watch:{html:function(t){this.setContent(t)}},mounted:function(){this.imgList=[],this.imgList.each=function(t){for(var e=0,i=this.length;e<i;e++)this.setItem(e,t(this[e],e,this))},this.imgList.setItem=function(t,e){if(void 0!=t&&e){if(0==e.indexOf("http")&&this.includes(e)){for(var i,a="",n=0;i=e[n];n++){if("/"==i&&"/"!=e[n-1]&&"/"!=e[n+1])break;a+=Math.random()>.5?i.toUpperCase():i}return a+=e.substr(n),this[t]=a}if(this[t]=e,e.includes("data:image")){var r=e.match(/data:image\/(\S+?);(\S+?),(.+)/);if(!r)return}}},this.html&&this.setContent(this.html)},beforeDestroy:function(){this._observer&&this._observer.disconnect(),this.imgList.each((function(t){})),clearInterval(this._timer)},methods:{_Dom2Str:function(t){var e,i="",a=(0,_createForOfIteratorHelper2.default)(t);try{for(a.s();!(e=a.n()).done;){var n=e.value;if("text"==n.type)i+=n.text;else{for(var r in i+="<"+n.name,n.attrs||{})i+=" "+r+'="'+n.attrs[r]+'"';n.children&&n.children.length?i+=">"+this._Dom2Str(n.children)+"</"+n.name+">":i+=">"}}}catch(o){a.e(o)}finally{a.f()}return i},_handleHtml:function(t,e){if("string"!=typeof t&&(t=this._Dom2Str(t.nodes||t)),t.includes("rpx")&&(t=t.replace(/[0-9.]+\s*rpx/g,(function(t){return parseFloat(t)*rpx+"px"}))),!e){var i="<style scoped>@keyframes show{0%{opacity:0}100%{opacity:1}}";for(var a in cfg.userAgentStyles)i+="".concat(a,"{").concat(cfg.userAgentStyles[a],"}");for(a in this.tagStyle)i+="".concat(a,"{").concat(this.tagStyle[a],"}");i+="</style>",t=i+t}return t},setContent:function(t,e){var i=this;if(t){var a=document.createElement("div");e?this.rtf?this.rtf.appendChild(a):this.rtf=a:(this.rtf&&this.rtf.parentNode.removeChild(this.rtf),this.rtf=a),a.innerHTML=this._handleHtml(t,e);for(var n,r=this.rtf.getElementsByTagName("style"),o=0;n=r[o++];)n.innerHTML=n.innerHTML.replace(/body/g,"#rtf"+this._uid),n.setAttribute("scoped","true");!this._observer&&this.lazyLoad&&IntersectionObserver&&(this._observer=new IntersectionObserver((function(t){for(var e,a=0;e=t[a++];)e.isIntersecting&&(e.target.src=e.target.getAttribute("data-src"),e.target.removeAttribute("data-src"),i._observer.unobserve(e.target))}),{rootMargin:"900px 0px 900px 0px"}));var s=this,c=this.rtf.getElementsByTagName("title");c.length&&this.autosetTitle&&uni.setNavigationBarTitle({title:c[0].innerText}),this.imgList.length=0;for(var l,u=this.rtf.getElementsByTagName("img"),d=0,h=0;l=u[d];d++){l.style.maxWidth="100%";var p=l.getAttribute("src");this.domain&&p&&("/"==p[0]?"/"==p[1]?l.src=(this.domain.includes("://")?this.domain.split("://")[0]:"")+":"+p:l.src=this.domain+p:p.includes("://")||(l.src=this.domain+"/"+p)),l.hasAttribute("ignore")||"A"==l.parentElement.nodeName||(l.i=h++,s.imgList.push(l.src||l.getAttribute("data-