国产真人无码免费视频_亚洲人成在线影院_久天啪天天久久98久久_熟妇又大又爽免费视频 激情五月亚洲综合图区,午夜热门精品一区二区三区,国产综合日产在线播放,国产亚洲日韩欧美在线

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

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

    *.ts
        var that = this;
        wx.request({
          url: 'https://*.*/', //僅為示例,并非真實的接口地址
          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簽名驗簽php函數(shù)

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

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