人人商城

module-link-uniacid.html 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. {template 'common/header'}
  2. <div class="alert we7-page-alert">
  3. <p><i class="wi wi-info-sign"></i>本{$_W['account']['type_name']}可操作的模块中,仅显示可进行同步的模块;</p>
  4. <p><i class="wi wi-info-sign"></i>可以把小程序应用或PC应用的会员、数据等信息同步至{$_W['account']['type_name']}应用当中;</p>
  5. <p><i class="wi wi-info-sign"></i>一个模块,同步了小程序则不可再同步PC,同步了PC则不可再同步小程序;</p>
  6. <p><i class="wi wi-info-sign"></i>若小程序A应用已同步{$_W['account']['type_name']},则{$_W['account']['type_name']}同步小程序应用时,无法选择小程序A且小程序A不会显示在同步列表中,即两者不可相互同步,PC同理。</p>
  7. </div>
  8. <div class="we7-page-title">关联设置</div>
  9. <div id="js-app-module-link-uniacid" ng-controller="appModuleLinkUniacidCtrl" ng-cloak>
  10. <table class="table we7-table table-hover vertical-middle">
  11. <col width="180px" />
  12. <col width="140px"/>
  13. <col width="140px" />
  14. <tr>
  15. <th class="text-left">模块</th>
  16. <th class="text-left">小程序或PC</th>
  17. <th class="text-right">操作</th>
  18. </tr>
  19. <tr ng-repeat="module in modules" ng-if="modules">
  20. <td class="text-left">
  21. <img ng-src="{{module.logo}}" style="width:50px;height:50px;">
  22. {{module.title}}
  23. </td>
  24. <td class="text-left" ng-if="module.config.link_uniacid">
  25. <img ng-src="{{module.link_uniacid_info.logo}}" style="width:50px;height:50px;">
  26. <span>{{module.link_uniacid_info.name}}</span>
  27. </td>
  28. <td class="text-left" ng-if="!module.config.link_uniacid && !module.other_link">
  29. <span>暂无</span>
  30. </td>
  31. <td class="text-left" ng-if="!module.config.link_uniacid && module.other_link">
  32. <span>已被<span ng-if="module.other_link.type == 5">PC:<span class="color-default" ng-bind="module.other_link.name"></span></span><span ng-if="module.other_link.type == 4">小程序:<span class="color-default" ng-bind="module.other_link.name"></span></span>同步</span>
  33. </td>
  34. <td>
  35. <div class="link-group" ng-if="module.config.link_uniacid">
  36. <a href="javascript:;" ng-click="searchLinkAccount(module.name, 'wxapp')">修改</a>
  37. <a href="javascript:;" ng-click="module_unlink_uniacid(module.name)">删除</a>
  38. </div>
  39. <div class="link-group" ng-if="!module.config.link_uniacid && !module.other_link">
  40. <a href="javascript:;" ng-click="searchLinkAccount(module.name, 'wxapp')">添加</a>
  41. </div>
  42. <div class="link-group" ng-if="!module.config.link_uniacid && module.other_link">
  43. <a href="javascript:;">---</a>
  44. </div>
  45. </td>
  46. </tr>
  47. </table>
  48. <div class="modal fade uploader-modal module" id="show-account" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  49. <div class="modal-dialog we7-modal-dialog" style="width:800px">
  50. <div class="modal-content">
  51. <div class="modal-header">
  52. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span></button>
  53. <h4 class="modal-title">选择</h4>
  54. </div>
  55. <div class="modal-body material-content">
  56. <div class="material-nav">
  57. <a href="javascript:;" ng-click="tabChange(0)" ng-class="{true:'active',false:''}[jurindex==0]" >小程序</a>
  58. <a href="javascript:;" ng-click="tabChange(1)" ng-class="{true:'active',false:''}[jurindex==1]">PC</a>
  59. </div>
  60. <div class="panel-body we7-padding material-body" ng-show="jurindex==0" id="account-wxapp">
  61. <div class="alert bg-light-gray">
  62. <p><i class="wi wi-info-sign color-default"></i>该应用必须同时支持小程序应用</p>
  63. <p><i class="wi wi-info-sign color-default"></i>小程序必须安装有该应用.</p>
  64. <p><i class="wi wi-info-sign color-default"></i>必须有公众号和小程序的主管理员及以上权限</p>
  65. </div>
  66. <div class="form-group we7-padding" ng-show="loadingWxappData">
  67. <span class="help-block text-center"><img src="./resource/images/loading.gif" alt="" width="45px"> 拼命加载中。。。</span>
  68. </div>
  69. <div class="row js-show-account-content" ng-show="!loadingWxappData">
  70. <div class="col-sm-2" ng-repeat="account in linkWxappAccounts" ng-if="linkWxappAccounts">
  71. <div class="item" ng-click="selectLinkAccount(account, $event)">
  72. <img ng-src="{{account.logo}}" class="icon" alt="">
  73. <div class="name">{{account.name}}</div>
  74. <div class="mask">
  75. <span class="wi wi-right"></span>
  76. </div>
  77. </div>
  78. </div>
  79. <div class="col-sm-12 text-center" ng-if="linkWxappAccounts.length == 0">没有可以关联的小程序</div>
  80. </div>
  81. </div>
  82. <div class="material-body" ng-show="jurindex==1" id="account-pc">
  83. <div class="alert bg-light-gray">
  84. <p><i class="wi wi-info-sign color-default"></i>该应用必须同时支持PC应用</p>
  85. <p><i class="wi wi-info-sign color-default"></i>PC必须安装有该应用.</p>
  86. <p><i class="wi wi-info-sign color-default"></i>必须有公众号和PC的主管理员及以上权限</p>
  87. </div>
  88. <div class="form-group we7-padding" ng-show="loadingPcData">
  89. <span class="help-block text-center"><img src="./resource/images/loading.gif" alt="" width="45px"> 拼命加载中。。。</span>
  90. </div>
  91. <div class="row js-show-account-content" ng-show="!loadingPcData">
  92. <div class="col-sm-2" ng-repeat="account in linkPcAccounts" ng-if="linkPcAccounts">
  93. <div class="item" ng-click="selectLinkAccount(account, $event)">
  94. <img ng-src="{{account.logo}}" class="icon">
  95. <div class="name">{{account.name}}</div>
  96. <div class="mask">
  97. <span class="wi wi-right"></span>
  98. </div>
  99. </div>
  100. </div>
  101. <div class="col-sm-12 text-center" ng-if="linkPcAccounts.length == 0">没有可以关联的PC</div>
  102. </div>
  103. </div>
  104. </div>
  105. <div class="modal-footer">
  106. <button type="button" class="btn btn-primary" ng-click="moduleLinkUniacid()">确定</button>
  107. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. <script type="text/javascript">
  114. angular.module('profileApp').value('config', {
  115. 'modules': {php echo !empty($modules) ? json_encode($modules) : 'null'},
  116. 'token': "{php echo $_W['token']}",
  117. 'wxapp': "{php echo ACCOUNT_TYPE_APP_NORMAL}",
  118. 'webapp': "{php echo ACCOUNT_TYPE_WEBAPP_NORMAL}",
  119. 'links' : {
  120. 'search_link_account': "{php echo url('profile/module-link-uniacid/search_link_account')}",
  121. 'module_link_uniacid': "{php echo url('profile/module-link-uniacid')}",
  122. 'module_unlink_uniacid':"{php echo url('profile/module-link-uniacid/module_unlink_uniacid')}"
  123. },
  124. });
  125. angular.bootstrap($('#js-app-module-link-uniacid'), ['profileApp']);
  126. </script>
  127. {template 'common/footer'}