|
|
@ -73,8 +73,8 @@ |
|
|
|
const pid = domBox.getAttribute('data-pid'); |
|
|
|
const token = await getToken(uid); |
|
|
|
const carInfo = await getBindCar(pid,token); |
|
|
|
if(carInfo && carInfo.length) { |
|
|
|
domChild[0].innerHTML = `平车${carNumber}` |
|
|
|
if(carInfo && carInfo.carId) { |
|
|
|
domChild[0].innerHTML = `平车${carInfo.carSerial}` |
|
|
|
domChild[0].style.display = 'block' |
|
|
|
} else { |
|
|
|
domChild[1].style.display = 'block' |
|
|
@ -101,7 +101,8 @@ |
|
|
|
*/ |
|
|
|
async function getBindCar(projectId,token) { |
|
|
|
const params = { param: { projectId } } |
|
|
|
const response = await fetch('https://www.tall.wiki/gateway/wisdomcar/car/queryBindingCar', { |
|
|
|
// const response = await fetch('https://www.tall.wiki/gateway/wisdomcar/car/queryBind', { |
|
|
|
const response = await fetch('/queryBind', { |
|
|
|
method: 'POST', |
|
|
|
headers: { |
|
|
|
'Content-Type': 'application/json;charset=utf-8', |
|
|
@ -110,6 +111,7 @@ |
|
|
|
body: JSON.stringify(params) |
|
|
|
}); |
|
|
|
const json = await response.json(); |
|
|
|
console.log('data', json.data) |
|
|
|
return json.data; |
|
|
|
} |
|
|
|
/* |
|
|
@ -119,6 +121,7 @@ |
|
|
|
bindOne(that) { |
|
|
|
console.log(that.parentNode.parentNode) |
|
|
|
console.log('data-pid',that.parentNode.parentNode.getAttribute('data-pid')) |
|
|
|
location.href = 'https://www.baidu.com' |
|
|
|
}, |
|
|
|
bindTwo(that) { |
|
|
|
console.log(that.parentNode.parentNode) |
|
|
|