creater-list1.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  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="bgcfff pb0 ovh">
  18. <div class="iphonetitle"> </div>
  19. <div id="app" v-cloak>
  20. <van-nav-bar class="camp_title user_title_normal f16" title="我的创客" left-arrow @click-left="goindex" v-if="toptitleisshow">
  21. <template #left>
  22. <van-icon name="arrow-left" color="#333" size="20"></van-icon>
  23. </template>
  24. </van-nav-bar>
  25. <div class="merchant-header merchant-header-back"></div>
  26. <div class="creater-list ml16 mr16 bgcfff" v-cloak>
  27. <div class="pt16 pb16 pl16 pr16">
  28. <van-row>
  29. <van-col span="12">
  30. <div class="tc">
  31. <div class="f18 c333 b mb6">2</div>
  32. <div class="f12 c999">创客总数</div>
  33. </div>
  34. </van-col>
  35. <van-col span="12">
  36. <div class="tc">
  37. <div class="f18 c333 b mb6">{{Number(createrinfo.ThisMonthCount)}}</div>
  38. <div class="f12 c999">当月新增</div>
  39. </div>
  40. </van-col>
  41. </van-row>
  42. <div class="creater-total mt16 pt8 pb8 pl16 pr16 bgcfff">
  43. <div class="df">
  44. <div class="flex1">
  45. <div class="df">
  46. <div class="flex1 f12 c999">已实名总数</div>
  47. <div class="tr">
  48. <div class="f12 c333">{{createrinfo.AuthCount}}</div>
  49. </div>
  50. </div>
  51. </div><span class="split ml16 mr16"></span>
  52. <div class="flex1" @click="norealauth">
  53. <div class="df">
  54. <div class="flex1 f12 c999">未实名总数</div>
  55. <div class="tr">
  56. <div class="f12 c333">{{createrinfo.NotAuthCount}}&nbsp;&nbsp;&nbsp;&gt;</div>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="creater-list-wrapper mt16" v-cloak>
  65. <van-sticky>
  66. <div class="pl16 mr16 pt8 pb8 bgcfff">
  67. <div class="df">
  68. <div class="f14 c333 b">已实名创客</div>
  69. <div class="flex1 tr"></div>
  70. </div>
  71. </div>
  72. <div class="bb8f7f7f7 bgcfff"></div>
  73. </van-sticky>
  74. <div class="creator_active">
  75. <van-pull-refresh v-model="refreshing" @refresh="onRefresh" :class="creaters.length === 0 ? 'isnodata':''" style="min-height: 50vh;">
  76. <van-list v-model="loading" :finished="finished" finished-text="" @load="onLoad" :immediate-check="false">
  77. <van-empty class="custom-image" image="./static/images/empty-img.png" description="暂无数据" v-if="isnodata"></van-empty>
  78. <van-cell-group :border="false">
  79. <van-cell v-for="item,index in creaters" center>
  80. <template #icon>
  81. <div class="mr12">
  82. <van-image :src="item.HeadPhoto" fit="cover" lazy-load round v-if="item.HeadPhoto">
  83. <template v-slot:loading><img src="./static/images/user-img@3x.png" alt="" width="100%"></template>
  84. </van-image>
  85. </div>
  86. </template>
  87. <template #title><span class="f14 c333 mr12 vb">{{item.RealName}}</span><span class="f12 c999 vb">注册时间:{{item.CreateDate}}</span></template>
  88. <template #label>
  89. <div class="f12 c999">本月交易额(元):{{Number(item.ThisMonthTrade) | tofixed2}}</div>
  90. </template>
  91. </van-cell>
  92. </van-cell-group>
  93. </van-list>
  94. </van-pull-refresh>
  95. </div>
  96. </div>
  97. <van-popup class="filterPop" v-model="showFilter" position="bottom" :style="{ height: '80%' }" closeable close-icon-position="top-left" v-cloak>
  98. <div class="tc pt16 rel">
  99. <div class="f16 c333">筛选</div>
  100. </div>
  101. <div class="pt32 pl16 pr16">
  102. <div class="f14 c999">交易额排序</div>
  103. <div class="df dropdown-button mt8">
  104. <van-button plain v-for="item,index in option" :class="sorttype == item.Id ? 'dropdown-button__active' : ''" @click="onSelectOption(item,index,0)">{{item.text}}</van-button>
  105. </div>
  106. </div>
  107. <div class="pt16 pl16 pr16">
  108. <div class="f14 c999">注册时间排序</div>
  109. <div class="df dropdown-button mt8">
  110. <van-button plain v-for="item,index in option1" :class="sorttype == item.Id ? 'dropdown-button__active' : ''" @click="onSelectOption(item,index,0)">{{item.text}}</van-button>
  111. </div>
  112. </div>
  113. <div class="pt16 pl16 pr16">
  114. <div class="f14 c999">创客职级</div>
  115. <div class="df dropdown-button dropdown-button-4 mt8">
  116. <van-button plain v-for="item,index in option2" :class="selectedOption2 == item.Id ? 'dropdown-button__active' : ''" @click="onSelectOption(item,index,2)">{{item.Name}}</van-button>
  117. </div>
  118. </div>
  119. <van-goods-action class="mall-bottom">
  120. <van-goods-action-button color="#eee" style="color:#333" type="warning" text="重置" @click="resetbtn"></van-goods-action-button>
  121. <van-goods-action-button type="danger" text="确认" @click="onClickButton"></van-goods-action-button>
  122. </van-goods-action>
  123. </van-popup>
  124. </div>
  125. <script src="./static/js/klm-vv.min.js"></script>
  126. <script src="./static/js/appfunc.min.js"></script>
  127. <script src="./static/js/klm-axios-config.js"></script>
  128. <script src="./static/js/publicfn.js"></script>
  129. <script>
  130. function OnStart(){
  131. PublicLib.SetStatusBarStyle({type:'light', isShow:1});
  132. };
  133. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  134. // 可以通过下面的方式手动注册
  135. Vue.use(vant.Lazyload);
  136. //--- PublicLib.SetStatusBarStyle({type:'light', isShow:1});
  137. // 在 #app 标签下渲染一个按钮组件
  138. let app = new Vue({
  139. el: '#app',
  140. data() {
  141. return {
  142. isnodata:false,
  143. toptitleisshow:true,
  144. userInfo:{},
  145. showFilter: false,
  146. creaters: [],
  147. sorttype: 1,
  148. selectedOption2: 0,
  149. option: [
  150. { text: '由高到低(默认)', Id: 1 },
  151. ],
  152. option1: [
  153. { text: '由近到远(默认)', Id: 2 },
  154. ],
  155. option2: [
  156. { Name: '全部', Id: 0 },
  157. ],
  158. loading: false,
  159. finished: false,
  160. refreshing: false,
  161. pageinfo:{
  162. PageSize:10,
  163. PageNum:1
  164. },
  165. createrinfo:{
  166. MakerTotal:'',
  167. ThisMonthCount:'',
  168. AuthCount:'',
  169. NotAuthCount:'',
  170. },
  171. };
  172. },
  173. created() {
  174. //- this.getsuerinfo();
  175. this.getcreatelist();
  176. this.getranklist();
  177. this.getscreaterinfo();
  178. },
  179. methods: {
  180. //- 点击筛选
  181. onShowFilter(){
  182. this.showFilter = !this.showFilter;
  183. },
  184. onLoad() {
  185. if (this.refreshing) {
  186. this.creaters = [];
  187. this.refreshing = false;
  188. }
  189. this.pageinfo.PageNum++;
  190. this.getcreatelist();
  191. },
  192. onRefresh() {
  193. this.pageinfo.PageNum = 0;
  194. // 清空列表数据
  195. this.creaters = [];
  196. this.finished = false;
  197. // 重新加载数据
  198. // 将 loading 设置为 true,表示处于加载状态
  199. this.loading = true;
  200. this.onLoad();
  201. },
  202. //- 条件选择函数
  203. onSelectOption(item,index,num) {
  204. switch(num){
  205. case 0:
  206. this.sorttype = item.Id;
  207. break;
  208. case 2:
  209. this.selectedOption2 = item.Id;
  210. break;
  211. };
  212. },
  213. //- 点击确定筛选
  214. onClickButton() {
  215. this.showFilter = false;
  216. this.creaters = [];
  217. this.getcreatelist();
  218. },
  219. //- 重置
  220. resetbtn(){
  221. this.sorttype = 1;
  222. this.selectedOption2 = 0;
  223. },
  224. //- 获取职级列表
  225. async getranklist(){
  226. const res = await getRequest('api/v1/userlevelset/list',JSON.stringify({PageSize:10,PageNum:1}));
  227. if(res.status !== '1') return tips('获取职级列表失败,请重试!');
  228. this.option2.push(...res.data);
  229. },
  230. //- 获取创客列表
  231. async getcreatelist(){
  232. //- const UserId = PublicLib.getCookieInfo('userId');
  233. //- const res = await getRequest('api/v1/users/mymakerlist',JSON.stringify({...this.pageinfo,UserLevel:this.selectedOption2,RealName:'',UserId,Sort:this.sorttype}));
  234. //- if(res.status !== '1') return tips('获取创客列表失败,请重试!');
  235. //- if(res.data.length<this.pageinfo.PageSize) {
  236. //- this.finished = true;
  237. //- };
  238. let res={data:[
  239. {HeadPhoto:'./static/images/user-img@3x.png',RealName:'谢程',CreateDate:'2022-01-22',ThisMonthTrade:1652.06},
  240. {HeadPhoto:'./static/images/user-img@3x.png',RealName:'张晟源',CreateDate:'2022-01-29',ThisMonthTrade:893.58},
  241. ]
  242. };
  243. this.creaters.push(...res.data);
  244. this.loading = false;
  245. if(this.creaters.length === 0) {this.isnodata = true}else{this.isnodata = false};
  246. },
  247. //- 获取用户个人信息
  248. async getsuerinfo(){
  249. PublicLib.ShowLoading({Message:''});
  250. const UserId = PublicLib.getCookieInfo('userId');
  251. const res = await getRequest('api/v1/users/personalinfo',JSON.stringify({Id:UserId}));
  252. if(res.status !== '1') return tips('获取个人信息失败,请重试!');
  253. PublicLib.HideLoading();
  254. this.userInfo = res.data;
  255. },
  256. //- 获取用户创客信息
  257. async getscreaterinfo(){
  258. const UserId = PublicLib.getCookieInfo('userId');
  259. const res = await getRequest('api/v1/users/mymakerdata',JSON.stringify({UserId}));
  260. if(res.status !== '1') return tips('获取创客信息失败,请重试!');
  261. this.createrinfo = res.data;
  262. },
  263. gosearch(){
  264. PublicLib.Goto({Url:'creater-search'});
  265. },
  266. norealauth(){
  267. PublicLib.Goto({Url:'creater-norealauth1'});
  268. PublicLib.putCookieInfo('norealauth', Number(this.createrinfo.NotAuthCount));
  269. },
  270. getcreaterdetail(id){
  271. id = id ? id : PublicLib.getCookieInfo('userId');
  272. PublicLib.putCookieInfo('querycreaterid', id);
  273. PublicLib.Goto({Url:'maker-details-echarts'});
  274. },
  275. goindex(){
  276. PublicLib.GoBack({Level:1});
  277. }
  278. }
  279. });
  280. </script>
  281. </body>
  282. </html>