store_menu.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <!-- +---------------------------------------------------------------------- -->
  2. <!-- | CRMEB [ CRMEB赋能开发者,助力企业发展 ] -->
  3. <!-- +---------------------------------------------------------------------- -->
  4. <!-- | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. -->
  5. <!-- +---------------------------------------------------------------------- -->
  6. <!-- | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 -->
  7. <!-- +---------------------------------------------------------------------- -->
  8. <!-- | Author: CRMEB Team <admin@crmeb.com> -->
  9. <!-- +---------------------------------------------------------------------- -->
  10. <footer id="footer" class="acea-row row-middle" style="z-index: 2" ref="storeMenu" @touchmove.prevent>
  11. {volist name="menus" id="vo"}
  12. <?php
  13. $https = "/^https:[\/]{2}[a-z]+[.]{1}[a-z\d\-]+[.]{1}[a-z\d]*[\/]*[A-Za-z\d]*[\/]*[A-Za-z\d]*/";
  14. if(preg_match($https,$vo['url'])){
  15. $pageURL = 'https://';
  16. }else{
  17. $pageURL = 'http://';
  18. }
  19. if($_SERVER["REQUEST_URI"]=='/'){
  20. $_SERVER["REQUEST_URI"]='/wap/index/index.html';
  21. }
  22. $pageURL.=$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"];
  23. $page=parse_url($pageURL);
  24. if(array_key_exists('path',$page)){
  25. $page=parse_url($pageURL)['path'];
  26. }else{
  27. $page='/wap/index/index.html';
  28. }
  29. $afferent=parse_url($vo['url']);
  30. if(array_key_exists('path',$afferent)){
  31. $afferent=parse_url($vo['url'])['path'];
  32. }else{
  33. $afferent='#';
  34. }
  35. if(strpos($page,'.html')===false) $page=$page.'.html';
  36. if(strpos($afferent,'.html')===false) $afferent=$afferent.'.html';
  37. if($page==$afferent){
  38. $href = 'javascript:void(0);';
  39. $checked = true;
  40. }else{
  41. $href =$vo['url'];
  42. $checked = false;
  43. }
  44. ?>
  45. <a class="<?php if($checked){echo ' on ';} ?>" href="{$href}">
  46. <div class="pictrue"><img src="{if $checked}{$vo.class}{else}{$vo.hove_class}{/if}"></div>
  47. <div class="name">{$vo['name']}</div>
  48. </a>
  49. {/volist}
  50. </footer>