main
Wayne Hsu 3 years ago
parent cd27846fee
commit dbd372816a

@ -1,10 +1,10 @@
NODE_ENV = production NODE_ENV = development
VUE_ENV = development VUE_ENV = development
VUE_APP_BASE_URL = http://localhost:8080 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 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_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

@ -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

@ -18,5 +18,4 @@ VUE_APP_LINE_CLINE_ID = 1661025693
VUE_APP_LINE_CLIENT_SECRET = 914cc067cb11ffbd47640de8f3f4a00a VUE_APP_LINE_CLIENT_SECRET = 914cc067cb11ffbd47640de8f3f4a00a
VUE_APP_LINE_LIFF_ID = 1661025693-veEM0lwZ VUE_APP_LINE_LIFF_ID = 1661025693-veEM0lwZ

@ -8,7 +8,8 @@
"build:u168": "vue-cli-service build --mode u168", "build:u168": "vue-cli-service build --mode u168",
"build:dev": "vue-cli-service build --mode development", "build:dev": "vue-cli-service build --mode development",
"build:slash": "vue-cli-service build --mode slash", "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": { "dependencies": {
"@line/liff": "^2.18.2", "@line/liff": "^2.18.2",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

@ -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 ;

@ -3,6 +3,7 @@ import { genCard as Card1 } from "./card1.js";
import { genCard as Card2 } from "./card2.js"; import { genCard as Card2 } from "./card2.js";
import { genCard as Card3 } from "./card3.js"; import { genCard as Card3 } from "./card3.js";
import { genCard as Card4 } from "./card4.js"; import { genCard as Card4 } from "./card4.js";
import Card5 from "./card5.js";
export function genCard(opt) { export function genCard(opt) {
switch (opt.tid) { switch (opt.tid) {
@ -21,6 +22,9 @@ export function genCard(opt) {
case 4: case 4:
return Card4(opt.vcard); return Card4(opt.vcard);
break; break;
case 5:
return Card5(opt.vcard);
break;
default: default:
throw new Error("params error"); throw new Error("params error");
break; break;

@ -160,7 +160,6 @@
class="upload-img" class="upload-img"
:src="form.json5.cards[form.page - 1].image" :src="form.json5.cards[form.page - 1].image"
alt="" alt=""
crossorigin="anonymous"
/> />
</div> </div>
</template> </template>
@ -170,7 +169,6 @@
ref="uploadImg" ref="uploadImg"
id="upload-img" id="upload-img"
class="upload-img" class="upload-img"
crossorigin="anonymous"
src="@/assets/images/upload.jpg" src="@/assets/images/upload.jpg"
/> />
<p>請上傳圖片</p> <p>請上傳圖片</p>

@ -18,8 +18,8 @@
:rules="[{ required: true, message: '手機號必填' }, { pattern: /\d{10}/, message: '手機號格式錯誤' }]" /> :rules="[{ required: true, message: '手機號必填' }, { pattern: /\d{10}/, message: '手機號格式錯誤' }]" />
<van-field v-model="form.email" label="Email" name="" placeholder="請輸入您的Email" <van-field v-model="form.email" label="Email" name="" placeholder="請輸入您的Email"
:rules="[{ required: true, message: 'Email必填' }, { pattern: /^([\w\.\-]){1,64}\@([\w\.\-]){1,64}/, message: 'Email格式錯誤' }]" /> :rules="[{ required: true, message: 'Email必填' }, { pattern: /^([\w\.\-]){1,64}\@([\w\.\-]){1,64}/, message: 'Email格式錯誤' }]" />
<van-field v-model="form.url" label="網址" name="" placeholder="請輸入您的網址" <!-- <van-field v-model="form.url" label="網址" name="" placeholder="請輸入您的網址"
:rules="[{ validator: validatorUrl, message: '網址格式不正確,Ex. http://' }]" /> :rules="[{ validator: validatorUrl, message: '網址格式不正確,Ex. http://' }]" /> -->
<van-field v-model="form.line" label="Line" name="" placeholder="請輸入您的Line ID" /> <van-field v-model="form.line" label="Line" name="" placeholder="請輸入您的Line ID" />
<van-field v-model="form.facebook" label="Facebook" name="" placeholder="請輸入您的臉書連結" /> <van-field v-model="form.facebook" label="Facebook" name="" placeholder="請輸入您的臉書連結" />
<van-field v-model="form.ig" label="IG" name="" placeholder="請輸入您的IG ID" /> <van-field v-model="form.ig" label="IG" name="" placeholder="請輸入您的IG ID" />

@ -38,6 +38,9 @@
<li class="tpl-item" @click="changeTpl(3)"> <li class="tpl-item" @click="changeTpl(3)">
<img src="@/assets/images/tpl/tpl3.png"> <img src="@/assets/images/tpl/tpl3.png">
</li> </li>
<li class="tpl-item" @click="changeTpl(5)">
<img src="@/assets/images/tpl/tpl5.png">
</li>
</ul> </ul>
</div> </div>
</van-popup> </van-popup>
@ -173,6 +176,7 @@ const sendEcard = async () => {
let isMo = isMobile().any let isMo = isMobile().any
// window.location.href = 'https://liff.line.me/1657876696-564NGMxy?userid=sc63e7880cd0b65&cardid=1' // window.location.href = 'https://liff.line.me/1657876696-564NGMxy?userid=sc63e7880cd0b65&cardid=1'
if(isMo){ if(isMo){
window.location.href = `https://line.me/R/app/${process.env.VUE_APP_LINE_LIFF_ID}?userid=${userInfo.value.user_id}&cardid=${parseInt(activeName.value) + 1}` window.location.href = `https://line.me/R/app/${process.env.VUE_APP_LINE_LIFF_ID}?userid=${userInfo.value.user_id}&cardid=${parseInt(activeName.value) + 1}`
}else{ }else{

@ -7,7 +7,7 @@ module.exports = {
: "/home", : "/home",
outputDir: outputDir:
["production", "u168", "slash"].includes(process.env.VUE_ENV) ["production", "u168", "slash"].includes(process.env.VUE_ENV)
? "../api/public/home" ? "../build/home"
: "./dist", : "./dist",
pwa: { pwa: {
name: "SlashCard", name: "SlashCard",

Loading…
Cancel
Save