fix(index): 优化外链提示及删除复制咨询模板功能
- 替换小程序内外链打开方式提示为弹窗提醒用户手动复制 - 删除复制咨询模板功能及相关按钮 - 修改联系我们文案,突出直接电话沟通或需求反馈 - 移除无用导入的复制文本工具函数copyText
This commit is contained in:
@@ -3,7 +3,6 @@ import { View, Text } from '@tarojs/components'
|
||||
import { useMemo, useState } from 'react'
|
||||
import { Button } from '@nutui/nutui-react-taro'
|
||||
import { useConfig } from '@/hooks/useConfig'
|
||||
import { copyText } from '@/utils/common'
|
||||
import './index.scss'
|
||||
|
||||
function Home() {
|
||||
@@ -76,28 +75,19 @@ function Home() {
|
||||
Taro.navigateTo({ url })
|
||||
return
|
||||
}
|
||||
// 外链在小程序内无法直接打开,复制链接降低认知成本
|
||||
// 小程序内无法直接打开外链,提示用户手动复制到浏览器
|
||||
if (/^https?:\/\//i.test(abs)) {
|
||||
copyText(abs)
|
||||
Taro.showModal({
|
||||
title: '提示',
|
||||
content: '该链接需要在浏览器中打开,请点击确认后手动复制链接访问。',
|
||||
showCancel: false,
|
||||
confirmText: '知道了'
|
||||
})
|
||||
return
|
||||
}
|
||||
Taro.showToast({ title: '请在 PC 端访问该入口', icon: 'none', duration: 1600 })
|
||||
}
|
||||
|
||||
const copyConsultTemplate = () => {
|
||||
const tel = config?.tel ? `\n联系电话:${config.tel}` : ''
|
||||
const text =
|
||||
'【需求咨询】\n' +
|
||||
'1) 想开通哪些产品:企业官网 / 电商 / 小程序 / 其他\n' +
|
||||
'2) 是否需要模板/插件市场:是 / 否\n' +
|
||||
'3) 是否需要“支付即开通”:是 / 否\n' +
|
||||
'4) 交付方式:SaaS / 私有化 / 混合\n' +
|
||||
'5) 合规/部署要求:\n' +
|
||||
'6) 期望上线时间:\n' +
|
||||
tel
|
||||
copyText(text)
|
||||
}
|
||||
|
||||
const callPhone = () => {
|
||||
const tel = (config?.tel || '').trim()
|
||||
if (!tel) {
|
||||
@@ -456,7 +446,7 @@ function Home() {
|
||||
<View className="section__head">
|
||||
<Text className="section__title">联系我们</Text>
|
||||
<Text className="section__desc">
|
||||
复制咨询模板或直接电话沟通,我们会按你的业务场景给出产品组合、开通链路与部署方案(SaaS/私有化)。
|
||||
直接电话沟通或留下需求,我们会按你的业务场景给出产品组合、开通链路与部署方案(SaaS/私有化)。
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
@@ -492,9 +482,6 @@ function Home() {
|
||||
</View>
|
||||
|
||||
<View className="contactActions">
|
||||
<Button type="default" block onClick={copyConsultTemplate}>
|
||||
复制咨询模板
|
||||
</Button>
|
||||
<Button type="primary" block onClick={callPhone}>
|
||||
电话咨询
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user