🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# 商品详情页 ![](https://box.kancloud.cn/2016-08-25_57beacf10b15a.png =300x450) ![](https://box.kancloud.cn/2016-08-25_57beacf12872e.png =300x450) 相关代码如下: ### goods_show_frm.html ``` <!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/> <meta name="format-detection" content="telephone=no,email=no,date=no,address=no"> <link rel="stylesheet" type="text/css" href="../../../css/aui.css" /> <style type="text/css"> .aui-nav .aui-bar-tab { background: #34495E; } .aui-nav .aui-bar-tab li .aui-iconfont, .aui-nav .aui-bar-tab li p { color: #fff; } .aui-nav .aui-bar-tab li.active .aui-iconfont, .aui-nav .aui-bar-tab li.active p { color: #14bd7c; } .aui-nav { background: #ff9900; font-size: 18px; color: #fff; text-align: center; } .aui-nav div { height: 55px; } .aui-nav .buy { line-height: 55px; } .aui-nav p { color: #fff; } .aui-nav .aui-iconfont { font-size: 20px; color: #ffffff; } .blue { background: #eee; } .blue .aui-iconfont, .blue p { color: #999; } .service { background: #eec363; } </style> </head> <body> <header class="aui-bar aui-bar-nav aui-bar-danger" id="aui-header"> <span class="aui-iconfont aui-icon-left aui-pull-left" tapmode onclick="closeWin();"></span> <div class="aui-title">商品详情</div> </header> <footer class="aui-nav" id="aui-footer"> <div class="aui-col-xs-4 buy" id="main" tapmode > 立即购买 <span class="aui-iconfont aui-icon-cart"></span> </div> <div class="aui-col-xs-8"> <div class="aui-col-xs-4 blue" id="collection-btn" tapmode > <span class="aui-iconfont aui-icon-favor"></span> <p id="collection-title">收藏</p> </div> <div class="aui-col-xs-4 blue" tapmode > <span class="aui-iconfont aui-icon-service"></span> <p>咨询</p> </div> <div class="aui-col-xs-4 blue" tapmode > <span class="aui-iconfont aui-icon-comment"></span> <p>点评</p> </div> </div> </footer> </body> <script type="text/javascript" src="../../../script/api.js"></script> <script type="text/javascript"> apiready = function(){ api.parseTapmode(); var header = $api.byId('aui-header'); $api.fixStatusBar(header); var headerPos = $api.offset(header); var body_h = $api.offset($api.dom('body')).h; var footer_h = $api.offset($api.byId("aui-footer")).h; api.openFrame({ name: 'goods_show_frm', url: 'goods_show_frm.html', bounces: true, vScrollBarEnabled:false, hScrollBarEnabled:false, rect: { x: 0, y: headerPos.h, w: 'auto', h: body_h - headerPos.h - footer_h } }); } function closeWin(){ api.closeWin(); } </script> </html> ``` ### goods_show_frm.html ``` <!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/> <meta name="format-detection" content="telephone=no,email=no,date=no,address=no"> <link rel="stylesheet" type="text/css" href="../../../css/aui.css" /> <style type="text/css"> .aui-content, .aui-content-padded { background: #ffffff; } .thumb { position: relative; max-height: 280px; overflow: hidden; margin-bottom: 0; } .thumb > img { width: 100%; } .price-info { width: 100%; position: absolute; bottom: 0; left: 0; background: #ff9900; height: 55px; } .price { margin-left: 15px; color: #ffffff; font-size: 16px; line-height: 55px; } .price strong { font-size: 26px; margin: 0 5px; font-weight: 400; } .price-info .aui-pull-right { height: 55px; width: 35%; background: #ffcc00; padding-top: 10px; text-align: center; } .price-info .aui-pull-right p { color: #ff6600; font-size: 12px; margin-bottom: 0px; } .goods-basic-info { padding: 10px; overflow: hidden; } .goods-title { margin-bottom: 5px; } .aui-tab-nav li.active { color: #ff9900; border-bottom: 2px #ff9900 solid; } .info { padding: 10px; overflow: hidden; margin-bottom: 0; } .info img { width: 100%; } .info p { color: #666; } </style> </head> <body> <section class="aui-content thumb"> <img src="../../../image/demo3.png"> <div class="price-info"> <span class="price">¥<strong>88.88</strong>元</span> <div class="aui-pull-right"> <p style="text-decoration:line-through">原价:66.66 元</p> <p>2016件已售</p> </div> </div> </section> <section class="aui-content goods-basic-info"> <div class="goods-title">商品测试名称商品测试名称商品测试名称商品测试名称商品测试名称商品测试名称</div> <p> <span class="aui-pull-left">快递:0.00元</span> <span class="aui-pull-right">北京海淀</span> </p> </section> <section class="aui-content"> <ul class="aui-user-view"> <li class="aui-user-view-cell aui-img"> <img class="aui-img-object aui-pull-left" src="../../../image/demo3.png"> <div class="aui-img-body aui-arrow-right"> <span>店铺名称</span> <p class='aui-ellipsis-1'>共售出888件</p> </div> </li> </ul> </section> <section class="aui-tab"> <ul class="aui-tab-nav" id="demo1"> <li class="active">产品详情</li> <li>热门点评</li> </ul> </section> <section class="aui-content info"> <p>商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述沙拉汁不够的,可联系客服购买~新鲜非洲冰草3斤装顺丰包邮,偏远地区除外。亲们:现在发货会加冰袋的哦 保证新鲜的哦。</p> <img class="aui-img-object aui-pull-left" src="./image/d4.jpg"> </section> </body> <script type="text/javascript" src="../../../script/api.js"></script> <script type="text/javascript"> apiready = function(){ api.parseTapmode(); } </script> </html> ```