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

@ -8,28 +8,34 @@ class Studentssignmodel extends Component {
super(props)
}
setdatas=()=>{
const url = `/weapps/course_member_attendances.json`;
let data={
code:this.props.Studentssigntypedata.code,
attendance_mode:"NUMBER",
attendance_id:this.props.Studentssigntypedata.attendance_id,
}
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);
this.props.form.validateFields((err, values) => {
if (!err) {
const url = `/weapps/course_member_attendances.json`;
let data={
code:values.name,
attendance_mode:"NUMBER",
attendance_id:this.props.Studentssigntypedata.attendance_id,
}
}).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() {

Loading…
Cancel
Save