user-leaderLevel-main.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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. <style>
  17. .screenroll::-webkit-scrollbar {
  18. display: none;
  19. }
  20. .bycloud{
  21. margin-left:0 !important;
  22. }
  23. .detailinfo{
  24. justify-content:space-between !important;
  25. }
  26. /*.mtr{
  27. text-align:right;
  28. }
  29. */
  30. .van-button__content{color:#323232;font-size:.4267rem;font-weight:500;}
  31. .jcsb{justify-content: space-between;}
  32. .jcse{justify-content: space-evenly;}
  33. .jccen{justify-content: center;}
  34. .performance_toppanel{height:6.32rem;}
  35. .f36{font-size:.96rem}
  36. .mt20{margin-top:.5333rem;}
  37. .mt4{margin-top: .1067rem;}
  38. .f20{font-size:.5333rem;}
  39. .ml8{margin-left: .2133rem;}
  40. .mt30{margin-top: .8rem;}
  41. .performance_panel{width:94%;margin:0;padding:0;left:3%;top:0;height:5.8133rem;}
  42. .small-title{color:#FD824D;height: .96rem;background-color: #FFEFE9;border-radius: 0.213333rem;}
  43. .van-button__text{color:#333 important;}
  44. .btn{width: 4rem;height: 1.0133rem}
  45. .singleBtn{width:74%;height:1.1733rem;}
  46. .funds-change{padding: .3733rem .4267rem 0;top:6.3267rem;width:91%}
  47. .record{padding:.4267rem 0;border-bottom: 1px solid #EEEEEE;}
  48. .ChangeAmt{color:#FF4C4C;}
  49. .select{margin:.48rem 0 0 0rem}
  50. .scorll-list{overflow-y: scroll;height:100%;}
  51. </style>
  52. </head>
  53. <body class="bgc-back pb0 ovh">
  54. <div class="iphonetitle"> </div>
  55. <div id="app" v-cloak>
  56. <van-nav-bar class="camp_title user_title_normal f16" title="盟主中心" @click-left="goback" v-if="toptitleisshow" left-arrow v-cloak>
  57. <template #left>
  58. <van-icon name="arrow-left" color="#333" size="20"></van-icon>
  59. </template>
  60. </van-nav-bar>
  61. <div class="rel">
  62. <div class="performance_toppanel ovh"></div>
  63. <div class="performance_panel bgcfff abs">
  64. <div class="small-title df aic jccen" @click="todetail"><img src="./static/images/samll-league-certification.png" alt="认证标签"><span class="f12 ml6" v-if="userInfo.LeaderLevel === 1">创业帮认证小盟主</span><span class="f12 ml6" v-if="userInfo.LeaderLevel === 2">创业帮认证大盟主</span>
  65. <van-icon class="ml8" name="arrow" color="#FD824D" size="8"></van-icon>
  66. </div>
  67. <div class="mt20 f14 c333 tc">盟主储蓄金(元)</div>
  68. <div class="mt4 f36 c333 tc">{{abs(userInfo.LeaderReserve)}}</div>
  69. <div class="mt30 df aic jcse">
  70. <van-button class="btn" @click="levelUp" round plain v-if="userInfo.LeaderLevel === 1">升级</van-button>
  71. <van-button class="btn" @click="topUp" round color="#FDD500" :class="{singleBtn:userInfo.LeaderLevel === 2}">购买储蓄金</van-button>
  72. </div>
  73. </div>
  74. <div class="funds-change bgcfff abs">
  75. <div class="f12 c333 select df jcsb aic">
  76. <div @click="showDate = true"><span class="f20">{{nowdate}}</span>
  77. <van-icon class="f12" name="arrow"> </van-icon>
  78. </div>
  79. <div class="f12 c999">扣减储蓄金提取至盟主的创客余额</div>
  80. </div>
  81. <div class="ovh-x" ref="warapper">
  82. <van-pull-refresh v-model="refreshing" @refresh="onRefresh" style="height:100%;min-height:10vh;">
  83. <van-empty class="custom-image" image="./static/images/empty-img.png" description="暂无数据" v-if="records.length === 0"></van-empty>
  84. <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad" error-text="请求失败,点击重新加载" v-else>
  85. <div class="record" v-for="(item,index) in records" :key="item.Id">
  86. <div class="df jcsb aic">
  87. <div class="f16 c333">{{item.Remark}}</div>
  88. <div class="f16 ChangeAmt"> <span v-if="item.ChangeType === 1">+</span><span v-else>-</span><span>{{abs(item.ChangeAmt)}}</span></div>
  89. </div>
  90. <div class="df jcsb aic mt8">
  91. <div class="f12 c999">{{item.CreateDate}}</div>
  92. <div class="f12 c999">储蓄金余额:{{abs(item.AfterAmt)}}</div>
  93. </div>
  94. </div>
  95. </van-list>
  96. </van-pull-refresh>
  97. </div>
  98. </div>
  99. <van-popup v-model="showDate" position="bottom" :style="{ height: '50%' }">
  100. <van-datetime-picker v-model="currentDate" type="year-month" :min-date="minDate" :max-date="maxDate" :formatter="formatter" @cancel="showDate = false" @confirm="onConfirmDate"></van-datetime-picker>
  101. </van-popup>
  102. </div>
  103. </div>
  104. <script src="./static/js/klm-vv.min.js"></script>
  105. <script src="./static/js/appfunc.min.js"></script>
  106. <script src="./static/js/klm-axios-config.js"></script>
  107. <script src="./static/js/publicfn.js"></script>
  108. <script>
  109. function OnStart(){
  110. app.getUserInfo()
  111. app.onConfirmDate();
  112. };
  113. let app = new Vue({
  114. el: '#app',
  115. data() {
  116. return {
  117. refreshing: false,
  118. toptitleisshow:true,
  119. isme:false,
  120. ismelist:[
  121. 14,1,598
  122. ],
  123. showDate: false,
  124. currentDate: new Date(),
  125. minDate: new Date(new Date().getFullYear(),(new Date().getMonth() - 5)),
  126. maxDate: new Date(),
  127. nowdate: '',
  128. savingFund:66666.00,
  129. loading:false,
  130. finished:false,
  131. error:false,
  132. currentDate: new Date(),
  133. userInfo:{
  134. LeaderReserve:0,
  135. LeaderLevel:2,
  136. },
  137. PageInfo:{
  138. PageSize:10,
  139. PageNum:1,
  140. },
  141. records:[
  142. ]
  143. };
  144. },
  145. created(){
  146. this.getUserInfo()
  147. this.onConfirmDate();
  148. },
  149. mounted(){
  150. setTimeout(()=>{
  151. let select = document.getElementsByClassName('select')[0]
  152. this.$refs.warapper.style.height = `calc(100vh - ${select.getBoundingClientRect().bottom}px)`
  153. });
  154. },
  155. methods: {
  156. onRefresh() {
  157. console.log('refresh')
  158. this.PageInfo.PageNum = 1
  159. this.getRecordList('refresh');
  160. this.refreshing = false
  161. //- setTimeout(()=>{
  162. //- this.records.splice(0,this.records.length)
  163. //- this.refreshing = false
  164. //- },1000)
  165. },
  166. todetail(){
  167. PublicLib.Goto({Url:'user-leaderLevel-rules'});
  168. },
  169. formatter(type, val) {
  170. if (type === 'year') {
  171. return `${val}年`;
  172. } else if (type === 'month') {
  173. return `${val}月`;
  174. } else if (type === 'day') {
  175. return `${val}日`;
  176. }
  177. return val;
  178. },
  179. onConfirmDate() {
  180. this.showDate = false;
  181. this.nowdate = this.currentDate.getFullYear() + '-' + (this.currentDate.getMonth() + 1);
  182. this.PageInfo.PageNum = 1
  183. this.getRecordList('refresh')
  184. },
  185. onConformateDate(){
  186. return fillzero(formatDate(this.currentDate.getFullYear(),this.currentDate.getMonth() + 1));
  187. },
  188. trendpic(val){
  189. PublicLib.putCookieInfo('trendtype', val);
  190. PublicLib.Goto({Url:'product-trendchart'});
  191. },
  192. goback(){
  193. PublicLib.GoBack({Level:1});
  194. },
  195. levelUp(){
  196. PublicLib.putCookieInfo('BuyType',1);
  197. PublicLib.Goto({Url:'user-leaderLevel-buy'});
  198. },
  199. topUp(){
  200. PublicLib.putCookieInfo('BuyType',2);
  201. PublicLib.putCookieInfo('LeaderLevel',this.userInfo.LeaderLevel);
  202. PublicLib.Goto({Url:'user-leaderLevel-buy'});
  203. },
  204. onLoad(){
  205. console.log('onload')
  206. this.PageInfo.PageNum++
  207. //- setTimeout(()=>{
  208. //- //- this.records.push(...this.records)
  209. //- this.loading = false
  210. //- },2000)
  211. this.getRecordList()
  212. },
  213. async getUserInfo(){
  214. const UserId = PublicLib.getCookieInfo('userId');
  215. const res = await getRequest('api/v1/users/leaderinfo?='+Math.random(6),JSON.stringify({UserId}));
  216. if(res.status === '1'){
  217. this.userInfo = res.data
  218. }else{
  219. return tips('网络错误,请重试')
  220. }
  221. },
  222. async getRecordList(type='onload'){
  223. const UserId = PublicLib.getCookieInfo('userId');
  224. let TradeMonth = this.onConformateDate()
  225. const res = await getRequest('api/v1/leaderreserverecord/list?='+Math.random(6),JSON.stringify({UserId,TradeMonth,...this.PageInfo}));
  226. if(res.status === '1'){
  227. if(type === 'refresh'){
  228. this.finished = false
  229. this.records = res.data
  230. }
  231. if(type === 'onload'){
  232. if(res.data.length < this.PageInfo.PageNum){
  233. this.finished = true
  234. }
  235. this.records.push(...res.data)
  236. this.loading = false
  237. }
  238. }else{
  239. this.error = true
  240. return tips('网络错误,请重试')
  241. }
  242. }
  243. }
  244. });
  245. </script>
  246. </body>
  247. </html>