免费电影在线影视网站-久久精品影院 成人精品国产亚洲欧洲-亚洲精品天堂成人片?V在线播放-国产免费一区二区三区-欧美成人片一区二区三区-国产一级特黄在线播放-国产看无码特级毛片-日本一区二区免费精品观看-精品一区二区三区高清免费观看

小程序數(shù)據(jù)請求、獲取數(shù)據(jù)處理基本邏輯

2022/3/2 19:39:45186 閱讀

    *.ts
        var that = this;
        wx.request({
          url: 'https://*.*/', //僅為示例,并非真實的接口地址
          data: {
            id: '1',
            par: 'news'
          },
          header: {
            'content-type': 'application/json' // 默認值
          },
          method: 'post',
          success(res) {
            var idata = res.data;
            that.setData({
              par: idata['par'],
              id: idata['id'],
            })
          },
          fail: function (res) { },
          complete: function (res) { }
        })

    *.wxml

    <view wx:for="{{par}}" wx:for-index="index" wx:for-item="itemName" class="pro_list">
      <view class="pro_title">
        {{par[index]}}
      </view>
      <view class="pro_title">
        {{id[index]}}
      </view>
    </view>

    下一條:iis8+整站301重定向到指定站點

    上一條:支付寶rsa2簽名驗簽php函數(shù)

棗莊西橋網(wǎng)絡(luò)微信小程序微信小程序

棗莊西橋網(wǎng)絡(luò)手機站二維碼掃描手機瀏覽