@hulkapps/app-manager-vue 2.3.0 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-manager-vue.esm.js +57 -10
- package/dist/app-manager-vue.min.js +3 -3
- package/dist/app-manager-vue.ssr.js +66 -22
- package/dist/hulkapps-app-manager.css +1 -1
- package/dist/hulkapps-app-manager.min.css +1 -1
- package/package.json +1 -1
- package/src/components/Marketing/Banners.vue +15 -1
- package/src/components/Plans/AppManagerGroupPlan.vue +7 -2
- package/src/components/Plans/AppManagerPlan.vue +20 -2
- package/src/components/Plans/AppManagerSliderPlan.vue +7 -2
package/package.json
CHANGED
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
import {PBanner} from "../polaris-vue/src/components/PBanner";
|
|
19
19
|
|
|
20
20
|
import axios from 'axios'
|
|
21
|
+
import install from "@/entry.esm";
|
|
22
|
+
import Vue from "vue";
|
|
21
23
|
|
|
22
24
|
export default {
|
|
23
25
|
components: {PLayoutSection, PBanner},
|
|
@@ -31,6 +33,10 @@
|
|
|
31
33
|
default() {
|
|
32
34
|
return 'header'
|
|
33
35
|
}
|
|
36
|
+
},
|
|
37
|
+
base_url: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: null
|
|
34
40
|
}
|
|
35
41
|
},
|
|
36
42
|
data() {
|
|
@@ -76,8 +82,16 @@
|
|
|
76
82
|
});
|
|
77
83
|
}
|
|
78
84
|
});
|
|
85
|
+
},
|
|
86
|
+
created() {
|
|
87
|
+
if (this.base_url != null) {
|
|
88
|
+
let config = {
|
|
89
|
+
baseUrl: this.base_url
|
|
90
|
+
}
|
|
91
|
+
install(Vue, config)
|
|
92
|
+
}
|
|
93
|
+
}
|
|
79
94
|
}
|
|
80
|
-
}
|
|
81
95
|
</script>
|
|
82
96
|
|
|
83
97
|
<style scoped>
|
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
export default {
|
|
233
233
|
name: "AppManagerGroupPlan",
|
|
234
234
|
components: { YearlyPlanPromotion, PlanBanners, PPage, PStack, PStackItem, PButton, PButtonGroup, PHeading, PLayout, PLayoutSection, PTextContainer, PDataTable, PDataTableCol, PDataTableRow, PIcon, PTextStyle, PCard, PCardSection, PSkeletonPage, PSkeletonBodyText, PSkeletonDisplayText, PEmptyState },
|
|
235
|
-
props: ['shop_domain'],
|
|
235
|
+
props: ['shop_domain','host'],
|
|
236
236
|
data() {
|
|
237
237
|
return {
|
|
238
238
|
plan: {},
|
|
@@ -382,7 +382,12 @@
|
|
|
382
382
|
},
|
|
383
383
|
async getPlanUrl(plan) {
|
|
384
384
|
let shopName = this.shop.name;
|
|
385
|
-
|
|
385
|
+
let host = this.host;
|
|
386
|
+
let queryString = `shop=${shopName}`;
|
|
387
|
+
if(host != null){
|
|
388
|
+
queryString +=`&host=${host}`
|
|
389
|
+
}
|
|
390
|
+
const response = await axios.get(`${this.app_manager_config.baseUrl}/api/app-manager/plan/process/${plan.id}?${queryString}`).catch(error => {
|
|
386
391
|
console.error(error)
|
|
387
392
|
});
|
|
388
393
|
if(response.data.plan_type === 'free_plan'){
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<AppManagerGroupPlan @handlePlanSelect="handlePlanSelect" v-if="group_plan"
|
|
3
|
-
:shop_domain="shop_domain"></AppManagerGroupPlan>
|
|
4
|
-
<AppManagerSliderPlan @handlePlanSelect="handlePlanSelect" v-else :shop_domain="shop_domain"></AppManagerSliderPlan>
|
|
3
|
+
:shop_domain="shop_domain" :host="host"></AppManagerGroupPlan>
|
|
4
|
+
<AppManagerSliderPlan @handlePlanSelect="handlePlanSelect" v-else :shop_domain="shop_domain" :host="host"></AppManagerSliderPlan>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
8
|
import AppManagerGroupPlan from "./AppManagerGroupPlan";
|
|
9
9
|
import AppManagerSliderPlan from "./AppManagerSliderPlan";
|
|
10
|
+
import Vue from "vue";
|
|
11
|
+
import install from "@/entry.esm";
|
|
10
12
|
|
|
11
13
|
export default {
|
|
12
14
|
name: "AppManagerPlan",
|
|
@@ -18,6 +20,14 @@ export default {
|
|
|
18
20
|
group_plan: {
|
|
19
21
|
type: Boolean,
|
|
20
22
|
default: false
|
|
23
|
+
},
|
|
24
|
+
base_url: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: null
|
|
27
|
+
},
|
|
28
|
+
host:{
|
|
29
|
+
type: String,
|
|
30
|
+
default: null
|
|
21
31
|
}
|
|
22
32
|
},
|
|
23
33
|
methods: {
|
|
@@ -26,6 +36,14 @@ export default {
|
|
|
26
36
|
this.$emit('handle-plan-select', payload)
|
|
27
37
|
|
|
28
38
|
}
|
|
39
|
+
},
|
|
40
|
+
created() {
|
|
41
|
+
if(this.base_url != null){
|
|
42
|
+
let config = {
|
|
43
|
+
baseUrl: this.base_url
|
|
44
|
+
}
|
|
45
|
+
install(Vue,config)
|
|
46
|
+
};
|
|
29
47
|
}
|
|
30
48
|
}
|
|
31
49
|
</script>
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
export default {
|
|
203
203
|
name: "AppManagerSliderPlan",
|
|
204
204
|
components: { Carousel, Slide, YearlyPlanPromotion, PlanBanners, PPage, PStack, PStackItem, PButton, PButtonGroup, PHeading, PLayout, PLayoutSection, PTextContainer, PDataTable, PDataTableCol, PDataTableRow, PIcon, PTextStyle, PCardSection, PCard, PSkeletonDisplayText, PSkeletonBodyText, PSkeletonPage, PEmptyState },
|
|
205
|
-
props: ['shop_domain'],
|
|
205
|
+
props: ['shop_domain','host'],
|
|
206
206
|
data() {
|
|
207
207
|
return {
|
|
208
208
|
slideLength : 0,
|
|
@@ -367,7 +367,12 @@
|
|
|
367
367
|
},
|
|
368
368
|
async getPlanUrl(plan) {
|
|
369
369
|
let shopName = this.shop.name;
|
|
370
|
-
|
|
370
|
+
let host = this.host;
|
|
371
|
+
let queryString = `shop=${shopName}`;
|
|
372
|
+
if(host != null){
|
|
373
|
+
queryString +=`&host=${host}`
|
|
374
|
+
}
|
|
375
|
+
const response = await axios.get(`${this.app_manager_config.baseUrl}/api/app-manager/plan/process/${plan.id}?${queryString}`).catch(error => {
|
|
371
376
|
console.error(error)
|
|
372
377
|
});
|
|
373
378
|
if(response.data.plan_type === 'free_plan'){
|