1 |
- require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/user_vip/index"],{"058b":function(e,t,n){"use strict";var o=n("7d7a"),i=n.n(o);i.a},"075e":function(e,t,n){"use strict";n.r(t);var o=n("242b"),i=n("b745");for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("058b");var l=n("f0c5"),r=Object(l["a"])(i["default"],o["b"],o["c"],!1,null,"78650632",null,!1,o["a"],void 0);t["default"]=r.exports},"242b":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){}));var o=function(){var e=this,t=e.$createElement,n=(e._self._c,e.__map(e.VipList,(function(t,n){var o=e.__get_orig(t),i=parseFloat(t.discount),a=t.grade===e.levelInfo.grade?Math.floor(e.levelInfo.exp/t.next_exp_num>1?100:e.levelInfo.exp/t.next_exp_num*100):null,l=!e.levelInfo.grade||t.grade>e.levelInfo.grade?Math.floor(e.levelInfo.exp/t.exp_num*100):null;return{$orig:o,m0:i,g0:a,g1:l}}))),o=e.hostProduct.length;e.$mp.data=Object.assign({},{$root:{l0:n,g2:o}})},i=[]},"7d7a":function(e,t,n){},"8ef6":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n("4818"),i=n("f8b7"),a=n("8e8a"),l=n("26cb"),r=n("865e"),s={components:{recommend:function(){Promise.all([n.e("common/vendor"),n.e("components/recommend/index")]).then(function(){return resolve(n("b281"))}.bind(null,n)).catch(n.oe)}},data:function(){return{imgHost:r.HTTP_REQUEST_URL,reach_count:0,VipList:[],swiperIndex:0,growthValue:!0,task:[],illustrate:"",level_id:0,hostProduct:[],grade:0,isAuto:!1,isShowAuth:!1,hotScroll:!1,hotPage:1,hotLimit:10,level_title:"",level_discount:"",levelInfo:{},task_list:[{real_name:"积分数",number:0},{real_name:"消费金额",number:0},{real_name:"优惠券",number:0}],userInfo:{},taskInfo:{},is_open_member:!1}},computed:(0,l.mapGetters)(["isLogin"]),watch:{VipList:function(){var e=this;e.VipList.length>0&&e.VipList.forEach((function(t,n){!1===t.is_clear&&(e.activeIndex=n,e.grade=t.grade)}))},isLogin:{handler:function(e,t){e&&this.setLeveLComplete()},deep:!0}},onLoad:function(){this.get_host_product(),this.isLogin?(this.setLeveLComplete(),this.getlevelInfo(),this.getUserInfo()):(0,a.toLogin)();var e=this;setTimeout((function(){e.loading=!0}),500)},onShow:function(){e.removeStorageSync("form_type_cart")},methods:{getUserInfo:function(){var e=this;(0,o.getUserInfo)().then((function(t){e.is_open_member=t.data.is_open_member,e.task_list=[{real_name:"积分数",number:t.data.integral},{real_name:"消费金额",number:t.data.orderStatusSum},{real_name:"优惠券",number:t.data.couponCount}]}))},getlevelInfo:function(){var e=this;(0,o.getlevelInfo)().then((function(t){var n=t.data,o=n.level_info,i=n.level_list,a=n.task,l=n.user;e.levelInfo=o,e.VipList=i,e.userInfo=l,e.taskInfo=a,e.levelInfo.exp=parseFloat(e.levelInfo.exp),e.levelInfo.rate=Math.floor(e.levelInfo.exp/e.levelInfo.exp_num*100),e.levelInfo.rate>100&&(e.levelInfo.rate=100);var r=i.findIndex((function(e){var t=e.grade;return t===o.grade}));-1!==r&&(e.swiperIndex=r)}))},onLoadFun:function(){this.setLeveLComplete(),this.getlevelInfo(),this.getUserInfo(),this.isShowAuth=!1},authColse:function(e){this.isShowAuth=e},get_host_product:function(){var e=this;e.hotScroll||(0,i.getProductHot)(e.hotPage,e.hotLimit).then((function(t){e.hotPage++,e.hotScroll=t.data.length<e.hotLimit,e.hostProduct=e.hostProduct.concat(t.data)}))},swiperChange:function(e){var t=e.detail.current;this.swiperIndex=t,this.level_id=this.VipList[t].id||0,this.level_title=this.VipList[t].name||"",this.level_discount=this.VipList[t].discount||""},growthValueClose:function(){this.growthValue=!0},opHelp:function(e){this.growthValue=!1,this.illustrate=this.task[e].illustrate},setLeveLComplete:function(){(0,o.userLevelDetection)().then((function(e){}))},getVipList:function(){var e=this;(0,o.userLevelGrade)().then((function(t){e.$set(e,"VipList",t.data.list),e.task=t.data.task.task,e.reach_count=t.data.task.reach_count,e.level_id=t.data.list[0]?t.data.list[0].id:0,e.level_title=t.data.list[0]?t.data.list[0].name:"",e.level_discount=t.data.list[0]?t.data.list[0].discount:""}))},getTask:function(){var e=this;(0,o.userLevelTask)(e.level_id).then((function(t){e.task=t.data.task,e.reach_count=t.data.reach_count}))}},onReachBottom:function(){this.get_host_product()}};t.default=s}).call(this,n("543d")["default"])},b745:function(e,t,n){"use strict";n.r(t);var o=n("8ef6"),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},d90d:function(e,t,n){"use strict";(function(e,t){var o=n("4ea4");n("59a4");o(n("66fd"));var i=o(n("075e"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])}},[["d90d","common/runtime","common/vendor"]]]);
|