sms.html 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. {template 'common/header'}
  2. <style>
  3. .color-error {
  4. color: #f15333;
  5. }
  6. .color-warning {
  7. color: #f2af5a;
  8. }
  9. </style>
  10. <div class="we7-page-title">短信管理</div>
  11. <ul class="we7-page-tab">
  12. <li class="{if $_GPC['type'] == 'info' || $_GPC['type'] == ''} active {/if}">
  13. <a href="{php echo url('cloud/sms')}&type=info">概览</a>
  14. </li>
  15. <li class="{if $_GPC['type'] == 'log'} active {/if}">
  16. <a href="{php echo url('cloud/sms')}&type=log">发送日志</a>
  17. </li>
  18. <li class="{if $_GPC['type'] == 'trade'} active {/if}">
  19. <a href="{php echo url('cloud/sms')}&type=trade">购买记录</a>
  20. </li>
  21. <li class="{if $_GPC['type'] == 'sign'} active {/if}">
  22. <a href="{php echo url('cloud/sms')}&type=sign">购买签名</a>
  23. </li>
  24. </ul>
  25. {if $_GPC['type'] == 'sign'}
  26. <div class="sms-sign" ng-controller="smsSign" ng-cloak>
  27. <div class="search-box we7-margin-bottom">
  28. <div class="search-form"></div>
  29. <a href="//s.w7.cc/goods-7.html" class="btn btn-primary" target="_blank">购买签名</a>
  30. </div>
  31. <table class="table we7-table">
  32. <tr>
  33. <th>签名</th>
  34. <th>状态</th>
  35. <!-- <th>拒绝原因</th> -->
  36. <th>时间</th>
  37. <!-- <th>操作</th> -->
  38. </tr>
  39. <tr ng-repeat="smssign in smsSigns">
  40. <td>{{smssign.sign}}</td>
  41. <td>
  42. <span ng-class="smssign.status == -1 ? 'color-error' : (smssign.status == 2 ? 'color-warning' : 'color-green')">{{statusText[smssign.status]}}</span>
  43. <i title="{{'拒绝原因:' + smssign.refuse_reason}}" data-toggle="tooltip" data-placement="bottom" ng-show="smssign.status == -1" class="wi wi-info color-error"></i>
  44. </td>
  45. <!-- <td>{{smssign.refuse_reason}}</td> -->
  46. <td>{{smssign.createtime}}</td>
  47. <!-- <td></td> -->
  48. </tr>
  49. <tr ng-if="smsSigns | we7IsEmpty">
  50. <td colspan="100">
  51. <div class="text-center">暂无数据</div>
  52. </td>
  53. </tr>
  54. </table>
  55. <we7-page conf="page2"></we7-page>
  56. </div>
  57. <script>
  58. </script>
  59. {elseif $_GPC['type'] == 'log'}
  60. <div class="sms-logs" ng-controller="smsLogs" ng-cloak>
  61. <div class="search-box we7-margin-bottom">
  62. <div class="input-group we7-margin-right nice-select" we7-date-range-picker ng-model="date" ng-change="getList(1)">
  63. <span class="current">{{date.startDate + '至' + date.endDate}}</span>
  64. </div>
  65. <div class="search-form">
  66. <div class="input-group ">
  67. <input type="text" ng-model="mobile" class="form-control" placeholder="手机号">
  68. <span class="input-group-btn" ng-click="getList(1)"><button class="btn btn-default button"><i class="fa fa-search"></i></button></span>
  69. </div>
  70. </div>
  71. </div>
  72. <table class="table we7-table">
  73. <tr>
  74. <th>手机号</th>
  75. <th>时间</th>
  76. <th>短信内容</th>
  77. <th>发送状态</th>
  78. <!-- <th>日志</th> -->
  79. </tr>
  80. <tr ng-repeat="smslog in smslogs">
  81. <td>{{smslog.send_mobile}}</td>
  82. <td>{{smslog.createtime}}</td>
  83. <td>{{smslog.content}}</td>
  84. <td>
  85. <span ng-if="smslog.status == 0" class="color-green">发送成功</span>
  86. <span ng-if="smslog.status != 0" class="color-error">发送失败</span>
  87. </td>
  88. <!-- <td>{{smslog.log}}</td> -->
  89. </tr>
  90. <tr ng-if="smslogs | we7IsEmpty">
  91. <td colspan="100">
  92. <div class="text-center">暂无数据</div>
  93. </td>
  94. </tr>
  95. </table>
  96. <we7-page conf="page"></we7-page>
  97. </div>
  98. {elseif $_GPC['type'] == 'trade'}
  99. <div class="sms-trade" ng-controller="smsTrade" ng-cloak>
  100. <div class="search-box we7-margin-bottom">
  101. <div class="input-group we7-margin-right nice-select" we7-date-range-picker ng-model="date" ng-change="getTrade(1)">
  102. <span class="current">{{date.startDate + '至' + date.endDate}}</span>
  103. </div>
  104. <div class="search-form"></div>
  105. <a href="//s.w7.cc/goods-7.html" class="btn btn-primary" target="_blank">购买短信</a>
  106. </div>
  107. <table class="table we7-table">
  108. <tr>
  109. <th>短信名称</th>
  110. <th>交易价格</th>
  111. <th>购买时间</th>
  112. </tr>
  113. <tr ng-repeat="smslog in smslogs">
  114. <td>{{smslog.title}}</td>
  115. <td>{{smslog.amount}}</td>
  116. <td>{{smslog.createtime}}</td>
  117. </tr>
  118. <tr ng-if="smslogs | we7IsEmpty">
  119. <td colspan="100">
  120. <div class="text-center">暂无数据</div>
  121. </td>
  122. </tr>
  123. </table>
  124. <we7-page conf="page1"></we7-page>
  125. </div>
  126. {else}
  127. <div class="form-files-box sms-index" ng-controller="smsIndex" ng-cloak>
  128. <table class="table we7-table">
  129. <colgroup>
  130. <col width="200px">
  131. <col width="">
  132. </colgroup>
  133. <tr>
  134. <th>短信概览</th>
  135. <th></th>
  136. <th>操作</th>
  137. </tr>
  138. <tr>
  139. <td>短信数量</td>
  140. <td class="color-default">{{smsInfo.sms_count || 0}} 条</td>
  141. <td class="color-default">
  142. <div class="link-group">
  143. <a href="//s.w7.cc/goods-7.html" target="_blank">购买短信</a>
  144. <a href="{php echo url('cloud/sms', array('type' => 'log'))}">发送记录</a>
  145. </div>
  146. </td>
  147. </tr>
  148. <tr>
  149. <td>可用签名</td>
  150. <td class="color-default">
  151. <span ng-repeat="sign in smsInfo.sms_sign|limitTo:5">【{{sign}}】</span>
  152. <span ng-if="smsInfo.sms_sign.length > 5">...</span>
  153. </td>
  154. <td class="color-default">
  155. <div class="link-group">
  156. <a href="//s.w7.cc/goods-7.html" target="_blank">购买签名</a>
  157. <a href="{php echo url('cloud/sms', array('type' => 'sign'))}" target="_blank">更多签名</a>
  158. </div>
  159. </td>
  160. </tr>
  161. </table>
  162. <table class="table we7-table">
  163. <colgroup>
  164. <col width="200px">
  165. <col>
  166. <col width="200px">
  167. </colgroup>
  168. <tr>
  169. <th>短信模板</th>
  170. <th>模板内容</th>
  171. <th>短信签名</th>
  172. <th>操作</th>
  173. </tr>
  174. <tr>
  175. <td>注册/绑定验证码</td>
  176. <td class="color-gray">您的短信验证码为:[数字] 您正在使用短信验证码相关功能, 需要你进行身份确认【xxx】</td>
  177. <td>【{{settingSmsSign.register || '涛盛微擎团队'}}】</td>
  178. <td class="color-default">
  179. <a href="javascript:;" ng-click="showModal('register')">
  180. 修改签名
  181. </a>
  182. </td>
  183. </tr>
  184. <tr>
  185. <td>找回密码验证码</td>
  186. <td class="color-gray">您的短信验证码为: [数字] 您正在使用短信验证码相关功能, 需要你进行身份确认【xxx】</td>
  187. <td>【{{settingSmsSign.find_password || '涛盛微擎团队'}}】</td>
  188. <td class="color-default">
  189. <a href="javascript:;" ng-click="showModal('find_password')">
  190. 修改签名
  191. </a>
  192. </td>
  193. </tr>
  194. <tr>
  195. <td>用户过期提醒</td>
  196. <td class="color-gray">您的用户名[username]即将过期。</td>
  197. <td>【{{settingSmsSign.user_expire || '涛盛微擎团队'}}】</td>
  198. <td class="color-default">
  199. <a href="javascript:;" ng-click="showModal('user_expire')">
  200. 修改签名
  201. </a>
  202. </td>
  203. </tr>
  204. </table>
  205. <div class="modal fade bs-example-modal-sm" id="editSign" tabindex="-1" style="z-index:1039" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  206. <div class="modal-dialog we7-modal-dialog ">
  207. <div class="modal-content">
  208. <div class="modal-header">
  209. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  210. <h4 class="modal-title">选择短信签名</h4>
  211. </div>
  212. <div class="modal-body">
  213. <div class="form-group text-right color-default">
  214. <a href="//s.w7.cc/goods-7.html" target="_blank">购买签名</a>
  215. </div>
  216. <div class="form-group">
  217. <select ng-model="currentSign">
  218. <option value="{{item}}" ng-repeat="item in cloudSmsSigns">{{item}}</option>
  219. <option value="">涛盛微擎团队</option>
  220. </select>
  221. </div>
  222. </div>
  223. <div class="modal-footer">
  224. <button type="button" class="btn btn-primary" name="submit" value="保存" ng-click="saveSetting()">确认</button>
  225. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. {/if}
  232. <script>
  233. require(['moment'], function() {
  234. angular.module('smsApp').value('config', {
  235. apiUrl: "{php echo url('cloud/profile/common_api')}&method=",
  236. smsSettingUrl: "{php echo url('cloud/sms-sign/save_sms_sign')}",
  237. cloudSmsSigns: {php echo json_encode($cloud_sms_signs)},
  238. settingSmsSign: {php echo json_encode($setting_sms_sign)},
  239. smsInfo: {php echo json_encode($sms_info)},
  240. });
  241. angular.bootstrap($('.sms-index'), ['smsApp']);
  242. angular.bootstrap($('.sms-logs'), ['smsApp']);
  243. angular.bootstrap($('.sms-sign'), ['smsApp']);
  244. angular.bootstrap($('.sms-trade'), ['smsApp']);
  245. })
  246. </script>
  247. {template 'common/footer'}