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.
shipin/public/static/js/pages-users-user_vip-index....

1 line
231 KiB

10 months ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-users-user_vip-index"],{"0811":function(A,g,t){"use strict";t("7a82");var e=t("4ea4").default;Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0,t("d3b7"),t("159b"),t("acd8"),t("c740"),t("99af");var a=t("8ba8"),I=t("1579"),C=t("666f"),r=t("26cb"),n=e(t("f1f8")),i={components:{recommend:n.default},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,r.mapGetters)(["isLogin"]),watch:{VipList:function(){var A=this;A.VipList.length>0&&A.VipList.forEach((function(g,t){!1===g.is_clear&&(A.activeIndex=t,A.grade=g.grade)}))},isLogin:{handler:function(A,g){A&&(this.setLeveLComplete(),this.get_host_product())},deep:!0}},onLoad:function(){this.isLogin?(this.setLeveLComplete(),this.get_host_product(),this.getlevelInfo(),this.getUserInfo()):(0,C.toLogin)();var A=this;setTimeout((function(){A.loading=!0}),500)},methods:{getUserInfo:function(){var A=this;(0,a.getUserInfo)().then((function(g){A.is_open_member=g.data.is_open_member,A.task_list=[{real_name:A.$t("积分数"),number:g.data.integral},{real_name:A.$t("消费金额"),number:g.data.orderStatusSum},{real_name:A.$t("优惠券"),number:g.data.couponCount}]}))},getlevelInfo:function(){var A=this;(0,a.getlevelInfo)().then((function(g){var t=g.data,e=t.level_info,a=t.level_list,I=t.task,C=t.user;A.levelInfo=e,A.VipList=a,A.userInfo=C,A.taskInfo=I,A.levelInfo.exp=parseFloat(A.levelInfo.exp),A.levelInfo.rate=Math.floor(A.levelInfo.exp/A.levelInfo.exp_num*100),A.levelInfo.rate>100&&(A.levelInfo.rate=100);var r=a.findIndex((function(A){var g=A.grade;return g===e.grade}));-1!==r&&(A.swiperIndex=r)}))},onLoadFun:function(){this.setLeveLComplete(),this.get_host_product()},authColse:function(A){this.isShowAuth=A},get_host_product:function(){var A=this;(0,I.getProductHot)().then((function(g){var t=A;t.hotScroll||(0,I.getProductHot)(t.hotPage,t.hotLimit).then((function(A){t.hotPage++,t.hotScroll=A.data.length<t.hotLimit,t.hostProduct=t.hostProduct.concat(A.data)}))}))},swiperChange:function(A){var g=A.detail.current;this.swiperIndex=g,this.level_id=this.VipList[g].id||0,this.level_title=this.VipList[g].name||"",this.level_discount=this.VipList[g].discount||""},growthValueClose:function(){this.growthValue=!0},opHelp:function(A){this.growthValue=!1,this.illustrate=this.task[A].illustrate},setLeveLComplete:function(){(0,a.userLevelDetection)().then((function(A){}))},getVipList:function(){var A=this;(0,a.userLevelGrade)().then((function(g){A.$set(A,"VipList",g.data.list),A.task=g.data.task.task,A.reach_count=g.data.task.reach_count,A.level_id=g.data.list[0]?g.data.list[0].id:0,A.level_title=g.data.list[0]?g.data.list[0].name:"",A.level_discount=g.data.list[0]?g.data.list[0].discount:""}))},getTask:function(){var A=this;(0,a.userLevelTask)(A.level_id).then((function(g){A.task=g.data.task,A.reach_count=g.data.reach_count}))}},onReachBottom:function(){this.get_host_product()},onPageScroll:function(A){uni.$emit("scroll")}};g.default=i},1579:function(A,g,t){"use strict";t("7a82");var e=t("4ea4").default;Object.defineProperty(g,"__esModule",{value:!0}),g.collectAdd=function(A,g){return a.default.post("collect/add",{id:A,product:void 0===g?"product":g})},g.collectAll=function(A,g){return a.default.post("collect/all",{id:A,category:void 0===g?"product":g})},g.collectDel=function(A,g){return a.default.post("collect/del",{id:A,category:void 0===g?"product":g})},g.create=function(A){return a.default.post("agent/apply/".concat(A.id),A)},g.deleteVisitList=function(A){return a.default.delete("user/visit",A)},g.getAgentAgreement=function(A){return a.default.get("agent/get_agent_agreement",{},{noAuth:!0})},g.getAttr=function(A,g){return a.default.get("v2/get_