NotifyTest.qml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. import QtQuick
  2. import QtQuick.Controls
  3. import QtQuick.Layouts
  4. import FluentUI
  5. FluScrollablePage{
  6. leftPadding:10
  7. rightPadding:10
  8. bottomPadding:20
  9. spacing: 6
  10. FluText{
  11. text: '消息推送测试'
  12. font: FluTextStyle.Title
  13. }
  14. FluArea{
  15. Layout.fillWidth: true
  16. height: 500
  17. paddings: 10
  18. ColumnLayout{
  19. id: yyyyy
  20. spacing: 10
  21. anchors{
  22. top: parent.top
  23. left: parent.left
  24. }
  25. width: parent.width
  26. property int conentWith: 300
  27. FluText{
  28. text: '推送配置'
  29. font: FluTextStyle.BodyStrong
  30. }
  31. FluMultilineTextBox{
  32. id: notifyConfig
  33. implicitWidth: yyyyy.conentWith
  34. placeholderText: 'Please input your notify config'
  35. text: 'provider: null'
  36. }
  37. FluText{
  38. text: '请翻阅文档[消息推送]进行填写上方的参数设置。 \n请填写下方的Title和Conent后点击发送消息测试 \n注意这并不会在当前界面有任何反馈'
  39. }
  40. FluText{
  41. text: '主题'
  42. font: FluTextStyle.BodyStrong
  43. }
  44. FluTextBox{
  45. id: notifyTitle
  46. implicitWidth: yyyyy.conentWith
  47. placeholderText: 'Title'
  48. text: 'TEST TITLE'
  49. }
  50. FluText{
  51. text: '内容'
  52. font: FluTextStyle.BodyStrong
  53. }
  54. FluMultilineTextBox{
  55. id: notifyConent
  56. implicitWidth: yyyyy.conentWith
  57. placeholderText: 'Conent'
  58. text: 'TEST conent'
  59. }
  60. FluFilledButton{
  61. id: testSend
  62. implicitWidth: yyyyy.conentWith
  63. text: '测试发送'
  64. onClicked: {
  65. const result = utils.test_notify(notifyConfig.text, notifyTitle.text, notifyConent.text)
  66. console.debug(result)
  67. if(result === "true"){
  68. showSuccess('Successful')
  69. }else{
  70. showError('Failure')
  71. }
  72. }
  73. }
  74. }
  75. }
  76. }