输入框输入的内容想通过sendSocketMessage 发送,发送不成功,哪里错了?
发布于 5 年前 作者 fwan 2377 次浏览 来自 问答

index.js 包含:

Page({

  data: {

    inputValue:'',

    userInfo: {},

    socktBtnTitle: '连接socket1'


  },

  bindKeyInput: function (e) {

    this.setData({

      inputValue: e.detail.value

    })

  },

  sendMessageBtnTap: function () {

    this.sendSocketMessage(inputValue)    

     this.sendSocketMessage('小程序又来了')    

    },

注释掉 this.sendSocketMessage(inputValue



注释那么后台就可以收到小程序又来了

什么问题,怎么写



回到顶部