bind.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {template 'common/header'}
  2. <ul class="we7-page-tab">
  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-wechat" 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">绑定手机号</h4>
  51. </div>
  52. <div class="modal-body material-content clearfix">
  53. <div class="form-group input-group">
  54. <input type="text" class="form-control" placeholder="输入手机号" ng-model="mobile">
  55. <span class="input-group-btn">
  56. <button class="btn btn-primary send-code" ng-disabled="isDisable" ng-click="sendMessage(bindmobile.third_nickname)">{{text}}</button>
  57. </span>
  58. </div>
  59. <div class="form-group input-group">
  60. <input type="text" ng-model='imagecode' class="form-control" placeholder="输入图形验证码">
  61. <a href="javascript:;" class="input-group-btn imgverify" style="" ng-click="changeVerify()"><img ng-src="{{image}}" style="width: 127px; height: 32px;"/></a>
  62. </div>
  63. <div class="form-group">
  64. <input type="text" ng-model='smscode' class="form-control" placeholder="输入手机验证码">
  65. </div>
  66. {if empty($bind_mobile)}
  67. <div class="form-group">
  68. <input type="password" ng-model='password' class="form-control" placeholder="输入密码">
  69. </div>
  70. <div class="form-group">
  71. <input type="password" ng-model='repassword' class="form-control" placeholder="再次输入密码">
  72. </div>
  73. {/if}
  74. </div>
  75. <div class="modal-footer">
  76. <button type="button" class="btn btn-primary" ng-click="mobileBind(bindmobile.third_nickname, 3)">确定</button>
  77. <button type="button" class="btn smscodebtn-default" data-dismiss="modal">取消</button>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <!--end 账号绑定-->
  83. </table>
  84. </div>
  85. <script>
  86. angular.module('userProfile').value('config',{
  87. 'bindqq': {php echo !empty($bind_qq) ? json_encode($bind_qq) : 'null'},
  88. 'bindwechat': {php echo !empty($bind_wechat) ? json_encode($bind_wechat) : 'null'},
  89. 'bindmobile': {php echo !empty($bind_mobile) ? json_encode($bind_mobile) : 'null'},
  90. 'login_urls': {php echo !empty($support_login_urls) ? json_encode($support_login_urls) : 'null'},
  91. 'thirdlogin' : {php echo !empty($_W['setting']['thirdlogin']) ? json_encode($_W['setting']['thirdlogin']) : 'null'},
  92. 'bind_sign': "{php echo !empty($bind_sign) ? $bind_sign : 'null'}",
  93. 'image' : "{php echo url('utility/code')}",
  94. 'links':{
  95. 'img_verify_link': "{php echo url('utility/code')}",
  96. 'send_code_link': "{php echo url('utility/verifycode')}",
  97. 'valid_mobile_link' : "{php echo url('user/profile/validate_mobile')}",
  98. 'bind_mobile_link' : "{php echo url('user/profile/bind_mobile')}",
  99. 'unbind_third_link' : "{php echo url('user/profile/unbind')}",
  100. },
  101. });
  102. angular.bootstrap($('.bind-account'), ['userProfile']);
  103. </script>
  104. {template 'common/footer'}