Browse Source

报名

ts-sign-up
xuesinan 4 years ago
parent
commit
8c12d66336
  1. 72
      index.html

72
index.html

@ -52,32 +52,23 @@
<button id="applyBtn" class="nightClockBtn bg-blue-500 text-xs rounded-md py-1 px-3 text-white" onclick="p1449996929974149120.apply()" style="display: block;">报名</button>
</div>
</div>
<div class="border-2 w-full mt-2.5 flex justify-between p-2 text-sm">
<p style="color: #999999;">山西跳协**培训红头文件</p>
<button class="text-xs text-blue-400 border border-blue-400 rounded-full w-10 h-5" onclick="p1449996929974149120.lookFile()">查看</button>
</div>
<div class="border-2 w-full mt-2.5 p-2 text-sm" id="pxxz" style="display: none;">
<div class="flex justify-between">
<span style="color: #999999;">报名信息</span>
<button class="text-xs text-blue-400 border border-blue-400 rounded-full w-10 h-5">查看</button>
<!-- <span class="text-xs text-center text-white bg-blue-400 rounded-full w-10 h-5 inline-block leading-5">查看</span> -->
<div class="person-info border-2 w-full mt-2.5 flex justify-between p-2 text-sm" id="pxxz" style="display: none;">
<span style="color: #999999;">报名信息</span>
<div class="">
<button class="text-xs text-blue-500 border border-blue-500 rounded-full w-10 h-5" onclick="p1449996929974149120.lookFile()">查看</button>
<button class="not-pay text-xs text-center text-white bg-blue-500 rounded-full w-10 h-5" style="display: none;" onclick="p1449996929974149120.toPay()">去缴费</button>
</div>
</div>
</div>
</div>
<script>
/* function apply(){
var bigBox=document.querySelector('.bigBox')
var applyBtn=document.querySelector('#applyBtn')
var registrationSuccess=document.querySelector('#registrationSuccess')
var pxxz=document.querySelector('#pxxz')
registrationSuccess.style.display='block'
applyBtn.style.display='none'
bigBox.style.height='13rem'
pxxz.style.display='block'
} */
var p1449996929974149120 = {
token: '',
projectId: '',
@ -114,14 +105,52 @@
const { success, code, data, msg } = res;
if (success && code === 200) {
that.token = data.token;
// 查询考勤信息
that.getClockQuery()
// 获取报名信息
that.getPersonInfo();
} else {
console.log('msg: ', msg);
}
});
},
// 获取报名信息
getPersonInfo() {
var that = this;
fetch(`https://test.tall.wiki/gateway/sports/player/info`, {
headers: new Headers({
'Authorization': 'Bearer ' + that.token,
'Content-Type': 'application/json; charset=utf-8'
}),
method: 'POST',
body: JSON.stringify({
param: {
projectId: that.projectId
}
})
})
.then(function(response) {
return response.json();
})
.then(function(res) {
const { success, code, data, msg } = res;
if (success && code === 200) {
console.log(data);
if (data) {
var personInfo = that.dom.querySelector('.person-info');
personInfo.style.display = 'block';
if (data.payStatus === 0) {
var notPay = that.dom.querySelector('.not-pay');
notPay.style.display = 'block';
}
}
} else {
console.log('msg: ', msg);
}
});
},
// 报名按钮
apply(){
const pId = this.dom.parentNode.getAttribute('data-pid');
@ -129,6 +158,7 @@
const rId = this.dom.parentNode.getAttribute('data-rid');
location.href=`https://test.tall.wiki/ts/apply?pid=${pId}&uid=${uId}&rid=${rId}`
},
// 学员查看红头文件
lookFile(){
const pId = this.dom.parentNode.getAttribute('data-pid');
@ -137,12 +167,12 @@
location.href=`https://test.tall.wiki/ts/file?pid=${pId}&uid=${uId}&rid=${rId}`
},
// 跳转详情
jumpDetails(that) {
// 去支付
toPay() {
const pId = this.dom.parentNode.getAttribute('data-pid');
const uId = this.dom.parentNode.getAttribute('data-uid');
const rId = this.dom.parentNode.getAttribute('data-rid');
location.href = `https://www.tall.wiki/checkwork/?pid=${pId}&uid=${uId}&rid=${rId}`;
location.href=`https://test.tall.wiki/ts/pay?pid=${pId}&uid=${uId}&rid=${rId}`
}
}
p1449996929974149120.init()

Loading…
Cancel
Save