From 30a5f6c53bb5cf8b38e5637e7d261f78d753b11c Mon Sep 17 00:00:00 2001 From: Wayne Date: Tue, 2 Jan 2024 04:22:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E5=9E=8B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.stage | 2 +- src/utils/card/card0.js | 2 +- src/utils/card/card1.js | 4 ++-- src/utils/card/card2.js | 4 ++-- src/utils/card/card3.js | 19 +++++++------------ src/views/Send/index.vue | 4 +++- vite.config.js | 6 +++--- 7 files changed, 19 insertions(+), 22 deletions(-) diff --git a/.env.stage b/.env.stage index 8ce3b81..792ef65 100644 --- a/.env.stage +++ b/.env.stage @@ -6,7 +6,7 @@ VITE_APP_BASE_URL = https://utel.zltest.com.tw VITE_APP_LINE_LIFF_ID = 1656948609-xMp7dWAz -VITE_APP_SEND_URL = https://liff.line.me/1656948609-xMp7dWAz +VITE_APP_SEND_URL = https://liff.line.me/1656948609-BYr8Nynp VITE_APP_API_URL = https://utel.zltest.com.tw/appapi/v1 diff --git a/src/utils/card/card0.js b/src/utils/card/card0.js index 0b6d7b4..5aab8db 100644 --- a/src/utils/card/card0.js +++ b/src/utils/card/card0.js @@ -322,7 +322,7 @@ function genCard(vcard) { "action": { "type": "uri", "label": "action", - "uri": "${import.meta.env.VITE_APP_SEND_URL}/?userid=${vcard.user_id}&cardid=1" + "uri": "${import.meta.env.VITE_APP_SEND_URL}/?userid=${vcard.user_id}&cardid=1&tpl=0" } } ], diff --git a/src/utils/card/card1.js b/src/utils/card/card1.js index e88a3ae..59a3753 100644 --- a/src/utils/card/card1.js +++ b/src/utils/card/card1.js @@ -275,7 +275,7 @@ function genCard(vcard) { "action": { "type": "uri", "label": "加入好友", - "uri": "http://linecorp.com/" + "uri": "https://line.naver.jp/ti/p/~${vcard.line}" }, "color": "#755483", "height": "sm", @@ -287,7 +287,7 @@ function genCard(vcard) { "action": { "type": "uri", "label": "分享名片", - "uri": "http://linecorp.com/" + "uri": "${import.meta.env.VITE_APP_SEND_URL}/?userid=${vcard.user_id}&cardid=1&tpl=1" }, "color": "#93476e", "height": "sm", diff --git a/src/utils/card/card2.js b/src/utils/card/card2.js index 70b6a4a..ca32a8c 100644 --- a/src/utils/card/card2.js +++ b/src/utils/card/card2.js @@ -277,7 +277,7 @@ function genCard(vcard) { "action": { "type": "uri", "label": "加入好友", - "uri": "http://linecorp.com/" + "uri": "https://line.naver.jp/ti/p/~${vcard.line}" }, "color": "#6c6664", "height": "sm", @@ -288,7 +288,7 @@ function genCard(vcard) { "action": { "type": "uri", "label": "分享名片", - "uri": "http://linecorp.com/" + "uri": "${import.meta.env.VITE_APP_SEND_URL}/?userid=${vcard.user_id}&cardid=1&tpl=2" }, "color": "#6c6664", "height": "sm", diff --git a/src/utils/card/card3.js b/src/utils/card/card3.js index 958a0ee..df0889e 100644 --- a/src/utils/card/card3.js +++ b/src/utils/card/card3.js @@ -180,12 +180,7 @@ function genCard(vcard) { "text": "${vcard.title}", "size": "md", "weight": "regular", - "color": "#666666", - "action": { - "type": "uri", - "label": "action", - "uri": "${vcard.nfcurl}&cardid=1" - } + "color": "#666666" }, ${vcardPhone} ] @@ -250,8 +245,8 @@ function genCard(vcard) { "action": { "type": "uri", "label": "action", - "uri": "http://linecorp.com/" - } + "uri": "https://line.naver.jp/ti/p/~${vcard.line}" + } }, { "type": "box", @@ -271,10 +266,10 @@ function genCard(vcard) { } ], "action": { - "type": "uri", - "label": "action", - "uri": "http://linecorp.com/" - } + "type": "uri", + "label": "分享名片", + "uri": "${import.meta.env.VITE_APP_SEND_URL}/?userid=${vcard.user_id}&cardid=1&tpl=3" + } } ] } diff --git a/src/views/Send/index.vue b/src/views/Send/index.vue index 61ee6fa..35696af 100644 --- a/src/views/Send/index.vue +++ b/src/views/Send/index.vue @@ -84,7 +84,6 @@ async function showFlex(id) { case '0': let { data: res } = await getCard({ userid: sessionStorage.getItem('uid') }) let { card } = cardFactory({ tid: userInfo.value.nc_template, vcard: res }) - if (userInfo.value.status !== 0 && !userInfo.value.is_send_ad) { //正常 & 願意帶廣告 state.value.flexContent = JSON.parse(card) } else { @@ -100,7 +99,10 @@ async function showFlex(id) { } } + console.log('card', JSON.stringify(state.value.flexContent) ) + flexRef.value.innerHTML = '' + flex2html("flex", state.value.flexContent) break diff --git a/vite.config.js b/vite.config.js index 56281ee..c390013 100644 --- a/vite.config.js +++ b/vite.config.js @@ -25,8 +25,8 @@ export default defineConfig(({ mode }) => { '@': resolve(__dirname, 'src') } }, - esbuild: { - drop: ["console", "debugger"], - }, + // esbuild: { + // drop: ["console", "debugger"], + // }, } })