人人商城

manage-sms-wxapp.html 3.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. {template 'common/header'}
  2. {template 'account/account-header'}
  3. <div id="js-account-manage-sms" ng-controller="AccountManageSms" ng-cloak>
  4. <table class="table we7-table table-hover">
  5. <col width="200px"/>
  6. <col width="230px"/>
  7. <tr>
  8. <th>剩余条数</th>
  9. <th class="text-right">操作</th>
  10. </tr>
  11. <tr>
  12. <td ng-if="notify.sms"><span ng-bind="notify.sms.balance"></span>条</td>
  13. <td ng-if="!notify.sms">0条</td>
  14. <td>
  15. <div class="link-group">
  16. <a href="javascript:;" data-toggle="modal" data-target="#balance" ng-click="editSms('balance', notify.sms.balance)">分配短信</a>
  17. <a href="javascript:;" data-toggle="modal" data-target="#signature" ng-click="editSms('signature', notify.sms.signature)">设置短信签名</a>
  18. </div>
  19. </td>
  20. </tr>
  21. </table>
  22. <div class="modal fade" id="balance" tabindex="-1" role="dialog" aria-hidden="true">
  23. <div class="we7-modal-dialog modal-dialog">
  24. <div class="modal-content">
  25. <div class="modal-header">
  26. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  27. <div class="modal-title">分配短信</div>
  28. </div>
  29. <div class="modal-body we7-form">
  30. <div class="form-group">
  31. <input type="number" min="0" ng-model="middleSms.balance" class="form-control" placeholder="请填写短信剩余条数,必须为整数。" />
  32. </div>
  33. </div>
  34. <div class="modal-footer">
  35. <button type="button" class="btn btn-primary" ng-click="httpChange('balance')">确定</button>
  36. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. <div class="modal fade" id="signature" tabindex="-1" role="dialog" aria-hidden="true">
  42. <div class="we7-modal-dialog modal-dialog">
  43. <div class="modal-content">
  44. <div class="modal-header">
  45. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  46. <div class="modal-title">修改短信签名</div>
  47. </div>
  48. <div class="modal-body">
  49. <div class="form-group">
  50. <select name="signature" class="we7-select" ng-model="middleSms.signature">
  51. {if !empty($notify['sms']['signature'])}
  52. {if in_array($notify['sms']['signature'], $signatures)}
  53. <option selected value="{$notify['sms']['signature']}">{$notify['sms']['signature']}</option>
  54. {elseif !empty($notify['sms']['signature'])}
  55. <option value="{$notify['sms']['signature']}">{$notify['sms']['signature']}(未通过云服务审核)</option>
  56. {/if}
  57. {/if}
  58. {loop $signatures $signa}
  59. {if $signa != $notify['sms']['signature']}
  60. <option value="{$signa}">{$signa}</option>
  61. {/if}
  62. {/loop}
  63. </select>
  64. <span class="help-block">请填写短信签名。未审核签名可以通过云短信审核签名</span>
  65. </div>
  66. </div>
  67. <div class="modal-footer">
  68. <button type="button" class="btn btn-primary" ng-click="httpChange('signature')">确定</button>
  69. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <script>
  76. angular.module('accountApp').value('config', {
  77. notify: {php echo !empty($notify) ? json_encode($notify) : 'null'},
  78. signatures: {php echo !empty($signatures) ? json_encode($signatures) : 'null'},
  79. links: {
  80. postSms: "{php echo url('account/post/sms', array('acid' => $acid, 'uniacid' => $uniacid))}",
  81. },
  82. });
  83. angular.bootstrap($('#js-account-manage-sms'), ['accountApp']);
  84. </script>
  85. {template 'common/footer'}