JS線上生成二維碼

OldBoy~發表於2017-05-17

Js程式碼

百度雲公開下載地址:http://pan.baidu.com/s/1nvjTXB7

Html+Php程式碼

<volist name="huodong_list" id="v">
            <script>
            $(document).ready(function(){
             var qrcode = new QRCode(document.getElementById("qrcode_div{$v.id}"), {
                width : 94,//設定寬高
                height : 90
            });
            qrcode.makeCode("http://www.baidu.com/{$v.id}");
            })
        
        </script>
            <div class="item-box">
                <div class="thumbnail">
                   <div class="thumb"> <img src="{$v.img.l}" alt="{$v.name}" width="312px" height="210px"/></div>

                    <div class="mask">
                        <div class="blur"></div>
                        <div class="content">
                            <div><div class="bg_div" id="qrcode_div{$v.id}"></div></div>
                            <p>微信掃描二維碼,檢視詳情</p>
                        </div>
                    </div>
                </div>
                <div class="detail">
                    <h4 style="height:30px;">{$v.name}</h4>

                    <p>{$v.title}</p>

                    <div class="info">
                        <span class="price">¥{$v.money_price}</span>
                        <span class="worth">¥{$v.original_price}</span>
                        <span class="sell">{$v.joins}人已參加</span>
                    </div>
                </div>
            </div>
 </volist>

 

相關文章