<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [TOC] ## 1. onLoad與onShow 1. onLoad負責頁面數據加載初始化,onShow頁面展現調用,兩者都可用于頁面初始化 2. onLoad先于onShow執行 3. onShow只要打開頁面就會執行,而onLoad只會在頁面初始化的時候執行。利用onShow,可以做返回頁面刷新。 4. 返回和tabbar切換都不會引起頁面初始化,所以onLoad不會執行,onShow會執行 ## 2. 上下拉刷新 onPullDownRefresh和onReachBottom兩個事件函數監聽下拉和上拉事件函數 ~~~ data: { enterpriseList: [], pageNo: 1, //頁數 pageSize: 10, // 條數 }, /** * 頁面相關事件處理函數--監聽用戶下拉動作 */ onPullDownRefresh: function() { this.setData({ //刷新操作初始化數據 pageNo: 1, list: [], isEmpty: true }) this.queryData(); //查詢數據 }, /** * 頁面上拉觸底事件的處理函數 */ onReachBottom: function() { var pageNum = this.data.pageNo; if (pageNum < this.data.totalPageCnt) { this.setData({ pageNo: pageNum + 1 //設置下一頁 }) this.queryData(); //查詢數據 } else { wx.showToast({ title: "沒有更多數據了", duration: 1000, icon: 'none', mask: true }) } }, // 查詢數據方法 //查詢數據 queryData: function() { var that = this; var pageNo = this.data.pageNo; var pageSize = this.data.pageSize; wx.showLoading({ title: '加載中...', }); wx.request({ url: app.globalData.pubSiteUrl + 'pubsite-company/companylist', //上線的話必須是https,沒有appId的本地請求貌似不受影響 ... }, // 設置請求的 header data: { pageIndex: pageNo, pageSize: pageSize }, success: function(res) { wx.hideLoading(); //隱藏加載中提示 }, fail: function() { wx.hideLoading(); //隱藏加載中提示 wx.showToast({ title: "請求失敗!", duration: 1000, icon: 'none', mask: true }) }, complete: function() { // complete } }) }, ~~~ ## 3. MD5加密 密碼加密 1. md5.js(放入小程序項目) ~~~ /* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. * Version 1.1 Copyright (C) Paul Johnston 1999 - 2002. * Code also contributed by Greg Holt * See http://pajhome.org.uk/site/legal.html for details. */ /* * Add integers, wrapping at 2^32. This uses 16-bit operations internally * to work around bugs in some JS interpreters. */ function safe_add(x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF) var msw = (x >> 16) + (y >> 16) + (lsw >> 16) return (msw << 16) | (lsw & 0xFFFF) } /* * Bitwise rotate a 32-bit number to the left. */ function rol(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)) } ... /* * External interface */ function hexMD5(str) { return binl2hex(coreMD5(str2binl(str))) } function hexMD5w(str) { return binl2hex(coreMD5(strw2binl(str))) } function b64MD5(str) { return binl2b64(coreMD5(str2binl(str))) } function b64MD5w(str) { return binl2b64(coreMD5(strw2binl(str))) } /* Backward compatibility */ function calcMD5(str) { return binl2hex(coreMD5(str2binl(str))) } module.exports = { // 暴露接口,并執行調用名 md5: hexMD5 } ~~~ 1. 使用md5.js 在對應頁面的js文件當中: 1. 連接md5.js文件 var utilMd5 = require('../../../utils/md5.js'); 2. 調用 utilMd5.md5(oldPwd);
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看