Commit 969ed163 authored by wangxuelai's avatar wangxuelai

'最细代码提交'

parent 1d8f0397
......@@ -73,6 +73,7 @@ export default {
studentClassRecords: `${dakaapi}member/erp/student/calls`,
studentsLog: `${dakaapi}member/erp/student/logs`,
studentsUnBindWx: `${dakaapi}member/erp/student/wechat/remove`,
schoolUuid: `${dakaapi}member/school_uuid`,
},
teachers: `${dakaapi}member/erp/teachers`,
choose_teacher: `${dakaapi}member/erp/teacher/distribution`,
......
......@@ -915,10 +915,18 @@ export default {
});
},
* generateSingleBindQrcode({ payload }, { call, put, select }) {
const { mobile, school_id } = payload;
const { student_id, school_id } = payload;
const loading = message.loading('小程序生成中..');
const getUUidData = yield call(studentsAjax.createSchoolUuid, {
school_id,
type: 3,
});
if (getUUidData.code != 200) {
message.error('二维码生成失败,请重试', 1);
return;
}
const qrcodeData = yield call(commonAjax.generateQrcode, {
scene: `m=${mobile}&s=${school_id}`,
scene: `std=${student_id}&s=${school_id}&uid=${getUUidData.data}`,
page: 'src/pages/setting/bindmobile2', // src/pages/setting/bindmobile2
});
setTimeout(loading);
......
......@@ -497,6 +497,7 @@ class StudentMgt extends React.Component {
payload: {
mobile: student.mobile,
school_id: student.school_id,
student_id: student.id,
},
});
this.setState({
......
......@@ -73,3 +73,10 @@ export function studentsUnBindWx(params) {
data,
});
}
export function createSchoolUuid(params) {
const data = qs.stringify(params);
return request({
url: `${api.students.schoolUuid}?${data}`,
method: 'GET',
});
}
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