默认
微信小程序api视频课程-网络-wx.request 向远程传递参数的使用
点击按钮后
微信小程序api视频课程-网络-wx.request 向远程传递参数的使用

wxml代码

<button bindtap="cs">传送参数</button>

js代码

/**
   * 页面的初始数据
   */
  data: {

  },
  cs:function(){
    wx.request({
      url: 'http://www.hzyaoyi.cn/shuju/txt.asp',
      data:{
        uname:"hjh",
        pwd:"123456"
      },
      success:function(res){
        console.log(res.data)
      }
    })
  },

视频课程有完整的,包含后端的数据演示

欢迎大家收看我的****:微信小程序常用API使用
https://edu.csdn.net/course/detail/16194
微信小程序api视频课程-网络-wx.request 向远程传递参数的使用

相关文章:

  • 2021-04-10
  • 2021-07-24
  • 2021-07-04
  • 2021-10-18
  • 2021-10-08
  • 2022-12-23
  • 2021-12-13
猜你喜欢
  • 2021-08-03
  • 2021-04-17
  • 2021-10-17
  • 2021-04-26
  • 2021-09-20
  • 2021-11-21
相关资源
相似解决方案