Commit e4bdbaf3 authored by Aivs's avatar Aivs

feat:接口对接,打包

parent 7f0d87d4
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"name": "wecom-sidebar", "name": "wecom-sidebar",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"homepage":".",
"dependencies": { "dependencies": {
"@ant-design/icons": "^4.7.0", "@ant-design/icons": "^4.7.0",
"@babel/core": "7.12.3", "@babel/core": "7.12.3",
......
import axios from 'axios' import axios from 'axios'
import qs from 'qs' // import qs from 'qs'
axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'; axios.defaults.headers['Content-Type'] = 'application/json;charset=UTF-8';
// 后端地址 // 后端地址
// const baseURL = 'http://192.168.30.239:5000' // const baseURL = 'http://192.168.30.239:5000'
...@@ -114,8 +114,7 @@ export const addWxLabel = async (params:any) => { ...@@ -114,8 +114,7 @@ export const addWxLabel = async (params:any) => {
} }
// 删除 // 删除
export const deleteWxLabel = async (data:any) => { export const deleteWxLabel = async (data:any) => {
const response = await api.post('/user_center/deleteWxLabel', const response = await api.post('/user_center/deleteWxLabel', data
[...data]
) )
return response.data; return response.data;
} }
......
...@@ -256,4 +256,16 @@ ...@@ -256,4 +256,16 @@
} }
.none{ .none{
display: none; display: none;
}
.ssbox{
/* height:170px;
overflow: hidden; */
}
.dicon{
text-align: center;
color:#C7C7CC;
}
.back{
width:100%;
border-radius:0 !important;
} }
\ No newline at end of file
This diff is collapsed.
...@@ -4,6 +4,8 @@ import {jsSdk} from "../index"; ...@@ -4,6 +4,8 @@ import {jsSdk} from "../index";
import {Button, Input,Table,Tabs,Space} from "antd"; import {Button, Input,Table,Tabs,Space} from "antd";
import {SearchOutlined } from '@ant-design/icons'; import {SearchOutlined } from '@ant-design/icons';
import {selectUserBase,linkData,unlinkData} from "../api"; import {selectUserBase,linkData,unlinkData} from "../api";
import creatHistory from 'history/createHashHistory' //返回上一页这段代码
const history = creatHistory();
const {TextArea} = Input const {TextArea} = Input
const { TabPane } = Tabs; const { TabPane } = Tabs;
...@@ -130,6 +132,9 @@ const Actions: React.FC = () => { ...@@ -130,6 +132,9 @@ const Actions: React.FC = () => {
getUserBase() getUserBase()
} }
} }
const back = ()=>{
history.goBack()
}
useEffect(() => { useEffect(() => {
getUserBase() getUserBase()
...@@ -137,6 +142,7 @@ const Actions: React.FC = () => { ...@@ -137,6 +142,7 @@ const Actions: React.FC = () => {
return ( return (
<div> <div>
<Button type='primary' className='back' onClick={back.bind(this)}>返回</Button>
<div className="flex search"> <div className="flex search">
<Input className='searchInt' allowClear placeholder="请输入客户信息" prefix={<SearchOutlined />} onChange={inputChange} onKeyDown={getInput}/> <Input className='searchInt' allowClear placeholder="请输入客户信息" prefix={<SearchOutlined />} onChange={inputChange} onKeyDown={getInput}/>
{/* <Button size='small'>取消</Button> */} {/* <Button size='small'>取消</Button> */}
......
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