|
|
|
|
@ -14,27 +14,6 @@ Page({
|
|
|
|
|
isUp:false,
|
|
|
|
|
isDown:false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id:-1,
|
|
|
|
|
type:'text',
|
|
|
|
|
isUp:false,
|
|
|
|
|
isDown:false,
|
|
|
|
|
content:'测试输入框发送测试输入框发送测试输入框发送测试输入框发送'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id:0,
|
|
|
|
|
type:'text',
|
|
|
|
|
isUp:false,
|
|
|
|
|
isDown:false,
|
|
|
|
|
content:'我是AI回复,自定义回复'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id:1,
|
|
|
|
|
type:'text',
|
|
|
|
|
isUp:false,
|
|
|
|
|
isDown:false,
|
|
|
|
|
content:'再次发送再次发送再次发送'
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
@ -165,4 +144,33 @@ Page({
|
|
|
|
|
type:$type
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 文本消息发送
|
|
|
|
|
handleSend(){
|
|
|
|
|
let that = this;
|
|
|
|
|
if(that.data.sendText == ''){
|
|
|
|
|
wx.showToast({
|
|
|
|
|
title: '请输入内容',
|
|
|
|
|
icon: 'none',
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
that.animate();
|
|
|
|
|
that.setData({
|
|
|
|
|
list:[
|
|
|
|
|
...that.data.list,
|
|
|
|
|
{
|
|
|
|
|
id:that.data.list.length,
|
|
|
|
|
type:'text',
|
|
|
|
|
isUp:false,
|
|
|
|
|
isDown:false,
|
|
|
|
|
content:that.data.sendText
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
sendText:''
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|