zx/public/static/js/pages-store-qualifications-...

1 line
29 KiB
JavaScript
Raw Normal View History

2024-07-02 15:32:59 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-store-qualifications-index"],{"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,n=this.length;e<n;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 n,r="",i=0;n=e[i];i++){if("/"==n&&"/"!=e[i-1]&&"/"!=e[i+1])break;r+=Math.random()>.5?n.toUpperCase():n}return r+=e.substr(i),this[t]=r}if(this[t]=e,e.includes("data:image")){var o=e.match(/data:image\/(\S+?);(\S+?),(.+)/);if(!o)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,n="",r=(0,_createForOfIteratorHelper2.default)(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;if("text"==i.type)n+=i.text;else{for(var o in n+="<"+i.name,i.attrs||{})n+=" "+o+'="'+i.attrs[o]+'"';i.children&&i.children.length?n+=">"+this._Dom2Str(i.children)+"</"+i.name+">":n+=">"}}}catch(a){r.e(a)}finally{r.f()}return n},_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 n="<style scoped>@keyframes show{0%{opacity:0}100%{opacity:1}}";for(var r in cfg.userAgentStyles)n+="".concat(r,"{").concat(cfg.userAgentStyles[r],"}");for(r in this.tagStyle)n+="".concat(r,"{").concat(this.tagStyle[r],"}");n+="</style>",t=n+t}return t},setContent:function(t,e){var n=this;if(t){var r=document.createElement("div");e?this.rtf?this.rtf.appendChild(r):this.rtf=r:(this.rtf&&this.rtf.parentNode.removeChild(this.rtf),this.rtf=r),r.innerHTML=this._handleHtml(t,e);for(var i,o=this.rtf.getElementsByTagName("style"),a=0;i=o[a++];)i.innerHTML=i.innerHTML.replace(/body/g,"#rtf"+this._uid),i.setAttribute("scoped","true");!this._observer&&this.lazyLoad&&IntersectionObserver&&(this._observer=new IntersectionObserver((function(t){for(var e,r=0;e=t[r++];)e.isIntersecting&&(e.target.src=e.target.getAttribute("data-src"),e.target.removeAttribute("data-src"),n._observer.unobserve(e.target))}),{rootMargin:"900px 0px 900px 0px"}));var u=this,c=this.rtf.getElementsByTagName("title");c.length&&this.autosetTitle&&uni.setNavigationBarTitle({title:c[0].innerText}),this.imgList.length=0;for(var s,l=this.rtf.getElementsByTagName("img"),d=0,f=0;s=l[d];d++){s.style.maxWidth="100%";var h=s.getAttribute("src");this.domain&&h&&("/"==h[0]?"/"==h[1]?s.src=(this.domain.includes("://")?this.domain.split("://")[0]:"")+":"+h:s.src=this.domain+h:h.includes("://")||(s.src=this.domain+"/"+h)),s.hasAttribute("ignore")||"A"==s.parentElement.nodeName||(s.i=f++,u.imgList.push(s.src||s.getAttribute("data-src")),s.onclick=function(){var t=!0;this.ignore=function(){return t=!1},u.$emit("imgtap",this),t&&uni.previewImage({current:this.i,urls:u.imgList})}),s.onerror=function(){u.$emit("error",{source:"img",target:this})},u.lazyLoad&&this._observer&&s.src&&0!=s.i&&(s.setAttribute("data-src",s.src