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.
crmeb_php/public/static/js/pages-annex-vip_center-inde...

1 line
136 KiB

12 months ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-annex-vip_center-index"],{"0122":function(t,e,n){"use strict";n("7a82");var a=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("acd8"),n("c975"),n("d401"),n("d3b7"),n("25f0"),n("99af"),n("ac1f");var i=a(n("ae65")),s=a(n("baf4")),r=a(n("f272")),o=n("26cb"),c=n("c6c3"),u=(n("713c"),n("b640"),a(n("c303"))),v={components:{payment:s.default,authorize:r.default,easyLoadimage:i.default},filters:{dateFormat:function(t){return(0,u.default)(t).format("YYYY-MM-DD")},moneyFormat:function(t){return parseFloat(t)}},data:function(){return{memberType:[],userInfo:{},memberRights:[],memberExplain:[],memberCoupons:[],isGetFree:null,popupShow:!1,account:"",password:"",goodsList:[],pay_order_id:"",payMode:[{name:"微信支付",icon:"icon-weixinzhifu",value:this.$wechat.isWeixin()?"weixin":"h5",title:"微信快捷支付",payStatus:!0},{name:"支付宝支付",icon:"icon-zhifubao",value:"alipay",title:"支付宝支付",payStatus:!0}],pay_close:!1,totalPrice:"0",formContent:"",page:1,limit:15,finished:!1,loading:!1,memberEndTime:"",isWeixin:this.$wechat.isWeixin(),type:0,svip_type:1,svip:null,svipDef:{},isAuto:!1,isShowAuth:!1}},watch:{},computed:(0,o.mapGetters)(["isLogin"]),onLoad:function(){this.getCouponLst(),this.isLogin?(this.getMemberCard(),this.memberEquity(),this.groomList()):(this.isAuto=!0,this.isShowAuth=!0)},onShow:function(){},onReachBottom:function(){this.groomList()},methods:{onLunch:function(){this.getMemberCard(),this.memberEquity(),this.getCouponLst()},onLoadFun:function(){this.isShowAuth=!1,this.getMemberCard(),this.memberEquity()},authColse:function(t){this.isShowAuth=t},goUrl:function(t){-1!=t.indexOf("http")?location.href=t:-1==["/pages/goods_cate/goods_cate","/pages/order_addcart/order_addcart","/pages/user/index","/pages/plant_grass/index"].indexOf(t)?uni.navigateTo({url:t}):uni.switchTab({url:t})},getMemberCard:function(){var t=this;uni.showLoading({title:"正在加载…"}),(0,c.memberCard)().then((function(e){uni.hideLoading(),t.memberType=e.data.list,t.svipDef=e.data.def,t.totalPrice=e.data.def.price.toString(),t.pay_order_id=e.data.def.group_data_id.toString(),t.svip_type=e.data.def.svip_type})).catch((function(t){uni.showToast({title:t,icon:"none"})}))},memberEquity:function(){var t=this;(0,c.memberEquity)().then((function(e){t.memberRights=e.data.interests,t.userInfo=e.data.user})).catch((function(t){uni.showToast({title:t,icon:"none"})}))},getCouponLst:function(){var t=this;(0,c.memberCouponLst)().then((function(e){t.memberCoupons=e.data})).catch((function(t){uni.showToast({title:t,icon:"none"})}))},receiveCoupon:function(t){!1===this.isLogin?(this.isAuto=!0,this.isShowAuth=!0):(0,c.receiveMemberCoupon)(t.coupon_id).then((function(e){t.svipIssue=1,uni.showToast({title:e.message,icon:"none"})})).catch((function(t){uni.showToast({title:t,icon:"none"})}))},pay:function(){0==this.totalPrice?this.createMemberCard("weixin"):this.pay_close=!0},payClose:function(){this.pay_close=!1},createMemberCard:function(t){var e=this;uni.showLoading({title:"正在加载…"});var n={pay_type:t,return_url:location.port?location.protocol+"//"+location.hostname+":"+location.port+"/pages/annex/vip_paid/index":location.protocol+"//"+location.hostname+"/pages/annex/vip_paid/index"},a=this.pay_order_id;(0,c.memberCardCreate)(a,n).then((function(t){if(!(parseFloat(e.totalPrice)>0))return uni.hideLoading(),e.$util.Tips({title:1==e.svip_type?"成功开启0元试用":"续费成功"},(function(){e.onLunch()}));e.callPay(t)})).catch((function(t){uni.showToast({title:t,icon:"none"})}))},callPay:function(t){var e=this,n=t.data.status,a=(t.data.result.order_id,t.data.result.pay_key),i=t.data.result.config;switch(n){case"ORDER_EXIST":case"EXTEND_ORDER":case"PAY_ERROR":case"error":return uni.hideLoading(),e.payClose(),e.$util.Tips({title:t.message});case"success":return uni.hideLoading(),e.payClose(),e.$util.Tips({title:t.message,icon:"success"});case"alipay":case"alipayQr":return uni.hideLoading(),e.payClose(),void uni.navigateTo({url:"/pages/orde