2
2
<Row class =" setMiddle" type =" flex" justify =" center" align =" middle" >
3
3
<Col span =" 16" push =" 2" >
4
4
<div class =" third " v-for =" (item, index) in mainData" >
5
- <h3 class =" type-header" v-if =" item.object == 'plan' && basicPlan != undefined" >Basic</h3 >
6
- <h3 class =" type-header" v-if =" item.object == 'addon'" >Add-on</h3 >
7
- <section class =" plan-tier lift" >
5
+ <h3 class =" type-header" v-if =" item.object == 'plan' && basicPlan != undefined" >Basic</h3 >
6
+ <h3 class =" type-header" v-if =" item.object == 'addon'" >Add-on</h3 >
7
+ <section class =" plan-tier lift" >
8
8
<h4 >{{item.name.toUpperCase()}}</h4 >
9
- <h5 ><sup class =" superscript" >US$</sup ><span class =" plan-price" >{{item.price}}</span >
9
+ <h5 >
10
+ <sup class =" superscript" >US$</sup ><span class =" plan-price" >{{item.price}}</span >
10
11
<sub ><div v-if =" item.validity > 1" >
11
- <p >{{item.validity}} months</p >
12
- </div >
13
- <div v-else =" item.validity > 1" >
14
- <p >/mo</p >
15
- </div >
12
+ <p >{{item.validity}} months</p >
13
+ </div >
14
+ <div v-else =" item.validity > 1" >
15
+ <p >/mo</p >
16
+ </div >
16
17
</sub >
17
18
</h5 >
18
19
<ul >
19
20
<li v-for =" itemDec in item.description" ><strong >{{itemDec}}</strong ></li >
20
21
</ul >
21
- </section >
22
- <div class =" plus" v-if =" mainData.length > 0 && index !== (mainData.length -1)" >
23
- <i class =" fa fa-plus-circle" ></i >
22
+ </section >
23
+ <div class =" plus" v-if =" mainData.length > 0 && index !== (mainData.length -1)" >
24
+ <i class =" fa fa-plus-circle" ></i >
25
+ </div >
24
26
</div >
25
- </div >
26
27
</Col >
27
28
<Col span =" 8" pull =" 6" >
28
29
<div class =" panel panel-custom" >
101
102
<div class =" panel-footer" >
102
103
<Row type =" flex" justify =" space-around" >
103
104
<Col span =" 5" >
104
- <p v-if =" mainData[1]" class =" sv-card" >PAY {{ mainData[1].price }} USD</p >
105
+ <p v-if =" mainData[1]" class =" pay-info" >PAY {{ mainData[1].price * mainData[0].period }} USD
106
+ <Poptip slot =" append" trigger =" hover" title =" Pay Info" placement =" bottom" :content =" 'Basic Plan Validity Multiply By Addon Price( ' + mainData[0].period + ' * ' + mainData[1].price + ' = ' + mainData[1].price * mainData[0].period + ' )'" >
107
+ <Icon type =" help-circled" ></Icon >
108
+ </Poptip ></p >
105
109
</Col >
106
110
<Col span =" 6" >
107
111
<!-- set attribute to Col span="16" offset="4"
@@ -284,7 +288,8 @@ export default {
284
288
],
285
289
expiryYear: [],
286
290
userDetails: null ,
287
- savedCard: false
291
+ savedCard: false ,
292
+ loadingPlans: true
288
293
}
289
294
},
290
295
async mounted () {
@@ -293,7 +298,22 @@ export default {
293
298
let arry = [];
294
299
295
300
this .sub_id = this .$route .params .id ;
296
-
301
+ this .$Spin .show ({
302
+ render : (h ) => {
303
+ return h (' div' , [
304
+ h (' Icon' , {
305
+ style: {
306
+ animation: ' ani-demo-spin 1s linear infinite'
307
+ },
308
+ props: {
309
+ type: ' load-c' ,
310
+ size: 24
311
+ }
312
+ }),
313
+ h (' div' ,' Processing Your Request.' )
314
+ ])
315
+ }
316
+ });
297
317
self .userDetails = await this .getUserDetails ()
298
318
if (this .basicPlan != undefined ) {
299
319
data .push (await this .getPlanDetails (this .basicSubId ));
@@ -309,10 +329,12 @@ export default {
309
329
self .payDetail .expiryMM = res .data .card .expiry_month ;
310
330
self .payDetail .expiryYY = res .data .card .expiry_year ;
311
331
self .payDetail .cardType = res .data .card .card_type ;
332
+ self .$Spin .hide ();
312
333
} else {
313
334
if (res .data .api_error_code == ' resource_not_found' ) {
314
335
self .savedCard = false
315
336
}
337
+ self .$Spin .hide ();
316
338
}
317
339
// console.log('Res of customer details', res)
318
340
}).catch (err => {
@@ -594,15 +616,15 @@ export default {
594
616
self .payloading = false ;
595
617
}).catch (err => {
596
618
self .updatePayMessage (' alert alert-danger' , ' Error..! ' , null );
597
- console .log (' Error while sub for customer:: ' , err);
619
+ console .log (' Error while subscribeCbAddon() ' , err);
598
620
self .payloading = false ;
599
621
});
600
622
},
601
623
getUserDetails () {
602
624
return userDetails .get ().then (res => {
603
625
return res .data .data ;
604
626
}).catch (err => {
605
- console .log (' >>>> Error in user details ' , err);
627
+ console .log (' Error while getUserDetails() ' , err);
606
628
return err;
607
629
});
608
630
},
@@ -629,7 +651,7 @@ export default {
629
651
},
630
652
subscriptionDone (res ) {
631
653
let self = this ;
632
- console .log (' FINAL RES>>' , res)
654
+ // console.log('FINAL RES>>', res)
633
655
self .updatePayMessage (' alert alert-success' , ' Success..! ' , ' Successfully purchased.' );
634
656
Cookies .set (' welcomeMsg' , ' Thanks You For Subscribing...!' );
635
657
self .$Notice .success ({
@@ -678,6 +700,10 @@ export default {
678
700
font-size : 16px ;
679
701
font-weight : bold ;
680
702
}
703
+ .pay-info {
704
+ font-size : 14px ;
705
+ font-weight : bold ;
706
+ }
681
707
.pay-icon {
682
708
width : 55px ;
683
709
padding : 5px ;
0 commit comments