00ea39d6 by 杨炀

Merge commit 'ce96a9a3' into dev

2 parents e177be2c ce96a9a3
...@@ -86,7 +86,7 @@ const people = reactive({ ...@@ -86,7 +86,7 @@ const people = reactive({
86 </div> 86 </div>
87 87
88 <div class="footer"> 88 <div class="footer">
89 <div class="can_pay"> 89 <div class="can_pay" @click="$router.go(-1)">
90 {{ languageFormat(language, "取消", "Cancel") }} 90 {{ languageFormat(language, "取消", "Cancel") }}
91 </div> 91 </div>
92 <div class="pay" @click="people.onConfirm()"> 92 <div class="pay" @click="people.onConfirm()">
...@@ -142,6 +142,7 @@ div { ...@@ -142,6 +142,7 @@ div {
142 height: 70px; 142 height: 70px;
143 background-color: #fff; 143 background-color: #fff;
144 margin-top: 12px; 144 margin-top: 12px;
145 user-select: none;
145 .pay { 146 .pay {
146 width: 200px; 147 width: 200px;
147 height: 40px; 148 height: 40px;
......
...@@ -26,7 +26,7 @@ const startCheckSuccessListener = (orderSn, actId) => { ...@@ -26,7 +26,7 @@ const startCheckSuccessListener = (orderSn, actId) => {
26 payment.showCodeDialog = false; 26 payment.showCodeDialog = false;
27 ElMessage({ 27 ElMessage({
28 type: "success", 28 type: "success",
29 message: anguageFormat( 29 message: languageFormat(
30 language.value, 30 language.value,
31 "支付成功", 31 "支付成功",
32 "Payment succeeded" 32 "Payment succeeded"
...@@ -70,26 +70,28 @@ const payment = reactive({ ...@@ -70,26 +70,28 @@ const payment = reactive({
70 "Please enter the contact phone number." 70 "Please enter the contact phone number."
71 ), 71 ),
72 }); 72 });
73 payOrder({ 73 if (language.value == 0) {
74 contactPhone: payment.form.phone, 74 payOrder({
75 customerIds: payment.form.viewers, 75 contactPhone: payment.form.phone,
76 orderToken: order.data?.orderToken, 76 customerIds: payment.form.viewers,
77 payType: 1, 77 orderToken: order.data?.orderToken,
78 paymentAmount: order.data?.paymentAmount, 78 payType: 1,
79 }).then((res) => { 79 paymentAmount: order.data?.paymentAmount,
80 if (res.data.language == "zh-cn") { 80 }).then((res) => {
81 payment.qrInfo = res.data; 81 if (res.data.language == "zh-cn") {
82 qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => { 82 payment.qrInfo = res.data;
83 if (url) { 83 qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => {
84 payment.qrCodeData = url; 84 if (url) {
85 } 85 payment.qrCodeData = url;
86 }); 86 }
87 payment.showCodeDialog = true; 87 });
88 startCheckSuccessListener(res.data.orderSn, props.activityId); 88 payment.showCodeDialog = true;
89 } else { 89 startCheckSuccessListener(res.data.orderSn, props.activityId);
90 // TODO: 这里是PayPal支付 90 }
91 } 91 });
92 }); 92 } else {
93 // 这里是英文环境支付
94 }
93 }, 95 },
94 handleCloce() { 96 handleCloce() {
95 payment.showCodeDialog = false; 97 payment.showCodeDialog = false;
...@@ -237,7 +239,7 @@ order.fetchData(); ...@@ -237,7 +239,7 @@ order.fetchData();
237 {{ languageFormat(language, "共计", "Total") }} 239 {{ languageFormat(language, "共计", "Total") }}
238 </div> 240 </div>
239 <div class="price_num"> 241 <div class="price_num">
240 <span v-if="language == 1">¥</span>{{ order.data?.paymentAmount }} 242 <span v-if="language == 0">¥</span>{{ order.data?.paymentAmount }}
241 </div> 243 </div>
242 </div> 244 </div>
243 </div> 245 </div>
......
...@@ -125,22 +125,25 @@ const detail = reactive({ ...@@ -125,22 +125,25 @@ const detail = reactive({
125 payment() { 125 payment() {
126 if (detail.pay_loading) return; 126 if (detail.pay_loading) return;
127 detail.pay_loading = true; 127 detail.pay_loading = true;
128 immediatePay({ orderSn: detail.data.orderSn, payType: 1 }) 128 if (language.value) {
129 .then((res) => { 129 // 中文支付
130 if (res.data.language == "zh-cn") { 130 immediatePay({ orderSn: detail.data.orderSn, payType: 1 })
131 detail.qrInfo = res.data; 131 .then((res) => {
132 qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => { 132 if (res.data.language == "zh-cn") {
133 if (url) { 133 detail.qrInfo = res.data;
134 detail.qrCodeData = url; 134 qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => {
135 } 135 if (url) {
136 }); 136 detail.qrCodeData = url;
137 startCheckSuccessListener(detail.data.orderSn); 137 }
138 detail.showCodeDialog = true; 138 });
139 } else { 139 startCheckSuccessListener(detail.data.orderSn);
140 // TODO: 这里是PayPal支付 140 detail.showCodeDialog = true;
141 } 141 }
142 }) 142 })
143 .finally(() => (detail.pay_loading = false)); 143 .finally(() => (detail.pay_loading = false));
144 } else {
145 // TODO: 这里是英文支付
146 }
144 }, 147 },
145 handleClose() { 148 handleClose() {
146 detail.showCodeDialog = false; 149 detail.showCodeDialog = false;
......
...@@ -41,7 +41,7 @@ const price = reactive({ ...@@ -41,7 +41,7 @@ const price = reactive({
41 41
42 // 座位禁用时图标地址 42 // 座位禁用时图标地址
43 const disabledIconUrl = 43 const disabledIconUrl =
44 "https://radv4.gitliuyi.top/images/20240511/unselect_default.png"; 44 "https://radv4.gitliuyi.top/files/20240511/unselect_default.png";
45 45
46 function onWindowMessage(e) { 46 function onWindowMessage(e) {
47 const data = e.data; 47 const data = e.data;
...@@ -65,21 +65,39 @@ function onWindowMessage(e) { ...@@ -65,21 +65,39 @@ function onWindowMessage(e) {
65 }, 500); 65 }, 500);
66 }); 66 });
67 67
68 // 绘制舞台矩形 68 if (route.query.sitePlace == "B6") {
69 sendMsg("draw-object-rectangle", { 69 // 绘制舞台矩形
70 x: 1800, 70 sendMsg("draw-object-rectangle", {
71 y: 960, 71 x: 1800,
72 w: 4400, 72 y: 960,
73 h: 1300, 73 w: 4400,
74 color: "#e0e0e0", 74 h: 1300,
75 }); 75 color: "#e0e0e0",
76 // 绘制舞台文字 76 });
77 sendMsg("draw-object-text", { 77 // 绘制舞台文字
78 x: 3900, 78 sendMsg("draw-object-text", {
79 y: 1500, 79 x: 3900,
80 text: language.value == 0 ? "舞台" : "stage", 80 y: 1500,
81 style: { fontSize: 160, fontWeight: "400", fill: "#6a6a6a" }, 81 text: language.value == 0 ? "舞台" : "stage",
82 }); 82 style: { fontSize: 160, fontWeight: "400", fill: "#6a6a6a" },
83 });
84 } else {
85 // 绘制舞台矩形
86 sendMsg("draw-object-rectangle", {
87 x: 80,
88 y: 380,
89 w: 4400,
90 h: 1300,
91 color: "#e0e0e0",
92 });
93 // 绘制舞台文字
94 sendMsg("draw-object-text", {
95 x: 2100,
96 y: 950,
97 text: language.value == 0 ? "舞台" : "stage",
98 style: { fontSize: 160, fontWeight: "400", fill: "#6a6a6a" },
99 });
100 }
83 } else if (data.type == "seat-click") { 101 } else if (data.type == "seat-click") {
84 // 子页面点击了座位 102 // 子页面点击了座位
85 const seatData = data.data; 103 const seatData = data.data;
...@@ -313,7 +331,9 @@ price.fetchData(); ...@@ -313,7 +331,9 @@ price.fetchData();
313 <div v-for="(it, index) in selectedSeats" class="seat_item"> 331 <div v-for="(it, index) in selectedSeats" class="seat_item">
314 <img class="seat_icon" :src="it.selectIcon" /> 332 <img class="seat_icon" :src="it.selectIcon" />
315 <span class="num" 333 <span class="num"
316 >{{ it.area }}{{ languageFormat(language, "区", "Zones") }} 334 ><span v-if="it.area"
335 >{{ it.area }}{{ languageFormat(language, "区", "Zones") }}</span
336 >
317 {{ it.pai }}{{ languageFormat(language, "排", "Row") }} {{ it.no }} 337 {{ it.pai }}{{ languageFormat(language, "排", "Row") }} {{ it.no }}
318 {{ languageFormat(language, "座", "Seat") }}</span 338 {{ languageFormat(language, "座", "Seat") }}</span
319 > 339 >
......
...@@ -27,7 +27,7 @@ http.interceptors.request.use( ...@@ -27,7 +27,7 @@ http.interceptors.request.use(
27 const TOKEN = getToken(); 27 const TOKEN = getToken();
28 if (TOKEN) config.headers.Authorization = TOKEN; 28 if (TOKEN) config.headers.Authorization = TOKEN;
29 if (config.method == "get") config.params = config.data; 29 if (config.method == "get") config.params = config.data;
30 console.log("config", config); 30 // console.log("config", config);
31 return config; 31 return config;
32 }, 32 },
33 (error) => { 33 (error) => {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!