| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
- <meta name="format-detection" content="telephone=no">
- <meta name="wap-font-scale" content="no">
- <meta name="keywords" content="海报"/>
- <meta name="description" content="第五创海报" />
- <title>海报</title>
- <!-- <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"></script> -->
- <script type="text/javascript">
- (function() {
- function adapt(designWidth, rem2px){
- var d = window.document.createElement('div');
- d.style.width = '1rem';
- d.style.display = "none";
- var head = window.document.getElementsByTagName('head')[0];
- head.appendChild(d);
- var defaultFontSize = parseFloat(window.getComputedStyle(d, null).getPropertyValue('width'));
- d.remove();
- document.documentElement.style.fontSize = window.innerWidth / designWidth * rem2px / defaultFontSize * 100 + '%';
- var st = document.createElement('style');
- var portrait = "@media screen and (min-width: "+window.innerWidth+"px) {html{font-size:"+ ((window.innerWidth/(designWidth/rem2px)/defaultFontSize)*100) +"%;}}";
- var landscape = "@media screen and (min-width: "+window.innerHeight+"px) {html{font-size:"+ ((window.innerHeight/(designWidth/rem2px)/defaultFontSize)*100) +"%;}}"
- st.innerHTML = portrait + landscape;
- head.appendChild(st);
- return defaultFontSize
- };
- var defaultFontSize = adapt(750, 100);
- })();
- // var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1260943213'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s4.cnzz.com/z_stat.php%3Fid%3D1260943213' type='text/javascript'%3E%3C/script%3E"));
- </script>
- </head>
- <style type="text/css">
- html {
- -webkit-text-size-adjust: 100%;
- height: 100%;
- -webkit-user-select: none;
- }
- html,
- body,
- div,
- ul,
- li,
- p,
- h1,
- h3,
- h4,
- h5,
- figure,
- figcaption {
- margin: 0;
- padding: 0;
- border: 0;
- font-weight: normal
- }
- li {
- list-style: none;
- }
- a {
- text-decoration: none;
- }
- html{
- height: 100%;
- }
- body {
- font-family: "微软雅黑", "Microsoft Yahei";
- position: relative;
- color: #000;
- -webkit-font-smoothing: antialiased;
- height: 100%
- }
- .clear {
- clear: both;
- }
- .d5c-poster {
- width: 100%;
- height: 100%;
- margin: 0;
- padding: 0;
- }
- .d5c-poster__all {
- position: relative;
- width: 100%;
- height: 100%;
- font-size: 0;
- }
- .d5c-poster__img {
- position: absolute;
- top: 0;
- width: 100%;
- }
- .d5c-poster__img img {
- width: 100%;
- font-size: 0;
- z-index: 1;
- }
- .d5c-poster__content {
- position: absolute;
- top: 0.4rem;
- width: 100%;
- padding: 0 0.38rem;
- box-sizing: border-box;
- z-index: 99;
- }
- .d5c-poster__header {
- margin-bottom: 0.6rem;
- }
- .d5c-poster__head {
- float: left;
- width: 0.9rem;
- height: 0.64rem;
- margin-right: 0.2rem;
- border-radius: 0.1rem;
- background-color: rgba(130,130,130,0.7);
- }
- .d5c-poster__head img {
- float: right;
- width: 0.64rem;
- height: 0.64rem;
- border-radius: 0.1rem;
- }
- .d5c-poster__head p {
- color: #fff;
- font-size: 0.14rem;
- margin-left: 0.06rem;
- }
- .d5c-poster__nickname {
- float: left;
- color: #272727;
- }
- .d5c-poster__logo {
- float: right;
- width: 2.02rem;
- }
- .d5c-poster__logo img {
- width: 2.02rem;
- height: 0.7rem;
- }
- .d5c-poster__title {
- font-size: 0.6rem;
- color: #2b2b2b;
- }
- .d5c-poster__desc {
- font-size: 0.4rem;
- color: #2b2b2b;
- margin-top: 0.2rem;
- margin-bottom: 0.6rem;
- }
- .d5c-poster__price {
- font-size: 0.48rem;
- color: #2b2b2b;
- }
- .d5c-poster__price span {
- color: #e32525;
- font-weight: bold;
- }
- .d5c-poster__originPrice {
- margin-top: 0.2rem;
- color: #888888;
- font-size: 0.3rem;
- text-decoration:line-through
- }
- </style>
- <body class="d5c-poster">
- <div class="d5c-poster__all">
- <div class="d5c-poster__img">
- <img src="http://cdn.img.d5c360.com/static/mid_year/image/data0.jpg" />
- </div>
- <div class="d5c-poster__content">
- <div class="d5c-poster__header">
- <div class="d5c-poster__user">
- <div class="d5c-poster__head">
- <img src="http://d5c.oss-cn-shenzhen.aliyuncs.com/static/wx_green.jpg" />
- <div>
- <p>你</p>
- <p>的</p>
- <p>好</p>
- <p>友</p>
- </div>
- </div>
-
- <div class="d5c-poster__nickname">
- <p style="font-size: 0.3rem;">Sunny</p>
- <p style="font-size: 0.18rem;">正在领取...</p>
- </div>
- </div>
- <div class="d5c-poster__logo">
- <img src="http://d5c.oss-cn-shenzhen.aliyuncs.com/static/wx_green.jpg" />
- </div>
- <div class="clear"></div>
- </div>
- <div>
- <h3 class="d5c-poster__title">真功夫 滑溜溜水蛋</h3>
- <h4 class="d5c-poster__desc">现象滑嫰,营养丰富</h4>
- <h3 class="d5c-poster__price">
- <span>0元</span>领取
- </h3>
- <p class="d5c-poster__originPrice">原价16元</p>
- </div>
- <div style="width: 2rem;height: 2rem; float: right;margin-top: 5rem;">
- <img id="qrUrl" src="" style="width: 2rem;height: 2rem;" />
- </div>
- </div>
- </div>
- </body>
- <script type="text/javascript">
- (function () {
- function getUrlArgStr () {
- var q = window.location.search.substr(1);
- var qs = q.split('&');
- var argStr = '';
- if (qs) {
- for (var i = 0;i < qs.length; i++) {
- argStr += qs[i].substring(0,qs[i].indexOf('=')) + '=' + qs[i].substring(qs[i].indexOf('=') + 1) + '&';
- }
- }
- return argStr
- }
- function ajaxGet () {
- var xhr = new XMLHttpRequest();
- if (xhr.withCredentials === undefined) {
- return;
- }
- xhr.open("get", "http://testapi.d5c360.com/v1/activity/poster/2/146", true);
- // xhr.open("get", "http://testapi.d5c360.com/v1/ad/m_home/items", true);
- xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded;charset=UTF-8");
- xhr.send();
- xhr.onreadystatechange = function () {
- if (xhr.readyState !== 4) return;
- if (xhr.status === 200) {
- var data = JSON.parse(xhr.responseText);
- var qr = document.getElementById("qrUrl");
- var imgSrc = qr.setAttribute("src", data.qrcode_url);
- // qr.src = data[0].img;
- console.log(data)
- }
- }
- console.log('有没有执行呢2')
- }
- ajaxGet();
- getUrlArgStr();
- args = getUrlArgStr().split("&")
- console.log(args);
- // function getData () {
- // $.ajax({
- // type: "get",
- // url: "http://testapi.d5c360.com/v1/user/check",
- // dataType: "jsonp",
- // jsonp: "jsonpCallback",
- // success: function (data) {
- // console.log(data);
- // }
- // });
- // }
- // getData();
- })();
- </script>
- </html>
|