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.

50 lines
1.6 KiB

2 years ago
  1. $(function () {
  2. 'use strict';
  3. var sLang = $('[http-equiv="content-language"]').attr('content') || 'zh',
  4. bEn = sLang === 'en',
  5. /*
  6. * 目的 抓去展示圖片
  7. */
  8. fnGetPicShow = function (org) {
  9. return g_api.ConnectLite(Service.apiappcom, ComFn.GetFileList, {
  10. ParentID: bEn ? org.PicShowId_EN : org.PicShowId_CN
  11. }, function (res) {
  12. if (res.RESULT) {
  13. var saRes = res.DATA.rel,
  14. sHtml = $('#temp_aboutpic').render(saRes);
  15. if (saRes.length > 0) {
  16. $('.aboutPic').html(sHtml + '<p class="clear">&nbsp;</p>');
  17. }
  18. }
  19. });
  20. },
  21. /*
  22. * 目的 設置簡介
  23. */
  24. fnSetIntroduction = function (org) {
  25. if (bEn) {
  26. if (org.Introduction_EN) {
  27. $('#Introduction').html(org.Introduction_EN);
  28. }
  29. }
  30. else {
  31. if (org.Introduction_CN) {
  32. $('#Introduction').html(org.Introduction_CN);
  33. }
  34. }
  35. },
  36. init = function () {
  37. var myHelpers = {
  38. setFilePath: function (val) {
  39. val = val || '';
  40. return gServerUrl + '/' + val.replace(/\\/g, "\/");
  41. }
  42. };
  43. $.views.helpers(myHelpers);
  44. runByOrgInfo(fnSetIntroduction, true);
  45. runByOrgInfo(fnGetPicShow);
  46. };
  47. init();
  48. });