chat.js 802 Bytes
// miniprogram/pages/me/chat.js
var plugin = requirePlugin("chatbot");
Page({
  /**
   * 页面的初始数据
   */
  data: {

  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var chat = plugin.getChatComponent();
    chat.setTextToSpeech(false);
    //chat.editFoucs(true);
    return;
    chat.send('人工服务')
    setTimeout(()=>{
      chat.send('maomao de mao')
    },300)
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

})