You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
6.5 KiB

1 year ago
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/user_vip/index"],{"4b88":function(e,t,n){"use strict";var o=n("8560"),l=n.n(o);l.a},8560:function(e,t,n){},"9d40":function(e,t,n){"use strict";n.r(t);var o=n("cd43"),l=n("ce5f");for(var a in l)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return l[e]}))}(a);n("4b88");var i=n("f0c5"),r=Object(i["a"])(l["default"],o["b"],o["c"],!1,null,"738f23f2",null,!1,o["a"],void 0);t["default"]=r.exports},c965:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n("8ba8"),l=n("1579"),a=n("666f"),i=n("26cb"),r={components:{recommend:function(){Promise.all([n.e("common/vendor"),n.e("components/recommend/index")]).then(function(){return resolve(n("f1f8"))}.bind(null,n)).catch(n.oe)},authorize:function(){n.e("components/Authorize").then(function(){return resolve(n("b29f"))}.bind(null,n)).catch(n.oe)}},data:function(){return{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:this.$t("积分数"),number:0},{real_name:this.$t("消费金额"),number:0},{real_name:this.$t("优惠券"),number:0}],userInfo:{},taskInfo:{},is_open_member:0}},computed:(0,i.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(),this.get_host_product())},deep:!0}},onLoad:function(){this.isLogin?(this.setLeveLComplete(),this.get_host_product(),this.getlevelInfo(),this.getUserInfo()):(0,a.toLogin)();var e=this;setTimeout((function(){e.loading=!0}),500)},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:e.$t("积分数"),number:t.data.integral},{real_name:e.$t("消费金额"),number:t.data.orderStatusSum},{real_name:e.$t("优惠券"),number:t.data.couponCount}]}))},getlevelInfo:function(){var e=this;(0,o.getlevelInfo)().then((function(t){var n=t.data,o=n.level_info,l=n.level_list,a=n.task,i=n.user;e.levelInfo=o,e.VipList=l,e.userInfo=i,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=l.findIndex((function(e){var t=e.grade;return t===o.grade}));-1!==r&&(e.swiperIndex=r)}))},onLoadFun:function(){this.setLeveLComplete(),this.get_host_product()},authColse:function(e){this.isShowAuth=e},get_host_product:function(){var e=this;(0,l.getProductHot)().then((function(t){var n=e;n.hotScroll||(0,l.getProductHot)(n.hotPage,n.hotLimit).then((function(e){n.hotPage++,n.hotScroll=e.data.length<n.hotLimit,n.hostProduct=n.hostProduct.concat(e.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()},onPageScroll:function(t){e.$emit("scroll")}};t.default=r}).call(this,n("543d")["default"])},cd43:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return l})),