merchant-sign.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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="bgc-back ovh pt0" style="padding-top:0;">
  18. <div class="merchant_sign" id="app" ref="container" v-cloak>
  19. <van-nav-bar left-arrow title="暂存箱" @click-left="goback" v-if="toptitleisshow">
  20. <template #left>
  21. <van-icon name="arrow-left"> </van-icon>
  22. </template>
  23. </van-nav-bar>
  24. <div class="merchant-sign-tabs">
  25. <van-pull-refresh v-model="refreshing" @refresh="onRefresh" :class="merchantlist.length === 0 ? 'isnodata':''">
  26. <van-list v-model="loading" :finished="finished" finished-text="没有更多数据了" @load="onLoad" :immediate-check="false">
  27. <van-empty class="custom-image" image="./static/images/empty-img.png" description="暂无数据" v-if="isnodata"></van-empty>
  28. <van-cell-group>
  29. <van-cell v-for="item in merchantlist" @click="godetail(item.Id)">
  30. <template #title>
  31. <div class="df">
  32. <div class="icon df" v-if="item.type === 1">企</div>
  33. <div class="icon df personle" v-else>个</div>
  34. <div class="comname f14">{{item.name}}
  35. <div class="f12 c999">进件时间:{{item.time}}</div>
  36. </div>
  37. </div>
  38. </template>
  39. <template #default>
  40. <div class="df center">
  41. <div class="f14 c999">继续创建</div><img class="going" src="./static/images/sign-going.png" alt="">
  42. </div>
  43. </template>
  44. </van-cell>
  45. </van-cell-group>
  46. </van-list>
  47. </van-pull-refresh>
  48. </div>
  49. </div>
  50. <script src="./static/js/klm-vv.min.js"></script>
  51. <script src="./static/js/appfunc.min.js"></script>
  52. <script src="./static/js/klm-axios-config.js"></script>
  53. <script src="./static/js/publicfn.js"></script>
  54. <script>
  55. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  56. // 可以通过下面的方式手动注册
  57. Vue.use(vant.Lazyload);
  58. Vue.use(vant.Dialog);
  59. // 在 #app 标签下渲染一个按钮组件
  60. let app = new Vue({
  61. el: '#app',
  62. data() {
  63. return {
  64. isnodata:false,
  65. toptitleisshow:true,
  66. merchantlist:[
  67. {
  68. id:1,
  69. name:'阿里巴巴集团有限公司',
  70. time:'21-3-19 18:39:24',
  71. type: 1,
  72. status:1,
  73. },
  74. {
  75. id:2,
  76. name:'阿里巴巴集团有限公司',
  77. time:'21-3-19 18:39:24',
  78. type: 2,
  79. status:2,
  80. },
  81. {
  82. id:13,
  83. name:'阿里巴巴集团有限公司',
  84. time:'21-3-19 18:39:24',
  85. type: 1,
  86. status:3,
  87. },
  88. ],
  89. loading: false,
  90. finished: false,
  91. refreshing: false,
  92. pageinfo:{
  93. PageSize:10,
  94. PageNum:1
  95. },
  96. };
  97. },
  98. created(){
  99. },
  100. mounted() {
  101. },
  102. methods: {
  103. godetail(id){
  104. PublicLib.putCookieInfo('merchantsignId', id);
  105. PublicLib.Goto({Url:'merchant-sign-detail'});
  106. },
  107. goback(){
  108. PublicLib.GoBack({Level:1});
  109. },
  110. onLoad() {
  111. if (this.refreshing) {
  112. this.merchantlist = [];
  113. this.refreshing = false;
  114. this.pageinfo.PageNum = 0;
  115. };
  116. this.pageinfo.PageNum++;
  117. this.getmerchantlist();
  118. },
  119. onRefresh() {
  120. // 清空列表数据
  121. this.finished = false;
  122. // 重新加载数据
  123. // 将 loading 设置为 true,表示处于加载状态
  124. this.loading = true;
  125. this.onLoad();
  126. },
  127. //- 获取暂存列表
  128. async getmerchantlist(Sort){
  129. //- PublicLib.ShowLoading({Message:''});
  130. const UserId = PublicLib.getCookieInfo('userId');
  131. const res = await getRequest('api/v1/merchantinfo/mymerchant?t='+Math.random(6),JSON.stringify({}));
  132. if(res.status !== '1') return tips('获取商户列表失败,请重试!');
  133. //- PublicLib.HideLoading();
  134. if(res.data.length < this.pageinfo.PageSize) {
  135. this.finished = true;
  136. };
  137. this.merchantlist.push(...res.data);
  138. this.loading = false;
  139. if(this.merchantlist.length === 0) {this.isnodata = true}else{this.isnodata = false};
  140. },
  141. }
  142. });
  143. </script>
  144. </body>
  145. </html>