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.

45 lines
1.5 KiB

2 years ago
  1. $(function () {
  2. 'use strict';
  3. var sLang = $('[http-equiv="content-language"]').attr('content') || 'zh-TW',
  4. sAnchor = getUrlParam('anchor'),
  5. /*
  6. * 目的 抓去展示圖片
  7. */
  8. fnSetServiceItems = function (org) {
  9. return fnGetWebSiteSetting(function (saRes) {
  10. var sHtml = $('#temp_service').render(saRes);
  11. if (saRes.length > 0) {
  12. $('.service').html(sHtml + '<p class="clear">&nbsp;</p>');
  13. if (sAnchor) {
  14. goToJys($('a[name="' + sAnchor + '"]'));
  15. }
  16. }
  17. }, 'ServiceItems', sLang);
  18. },
  19. /*
  20. * 目的 設置簡介
  21. */
  22. fnSetServiceTitle = function (org) {
  23. var sServiceTitle = { 'zh-TW': org.ServiceTitle, 'zh': org.ServiceTitle_CN, 'en': org.ServiceTitle_EN }[sLang] || '';
  24. if (sServiceTitle) {
  25. $('#ServiceTitle').html(sServiceTitle);
  26. }
  27. },
  28. init = function () {
  29. var myHelpers = {
  30. setFilePath: function (val) {
  31. val = val || '';
  32. return gServerUrl + '/' + val.replace(/\\/g, "\/");
  33. },
  34. setFileName: function (val) {
  35. return val.split('.')[0] || '';
  36. }
  37. };
  38. $.views.helpers(myHelpers);
  39. runByOrgInfo(fnSetServiceTitle);
  40. runByOrgInfo(fnSetServiceItems, true);
  41. };
  42. init();
  43. });