1 line
22 KiB
JavaScript
Executable File
1 line
22 KiB
JavaScript
Executable File
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages_promotion-fenxiao-promote"],{"0817":function(t,e,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("5ef2"),i("5c47"),i("2c10"),i("a1c1"),i("23f4"),i("7d2f"),i("9c4e"),i("ab80"),i("aa9c"),i("473f"),i("bf0f"),i("3efd");var a=n(i("af87")),o=/^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,r=/^<\/([-A-Za-z0-9_]+)[^>]*>/,s=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,c=g("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"),l=g("a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"),u=g("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),d=g("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),f=g("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),p=g("script,style");function g(t){for(var e={},i=t.split(","),n=0;n<i.length;n++)e[i[n]]=!0;return e}var m=function(t){t=function(t){return t.replace(/<\?xml.*\?>\n/,"").replace(/<!doctype.*>\n/,"").replace(/<!DOCTYPE.*>\n/,"")}(t),t=function(t){return t=t.replace(/<!--[\s\S]*-->/gi,""),t}(t),t=function(t){var e='<img style="width:100% !important;display:block;max-width: '.concat("100%",' !important;"');return t=t.replace(/\\/g,"").replace(/<img/g,e),t=t.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi,(function(t,i){return e+' src="'+a.default.img(i)+'"/>'})),t}(t),t=function(t){return t=t.replace(/style\s*=\s*["][^>]*;[^"]?/gi,(function(t,e){return t=t.replace(/[:](\s?)[\s\S]*/gi,(function(t,e){return t.replace(/"/g,"'")})),t})),t}(t);var e=[],i={node:"root",children:[]};return function(t,e){var i,n,a,g=[],m=t;g.last=function(){return this[this.length-1]};while(t){if(n=!0,g.last()&&p[g.last()])t=t.replace(new RegExp("([\\s\\S]*?)</"+g.last()+"[^>]*>"),(function(t,i){return i=i.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g,"$1$2"),e.chars&&e.chars(i),""})),b("",g.last());else if(0==t.indexOf("\x3c!--")?(i=t.indexOf("--\x3e"),i>=0&&(e.comment&&e.comment(t.substring(4,i)),t=t.substring(i+3),n=!1)):0==t.indexOf("</")?(a=t.match(r),a&&(t=t.substring(a[0].length),a[0].replace(r,b),n=!1)):0==t.indexOf("<")&&(a=t.match(o),a&&(t=t.substring(a[0].length),a[0].replace(o,v),n=!1)),n){i=t.indexOf("<");var h=i<0?t:t.substring(0,i);t=i<0?"":t.substring(i),e.chars&&e.chars(h)}if(t==m)throw"Parse Error: "+t;m=t}function v(t,i,n,a){if(i=i.toLowerCase(),l[i])while(g.last()&&u[g.last()])b("",g.last());if(d[i]&&g.last()==i&&b("",i),a=c[i]||!!a,a||g.push(i),e.start){var o=[];n.replace(s,(function(t,e){var i=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:f[e]?e:"";o.push({name:e,value:i,escaped:i.replace(/(^|[^\\])"/g,'$1\\"')})})),e.start&&e.start(i,o,a)}}function b(t,i){if(i){for(n=g.length-1;n>=0;n--)if(g[n]==i)break}else var n=0;if(n>=0){for(var a=g.length-1;a>=n;a--)e.end&&e.end(g[a]);g.length=n}}b()}(t,{start:function(t,n,a){var o={name:t};if(0!==n.length&&(o.attrs=function(t){return t.reduce((function(t,e){var i=e.value,n=e.name;return t[n]?t[n]=t[n]+" "+i:t[n]=i,t}),{})}(n)),a){var r=e[0]||i;r.children||(r.children=[]),r.children.push(o)}else e.unshift(o)},end:function(t){var n=e.shift();if(n.name!==t&&console.error("invalid state: mismatch end tag"),0===e.length)i.children.push(n);else{var a=e[0];a.children||(a.children=[]),a.children.push(n)}},chars:function(t){var n={type:"text",text:t};if(0===e.length)i.children.push(n);else{var a=e[0];a.children||(a.children=[]),a.children.push(n)}},comment:function(t){var i={node:"comment",text:t},n=e[0];n.children||(n.children=[]),n.children.push(i)}}),i.children};e.default=m},"299f":function(t,e,i){var n=i("c703");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("967d").default;a("46ecdce8",n,!0,{sourceMap:!1,shadowMode:!1})},"2cd6":function(t,e,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("c223");n(i("0817"));var a={data:function(){return{tabIndex:0,promoteContent:{},promote:{page:0,page_size:5,page_count:0,list:[]},isPay:0,detailData:{},templateId:"",poster:""}},onShow:function(){var t=this;setTimeout((function(){t.addonIsExist.fenxiao||(t.$util.showToast({title:"商家未开启分销",mask:!0,duration:2e3}),setTimeout((function(){t.$util.redirectTo("/pages/index/index")}),2e3))}),1e3),this.storeToken?(this.getTeam(),this.getPromoteRule(),this.getFenxiaoDetail()):this.$nextTick((function(){t.$refs.login.open("/pages_promotion/fenxiao/promote_code")}))},methods:{toPoster:function(){this.$util.redirectTo("/pages_promotion/fenxiao/promote_code")},tabCut:function(t){this.tabIndex=t,this.isPay=t,this.promote.page_count=0,this.promote.page=0,this.promote.page_size=5,this.getTeam()},getTeam:function(){var t=this;this.promote.page_count>0&&this.promote.page==this.promote.page_count||(this.promote.page++,this.$api.sendRequest({url:"/fenxiao/api/fenxiao/team",data:{page:this.promote.page,page_size:this.promote.page_size,is_pay:this.isPay,level:1},success:function(e){t.$refs.loadingCover&&t.$refs.loadingCover.hide(),e.code>=0?(1==t.promote.page&&(t.promote.list=[]),t.promote.page_count=e.data.page_count,t.promote.list=t.promote.list.concat(e.data.list)):t.$util.showToast({title:e.message})},fail:function(e){t.$refs.loadingCover&&t.$refs.loadingCover.hide()}}))},getFenxiaoDetail:function(){var t=this;this.$api.sendRequest({url:"/fenxiao/api/fenxiao/detail",success:function(e){e.data?t.detailData=e.data:t.$util.showToast({title:e.message})}})},getPromoteRule:function(){var t=this;this.$api.sendRequest({url:"/fenxiao/api/config/promoterule",success:function(e){e.data?(t.promoteContent=e.data,t.promoteContent.content=e.data.content?e.data.content:""):t.$util.showToast({title:e.message})},fail:function(e){t.$refs.loadingCover&&t.$refs.loadingCover.hide()}})}}};e.default=a},"3e5f":function(t,e,i){"use strict";i.r(e);var n=i("a731"),a=i("de57");for(var o in a)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(o);i("5ced");var r=i("828b"),s=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"5e494b11",null,!1,n["a"],void 0);e["default"]=s.exports},"4eca":function(t,e,i){"use strict";var n=i("299f"),a=i.n(n);a.a},"5ced":function(t,e,i){"use strict";var n=i("cd4a"),a=i.n(n);a.a},7854:function(t,e,i){"use strict";i.r(e);var n=i("8ba8"),a=i("f48d");for(var o in a)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(o);var r=i("828b"),s=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=s.exports},"79e1":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.copyright&&(t.showLogo||t.showBeian)?i("v-uni-view",{staticClass:"copyrigt-wrap"},[t.showLogo?i("v-uni-view",{staticClass:"copyright-info"},[t.copyright.logo?i("v-uni-view",{staticClass:"copyright-pic",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.link(t.copyright.copyright_link)}}},[i("v-uni-image",{attrs:{src:t.$util.img(t.copyright.logo),mode:"widthFix"},on:{error:function(e){arguments[0]=e=t.$handleEvent(e),t.error.apply(void 0,arguments)}}})],1):t._e()],1):t._e(),t.showBeian?i("v-uni-view",{staticClass:"record-info"},[t.copyright&&t.copyright.icp?i("v-uni-view",{staticClass:"icp",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toHref("https://beian.miit.gov.cn")}}},[t._v("备案号:"+t._s(t.copyright.icp))]):t._e(),i("v-uni-view",{staticClass:"fotter-link"},[t.copyright&&t.copyright.gov_record?i("v-uni-view",{staticClass:"gov-wrap",attrs:{target:"_blank"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toHref(t.copyright.gov_url)}}},[i("v-uni-image",{attrs:{src:t.$util.img("public/uniapp/common/gov_record.png"),alt:"公安备案"}}),i("v-uni-text",[t._v(t._s(t.copyright.gov_record))])],1):t._e(),t.copyright&&t.copyright.business_show_link?i("v-uni-view",{staticClass:"gov-wrap",attrs:{target:"_blank"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toHref(t.copyright.business_show_link)}}},[i("v-uni-image",{attrs:{src:t.$util.img("public/static/img/business_show.png"),alt:"营业执照"}}),i("v-uni-text",[t._v("电子营业执照")])],1):t._e()],1)],1):t._e()],1):t._e()},a=[]},"8ba8":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){}));var n=function(){var t=this.$createElement,e=this._self._c||t;return e("v-uni-view",{staticStyle:{display:"none"}},[this._t("default")],2)},a=[]},"97db":function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n * 建议使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n */.fenxiao-promote[data-v-5e494b11]{overflow:hidden;padding:0 %?30?% %?160?%;min-height:100vh;background-color:#ff2d46;background-size:100%;background-repeat:no-repeat}.fenxiao-promote .my-earnings[data-v-5e494b11],\r\n.fenxiao-promote .activity-rules[data-v-5e494b11]{background-color:#fff;border-radius:%?30?%}.fenxiao-promote .my-earnings[data-v-5e494b11]{margin-top:%?230?%;padding-bottom:%?40?%}.fenxiao-promote .my-earnings .earnings-head-wrap[data-v-5e494b11]{background-color:#fff7f5;height:%?160?%;border-radius:%?30?%;border-bottom-left-radius:0;border-bottom-right-radius:0}.fenxiao-promote .my-earnings .earnings-head[data-v-5e494b11]{position:relative;padding-top:%?60?%;display:flex;align-items:center;justify-content:center}.fenxiao-promote .my-earnings .earnings-head .name[data-v-5e494b11]{position:absolute;width:%?384?%;height:%?74?%;top:%?-22?%}.fenxiao-promote .my-earnings .earnings-head .content[data-v-5e494b11]{font-size:%?24?%}.fenxiao-promote .my-earnings .earnings-head .money-bg[data-v-5e494b11]{width:%?80?%;height:%?80?%}.fenxiao-promote .my-earnings .earnings-head .money-text[data-v-5e494b11]{margin:0 %?6?%;font-size:%?40?%;line-height:1}.fenxiao-promote .my-earnings .earnings-body[data-v-5e494b11]{padding:0 %?30?%}.fenxiao-promote .my-earnings .earnings-body .earnings-tab[data-v-5e494b11]{display:flex;justify-content:space-around;align-items:center;height:%?100?%;font-size:%?30?%;color:#e93224;margin-bottom:%?10?%}.fenxiao-promote .my-earnings .earnings-body .earnings-tab uni-text.active[data-v-5e494b11]{position:relative;font-weight:700}.fenxiao-promote .my-earnings .earnings-body .earnings-tab uni-text.active[data-v-5e494b11]::after{position:absolute;content:"";height:%?4?%;width:%?86?%;left:50%;bottom:%?-4?%;-webkit-transform:translateX(-50%);transform:translateX(-50%);background-color:#e93224}.fenxiao-promote .my-earnings .earnings-body .earnings-content-wrap[data-v-5e494b11]{max-height:%?440?%}.fenxiao-promote .my-earnings .earnings-body .earnings-item[data-v-5e494b11]{display:flex;align-items:center;margin-bottom:%?20?%}.fenxiao-promote .my-earnings .earnings-body .earnings-item[data-v-5e494b11]:last-child{margin-bottom:0}.fenxiao-promote .my-earnings .earnings-body .earnings-item .item-img[data-v-5e494b11]{width:%?90?%;height:%?90?%;margin-right:%?20?%;flex-shrink:0}.fenxiao-promote .my-earnings .earnings-body .earnings-item .item-time[data-v-5e494b11]{font-size:%?24?%;color:#909399}.fenxiao-promote .my-earnings .earnings-body .earnings-item .item-name[data-v-5e494b11]{line-height:1.3}.fenxiao-promote .my-earnings .earnings-body .earnings-item .money[data-v-5e494b11]{margin-left:auto;color:#f9b124}.fenxiao-promote .my-earnings .earnings-empty[data-v-5e494b11]{display:flex;align-items:center;justify-content:center;height:%?160?%;font-size:%?30?%}.fenxiao-promote .activity-rules[data-v-5e494b11]{position:relative;margin-top:%?60?%;min-height:%?300?%}.fenxiao-promote .activity-rules .rules-name[data-v-5e494b11]{position:absolute;width:%?384?%;height:%?74?%;top:%?-22?%;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.fenxiao-promote .activity-rules .content[data-v-5e494b11]{padding:%?70?% %?20?% 0}.fenxiao-promote .activity-rules .rules-empty[data-v-5e494b11]{padding-top:%?140?%;text-align:center;font-size:%?30?%}.fenxiao-promote .active-btn[data-v-5e494b11]{position:fixed;bottom:0;left:0;right:0;z-index:5;display:flex;align-items:center;justify-content:center;background-color:#ff2d46;height:%?160?%;padding:0 %?60?%}.fenxiao-promote .active-btn uni-button[data-v-5e494b11]{flex:1;margin:0;border-radius:%?50?%;color:#985400;background:linear-gradient(45deg,#ffe2ac,#fdc174)}',""]),t.exports=e},a731:function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}));var n={pageMeta:i("7854").default,nsMpHtml:i("d108").default,nsCopyright:i("f37bd").default,nsLogin:i("2910").default,loadingCover:i("c003").default},a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",[i("page-meta",{attrs:{"page-style":t.themeColor}}),i("v-uni-view",{staticClass:"fenxiao-promote",style:{backgroundImage:"url("+t.$util.img("public/uniapp/fenxiao/promote/promote_bg.png")+")"}},[i("v-uni-view",{staticClass:"my-earnings"},[i("v-uni-view",{staticClass:"earnings-head-wrap"},[i("v-uni-view",{staticClass:"earnings-head"},[i("v-uni-image",{staticClass:"name",attrs:{src:t.$util.img("public/uniapp/fenxiao/promote/my_earnings.png"),mode:"aspectFit"}}),i("v-uni-image",{staticClass:"money-bg",attrs:{src:t.$util.img("public/uniapp/fenxiao/promote/money.png"),mode:"aspectFill"}}),i("v-uni-view",{staticClass:"content"},[t._v("累计收益"),i("v-uni-text",{staticClass:"money-text"},[t._v(t._s(t.detailData.total_commission))]),t._v("元")],1)],1)],1),i("v-uni-view",{staticClass:"earnings-body"},[i("v-uni-view",{staticClass:"earnings-tab"},[i("v-uni-text",{class:{active:0==t.tabIndex},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.tabCut(0)}}},[t._v("已邀请好友")]),i("v-uni-text",{class:{active:1==t.tabIndex},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.tabCut(1)}}},[t._v("已下单好友")])],1),i("v-uni-scroll-view",{staticClass:"earnings-content-wrap",attrs:{"scroll-y":"true"},on:{scrolltolower:function(e){arguments[0]=e=t.$handleEvent(e),t.getTeam()}}},[t.promote.list.length?i("v-uni-view",{staticClass:"earnings-list"},t._l(t.promote.list,(function(e,n){return i("v-uni-view",{key:n,staticClass:"earnings-item"},[i("v-uni-image",{staticClass:"item-img",attrs:{src:e.headimg?t.$util.img(e.headimg):t.$util.getDefaultImage().head,mode:"aspectFill"},on:{error:function(i){arguments[0]=i=t.$handleEvent(i),e.headimg=t.$util.getDefaultImage().head}}}),i("v-uni-view",{staticClass:"item-content"},[i("v-uni-view",{staticClass:"item-name multi-hidden"},[t._v(t._s(e.nickname))])],1)],1)})),1):i("v-uni-view",{staticClass:"earnings-empty"},[t._v("暂无已邀请好友,快去邀请吧")])],1)],1)],1),i("v-uni-view",{staticClass:"activity-rules"},[i("v-uni-image",{staticClass:"rules-name",attrs:{src:t.$util.img("public/uniapp/fenxiao/promote/activity_rules.png"),mode:"aspectFit"}}),t.promoteContent.content?i("v-uni-view",{staticClass:"content"},[i("ns-mp-html",{attrs:{content:t.promoteContent.content}})],1):i("v-uni-view",{staticClass:"rules-empty"},[t._v("暂无活动规则")])],1),i("v-uni-view",{staticClass:"active-btn"},[i("v-uni-button",{attrs:{type:"primary"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toPoster()}}},[t._v("邀请好友")])],1),i("ns-copyright"),i("ns-login",{ref:"login"}),i("loading-cover",{ref:"loadingCover"})],1)],1)},o=[]},c703:function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n * 建议使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n */.copyrigt-wrap[data-v-1f855276]{margin-top:%?40?%;margin-bottom:%?40?%}.copyrigt-wrap > uni-view[data-v-1f855276]{font-size:%?24?%;color:#666}.copyrigt-wrap > uni-view[data-v-1f855276]:last-child{margin-top:%?10?%}.copyrigt-wrap > uni-view[data-v-1f855276]:first-child{margin-top:0}.copyrigt-wrap .copyright-info[data-v-1f855276]{width:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.copyrigt-wrap .copyright-info .copyright-pic uni-image[data-v-1f855276]{width:%?160?%;height:%?24?%}.copyrigt-wrap .copyright-info uni-text[data-v-1f855276]{font-size:%?22?%;height:%?100?%;line-height:%?100?%;color:#909399!important}.copyrigt-wrap .copyright-info .copyright-desc[data-v-1f855276]{color:#e0e1e2;font-size:%?22?%;text-shadow:0 0 %?2?% #fafafb}.copyrigt-wrap .record-info[data-v-1f855276]{width:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;margin-top:%?10?%}.copyrigt-wrap .record-info uni-text[data-v-1f855276]{color:#666;font-size:%?24?%}.copyrigt-wrap .record-info uni-view[data-v-1f855276]{font-size:%?24?%;color:#666}.copyrigt-wrap .record-info uni-view[data-v-1f855276]:last-child{margin-top:%?10?%}.copyrigt-wrap .record-info uni-view[data-v-1f855276]:first-child{margin-top:0}.copyrigt-wrap .record-info .fotter-link[data-v-1f855276]{display:flex;align-items:center}.copyrigt-wrap .record-info .gov-wrap[data-v-1f855276]{display:flex;justify-content:center;align-items:center;margin:0 0 0 %?30?%!important}.copyrigt-wrap .record-info .gov-wrap[data-v-1f855276]:first-child{margin-left:0!important}.copyrigt-wrap .record-info .gov-wrap uni-image[data-v-1f855276]{width:%?40?%;height:%?40?%;margin-right:%?10?%}',""]),t.exports=e},cb91:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={data:function(){return{showLogo:!0}},created:function(){},computed:{showBeian:function(){return!(this.copyright&&!this.copyright.icp&&!this.copyright.gov_record)}},methods:{link:function(t){t&&this.$util.redirectTo("/pages_tool/webview/webview",{src:encodeURIComponent(t)})},toHref:function(t){location.href=t},error:function(){this.showLogo=!1}}};e.default=n},cc1b:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("5ef2"),i("64aa"),i("5c47"),i("a1c1"),i("e838");var n={type:"scrolldone",target:{id:"",offsetLeft:0,offsetTop:0,dataset:{}},currentTarget:{id:"",offsetLeft:0,offsetTop:0,dataset:{}},detail:{}},a={props:{backgroundTextStyle:{type:String,default:"dark",validator:function(t){return-1!==["dark","light"].indexOf(t)}},backgroundColor:{type:String,default:"#ffffff"},backgroundColorTop:{type:String,default:"#ffffff"},backgroundColorBottom:{type:String,default:"#ffffff"},scrollTop:{type:String,default:""},scrollDuration:{type:Number,default:300},pageStyle:{type:String,default:""},enablePullDownRefresh:{type:[Boolean,String],default:!1},rootFontSize:{type:String,default:""}},created:function(){var t=this,e=getCurrentPages()[0];this.$pageVm=e.$vm||e,uni.onWindowResize((function(e){t.$emit("resize",e)})),this.$pageVm.$on("hook:onPageScroll",(function(e){t.$emit("scroll",e)})),this.$watch("backgroundTextStyle",(function(){t.setBackgroundTextStyle()})),this.$watch((function(){return[t.rootFontSize,t.pageStyle]}),(function(){t.setPageMeta()})),this.$watch((function(){return[t.backgroundColor,t.backgroundColorTop,t.backgroundColorBottom]}),(function(){t.setBackgroundColor()})),this.$watch((function(){return[t.scrollTop,t.scrollDuration]}),(function(){t.pageScrollTo()}))},beforeMount:function(){this.setBackgroundColor(),(this.rootFontSize||this.pageStyle)&&this.setPageMeta(),this.backgroundTextStyle&&this.setBackgroundTextStyle()},mounted:function(){this.scrollTop&&this.pageScrollTo()},methods:{setPullDownRefresh:function(t,e){t.setStyle({pullToRefresh:{support:e,style:"Android"===plus.os.name?"circle":"default"}})},setPageMeta:function(){uni.setPageMeta({pageStyle:this.pageStyle,rootFontSize:this.rootFontSize})},setBackgroundTextStyle:function(){},setBackgroundColor:function(){},pageScrollTo:function(){var t=this,e=String(this.scrollTop);if(-1!==e.indexOf("rpx")&&(e=uni.upx2px(e.replace("rpx",""))),e=parseFloat(e),!isNaN(e)){var i=function i(a){a.scrollTop===e&&(t.$pageVm.$off("hook:onPageScroll",i),t.$emit("scrolldone",n))};uni.pageScrollTo({scrollTop:e,duration:this.scrollDuration,success:function(){t.$pageVm.$on("hook:onPageScroll",i)}})}}}};e.default=a},cd4a:function(t,e,i){var n=i("97db");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("967d").default;a("8dd7016c",n,!0,{sourceMap:!1,shadowMode:!1})},de57:function(t,e,i){"use strict";i.r(e);var n=i("2cd6"),a=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a},e43b:function(t,e,i){"use strict";i.r(e);var n=i("cb91"),a=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a},f37bd:function(t,e,i){"use strict";i.r(e);var n=i("79e1"),a=i("e43b");for(var o in a)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(o);i("4eca");var r=i("828b"),s=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"1f855276",null,!1,n["a"],void 0);e["default"]=s.exports},f48d:function(t,e,i){"use strict";i.r(e);var n=i("cc1b"),a=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a}}]); |