Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

点赞点踩功能可以无限次点击 #138

Open
WoodenGirl opened this issue Apr 2, 2024 · 1 comment
Open

点赞点踩功能可以无限次点击 #138

WoodenGirl opened this issue Apr 2, 2024 · 1 comment

Comments

@WoodenGirl
Copy link

Version information (版本信息)

  • ChatUI or ChatUI Pro?
  • ChatUI Pro
  • ChatUI Version:
  • 0.3.8
  • React Version:
  • OS Version:
  • Browser Version:

Describe the bug (描述问题)
每个回答的点赞点踩功能可以无限次点击

Steps To Reproduce (重现步骤)

  1. 显示点赞功能
    return {
    _id: res.data.id,
    type: 'card',
    content: {
    code: 'knowledge',
    data: {
    text: res.data.answer
    }
    },
    meta: {
    evaluable: true, // 是否展示点赞点踩按钮
    }
    }
    2.配置显示交互
    feedback: {
    // 点赞后出的文本
    textOfGood: '感谢您的评价,我们会继续努力的哦!',
    // 点踩后出的文本
    textOfBad: '很抱歉,给您带来不好的体验,我会继续学习,下次为您提供更好的服务。',
    // 点踩后是否显示反馈表单
    needFeedback: false,
    // 不满意原因列表
    options: [
    {
    value: '我没有得到我想要的答案',
    },
    {
    value: '界面太难用了',
    },
    {
    value: '我不认可这个规则',
    },
    ],
    // 原因是否必选
    isReasonRequired: true,
    // 提交反馈后出的文本
    textAfterSubmit: '',
    },
    3.点赞点踩的请求配置
    //点赞点踩接口(可选)
    evaluate(data) {
    return {
    url: 'http://localhost:1234/faq/dialog/evaluate',
    data: {
    msgId: data.msgId,
    evaluateType: data.type,
    },
    };
    },

Link to minimal reproduction (最小化重现链接)

Expected behavior (期望的结果是什么)
每个回答的点赞点踩功能点击一次后无法再点击

@WoodenGirl
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant