account-setting.html 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <meta name="author" content=""/>
  6. <meta name="description" content=""/>
  7. <meta name="keywords" content="扫码支付,线上投币,运营数据,物联网"/>
  8. <meta name="format-detection" content="telphone=no,email=no"/>
  9. <meta name="viewport"
  10. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
  11. <meta http-equiv="pragma" content="no-cache">
  12. <meta http-equiv="cache-control" content="no-cache">
  13. <meta http-equiv="expires" content="0">
  14. <title>代理商账号设置</title>
  15. <link rel="stylesheet" href="/components/lib/mui.min.css"/>
  16. <link rel="stylesheet" href="/components/custom/css/common.css"/>
  17. <link rel="stylesheet" href="/app/css/xyf.common.min.css">
  18. <style>
  19. </style>
  20. </head>
  21. <body>
  22. <div class="mui-content" style="bottom: 0;top: 0;width: 100%;padding-bottom: 60px;">
  23. <ul class="mui-table-view account-hd">
  24. <li class="mui-table-view-cell mui-media" id="userInfo">
  25. <img id="headImg" src="/app/img/headImg.jpg" class="mui-media-object mui-pull-left">
  26. <div class="mui-media-body">
  27. <span id="name"></span>
  28. <p class='mui-ellipsis' id="telephone"></p>
  29. </div>
  30. </li>
  31. </ul>
  32. <ul class="mui-table-view custom-top account-bd">
  33. <li class="mui-table-view-cell">
  34. <a class="mui-navigate-right" href="javascript:goWallet()">
  35. <i class="iconfont icon-wallet c-primary"></i>钱包
  36. <span class="mui-pull-right custom-right" id="balance">余额&nbsp;0.00元</span>
  37. </a>
  38. </li>
  39. <li class="mui-table-view-cell">
  40. <a href="password-newpass.html" class="mui-navigate-right">
  41. <i class="iconfont icon-password c-red"></i>设置密码
  42. </a>
  43. </li>
  44. <li class="mui-table-view-cell">
  45. <a href="account-config.html" class="mui-navigate-right">
  46. <i class="iconfont icon-setting c-primary"></i>功能配置
  47. </a>
  48. </li>
  49. </ul>
  50. <ul class="mui-table-view custom-top account-bd">
  51. <li class="mui-table-view-cell">
  52. <a href="brand-setting.html" class="mui-navigate-right">
  53. <i class="iconfont icon-member-vip c-orange"></i>品牌设置
  54. </a>
  55. </li>
  56. <!-- 暂时屏蔽, 厂商时没有客服电话配置的
  57. <li class="mui-table-view-cell">
  58. <a class="mui-navigate-right" href="javascript:goHelp()">
  59. <i class="iconfont icon-service c-blue"></i>客服帮助
  60. <span class="mui-pull-right custom-right"></span>
  61. </a>
  62. </li>
  63. -->
  64. </ul>
  65. <div class="custom-top">
  66. <a href="javascript:void(0);" onclick="logout()" class="custom-btn-vertical">退出账号</a>
  67. </div>
  68. </div>
  69. <div id="serviceMenu" class="mui-popover mui-popover-action mui-popover-bottom">
  70. <ul class="mui-table-view">
  71. <li class="mui-table-view-cell">
  72. <a href="javascript:;" id="servicePhone">拨打电话</a>
  73. </li>
  74. <li class="mui-table-view-cell">
  75. <a href="javascript:$('#pop_box').show();" id="serviceQRCode">微信联系</a>
  76. </li>
  77. </ul>
  78. <ul class="mui-table-view">
  79. <li class="mui-table-view-cell">
  80. <a class="font-bold">取消</a>
  81. </li>
  82. </ul>
  83. </div>
  84. <!--客服二维码弹窗-->
  85. <div id="pop_box" class="pop-box">
  86. <div class="pop-bg" id="close_pop_btn"></div>
  87. <div class="pop-con">
  88. <div class="pop-tit">长按二维码关注公众号</div>
  89. <div class="pop-img"><img id="qrCodeImg" src="" alt=""><span
  90. class="img-title">管理后台公众号</span></div>
  91. </div>
  92. </div>
  93. </body>
  94. <script src="/components/lib/jquery.min.js?v=1"></script>
  95. <script src="/components/lib/mui.min.js"></script>
  96. <script src="/components/lib/clipboard.min.js"></script>
  97. <script src="/components/custom/js/common.js"></script>
  98. <script src="/app/js/xyf.common.js"></script>
  99. <script>
  100. window.initAgentNav && initAgentNav('account');
  101. var popBox = $("#pop_box"),
  102. closeBtn = $("#close_pop_btn")
  103. closeBtn.on("click", function (evt) {
  104. popBox.hide();
  105. evt.stopPropagation()
  106. });
  107. //底部菜单事件
  108. mui('.mui-popover-action').on('click', 'a', function () {
  109. mui('#serviceMenu').popover('toggle');
  110. });
  111. function goHelp() {
  112. if (noServiceInfo) {
  113. mui.alert('您的代理商没有留下联系方式')
  114. } else {
  115. mui('#serviceMenu').popover('toggle');
  116. }
  117. }
  118. var noServiceInfo = false;
  119. var agentId = null;
  120. $(function () {
  121. //获取用户个人信息
  122. showLoading();
  123. sendRequest("/agent/accountInfo", "GET", null, function (response) {
  124. hideLoading();
  125. if (response.result == 1) {
  126. var payload = response.payload
  127. $("#headImg").attr("src", payload.avatar);
  128. $("#name").html(payload.nickname);
  129. $("#telephone").html(payload.username);
  130. $("#balance").html("余额&nbsp;" + payload.balance + "元");
  131. agentId = payload.agentId;
  132. var servicePhone = payload.servicePhone;
  133. var qrCode = payload.serviceQrcodeUrl;
  134. //客服电话显示
  135. if (servicePhone) {
  136. $("#servicePhone").attr("href", "tel:" + servicePhone).html("拨打电话:" + servicePhone);
  137. } else {
  138. $("#servicePhone").parent().hide();
  139. }
  140. //代理商客服二维码
  141. if (qrCode) {
  142. $("#qrCodeImg").attr("src", qrCode);
  143. } else {
  144. $("#serviceQRCode").parent().hide()
  145. }
  146. if (!servicePhone && !qrCode) {
  147. noServiceInfo = true
  148. }
  149. } else {
  150. mui.toast(response.description);
  151. }
  152. });
  153. });
  154. function goWallet() {
  155. location.href = "/agents/wallet/wallet.html";
  156. }
  157. function logout() {
  158. var btnArray = ['取消', '确认'];
  159. mui.confirm('确定要退出当前账号?', '温馨提示', btnArray, function (e) {
  160. if (e.index == 1) {
  161. sendRequest("/agent/logout", "POST", null, function (response) {
  162. if (response.result == 1) {
  163. sessionStorage.clear();//清除缓存
  164. var url = "login.html";
  165. goPage(url);
  166. } else {
  167. mui.toast(response.description);
  168. }
  169. });
  170. }
  171. });
  172. }
  173. </script>
  174. </html>