<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國際加速解決方案。 廣告
                #### **axml代碼** ``` <form class="carform mg_b10" onSubmit="formSubmit" onReset="formReset"> <view class="list"> <am-vtabs tabs="{{goodsCateList}}" onTabClick="handleChange" data-address-id="{{items.id}}" onChange="onChange" activeTab="{{activeTab}}" sameFontSize="{{false}}" tabBarlineShow="{{false}}"> <vtab-content> <view a:for="{{goodsList[activeTab]}}" a:for-item="items" a:key="key"> <am-input-item type="text" placeholder="{{items.measureunit}}">{{items.goodsname}}:</am-input-item> </view> </vtab-content> </am-vtabs> </view> <view class="fixbtn"> <button loading="{{submitLoading}}" disabled="{{submitLoading}}" formType="submit">下一步</button> </view> </form> ``` ***** #### **js代碼** ``` import stockApi from "/api/impl/stockApi"; Page({ data: { activeTab: 0, goodsCateList:[], goodsList:[], pageList: [], tabs: [ { title: '分類1', anchor: 'a' }, { title: '分類2', anchor: 'b'}, { title: '分類3', anchor: 'c'}, ], category:[ {title:'芽菜', anchor: 'a'}, {title:'白菜',anchor:'a'}, {title:'食用油',anchor:'b'}, {title:'番茄',anchor:'b'} ] }, // 頁面加載 onLoad() { this.getGoodsCateGory(); this.getGoodsList(); }, handleChange(index) { this.setData({ activeTab: index, }); this.afterTabChange(); }, // onChange(index) { // this.setData({ // activeTab: index, // }); // }, // tab發生改變 afterTabChange() { let _this = this; let goodsList = _this.data.goodsList; let activeTab = _this.data.activeTab; let itemList = goodsList[activeTab] ? goodsList[activeTab] : []; if (itemList.length <= 0) { _this.getGoodsList(); } }, onReachBottom() { // 頁面被拉到底部 this.getGoodsList(); }, //獲取商品欄目列表 getGoodsCateGory: function(){ let self = this stockApi.getGoodsCateGory().then(function(res){ let data = res.data self.setData({ goodsCateList: data }) }) }, // 獲取商品列表 getGoodsList: function () { let _this = this; let goodsCateList = _this.data.goodsCateList; let goodsList = _this.data.goodsList; let activeTab = _this.data.activeTab; let itemList = goodsList[activeTab] ? goodsList[activeTab] : []; let page = _this.data.pageList[activeTab] ? _this.data.pageList[activeTab] : 1; let setFiled = 'goodsList[' + activeTab +']'; let setPage = 'pageList[' + activeTab +']'; let params = new Object(); params.page = page; params.cateid = goodsCateList[activeTab] ? goodsCateList[activeTab].id : 0; stockApi.getGoodsList(params).then(res => { let resData = res.data; _this.setData({ [setFiled]: itemList.concat(resData), [setPage]: page + 1 }) }).catch(err => { }) }, }); ```
                  <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>

                              哎呀哎呀视频在线观看