<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                * 在調用頁的json中加入屬性 ~~~ "enablePullDownRefresh": true, "backgroundTextStyle": "dark", ~~~ * 頁面的初始數據 ~~~ PIN: 1, next: 1, list: [], list_cache: [], down_note: '', loading: 0, ~~~ * onLoad 生命周期函數--監聽頁面加載 ~~~ this.up(); ~~~ * 頁面相關事件處理函數--監聽用戶下拉動作 ~~~ //>頁面相關事件處理函數--監聽用戶下拉動作 onPullDownRefresh: function () { this.up(); wx.stopPullDownRefresh(); }, ~~~ * 頁面上拉觸底事件的處理函數 ~~~ //>頁面上拉觸底事件的處理函數 onReachBottom: function () { this.down(); }, ~~~ * 刷新初始化 ~~~ up(){ if(this.data.loading == 1){ wx.showToast({ title: '加載中,請稍后', icon: 'error', duration: 1000 }); return false; } let arr = {}; arr.PIN = 1; arr.list = []; arr.loading = 1; this.setData(arr); this.load_data(); }, ~~~ * 加載初始化 ~~~ down() { if(this.data.PIN == this.data.next){ let arr = {}; arr.down_note = '我是有底線的~'; this.setData(arr); return false; } if(this.data.loading == 1){ wx.showToast({ title: '加載中,請稍后', icon: 'error', duration: 1000 }); return false; } let arr = {}; arr.PIN = this.data.next; arr.down_note = '加載中'; arr.loading = 1; this.setData(arr); this.load_data(); }, ~~~ * 數據通信 ~~~ load_data() { let that = this; let data = {}; data.u_id = this.data.u_id; data.PIN = this.data.PIN; app.globalData.net('url',data).then(res => { let arr = {}; if(!res.succeed){ arr.loading \= 0; that.setData(arr); return false; } let option = Number(res.option); arr.next = res.next; arr.PIN = res.PIN; arr.list_cache = res.list; res.list.length <= 0 ? arr.down_note = (option == 1 ? '暫無數據' : '我是有底線的~') : null; that.setData(arr); setTimeout(() => { that.load_list(); }, 1000); }); }, ~~~ * 渲染數據 ~~~ load_list(){ let arr = {}; let list_cache = this.data.list_cache; if(list_cache.length <= 0){ this.data.down_note == '暫無數據' ? null : arr.down_note = ''; arr.loading = 0; this.setData(arr); return false; } let list = this.data.list; list.push(list_cache[0]); list_cache.shift(list_cache[0]); arr.list = list; arr.list_cache = list_cache; this.setData(arr); setTimeout(() => { this.load_list(); }, 100); }, ~~~ * 模板 ~~~ <view class="list" wx:for="{{list}}" wx:key="index"> </view> <view class="more" wx:if="{{down_note != ''}}"><view>{{down_note}}</view></view> ~~~
                  <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>

                              哎呀哎呀视频在线观看