人人商城

notice.html 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. {template 'common/header'}
  2. <ul class="we7-page-tab">
  3. <li {if $do == 'display'}class="active"{/if}><a href="{php echo url('message/notice/display');}">消息列表</a></li>
  4. <li {if $do == 'setting'}class="active"{/if}><a href="{php echo url('message/notice/setting');}">消息设置</a></li>
  5. </ul>
  6. <div id="message-notice" ng-controller="messageNoticeCtrl" ng-cloak>
  7. {if $do == 'display'}
  8. <div class="btn-group we7-btn-group we7-padding-bottom">
  9. <a href="{php echo url('message/notice')}" class="btn btn-default {if empty($type)} active {/if}">全部</a>
  10. {if $_W['isfounder'] && uni_user_see_more_info(ACCOUNT_MANAGE_NAME_VICE_FOUNDER, false)}
  11. <a href="{php echo url('message/notice', array('type' => MESSAGE_ORDER_TYPE))}" class="btn btn-default {if $type == MESSAGE_ORDER_TYPE} active {/if}">订单消息</a>
  12. {/if}
  13. <a href="{php echo url('message/notice', array('type' => MESSAGE_ACCOUNT_EXPIRE_TYPE))}" class="btn btn-default {if $type == MESSAGE_ACCOUNT_EXPIRE_TYPE} active {/if}">到期消息</a>
  14. {if $_W['isfounder'] && uni_user_see_more_info(ACCOUNT_MANAGE_NAME_VICE_FOUNDER, false)}
  15. <a href="{php echo url('message/notice', array('type' => MESSAGE_REGISTER_TYPE))}" class="btn btn-default {if $type == MESSAGE_REGISTER_TYPE} active {/if}">注册提醒</a>
  16. <a href="{php echo url('message/notice', array('type' => MESSAGE_WORKORDER_TYPE))}" class="btn btn-default {if $type == MESSAGE_WORKORDER_TYPE} active {/if}">工单提醒</a>
  17. {/if}
  18. {if user_is_founder($_W['uid'], true)}
  19. <a href="{php echo url('message/notice', array('type' => MESSAGE_SYSTEM_UPGRADE))}" class="btn btn-default {if $type == MESSAGE_SYSTEM_UPGRADE} active {/if}">系统更新</a>
  20. <a href="{php echo url('message/notice', array('type' => MESSAGE_OFFICIAL_DYNAMICS))}" class="btn btn-default {if $type == MESSAGE_OFFICIAL_DYNAMICS} active {/if}">官方动态</a>
  21. {/if}
  22. </div>
  23. <div class="btn-group we7-btn-group we7-padding-bottom" style="float: right;">
  24. <a href="javascript:;" ng-click="allRead()" class="btn">已读所有消息</a>
  25. </div>
  26. <table class="table we7-table table-hover vertical-middle" >
  27. <col>
  28. <col>
  29. <col>
  30. <tr>
  31. <th colspan="{{ type==4 ? 4 : 3}}" class="text-left filter">
  32. <div class="dropdown dropdown-toggle we7-dropdown">
  33. <a data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  34. 全部消息
  35. <span class="caret"></span>
  36. </a>
  37. <ul class="dropdown-menu" aria-labelledby="dLabel">
  38. <li><a href="{php echo filter_url('is_read:');}" class="active">全部消息</a></li>
  39. <li><a href="{php echo filter_url('is_read:' . MESSAGE_READ);}" class="active">已读消息</a></li>
  40. <li><a href="{php echo filter_url('is_read:' . MESSAGE_NOREAD);}" class="active">未读消息</a></li>
  41. </ul>
  42. </div>
  43. </th>
  44. </tr>
  45. <tr>
  46. <th>标题内容</th>
  47. <th class="text-center" ng-if="type==4" >来源</th>
  48. <th class="text-center">时间</th>
  49. <th class="text-right">操作</th>
  50. </tr>
  51. <tr ng-repeat="list in lists">
  52. <td class="tip-before unread" ng-if ="list.is_read == 1 || list.is_read == 0">{{list.message}} {{type != 4 && list.source ? '(' + list.source + ')' : ''}}</td>
  53. <td class="tip-before" ng-if ="list.is_read == 2">{{list.message}} {{type != 4 && list.source ? '(' + list.source + ')' : ''}}</td>
  54. <td class="text-muted text-center" ng-if="type==4" ng-bind = "list.source"></td>
  55. <td class="text-muted text-center" ng-bind = "list.create_time"></td>
  56. <td>
  57. <div class="link-group">
  58. <a ng-href="{{list.url}}" ng-if="list.type==1">查看我的订单</a>
  59. <a ng-href="{{list.url}}" ng-if="list.type==3">进入工单</a>
  60. <a ng-href="{{list.url}}" ng-if="list.type==2">查看公众号</a>
  61. <a ng-href="{{list.url}}" ng-if="list.type==5">查看小程序</a>
  62. <a ng-href="{{list.url}}" ng-if="list.type==6">查看pc</a>
  63. <a ng-href="{{list.url}}" ng-if="list.type==4 && list.status==1">查看我的待审核用户</a>
  64. <a ng-href="{{list.url}}" ng-if="list.type==7">查看我的账号</a>
  65. <a href="javascript:;" ng-if="list.type==10 || list.type==11" ng-click="getOfficialMsg(list.id, list.url)">查看</a>
  66. </div>
  67. </td>
  68. </tr>
  69. </table>
  70. </div>
  71. <div class="text-right we7-margin-top">
  72. {$pager}
  73. {/if}
  74. {if $do == 'setting'}
  75. <div class="clearfix"></div>
  76. <div class="table we7-tables we7-padding-bottom">
  77. <table class="table we7-table table-hover">
  78. <col width="80px"/>
  79. <col width="300px"/>
  80. <col width="100px"/>
  81. <tr>
  82. <th>消息类型</th>
  83. <th>提醒说明</th>
  84. <th class="text-right">操作</th>
  85. </tr>
  86. {loop $setting $property $property_info}
  87. <tr>
  88. <th>{$property_info['title']}</th>
  89. <th>{$property_info['msg']}</th>
  90. <th class="text-right">
  91. <label>
  92. <div class="switch {if empty($property_info['status']) || $property_info['status'] == MESSAGE_ENABLE} switchOn{/if}" id="key-{$property}" ng-click="changeStatus('{$property}', '{$property}')"></div>
  93. </label>
  94. </th>
  95. </tr>
  96. {loop $property_info['types'] $type $type_info}
  97. <tr>
  98. <td class="vertical-middle">{$type_info['title']}</td>
  99. <td>{$type_info['msg']}</td>
  100. <td class="text-right">
  101. <label>
  102. <div class="switch {if empty($type_info['status']) || $type_info['status'] == MESSAGE_ENABLE} switchOn{/if}" id="key-{$type}" ng-click="changeStatus('{$property}', {$type})"></div>
  103. </label>
  104. </td>
  105. </tr>
  106. {/loop}
  107. {/loop}
  108. </table>
  109. </div>
  110. {/if}
  111. </div>
  112. <script type="text/javascript">
  113. angular.module('messageApp').value('config', {
  114. 'type' : '{php echo $type}',
  115. 'lists': {php echo !empty($lists) ? json_encode($lists) : 'null'},
  116. 'is_read' : "{$is_read}",
  117. 'all_read_url' : "{php echo url('message/notice/all_read')}",
  118. 'mark_read_url' : "{php echo url('message/notice/read')}",
  119. });
  120. angular.bootstrap($('#message-notice'), ['messageApp']);
  121. </script>
  122. {template 'common/footer'}