|
@@ -1,5 +1,5 @@
|
|
|
<script setup>
|
|
|
-import { ref } from "vue";
|
|
|
+import { ref, onMounted } from "vue";
|
|
|
import { useI18n } from "vue-i18n";
|
|
|
import { useMainStore } from "@/stores/store";
|
|
|
import axios from "axios";
|
|
@@ -102,6 +102,23 @@ async function setPostcardLog() {
|
|
|
console.log("error", error);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+// 判斷語言更改圖片
|
|
|
+const couponImgSrc = ref("../src/assets/img/coupon.png"); // 預設圖片
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ const lang = localStorage.getItem("lang");
|
|
|
+
|
|
|
+ if (lang === "zh-tw") {
|
|
|
+ couponImgSrc.value = "../src/assets/img/coupon_ch.png";
|
|
|
+ } else if (lang === "en-us") {
|
|
|
+ couponImgSrc.value = "../src/assets/img/coupon_en.png";
|
|
|
+ } else if (lang === "ja-jp") {
|
|
|
+ couponImgSrc.value = "../src/assets/img/coupon_jp.png";
|
|
|
+ } else if (lang === "ko-kr") {
|
|
|
+ couponImgSrc.value = "../src/assets/img/coupon_kr.png";
|
|
|
+ }
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -143,12 +160,13 @@ async function setPostcardLog() {
|
|
|
<v-card max-width="400">
|
|
|
<v-card-title class="pa-6">
|
|
|
{{ randomStoreName }} <br />
|
|
|
- 5G活動優惠
|
|
|
+ {{ t("5G_event") }}
|
|
|
</v-card-title>
|
|
|
|
|
|
<v-card-text class="pt-0">
|
|
|
<div class="coupon">
|
|
|
- <img class="bg-img" src="../assets/img/coupon.png" alt="" />
|
|
|
+ <img class="bg-img" :src="couponImgSrc" alt="" />
|
|
|
+ <!-- <img class="bg-img" src="../assets/img/coupon.png" alt="" /> -->
|
|
|
|
|
|
<img class="result-img" :src="store.imgPath" alt="" />
|
|
|
|