<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之旅 廣告
                ## wx.request(OBJECT) >[danger]wx.request發起的是 HTTPS 請求。 ### index.js ~~~ //獲取應用實例 var app = getApp() Page({ data: { indicatorDots:true, autoplay:true, interval:5000, duration:1000, banner: [] }, onLoad: function () { var that = this //調用應用實例的方法獲取全局數據 reda(this,'banner'); } }) function reda(_self,type){ wx.request({ url: 'http://127.0.0.1/miniApp/my_app.php?type='+type, //僅為示例,并非真實的接口地址 header: { 'content-type': 'application/json' }, success: function(res) { console.log(res.data); _self.setData({ "banner":res.data.results, }); } }) } ~~~ >訪問的網絡接口: 如果是有 `AppID` 進行開發的必須配置網絡服務器,同時接口地址請求必須是 `HTTPS` 請求, 本地測試如示例可以使用 `http://127.0.0.1/demo/API` ### 接口規則: 使用PHP來傳送數據,轉換為json數據: ~~~ <?php if(!isset($_GET['id']) || empty($_GET['id'])) { echo jsonFormat(array('error_code'=>300,'info'=>'請求失敗')); } if($_GET['id']=='1') { $detail = array( 'id'=>'1', 'title'=>"詳情1", 'img'=>"http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg", 'content'=>"框架的視圖層" ); } $detail = array('error_code'=>200,'results'=>$detail); echo json_encode($detail); ?> ~~~ ### 模版調用: 示例中將 `{{banner}}` 映射為 `item`,來分別使用接口傳送的數據 ~~~ <view class="container"> <view class="page"> <view class="section section_gap" wx:for="{{banner}}" wx:for-item="item"> <navigator url="{{item.url}}" class="img"> <view class="section__ctn"> <image class="section_img" src="{{item.img_path}}"></image> </view> <view class="section__title">{{item.title}}</view> </navigator> </view> </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>

                              哎呀哎呀视频在线观看