parent
16a6ae2c6a
commit
86e074b5ed
@ -1,41 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-TW">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<!-- <link rel="manifest" href="manifest.json"> -->
|
||||
<!-- <meta name="apple-mobile-web-app-capable" content="yes"> -->
|
||||
<!-- <meta name="apple-mobile-web-app-status-bar-style" content="black"> -->
|
||||
<!-- <meta name="apple-mobile-web-app-title" content="UTel電子名片"> -->
|
||||
<!-- <link rel="apple-touch-icon" href="icon-192x192.png" sizes="192x192"> -->
|
||||
<link rel="stylesheet" href="./css/flex2html.css">
|
||||
<link rel="stylesheet" href="https://at.alicdn.com/t/font_3193091_nixfhsddmnl.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css" integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn" crossorigin="anonymous">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>UTel電子名片</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
<script src="./js/flex2html.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/pwacompat@2.0.15/pwacompat.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-fQybjgWLrvvRgtW6bFlB7jaZrFsaBXjsOMm/tB9LTS58ONXgqbR9W8oWht/amnpF" crossorigin="anonymous"></script>
|
||||
<script>
|
||||
var iOS = (/iP(hone|od|ad)/.test(navigator.userAgent));
|
||||
if (iOS) {
|
||||
var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
|
||||
var iOSversion = parseInt(v[1], 10);
|
||||
if (iOSversion < 13) {
|
||||
document.querySelector('link[rel="manifest"]').setAttribute("rel", "no-on-ios");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -0,0 +1,37 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
import { getUserInfo, setUserTpl, toggleSendWithAD } from "@/api";
|
||||
|
||||
export const useUserStore = defineStore('user', {
|
||||
state: () => {
|
||||
return {
|
||||
userInfo: null,
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
},
|
||||
actions: {
|
||||
async getUserInfo(context) {
|
||||
var res = await getUserInfo();
|
||||
if (res.code === 200) {
|
||||
context.commit("setUserInfo", res.data);
|
||||
}
|
||||
},
|
||||
// async setUserTpl(context, payload) {
|
||||
// var res = await setUserTpl(payload);
|
||||
// if (res.code === 200) {
|
||||
// context.commit("setTpl", payload);
|
||||
// }
|
||||
// },
|
||||
// async setSendWithAd(context, payload) {
|
||||
// console.log('payload', payload);
|
||||
// let res = await toggleSendWithAD(payload);
|
||||
|
||||
// if (res.code === 200) {
|
||||
// context.commit("setSendWithAd", payload);
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
}
|
||||
})
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,52 +0,0 @@
|
||||
<template>
|
||||
<van-nav-bar title="預覽" right-text="關閉" @click-right="$router.push('/card/edit')" />
|
||||
<div class="flex-section">
|
||||
<div class="table-responsive">
|
||||
<div class="chatbox">
|
||||
<div id="flex" ref="flexRef"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onActivated, onDeactivated } from 'vue'
|
||||
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
import { genCard1 } from '@/utils/card2'
|
||||
|
||||
const route = useRoute()
|
||||
const flexRef = ref(null)
|
||||
|
||||
onActivated(() => {
|
||||
flexRef.value.innerHTML = ''
|
||||
let flexContent = genCard1(JSON.parse(route.params.content))
|
||||
flex2html("flex", flexContent)
|
||||
})
|
||||
|
||||
onDeactivated(() => {
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.flex-section {
|
||||
// color: white;
|
||||
// z-index: 99999;
|
||||
background-color: #666;
|
||||
}
|
||||
|
||||
|
||||
.chatbox {
|
||||
background-color: #666;
|
||||
margin-top: 10px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
|
||||
.table-responsive {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,196 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
|
||||
import { getUserInfo, updateCard } from "@/api";
|
||||
|
||||
const form = ref({ addon: [] });
|
||||
|
||||
// if (userRes.data.nfc_addon && (userRes.data.nfc_addon.length > 0)) {
|
||||
// form.value.addon = JSON.parse(userRes.data.nfc_addon)
|
||||
// }
|
||||
|
||||
onMounted(async () => {
|
||||
let userRes = await getUserInfo();
|
||||
if (userRes.code === 200) {
|
||||
form.value = userRes.data;
|
||||
}
|
||||
});
|
||||
|
||||
const onAddBtn = () => {
|
||||
if (form.value.addon) {
|
||||
form.value.addon.push({ icon: "", name: "", link: "" });
|
||||
} else {
|
||||
form.value.addon = [{ icon: "", name: "", link: "" }];
|
||||
}
|
||||
};
|
||||
|
||||
const onDelBtn = (index) => {
|
||||
form.value.addon.splice(index, 1);
|
||||
};
|
||||
|
||||
const onMoveBtn = (type, index) => {
|
||||
if (type === 0) {
|
||||
if (index !== 0) {
|
||||
[form.value.addon[index], form.value.addon[index - 1]] = [
|
||||
form.value.addon[index - 1],
|
||||
form.value.addon[index],
|
||||
];
|
||||
}
|
||||
} else {
|
||||
if (index + 1 !== form.value.addon.length) {
|
||||
[form.value.addon[index + 1], form.value.addon[index]] = [
|
||||
form.value.addon[index],
|
||||
form.value.addon[index + 1],
|
||||
];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const onSubmit = () => {
|
||||
console.log(form.value);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="content cnt1">
|
||||
<van-cell-group inset>
|
||||
<van-form @submit="onSubmit">
|
||||
<van-field
|
||||
v-model="form.nfcurl"
|
||||
label="個人網頁"
|
||||
name=""
|
||||
placeholder="請輸入您的個人網頁"
|
||||
/>
|
||||
<van-field
|
||||
v-model="form.line"
|
||||
label="Line"
|
||||
name=""
|
||||
placeholder="請輸入您的Line ID"
|
||||
/>
|
||||
<van-field
|
||||
v-model="form.facebook"
|
||||
label="Facebook"
|
||||
name=""
|
||||
placeholder="請輸入您的Facebook"
|
||||
/>
|
||||
<van-field
|
||||
v-model="form.ig"
|
||||
label="IG"
|
||||
name=""
|
||||
placeholder="請輸入您的IG"
|
||||
/>
|
||||
<van-field
|
||||
v-model="form.youTube"
|
||||
label="YouTube"
|
||||
name=""
|
||||
placeholder="請輸入您的YouTube"
|
||||
/>
|
||||
<van-field
|
||||
v-model="form.wechat"
|
||||
label="WeChat"
|
||||
name=""
|
||||
placeholder="請輸入您的WeChat"
|
||||
/>
|
||||
|
||||
<div class="px-5 py-4">
|
||||
<van-button block class="btn-darkBlue" native-type="submit">
|
||||
<h6>確認修改</h6>
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset>
|
||||
<van-form @submit="onSubmit">
|
||||
<van-cell class="bg-lightPink">
|
||||
<template #title>
|
||||
<h6 class="text-darkBlue"><strong>相關連結</strong></h6>
|
||||
</template>
|
||||
<template #value>
|
||||
<van-button
|
||||
size="small"
|
||||
class="btn-outline-darkBlue"
|
||||
@click="onAddBtn"
|
||||
>
|
||||
<h6>新增連結</h6>
|
||||
</van-button>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
<van-field v-for="(item, idx) in form.addon" :key="idx">
|
||||
<template #label>
|
||||
<van-field
|
||||
v-model="item.name"
|
||||
name=""
|
||||
maxlength="10"
|
||||
placeholder="請輸入您的連結名稱"
|
||||
:rules="[{ required: true, message: '連結名稱必填' }]"
|
||||
/>
|
||||
</template>
|
||||
<template #input>
|
||||
<van-field
|
||||
v-model="item.link"
|
||||
name=""
|
||||
placeholder="請輸入您的按鈕連結"
|
||||
:rules="[{ required: true, message: '按鈕連結必填' }]"
|
||||
/>
|
||||
</template>
|
||||
<template #button>
|
||||
<van-button
|
||||
size="small"
|
||||
class="ml-1 btn-tomatoRed"
|
||||
icon="delete-o"
|
||||
hairline
|
||||
@click="onDelBtn(idx)"
|
||||
></van-button>
|
||||
<van-button
|
||||
size="small"
|
||||
class="ml-1 btn-skyBlue"
|
||||
icon="arrow-up"
|
||||
hairline
|
||||
@click="onMoveBtn(0, idx)"
|
||||
></van-button>
|
||||
<van-button
|
||||
size="small"
|
||||
class="ml-1 btn-skyBlue"
|
||||
icon="arrow-down"
|
||||
plain
|
||||
hairline
|
||||
@click="onMoveBtn(1, idx)"
|
||||
></van-button>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<!-- <van-swipe-cell v-for="(item,idx) in form.addon" :key="idx">
|
||||
<template #left>
|
||||
<van-button type="danger" icon="delete-o" plain hairline @click="onDelBtn(idx)">刪除</van-button>
|
||||
</template>
|
||||
<van-field
|
||||
v-model="item.name"
|
||||
name=""
|
||||
placeholder="請輸入您的連結名稱"
|
||||
:rules="[{ required: true, message: '連結名稱必填' }]"
|
||||
/>
|
||||
<van-field
|
||||
v-model="item.link"
|
||||
name=""
|
||||
placeholder="請輸入您的按鈕連結"
|
||||
:rules="[{ pattern: /^([\w\.\-]){1,64}\@([\w\.\-]){1,64}/ , message: 'Email格式錯誤' }]"
|
||||
/>
|
||||
<template #right>
|
||||
<van-button type="primary" icon="arrow-up" plain hairline @click="onMoveBtn(0,idx)">上移</van-button>
|
||||
<van-button type="primary" icon="arrow-down" plain hairline @click="onMoveBtn(1,idx)">下移</van-button>
|
||||
</template>
|
||||
</van-swipe-cell> -->
|
||||
|
||||
<div class="px-5 py-4">
|
||||
<van-button block class="btn-darkBlue" native-type="submit">
|
||||
<h6>確認修改</h6>
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
@ -0,0 +1,70 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
|
||||
import { setUserNfcTpl } from "@/api";
|
||||
|
||||
const tab3list = ref([]);
|
||||
onMounted(async () => {
|
||||
let res = await setUserNfcTpl();
|
||||
console.log(res);
|
||||
if(res.code===200){
|
||||
tab3list.value = res.data;
|
||||
}
|
||||
});
|
||||
|
||||
const onSubmit = () => {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="content cnt3">
|
||||
<van-cell-group inset>
|
||||
<van-form @submit="onSubmit">
|
||||
<van-cell class="text-center bg-lightPink py-3">
|
||||
<template #title>
|
||||
<h6 class="text-darkBlue"><strong>感應式版型切換</strong></h6>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
<div class="text-center bg-dark px-5 pt-3">
|
||||
<van-image
|
||||
width="100%"
|
||||
height="500"
|
||||
position="top"
|
||||
fit="cover"
|
||||
src="/src/assets/images/tp/tp_1.jpg"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-center py-3">
|
||||
<van-button class="btn-tomatoRed px-5 mr-2">
|
||||
預覽
|
||||
</van-button>
|
||||
<van-button class="btn-darkBlue px-5" native-type="submit">
|
||||
確認修改
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset>
|
||||
<van-row>
|
||||
<van-col span="12" v-for="(item, index) in tab3list" :key="index">
|
||||
<div class="imgBtn">
|
||||
<div class="imgCnt">{{ item }}
|
||||
<van-image
|
||||
src="/src/assets/images/tp/tp_1.jpg"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Loading…
Reference in new issue