|
|
|
@ -13,9 +13,9 @@ import { useRouter } from 'vue-router'
|
|
|
|
|
|
|
|
|
|
|
|
import { showToast, showFailToast, showLoadingToast, showSuccessToast } from 'vant';
|
|
|
|
import { showToast, showFailToast, showLoadingToast, showSuccessToast } from 'vant';
|
|
|
|
|
|
|
|
|
|
|
|
import { getUserInfo, updateUserInfo, updateCard, searchConnection, addUserFavi, setUserNfcTpl } from '@/api'
|
|
|
|
import { getUserInfo, updateUserInfo, updateCard, searchConnection, addUserFavi, setUserNfcTpl } from '@/api'
|
|
|
|
|
|
|
|
|
|
|
|
import { updateUserExtra, updateUserLink, getUserExtra,updateUserAddon } from '@/api/user';
|
|
|
|
import { updateUserExtra, updateUserLink, getUserExtra, updateUserAddon } from '@/api/user';
|
|
|
|
import { getAreaList, getWorkList } from '@/api/system';
|
|
|
|
import { getAreaList, getWorkList } from '@/api/system';
|
|
|
|
|
|
|
|
|
|
|
|
import imgTp1 from '@/assets/images/tp/tp_1.jpg'
|
|
|
|
import imgTp1 from '@/assets/images/tp/tp_1.jpg'
|
|
|
|
@ -76,7 +76,7 @@ const crop = ref({
|
|
|
|
onMounted(async () => {
|
|
|
|
onMounted(async () => {
|
|
|
|
let userRes = await getUserInfo()
|
|
|
|
let userRes = await getUserInfo()
|
|
|
|
if (userRes.code === 200) {
|
|
|
|
if (userRes.code === 200) {
|
|
|
|
form.value = userRes.data
|
|
|
|
form.value = userRes.data
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//取得區域資料
|
|
|
|
//取得區域資料
|
|
|
|
@ -107,7 +107,7 @@ onMounted(async () => {
|
|
|
|
// workName.value = ''
|
|
|
|
// workName.value = ''
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
const findRes = _.find(workRes.data, { value: form.value.work })
|
|
|
|
const findRes = _.find(workRes.data, { value: form.value.work })
|
|
|
|
if(findRes){
|
|
|
|
if (findRes) {
|
|
|
|
workName.value = findRes.text
|
|
|
|
workName.value = findRes.text
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -278,6 +278,11 @@ const tab2OnSearch = async () => {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const handleSearch = async () => {
|
|
|
|
const handleSearch = async () => {
|
|
|
|
|
|
|
|
showLoadingToast({
|
|
|
|
|
|
|
|
message: '人脈搜尋中...',
|
|
|
|
|
|
|
|
forbidClick: true,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
let res = await searchConnection(search.value);
|
|
|
|
let res = await searchConnection(search.value);
|
|
|
|
if (res.code === 200) {
|
|
|
|
if (res.code === 200) {
|
|
|
|
tab2list.value = res.data;
|
|
|
|
tab2list.value = res.data;
|
|
|
|
@ -360,7 +365,7 @@ const handleSelectTpl = (id) => {
|
|
|
|
form.value.nfc_template = id
|
|
|
|
form.value.nfc_template = id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const handleChangeTplSubmit = async() => {
|
|
|
|
const handleChangeTplSubmit = async () => {
|
|
|
|
let res = await setUserNfcTpl(form.value.nfc_template);
|
|
|
|
let res = await setUserNfcTpl(form.value.nfc_template);
|
|
|
|
if (res.code === 200) {
|
|
|
|
if (res.code === 200) {
|
|
|
|
showSuccessToast('修改成功')
|
|
|
|
showSuccessToast('修改成功')
|
|
|
|
@ -394,7 +399,7 @@ const handleChangeTplSubmit = async() => {
|
|
|
|
</van-tabs>
|
|
|
|
</van-tabs>
|
|
|
|
|
|
|
|
|
|
|
|
<van-form @submit="onSubmit">
|
|
|
|
<van-form @submit="onSubmit">
|
|
|
|
<div class="content cnt0" v-show="tabActive === 0">
|
|
|
|
<div class="content cnt0" v-show="tabActive === 0">
|
|
|
|
<van-cell-group inset>
|
|
|
|
<van-cell-group inset>
|
|
|
|
<div class="text-center p-4">
|
|
|
|
<div class="text-center p-4">
|
|
|
|
<van-uploader :after-read="afterRead" :max-count="1" name="avatar" class="mb-4">
|
|
|
|
<van-uploader :after-read="afterRead" :max-count="1" name="avatar" class="mb-4">
|
|
|
|
@ -433,16 +438,18 @@ const handleChangeTplSubmit = async() => {
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</van-field>
|
|
|
|
</van-field>
|
|
|
|
|
|
|
|
|
|
|
|
<van-field v-model="areaName" is-link readonly name="area" label="區域" placeholder="請選擇區域"
|
|
|
|
<van-field v-model="areaName" is-link readonly name="area" label="區域" placeholder="請選擇區域"
|
|
|
|
@click="showAreaPicker = true" />
|
|
|
|
@click="showAreaPicker = true" />
|
|
|
|
<van-popup v-model:show="showAreaPicker" position="bottom">
|
|
|
|
<van-popup v-model:show="showAreaPicker" position="bottom">
|
|
|
|
<van-picker :columns="areaColumns" confirm-button-text="確認" cancel-button-text="取消" @confirm="onAreaConfirm" @cancel="showAreaPicker = false" />
|
|
|
|
<van-picker :columns="areaColumns" confirm-button-text="確認" cancel-button-text="取消" @confirm="onAreaConfirm"
|
|
|
|
|
|
|
|
@cancel="showAreaPicker = false" />
|
|
|
|
</van-popup>
|
|
|
|
</van-popup>
|
|
|
|
|
|
|
|
|
|
|
|
<van-field v-model="workName" is-link readonly name="work" label="工作性質" placeholder="請選擇工作性質"
|
|
|
|
<van-field v-model="workName" is-link readonly name="work" label="工作性質" placeholder="請選擇工作性質"
|
|
|
|
@click="showWorkPicker = true" />
|
|
|
|
@click="showWorkPicker = true" />
|
|
|
|
<van-popup v-model:show="showWorkPicker" position="bottom">
|
|
|
|
<van-popup v-model:show="showWorkPicker" position="bottom">
|
|
|
|
<van-picker :columns="workColumns" confirm-button-text="確認" cancel-button-text="取消" @confirm="onWorkConfirm" @cancel="showWorkPicker = false" />
|
|
|
|
<van-picker :columns="workColumns" confirm-button-text="確認" cancel-button-text="取消" @confirm="onWorkConfirm"
|
|
|
|
|
|
|
|
@cancel="showWorkPicker = false" />
|
|
|
|
</van-popup>
|
|
|
|
</van-popup>
|
|
|
|
|
|
|
|
|
|
|
|
<van-field readonly>
|
|
|
|
<van-field readonly>
|
|
|
|
@ -451,7 +458,7 @@ const handleChangeTplSubmit = async() => {
|
|
|
|
<van-switch v-model="searchChecked" @update:model-value="searchOnUpdateValue" size="18px"
|
|
|
|
<van-switch v-model="searchChecked" @update:model-value="searchOnUpdateValue" size="18px"
|
|
|
|
active-color="#5b7b94" inactive-color="#888888" />
|
|
|
|
active-color="#5b7b94" inactive-color="#888888" />
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</van-field>
|
|
|
|
</van-field>
|
|
|
|
</van-cell-group>
|
|
|
|
</van-cell-group>
|
|
|
|
|
|
|
|
|
|
|
|
<van-cell-group inset v-if="userStore.userData.level >= 3">
|
|
|
|
<van-cell-group inset v-if="userStore.userData.level >= 3">
|
|
|
|
@ -500,9 +507,9 @@ const handleChangeTplSubmit = async() => {
|
|
|
|
<van-button block class="btn-darkBlue" native-type="submit">確認修改</van-button>
|
|
|
|
<van-button block class="btn-darkBlue" native-type="submit">確認修改</van-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</van-sticky>
|
|
|
|
</van-sticky>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="content cnt1" v-show="tabActive === 1">
|
|
|
|
<div class="content cnt1" v-show="tabActive === 1">
|
|
|
|
<van-cell-group inset>
|
|
|
|
<van-cell-group inset>
|
|
|
|
<van-field v-model="form.url" label="個人網頁" name="url" placeholder="請輸入您的個人網頁" />
|
|
|
|
<van-field v-model="form.url" label="個人網頁" name="url" placeholder="請輸入您的個人網頁" />
|
|
|
|
<van-field v-model="form.line" label="Line" name="line" placeholder="請輸入您的Line ID" />
|
|
|
|
<van-field v-model="form.line" label="Line" name="line" placeholder="請輸入您的Line ID" />
|
|
|
|
@ -550,7 +557,7 @@ const handleChangeTplSubmit = async() => {
|
|
|
|
<van-button block class="btn-darkBlue" native-type="submit">確認修改</van-button>
|
|
|
|
<van-button block class="btn-darkBlue" native-type="submit">確認修改</van-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</van-sticky>
|
|
|
|
</van-sticky>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</van-form>
|
|
|
|
</van-form>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="content cnt2" v-show="tabActive === 2">
|
|
|
|
<div class="content cnt2" v-show="tabActive === 2">
|
|
|
|
@ -560,22 +567,12 @@ const handleChangeTplSubmit = async() => {
|
|
|
|
<van-field v-model="tab2result" is-link readonly name="picker" :border="false" placeholder="請選擇"
|
|
|
|
<van-field v-model="tab2result" is-link readonly name="picker" :border="false" placeholder="請選擇"
|
|
|
|
@click="tab2showPicker = true" />
|
|
|
|
@click="tab2showPicker = true" />
|
|
|
|
<van-popup v-model:show="tab2showPicker" position="bottom">
|
|
|
|
<van-popup v-model:show="tab2showPicker" position="bottom">
|
|
|
|
<van-picker
|
|
|
|
<van-picker confirm-button-text="確認" cancel-button-text="取消" :columns="tab2columns" @confirm="tab2OnConfirm"
|
|
|
|
confirm-button-text="確認"
|
|
|
|
@cancel="tab2showPicker = false" />
|
|
|
|
cancel-button-text="取消"
|
|
|
|
|
|
|
|
:columns="tab2columns"
|
|
|
|
|
|
|
|
@confirm="tab2OnConfirm"
|
|
|
|
|
|
|
|
@cancel="tab2showPicker = false"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</van-popup>
|
|
|
|
</van-popup>
|
|
|
|
</van-col>
|
|
|
|
</van-col>
|
|
|
|
<van-col span="15">
|
|
|
|
<van-col span="15">
|
|
|
|
<van-search
|
|
|
|
<van-search v-model="search.keyword" show-action placeholder="請輸入搜尋關鍵字" @search="tab2OnSearch">
|
|
|
|
v-model="search.keyword"
|
|
|
|
|
|
|
|
show-action
|
|
|
|
|
|
|
|
placeholder="請輸入搜尋關鍵字"
|
|
|
|
|
|
|
|
@search="tab2OnSearch"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template #action>
|
|
|
|
<template #action>
|
|
|
|
<van-button class="btn-darkBlue" @click="tab2OnSearch">
|
|
|
|
<van-button class="btn-darkBlue" @click="tab2OnSearch">
|
|
|
|
搜索
|
|
|
|
搜索
|
|
|
|
@ -654,9 +651,9 @@ const handleChangeTplSubmit = async() => {
|
|
|
|
|
|
|
|
|
|
|
|
<van-cell-group inset>
|
|
|
|
<van-cell-group inset>
|
|
|
|
<van-cell class="text-center bg-lightPink py-3">
|
|
|
|
<van-cell class="text-center bg-lightPink py-3">
|
|
|
|
<template #title>
|
|
|
|
<template #title>
|
|
|
|
<h6 class="text-darkBlue"><strong>NFC感應式版型切換</strong></h6>
|
|
|
|
<h6 class="text-darkBlue"><strong>NFC感應式版型切換</strong></h6>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</van-cell>
|
|
|
|
</van-cell>
|
|
|
|
|
|
|
|
|
|
|
|
<van-row>
|
|
|
|
<van-row>
|
|
|
|
@ -700,12 +697,12 @@ const handleChangeTplSubmit = async() => {
|
|
|
|
<style src="@/assets/css/main.css"></style>
|
|
|
|
<style src="@/assets/css/main.css"></style>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
|
|
|
.member {
|
|
|
|
.member{
|
|
|
|
.content {
|
|
|
|
.content{
|
|
|
|
|
|
|
|
min-height: calc(100vh - 142px);
|
|
|
|
min-height: calc(100vh - 142px);
|
|
|
|
padding-bottom: 0;
|
|
|
|
padding-bottom: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cnt2 {
|
|
|
|
.cnt2 {
|
|
|
|
.van-list {
|
|
|
|
.van-list {
|
|
|
|
.list-item {
|
|
|
|
.list-item {
|
|
|
|
@ -760,7 +757,9 @@ const handleChangeTplSubmit = async() => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.van-search,.van-search-content{
|
|
|
|
|
|
|
|
|
|
|
|
.van-search,
|
|
|
|
|
|
|
|
.van-search-content {
|
|
|
|
padding-left: 0;
|
|
|
|
padding-left: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -803,5 +802,4 @@ const handleChangeTplSubmit = async() => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
</style>
|