00ea39d6 by 杨炀

Merge commit 'ce96a9a3' into dev

2 parents e177be2c ce96a9a3
......@@ -86,7 +86,7 @@ const people = reactive({
</div>
<div class="footer">
<div class="can_pay">
<div class="can_pay" @click="$router.go(-1)">
{{ languageFormat(language, "取消", "Cancel") }}
</div>
<div class="pay" @click="people.onConfirm()">
......@@ -142,6 +142,7 @@ div {
height: 70px;
background-color: #fff;
margin-top: 12px;
user-select: none;
.pay {
width: 200px;
height: 40px;
......
......@@ -26,7 +26,7 @@ const startCheckSuccessListener = (orderSn, actId) => {
payment.showCodeDialog = false;
ElMessage({
type: "success",
message: anguageFormat(
message: languageFormat(
language.value,
"支付成功",
"Payment succeeded"
......@@ -70,26 +70,28 @@ const payment = reactive({
"Please enter the contact phone number."
),
});
payOrder({
contactPhone: payment.form.phone,
customerIds: payment.form.viewers,
orderToken: order.data?.orderToken,
payType: 1,
paymentAmount: order.data?.paymentAmount,
}).then((res) => {
if (res.data.language == "zh-cn") {
payment.qrInfo = res.data;
qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => {
if (url) {
payment.qrCodeData = url;
}
});
payment.showCodeDialog = true;
startCheckSuccessListener(res.data.orderSn, props.activityId);
} else {
// TODO: 这里是PayPal支付
}
});
if (language.value == 0) {
payOrder({
contactPhone: payment.form.phone,
customerIds: payment.form.viewers,
orderToken: order.data?.orderToken,
payType: 1,
paymentAmount: order.data?.paymentAmount,
}).then((res) => {
if (res.data.language == "zh-cn") {
payment.qrInfo = res.data;
qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => {
if (url) {
payment.qrCodeData = url;
}
});
payment.showCodeDialog = true;
startCheckSuccessListener(res.data.orderSn, props.activityId);
}
});
} else {
// 这里是英文环境支付
}
},
handleCloce() {
payment.showCodeDialog = false;
......@@ -237,7 +239,7 @@ order.fetchData();
{{ languageFormat(language, "共计", "Total") }}
</div>
<div class="price_num">
<span v-if="language == 1">¥</span>{{ order.data?.paymentAmount }}
<span v-if="language == 0">¥</span>{{ order.data?.paymentAmount }}
</div>
</div>
</div>
......
......@@ -125,22 +125,25 @@ const detail = reactive({
payment() {
if (detail.pay_loading) return;
detail.pay_loading = true;
immediatePay({ orderSn: detail.data.orderSn, payType: 1 })
.then((res) => {
if (res.data.language == "zh-cn") {
detail.qrInfo = res.data;
qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => {
if (url) {
detail.qrCodeData = url;
}
});
startCheckSuccessListener(detail.data.orderSn);
detail.showCodeDialog = true;
} else {
// TODO: 这里是PayPal支付
}
})
.finally(() => (detail.pay_loading = false));
if (language.value) {
// 中文支付
immediatePay({ orderSn: detail.data.orderSn, payType: 1 })
.then((res) => {
if (res.data.language == "zh-cn") {
detail.qrInfo = res.data;
qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => {
if (url) {
detail.qrCodeData = url;
}
});
startCheckSuccessListener(detail.data.orderSn);
detail.showCodeDialog = true;
}
})
.finally(() => (detail.pay_loading = false));
} else {
// TODO: 这里是英文支付
}
},
handleClose() {
detail.showCodeDialog = false;
......
......@@ -41,7 +41,7 @@ const price = reactive({
// 座位禁用时图标地址
const disabledIconUrl =
"https://radv4.gitliuyi.top/images/20240511/unselect_default.png";
"https://radv4.gitliuyi.top/files/20240511/unselect_default.png";
function onWindowMessage(e) {
const data = e.data;
......@@ -65,21 +65,39 @@ function onWindowMessage(e) {
}, 500);
});
// 绘制舞台矩形
sendMsg("draw-object-rectangle", {
x: 1800,
y: 960,
w: 4400,
h: 1300,
color: "#e0e0e0",
});
// 绘制舞台文字
sendMsg("draw-object-text", {
x: 3900,
y: 1500,
text: language.value == 0 ? "舞台" : "stage",
style: { fontSize: 160, fontWeight: "400", fill: "#6a6a6a" },
});
if (route.query.sitePlace == "B6") {
// 绘制舞台矩形
sendMsg("draw-object-rectangle", {
x: 1800,
y: 960,
w: 4400,
h: 1300,
color: "#e0e0e0",
});
// 绘制舞台文字
sendMsg("draw-object-text", {
x: 3900,
y: 1500,
text: language.value == 0 ? "舞台" : "stage",
style: { fontSize: 160, fontWeight: "400", fill: "#6a6a6a" },
});
} else {
// 绘制舞台矩形
sendMsg("draw-object-rectangle", {
x: 80,
y: 380,
w: 4400,
h: 1300,
color: "#e0e0e0",
});
// 绘制舞台文字
sendMsg("draw-object-text", {
x: 2100,
y: 950,
text: language.value == 0 ? "舞台" : "stage",
style: { fontSize: 160, fontWeight: "400", fill: "#6a6a6a" },
});
}
} else if (data.type == "seat-click") {
// 子页面点击了座位
const seatData = data.data;
......@@ -313,7 +331,9 @@ price.fetchData();
<div v-for="(it, index) in selectedSeats" class="seat_item">
<img class="seat_icon" :src="it.selectIcon" />
<span class="num"
>{{ it.area }}{{ languageFormat(language, "区", "Zones") }}
><span v-if="it.area"
>{{ it.area }}{{ languageFormat(language, "区", "Zones") }}</span
>
{{ it.pai }}{{ languageFormat(language, "排", "Row") }} {{ it.no }}
{{ languageFormat(language, "座", "Seat") }}</span
>
......
......@@ -27,7 +27,7 @@ http.interceptors.request.use(
const TOKEN = getToken();
if (TOKEN) config.headers.Authorization = TOKEN;
if (config.method == "get") config.params = config.data;
console.log("config", config);
// console.log("config", config);
return config;
},
(error) => {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!