1 line
94 KiB
JavaScript
1 line
94 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-annex-vip_paid-index"],{"23a8":function(t,e,n){"use strict";var i=n("4fa1"),a=n.n(i);a.a},"282a":function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("e838"),n("5ef2"),n("c9b5"),n("bf0f"),n("ab80"),n("c223");var a=i(n("82d1")),r=i(n("23ab")),o=n("8f59"),s=n("672a"),c=(n("5676"),n("e44d")),d=(n("3a60"),i(n("ea2b"))),l=n("aa10"),u={components:{payment:a.default,easyLoadimage:r.default},filters:{dateFormat:function(t){return(0,d.default)(1e3*t).format("YYYY-MM-DD")},moneyFormat:function(t){return parseFloat(t)}},data:function(){return{domain:l.HTTP_REQUEST_URL,memberType:[],userInfo:{},memberRights:[],memberExplain:[],memberCoupons:[],isGetFree:null,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",page:1,limit:15,finished:!1,loading:!1,memberEndTime:"",isWeixin:this.$wechat.isWeixin(),type:0,svipDef:null,svip_type:0}},watch:{},computed:(0,o.mapGetters)(["isLogin"]),onLoad:function(){this.isLogin?(this.memberEquity(),this.getMemberCard(),this.groomList()):(0,c.toLogin)()},onShow:function(){uni.removeStorageSync("form_type_cart")},onReachBottom:function(){this.groomList()},methods:{pay:function(){0==this.totalPrice?this.createMemberCard("weixin"):this.pay_close=!0},payClose:function(){this.pay_close=!1},goDetail:function(t){uni.navigateTo({url:"/pages/goods_details/index?id=".concat(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})},memberEquity:function(){var t=this;(0,s.memberEquity)().then((function(e){t.memberRights=e.data.interests,t.userInfo=e.data.user,e.data.user.is_svip>0&&uni.navigateTo({url:"/pages/annex/vip_center/index"})})).catch((function(t){uni.showToast({title:t,icon:"none"})}))},getMemberCard:function(){var t=this;uni.showLoading({title:"正在加载…"}),(0,s.memberCard)().then((function(e){uni.hideLoading(),t.memberType=e.data.list,t.svipDef=e.data.def,t.svip_type=e.data.def.svip_type,t.totalPrice=e.data.def.price.toString(),t.pay_order_id=e.data.def.group_data_id.toString()})).catch((function(t){uni.hideLoading(),uni.showToast({title:t,icon:"none"})}))},groomList:function(){var t=this;this.finished||this.loading||(this.loading=!0,(0,s.groomList)({page:this.page,limit:this.limit}).then((function(e){t.goodsList=t.goodsList.concat(e.data.list),t.finished=e.data.list.length<t.limit,t.loading=!1,t.page+=1})).catch((function(t){})))},checkType:function(t,e){this.type=e,this.svipDef=t.value,this.svip_type=t.value.svip_type,this.pay_order_id=t.group_data_id,this.totalPrice=t.value.price.toString()},payCheck:function(t){this.createMemberCard(t)},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"},i=this.pay_order_id;(0,s.memberCardCreate)(i,n).then((function(t){if(!(parseFloat(e.totalPrice)>0))return uni.hideLoading(),e.$util.Tips({title:"开通成功"},(function(){uni.navigateTo({url:"/pages/annex/vip_center/index"})}));e.callPay(t)})).catch((function(t){uni.hideLoading(),uni.showToast({title:t,icon:"none"})}))},callPay:function(t){var e=this,n=t.data.status,i=(t.data.result.order_id,t.data.result.pay_key),a=t.data.result.config,r="/pages/annx/vip_center/index";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
|