Commit fed2b099 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 不配置客服服务隐藏提问入口

parent 1340a815
......@@ -12,23 +12,23 @@ const AnyQuestion: React.FC<Iprops> = () => {
const authInfo: any = getAuth() || {}
// @todo 根据pass平台接口配置 决定是跳转lx-IM还是网易七鱼IM 先接七鱼
const _self = GlobalConfig?.global?.imConfig?.type === 1 //自有
// 根据接口配置 跳转lx-IM或者七鱼IM,并传入初始秘钥 1 //自有 2 //第三方
const _self = GlobalConfig?.global?.imConfig ? GlobalConfig.global.imConfig.type : null
useEffect(() => {
if(!_self) {
// 判断是否接入过自有
const s = GlobalConfig?.global?.imConfig?.paramConfigList[0]['value']
if(_self === 2) {
// 第三方
const s = GlobalConfig.global.imConfig.paramConfigList[0]['value']
const _window: any = window
!_window?.ysf && initQiyuImServer(s)
}
}, [])
const openIMServer = () => {
if(!_self) {
if(_self === 2) {
configUsr(authInfo)
const _window: any = window
_window?.ysf && _window.ysf('open')
} else {
} else if(_self === 1) {
toChatRoom(authInfo.memberId)
}
}
......@@ -41,12 +41,17 @@ const AnyQuestion: React.FC<Iprops> = () => {
<p className={styles.tips}>客户经理、项目经理、技术专家为你解答平台使用过程中遇到任何问题</p>
</div>
<div className={styles.ask}>
<a
target={"__blank"}
onClick={openIMServer}
>
我要提问
</a>
{
_self === null ?
null
:
<a
target={"__blank"}
onClick={openIMServer}
>
我要提问
</a>
}
</div>
<div className={styles.ask_image}>
<img src={ask} />
......
......@@ -112,7 +112,7 @@ export const configUsr = (authInfo) => {
_window?.ysf && _window.ysf('config', {
uid: authInfo.token,
name: authInfo.company,
mobile: authInfo.account,
// mobile: authInfo.account,
level : authInfo.levelTag,
data:JSON.stringify([
{"index":2, "key":"name", "label":"会员名称", "value":authInfo.name},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment