這篇文章給大家分享的是有關(guān)微信公眾號開發(fā)weui的示例分析的內(nèi)容。小編覺得挺實用的,因此分享給大家做個參考,一起跟隨小編過來看看吧。
創(chuàng)新互聯(lián)建站專業(yè)為企業(yè)提供吉州網(wǎng)站建設(shè)、吉州做網(wǎng)站、吉州網(wǎng)站設(shè)計、吉州網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計與制作、吉州企業(yè)網(wǎng)站模板建站服務(wù),10年吉州做網(wǎng)站經(jīng)驗,不只是建網(wǎng)站,更提供有價值的思路和整體網(wǎng)絡(luò)服務(wù)。
微信公眾號開發(fā)weui使用心得,避免少犯錯!
特別注意:
如果使用 jquery,則 jquery.js 一定要放在 <body> 的最后面,否則 weui 不起作用。
引用部分 weui
只需要加載 weui.css 即可
{% load staticfiles %} <link rel="stylesheet" href="{% static "joyroost/css/weui.css" %}"/>
引用 weui 整個例子框架
head link css <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0"> <title>WeUI</title> {% load staticfiles %} <link rel="stylesheet" href="{% static "joyroost/css/weui.css" %}"/> <link rel="stylesheet" href="{% static "joyroost/css/example.css" %}"/> </head>
body 最后寫上 js
<script src="{% static "joyroost/js/weui/zepto.min.js" %}"></script> <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> <script src="https://res.wx.qq.com/open/libs/weuijs/1.0.0/weui.min.js"></script> <script src="{% static "joyroost/js/weui/example.js" %}"></script>
weui 結(jié)構(gòu)
<script type="text/html" id="tpl_home"> <div class="page"> <div class="page__hd"> <div class="page__bd"> <div class="page__ft">
注意事項:
如果 page 的上面不寫 id="tpl_home" 就會報錯
<script type="text/html" id="tpl_home"> <div class="page">
報錯如下:
Uncaught TypeError: Cannot set property 'url' of undefined at setPageManager (example.js:264) at init (example.js:289) at example.js:296 at HTMLDocument.<anonymous> (zepto.min.js:1)
下面是在 chromium 中報錯圖:
感謝各位的閱讀!關(guān)于“微信公眾號開發(fā)weui的示例分析”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,讓大家可以學(xué)到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!
網(wǎng)站欄目:微信公眾號開發(fā)weui的示例分析
當前路徑:http://jinyejixie.com/article10/gpssdo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供營銷型網(wǎng)站建設(shè)、、搜索引擎優(yōu)化、品牌網(wǎng)站建設(shè)、網(wǎng)站收錄、定制網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)