ts-glitter 18.4.6 → 18.4.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 +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/glitter-base/global/language.js +1 -0
- package/lowcode/glitter-base/global/language.ts +2 -0
- package/lowcode/public-components/checkout/index.js +233 -118
- package/lowcode/public-components/checkout/index.ts +1111 -965
- package/package.json +1 -1
- package/src/api-public/services/user.js +13 -0
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +12 -0
package/lowcode/Entry.js
CHANGED
|
@@ -131,7 +131,7 @@ export class Entry {
|
|
|
131
131
|
}
|
|
132
132
|
window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : createClock();
|
|
133
133
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
134
|
-
glitter.share.editerVersion = 'V_18.4.
|
|
134
|
+
glitter.share.editerVersion = 'V_18.4.8';
|
|
135
135
|
glitter.share.start = new Date();
|
|
136
136
|
const vm = { appConfig: [] };
|
|
137
137
|
window.saasConfig = {
|
package/lowcode/Entry.ts
CHANGED
|
@@ -131,7 +131,7 @@ export class Entry {
|
|
|
131
131
|
}
|
|
132
132
|
(window as any).renderClock = (window as any).renderClock ?? createClock();
|
|
133
133
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
134
|
-
glitter.share.editerVersion = 'V_18.4.
|
|
134
|
+
glitter.share.editerVersion = 'V_18.4.8';
|
|
135
135
|
glitter.share.start = new Date();
|
|
136
136
|
const vm = { appConfig: [] };
|
|
137
137
|
(window as any).saasConfig = {
|
|
@@ -866,16 +866,16 @@ export class CheckoutIndex {
|
|
|
866
866
|
>
|
|
867
867
|
${vm.cartData.code
|
|
868
868
|
? html `${vm.cartData.code}<i
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
869
|
+
class="fa-solid fa-xmark-large ms-2"
|
|
870
|
+
style="cursor: pointer;"
|
|
871
|
+
onclick="${gvc.event((e, event) => {
|
|
872
872
|
event.stopPropagation();
|
|
873
873
|
apiCart.setCart(cartItem => {
|
|
874
874
|
cartItem.code = '';
|
|
875
875
|
refreshCartData();
|
|
876
876
|
});
|
|
877
877
|
})}"
|
|
878
|
-
|
|
878
|
+
></i>`
|
|
879
879
|
: Language.text('add')}
|
|
880
880
|
</div>
|
|
881
881
|
</div>
|
|
@@ -1158,10 +1158,12 @@ export class CheckoutIndex {
|
|
|
1158
1158
|
<div class="flex-fill"></div>
|
|
1159
1159
|
<div
|
|
1160
1160
|
class="d-flex align-items-center border rounded-2"
|
|
1161
|
-
style=""
|
|
1161
|
+
style="overflow: hidden;"
|
|
1162
1162
|
>
|
|
1163
1163
|
<div
|
|
1164
|
-
class="
|
|
1164
|
+
class="${item.is_gift
|
|
1165
|
+
? `d-none`
|
|
1166
|
+
: `d-flex`} align-items-center justify-content-center"
|
|
1165
1167
|
style="width:38px;height: 38px;cursor: pointer;"
|
|
1166
1168
|
onclick="${gvc.event(() => {
|
|
1167
1169
|
apiCart.setCart(cartItem => {
|
|
@@ -1181,7 +1183,10 @@ export class CheckoutIndex {
|
|
|
1181
1183
|
<select
|
|
1182
1184
|
class="form-select custom-select mx-0 p-0 "
|
|
1183
1185
|
style="
|
|
1184
|
-
|
|
1186
|
+
|
|
1187
|
+
${item.is_gift
|
|
1188
|
+
? `border:none;`
|
|
1189
|
+
: `border-top:none;border-bottom: none;`}
|
|
1185
1190
|
border-radius: 0px; color: #575757; width: 50px;height:38px;background-image:none;${parseInt(vm.quantity, 10) < 10
|
|
1186
1191
|
? `text-indent: 43%;`
|
|
1187
1192
|
: `text-indent: 40%;`}"
|
|
@@ -1194,6 +1199,7 @@ export class CheckoutIndex {
|
|
|
1194
1199
|
refreshCartData();
|
|
1195
1200
|
});
|
|
1196
1201
|
})}"
|
|
1202
|
+
${item.is_gift ? `disabled` : ``}
|
|
1197
1203
|
>
|
|
1198
1204
|
${[
|
|
1199
1205
|
...new Array((() => {
|
|
@@ -1214,7 +1220,9 @@ export class CheckoutIndex {
|
|
|
1214
1220
|
.join('')}
|
|
1215
1221
|
</select>
|
|
1216
1222
|
<div
|
|
1217
|
-
class="
|
|
1223
|
+
class=" align-items-center justify-content-center ${item.is_gift
|
|
1224
|
+
? `d-none`
|
|
1225
|
+
: `d-flex`}"
|
|
1218
1226
|
style="width:38px;height: 38px;cursor: pointer;"
|
|
1219
1227
|
onclick="${gvc.event(() => {
|
|
1220
1228
|
apiCart.setCart(cartItem => {
|
|
@@ -1762,20 +1770,45 @@ export class CheckoutIndex {
|
|
|
1762
1770
|
})}
|
|
1763
1771
|
</div>
|
|
1764
1772
|
<!-- 配送地址 -->
|
|
1765
|
-
${['normal', 'black_cat'].includes(vm.cartData.user_info.shipment)
|
|
1766
|
-
?
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1773
|
+
${['normal', 'black_cat', 'black_cat_freezing', 'black_cat_ice'].includes(vm.cartData.user_info.shipment)
|
|
1774
|
+
? gvc.bindView(() => {
|
|
1775
|
+
const id = gvc.glitter.getUUID();
|
|
1776
|
+
return {
|
|
1777
|
+
bind: id,
|
|
1778
|
+
view: () => {
|
|
1779
|
+
return html `<label class="${gClass('label')} w-100 d-flex align-items-center"
|
|
1780
|
+
>${Language.text('shipping_address')}
|
|
1781
|
+
<div class="flex-fill"></div>
|
|
1782
|
+
<div
|
|
1783
|
+
class="fs-sm fw-500 ${!GlobalUser.token ? `d-none` : ``}"
|
|
1784
|
+
style="cursor: pointer; color: #3366bb;"
|
|
1785
|
+
onclick="${gvc.event(() => {
|
|
1786
|
+
ApiUser.getUserData(GlobalUser.token, 'me').then(res => {
|
|
1787
|
+
vm.cartData.user_info.address = res.response.userData.consignee_address;
|
|
1788
|
+
this.storeLocalData(vm.cartData);
|
|
1789
|
+
gvc.notifyDataChange(id);
|
|
1790
|
+
});
|
|
1791
|
+
})}"
|
|
1792
|
+
>
|
|
1793
|
+
${Language.text('quick_input')}
|
|
1794
|
+
</div>
|
|
1795
|
+
</label>
|
|
1796
|
+
<input
|
|
1797
|
+
class="${gClass('input')}"
|
|
1798
|
+
type="address"
|
|
1799
|
+
placeholder="${Language.text('please_enter_delivery_address')}"
|
|
1800
|
+
value="${vm.cartData.user_info.address || ''}"
|
|
1801
|
+
onchange="${gvc.event(e => {
|
|
1802
|
+
vm.cartData.user_info.address = e.value;
|
|
1803
|
+
this.storeLocalData(vm.cartData);
|
|
1804
|
+
})}"
|
|
1805
|
+
/>`;
|
|
1806
|
+
},
|
|
1807
|
+
divCreate: {
|
|
1808
|
+
class: `col-12 mb-2`,
|
|
1809
|
+
},
|
|
1810
|
+
};
|
|
1811
|
+
})
|
|
1779
1812
|
: ``}
|
|
1780
1813
|
<!-- 選取超商 -->
|
|
1781
1814
|
${ShipmentConfig.supermarketList.includes(vm.cartData.user_info.shipment)
|
|
@@ -1954,9 +1987,29 @@ export class CheckoutIndex {
|
|
|
1954
1987
|
</div>
|
|
1955
1988
|
<!--顧客資訊-->
|
|
1956
1989
|
<div class="rounded-3 bg-white w-100 p-1 mt-3">
|
|
1957
|
-
<div class="${gClass('banner-text')} px-3 pt-3"
|
|
1990
|
+
<div class="${gClass('banner-text')} px-3 pt-3 w-100 d-flex align-items-center">
|
|
1991
|
+
${Language.text('customer_info')}
|
|
1992
|
+
<div class="flex-fill"></div>
|
|
1993
|
+
<div
|
|
1994
|
+
class="fs-sm fw-500 ${!GlobalUser.token ? `d-none` : ``}"
|
|
1995
|
+
style="cursor: pointer; color: #3366bb;"
|
|
1996
|
+
onclick="${gvc.event(() => {
|
|
1997
|
+
ApiUser.getUserData(GlobalUser.token, 'me').then(res => {
|
|
1998
|
+
console.log(`res.response.userData=>`, res.response.userData);
|
|
1999
|
+
['name', 'phone', 'email'].map(dd => {
|
|
2000
|
+
vm.cartData.customer_info[dd] =
|
|
2001
|
+
res.response.userData[dd] || vm.cartData.customer_info[dd];
|
|
2002
|
+
});
|
|
2003
|
+
this.storeLocalData(vm.cartData);
|
|
2004
|
+
gvc.notifyDataChange('customer-info');
|
|
2005
|
+
});
|
|
2006
|
+
})}"
|
|
2007
|
+
>
|
|
2008
|
+
${Language.text('quick_input')}
|
|
2009
|
+
</div>
|
|
2010
|
+
</div>
|
|
1958
2011
|
${gvc.bindView(() => {
|
|
1959
|
-
const id =
|
|
2012
|
+
const id = 'customer-info';
|
|
1960
2013
|
const vm_info = {
|
|
1961
2014
|
loading: true,
|
|
1962
2015
|
list: [],
|
|
@@ -1969,7 +2022,7 @@ export class CheckoutIndex {
|
|
|
1969
2022
|
vm_info.list = widget.share.custom_form_checkout;
|
|
1970
2023
|
resolve([
|
|
1971
2024
|
html ` <div class="row m-0 mt-3 mb-2">
|
|
1972
|
-
|
|
2025
|
+
${[
|
|
1973
2026
|
{
|
|
1974
2027
|
name: Language.text('name'),
|
|
1975
2028
|
key: 'name',
|
|
@@ -1990,20 +2043,20 @@ export class CheckoutIndex {
|
|
|
1990
2043
|
})
|
|
1991
2044
|
.map(dd => {
|
|
1992
2045
|
return html ` <div class="col-12 col-md-4 mb-2">
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
2046
|
+
<label class="${gClass('label')}">${dd.name}</label>
|
|
2047
|
+
<input
|
|
2048
|
+
class="${gClass('input')}"
|
|
2049
|
+
type="${dd.key}"
|
|
2050
|
+
value="${vm.cartData.customer_info[dd.key] || ''}"
|
|
2051
|
+
onchange="${gvc.event((e, event) => {
|
|
1999
2052
|
vm.cartData.customer_info[dd.key] = e.value;
|
|
2000
2053
|
this.storeLocalData(vm.cartData);
|
|
2001
2054
|
})}"
|
|
2002
|
-
|
|
2003
|
-
|
|
2055
|
+
/>
|
|
2056
|
+
</div>`;
|
|
2004
2057
|
})
|
|
2005
2058
|
.join('')}
|
|
2006
|
-
|
|
2059
|
+
</div>`,
|
|
2007
2060
|
gvc.bindView(() => {
|
|
2008
2061
|
const id = gvc.glitter.getUUID();
|
|
2009
2062
|
return {
|
|
@@ -2077,7 +2130,54 @@ export class CheckoutIndex {
|
|
|
2077
2130
|
</div>
|
|
2078
2131
|
<!--收件人資料-->
|
|
2079
2132
|
<div class="rounded-3 bg-white w-100 p-1 mt-3">
|
|
2080
|
-
<div class="${gClass('banner-text')} px-3 pt-3"
|
|
2133
|
+
<div class="${gClass('banner-text')} px-3 pt-3 d-flex align-items-center">
|
|
2134
|
+
${Language.text('recipient_info')}
|
|
2135
|
+
<div class="flex-fill"></div>
|
|
2136
|
+
<div
|
|
2137
|
+
class="fs-sm fw-500 ${!GlobalUser.token ? `d-none` : ``}"
|
|
2138
|
+
style="cursor: pointer; color: #3366bb;"
|
|
2139
|
+
onclick="${gvc.event(() => {
|
|
2140
|
+
ApiUser.getUserData(GlobalUser.token, 'me').then(res => {
|
|
2141
|
+
console.log(`res.response.userData=>`, res.response.userData);
|
|
2142
|
+
['name', 'phone', 'email'].map(dd => {
|
|
2143
|
+
vm.cartData.user_info[dd] =
|
|
2144
|
+
res.response.userData[dd] || vm.cartData.user_info[dd];
|
|
2145
|
+
});
|
|
2146
|
+
[
|
|
2147
|
+
{
|
|
2148
|
+
key: 'carrier_num',
|
|
2149
|
+
refer: res.response.userData['carrier_number'],
|
|
2150
|
+
},
|
|
2151
|
+
{
|
|
2152
|
+
key: 'gui_number',
|
|
2153
|
+
refer: res.response.userData['gui_number'],
|
|
2154
|
+
},
|
|
2155
|
+
{
|
|
2156
|
+
key: 'send_type',
|
|
2157
|
+
refer: res.response.userData['gui_number'] ||
|
|
2158
|
+
!res.response.userData['carrier_number']
|
|
2159
|
+
? 'email'
|
|
2160
|
+
: 'carrier_num',
|
|
2161
|
+
},
|
|
2162
|
+
{
|
|
2163
|
+
key: 'invoice_type',
|
|
2164
|
+
refer: res.response.userData['gui_number'] ? 'company' : 'me',
|
|
2165
|
+
},
|
|
2166
|
+
{
|
|
2167
|
+
key: 'company',
|
|
2168
|
+
refer: res.response.userData['company'],
|
|
2169
|
+
},
|
|
2170
|
+
].map(dd => {
|
|
2171
|
+
vm.cartData.user_info[dd.key] = dd.refer || vm.cartData.user_info[dd.key];
|
|
2172
|
+
});
|
|
2173
|
+
this.storeLocalData(vm.cartData);
|
|
2174
|
+
gvc.notifyDataChange('invoice_place');
|
|
2175
|
+
});
|
|
2176
|
+
})}"
|
|
2177
|
+
>
|
|
2178
|
+
${Language.text('quick_input')}
|
|
2179
|
+
</div>
|
|
2180
|
+
</div>
|
|
2081
2181
|
${gvc.bindView(() => {
|
|
2082
2182
|
const id = 'invoice_place';
|
|
2083
2183
|
const vm_info = {
|
|
@@ -2112,7 +2212,8 @@ export class CheckoutIndex {
|
|
|
2112
2212
|
dd.title = Language.text('name');
|
|
2113
2213
|
break;
|
|
2114
2214
|
case 'phone':
|
|
2115
|
-
dd.form_config.place_holder =
|
|
2215
|
+
dd.form_config.place_holder =
|
|
2216
|
+
Language.text('please_enter_contact_number');
|
|
2116
2217
|
dd.title = Language.text('contact_number');
|
|
2117
2218
|
break;
|
|
2118
2219
|
case 'email':
|
|
@@ -2459,11 +2560,14 @@ export class CheckoutIndex {
|
|
|
2459
2560
|
}));
|
|
2460
2561
|
});
|
|
2461
2562
|
vm.cartData.user_info.invoice_method = method;
|
|
2462
|
-
vm.cartData.user_info.invoice_type =
|
|
2463
|
-
|
|
2563
|
+
vm.cartData.user_info.invoice_type =
|
|
2564
|
+
vm.cartData.user_info.invoice_type || 'me';
|
|
2565
|
+
vm.cartData.user_info.send_type =
|
|
2566
|
+
vm.cartData.user_info.send_type || 'email';
|
|
2464
2567
|
const form_array = JSON.parse(JSON.stringify(vm_info.list));
|
|
2465
2568
|
form_array.map((dd) => {
|
|
2466
|
-
if (dd.key === 'send_type' &&
|
|
2569
|
+
if (dd.key === 'send_type' &&
|
|
2570
|
+
vm.cartData.user_info.send_type === 'carrier') {
|
|
2467
2571
|
dd.col = 3;
|
|
2468
2572
|
}
|
|
2469
2573
|
dd.form_config.title_style = {
|
|
@@ -2510,9 +2614,9 @@ export class CheckoutIndex {
|
|
|
2510
2614
|
});
|
|
2511
2615
|
return [
|
|
2512
2616
|
html ` <div
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2617
|
+
class="d-flex ms-2 my-3"
|
|
2618
|
+
style="gap:10px;cursor:pointer;"
|
|
2619
|
+
onclick="${gvc.event(() => {
|
|
2516
2620
|
vm.cartData.user_info_same = !vm.cartData.user_info_same;
|
|
2517
2621
|
if (vm.cartData.user_info_same) {
|
|
2518
2622
|
vm.cartData.user_info.name = vm.cartData.customer_info.name;
|
|
@@ -2521,14 +2625,14 @@ export class CheckoutIndex {
|
|
|
2521
2625
|
}
|
|
2522
2626
|
gvc.notifyDataChange(id);
|
|
2523
2627
|
})}"
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2628
|
+
>
|
|
2629
|
+
<input
|
|
2630
|
+
class="form-check-input form-checkbox ${checkbox}"
|
|
2631
|
+
type="checkbox"
|
|
2632
|
+
${vm.cartData.user_info_same ? `checked` : ''}
|
|
2633
|
+
/>
|
|
2634
|
+
${Language.text('same_as_buyer_info')}
|
|
2635
|
+
</div>`,
|
|
2532
2636
|
FormWidget.editorView({
|
|
2533
2637
|
gvc: gvc,
|
|
2534
2638
|
array: form_array.map((dd, index) => {
|
|
@@ -2566,33 +2670,36 @@ export class CheckoutIndex {
|
|
|
2566
2670
|
verify.push('提示:若訂單總重超過20公斤,無法提供中華郵政/黑貓宅配服務,請調整購買項目');
|
|
2567
2671
|
}
|
|
2568
2672
|
return html `
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2673
|
+
<div style="height:100px;"></div>
|
|
2674
|
+
<div
|
|
2675
|
+
class="w-100 d-flex align-items-center justify-content-center position-fixed bottom-0 start-0 p-2 shadow bg-white"
|
|
2676
|
+
style="height:76px;"
|
|
2677
|
+
>
|
|
2678
|
+
<div
|
|
2679
|
+
class="d-flex align-items-center justify-content-end"
|
|
2680
|
+
style="width:1180px;max-width: 100%;gap:24px;"
|
|
2681
|
+
>
|
|
2682
|
+
<div class="d-flex align-items-end fs-base" style="gap:5px;">
|
|
2683
|
+
<span style="white-space:nowrap;" class="fw-bold fs-sm">
|
|
2684
|
+
${Language.text('total_amount')}</span
|
|
2685
|
+
>
|
|
2686
|
+
<div class="${gClass(['price-row', 'text-1', 'bold'])}">
|
|
2687
|
+
<div class="fs-5 fw-bold ${gClass('price-text')}">
|
|
2688
|
+
${Currency.convertCurrencyText(vm.cartData.total)}
|
|
2689
|
+
</div>
|
|
2690
|
+
</div>
|
|
2691
|
+
</div>
|
|
2692
|
+
<div class="flex-fill d-block d-sm-none"></div>
|
|
2693
|
+
<div class="">
|
|
2694
|
+
<button
|
|
2695
|
+
class="${gClass(verify.length > 0 ? 'button-bgr-disable' : 'button-bgr')}"
|
|
2696
|
+
style="${document.body.clientWidth < 800
|
|
2697
|
+
? `width:100px;`
|
|
2698
|
+
: `width:380px;`}"
|
|
2699
|
+
onclick="${gvc.event(() => {
|
|
2594
2700
|
var _a;
|
|
2595
|
-
if (window.login_config.login_in_to_order &&
|
|
2701
|
+
if (window.login_config.login_in_to_order &&
|
|
2702
|
+
!GlobalUser.token) {
|
|
2596
2703
|
GlobalUser.loginRedirect = location.href;
|
|
2597
2704
|
gvc.glitter.href = '/login';
|
|
2598
2705
|
return;
|
|
@@ -2610,7 +2717,8 @@ export class CheckoutIndex {
|
|
|
2610
2717
|
return;
|
|
2611
2718
|
}
|
|
2612
2719
|
for (const item of vm.cartData.lineItems) {
|
|
2613
|
-
const title = (item.language_data &&
|
|
2720
|
+
const title = (item.language_data &&
|
|
2721
|
+
item.language_data[Language.getLanguage()].title) ||
|
|
2614
2722
|
item.title;
|
|
2615
2723
|
let min = (item.min_qty && parseInt(item.min_qty, 10)) || 1;
|
|
2616
2724
|
let max_qty = (item.max_qty && parseInt(item.max_qty, 10)) || Infinity;
|
|
@@ -2689,31 +2797,35 @@ export class CheckoutIndex {
|
|
|
2689
2797
|
bind: `paynow`,
|
|
2690
2798
|
view: () => {
|
|
2691
2799
|
return html ` <div
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2800
|
+
class="w-100 h-100 d-flex align-items-center justify-content-center"
|
|
2801
|
+
>
|
|
2802
|
+
${document.body.clientWidth < 800
|
|
2695
2803
|
? `
|
|
2696
2804
|
<div class="pt-5 bg-white position-relative vw-100" style="height: ${window.innerHeight}px;overflow-y: auto;">
|
|
2697
2805
|
`
|
|
2698
2806
|
: `<div class="p-3 bg-white position-relative" style="max-height: calc(100vh - 90px);overflow-y:auto;">`}
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2807
|
+
<div
|
|
2808
|
+
style="position: absolute; right: 15px;top:15px;z-index:1;"
|
|
2809
|
+
onclick="${gvc.event(() => {
|
|
2702
2810
|
gvc.closeDialog();
|
|
2703
2811
|
})}"
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2812
|
+
>
|
|
2813
|
+
<i
|
|
2814
|
+
class="fa-regular fa-circle-xmark fs-5 text-dark cursor_pointer"
|
|
2815
|
+
></i>
|
|
2816
|
+
</div>
|
|
2817
|
+
<div id="paynow-container" class="" style="">
|
|
2818
|
+
<div style="width:200px;height:200px;">
|
|
2819
|
+
loading...
|
|
2820
|
+
</div>
|
|
2821
|
+
</div>
|
|
2822
|
+
<div class="px-3 px-sm-0 w-100">
|
|
2823
|
+
<button
|
|
2824
|
+
class="${gClass(verify.length > 0
|
|
2825
|
+
? 'button-bgr-disable'
|
|
2826
|
+
: 'button-bgr')} "
|
|
2827
|
+
id="checkoutButton"
|
|
2828
|
+
onclick="${gvc.event(() => {
|
|
2717
2829
|
const PayNow = window.PayNow;
|
|
2718
2830
|
const dialog = new ShareDialog(gvc.glitter);
|
|
2719
2831
|
dialog.dataLoading({ visible: true });
|
|
@@ -2727,11 +2839,13 @@ export class CheckoutIndex {
|
|
|
2727
2839
|
}
|
|
2728
2840
|
});
|
|
2729
2841
|
})}"
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2842
|
+
>
|
|
2843
|
+
<span class="${gClass('button-text')}"
|
|
2844
|
+
>確認結帳</span
|
|
2845
|
+
>
|
|
2846
|
+
</button>
|
|
2847
|
+
</div>
|
|
2848
|
+
</div>`;
|
|
2735
2849
|
},
|
|
2736
2850
|
divCreate: {
|
|
2737
2851
|
class: ` h-100 d-flex align-items-center justify-content-center`,
|
|
@@ -2764,7 +2878,9 @@ export class CheckoutIndex {
|
|
|
2764
2878
|
},
|
|
2765
2879
|
});
|
|
2766
2880
|
}, `paynow`, {
|
|
2767
|
-
animation: document.body.clientWidth > 800
|
|
2881
|
+
animation: document.body.clientWidth > 800
|
|
2882
|
+
? Animation.fade
|
|
2883
|
+
: Animation.popup,
|
|
2768
2884
|
dismiss: () => {
|
|
2769
2885
|
document.body.style.setProperty('overflow-y', 'auto');
|
|
2770
2886
|
},
|
|
@@ -2785,23 +2901,25 @@ export class CheckoutIndex {
|
|
|
2785
2901
|
}
|
|
2786
2902
|
else {
|
|
2787
2903
|
const id = gvc.glitter.getUUID();
|
|
2788
|
-
$('body').append(html ` <div id="${id}" style="display: none;"
|
|
2904
|
+
$('body').append(html ` <div id="${id}" style="display: none;">
|
|
2905
|
+
${res.response.form}
|
|
2906
|
+
</div>`);
|
|
2789
2907
|
document.querySelector(`#${id} #submit`).click();
|
|
2790
2908
|
}
|
|
2791
2909
|
}
|
|
2792
2910
|
});
|
|
2793
2911
|
})}"
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2912
|
+
>
|
|
2913
|
+
<span class="${gClass('button-text')}"
|
|
2914
|
+
>${window.login_config.login_in_to_order && !GlobalUser.token
|
|
2797
2915
|
? Language.text('login_in_to_checkout')
|
|
2798
2916
|
: Language.text('next')}</span
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2917
|
+
>
|
|
2918
|
+
</button>
|
|
2919
|
+
</div>
|
|
2920
|
+
</div>
|
|
2921
|
+
</div>
|
|
2922
|
+
`;
|
|
2805
2923
|
})()}
|
|
2806
2924
|
</div>
|
|
2807
2925
|
<div class="d-none d-sm-block" style="height:120px;"></div>
|
|
@@ -2812,9 +2930,7 @@ export class CheckoutIndex {
|
|
|
2812
2930
|
: `width:calc(100% );`}"
|
|
2813
2931
|
>
|
|
2814
2932
|
<!--明細-->
|
|
2815
|
-
<div style="" class="rounded-3 bg-white w-100 p-3">
|
|
2816
|
-
${detail_info}
|
|
2817
|
-
</div>
|
|
2933
|
+
<div style="" class="rounded-3 bg-white w-100 p-3">${detail_info}</div>
|
|
2818
2934
|
<div class="d-sm-none" style="height:120px;"></div>
|
|
2819
2935
|
</div>
|
|
2820
2936
|
</div>
|
|
@@ -2823,8 +2939,6 @@ ${detail_info}
|
|
|
2823
2939
|
},
|
|
2824
2940
|
};
|
|
2825
2941
|
})())}
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
2942
|
</div>`;
|
|
2829
2943
|
}
|
|
2830
2944
|
catch (e) {
|
|
@@ -2936,7 +3050,8 @@ ${detail_info}
|
|
|
2936
3050
|
}
|
|
2937
3051
|
});
|
|
2938
3052
|
}
|
|
2939
|
-
if (
|
|
3053
|
+
if (['normal', 'black_cat', 'black_cat_freezing', 'black_cat_ice'].includes(subData['shipment']) &&
|
|
3054
|
+
(!subData['address'] || subData['address'] === '')) {
|
|
2940
3055
|
dialog.errorMessage({
|
|
2941
3056
|
text: `${Language.text('please_enter')}「${Language.text('shipping_address')}」`,
|
|
2942
3057
|
});
|