ts-glitter 20.3.7 → 20.4.1

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/lowcode/Entry.js CHANGED
@@ -29,6 +29,7 @@ export class Entry {
29
29
  return originalReplaceState.apply(history, arguments);
30
30
  }
31
31
  };
32
+ window.history.pushState({}, glitter.document.title, location.href);
32
33
  function next() {
33
34
  var _a, _b;
34
35
  if (glitter.getUrlParameter('EndCheckout') === '1') {
@@ -143,7 +144,7 @@ export class Entry {
143
144
  }
144
145
  window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : createClock();
145
146
  console.log(`Entry-time:`, window.renderClock.stop());
146
- glitter.share.editerVersion = 'V_20.3.7';
147
+ glitter.share.editerVersion = 'V_20.4.1';
147
148
  glitter.share.start = new Date();
148
149
  const vm = { appConfig: [] };
149
150
  window.saasConfig = {
package/lowcode/Entry.ts CHANGED
@@ -25,6 +25,7 @@ export class Entry {
25
25
  return originalReplaceState.apply(history, arguments);
26
26
  }
27
27
  };
28
+ window.history.pushState({}, glitter.document.title,location.href);
28
29
  function next(){
29
30
  //判斷結帳成功清空購物車紀錄
30
31
  if (glitter.getUrlParameter('EndCheckout') === '1') {
@@ -144,7 +145,7 @@ export class Entry {
144
145
  }
145
146
  (window as any).renderClock = (window as any).renderClock ?? createClock();
146
147
  console.log(`Entry-time:`, (window as any).renderClock.stop());
147
- glitter.share.editerVersion = 'V_20.3.7';
148
+ glitter.share.editerVersion = 'V_20.4.1';
148
149
  glitter.share.start = new Date();
149
150
  const vm = { appConfig: [] };
150
151
  (window as any).saasConfig = {
@@ -610,7 +610,7 @@ export class BgRecommend {
610
610
  gvc.notifyDataChange(vm.previewId);
611
611
  },
612
612
  filter: {
613
- page: ['一頁商店', '隱形賣場'],
613
+ page: ['一頁商店', '隱形賣場', '所有商品'],
614
614
  },
615
615
  })}`,
616
616
  gvc.bindView({
@@ -725,7 +725,7 @@ export class BgRecommend {
725
725
  gvc.notifyDataChange(vm.previewId);
726
726
  },
727
727
  filter: {
728
- page: ['一頁商店', '隱形賣場'],
728
+ page: ['一頁商店', '隱形賣場','所有商品'],
729
729
  },
730
730
  })}`,
731
731
  gvc.bindView({
@@ -1,6 +1,5 @@
1
1
  import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
2
2
  import { ShoppingProductSetting } from './shopping-product-setting.js';
3
- import { CheckInput } from '../modules/checkInput.js';
4
3
  export class ProductService {
5
4
  static checkData(postMD, obj, vm, refresh) {
6
5
  const gvc = obj.gvc;
@@ -65,10 +64,6 @@ export class ProductService {
65
64
  check: (data) => !data.seo.domain,
66
65
  errorMessage: '未設定商品連結',
67
66
  },
68
- {
69
- check: (data) => !CheckInput.isChineseEnglishNumberHyphen(data.seo.domain),
70
- errorMessage: '連結僅限使用中英文數字與連接號',
71
- },
72
67
  ];
73
68
  for (const languageCode of supportedLanguages) {
74
69
  const currentLanguageData = languageData[languageCode];
@@ -77,10 +77,10 @@ export class ProductService {
77
77
  check: (data: LanguageData) => !data.seo.domain,
78
78
  errorMessage: '未設定商品連結',
79
79
  },
80
- {
81
- check: (data: LanguageData) => !CheckInput.isChineseEnglishNumberHyphen(data.seo.domain),
82
- errorMessage: '連結僅限使用中英文數字與連接號',
83
- },
80
+ // {
81
+ // check: (data: LanguageData) => !CheckInput.isChineseEnglishNumberHyphen(data.seo.domain),
82
+ // errorMessage: '連結僅限使用中英文數字與連接號',
83
+ // },
84
84
  ];
85
85
 
86
86
  // 遍歷支持的語言並進行驗證
@@ -320,12 +320,13 @@ export class PageManager {
320
320
  if (['home', 'page'].find((dd) => {
321
321
  return dd === type
322
322
  })) {
323
+
323
324
  if(glitter.waiting_push_state){
324
325
  glitter.waiting_push_state()
325
326
  glitter.waiting_push_state=undefined
326
327
  }else {
327
328
  window.history.pushState({}, glitter.document.title, (glitter.root_path + Language.getLanguageLinkPrefix()+tag + glitter.window.location.search));
328
- }
329
+ }
329
330
  glitter.pageConfig[glitter.pageConfig.length - 1].search = glitter.root_path + Language.getLanguageLinkPrefix()+tag + glitter.window.location.search;
330
331
  }
331
332
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-glitter",
3
- "version": "20.3.7",
3
+ "version": "20.4.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -3465,11 +3465,11 @@ class Shopping {
3465
3465
  return 'wait';
3466
3466
  case '0101':
3467
3467
  case '4000':
3468
+ case '4019':
3468
3469
  case '0102':
3469
3470
  case '9411':
3470
3471
  return 'shipping';
3471
3472
  case '0103':
3472
- case '4019':
3473
3473
  case '4033':
3474
3474
  case '4031':
3475
3475
  case '4032':
@@ -4758,6 +4758,12 @@ class Shopping {
4758
4758
  await database_js_1.default.query(`UPDATE \`${this.app}\`.t_variants
4759
4759
  SET ?
4760
4760
  WHERE id = ?`, [{ content: JSON.stringify(data.variant_content) }, data.id]);
4761
+ let variants = (await database_js_1.default.query(`SELECT *
4762
+ FROM \`${this.app}\`.t_variants
4763
+ WHERE product_id = ?`, [data.product_id])).map((dd) => {
4764
+ return dd.content;
4765
+ });
4766
+ data.product_content.variants = variants;
4761
4767
  await database_js_1.default.query(`UPDATE \`${this.app}\`.t_manager_post
4762
4768
  SET ?
4763
4769
  WHERE id = ?`, [{ content: JSON.stringify(data.product_content) }, data.product_id]);