加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
information.html 23.28 KB
一键复制 编辑 原始数据 按行查看 历史
Hacker-xiaozhu 提交于 2022-11-05 15:03 . 完成
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>商品详情</title>
</head>
<link rel="stylesheet" href="css/index.css">
<link rel="stylesheet" href="css/iconfont.css">
<link rel="icon" href="public/imgs/favicon.ico">
<style>
*{
margin: 0 ;
padding: 0;
}
.photo{
width: 360px;
height: 360px;
position: absolute;
left: 0;
top: 25%;
}
.main{
height: 560px;
width: 1226px;
margin: 0 auto;
position: relative;
}
.main-right{
width: 800px;
height: 560px;
float: right;
}
.goods{
margin: 0 auto;
font-size: 40px;
border-bottom: 1px solid black;
background: #8D8D8D;
}
.header{
border-bottom: 1px solid black;
}
.footer{
margin-top: 40px;
}
.title{
color: #b0b0b0;
font-size: 14px;
height: 29px;
}
.price{
height: 40px;
}
.goodsprice{
font-size: 18px;
color: #ff6700;
padding-top: 12px;
padding-bottom: 12px;
}
.address{
width: 700px;
height: 42px;
padding: 30px 50px;
background: #fafafa;
line-height: 42px;
color: #333;
font-size: 14px;
margin-top: 20px;
}
.selected{
width: 740px;
height: 86px;
background: #f9f9fa;
padding: 30px;
}
.total-price{
width: 600px;
height: 80px;
line-height: 80px;
}
button{
width: 300px;
height: 53px;
border:none;
background-color: #ff6700;
text-align: center;
line-height: 53px;
margin-top: 20px;
color: #fff;
font-size: 16px;
cursor: pointer;
}
</style>
<body>
<div class="top-bar">
<div class="wrap">
<ul class="top-bar-left">
<li><a href="#">小米商城</a><span>|</span></li>
<li><a href="#">MIUI</a><span>|</span></li>
<li><a href="#">loT</a><span>|</span></li>
<li><a href="#">云服务</a><span>|</span></li>
<li><a href="#">天星数科</a><span>|</span></li>
<li><a href="#">有品</a><span>|</span></li>
<li><a href="#">小爱开放平台</a><span>|</span></li>
<li><a href="#">企业团购</a><span>|</span></li>
<li><a href="#">资质证照</a><span>|</span></li>
<li><a href="#">协议规则</a><span>|</span></li>
<li>
<a href="#">下载app</a><span>|</span>
<div class="download">
<a href="#">
<img src="public/imgs/download.png" alt="">
<p>小米商城APP</p>
</a>
</div>
</li>
<li><a href="#">智能生活</a><span>|</span></li>
<li><a href="#">Select Location</a></li>
</ul>
<ul class="top-bar-right">
<div class="user-name"></div>
<li><a href="login.html">登录</a><span>|</span></li>
<li><a href="register.html">注册</a><span>|</span></li>
<li><a href="#">消息通知</a></li>
<li class="cart">
<a href="shoppingcar.html">
<i class="iconfont">&#xe653;</i>
购物车(0)
</a>
<div class="cart-list">
购物车中还没有商品,赶紧选购吧!
</div>
</li>
</ul>
</div>
</div>
<div class="header">
<div class="container wrap">
<div class="header-logo">
<a href="index.html"> <img src="public/imgs/logo-mi2.png"></a>
</div>
<div class="nav-bar">
<ul>
<li>
<a href="#">小米手机</a>
<div class="nav-list">
<div class="wrap">
<ul>
<li>
<a href="#">
<div class="img-box">
<img src="public/imgs/12pro.webp" alt="">
</div>
<p class="title1">小米11 Pro</p>
<p class="price">4499元起</p>
</a>
</li>
<li>
<a href="#">
<div class="img-box">
<img src="public/imgs/12pro.webp" alt="">
</div>
<p class="title1">小米11 Pro</p>
<p class="price">4499元起</p>
</a>
</li>
<li>
<a href="#">
<div class="img-box">
<img src="public/imgs/12pro.webp" alt="">
</div>
<p class="title1">小米11 Pro</p>
<p class="price">4499元起</p>
</a>
</li>
<li>
<a href="#">
<div class="img-box">
<img src="public/imgs/12pro.webp" alt="">
</div>
<p class="title1">小米11 Pro</p>
<p class="price">4499元起</p>
</a>
</li>
<li>
<a href="#">
<div class="img-box">
<img src="public/imgs/12pro.webp" alt="">
</div>
<p class="title1">小米11 Pro</p>
<p class="price">4499元起</p>
</a>
</li>
<li>
<a href="#">
<div class="img-box">
<img src="public/imgs/12pro.webp" alt="">
</div>
<p class="title1">小米11 Pro</p>
<p class="price">4499元起</p>
</a>
</li>
</ul>
</div>
</div>
</li>
<li>
<a href="#">Redmi红米</a>
<div class="nav-list">
<div class="wrap">
<ul>
<li>
<a href="#">
<div class="img-box">
<img src="public/imgs/12pro.webp" alt="">
</div>
<p class="name1">小米11 Pro</p>
<p class="price1">4499元起</p>
</a>
</li>
<li>
<a href="#">
<div class="img-box">
<img src="public/imgs/12pro.webp" alt="">
</div>
<p class="name1">小米11 Pro</p>
<p class="price1">4499元起</p>
</a>
</li>
<li>
<a href="#">
<div class="img-box">
<img src="public/imgs/12pro.webp" alt="">
</div>
<p class="name1">小米11 Pro</p>
<p class="price1">4499元起</p>
</a>
</li>
<li>
<a href="#">
<div class="img-box">
<img src="public/imgs/12pro.webp" alt="">
</div>
<p class="name1">小米11 Pro</p>
<p class="price1">4499元起</p>
</a>
</li>
<li>
<a href="#">
<div class="img-box">
<img src="public/imgs/12pro.webp" alt="">
</div>
<p class="name1">小米11 Pro</p>
<p class="price1">4499元起</p>
</a>
</li>
<li>
<a href="#">
<div class="img-box">
<img src="public/imgs/12pro.webp" alt="">
</div>
<p class="name1">小米11 Pro</p>
<p class="price1">4499元起</p>
</a>
</li>
</ul>
</div>
</div>
</li>
<li><a href="#">电视</a></li>
<li><a href="#">笔记本</a></li>
<li><a href="#">家电</a></li>
<li><a href="#">路由器</a></li>
<li><a href="#">智能硬件</a></li>
<li><a href="#">服务</a></li>
<li><a href="#">社区</a></li>
</ul>
</div>
</div>
</div>
<div class="main">
<img src="" alt="" class="photo">
<div class="main-right">
<h1 class="name"></h1>
<p class="title"></p>
<p style="color: #ff6700;margin-top: 10px" >小米自营</p>
<p class="goodsprice"></p>
<hr>
<div class="address">四川省&nbsp;&nbsp;南充市&nbsp;&nbsp;营山县</div>
<h3 style="margin-top: 10px">选择颜色</h3>
<div style="width:292px;height: 42px;border: #ff6700 solid 1px;margin-top: 10px;color: #ff6700;cursor: pointer;text-align: center;line-height: 42px"></div>
<div class="selected">
<span class="name" style="color: #616161;margin-top: 40px"></span>
<span class="goodsprice" style="float: right;padding: 0"></span>
<div class="total-price">
<span style="color: #ff6700;font-size: 24px;">总计:</span>
<span class="goodsprice" style="margin-left: 20px"></span>
</div>
</div>
<button>加入购物车</button>
</div>
</div>
<div class="footer">
<div class="site-footer">
<div class="wrap">
<div class="footer-service">
<ul>
<li>
<a href="#">
<i class="iconfont">&#xe629;</i>
<span>预约维修</span>
</a>
</li>
<li>
<a href="#">
<i class="iconfont">&#xe63f;</i>
<span>7天无理由退换货</span>
</a>
</li>
<li>
<a href="#">
<i class="iconfont">&#xe606;</i>
<span>15天免费换货</span>
</a>
</li>
<li>
<a href="#">
<i class="iconfont">&#xe62b;</i>
<span>满69元包邮</span>
</a>
</li>
<li>
<a href="#">
<i class="iconfont">&#xe64d;</i>
<span>520余家售后网点</span>
</a>
</li>
</ul>
</div>
<div class="footer-links">
<ul>
<li>
帮助中心
</li>
<li>
<a href="#">账户管理</a>
</li>
<li>
<a href="#">账户管理</a>
</li>
<li>
<a href="#">账户管理</a>
</li>
</ul>
<ul>
<li>
帮助中心
</li>
<li>
<a href="#">账户管理</a>
</li>
<li>
<a href="#">账户管理</a>
</li>
<li>
<a href="#">账户管理</a>
</li>
</ul>
<ul>
<li>
帮助中心
</li>
<li>
<a href="#">账户管理</a>
</li>
<li>
<a href="#">账户管理</a>
</li>
<li>
<a href="#">账户管理</a>
</li>
</ul>
<ul>
<li>
帮助中心
</li>
<li>
<a href="#">账户管理</a>
</li>
<li>
<a href="#">账户管理</a>
</li>
<li>
<a href="#">账户管理</a>
</li>
</ul>
<ul>
<li>
帮助中心
</li>
<li>
<a href="#">账户管理</a>
</li>
<li>
<a href="#">账户管理</a>
</li>
<li>
<a href="#">账户管理</a>
</li>
</ul>
<ul>
<li>
帮助中心
</li>
<li>
<a href="#">账户管理</a>
</li>
<li>
<a href="#">账户管理</a>
</li>
<li>
<a href="#">账户管理</a>
</li>
</ul>
<div class="contact">
<p class="tel">400-100-5678</p>
<p class="time">8:00-18:00(仅收市话费)</p>
<a href="#" class="kefu">
<i class="iconfont">&#xe710;</i>
人工客服
</a>
<p class="follow">
<img src="public/imgs/logo-mi2.png">
下载小米商城app
</p>
</div>
</div>
</div>
</div>
<div class="site-info">
<div class="wrap">
<div class="footer-logo">
<img src="public/imgs/logo-mi2.png" alt="">
</div>
<div class="sites">
<p>
<a rel="nofollow" href="//www.mi.com/index.html" target="_blank">小米商城</a>
<span class="sep">|</span>
<a rel="nofollow" href="//www.miui.com/" target="_blank">MIUI</a>
<span class="sep">|</span>
<a rel="nofollow" href="//home.mi.com/index.html" target="_blank">米家</a>
<span class="sep">|</span>
<a rel="nofollow" href="http://www.miliao.com/" target="_blank">米聊</a>
<span class="sep">|</span>
<a rel="nofollow" href="//www.duokan.com/" target="_blank">多看</a>
<span class="sep">|</span>
<a rel="nofollow" href="//game.xiaomi.com/" target="_blank">游戏</a>
<span class="sep">|</span>
<a rel="nofollow" href="//b.mi.com/?client_id=180100031058&masid=17409.0358" target="_blank">政企服务</a>
<span class="sep">|</span>
<a rel="nofollow" href="//xiaomi.tmall.com/" target="_blank">小米天猫店</a>
<span class="sep">|</span>
<a rel="nofollow" href="//privacy.mi.com/all/zh_CN/" target="_blank">小米集团隐私政策</a>
<span class="sep">|</span>
<a rel="nofollow" href="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/f516fe9e2c01.html" target="_blank">小米公司儿童信息保护规则</a>
<span class="sep">|</span>
<a rel="nofollow" href="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/ded8d0e4a77d.html" target="_blank">小米商城隐私政策</a>
<span class="sep">|</span>
<a rel="nofollow" href="//www.mi.com/about/user-agreement/" target="_blank">小米商城用户协议</a>
<span class="sep">|</span>
<a rel="nofollow" href="//static.mi.com/feedback/" target="_blank">问题反馈</a>
<span class="sep">|</span>
<a rel="nofollow" href="javascript:void(0);" class="J_siteGlobalRegion">Select Location</a>
<br>
<a rel="nofollow" href="http://www.mi.com/beihu" target="_blank">北京互联网法院法律服务工作站</a>
<span class="sep">|</span>
<a rel="nofollow" href="http://www.cca.org.cn/" target="_blank">中国消费者协会</a>
<span class="sep">|</span>
<a rel="nofollow" href="http://www.bj315.org/" target="_blank">北京市消费者协会</a>
</p>
<p>
©
<a href="javascript:;" target="_blank" title="mi.com">mi.com</a> 京ICP证110507号
<a href="http://beian.miit.gov.cn/" target="_blank" rel="nofollow">京ICP备10046444号</a>
<a rel="nofollow" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010802020134" target="_blank">京公网安备11010802020134号</a>
<a href="//www.mi.com/culture-license/" target="_blank">京网文[2020]0276-042号</a>
<br>
<a href="//www.mi.com/medical/record/" target="_blank">(京)网械平台备字(2018)第00005号</a>
<a href="//www.mi.com/medical/qualification/" target="_blank">互联网药品信息服务资格证 (京)-非经营性-2014-0090</a>
<a href="//www.mi.com/business-license/" target="_blank">营业执照</a>
<a href="//www.mi.com/medical/list/" target="_blank">医疗器械质量公告</a>
<br>
<a href="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/e0c7d4cf3b7cd88de10196e30c92e020.png" target="_blank">增值电信业务许可证</a>&nbsp;网络食品经营备案 京食药网食备202010048 &nbsp;
<a href="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/c6859168166651511897f54fa1047fe3.png" target="_blank">食品经营许可证</a>
<br>
违法和不良信息举报电话:171-5104-4404&nbsp;<a href='https://www.mi.com/intellectual' target="_blank">知识产权侵权投诉</a>&nbsp;本网站所列数据,除特殊说明,所有数据均出自我司实验室测试
</p>
<p>
<img src="public/imgs/15.png" alt="">
<img src="public/imgs/16.png" alt="">
<img src="public/imgs/17.png" alt="">
<img src="public/imgs/18.png" alt="">
<img src="public/imgs/19.png" alt="">
</p>
</div>
<img src="public/imgs/slogan2020.png" alt="" class="slogan">
</div>
</div>
</div>
<script type="text/javascript">
const xhr=new XMLHttpRequest()
const photo = document. querySelector ('.photo')
const name=document.querySelectorAll('.name')
const title=document.querySelector('.title')
const btn=document.querySelector('button')
const page=document.querySelector('.page-main-s')
const goodsprice=document.querySelectorAll('.goodsprice')
xhr.onreadystatechange = function() {
HTMLAllCollection
if (xhr.readyState === 4 && xhr.status === 200) {
const {data:res} =JSON.parse(xhr.responseText)
console.log(res)
photo.src=res.product_picture
name[0].innerHTML=res.product_name
name[1].innerHTML=res.product_name
title.innerHTML=res.product_intro
goodsprice[0].innerHTML=res.product_price+""
goodsprice[1].innerHTML=res.product_price+""
goodsprice[2].innerHTML=res.product_price+""
btn.onclick=function (){
const xhr8=new XMLHttpRequest()
const userid=localStorage.getItem('userid')
xhr8.open('POST', 'http://43.138.138.11:1110/api/order/'+userid+'/'+id, true)
xhr8.send();
xhr8.onreadystatechange = function () {
if (xhr8.readyState === 4 && xhr8.status === 200) {
console.log(xhr8.responseText)
location.href='shoppingcar.html'
}
}
}
}
}
const id = localStorage.getItem('product_id')
xhr.open('Get','http://43.138.138.11:1110/api/product/'+id,true)
xhr.send(null)
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化