|
@@ -117,8 +117,12 @@
|
|
|
alt="">
|
|
|
</div>
|
|
|
<div class="ogTitleBox">
|
|
|
- <p class="ogTitle">{$goods['goods_name']}({$goods['remark_for_one']})</p>
|
|
|
- <p class="ogSpecs"></p>
|
|
|
+ <p class="ogTitle">{$goods['goods_name']}</p>
|
|
|
+ <p class="ogSpecs">
|
|
|
+ {foreach $goods['remark_for_one'] as $key=>$flavor}
|
|
|
+ <span>| {$key} × {$flavor}</span>
|
|
|
+ {/foreach}
|
|
|
+ </p>
|
|
|
</div>
|
|
|
<p class="ogPr">${$goods['goods_price']}x{$goods['total_num']}</p>
|
|
|
<p class="ogToPr">${$goods['total_price']}</p>
|
|
@@ -437,9 +441,15 @@
|
|
|
const {status, message, data} = res || {}
|
|
|
if (status === 200 || status === "200") {
|
|
|
//window.open(data.payment.approval_link, "_blank");
|
|
|
+/*
|
|
|
let left = (window.innerWidth - 600) / 2;
|
|
|
window.open(data.payment.approval_link, "PayPal",
|
|
|
'height=300,width=600,top=300,left='+left+',toolbar=no,menubar=no, scrollbars=no,resizable=no,location=no, status=no');
|
|
|
+*/
|
|
|
+
|
|
|
+ let uri = data.payment.approval_link;
|
|
|
+ let id = "paypal"
|
|
|
+ createSuperLabel(uri, id)
|
|
|
|
|
|
var interId = setInterval(function () {
|
|
|
fetchOrder(interId);
|
|
@@ -450,6 +460,22 @@
|
|
|
showToast(message)
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ // 创建超链接,不会被拦截
|
|
|
+ function createSuperLabel(url, id)
|
|
|
+ {
|
|
|
+
|
|
|
+ let a = document.createElement("a");
|
|
|
+ a.setAttribute("href", url);
|
|
|
+ a.setAttribute("target", "_blank");
|
|
|
+ a.setAttribute("id", id);
|
|
|
+ // 防止反复添加
|
|
|
+ if (!document.getElementById(id)) {
|
|
|
+ document.body.appendChild(a);
|
|
|
+ }
|
|
|
+ a.click();
|
|
|
+ }
|
|
|
+
|
|
|
//取消未支付的订单
|
|
|
$(".ogCancelButton").on(tap, async function () {
|
|
|
const dp = {
|