bind.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. {template 'common/header'}
  2. <ul class="we7-page-tab hidden">
  3. <li {if $do == 'base'}class="active"{/if}><a href="{php echo url('user/profile')}">我的账户</a></li>
  4. <li {if $do == 'bind'}class="active"{/if}><a href="{php echo url('user/profile/bind')}">账号绑定</a></li>
  5. </ul>
  6. <!--账号绑定-->
  7. <div class="bind-account" ng-controller="userBindCtrl" ng-cloak>
  8. <table class="table we7-table table-hover table-form" >
  9. <col width="140px " />
  10. <col />
  11. <col width="160px" />
  12. <tr>
  13. <th class="text-left" colspan="3">账号绑定</th>
  14. </tr>
  15. <tr>
  16. <td class="table-label"><span class="wi wi-iphone color-default" style="font-size: 32px;"></span></td>
  17. <td>{{bindmobile.third_nickname}}</td>
  18. <td>
  19. <div class="link-group">
  20. <a href="javascript:;" data-toggle="modal" data-target="#myModal" ng-if="bindmobile.third_type == 3">解绑手机号</a>
  21. <a href="javascript:;" data-toggle="modal" data-target="#myModal" ng-if="bindmobile.third_type != 3">绑定手机号</a>
  22. </div>
  23. </td>
  24. </tr>
  25. <tr>
  26. <td class="table-label"><span class="wi wi-qq color-default" style="font-size: 32px;"></span></td>
  27. <td>{{bindqq.third_nickname}}</td>
  28. <td>
  29. <div class="link-group">
  30. <a href="javascript:;" ng-if="bindqq.third_type == 1" ng-click="unbind(bindqq.third_type)">解除绑定</a>
  31. <a href="{{login_urls.qq}}" ng-if="bindqq.third_type != 1 && thirdlogin.qq.authstate == 1">绑定QQ</a>
  32. </div>
  33. </td>
  34. </tr>
  35. <tr>
  36. <td class="table-label"><span class="wi wi-account" style="font-size: 32px; color: #00bb00;"></span></td>
  37. <td>{{bindwechat.third_nickname}}</td>
  38. <td>
  39. <div class="link-group">
  40. <a href="javascript:;" ng-if="bindwechat.third_type == 2" ng-click="unbind(bindwechat.third_type)">解除绑定</a>
  41. <a href="{{login_urls.wechat}}" ng-if="bindwechat.third_type != 2 && thirdlogin.wechat.authstate == 1">绑定微信</a>
  42. </div>
  43. </td>
  44. </tr>
  45. <div class="modal fade basic" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  46. <div class="modal-dialog">
  47. <div class="modal-content">
  48. <div class="modal-header">
  49. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  50. <h4 class="modal-title" id="myModalLabel">
  51. <span ng-if="bindmobile.third_type != 3">绑定手机号</span>
  52. <span ng-if="bindmobile.third_type == 3">解绑手机号</span>
  53. </h4>
  54. </div>
  55. <div class="modal-body material-content clearfix">
  56. <div class="form-group input-group">
  57. <input type="text" class="form-control" placeholder="输入手机号" ng-model="mobile">
  58. <span class="input-group-btn">
  59. <button class="btn btn-primary send-code" ng-disabled="isDisable" ng-click="sendMessage(bindmobile.third_nickname)">{{text}}</button>
  60. </span>
  61. </div>
  62. <div class="form-group input-group">
  63. <input type="text" ng-model='imagecode' class="form-control" placeholder="输入图形验证码">
  64. <a href="javascript:;" class="input-group-btn imgverify" style="" ng-click="changeVerify()"><img ng-src="{{image}}" style="width: 127px; height: 32px;"/></a>
  65. </div>
  66. <div class="form-group">
  67. <input type="text" ng-model='smscode' class="form-control" placeholder="输入手机验证码">
  68. </div>
  69. {if empty($bind_mobile)}
  70. <div class="form-group">
  71. <input type="password" ng-model='password' class="form-control" placeholder="输入密码">
  72. </div>
  73. <div class="form-group">
  74. <input type="password" ng-model='repassword' class="form-control" placeholder="再次输入密码">
  75. </div>
  76. {/if}
  77. </div>
  78. <div class="modal-footer">
  79. <button type="button" class="btn btn-primary" ng-click="mobileBind(bindmobile.third_nickname, 3)">确定</button>
  80. <button type="button" class="btn smscodebtn-default" data-dismiss="modal">取消</button>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. <!--end 账号绑定-->
  86. </table>
  87. </div>
  88. <script>
  89. angular.module('userProfile').value('config',{
  90. 'bindqq': {php echo !empty($bind_qq) ? json_encode($bind_qq) : 'null'},
  91. 'bindwechat': {php echo !empty($bind_wechat) ? json_encode($bind_wechat) : 'null'},
  92. 'bindmobile': {php echo !empty($bind_mobile) ? json_encode($bind_mobile) : 'null'},
  93. 'login_urls': {php echo !empty($support_login_urls) ? json_encode($support_login_urls) : 'null'},
  94. 'thirdlogin' : {php echo !empty($_W['setting']['thirdlogin']) ? json_encode($_W['setting']['thirdlogin']) : 'null'},
  95. 'bind_sign': "{php echo !empty($bind_sign) ? $bind_sign : 'null'}",
  96. 'image' : "{php echo url('utility/code')}",
  97. 'links':{
  98. 'img_verify_link': "{php echo url('utility/code')}",
  99. 'send_code_link': "{php echo url('utility/verifycode')}",
  100. 'valid_mobile_link' : "{php echo url('user/profile/validate_mobile')}",
  101. 'bind_mobile_link' : "{php echo url('user/profile/bind_mobile')}",
  102. 'unbind_third_link' : "{php echo url('user/profile/unbind')}",
  103. },
  104. });
  105. angular.bootstrap($('.bind-account'), ['userProfile']);
  106. </script>
  107. {template 'common/footer'}