user-center.html 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>创业帮</title>
  6. <meta name="keywords" content="创业帮">
  7. <meta name="description" content="创业帮">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="创业帮">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. </head>
  17. <body class="pb0 ovh bgcf5f5f5">
  18. <div class="user-center" id="app" v-cloak>
  19. <div class="loginbgc abs"></div>
  20. <van-pull-refresh class="user-centerxy iphonetitle" v-model="isLoading" @refresh="onRefresh" style="min-height:80vh;">
  21. <div class="pl16 pr16">
  22. <div class="index_title df mb6">
  23. <div class="title_mame mb f16 c333 mr12">{{merchantname}}</div><img src="./static/images/user-center-authmerchant.png" alt="" v-if="IsAuth === 2">
  24. </div>
  25. <div class="c333 f12">{{phonenumber}}</div>
  26. <div class="index_panel">
  27. <div class="money_count_icon df">
  28. <div class="f14 c333">总收益</div>
  29. </div>
  30. <div class="money_count_icon df mb money_count">
  31. <div class="f16 c333 mb6 mb">¥</div>
  32. <div class="count c333">{{moneycount}}</div>
  33. </div>
  34. <div class="money_count_detail df">
  35. <div class="data tc">
  36. <div class="c999 f12">订单总数</div>
  37. <div class="mb f16 mt6">{{ordercount}}</div>
  38. </div>
  39. <div class="line"></div>
  40. <div class="data tc">
  41. <div class="c999 f12">加入时间</div>
  42. <div class="mb f16 mt6">{{jointime}}</div>
  43. </div>
  44. <div class="line"></div>
  45. <div class="data tc">
  46. <div class="c999 f12">新增会员</div>
  47. <div class="mb f16 mt6">{{vipcount}}</div>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="index_panel bgcfff mt10">
  52. <div class="title df">
  53. <div class="mb c333 f16">常用工具</div>
  54. </div>
  55. <van-grid class="index_grid bgcfff" :column-num="3">
  56. <van-grid-item :icon="item.icon" :text="item.title" v-for="item,index in listdata" :key="index" @click="userclick(item.Url)"></van-grid-item>
  57. </van-grid>
  58. </div>
  59. </div>
  60. </van-pull-refresh>
  61. <van-dialog class="option" style="border-radius:4px;" v-model="dialogisshow" title="确定退出登录。" show-cancel-button @confirm="loginout" @cancel="dialogisshow = false"> </van-dialog>
  62. <van-tabbar v-model="active" active-color="#FF502A" v-cloak v-if="tabsisshow">
  63. <van-tabbar-item icon="home-o" @click="index">工作台
  64. <template #icon="props"><img :src="props.active ? icon1.active : icon1.inactive"></template>
  65. </van-tabbar-item>
  66. <van-tabbar-item icon="home-o" @click="management">经营数据
  67. <template #icon="props"><img :src="props.active ? icon2.active : icon2.inactive"></template>
  68. </van-tabbar-item>
  69. <van-tabbar-item icon="friends-o" @click="notice">消息
  70. <template #icon="props"><img :src="props.active ? icon3.active : icon3.inactive"></template>
  71. </van-tabbar-item>
  72. <van-tabbar-item icon="setting-o">我的
  73. <template #icon="props"><img :src="props.active ? icon4.active : icon4.inactive"></template>
  74. </van-tabbar-item>
  75. </van-tabbar>
  76. </div>
  77. <script src="./static/js/klm-vv.min.js"></script>
  78. <script src="./static/js/klm-axios-config.js"></script>
  79. <script>
  80. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  81. // 可以通过下面的方式手动注册
  82. Vue.use(vant.Lazyload);
  83. // 在 #app 标签下渲染一个按钮组件
  84. let app = new Vue({
  85. el: '#app',
  86. data() {
  87. return {
  88. isLoading:false,
  89. topisshow:false,
  90. dialogisshow:false,
  91. chosedate:1,
  92. active: 3,
  93. moneycount:0,
  94. jointime:'',
  95. ordercount:0,
  96. vipcount:0,
  97. merchantname:'',
  98. icon1: {
  99. active: './static/images/tab-icon1-active.png',
  100. inactive: './static/images/tab-icon1-no.png',
  101. },
  102. icon2: {
  103. active: './static/images/tab-icon2-active.png',
  104. inactive: './static/images/tab-icon2-no.png',
  105. },
  106. icon3: {
  107. active: './static/images/tab-icon3-active.png',
  108. inactive: './static/images/tab-icon3-no.png',
  109. },
  110. icon4: {
  111. active: './static/images/tab-icon4-active.png',
  112. inactive: './static/images/tab-icon4-no.png',
  113. },
  114. tabsisshow:false,
  115. listdata:[
  116. {icon:'./static/images/user-center-icon1.png',title:'常见问题',Url:'user-service-list'},
  117. {icon:'./static/images/user-center-icon2.png',title:'客服中心',Url:'user-feedback'},
  118. {icon:'./static/images/user-center-icon3.png',title:'合作协议',Url:'user-maker-agreement'},
  119. {icon:'./static/images/user-center-icon4.png',title:'关于创业帮',Url:'user-about'},
  120. {icon:'./static/images/user-center-icon5.png',title:'修改密码',Url:'user-forgetpwd'},
  121. {icon:'./static/images/user-center-icon6.png',title:'退出登录',Url:'loginout'},
  122. ],
  123. IsAuth:0,
  124. phonenumber:'',
  125. };
  126. },
  127. created() {
  128. this.tabsisshow = bottomtabisshow;
  129. this.getmerchantdetail();
  130. this.getmangementdata();
  131. },
  132. mounted(){
  133. },
  134. computed:{
  135. isnotice:function(){
  136. return PublicLib.getCookieInfo('noticeiscount') !== "";
  137. }
  138. },
  139. methods: {
  140. //- 获取商户详情
  141. async getmerchantdetail(){
  142. let Id = PublicLib.getCookieInfo('userId')
  143. const res = await getRequest('/api/v1/merchantinfo/detail?t='+Math.random(6),JSON.stringify({Id}));
  144. if(res.status !== '1') return tips(res.info);
  145. //- console.log(res);
  146. this.merchantname = res.data.Name;
  147. this.IsAuth = res.data.IsAuth;
  148. this.phonenumber = hidemiddlenum(res.data.Mobile,3,2);
  149. },
  150. //- 获取商户统计数据
  151. async getmangementdata(){
  152. let Id = PublicLib.getCookieInfo('userId')
  153. const res = await getRequest('/api/v1/merchantinfo/statdata?t='+Math.random(6),JSON.stringify({Id}));
  154. if(res.status !== '1') return tips(res.info);
  155. //- console.log(res);
  156. this.moneycount = res.data.TotalActual.toFixed(2);
  157. this.jointime = res.data.CreateDate;
  158. this.ordercount = res.data.TotalOrder;
  159. this.vipcount = res.data.TotalCustomer;
  160. },
  161. onRefresh(){
  162. this.isLoading = false;
  163. this.getmerchantdetail();
  164. this.getmangementdata();
  165. },
  166. userclick(Url){
  167. if(Url && Url === 'loginout'){
  168. this.dialogisshow = true;
  169. } else{
  170. PublicLib.Goto({Url});
  171. }
  172. },
  173. notice(){
  174. PublicLib.Goto({Url:'notice-center'});
  175. },
  176. management(){
  177. PublicLib.Goto({Url:'management'});
  178. },
  179. index(){
  180. PublicLib.Goto({Url:'index'});
  181. },
  182. loginout(){
  183. const id = PublicLib.getCookieInfo('userId');
  184. postRequest('/api/v1/users/logout',JSON.stringify({UserId:id}));
  185. PublicLib.putCookieInfo('userId', '');
  186. //- PublicLib.GoBack({Level:-1});
  187. PublicLib.Goto({Url:'user-login'});
  188. }
  189. }
  190. });
  191. </script>
  192. </body>
  193. </html>