diff --git a/package.json b/package.json index 1e5a11b..c95b7d2 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "dev": "vite", "build": "vite build", "build:sta": "vite build --mode stage", - "preview": "vite preview" + "preview": "vite preview", + "postbuild:sta" : "scp -r ./dist/* root@207.148.89.145:/www/wwwroot/utel.zltest.com.tw/public/home" }, "dependencies": { "@line/liff": "^2.22.4", diff --git a/src/router/index.js b/src/router/index.js index a63ff10..91aba77 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,7 +1,5 @@ import { createRouter, createWebHistory } from "vue-router"; -import store from "@/store"; - import NProgress from "nprogress"; import "nprogress/nprogress.css"; @@ -146,7 +144,9 @@ router.beforeEach((to, from, next) => { if (to.path !== "/" && to.path !== "/login" && to.path !== "/actlogin" && to.path !== "/register") { if (!sessionStorage.getItem("token")) { + console.log('to',to); sessionStorage.setItem("redirect", to.fullPath); + sessionStorage.setItem("refer", to.query.cardid); return next("/actlogin"); } diff --git a/src/views/Address/index.vue b/src/views/Address/index.vue index f0f1728..b5f4e3e 100644 --- a/src/views/Address/index.vue +++ b/src/views/Address/index.vue @@ -26,13 +26,10 @@ const selectOpt2 = ref([{ text: '重要', value: '重要' }, { text: '普通', v const addressList = ref([]); -onBeforeMount(async () => { +onMounted(async () => { if (route.query.act === 'add') { let res = await addUserFavi({ uf_user_id: route.query.cardid }); } -}); - -onMounted(async () => { initData(); getCateList(); }); diff --git a/src/views/Home/index.vue b/src/views/Home/index.vue index 1776b50..efeec22 100644 --- a/src/views/Home/index.vue +++ b/src/views/Home/index.vue @@ -93,7 +93,7 @@ onBeforeMount(async () => { }); return; - }else if(route.query.user_id){ //綁定lineid + } else if (route.query.user_id) { //綁定lineid //詢問是否綁定 showConfirmDialog({ title: "會員綁定", @@ -198,7 +198,7 @@ const onUpdateValue = (newValue) => { cancelButtonText: "取消", }).then(() => { let res = userStore.setSendWithAd(newValue) - console.log('aaa',userInfo.value.is_send_ad) + console.log('aaa', userInfo.value.is_send_ad) }).catch(() => { // on cancel @@ -263,12 +263,15 @@ const doShare = () => { }; const bindTggo = () => { + let url; if (userInfo.value.uniqid) { - let url = `https://www.tggo.com.tw/u.cgi?&mnm=mybinding&ncode=${userInfo.value.uniqid}&name=${userInfo.value.real_name}&openExternalBrowser=1`; - window.open(url, "_blank"); - return; + url = `https://www.tggo.com.tw/u.cgi?&mnm=mybinding&ncode=${userInfo.value.uniqid}&name=${userInfo.value.real_name}&openExternalBrowser=1`; + } else { + url = `https://www.tggo.com.tw/u.cgi?user=1111&from=portal&openExternalBrowser=1`; } - showToast('您的帳號尚未綁定感應卡'); + window.open(url, "_blank"); + return; + // showToast('您的帳號尚未綁定感應卡'); }; const handleLogout = () => { diff --git a/src/views/Member/index.vue b/src/views/Member/index.vue index 10be76c..83ac846 100644 --- a/src/views/Member/index.vue +++ b/src/views/Member/index.vue @@ -709,19 +709,23 @@ const handleChangeTplSubmit = async () => { - -
檔案裁切上傳
-
+ +
+
檔案裁切上傳
- - 裁切確認 - +
+ + 取消 + + + 裁切確認 + +
-
@@ -834,4 +838,29 @@ const handleChangeTplSubmit = async () => { } } } + +.cropper-section { + margin: 0 auto; + position: fixed; + text-align: center; + top: 50px; + height: 350px; + width: 100%; + max-width: 500px; + background: hsl(0, 0%, 87%); + z-index: 8888; + + .crop-area { + margin: 5 auto; + width: 100%; + // height: 330px; + } + + .crop-btn { + text-align: center; + display: flex; + justify-content: space-between; + } +} + \ No newline at end of file diff --git a/src/views/Register/index.vue b/src/views/Register/index.vue index 6e6e607..d71036c 100644 --- a/src/views/Register/index.vue +++ b/src/views/Register/index.vue @@ -130,10 +130,9 @@ const onSubmit = async () => { line_name: profile.displayName, line_picture: profile.pictureUrl, token: id_token, + refer: sessionStorage.getItem("refer") || null, ...form.value, }); - - console.log("regRes.code",regRes) if (regRes.code === 500) { if (liff.isLoggedIn()) { @@ -145,7 +144,10 @@ const onSubmit = async () => { showToast("註冊成功"); sessionStorage.setItem("token", regRes.data.token); sessionStorage.setItem("uid", regRes.data.uid); - return router.push("/"); + let redirect = sessionStorage.getItem("redirect") || "/"; + sessionStorage.removeItem("redirect"); + sessionStorage.removeItem("refer"); + return router.push(redirect); } else { showToast("註冊失敗"); return;