ts-glitter 18.2.6 → 18.2.8
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 +30 -1
- package/lowcode/Entry.ts +36 -1
- package/lowcode/cms-plugin/customer-message-user.js +503 -8
- package/lowcode/cms-plugin/customer-message-user.ts +549 -12
- package/lowcode/cms-plugin/shopping-finance-setting.js +4 -4
- package/lowcode/cms-plugin/shopping-finance-setting.ts +4 -4
- package/lowcode/cms-plugin/shopping-information.js +16 -0
- package/lowcode/cms-plugin/shopping-information.ts +16 -0
- package/lowcode/cms-plugin/shopping-order-manager.js +138 -77
- package/lowcode/cms-plugin/shopping-order-manager.ts +177 -102
- package/lowcode/glitter-base/global/language.js +6 -0
- package/lowcode/glitter-base/global/language.ts +6 -0
- package/lowcode/glitterBundle/GVController.js +2 -2
- package/lowcode/glitterBundle/GVController.ts +2 -2
- package/lowcode/glitterBundle/dialog/dialog_inner.js +5 -2
- package/lowcode/glitterBundle/dialog/dialog_inner.ts +5 -2
- package/lowcode/glitterBundle/module/Animation.js +59 -0
- package/lowcode/glitterBundle/module/Animation.ts +62 -0
- package/lowcode/glitterBundle/module/PageManager.js +3 -3
- package/lowcode/glitterBundle/module/PageManager.ts +1 -1
- package/lowcode/index.html +1 -0
- package/lowcode/public-components/checkout/index.js +77 -117
- package/lowcode/public-components/checkout/index.ts +174 -221
- package/lowcode/public-components/footer/footer-01.js +3 -0
- package/lowcode/public-components/footer/footer-01.ts +3 -0
- package/lowcode/public-components/footer/footer-02.js +3 -0
- package/lowcode/public-components/footer/footer-02.ts +3 -0
- package/lowcode/public-components/footer/footer-03.js +3 -0
- package/lowcode/public-components/footer/footer-03.ts +3 -0
- package/lowcode/public-components/product/pd-class.js +868 -355
- package/lowcode/public-components/product/pd-class.ts +1005 -438
- package/lowcode/public-components/product/product-detail.js +1 -1
- package/lowcode/public-components/product/product-detail.ts +3 -1
- package/package.json +1 -1
- package/src/api-public/controllers/article.js.map +1 -1
- package/src/api-public/controllers/delivery.js.map +1 -1
- package/src/api-public/controllers/delivery.ts +2 -0
- package/src/api-public/controllers/shop.js +3 -2
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +4 -3
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/services/ai-robot.js.map +1 -1
- package/src/api-public/services/fb-api.js.map +1 -1
- package/src/api-public/services/financial-service.d.ts +4 -0
- package/src/api-public/services/financial-service.js +48 -23
- package/src/api-public/services/financial-service.js.map +1 -1
- package/src/api-public/services/financial-service.ts +57 -26
- package/src/api-public/services/public-table-check.js.map +1 -1
- package/src/api-public/services/shopping.js +7 -0
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +9 -0
- package/src/api-public/services/user.d.ts +2 -2
- package/src/api-public/services/user.js +8 -2
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +8 -2
- package/src/index.js +3 -3
- package/src/index.js.map +1 -1
|
@@ -17,6 +17,7 @@ import { FakeOrder } from './fake-order.js';
|
|
|
17
17
|
import { FormCheck } from '../../cms-plugin/module/form-check.js';
|
|
18
18
|
import { Currency } from '../../glitter-base/global/currency.js';
|
|
19
19
|
import {ShipmentConfig} from "../../glitter-base/global/shipment-config.js";
|
|
20
|
+
import {Animation} from "../../glitterBundle/module/Animation.js";
|
|
20
21
|
|
|
21
22
|
const html = String.raw;
|
|
22
23
|
|
|
@@ -1367,141 +1368,87 @@ export class CheckoutIndex {
|
|
|
1367
1368
|
class="${gClass('button-bgr')} mb-0 mt-2"
|
|
1368
1369
|
onclick="${gvc.event(() => {
|
|
1369
1370
|
const titleFontColor=glitter.share.globalValue['theme_color.0.title'] ?? '#333333';
|
|
1370
|
-
console.log(`dd.content=>`,dd.content)
|
|
1371
1371
|
gvc.glitter.innerDialog((gvc: GVC) => {
|
|
1372
|
-
return html`
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
gvc.closeDialog();
|
|
1384
|
-
})}"
|
|
1385
|
-
></i>
|
|
1386
|
-
</div>
|
|
1387
|
-
<div class="c_dialog">
|
|
1388
|
-
<div class="c_dialog_body">
|
|
1389
|
-
<div class="c_dialog_main" style="gap: 24px; max-height: calc(100vh - 100px); ${document.body.clientWidth < 800 ? `padding: 12px 20px;` : `padding: 30px;`}">
|
|
1390
|
-
${PdClass.selectSpec({
|
|
1391
|
-
gvc,
|
|
1392
|
-
titleFontColor: glitter.share.globalValue['theme_color.0.title'] ?? '#333333',
|
|
1393
|
-
prod: dd.content,
|
|
1394
|
-
vm: {
|
|
1395
|
-
specs: dd.content.specs.map(
|
|
1396
|
-
(spec: {
|
|
1397
|
-
option: {
|
|
1398
|
-
title: string;
|
|
1399
|
-
}[];
|
|
1400
|
-
}) => {
|
|
1401
|
-
return spec.option[0].title;
|
|
1402
|
-
}
|
|
1403
|
-
),
|
|
1404
|
-
quantity: '1',
|
|
1405
|
-
wishStatus: (glitter.share.wishList ?? []).some((item: { id: number }) => {
|
|
1406
|
-
return item.id === dd.id;
|
|
1407
|
-
}),
|
|
1408
|
-
},
|
|
1409
|
-
preview:true,
|
|
1410
|
-
with_qty: false,
|
|
1411
|
-
is_gift:true,
|
|
1412
|
-
callback: () => {
|
|
1413
|
-
gvc.closeDialog()
|
|
1414
|
-
console.log(`vm.cartData=>`,vm.cartData)
|
|
1415
|
-
let find = vm.cartData.lineItems.find((d1: any) => {
|
|
1416
|
-
return dd.add_on_products.find((d2: any) => {
|
|
1417
|
-
return d2.id === d1.id;
|
|
1418
|
-
});
|
|
1419
|
-
});
|
|
1420
|
-
console.log(`find=>`,find)
|
|
1421
|
-
if (find) {
|
|
1422
|
-
apiCart.setCart((cartItem) => {
|
|
1423
|
-
cartItem.line_items.map((dd) => {
|
|
1424
|
-
if (dd.id === find.id) {
|
|
1425
|
-
dd.count--;
|
|
1426
|
-
}
|
|
1427
|
-
});
|
|
1428
|
-
cartItem.line_items = cartItem.line_items.filter((dd) => {
|
|
1429
|
-
return dd.count > 0;
|
|
1430
|
-
});
|
|
1431
|
-
refreshCartData();
|
|
1432
|
-
gvc.closeDialog();
|
|
1433
|
-
});
|
|
1434
|
-
} else {
|
|
1435
|
-
refreshCartData();
|
|
1436
|
-
gvc.closeDialog();
|
|
1437
|
-
}
|
|
1438
|
-
},
|
|
1439
|
-
|
|
1440
|
-
})}
|
|
1441
|
-
</div>
|
|
1442
|
-
</div>
|
|
1443
|
-
</div>
|
|
1444
|
-
</div>
|
|
1445
|
-
</div>`;
|
|
1446
|
-
}, Tool.randomString(7));
|
|
1447
|
-
return
|
|
1448
|
-
return gvc.glitter.innerDialog((gvc: GVC) => {
|
|
1449
|
-
return html` <div
|
|
1450
|
-
class="bg-white shadow rounded-3"
|
|
1451
|
-
style="overflow-y: auto; ${document.body.clientWidth > 768
|
|
1452
|
-
? `min-width: 400px; width: 600px;`
|
|
1453
|
-
: 'min-width: 90vw; max-width: 92.5vw;'}"
|
|
1454
|
-
>
|
|
1455
|
-
<div class="bg-white shadow rounded-3" style="width: 100%; overflow-y: auto; position: relative;">
|
|
1456
|
-
<div
|
|
1457
|
-
class="w-100 d-flex align-items-center p-3 border-bottom"
|
|
1458
|
-
style="position: sticky; top: 0; background: #fff;"
|
|
1459
|
-
>
|
|
1372
|
+
return html`
|
|
1373
|
+
<div class=" bg-white shadow ${document.body.clientWidth > 768 ? `rounded-3` : ` position-absolute bottom-0`}"
|
|
1374
|
+
style=" ${document.body.clientWidth > 768 ? `min-width: 400px; width: 1000px;max-height:calc(100% - 150px);overflow-y: auto;` : 'width:calc(100vw);height:100%;'}">
|
|
1375
|
+
<div class="bg-white shadow ${document.body.clientWidth > 768 ? `rounded-3` : `h-100`}" style="
|
|
1376
|
+
width: 100%; position: relative;${document.body.clientWidth > 768 ? `` : `overflow-y: auto;`}">
|
|
1377
|
+
<div class="w-100 d-flex align-items-center p-3 border-bottom"
|
|
1378
|
+
style="position: sticky; top: 0; background: #fff;z-index:12;">
|
|
1379
|
+
<div class="fw-bold fs-5"
|
|
1380
|
+
style="color:${titleFontColor}; white-space: nowrap;text-overflow: ellipsis;max-width: calc(100% - 40px); overflow: hidden;">
|
|
1381
|
+
${dd.content.title}
|
|
1382
|
+
</div>
|
|
1460
1383
|
<div class="flex-fill"></div>
|
|
1461
1384
|
<i
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1385
|
+
class="fa-regular fa-circle-xmark fs-5 text-dark"
|
|
1386
|
+
style="cursor: pointer"
|
|
1387
|
+
onclick="${gvc.event(() => {
|
|
1388
|
+
gvc.closeDialog();
|
|
1389
|
+
})}"
|
|
1467
1390
|
></i>
|
|
1468
1391
|
</div>
|
|
1469
|
-
<div class="
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1392
|
+
<div class="c_dialog_main"
|
|
1393
|
+
style="gap: 24px; max-height: calc(100% - 100px); ${document.body.clientWidth < 800 ? `padding: 12px 20px;` : `padding: 30px;`}">
|
|
1394
|
+
${PdClass.selectSpec({
|
|
1395
|
+
gvc,
|
|
1396
|
+
titleFontColor: glitter.share.globalValue['theme_color.0.title'] ?? '#333333',
|
|
1397
|
+
prod: dd.content,
|
|
1398
|
+
vm: {
|
|
1399
|
+
specs: dd.content.specs.map(
|
|
1400
|
+
(spec: {
|
|
1401
|
+
option: {
|
|
1402
|
+
title: string;
|
|
1403
|
+
}[];
|
|
1404
|
+
}) => {
|
|
1405
|
+
return spec.option[0].title;
|
|
1406
|
+
}
|
|
1407
|
+
),
|
|
1408
|
+
quantity: '1',
|
|
1409
|
+
wishStatus: (glitter.share.wishList ?? []).some((item: { id: number }) => {
|
|
1410
|
+
return item.id === dd.id;
|
|
1411
|
+
}),
|
|
1412
|
+
},
|
|
1413
|
+
preview:true,
|
|
1414
|
+
with_qty: false,
|
|
1415
|
+
is_gift:true,
|
|
1416
|
+
callback: () => {
|
|
1417
|
+
gvc.closeDialog()
|
|
1418
|
+
console.log(`vm.cartData=>`,vm.cartData)
|
|
1419
|
+
let find = vm.cartData.lineItems.find((d1: any) => {
|
|
1420
|
+
return dd.add_on_products.find((d2: any) => {
|
|
1421
|
+
return d2.id === d1.id;
|
|
1422
|
+
});
|
|
1423
|
+
});
|
|
1424
|
+
console.log(`find=>`,find)
|
|
1425
|
+
if (find) {
|
|
1426
|
+
apiCart.setCart((cartItem) => {
|
|
1427
|
+
cartItem.line_items.map((dd) => {
|
|
1428
|
+
if (dd.id === find.id) {
|
|
1429
|
+
dd.count--;
|
|
1487
1430
|
}
|
|
1488
|
-
)
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
}),
|
|
1493
|
-
},
|
|
1494
|
-
callback: () => {
|
|
1495
|
-
gvc.closeDialog();
|
|
1431
|
+
});
|
|
1432
|
+
cartItem.line_items = cartItem.line_items.filter((dd) => {
|
|
1433
|
+
return dd.count > 0;
|
|
1434
|
+
});
|
|
1496
1435
|
refreshCartData();
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1436
|
+
gvc.closeDialog();
|
|
1437
|
+
});
|
|
1438
|
+
} else {
|
|
1439
|
+
refreshCartData();
|
|
1440
|
+
gvc.closeDialog();
|
|
1441
|
+
}
|
|
1442
|
+
},
|
|
1443
|
+
|
|
1444
|
+
})}
|
|
1445
|
+
<div class="d-sm-none" style="height:100px;"></div>
|
|
1501
1446
|
</div>
|
|
1502
1447
|
</div>
|
|
1503
1448
|
</div>`;
|
|
1504
|
-
}, Tool.randomString(7)
|
|
1449
|
+
}, Tool.randomString(7), {
|
|
1450
|
+
animation: (document.body.clientWidth < 768) ? Animation.popup : Animation.fade
|
|
1451
|
+
})
|
|
1505
1452
|
})}"
|
|
1506
1453
|
>
|
|
1507
1454
|
<span class="${gClass('button-text')}">${Language.text('add_to_cart')}</span>
|
|
@@ -1559,80 +1506,85 @@ export class CheckoutIndex {
|
|
|
1559
1506
|
}
|
|
1560
1507
|
const titleFontColor=glitter.share.globalValue['theme_color.0.title'] ?? '#333333';
|
|
1561
1508
|
gvc.glitter.innerDialog((gvc: GVC) => {
|
|
1562
|
-
return html`
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1509
|
+
return html`
|
|
1510
|
+
<div class=" bg-white shadow ${document.body.clientWidth > 768 ? `rounded-3` : ` position-absolute bottom-0`}"
|
|
1511
|
+
style=" ${document.body.clientWidth > 768 ? `min-width: 400px; width: 1000px;max-height:calc(100% - 150px);overflow-y: auto;` : 'width:calc(100vw);height:100%;'}">
|
|
1512
|
+
<div class="bg-white shadow ${document.body.clientWidth > 768 ? `rounded-3` : `h-100`}" style="
|
|
1513
|
+
width: 100%; position: relative;${document.body.clientWidth > 768 ? `` : `overflow-y: auto;`}">
|
|
1514
|
+
<div class="w-100 d-flex align-items-center p-3 border-bottom"
|
|
1515
|
+
style="position: sticky; top: 0; background: #fff;z-index:12;">
|
|
1516
|
+
<div class="fw-bold fs-5"
|
|
1517
|
+
style="color:${titleFontColor}; white-space: nowrap;text-overflow: ellipsis;max-width: calc(100% - 40px); overflow: hidden;">
|
|
1518
|
+
${pd.title}
|
|
1519
|
+
</div>
|
|
1520
|
+
<div class="flex-fill"></div>
|
|
1521
|
+
<i
|
|
1522
|
+
class="fa-regular fa-circle-xmark fs-5 text-dark"
|
|
1523
|
+
style="cursor: pointer"
|
|
1524
|
+
onclick="${gvc.event(() => {
|
|
1525
|
+
gvc.closeDialog();
|
|
1526
|
+
})}"
|
|
1527
|
+
></i>
|
|
1528
|
+
</div>
|
|
1529
|
+
<div class="c_dialog_main"
|
|
1530
|
+
style="gap: 24px; max-height: calc(100% - 100px); ${document.body.clientWidth < 800 ? `padding: 12px 20px;` : `padding: 30px;`}">
|
|
1531
|
+
${PdClass.selectSpec({
|
|
1532
|
+
gvc,
|
|
1533
|
+
titleFontColor: glitter.share.globalValue['theme_color.0.title'] ?? '#333333',
|
|
1534
|
+
prod: pd,
|
|
1535
|
+
vm: {
|
|
1536
|
+
specs: pd.specs.map(
|
|
1537
|
+
(spec: {
|
|
1538
|
+
option: {
|
|
1539
|
+
title: string;
|
|
1540
|
+
}[];
|
|
1541
|
+
}) => {
|
|
1542
|
+
return spec.option[0].title;
|
|
1543
|
+
}
|
|
1544
|
+
),
|
|
1545
|
+
quantity: '1',
|
|
1546
|
+
wishStatus: (glitter.share.wishList ?? []).some((item: { id: number }) => {
|
|
1547
|
+
return item.id === dd.id;
|
|
1548
|
+
}),
|
|
1549
|
+
},
|
|
1550
|
+
preview:true,
|
|
1551
|
+
with_qty: false,
|
|
1552
|
+
is_gift:true,
|
|
1553
|
+
callback: () => {
|
|
1554
|
+
console.log(`vm.cartData=>`,vm.cartData)
|
|
1555
|
+
let find = vm.cartData.lineItems.find((d1: any) => {
|
|
1556
|
+
return dd.add_on_products.find((d2: any) => {
|
|
1557
|
+
return d2.id === d1.id;
|
|
1558
|
+
});
|
|
1559
|
+
});
|
|
1560
|
+
console.log(`find=>`,find)
|
|
1561
|
+
if (find) {
|
|
1562
|
+
apiCart.setCart((cartItem) => {
|
|
1563
|
+
cartItem.line_items.map((dd) => {
|
|
1564
|
+
if (dd.id === find.id) {
|
|
1565
|
+
dd.count--;
|
|
1566
|
+
}
|
|
1567
|
+
});
|
|
1568
|
+
cartItem.line_items = cartItem.line_items.filter((dd) => {
|
|
1569
|
+
return dd.count > 0;
|
|
1570
|
+
});
|
|
1571
|
+
refreshCartData();
|
|
1572
|
+
gvc.closeDialog();
|
|
1573
|
+
});
|
|
1574
|
+
} else {
|
|
1575
|
+
refreshCartData();
|
|
1576
|
+
gvc.closeDialog();
|
|
1577
|
+
}
|
|
1578
|
+
},
|
|
1628
1579
|
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1580
|
+
})}
|
|
1581
|
+
<div class="d-sm-none" style="height:100px;"></div>
|
|
1582
|
+
</div>
|
|
1583
|
+
</div>
|
|
1584
|
+
</div>`;
|
|
1585
|
+
}, Tool.randomString(7), {
|
|
1586
|
+
animation: (document.body.clientWidth < 768) ? Animation.popup : Animation.fade
|
|
1587
|
+
});
|
|
1636
1588
|
})}"
|
|
1637
1589
|
>
|
|
1638
1590
|
<span class="${gClass('button-text')}"
|
|
@@ -2644,37 +2596,47 @@ export class CheckoutIndex {
|
|
|
2644
2596
|
return "paynow API失敗"
|
|
2645
2597
|
}
|
|
2646
2598
|
glitter.innerDialog((gvc:GVC)=>{
|
|
2599
|
+
document.body.style.setProperty('overflow-y','hidden','important')
|
|
2647
2600
|
return gvc.bindView({
|
|
2648
2601
|
bind:`paynow`,
|
|
2649
2602
|
view:()=>{
|
|
2650
2603
|
return html`<div class="w-100 h-100 d-flex align-items-center justify-content-center">
|
|
2651
|
-
<
|
|
2604
|
+
${document.body.clientWidth<800 ? `
|
|
2605
|
+
<div class="pt-5 bg-white position-relative vw-100" style="height: ${window.innerHeight}px;overflow-y: auto;">
|
|
2606
|
+
`:`<div class="p-3 bg-white position-relative" style="max-height: calc(100vh - 90px);overflow-y:auto;">`}
|
|
2652
2607
|
<div style="position: absolute; right: 15px;top:15px;z-index:1;" onclick="${gvc.event(()=>{
|
|
2653
2608
|
gvc.closeDialog();
|
|
2654
2609
|
})}">
|
|
2655
2610
|
<i class="fa-regular fa-circle-xmark fs-5 text-dark cursor_pointer"></i>
|
|
2656
2611
|
</div>
|
|
2657
|
-
<div id="paynow-container">
|
|
2612
|
+
<div id="paynow-container" class="" style="">
|
|
2658
2613
|
<div style="width:200px;height:200px;">loading...</div>
|
|
2659
2614
|
|
|
2660
2615
|
</div>
|
|
2661
|
-
<div class="w-100
|
|
2616
|
+
<div class="px-3 px-sm-0 w-100"><button class="${gClass(verify.length > 0 ? 'button-bgr-disable' : 'button-bgr')} " id="checkoutButton" onclick="${gvc.event(()=>{
|
|
2662
2617
|
// const inputGroup = document.querySelector('#paynow-container');
|
|
2663
2618
|
// console.log("inputGroup -- " , inputGroup)
|
|
2664
2619
|
const PayNow = (window as any).PayNow;
|
|
2620
|
+
const dialog=new ShareDialog(gvc.glitter)
|
|
2621
|
+
dialog.dataLoading({visible:true})
|
|
2665
2622
|
PayNow.checkout().then((response:any) => {
|
|
2623
|
+
dialog.dataLoading({visible:false})
|
|
2666
2624
|
console.log("response -- " , response);
|
|
2667
2625
|
if (response.error) {
|
|
2626
|
+
dialog.errorMessage({
|
|
2627
|
+
text:response.error.message
|
|
2628
|
+
})
|
|
2668
2629
|
// handle error
|
|
2669
2630
|
}
|
|
2670
2631
|
// handle success
|
|
2671
2632
|
})
|
|
2672
2633
|
|
|
2673
|
-
})}"
|
|
2674
|
-
|
|
2634
|
+
})}">
|
|
2635
|
+
<span class="${gClass('button-text')}">確認結帳</span>
|
|
2636
|
+
</button></div>
|
|
2675
2637
|
</div>`
|
|
2676
2638
|
},divCreate:{
|
|
2677
|
-
class:`
|
|
2639
|
+
class:` h-100 d-flex align-items-center justify-content-center`,style:`max-width:100vw;${document.body.clientWidth<800 ? 'width:100%;':'width:400px;'};`
|
|
2678
2640
|
},onCreate:()=>{
|
|
2679
2641
|
const publicKey = res.response.publicKey;
|
|
2680
2642
|
const secret = res.response.data.result.secret;
|
|
@@ -2703,24 +2665,15 @@ export class CheckoutIndex {
|
|
|
2703
2665
|
}
|
|
2704
2666
|
})
|
|
2705
2667
|
|
|
2706
|
-
},`paynow
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
const key = localStorage.key(i);
|
|
2713
|
-
if (key && cartKeys.some((cartKey) => key?.includes(cartKey))) {
|
|
2714
|
-
const formatKey = key?.replace((window as any).appName, '');
|
|
2715
|
-
const cart = new ApiCart(formatKey);
|
|
2716
|
-
cart.setCart((cartItem) => {
|
|
2717
|
-
cartItem.line_items = cartItem.line_items.filter((item) => !lineItemIds.includes(item.id));
|
|
2718
|
-
});
|
|
2719
|
-
}
|
|
2668
|
+
},`paynow`,{
|
|
2669
|
+
animation:(document.body.clientWidth>800) ? Animation.fade:Animation.popup,
|
|
2670
|
+
dismiss:()=>{
|
|
2671
|
+
document.body.style.setProperty('overflow-y','auto')
|
|
2672
|
+
}
|
|
2673
|
+
})
|
|
2720
2674
|
}
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2675
|
+
|
|
2676
|
+
localStorage.setItem('clear_cart_items',JSON.stringify( vm.cartData.lineItems.map((item: any) => item.id)))
|
|
2724
2677
|
if (res.response.off_line || res.response.is_free) {
|
|
2725
2678
|
location.href = res.response.return_url;
|
|
2726
2679
|
} else {
|
|
@@ -5,6 +5,9 @@ import { Language } from '../../glitter-base/global/language.js';
|
|
|
5
5
|
const html = String.raw;
|
|
6
6
|
export class Footer01 {
|
|
7
7
|
static main(gvc, widget, subData) {
|
|
8
|
+
if (gvc.glitter.getUrlParameter('page').startsWith('products/') && document.body.clientWidth < 800) {
|
|
9
|
+
return ``;
|
|
10
|
+
}
|
|
8
11
|
const formData = widget.formData;
|
|
9
12
|
const colors = Color.getTheme(gvc, formData);
|
|
10
13
|
const footer = {
|
|
@@ -19,6 +19,9 @@ type FooterItem = {
|
|
|
19
19
|
|
|
20
20
|
export class Footer01 {
|
|
21
21
|
static main(gvc: GVC, widget: any, subData: any) {
|
|
22
|
+
if(gvc.glitter.getUrlParameter('page').startsWith('products/') && document.body.clientWidth<800){
|
|
23
|
+
return ``
|
|
24
|
+
}
|
|
22
25
|
const formData = widget.formData;
|
|
23
26
|
const colors = Color.getTheme(gvc, formData);
|
|
24
27
|
const footer = {
|
|
@@ -6,6 +6,9 @@ const html = String.raw;
|
|
|
6
6
|
export class Footer02 {
|
|
7
7
|
static main(gvc, widget, subData) {
|
|
8
8
|
var _a;
|
|
9
|
+
if (gvc.glitter.getUrlParameter('page').startsWith('products/') && document.body.clientWidth < 800) {
|
|
10
|
+
return ``;
|
|
11
|
+
}
|
|
9
12
|
const formData = widget.formData;
|
|
10
13
|
const colors = Color.getTheme(gvc, formData);
|
|
11
14
|
const footer = {
|
|
@@ -19,6 +19,9 @@ type FooterItem = {
|
|
|
19
19
|
|
|
20
20
|
export class Footer02 {
|
|
21
21
|
static main(gvc: GVC, widget: any, subData: any) {
|
|
22
|
+
if(gvc.glitter.getUrlParameter('page').startsWith('products/') && document.body.clientWidth<800){
|
|
23
|
+
return ``
|
|
24
|
+
}
|
|
22
25
|
const formData = widget.formData;
|
|
23
26
|
const colors = Color.getTheme(gvc, formData);
|
|
24
27
|
const footer = {
|
|
@@ -6,6 +6,9 @@ const html = String.raw;
|
|
|
6
6
|
export class Footer02 {
|
|
7
7
|
static main(gvc, widget, subData) {
|
|
8
8
|
var _a, _b;
|
|
9
|
+
if (gvc.glitter.getUrlParameter('page').startsWith('products/') && document.body.clientWidth < 800) {
|
|
10
|
+
return ``;
|
|
11
|
+
}
|
|
9
12
|
const formData = widget.formData;
|
|
10
13
|
const colors = Color.getTheme(gvc, formData);
|
|
11
14
|
const footer = {
|
|
@@ -19,6 +19,9 @@ type FooterItem = {
|
|
|
19
19
|
|
|
20
20
|
export class Footer02 {
|
|
21
21
|
static main(gvc: GVC, widget: any, subData: any) {
|
|
22
|
+
if(gvc.glitter.getUrlParameter('page').startsWith('products/') && document.body.clientWidth<800){
|
|
23
|
+
return ``
|
|
24
|
+
}
|
|
22
25
|
const formData = widget.formData;
|
|
23
26
|
const colors = Color.getTheme(gvc, formData);
|
|
24
27
|
const footer = {
|