Commit c905588f authored by 熊成伟's avatar 熊成伟

debug

parent be67854b
Pipeline #15219 passed with stages
in 58 seconds
This diff is collapsed.
...@@ -6,7 +6,7 @@ const Index = (props) => { ...@@ -6,7 +6,7 @@ const Index = (props) => {
return ( return (
<div className="address-box"> <div className="address-box">
{data && data.length > 0 && data.map((item, index) => item.NAME && ( {data && data.length > 0 && data.map((item, index) => item.NAME && (
<div key={index} onClick={() => onCLick(item.DEPTID)}> <div key={index} onClick={() => onCLick(item.DEPTID)} className="address-item">
{item.NAME || ''} {item.NAME || ''}
<img src="/img/rarrow.png" alt="" className='icon18'/> <img src="/img/rarrow.png" alt="" className='icon18'/>
</div> </div>
......
...@@ -22,6 +22,7 @@ const Backlog = (props) => { ...@@ -22,6 +22,7 @@ const Backlog = (props) => {
axiosRequest({ axiosRequest({
method: 'post', method: 'post',
url: '/idtAppServiceV6/oApp/getUnDone', url: '/idtAppServiceV6/oApp/getUnDone',
body: pageMap,
}).then(res => { }).then(res => {
console.log(res) console.log(res)
setLoading(false); setLoading(false);
...@@ -55,7 +56,10 @@ const Backlog = (props) => { ...@@ -55,7 +56,10 @@ const Backlog = (props) => {
element.scrollTo(0, 0) element.scrollTo(0, 0)
}, []) }, [])
console.log(loading) const wordSearch = val => {
setSearchWord(val)
getData()
}
return ( return (
<WingBlank> <WingBlank>
<ActivityIndicator <ActivityIndicator
...@@ -64,7 +68,7 @@ const Backlog = (props) => { ...@@ -64,7 +68,7 @@ const Backlog = (props) => {
animating={loading} animating={loading}
/> />
<WhiteSpace/> <WhiteSpace/>
<TopSearch onSearch={setSearchWord}/> <TopSearch onSearch={wordSearch}/>
{ {
data.map((item, index) => ( data.map((item, index) => (
<div key={index}> <div key={index}>
......
...@@ -5,7 +5,8 @@ import AddressCheckbox from '../../components/AddressList/AddressCheckbox'; ...@@ -5,7 +5,8 @@ import AddressCheckbox from '../../components/AddressList/AddressCheckbox';
const SubmitDetail = (props) => { const SubmitDetail = (props) => {
const [data, setData] = useState([]); const [data, setData] = useState([]);
const [title, setTitle] = useState([]) const [title, setTitle] = useState([]);
const [disabled, setDisabled] = useState(true);
useEffect(() => { useEffect(() => {
// const {type} = props.match.params // const {type} = props.match.params
axiosRequest({ axiosRequest({
...@@ -18,8 +19,18 @@ const SubmitDetail = (props) => { ...@@ -18,8 +19,18 @@ const SubmitDetail = (props) => {
}); });
}, []); }, []);
const [suData, setSuData] = useState([])
const checkName = (name, checked) => { const checkName = (name, checked) => {
console.log(name, checked) const newData = [...suData];
const index = newData.indexOf(name);
checked ? newData.push(name) : newData.splice(index, 1);
newData.length > 0 ? setDisabled(false) : setDisabled(true)
setSuData(newData)
}
const textClick = () => {
console.log(suData)
} }
return ( return (
<div> <div>
...@@ -34,6 +45,12 @@ const SubmitDetail = (props) => { ...@@ -34,6 +45,12 @@ const SubmitDetail = (props) => {
<div className='adMainBox'> <div className='adMainBox'>
<AddressCheckbox data={data} setName={checkName}/> <AddressCheckbox data={data} setName={checkName}/>
</div> </div>
<div className="event-footer">
<div className={`event-footer-button ${(disabled) ? 'button-disabled' : '' }`} onClick={textClick}>
{suData.length > 0 ?`(${suData.length})` : null} 确认发送
</div>
</div>
</div> </div>
); );
}; };
......
@import '../../variable.less';
#event{ #event{
position: fixed; position: fixed;
top: 44px; top: 44px;
...@@ -99,3 +101,8 @@ ...@@ -99,3 +101,8 @@
justify-content: space-between; justify-content: space-between;
font-size: 14px; font-size: 14px;
} }
.am-checkbox.am-checkbox-checked .am-checkbox-inner{
border-color: @primary;
background: @primary;
}
...@@ -33,7 +33,6 @@ export const createAPI = (baseURL) => { ...@@ -33,7 +33,6 @@ export const createAPI = (baseURL) => {
let body = conf.body || {}; let body = conf.body || {};
let urlParams = ''; let urlParams = '';
let headers = { ...defaultHeaders, ...opts.headers }; let headers = { ...defaultHeaders, ...opts.headers };
if (conf.queryType === 'query') { if (conf.queryType === 'query') {
urlParams = conf.body ? "?" + stringify(conf.body) : ''; urlParams = conf.body ? "?" + stringify(conf.body) : '';
......
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