Compare commits

..

No commits in common. '4bb4229dd8b3befb5cf413814c59165845a33440' and 'f41a23e851f302d1d63683b84e5316e0e32f5faf' have entirely different histories.

@ -82,8 +82,8 @@ export const getFlexcard = async () =>
ajax(`/ads/getFlexcard`); ajax(`/ads/getFlexcard`);
//通訊錄 //通訊錄
export const getUserFaviList = async (params) => export const getUserFaviList = async (cate_id) =>
ajax(`/UserFavi/getUserFaviList`, params, "POST"); ajax(`/UserFavi/getUserFaviList`, { cate_id }, "GET");
export const addUserFavi = async (params) => export const addUserFavi = async (params) =>
ajax(`/UserFavi/addUserFavi`, params, "POST"); ajax(`/UserFavi/addUserFavi`, params, "POST");

@ -30,6 +30,7 @@ function renderCard(ctx) {
let rCard = { let rCard = {
type: "bubble", type: "bubble",
hero: { hero: {
animated: true,
aspectMode: "cover", aspectMode: "cover",
aspectRatio: card.ratio || "20:13", aspectRatio: card.ratio || "20:13",
size: "full", size: "full",

@ -1,9 +1,7 @@
<script setup> <script setup>
import _ from 'lodash'; import _ from 'lodash';
import { onMounted, onBeforeMount, ref } from 'vue'
import { toClipboard } from "@soerenmartius/vue3-clipboard";
import { showToast, showSuccessToast, showConfirmDialog } from 'vant'; import { showToast, showSuccessToast, showConfirmDialog } from 'vant';
import { useRoute } from 'vue-router';
import { import {
getUserFaviList getUserFaviList
@ -14,8 +12,8 @@ import {
, deleteUserFavi , deleteUserFavi
} from '@/api' } from '@/api'
import { getAreaList } from '@/api/system'; import { onMounted, onBeforeMount, ref } from 'vue'
import { useRoute } from 'vue-router';
const route = useRoute(); const route = useRoute();
@ -37,7 +35,7 @@ onMounted(async () => {
}); });
const initData = async () => { const initData = async () => {
let res = await getUserFaviList(search.value); let res = await getUserFaviList(0);
if (res.code === 200) { if (res.code === 200) {
addressList.value = res.data; addressList.value = res.data;
} }
@ -56,12 +54,6 @@ const getCateList = async () => {
} }
} }
//
const doCopy = (text) => {
toClipboard(text);
showToast("已放入剪貼簿");
};
const handleDeleteFavi = async (id) => { const handleDeleteFavi = async (id) => {
// vant // vant
showConfirmDialog({ showConfirmDialog({
@ -113,8 +105,12 @@ const columns = ref([
]); ]);
const onCateConfirm = async (value) => { const onCateConfirm = async (value) => {
search.value.cate = value.selectedValues[1] let res = await getUserFaviList(value.selectedValues[1]);
showCatePicker.value = false if (res.code === 200) {
addressList.value = res.data;
}
showCatePicker.value = false;
}; };
const onCateChange = (value) => { const onCateChange = (value) => {
@ -278,77 +274,6 @@ const onSubmit = async () => {
} }
}; };
const search = ref({
cate: 0,
area: 0,
sex: 2,
keyword: ''
});
const tab2showPicker = ref(false);
const tab3showPicker = ref(false)
const tab3columns = ref([])
const areaName = ref('')
//
let areaRes = await getAreaList()
if (areaRes.code === 200) {
tab3columns.value = areaRes.data
// tab3columns
tab3columns.value.unshift({
text: '全部',
value: 0
})
//
// if (areaRes.data.length > 0) {
// const findRes = _.find(areaRes.data, { value: form.value.area })
// if (findRes) {
// areaName.value = findRes.text
// }
// }
}
const tab3OnConfirm = (value) => {
areaName.value = value.selectedOptions[0].text
search.value.area = value.selectedOptions[0].value
tab3showPicker.value = false
}
const tab4showPicker = ref(false);
const tab4columns = ref([
{
text: '全部',
value: 2
},
{
text: '男',
value: 1
},
{
text: '女',
value: 0
}
]);
const sexName = ref('')
const tab4OnConfirm = (value) => {
sexName.value = value.selectedOptions[0].text
search.value.sex = value.selectedOptions[0].value
tab4showPicker.value = false
}
const handleSearch = async () => {
let res = await getUserFaviList(search.value);
if (res.code === 200) {
addressList.value = res.data;
}
}
</script> </script>
<template> <template>
@ -376,42 +301,6 @@ const handleSearch = async () => {
cancel-button-text="取消" @cancel="showCatePicker = false" @confirm="onCateConfirm" @change="onCateChange" /> cancel-button-text="取消" @cancel="showCatePicker = false" @confirm="onCateConfirm" @change="onCateChange" />
</van-popup> </van-popup>
</van-cell-group> </van-cell-group>
<van-cell-group inset>
<van-row gutter="0" align="center">
<van-col span="5">
<van-field v-model="areaName" is-link readonly name="picker"
:border="false"
placeholder="縣市"
@click="tab3showPicker = true" />
<van-popup v-model:show="tab3showPicker" position="bottom">
<van-picker confirm-button-text="" cancel-button-text="" :columns="tab3columns" @confirm="tab3OnConfirm"
@cancel="tab3showPicker = false" />
</van-popup>
</van-col>
<van-col span="5">
<van-field v-model="sexName"
is-link
readonly
name="picker"
:border="false"
placeholder="性別"
@click="tab4showPicker = true" />
<van-popup v-model:show="tab4showPicker" position="bottom">
<van-picker confirm-button-text="" cancel-button-text="" :columns="tab4columns" @confirm="tab4OnConfirm"
@cancel="tab4showPicker = false" />
</van-popup>
</van-col>
<van-col span="14">
<van-search v-model="search.keyword" show-action placeholder="請輸入搜尋關鍵字" @search="handleSearch">
<template #action>
<van-button class="btn-darkBlue" @click="handleSearch">
搜索
</van-button>
</template>
</van-search>
</van-col>
</van-row>
</van-cell-group>
<!-- END: 通訊錄類別 --> <!-- END: 通訊錄類別 -->
<van-cell-group inset> <van-cell-group inset>
@ -428,10 +317,10 @@ const handleSearch = async () => {
<van-button size="small" class="border-0" @click="handleChangeCate(item.user_id)"> <van-button size="small" class="border-0" @click="handleChangeCate(item.user_id)">
<h5><i class="fa-solid fa-heart text-darkBlue"></i></h5> <h5><i class="fa-solid fa-heart text-darkBlue"></i></h5>
</van-button> </van-button>
<van-button size="small" class="border-0" @click="doCopy(item.nfcurl)"> <van-button size="small" class="border-0" :url="`line://ti/p/@${item.line}`">
<h5><i class="fa-solid fa-share-nodes text-darkBlue"></i></h5> <h5><i class="fa-solid fa-share-nodes text-darkBlue"></i></h5>
</van-button> </van-button>
<van-button size="small" class="border-0" @click="handleDeleteFavi(item.uf_id)"> <van-button size="small" class="border-0" @click="handleDeleteFavi(item.id)">
<h5><i class="fa-solid fa-trash text-darkBlue"></i></h5> <h5><i class="fa-solid fa-trash text-darkBlue"></i></h5>
</van-button> </van-button>
</div> </div>

@ -669,6 +669,8 @@ const handleChangeTplSubmit = async () => {
</van-list> </van-list>
</van-cell-group> </van-cell-group>
</div> </div>
<div class="content cnt3" v-show="tabActive === 3"> <div class="content cnt3" v-show="tabActive === 3">

@ -161,7 +161,7 @@ const sendEcard = async () => {
res = await liff.shareTargetPicker([content, res = await liff.shareTargetPicker([content,
{ {
'type': 'text', 'type': 'text',
'text': '名片的文字、數字,都可連結,請多多指教!' 'text': '名片的連結都可以點擊!'
}]) }])
} else { } else {
res = await liff.shareTargetPicker([content]) res = await liff.shareTargetPicker([content])

Loading…
Cancel
Save