Commit dd83dbe3 authored by Aivs's avatar Aivs

fix:报错问题解决 签名的时候url传的参数要去掉#

parent e4bdbaf3
import React, {FC} from 'react'
import {HashRouter} from "react-router-dom";
import Nav from "./components/Nav";
// import Nav from "./components/Nav";
import RouterConfig from "./components/RouterConfig";
const App: FC = () => {
......
......@@ -60,12 +60,13 @@ export const fetchUserId = async (code: string) => {
}
// 获取签名
export const fetchSignatures = async () => {
export const fetchSignatures = async () => {
const response = await api.get('/user_center/signatures', {
params: {
url: window.location.href
url: window.location.href.split("#")[0]
}
})
// alert(window.location.href.split("#")[0])
// alert(JSON.stringify(response))
return response.data.data;
}
......
import React, {FC, useEffect, useState} from "react";
import Cookies from "js-cookie";
import {fetchUser,getBaseInfoByWxId,addWxLabel,getWxLabel,deleteWxLabel,updateBaseInfoFromCompanyWx} from "../api";
import {getBaseInfoByWxId,addWxLabel,getWxLabel,deleteWxLabel,updateBaseInfoFromCompanyWx} from "../api";
import {Spin,Form, Input, Button, Select,Radio,Tag} from "antd";
import { SearchOutlined,DownOutlined,UpOutlined } from '@ant-design/icons';
import './../css/home.css'
import jt from './../assets/images/jt.png'
import {jsSdk} from "../index"
import {Link} from "react-router-dom";
const {TextArea} = Input
const Home: FC = () => {
const [loading, setLoading] = useState<boolean>(false);
const [loading] = useState<boolean>(false);
const [userId, setUserId] = useState<any>('');
const [customInfoEdit,setCustomInfoEdit] = useState<boolean>(false);
const [labelValue,setlabelValue]= useState<string>('');
......@@ -56,35 +55,35 @@ const layout = {
labelCol: { span: 8 },
wrapperCol: { span: 16 },
};
const tailLayout = {
wrapperCol: { offset: 8, span: 16 },
};
// const tailLayout = {
// wrapperCol: { offset: 8, span: 16 },
// };
const [form] = Form.useForm();
const onGenderChange = (value: string) => {
switch (value) {
case 'male':
form.setFieldsValue({ note: 'Hi, man!' });
return;
case 'female':
form.setFieldsValue({ note: 'Hi, lady!' });
return;
case 'other':
form.setFieldsValue({ note: 'Hi there!' });
}
};
// const onGenderChange = (value: string) => {
// switch (value) {
// case 'male':
// form.setFieldsValue({ note: 'Hi, man!' });
// return;
// case 'female':
// form.setFieldsValue({ note: 'Hi, lady!' });
// return;
// case 'other':
// form.setFieldsValue({ note: 'Hi there!' });
// }
// };
const onFinish = (values: any) => {
console.log(values);
};
const onReset = () => {
form.resetFields();
};
// const onReset = () => {
// form.resetFields();
// };
const onFill = () => {
console.log(customInfo)
debugger
};
// const onFill = () => {
// console.log(customInfo)
// debugger
// };
const updown=()=>(e:any)=>{
console.log(e)
debugger
......@@ -166,12 +165,12 @@ const tailLayout = {
}
}
}
const onChange=()=>{
// const onChange=()=>{
}
const onSearch=()=>{
// }
// const onSearch=()=>{
}
// }
useEffect(() => {
getUserInfo();
......
......@@ -102,16 +102,16 @@ const Actions: React.FC = () => {
setListData([...data])
}
}
const sendMsg = useCallback(async () => {
if (!msg) alert('消息不能为空')
// const sendMsg = useCallback(async () => {
// if (!msg) alert('消息不能为空')
await jsSdk.invoke('sendChatMessage', {
msgtype: 'text',
text: {
content: msg
}
});
}, [msg])
// await jsSdk.invoke('sendChatMessage', {
// msgtype: 'text',
// text: {
// content: msg
// }
// });
// }, [msg])
const getUserBase = async () => {
const res = await jsSdk.invoke<{ userId?: string }>('getCurExternalContact', {})
console.log(res)
......
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