PCqiandao
杨树林 5 years ago
parent f6c7b00724
commit 5e08dc6bf3

@ -8,28 +8,34 @@ class Studentssignmodel extends Component {
super(props) super(props)
} }
setdatas=()=>{ setdatas=()=>{
const url = `/weapps/course_member_attendances.json`; this.props.form.validateFields((err, values) => {
let data={ if (!err) {
code:this.props.Studentssigntypedata.code, const url = `/weapps/course_member_attendances.json`;
attendance_mode:"NUMBER", let data={
attendance_id:this.props.Studentssigntypedata.attendance_id, code:values.name,
} attendance_mode:"NUMBER",
axios.post(url, data) attendance_id:this.props.Studentssigntypedata.attendance_id,
.then((result) => {
if (result.data.status === 0) {
try {
this.props.showNotification(`签到成功`);
}catch (e) {
}
this.props.getsetdatas();
this.props.Gotomodes(null,false)
}else{
this.props.showNotification(result.data.message);
} }
}).catch((error) => { axios.post(url, data)
}) .then((result) => {
if (result.data.status === 0) {
try {
this.props.showNotification(`签到成功`);
}catch (e) {
}
this.props.getsetdatas();
this.props.Gotomodes(null,false)
}else{
this.props.showNotification(result.data.message);
}
}).catch((error) => {
})
}
});
} }
render() { render() {

Loading…
Cancel
Save