fusenapi/server/backend/template/products.tpl

129 lines
6.2 KiB
Smarty
Raw Normal View History

2023-06-27 10:09:56 +00:00
{{$product_num := len .products}}
{{$page := 3}}
{{$page_total := add $page $product_num}}
{{range $arr := .products}}
{{$price := json_decode $arr.price_info}}
{{$price_html := .priceHtml}}
{{$price_html}}
{{if gt $arr.is_gift 0 }}{{/* */}}
<div class="box">
<div style="position: relative; margin-bottom: 30px;">
<p class="f-m" style="font-size: 39px; font-weight: 800; margin-bottom: 12px; line-height: 32px;">{{$arr.name}}</p>
<p class="f-b" style="font-size: 25px; font-weight: 800;line-height: 19px;">{{$arr.size}}</p>
<div class="logo">
<img src="https://fusenapi.kayue.cn:8010/storage/pdf/logo.svg" alt="logo">
</div>
</div>
<div class="img-box" style="height: 611px;margin-bottom: 32px; overflow: hidden;">
<div class="img" style="background-image: url({{$arr.img}});"></div>
</div>
<div>
<div class="pr-card big">
<p class="pr">FREE!</p>
<p class="num">{{$arr.num}}<span> Units</span></p>
</div>
<div>
<div class="card-box" style="display: inline-block;width: 183px;line-height: 36px;padding-left: 16px;margin-bottom: 4px;background-color: #C2C5CB;font-size: 18px; font-weight: 500;">Lead Time</div>
<div class="card-box" style="display: inline-block;width: 183px;height: 52px; padding-left: 15px;margin-bottom: 8px;background-color: #E0E2EB; font-weight: 600;">
<span style="font-size: 35px;line-height: 52px;">{{$arr.cycle}}</span><span style="font-size: 26px;line-height: 52px;">Days</span>
</div>
<div class="card-box more-card">
<span class="free">FREE </span><span class="text">Design</span>
</div>
<div class="card-box more-card">
<span class="free">FREE </span><span class="text">Storage</span>
</div>
<div class="card-box more-card" style="margin-bottom: 0;">
<span class="free">FREE </span><span class="text">Shipping</span>
</div>
</div>
</div>
</div>
{{else}}{{/* */}}
{{if $arr.size}}
// 有尺寸的
<div class="box">
<div style="position: relative; margin-bottom: 30px;">
<p class="f-m" style="font-size: 39px; font-weight: 800; margin-bottom: 12px; line-height: 32px;">{{$arr.name}}</p>
<p class="f-b" style="font-size: 25px; font-weight: 800;line-height: 19px;">{{$arr.size}}</p>
<div class="logo">
<img src="https://fusenapi.kayue.cn:8010/storage/pdf/logo.svg" alt="logo">
</div>
</div>
<div class="img-box" style="height: 611px;margin-bottom: 32px; overflow: hidden;">
<div class="img"
style="background-image: url({{$arr.img}});"></div>
</div>
<div>
<div class="card-box"
style="float: left; width: 530px;line-height: 36px;padding-left: 19px;margin-right: 8px;margin-bottom: 4px;background-color: #C2C5CB;font-size: 18px; font-weight: 500;">Unit Price (Tax included)</div>
<div class="card-box"
style="display: inline-block;width: 183px;line-height: 36px;padding-left: 16px;margin-bottom: 4px;background-color: #C2C5CB;font-size: 18px; font-weight: 500;">
Lead Time</div>
{{$price_html}}
<div>
<div class="card-box"
style="display: inline-block;width: 183px;height: 52px; padding-left: 15px;margin-bottom: 8px;background-color: #E0E2EB; font-weight: 600;">
<span style="font-size: 35px;line-height: 52px;">{{$arr.cycle}}</span><span
style="font-size: 26px;line-height: 52px;">Days</span>
</div>
<div class="card-box more-card">
<span class="free">FREE </span><span class="text">Design</span>
</div>
<div class="card-box more-card">
<span class="free">FREE </span><span class="text">Storage</span>
</div>
<div class="card-box more-card" style="margin-bottom: 0;">
<span class="free">FREE </span><span class="text">Shipping</span>
</div>
</div>
</div>
</div>
{{else}}
<div class="box">
<div style="position: relative; margin-bottom: 32px;">
<p class="f-m" style="font-size: 39px; font-weight: 800; margin-bottom: 3px; line-height: 32px;">
{{$arr.name}}</p>
<div class="logo">
<img src="https://fusenapi.kayue.cn:8010/storage/pdf/logo.svg" alt="logo">
</div>
</div>
<div class="img-box" style="height: 641px;margin-bottom: 31px; overflow: hidden;">
<div class="img" style="background-image: url({{$arr.img}});">
</div>
</div>
<div>
<div class="card-box"
style="float: left;width: 530px;line-height: 36px;padding-left: 19px;margin-right: 8px;margin-bottom: 4px;background-color: #C2C5CB;font-size: 18px; font-weight: 500;">
Unit Price (Tax included)</div>
<div class="card-box"
style="display: inline-block;width: 183px;line-height: 36px;padding-left: 16px;margin-bottom: 4px;background-color: #C2C5CB;font-size: 18px; font-weight: 500;">
Lead Time</div>
{{$price_html}}
<div>
<div class="card-box"
style="display: inline-block;width: 183px;height: 52px; padding-left: 15px;margin-bottom: 8px;background-color: #E0E2EB; font-weight: 600;">
<span style="font-size: 35px;line-height: 52px;">{{$arr.cycle}}</span><span
style="font-size: 26px;line-height: 52px;">Days</span>
</div>
<div class="card-box more-card">
<span class="free">FREE </span><span class="text">Design</span>
</div>
<div class="card-box more-card">
<span class="free">FREE </span><span class="text">Storage</span>
</div>
<div class="card-box more-card" style="margin-bottom: 0;">
<span class="free">FREE </span><span class="text">Shipping</span>
</div>
</div>
</div>
</div>
{{end}}
{{end}}
<div class="page-box" style="background-color: rgba(125, 125, 125, 0.16);color: #000;text-align: center;height: 50px;line-height: 50px;margin-top: 30px;">{{$page}}/{{$page_total}}</div>
{{$page = add $page 1}}
{{end}}