@2kog/pkg-widget 0.1.17 → 0.1.18
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/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
</div>
|
|
57
57
|
</div>
|
|
58
58
|
<div class="secure-badge">
|
|
59
|
-
<i class="fas fa-
|
|
60
|
-
{{ t(
|
|
59
|
+
<i class="fas fa-qrcode"></i>
|
|
60
|
+
<span>{{ t(`pay.${activeMethod === "wepay" ? "wechatScan" : "alipayScan"}`) }}</span>
|
|
61
61
|
</div>
|
|
62
62
|
|
|
63
63
|
<!-- 错误提示 -->
|
|
@@ -70,7 +70,12 @@
|
|
|
70
70
|
|
|
71
71
|
<!-- 底部插槽 -->
|
|
72
72
|
<div class="footer-slot">
|
|
73
|
-
<slot name="footer" :texts="texts"
|
|
73
|
+
<slot name="footer" :texts="texts">
|
|
74
|
+
<div class="m-agreement">
|
|
75
|
+
<i class="fas fa-shield-halved agreement-icon"></i>
|
|
76
|
+
<span class="agreement-text" v-html="t('pay.agreement')"></span>
|
|
77
|
+
</div>
|
|
78
|
+
</slot>
|
|
74
79
|
</div>
|
|
75
80
|
</div>
|
|
76
81
|
</div>
|
|
@@ -141,6 +146,10 @@ export default {
|
|
|
141
146
|
type: Boolean,
|
|
142
147
|
default: false,
|
|
143
148
|
},
|
|
149
|
+
termLink: {
|
|
150
|
+
type: String,
|
|
151
|
+
default: "/link",
|
|
152
|
+
},
|
|
144
153
|
},
|
|
145
154
|
data() {
|
|
146
155
|
return {
|
|
@@ -432,14 +441,50 @@ export default {
|
|
|
432
441
|
<style lang="less">
|
|
433
442
|
.c-payment-component {
|
|
434
443
|
// max-width: 28rem;
|
|
435
|
-
flex: 1;
|
|
436
444
|
width: 100%;
|
|
437
|
-
background-color: #
|
|
438
|
-
color:
|
|
445
|
+
background-color: #fff;
|
|
446
|
+
color: #333;
|
|
439
447
|
// border-radius: 1rem;
|
|
440
448
|
padding: 2rem;
|
|
441
449
|
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
|
442
450
|
border: 1px solid rgb(31 41 55);
|
|
451
|
+
|
|
452
|
+
.m-agreement {
|
|
453
|
+
display: flex;
|
|
454
|
+
align-items: flex-start;
|
|
455
|
+
justify-content: center;
|
|
456
|
+
gap: 0.6rem;
|
|
457
|
+
font-size: 0.75rem;
|
|
458
|
+
color: #94a3b8;
|
|
459
|
+
line-height: 1.5;
|
|
460
|
+
max-width: 80%;
|
|
461
|
+
margin: 0 auto;
|
|
462
|
+
padding: 0.8rem 1rem;
|
|
463
|
+
border-radius: 0.75rem;
|
|
464
|
+
transition: all 0.3s ease;
|
|
465
|
+
|
|
466
|
+
.agreement-icon {
|
|
467
|
+
margin-top: 0.15rem;
|
|
468
|
+
color: #64748b;
|
|
469
|
+
font-size: 0.875rem;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.agreement-text {
|
|
473
|
+
text-align: left;
|
|
474
|
+
|
|
475
|
+
.u-link {
|
|
476
|
+
color: #3b82f6;
|
|
477
|
+
font-weight: 600;
|
|
478
|
+
cursor: pointer;
|
|
479
|
+
text-decoration: underline;
|
|
480
|
+
text-underline-offset: 2px;
|
|
481
|
+
|
|
482
|
+
&:hover {
|
|
483
|
+
color: #2563eb;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
443
488
|
}
|
|
444
489
|
|
|
445
490
|
.c-payment__header {
|
|
@@ -463,7 +508,7 @@ export default {
|
|
|
463
508
|
align-items: center;
|
|
464
509
|
gap: 0.5rem;
|
|
465
510
|
cursor: pointer;
|
|
466
|
-
border: 2px solid rgba(
|
|
511
|
+
border: 2px solid rgba(0, 0, 0, 0.05);
|
|
467
512
|
transition: all 0.3s;
|
|
468
513
|
background: transparent;
|
|
469
514
|
|
|
@@ -3,12 +3,18 @@ export default {
|
|
|
3
3
|
wechat: "WeChat Pay",
|
|
4
4
|
alipay: "Alipay",
|
|
5
5
|
secureChannel: "Official Encrypted Payment Channel, Active Immediately",
|
|
6
|
+
wechatScan: "Scan the QR code with WeChat to pay",
|
|
7
|
+
alipayScan: "Scan the QR code with Alipay to pay",
|
|
6
8
|
|
|
7
9
|
createOrderFailed: "Failed to create order, please try again",
|
|
8
|
-
orderTimeout:
|
|
10
|
+
orderTimeout:
|
|
11
|
+
"Order processing timed out, please refresh and try again",
|
|
9
12
|
orderFailed: "Order processing failed, please try again",
|
|
10
13
|
getQrcodeFailed: "Failed to get payment QR code, please try again",
|
|
11
|
-
paymentTimeout:
|
|
14
|
+
paymentTimeout:
|
|
15
|
+
"Payment timed out, please contact customer service if you have paid",
|
|
12
16
|
paymentFailed: "Payment failed, please try again",
|
|
17
|
+
agreement:
|
|
18
|
+
"Payment signifies agreement to the <span class='u-link'>Terms of Service</span>. Virtual services are not eligible for 7-day unconditional refunds.",
|
|
13
19
|
},
|
|
14
|
-
}
|
|
20
|
+
};
|
|
@@ -3,6 +3,8 @@ export default {
|
|
|
3
3
|
wechat: "微信支付",
|
|
4
4
|
alipay: "支付宝",
|
|
5
5
|
secureChannel: "官方加密支付通道,即开即用",
|
|
6
|
+
wechatScan: "打开微信扫一扫即可支付",
|
|
7
|
+
alipayScan: "打开支付宝扫一扫即可支付",
|
|
6
8
|
|
|
7
9
|
createOrderFailed: "创建订单失败,请重试",
|
|
8
10
|
orderTimeout: "订单处理超时,请刷新重试",
|
|
@@ -10,5 +12,7 @@ export default {
|
|
|
10
12
|
getQrcodeFailed: "获取支付二维码失败,请重试",
|
|
11
13
|
paymentTimeout: "支付超时,如已支付请联系客服",
|
|
12
14
|
paymentFailed: "支付失败,请重试",
|
|
15
|
+
agreement:
|
|
16
|
+
"支付即视为同意<a class='u-link' href={termLink}>《服务条款》</a>,虚拟服务不支持7天无理由退款",
|
|
13
17
|
},
|
|
14
|
-
}
|
|
18
|
+
};
|