Commit c148640e by qinjianhui

fix: 样式修改

parent b5d76efc
<!DOCTYPE html>
<html lang="en">
<head>
......@@ -274,16 +273,24 @@
max-width: 90%;
}
.shippinp {
margin-bottom: 10px;
}
.order-status .status {
font-size: 16px;
}
.logistics-details:not(:first-child) {
padding-top: 10px;
}
.log-progress {
margin-top: 10px;
padding: 0;
padding-bottom: 60px;
padding-bottom: 40px;
}
.logistics:not(:first-child) {
margin-top: 10px;
}
.node-item {
padding: 0 6px;
}
......@@ -300,15 +307,27 @@
}
.node-text div {
white-space: normal;
white-space: nowrap;
word-break: break-all;
font-size: 14px;
width: 50px;
overflow: hidden;
text-overflow: ellipsis;
}
.node-line {
height: 5px;
}
.content {
display: flex;
gap: 40px;
gap: 20px;
flex-direction: column-reverse;
}
.order-number {
font-size: 18px;
}
}
</style>
</head>
......@@ -322,11 +341,7 @@
</p>
<div id="tracking_order_form" class="order-form">
<p style="margin-top: 25px">
<input
placeholder="Enter email address"
name="email"
type="text"
/>
<input placeholder="Enter email address" name="email" type="text" />
</p>
<p style="margin-top: 25px">
<input
......@@ -337,7 +352,7 @@
</p>
<p style="margin-top: 25px">
<button onclick="submit()" type="button">
<button type="button" id="track_button" onclick="submit">
SUBMIT
<img
class="loading"
......@@ -396,7 +411,7 @@
)
}
function setimgUrl(url, options = {}){
function setimgUrl(url, options = {}) {
var clientWidth = document.body.clientWidth
var dpi = Math.ceil(clientWidth / 1920) + 0.5
var zImgPath = 'https://image.joshine.cn/'
......@@ -424,7 +439,6 @@
}
</script>
<script>
var loading = false
function submit() {
if (loading) return
loading = true
......@@ -465,7 +479,12 @@
iterator.shopNumber || ''
}</span>`
var statusList = iterator.statusList.filter((item) => {
if (item.key_stage !== 'InfoReceived' && item.key_stage !== 'PickedUp' && item.key_stage !== 'Returned' && item.key_stage !== 'Returning') {
if (
item.key_stage !== 'InfoReceived' &&
item.key_stage !== 'PickedUp' &&
item.key_stage !== 'Returned' &&
item.key_stage !== 'Returning'
) {
return true
}
})
......@@ -473,7 +492,7 @@
{ key_stage: 'Processing' },
{ key_stage: 'Departure' },
{ key_stage: 'Arrival' },
{ key_stage: 'Delivered' }
{ key_stage: 'Delivered' },
]
var statusMap = {}
statusList.forEach((item) => {
......@@ -481,21 +500,31 @@
if (item.key_stage === 'OutForDelivery' && item.time_utc) {
progresses.splice(3, 0, { key_stage: item.key_stage })
}
if (item.key_stage === 'AvailableForPickup' && item.time_utc) {
if (
item.key_stage === 'AvailableForPickup' &&
item.time_utc
) {
progresses.splice(3, 0, { key_stage: item.key_stage })
}
})
if (progresses.length === 4) {
progresses.splice(3, 0, {key_stage: 'AvailableForPickup'}, {key_stage: 'OutForDelivery'})
progresses.splice(
3,
0,
{ key_stage: 'AvailableForPickup' },
{ key_stage: 'OutForDelivery' }
)
}
progresses.forEach((item, i) => {
progresses[i].time_utc = statusMap[item.key_stage] && formatDate1(new Date(statusMap[item.key_stage]))
progresses[i].time_utc =
statusMap[item.key_stage] &&
formatDate1(new Date(statusMap[item.key_stage]))
})
var lastStatus = undefined
for (var i = progresses.length - 1; i >= 0; i--) {
if (progresses[i].time_utc) {
lastStatus = progresses[i]
break;
break
}
}
div.appendChild(orderInfo)
......@@ -503,7 +532,9 @@
orderStatus.classList.add('order-status')
orderStatus.innerHTML =
`<div class="status"><span>Status: ${
exceptionTips[iterator.status.code] ? lastStatus.key_stage || '' : iterator.status.name || ''
exceptionTips[iterator.status.code]
? lastStatus.key_stage || ''
: iterator.status.name || ''
}</span></div>` +
`<div class="log-progress"></div>` +
(exceptionTips[iterator.status.code]
......@@ -514,7 +545,9 @@
// 进度条
var logContainer = orderStatus.querySelector('.log-progress')
var progressHtml = ''
const index = progresses.findIndex((item) => item.key_stage === lastStatus.key_stage)
const index = progresses.findIndex(
(item) => item.key_stage === lastStatus.key_stage
)
for (var i = 0; i <= index; i++) {
progresses[i].show = true
}
......@@ -601,10 +634,17 @@
var l = iterator.productList[c]
logisticsTxt += `
<div class="package-info">
<img style="width: 58px" src="${setimgUrl(l.warehouse_sku_image, { w: 60 })}"/>
<img style="width: 58px" src="${setimgUrl(
l.warehouse_sku_image,
{ w: 60 }
)}"/>
<div class="package-msg">
<div style="margin-bottom: 6px;font-family: fangsong;">${l.shop_sku_name || ''}</div>
<span style="font-family: fangsong;">${l.shop_sku || ''}</span>
<div style="margin-bottom: 6px;font-family: fangsong;">${
l.shop_sku_name || ''
}</div>
<span style="font-family: fangsong;">${
l.shop_sku || ''
}</span>
</div>
</div>`
}
......@@ -617,7 +657,7 @@
<div style="margin-bottom: 6px;">
<img style="width: 100px" src="https://res.17track.net/global-v2/imgs/logo/svg/full_owt_296x48.svg?v=3c2ed98eac"/>
</div>
<a style="color: #649EFF;" href="https://t.17track.net/zh-cn#nums=${iterator.trackingNumber}" target="_blank">${iterator.trackingNumber}</a>
<a style="color: #649EFF;" href="https://t.17track.net/en#nums==${iterator.trackingNumber}" target="_blank">${iterator.trackingNumber}</a>
</div>
</div>
</div>`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment