Commit bc3ee07a authored by christ's avatar christ

share

parent e91ee74e
...@@ -6,13 +6,15 @@ ...@@ -6,13 +6,15 @@
<title></title> <title></title>
<style type="text/css"> <style type="text/css">
html,body,p,span,div,img{margin:0;padding:0;}body{width:750px;} html,body,p,span,div,img{margin:0;padding:0;}body{width:750px;}
.shareC { width:750px;padding:0; text-align:center;font-family:"黑体";color:#212121;} .shareC { width:750px; padding:0; text-align:center;font-family:"黑体";color:#212121;}
.avatar{padding:55px 55px 20px 55px;} .header{background:url(/data/img/headerBg.png);padding-top:100px; height:415px; }
#headerBg{width:600px; height:500px;} .bgBD{width:162px; height:162px;background-color:white;border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%;margin:0 auto;}
#title{font-size:34px; } #headerBg{width:160px; height:160px;border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%;margin:1px;}
#title{ font-size:28px; line-height:36px; padding:0 110px 0 110px; height:72px;display:block; display:-webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;overflow:hidden;text-overflow:ellipsis;} #title{font-size:34px; margin-top:24px;}
.price{color:#ff8519;font-size:46px;} .address{ font-size:28px; line-height:36px; padding:50px 110px 0 110px; height:108px;display:block; display:-webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;overflow:hidden;text-overflow:ellipsis;}
.price #price{font-size:34px; text-decoration:line-through;} .noticePart{ width:560px;margin:16px auto 0 auto; background:url(/data/img/noticeBg.png);}
.noticePart p{height:44px; font-size:20px; line-height:22px; padding:68px 28px 32px 28px; }
#notice{ max-width:504px;display:block; display:-webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;overflow:hidden;text-overflow:ellipsis;}
.qrcode{background:url(/data/img/flower.png); height:488px; margin:6px auto 0 auto;} .qrcode{background:url(/data/img/flower.png); height:488px; margin:6px auto 0 auto;}
#qrImg {margin-top:80px;} #qrImg {margin-top:80px;}
#qrcodeImg img { margin: 0 auto;} #qrcodeImg img { margin: 0 auto;}
...@@ -22,14 +24,17 @@ ...@@ -22,14 +24,17 @@
</head> </head>
<body> <body>
<div class="shareC"> <div class="shareC">
<div class="avatar"> <div class="header">
<img id="headerBg" src="" /> <div class="bgBD">
<img src="" id="headerBg" />
</div>
<p id="title"></p>
<p class="address">地址:<span id="address"></span></p>
</div> </div>
<div id="title"></div> <div class="noticePart">
<div class="price"> <p>
<img src="/data/img/sale.png" /> <span id="notice"></span>
<span id="discount" ></span> </p>
<span id="price"></span>
</div> </div>
<div class="qrcode" id="qrcode"> <div class="qrcode" id="qrcode">
<img id="qrImg" src="" /> <img id="qrImg" src="" />
...@@ -48,23 +53,18 @@ ...@@ -48,23 +53,18 @@
headerBg : "<?php echo $params['imgUrl'];?>", headerBg : "<?php echo $params['imgUrl'];?>",
url : "<?php echo $params['qrCode'];?>", url : "<?php echo $params['qrCode'];?>",
qrImg : "<?php echo $params['qrCode'];?>", qrImg : "<?php echo $params['qrCode'];?>",
title : "<?php echo $params['desc'];?>", title : "<?php echo $params['storeName'];?>",
price : "<?php echo $params['price'];?>", address : "<?php echo $params['address'];?>",
discount : "<?php echo $params['dicountPrice'];?>", notice : "<?php echo $params['desc'];?>"
}; };
if(pageObj.notice==null || pageObj.notice=="") if(pageObj.notice==null || pageObj.notice=="")
pageObj.notice="暂无公告"; pageObj.notice="暂无公告";
var excute = ["title"]; var excute = ["title","address","notice"];
excute.forEach(function(v,i){ excute.forEach(function(v,i){
document.getElementById(v).innerHTML = pageObj[v]; document.getElementById(v).innerHTML = pageObj[v];
}); });
document.getElementById("headerBg").src = pageObj.headerBg; document.getElementById("headerBg").src = pageObj.headerBg;
document.getElementById("discount").innerHTML = "<span style='font-size:30px;'>¥</span>"+(pageObj.discount / 100).toFixed(2); new QRCode(document.getElementById('qrcodeImg'), pageObj.url);
if(pageObj.price != pageObj.discount)
document.getElementById("price").innerHTML = "<span style='font-size:30px;'>¥</span>"+(pageObj.price / 100).toFixed(2);
document.getElementById("qrImg").src = pageObj.qrImg;
// if(pageObj.type<=2){ // if(pageObj.type<=2){
// document.getElementById("qrImg").src = pageObj.qrImg;} // document.getElementById("qrImg").src = pageObj.qrImg;}
// else{ // else{
......
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