|
|
|
|
@ -3,17 +3,16 @@ import moment from "moment";
|
|
|
|
|
import QrcodeVue from "qrcode.vue";
|
|
|
|
|
import { toClipboard } from "@soerenmartius/vue3-clipboard";
|
|
|
|
|
|
|
|
|
|
import { ref, computed, onBeforeMount, onMounted } from "vue";
|
|
|
|
|
import { ref, computed, onBeforeMount } from "vue";
|
|
|
|
|
import { useRoute, useRouter } from "vue-router";
|
|
|
|
|
import { useStore } from "vuex";
|
|
|
|
|
|
|
|
|
|
import { showToast, showSuccessToast, showConfirmDialog } from "vant";
|
|
|
|
|
import 'vant/es/toast/style';
|
|
|
|
|
|
|
|
|
|
import { Dialog } from "vant";
|
|
|
|
|
|
|
|
|
|
// import Footer from '@/components/Footer.vue'
|
|
|
|
|
|
|
|
|
|
import { login, bindCard, getMovie, getMarquee, toggleSendWithAD } from "@/api";
|
|
|
|
|
import { login, bindCard, getMovie, getMarquee } from "@/api";
|
|
|
|
|
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
@ -23,14 +22,7 @@ const showShare = ref(false);
|
|
|
|
|
const showNfcQrcode = ref(false);
|
|
|
|
|
|
|
|
|
|
const checked = ref(true);
|
|
|
|
|
const imageUrl = ref(import.meta.env.VITE_APP_IMAGE_URL);
|
|
|
|
|
|
|
|
|
|
const userLevel = {
|
|
|
|
|
0: "基礎款",
|
|
|
|
|
1: "標準款",
|
|
|
|
|
2: "自製款",
|
|
|
|
|
3: "客製款",
|
|
|
|
|
};
|
|
|
|
|
const imageUrl = ref(import.meta.env.VITE_APP_BASE_URL);
|
|
|
|
|
|
|
|
|
|
const is_due = ref(false);
|
|
|
|
|
|
|
|
|
|
@ -118,6 +110,7 @@ onBeforeMount(async () => {
|
|
|
|
|
|
|
|
|
|
store.dispatch("user/getUserInfo");
|
|
|
|
|
|
|
|
|
|
handleAD();
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@ -130,7 +123,8 @@ onBeforeMount(async () => {
|
|
|
|
|
const noticeData = ref([]);
|
|
|
|
|
const adData = ref({});
|
|
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
|
|
|
const handleAD = async () => {
|
|
|
|
|
|
|
|
|
|
let res;
|
|
|
|
|
res = await getMarquee();
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
@ -143,11 +137,12 @@ onMounted(async () => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
res = await getMovie();
|
|
|
|
|
console.log('res',res)
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
adData.value = res.data;
|
|
|
|
|
popShow.value = true;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const popShow = ref(false);
|
|
|
|
|
@ -167,14 +162,17 @@ const onUpdateValue = (newValue) => {
|
|
|
|
|
showConfirmDialog({
|
|
|
|
|
title: "提醒確認",
|
|
|
|
|
message: "是否切換開關?",
|
|
|
|
|
confirmButtonText: "確認",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
}).then(() => {
|
|
|
|
|
// let res = toggleSendWithAD(newValue);
|
|
|
|
|
// if (res.code === 200) {
|
|
|
|
|
// showToast("切換成功");
|
|
|
|
|
// } else {
|
|
|
|
|
// showToast("切換失敗");
|
|
|
|
|
// }
|
|
|
|
|
store.dispatch("user/setSendWithAd", newValue);
|
|
|
|
|
|
|
|
|
|
let res = toggleSendWithAD(newValue);
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
showToast("切換成功");
|
|
|
|
|
} else {
|
|
|
|
|
showToast("切換失敗");
|
|
|
|
|
}
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
|
|
// on cancel
|
|
|
|
|
@ -514,7 +512,7 @@ const handleLogout = () => {
|
|
|
|
|
<iframe
|
|
|
|
|
width="100%"
|
|
|
|
|
height="100%"
|
|
|
|
|
:src="'https://utel.zltest.com.tw' + adData.ad_movie"
|
|
|
|
|
:src="imageUrl + adData.ad_movie"
|
|
|
|
|
title="YouTube video player"
|
|
|
|
|
autoplay="true"
|
|
|
|
|
frameborder="0"
|
|
|
|
|
|