优化聊天部分
This commit is contained in:
@@ -33,6 +33,7 @@ import { SceneBgVideoLayer } from "../../../Sub/UI/SceneBgVideoLayer";
|
||||
import { NavigationManager, PanelType } from "../../manager/NavigationManager";
|
||||
import { GirlService } from "../../network/services/GirlService";
|
||||
import proto from "db://assets/Scripts/proto/proto.pb.js";
|
||||
import { TipsPanel } from "./TipsPanel";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass("ChatPanel")
|
||||
@@ -389,7 +390,10 @@ export class ChatPanel extends li_BaseView implements IChatPanelCallback {
|
||||
|
||||
public async OnClickSend() {
|
||||
const str = this.editBox.string;
|
||||
if (!str || str == "") return;
|
||||
if (!str || str == "") {
|
||||
TipsPanel.show("请输入内容");
|
||||
return;
|
||||
}
|
||||
|
||||
// 通过ChatController发送消息
|
||||
const succeed = await this.chatController.sendMessage(str);
|
||||
@@ -437,6 +441,7 @@ export class ChatPanel extends li_BaseView implements IChatPanelCallback {
|
||||
|
||||
onChatLimitReached(): void {
|
||||
this.payToTalkPanel.show(this.categoryId, this.id);
|
||||
TipsPanel.show(LanguageUtils.getText("chat_error_code_1001"));
|
||||
}
|
||||
/**
|
||||
* 情绪状态更新回调 (实现IChatPanelCallback接口)
|
||||
|
||||
Reference in New Issue
Block a user