You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.7 KiB

  1. --- 大厅底部工具栏
  2. local BottomBarUtil = require("luaScript.Views.Main.BottomBar.BottomBarUtil");
  3. local BottomBarConfig = require("luaScript.Views.Main.BottomBar.BottomBarConfig");
  4. local BottomView = class("BottomView", require("core.luaScript.Views.Main.BottomBar.BottomView"));
  5. function BottomView:ctor()
  6. BottomView.super.ctor(self);
  7. self.menuOffX = -30
  8. end
  9. --- BottomView:onBtnKeFuClicked 客服点击事件
  10. function BottomView:onBtnKeFuClicked(node)
  11. playBtnEffect()
  12. if isWin32Platform() then
  13. showTooltip("请在手机上操作")
  14. return
  15. end
  16. local tt =
  17. {
  18. action = "collecturl.getDataByUid";
  19. app_id = getAppId(); --应用id
  20. };
  21. local phpUrl = getGlobalPhpUrl()
  22. httpPost(phpUrl, tt, function(status, response)
  23. if status == "successed" then
  24. local data = json.decode(response)
  25. if data.code == 200 and data.result ~= null then
  26. app.plugin:callUrl(data.result.kefuurl)
  27. end
  28. else
  29. local url = "http://kfxt.ttleyx.top/addons/kefu?gameid=47"
  30. app.plugin:callUrl(url)
  31. end
  32. end)
  33. end
  34. -- --- BottomView:onBtnJuBaoClicked 举报点击事件
  35. function BottomView:onBtnJuBaoClicked()
  36. playBtnEffect()
  37. if isWin32Platform() then
  38. showTooltip("请在手机上操作")
  39. return
  40. end
  41. local tt =
  42. {
  43. action = "collecturl.getDataByUid";
  44. app_id = getAppId(); --应用id
  45. };
  46. local phpUrl = getGlobalPhpUrl()
  47. httpPost(phpUrl, tt, function(status, response)
  48. if status == "successed" then
  49. local data = json.decode(response)
  50. if data.code == 200 and data.result ~= null then
  51. app.plugin:callUrl(data.result.jubaourl)
  52. end
  53. else
  54. local url = string.format("http://toushu.3gegame1.com/inform?ac=25a7f2b778451c50")
  55. app.plugin:callUrl(url)
  56. end
  57. end)
  58. end
  59. return BottomView;