diff --git a/.env.development b/.env.development index fbf9907..bc2cfb3 100644 --- a/.env.development +++ b/.env.development @@ -1,10 +1,10 @@ -NODE_ENV = production +NODE_ENV = development VUE_ENV = development VUE_APP_BASE_URL = http://localhost:8080 -VUE_APP_SEND_URL = https://liff.line.me/1657876696-MKYDJKgm +VUE_APP_SEND_URL = https://liff.line.me/1657876696-564NGMxy VUE_APP_API_URL = https://card.h888.fun/appapi/v1 @@ -16,6 +16,7 @@ VUE_APP_DOMAIN = localhost VUE_APP_LINE_CLINE_ID = 1657876696 -VUE_APP_LINE_CLIENT_SECRET = 914cc067cb11ffbd47640de8f3f4a00a +VUE_APP_LINE_CLIENT_SECRET = 2a7930d6143a00ff421812b942cde200 -VUE_APP_LINE_LIFF_ID = 1657876696-MKYDJKgm +# 卡片發送liff id +VUE_APP_LINE_LIFF_ID = 1657876696-564NGMxy diff --git a/.env.h888 b/.env.h888 new file mode 100644 index 0000000..cadd665 --- /dev/null +++ b/.env.h888 @@ -0,0 +1,30 @@ +NODE_ENV = production + +VUE_ENV = h888 + +VUE_APP_BASE_URL = https://card.h888.fun + +VUE_APP_SEND_URL = https://liff.line.me/1657876696-564NGMxy + +VUE_APP_API_URL = https://card.h888.fun/appapi/v1 + +VUE_APP_SSO_URL = https://sso.h888.fun/api/v1 + +VUE_APP_IMAGE_URL = https://card.h888.fun/storage + +VUE_APP_DOMAIN = h888.com + +VUE_APP_LINE_CLINE_ID = 1657876696 + +VUE_APP_LINE_CLIENT_SECRET = 2a7930d6143a00ff421812b942cde200 + +# 卡片發送liff id +VUE_APP_LINE_LIFF_ID = 1657876696-564NGMxy + + + + + + + + diff --git a/.env.slash b/.env.slash index 8eebf7a..9f97552 100644 --- a/.env.slash +++ b/.env.slash @@ -18,5 +18,4 @@ VUE_APP_LINE_CLINE_ID = 1661025693 VUE_APP_LINE_CLIENT_SECRET = 914cc067cb11ffbd47640de8f3f4a00a - VUE_APP_LINE_LIFF_ID = 1661025693-veEM0lwZ diff --git a/package.json b/package.json index c0252e3..b5a4bc6 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "build:u168": "vue-cli-service build --mode u168", "build:dev": "vue-cli-service build --mode development", "build:slash": "vue-cli-service build --mode slash", - "build:sta": "vue-cli-service build --mode stage" + "build:sta": "vue-cli-service build --mode stage", + "build:h888": "vue-cli-service build --mode h888" }, "dependencies": { "@line/liff": "^2.18.2", diff --git a/src/assets/images/tpl/tpl2.png b/src/assets/images/tpl/tpl2.png deleted file mode 100644 index 2acbd9e..0000000 Binary files a/src/assets/images/tpl/tpl2.png and /dev/null differ diff --git a/src/assets/images/tpl/tpl5.png b/src/assets/images/tpl/tpl5.png new file mode 100644 index 0000000..c8a40bf Binary files /dev/null and b/src/assets/images/tpl/tpl5.png differ diff --git a/src/utils/card/card5.js b/src/utils/card/card5.js new file mode 100644 index 0000000..27ac484 --- /dev/null +++ b/src/utils/card/card5.js @@ -0,0 +1,188 @@ +import store from '@/store' + +function genCard(vcard) { + console.log(vcard) + let card = ` + { + "altText": "SlashCard電子名片", + "type": "flex", + "contents": { + "type": "bubble", + "size": "giga", + "body": { + "type": "box", + "layout": "vertical", + "contents": [ + { + "type": "image", + "url": "https://card.h888.fun/images/background/jci.png?v=10", + "size": "full", + "aspectMode": "cover", + "aspectRatio": "544:308", + "gravity": "top" + }, + { + "type": "box", + "layout": "horizontal", + "contents": [ + { + "type": "box", + "layout": "vertical", + "contents": [ + { + "type": "box", + "layout": "vertical", + "contents": [ + { + "type": "image", + "url": "${vcard.avatar}" + } + ], + "width": "80%", + "offsetTop": "10%", + "position": "absolute" + }, + { + "type": "box", + "layout": "vertical", + "contents": [ + { + "type": "box", + "layout": "vertical", + "contents": [ + { + "type": "text", + "text": "加入好友", + "color": "#FFFFFF", + "size": "xs", + "align": "center" + } + ], + "backgroundColor": "#66B3FF", + "cornerRadius": "5px", + "paddingTop": "5px", + "paddingBottom": "5px", + "margin": "md", + "paddingStart": "5px", + "paddingEnd": "5px", + "action": { + "type": "uri", + "label": "action", + "uri": "https://line.naver.jp/ti/p/~${vcard.line}" + } + }, + { + "type": "box", + "layout": "vertical", + "contents": [ + { + "type": "text", + "text": "分享名片", + "color": "#FFFFFF", + "size": "xs" + } + ], + "backgroundColor": "#66B3FF", + "cornerRadius": "5px", + "paddingTop": "5px", + "paddingBottom": "5px", + "margin": "md", + "paddingStart": "5px", + "paddingEnd": "5px", + "action": { + "type": "uri", + "label": "action", + "uri": "${process.env.VUE_APP_SEND_URL}/?userid=${vcard.user_id}&cardid=5" + } + } + ], + "position": "absolute", + "offsetBottom": "10%" + } + ], + "width": "23%", + "alignItems": "center", + "height": "100%" + }, + { + "type": "box", + "layout": "vertical", + "contents": [ + { + "type": "box", + "layout": "vertical", + "contents": [ + { + "type": "text", + "text": " ${vcard.company}", + "color": "#0066cc", + "align": "end", + "weight": "regular", + "size": "md" + }, + { + "type": "text", + "text": " ${vcard.tel} ${vcard.address}", + "align": "end", + "size": "xxs" + }, + { + "type": "text", + "text": " ${vcard.email}", + "align": "end", + "size": "xxs" + } + ], + "width": "100%", + "offsetTop": "65%", + "offsetEnd": "5%" + }, + { + "type": "box", + "layout": "vertical", + "contents": [ + { + "type": "text", + "text": " ${vcard.name}", + "align": "end", + "color": "#66B3FF" + }, + { + "type": "text", + "text": " ${vcard.title}", + "size": "sm", + "align": "end" + }, + { + "type": "text", + "text": " ${vcard.phone}", + "size": "sm", + "align": "end" + } + ], + "width": "45%", + "offsetTop": "30%", + "position": "absolute", + "offsetEnd": "5%" + } + ], + "width": "77%" + } + ], + "position": "absolute", + "width": "100%", + "height": "100%" + } + ], + "position": "relative", + "spacing": "none", + "margin": "none", + "paddingAll": "none" + } + }} + ` + + return { card: card} +} + +export default genCard ; diff --git a/src/utils/card/index.js b/src/utils/card/index.js index d4bf83f..f9afaf5 100644 --- a/src/utils/card/index.js +++ b/src/utils/card/index.js @@ -3,6 +3,7 @@ import { genCard as Card1 } from "./card1.js"; import { genCard as Card2 } from "./card2.js"; import { genCard as Card3 } from "./card3.js"; import { genCard as Card4 } from "./card4.js"; +import Card5 from "./card5.js"; export function genCard(opt) { switch (opt.tid) { @@ -21,6 +22,9 @@ export function genCard(opt) { case 4: return Card4(opt.vcard); break; + case 5: + return Card5(opt.vcard); + break; default: throw new Error("params error"); break; diff --git a/src/views/Card/Edit.vue b/src/views/Card/Edit.vue index 86709d2..bbf6ec0 100644 --- a/src/views/Card/Edit.vue +++ b/src/views/Card/Edit.vue @@ -160,7 +160,6 @@ class="upload-img" :src="form.json5.cards[form.page - 1].image" alt="" - crossorigin="anonymous" /> @@ -170,7 +169,6 @@ ref="uploadImg" id="upload-img" class="upload-img" - crossorigin="anonymous" src="@/assets/images/upload.jpg" />
請上傳圖片
diff --git a/src/views/Member/index.vue b/src/views/Member/index.vue index f07baac..9129802 100644 --- a/src/views/Member/index.vue +++ b/src/views/Member/index.vue @@ -18,8 +18,8 @@ :rules="[{ required: true, message: '手機號必填' }, { pattern: /\d{10}/, message: '手機號格式錯誤' }]" />
+