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