人人商城

dropdown-menu.html 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <span class="top-view">
  2. {if !empty($selected_account)}
  3. {if in_array($_W['account']['type'], array(ACCOUNT_TYPE_OFFCIAL_NORMAL, ACCOUNT_TYPE_OFFCIAL_AUTH))}
  4. <a href="{if $_W['role'] == ACCOUNT_MANAGE_NAME_CLERK}javascript:;{else}{php echo url('account/display/switch', array('uniacid' => $_W['uniacid'], 'type' => $_W['account']['type']))}{/if}" title="{php echo $_W['account']['name']}" target="_blank">
  5. <i class="wi wi-wechat"></i>{$_W['account']['name']}
  6. </a>
  7. {if !empty($selected_account['version_info'])}
  8. <a href="{if $_W['role'] == ACCOUNT_MANAGE_NAME_CLERK}javascript:;{else}{php echo url('account/display/switch', array('uniacid' => $selected_account['version_info']['uniacid'], 'version_id' => $selected_account['version_id'], 'type' => $_W['account']['type']))}{/if}" title="{php echo $account['wxapp_name']}" target="_blank">
  9. <i class="wi wi-wxapp"></i>{$selected_account['wxapp_name']}
  10. </a>
  11. {/if}
  12. {/if}
  13. {if in_array($_W['account']['type'], array(ACCOUNT_TYPE_APP_NORMAL, ACCOUNT_TYPE_ALIAPP_NORMAL))}
  14. {if $selected_account['version_info']['uniacid'] != $selected_account['uniacid']}
  15. <a href="{if $_W['role'] == ACCOUNT_MANAGE_NAME_CLERK}javascript:;{else}{php echo url('account/display/switch', array('uniacid' => $selected_account['uniacid'], 'type' => $_W['account']['type']))}" title="{php echo $_W['account']['name']}{/if}" target="_blank">
  16. <i class="wi wi-{php echo $_W['account']['type_sign']}"></i>{$_W['account']['name']}
  17. </a>
  18. {/if}
  19. <a href="{if $_W['role'] == ACCOUNT_MANAGE_NAME_CLERK}javascript:;{else}{php echo url('account/display/switch', array('uniacid' => $selected_account['version_info']['uniacid'], 'version_id' => $selected_account['version_id'], 'type' => $_W['account']['type']))}{/if}" title="{php echo $selected_account['wxapp_name']}" target="_blank" class="hidden">
  20. <i class="wi wi-wxapp"></i>{$selected_account['wxapp_name']}
  21. </a>
  22. {/if}
  23. {/if}
  24. </span>
  25. <span class="dropdown">
  26. <a href="javascript:;" class="dropdown-icon" data-toggle="dropdown" aria-expanded="false"><i class="wi wi-angle-down"></i></a>
  27. <ul class="dropdown-menu dropdown-menu-right" role="menu">
  28. {loop $accounts_list $account}
  29. <li>
  30. <a href="{php echo $account['url']}">
  31. <span>
  32. {if $account['type_name'] == ACCOUNT_TYPE_SIGN}
  33. <i class="wi wi-wechat"></i>
  34. {elseif $account['type_name'] == WXAPP_TYPE_SIGN}
  35. <i class="wi wi-wxapp"></i>
  36. {elseif $account['type_name'] == WEBAPP_TYPE_SIGN}
  37. <i class="wi wi-pc"></i>
  38. {elseif $account['type_name'] == PHONEAPP_TYPE_SIGN}
  39. <i class="wi wi-app"></i>
  40. {elseif $account['type_name'] == XZAPP_TYPE_SIGN}
  41. <i class="wi wi-xzapp"></i>
  42. {elseif $account['type_name'] == ALIAPP_TYPE_SIGN}
  43. <i class="wi wi-aliapp"></i>
  44. {/if}
  45. {$account['account_name']}
  46. </span>
  47. </a>
  48. </li>
  49. {/loop}
  50. </ul>
  51. </span>