Browse Source

审核

tiaosheng-zx
xuesinan 4 years ago
parent
commit
8d1de21fc2
  1. 82
      index.html

82
index.html

@ -145,12 +145,11 @@
</div>
<script>
let preview = document.querySelector('.img-preview'); // 预览
preview.onclick = function(e){
document.querySelector('.img-preview').onclick = function(e){
e = window.event || e;
let parentApp = document.getElementById('img');
if(!parentApp.contains(e.target)){
preview.style.display = 'none';
document.querySelector('.img-preview').style.display = 'none';
}
}
@ -252,46 +251,41 @@
return false;
}
fetch(`https://test.tall.wiki/gateway/sports/training/audit`, {
headers: new Headers({
'Authorization': 'Bearer ' + that.token,
'Content-Type': 'application/json; charset=utf-8'
}),
method: 'POST',
body: JSON.stringify({
param: {
id: that.planId,
type: type,
remark: type === 1 ? '' : reason
}
})
})
.then(function(response) {
return response.json();
})
.then(function(res) {
const { success, code, data, msg } = res;
if (success && code === 200) {
// var trainPlanReject = that.dom.querySelector('.train-plan-reject');
// var trainPlanCheck = that.dom.querySelector('.train-plan-check');
that.dom.querySelector('.btn-group').style.display = 'none';
if (type == 2) {
that.dom.querySelector('.reason-box').style.display = 'flex';
that.dom.querySelector('.reason-content').innerHTML = reason;
// trainPlanReject.style.display = 'block';
// trainPlanCheck.style.display = 'none';
} else {
// trainPlanReject.style.display = 'none';
// trainPlanCheck.style.display = 'block';
// let pass = that.dom.querySelector('.train-pass-status');
// let btns = that.dom.querySelector('.train-pass-btn');
// pass.style.display = 'block';
// btns.style.display = 'none';
}
} else {
console.log('msg: ', msg);
}
});
that.dom.querySelector('.btn-group').style.display = 'none';
if (type == 2) {
that.dom.querySelector('.reason-box').style.display = 'flex';
that.dom.querySelector('.reason-content').innerHTML = reason;
}
// fetch(`https://test.tall.wiki/gateway/sports/training/audit`, {
// headers: new Headers({
// 'Authorization': 'Bearer ' + that.token,
// 'Content-Type': 'application/json; charset=utf-8'
// }),
// method: 'POST',
// body: JSON.stringify({
// param: {
// id: that.planId,
// type: type,
// remark: type === 1 ? '' : reason
// }
// })
// })
// .then(function(response) {
// return response.json();
// })
// .then(function(res) {
// const { success, code, data, msg } = res;
// if (success && code === 200) {
// that.dom.querySelector('.btn-group').style.display = 'none';
// if (type == 2) {
// that.dom.querySelector('.reason-box').style.display = 'flex';
// that.dom.querySelector('.reason-content').innerHTML = reason;
// }
// } else {
// console.log('msg: ', msg);
// }
// });
},
// 取消
@ -302,7 +296,7 @@
// 预览
bigImg() {
preview.style.display = 'flex';
document.querySelector('.img-preview').style.display = 'flex';
},
}
p1449944565028233216.init()

Loading…
Cancel
Save