1 line
4.6 KiB
JavaScript
1 line
4.6 KiB
JavaScript
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_promotion/fenxiao/promote"],{"264e":function(t,e,o){"use strict";(function(t,e){var n=o("47a9");o("1dee");n(o("3240"));var i=n(o("f8a6"));t.__webpack_require_UNI_MP_PLUGIN__=o,e(i.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},"6c78":function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return a})),o.d(e,"a",(function(){return n}));var n={nsCopyright:function(){return o.e("components/ns-copyright/ns-copyright").then(o.bind(null,"6db1"))},nsLogin:function(){return Promise.all([o.e("common/vendor"),o.e("components/ns-login/ns-login")]).then(o.bind(null,"17d0"))},loadingCover:function(){return o.e("components/loading-cover/loading-cover").then(o.bind(null,"0773"))}},i=function(){var t=this,e=t.$createElement,o=(t._self._c,t.$util.img("public/uniapp/fenxiao/promote/promote_bg.png")),n=t.$util.img("public/uniapp/fenxiao/promote/my_earnings.png"),i=t.$util.img("public/uniapp/fenxiao/promote/money.png"),a=t.promote.list.length,s=a?t.__map(t.promote.list,(function(e,o){var n=t.__get_orig(e),i=e.headimg?t.$util.img(e.headimg):null,a=e.headimg?null:t.$util.getDefaultImage();return{$orig:n,g4:i,g5:a}})):null,r=t.$util.img("public/uniapp/fenxiao/promote/activity_rules.png");t._isMounted||(t.e0=function(e,o){var n=arguments[arguments.length-1].currentTarget.dataset,i=n.eventParams||n["event-params"];o=i.item;o.headimg=t.$util.getDefaultImage().head}),t.$mp.data=Object.assign({},{$root:{g0:o,g1:n,g2:i,g3:a,l0:s,g6:r}})},a=[]},"9de8":function(t,e,o){"use strict";var n=o("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(o("af34")),a=n(o("e5ac")),s={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")}))},onLoad:function(){this.getTemplateId(),this.getPoster()},methods:{toPoster:function(){this.$util.redirectTo("/pages_promotion/fenxiao/promote_code",{poster:this.poster,templateId:this.templateId})},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?(0,a.default)(e.data.content):""):t.$util.showToast({title:e.message})},fail:function(e){t.$refs.loadingCover&&t.$refs.loadingCover.hide()}})},getPoster:function(){var t=this;this.$api.sendRequest({url:"/fenxiao/api/fenxiao/posterList",success:function(e){e.code>=0&&(t.poster=e.data.toString(),t.poster=encodeURIComponent(t.poster))}})},getTemplateId:function(){var t=this;this.$api.sendRequest({url:"/fenxiao/api/fenxiao/posterTemplateIds",success:function(e){e.code>=0&&(t.templateId=(0,i.default)(e.data).join())}})}}};e.default=s},c481:function(t,e,o){"use strict";var n=o("d9ac"),i=o.n(n);i.a},d9ac:function(t,e,o){},f657:function(t,e,o){"use strict";o.r(e);var n=o("9de8"),i=o.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},f8a6:function(t,e,o){"use strict";o.r(e);var n=o("6c78"),i=o("f657");for(var a in i)["default"].indexOf(a)<0&&function(t){o.d(e,t,(function(){return i[t]}))}(a);o("c481");var s=o("828b"),r=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=r.exports}},[["264e","common/runtime","common/vendor"]]]); |