config.js 847 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. * 获取参数
  3. * @param name
  4. * @returns {string|null}
  5. * @constructor
  6. */
  7. function GetQueryString(name) {
  8. let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
  9. let r = window.location.search.substr(1).match(reg);
  10. if (r != null) {
  11. return decodeURIComponent(r[2]);
  12. };
  13. return null;
  14. }
  15. function openCover(obj) {
  16. var hcode = '<img src="' + obj.src + '" style="max-width:480px; max-height:320px;" />';
  17. // layer.photos({
  18. // anim:5,
  19. // });
  20. layer.open({
  21. type: 0,
  22. title: '预览封面',
  23. content: hcode,
  24. anim: 1,
  25. offset: '20px',
  26. isOutAnim: true,
  27. maxmin: false,
  28. fixed: true,
  29. resize: false,
  30. closeBtn: 1,
  31. shade: 0.5,
  32. shadeClose: true,
  33. success: function (layero, index) {
  34. }
  35. });
  36. }