geer-builder 1.2.458 → 1.2.462

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/GProductPage.vue CHANGED
@@ -566,6 +566,8 @@ export default {
566
566
  lowest_variant_product_price:0,
567
567
  merchant_variant_product_list:[],
568
568
  merchant_variant_product_inventory_list:[],
569
+ link:'',
570
+ settings_link:false,
569
571
  }),
570
572
  watch:
571
573
  {
@@ -827,6 +829,11 @@ export default {
827
829
  else
828
830
  this.url = window.location.href.split('?')[0]+"?product_id="+this.product_id.product_id;
829
831
  this.public_settings = await this.$_getData('public_settings');
832
+ if(this.public_settings.hasOwnProperty('replicated_link'))
833
+ {
834
+ this.link = this.public_settings.replicated_link;
835
+ this.settings_link = true;
836
+ }
830
837
  this.main_currency = this.public_settings.main_currency;
831
838
  if(this.public_settings.dynamic_link_prefix)
832
839
  {
@@ -1271,6 +1278,10 @@ export default {
1271
1278
  // Set non-editable to avoid focus and move outside of view
1272
1279
  el.setAttribute('readonly', '');
1273
1280
  el.value = this.url;
1281
+ if(this.settings_link)
1282
+ {
1283
+ el.value = el.value.replace("localhost", this.link);
1284
+ }
1274
1285
  el.style = {position: 'absolute', left: '-9999px'};
1275
1286
  document.body.appendChild(el);
1276
1287
  // Select text inside element
package/GReferralLink.vue CHANGED
@@ -27,12 +27,28 @@ export default
27
27
  data:() =>(
28
28
  {
29
29
  replicated_link : '',
30
- loading: false
30
+ loading: false,
31
+ public_settings:{},
32
+ link:'',
33
+ settings_link:false,
31
34
  }),
32
35
  async mounted() {
33
36
  await this.$_getSlotInfo();
37
+ this.public_settings = await this.$_getData('public_settings');
38
+ if(this.public_settings.hasOwnProperty('replicated_link'))
39
+ {
40
+ this.link = this.public_settings.replicated_link;
41
+ this.settings_link = true;
42
+ }
34
43
  let replace_space = this.current_slot_info.referral_code.replace(/\s/g, '%20');
35
- this.replicated_link = `https://${window.location.host}/#/invite/${replace_space}`;
44
+ if(this.settings_link)
45
+ {
46
+ this.replicated_link = `https://${this.link}/#/invite/${replace_space}`;
47
+ }
48
+ else
49
+ {
50
+ this.replicated_link = `https://${window.location.host}/#/invite/${replace_space}`;
51
+ }
36
52
  this.loading = false;
37
53
  },
38
54
  methods:
@@ -41,7 +57,6 @@ export default
41
57
  {
42
58
  /* Get the text field */
43
59
  var copyText = document.getElementById("referral_link");
44
-
45
60
  /* Select the text field */
46
61
  copyText.select();
47
62
  copyText.setSelectionRange(0, 99999); /*For mobile devices*/
@@ -26,12 +26,31 @@ export default
26
26
  data:() =>(
27
27
  {
28
28
  replicated_link : '',
29
- loading: false
29
+ loading: false,
30
+ public_settings:{},
31
+ link:'',
32
+ settings_link:false,
30
33
  }),
31
- async mounted() {
34
+ async mounted()
35
+ {
32
36
  await this.$_getSlotInfo();
37
+ this.public_settings = await this.$_getData('public_settings');
38
+ if(this.public_settings.hasOwnProperty('replicated_link'))
39
+ {
40
+ this.link = this.public_settings.replicated_link;
41
+ this.settings_link = true
42
+ console.log(this.link);
43
+ }
44
+
33
45
  if(this.current_slot_info)
34
- this.replicated_link = `https://${window.location.host}/#/?sponsor=${this.current_slot_info.slot_code}`;
46
+ if(settings_link)
47
+ {
48
+ this.replicated_link = `https://${this.link}/#/?sponsor=${this.current_slot_info.slot_code}`;
49
+ }
50
+ else
51
+ {
52
+ this.replicated_link = `https://${window.location.host}/#/?sponsor=${this.current_slot_info.slot_code}`;
53
+ }
35
54
  this.loading = false;
36
55
  },
37
56
  methods:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geer-builder",
3
- "version": "1.2.458",
3
+ "version": "1.2.462",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {