CallBack.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. cc.Class({
  2. extends: cc.BaseClass,
  3. properties: {
  4. m_EditBox:cc.EditBox,
  5. },
  6. // onLoad () {},
  7. start () {
  8. },
  9. OnClickCommitFeed:function(){
  10. if(this.m_EditBox.string.length < 10){
  11. this.ShowAlert("您提交的資訊內容少於10個字,請詳細描述內容重新提交");
  12. return;
  13. }
  14. var pGlobalUserData = g_GlobalUserInfo.GetGlobalUserData();
  15. var webUrl = window.PHP_HOME+'/UserFunc.php?&GetMark=32&strAccounts='+pGlobalUserData.szAccounts;
  16. webUrl += '&strTitle='+"迴響建議" ;
  17. webUrl += '&strContent=' + this.m_EditBox.string;
  18. webUrl += '&dwSort=1';
  19. webUrl += '&strClientIP=' + pGlobalUserData.szClientIP;
  20. webUrl += '&strErrorDescribe=0';
  21. WebCenter.GetData(webUrl, 0, function (data) {
  22. var Res = JSON.parse(data);
  23. if(Res.strErrorDescribe && Res.strErrorDescribe.length > 0){
  24. this.ShowAlert(Res.strErrorDescribe,Alert_Yes,function(){
  25. this.m_EditBox.string = "";
  26. this.HideView();
  27. }.bind(this));
  28. }
  29. }.bind(this));
  30. },
  31. // update (dt) {},
  32. });