微信小程序api视频课程-网络-wx.request 向远程传递参数的使用

版权声明:黄菊华 https://blog.csdn.net/u013818205/article/details/88656454

默认
在这里插入图片描述
点击按钮后
在这里插入图片描述

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
网络-wx.request 向远程传递参数

猜你喜欢

转载自blog.csdn.net/u013818205/article/details/88656454