From 5fad0f56d627df64ab0d0383ca4bc55886bee655 Mon Sep 17 00:00:00 2001 From: xuesinan <1404152492@qq.com> Date: Fri, 8 Apr 2022 17:27:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=8F=E7=BA=AC=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 38b64e1..c8119a5 100644 --- a/index.html +++ b/index.html @@ -47,7 +47,7 @@ -
+
@@ -109,6 +109,8 @@ checkerId: '', // 审核员id checkerName: '', // 审核员 id: '', // 记录id + longitude: '', // 经度 + latitude: '', // 纬度 init() { this.dom = document.querySelector("div[data-root=p1485171846022434817]"); @@ -120,6 +122,8 @@ this.projectId = domBox.getAttribute("data-pid"); this.roleId = domBox.getAttribute("data-rid"); this.token = domBox.getAttribute("data-token"); + this.longitude = domBox.getAttribute("data-longitude"); + this.latitude = domBox.getAttribute("data-latitude"); this.getClockQuery(); // 初始化的时候 获取token // this.getTokenByUserId(userId); @@ -265,11 +269,11 @@ */ punch(clockType){ var that = this - let { checkerId, id, memberId } = that + let { checkerId, id, memberId, longitude, latitude } = that let d = new Date() let dateTime = new Date(d).getTime() const params = JSON.stringify({ - param: { checkerId, id, memberId, dateTime, clockType } + param: { checkerId, id, memberId, dateTime, clockType, longitude, latitude } }); var url = 'http://101.201.226.163:7320/v1.0/clock/punch'; fetch(url, { @@ -451,8 +455,10 @@ const token = this.dom.parentNode.getAttribute('data-token'); const rId = this.dom.parentNode.getAttribute('data-rid'); const url = this.dom.parentNode.getAttribute('data-url'); + const longitude = this.dom.parentNode.getAttribute('data-longitude'); + const latitude = this.dom.parentNode.getAttribute('data-latitude'); const path = "http://101.201.226.163/tall/v4.0.0/pages/detailWebview/detailWebview"; - const param = `http://101.201.226.163/checkwork/?pid=${pId}&uid=${uId}&rid=${rId}&token=${token}&url=${url}`; + const param = `http://101.201.226.163/checkwork/?pid=${pId}&uid=${uId}&rid=${rId}&token=${token}&url=${url}&longitude=${longitude}&latitude=${latitude}`; location.href = `${path}/?url=${encodeURIComponent(param)}`; } }