国产精品网站在线观看免费传媒,国产强被迫伦姧无码,欧 国产成人欧美一区二区三区vr_制服丝袜在线日韩_丝瓜

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

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

    *.ts
        var that = this;
        wx.request({
          url: 'https://*.*/', //僅為示例,并非真實(shí)的接口地址
          data: {
            id: '1',
            par: 'news'
          },
          header: {
            'content-type': 'application/json' // 默認(rèn)值
          },
          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重定向到指定站點(diǎn)

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

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

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