feat:homePage的修改

This commit is contained in:
2026-04-01 11:25:46 +08:00
parent 47526eb6dc
commit 548b7084a6
4 changed files with 24 additions and 5 deletions

BIN
public/NYC_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

View File

@@ -39,13 +39,13 @@ const handleTabChange = (tab: string) => {
>
发送评估表
</div>
<div
<!-- <div
class="tab-item"
:class="{ active: activeTab === 'analysis' }"
@click="handleTabChange('analysis')"
>
客户信息
</div>
</div> -->
<div
class="tab-item"
:class="{ active: activeTab === 'archive' }"

View File

@@ -190,8 +190,8 @@ const sendFormLink = async () => {
news: {
title: '青少年成长伙伴计划评估表',
desc: '通过专业的评估工具,了解孩子的成长需求',
imgUrl: 'https://forms.nycjy.cn/favicon.ico',
link: `https://forms.nycjy.cn?wecom_id=${externalUserId.value}&t=${Date.now()}`
imgUrl: 'https://sidebar.wx.nycjy.cn/NYC_logo.png',
link: `https://forms.nycjy.cn`
}
})
} catch (error) {

View File

@@ -291,6 +291,25 @@ const closeModal = () => {
setTimeout(() => { currentItem.value = null }, 300)
}
const handleSend01 = async (type: FormType) => {
if (isCoolingDown.value) return
activeSendType.value = type
startTimer(8)
try {
const contact = await ww.getCurExternalContact()
const userId = contact.userId
const apiUrl = `https://liaison.nycjy.cn/api/v1/archive/form-url?user_id=${userId}&form_id=${CONFIG[type].id}`
const res = await fetch(apiUrl).then(r => r.json())
if (res.code === 200 && res.data?.form_url) {
await ww.sendChatMessage({
msgtype: 'news',
news: { title: CONFIG[type].title, desc: CONFIG[type].desc, imgUrl: 'https://sidebar.wx.nycjy.cn/NYC_logo.png', link: 'https://liaison.nycjy.cn/index.html?form_id=form_8225aad48432' }
})
} else alert('获取链接失败:' + (res.message || '未知错误'))
} catch (err) { console.error('发送流程出错:', err) }
}
const handleSend = async (type: FormType) => {
if (isCoolingDown.value) return
activeSendType.value = type
@@ -304,7 +323,7 @@ const handleSend = async (type: FormType) => {
if (res.code === 200 && res.data?.form_url) {
await ww.sendChatMessage({
msgtype: 'news',
news: { title: CONFIG[type].title, desc: CONFIG[type].desc, imgUrl: 'https://forms.nycjy.cn/favicon.ico', link: res.data.form_url }
news: { title: CONFIG[type].title, desc: CONFIG[type].desc, imgUrl: 'https://sidebar.wx.nycjy.cn/NYC_logo.png', link: res.data.form_url }
})
} else alert('获取链接失败:' + (res.message || '未知错误'))
} catch (err) { console.error('发送流程出错:', err) }