Browse Source

工资条

tall-salary
xuesinan 3 years ago
parent
commit
3388a6763b
  1. 22
      index.html

22
index.html

@ -53,13 +53,14 @@
data-rid="1473556018582790144"
data-token="eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2NTM2MTQwOTksInN1YiI6IjE0ODE0NTg3NDEyOTU3MTQzMDQiLCJhdXRoSWQiOiIxNDgxNDU4NzQxNTMwNTk1MzI4IiwiZXhwIjoxNjUzNjIxMjk5fQ.kM15-gERv5j5qWBeWEG0kDxLWMJesHInnwFQnUaKcGg"
data-url="http://101.201.226.163:7320/v1.0"
data-tTime="1660492800000"
data-type="1"
data-tid="tid444"
data-did="did555"
style="height:50px;width:100%">
<div data-root="p1541239500222763008" class="w-full h-full flex justify-between items-center">
<div class="title" style="font-size: 14px;"></div>
<button class="bg-blue-500 text-xs rounded py-1 px-3 text-white border-none" onclick="p1541239500222763008.jumpDetails(this)">早打卡</button>
<button class="bg-blue-500 text-xs rounded py-1 px-3 text-white border-none" onclick="p1541239500222763008.jumpDetails(this)">查看</button>
</div>
</div>
@ -69,13 +70,26 @@
init() {
this.dom = document.querySelector("div[data-root=p1541239500222763008]");
if (this.dom) {
var title = this.dom.querySelector('.title');
const currTime = this.dom.parentNode.getAttribute('data-tTime'); // 任务时间
let tMonth = '';
if (currTime) {
tMonth = this.format(currTime);
} else {
var myDate = new Date();
var tMonth = myDate.getMonth();
title.innerHTML = tMonth === 0 ? '12月份工资表' : tMonth + '月份工资表';
tMonth = myDate.getMonth();
}
title.innerHTML = tMonth === 0 ? '12月份工资表' : tMonth + '月份工资表';
},
// 时间戳转时间格式
format(shijianchuo){
//shijianchuo是整数,否则要parseInt转换
var time = new Date(+shijianchuo);
var m = time.getMonth();
return m;
},
jumpDetails(that) {

Loading…
Cancel
Save