12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- export default class TextManager {
- constructor(page) {
- this._page = page;
- }
-
- showMsg({msg}) {
-
- console.log(msg,2321312312);
- this._page.UI.updateViewWhenReceive(msg);
- }
-
- sendOneMsg({content, type}) {
-
- this._page.UI.showItemForMoment(this._page.imOperator.createNormalChatItem({
- type,
- content
- }), (itemIndex) => {
- console.log(itemIndex,123)
- this._page.sendMsg({
- content: this._page.imOperator.createChatItemContent({type, content}),
- itemIndex
- });
- });
- }
- resend({type, content, duration, itemIndex}) {
- this._page.sendMsg({
- content: this._page.imOperator.createChatItemContent({
- type: type,
- content: content,
- duration: duration
- }),
- itemIndex,
- success: (msg) => {
- this._page.UI.updateListViewBySort();
- }
- });
- }
- }
|