bind-domain.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. {template 'common/header'}
  2. <div class="alert alert-info">
  3. <p><i class="fa fa-exclamation-circle"></i> 绑定域名后,访问PC将使用绑定的域名;</p>
  4. <p><i class="fa fa-exclamation-circle"></i> 如访问微站链接为<span class="color-gray">{$_W['siteroot']}app/index.php?i={$_W['uniacid']}&a=webapp&c=entry&eid=1</span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;绑定bang.baidu.com后,访问微站链接就成为<span class="color-gray">http://bang.baidu.com/app/index.php?i={$_W['uniacid']}&a=webapp&c=entry&eid=1</span></p>
  5. <p><i class="fa fa-exclamation-circle"></i> 绑定域名,只支持一级域名和二级域名;</p>
  6. <p><i class="fa fa-exclamation-circle"></i> 请注意一定要将绑定的域名解析到本服务器IP并绑定到微擎网站目录;</p>
  7. <p><i class="fa fa-exclamation-circle"></i> 请注意选择一个PC要访问的模块,否则域名绑定不生效。</p>
  8. </div>
  9. <div id="js-bind-domain" ng-controller="bindDomainCtrl" ng-cloak>
  10. <table class="table we7-table table-hover table-form wechat-menu">
  11. <col width="140px " />
  12. <col />
  13. <col width="150px" />
  14. <tr><th class="text-left" colspan="3">域名访问设置</th></tr>
  15. <tr>
  16. <td class="table-label">域名</td>
  17. <td ng-bind="account.setting.bind_domain"></td>
  18. <td ng-if="account.setting.bind_domain">
  19. <div class="link-group">
  20. <a href="javascript:;" data-toggle="modal" data-target="#domain">修改</a>
  21. <a href="{url 'webapp/bind-domain/delete'}" ng-if="account.setting.bind_domain">删除</a>
  22. </div>
  23. </td>
  24. <td ng-if="!account.setting.bind_domain"><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#domain">添加域名</a></div></td>
  25. </tr>
  26. <tr>
  27. <td class="table-label">访问模块</td>
  28. <td ng-if="account.setting.default_module"><div><img ng-src="{{moduleList[account.setting.default_module].logo}}" width="50px" height="50px"> <span ng-bind="moduleList[account.setting.default_module].title"></span></div></td>
  29. <td ng-if="!account.setting.default_module" class="table-label">暂无访问模块</td>
  30. <td ng-if="account.setting.default_module"><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#add_module">修改访问模块</a></div></td>
  31. <td ng-if="!account.setting.default_module"><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#add_module">添加访问模块</a></div></td>
  32. </tr>
  33. </table>
  34. <div class="modal fade" id="domain" tabindex="-1" role="dialog" aria-hidden="true">
  35. <div class="we7-modal-dialog modal-dialog we7-form">
  36. <div class="modal-content">
  37. <div class="modal-header">
  38. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  39. <div class="modal-title">修改绑定域名</div>
  40. </div>
  41. <div class="modal-body">
  42. <div class="form-group">
  43. <input type="text" ng-model="middleAccount.bind_domain" class="form-control" placeholder="请输入要绑定的域名,以http://或https://开头" />
  44. <span class="help-block"></span>
  45. </div>
  46. </div>
  47. <div class="modal-footer">
  48. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="httpChange()">确定</button>
  49. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="uploader-modal modal fade module" id="add_module" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  55. <div class="modal-dialog modal-dialog modal-lg we7-modal-dialog">
  56. <div class="modal-content">
  57. <div class="modal-header">
  58. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  59. <h4 class="modal-title">添加模块(点击添加)</h4>
  60. </div>
  61. <div class="modal-body material-content clearfix" ng-if="moduleList">
  62. <div class="material-body">
  63. <div class="row">
  64. <div class="col-sm-2 select-module" ng-repeat="module in moduleList" ng-click="selectModule(module.name)">
  65. <div class="item" ng-class="{true:'active',false:''}[module.selected]">
  66. <img ng-src="{{ module.logo }}" alt="" class="icon" ng-if="module.main_module == ''"/>
  67. <span class="img" ng-if="module.main_module != ''">
  68. <img ng-src="{{ module.logo }}" alt="子应用icon" class="plugin-img"/>
  69. <img ng-src="{{ module.main_module_logo }}" alt="主应用icon" class="module-img"/>
  70. </span>
  71. <div class="name">{{ module.title }}</div>
  72. <div class="mask">
  73. <span class="wi wi-right"></span>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="modal-body material-content clearfix" ng-if="!moduleList">
  81. <div class="material-body text-center">暂无数据</div>
  82. </div>
  83. <div class="modal-footer">
  84. <button type="button" class="btn btn-primary" ng-click="changeModule()">确定</button>
  85. <button type="button" class="btn btn-default" ng-click="cancelModule()">取消</button>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. <script>
  92. angular.module('webApp').value('config', {
  93. account: {php echo !empty($_W['account']) ? json_encode($_W['account']) : 'null'},
  94. modulelist : {php echo !empty($modulelist) ? json_encode($modulelist) : 'null'},
  95. token: {php echo !empty($_W['token']) ? json_encode($_W['token']) : 'null'},
  96. links: {
  97. postDomain: "{php echo url('webapp/bind-domain')}",
  98. postModule: "{php echo url('webapp/bind-domain/default_module')}",
  99. },
  100. });
  101. angular.bootstrap($('#js-bind-domain'), ['webApp']);
  102. </script>
  103. {template 'common/footer'}