vipDetail.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. <template>
  2. <view class="content">
  3. <view class="headr">
  4. <view class="money-box">
  5. <view class="body-title">
  6. <view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
  7. <view class="header">曝光量</view>
  8. </view>
  9. </view>
  10. <!-- <view class="uni-input choose-time" @click="show = true">{{ now_date }}</view> -->
  11. <view class="month">
  12. <image src="../../static/icon/sdata.png" mode=""></image>
  13. <view class="store-data">
  14. <view class="data">{{ num }}</view>
  15. <view class="tit">总曝光量</view>
  16. </view>
  17. </view>
  18. </view>
  19. <view class="list-wrapper">
  20. <scroll-view scroll-y="true" :style="{ height: height }" class="swiper-box" @scrolltolower="loadData">
  21. <!-- 空白页 -->
  22. <view v-for="(item, index) in 10" class="item flex">
  23. <view class="item-left">
  24. <view class="item-avator"><image src="../../static/error/missing-face.png" mode=""></image></view>
  25. <view class="item-info">
  26. <view class="item-name">成攻闪拓(黄岩店)</view>
  27. <view class="address">浙江台州市椒江区市府大道124号</view>
  28. </view>
  29. </view>
  30. <view class="item-right">
  31. 曝光量:
  32. <text>200</text>
  33. </view>
  34. </view>
  35. <uni-load-more :status="loadingType"></uni-load-more>
  36. </scroll-view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  42. import empty from '@/components/empty';
  43. // import { merchantList } from '@/api/merchant.js';
  44. export default {
  45. data() {
  46. return {
  47. show: false, //日历
  48. is_show: false, //搜索是否显示
  49. keyword: '', //搜索关键字
  50. height: '', //滚动区域高度
  51. dataList: [], //月订单
  52. num: 0, //订单总数
  53. loadingType: 'more',
  54. page: 1,
  55. limit: 10,
  56. real_name: ''
  57. };
  58. },
  59. components: {
  60. empty,
  61. uniLoadMore
  62. },
  63. onReady(res) {
  64. var _this = this;
  65. uni.getSystemInfo({
  66. success: resu => {
  67. const query = uni.createSelectorQuery();
  68. query.select('.list-wrapper').boundingClientRect();
  69. query.exec(function(res) {
  70. console.log(res, 'ddddddddddddd');
  71. _this.height = resu.windowHeight - res[0].top + 'px';
  72. console.log('打印页面的剩余高度', _this.height);
  73. });
  74. },
  75. fail: res => {}
  76. });
  77. },
  78. onLoad() {
  79. // this.loadData();
  80. },
  81. methods: {
  82. bindDateChange(e) {
  83. console.log(e);
  84. this.now_date = e.detail.value;
  85. this.loadingType = 'more';
  86. this.page = 1;
  87. this.dataList = [];
  88. this.loadData();
  89. },
  90. showInput() {
  91. this.is_show = true;
  92. },
  93. search() {
  94. console.log('search');
  95. this.real_name = this.keyword;
  96. this.dataList = [];
  97. this.page = 1;
  98. this.loadingType = 'more';
  99. this.loadData();
  100. },
  101. loadData() {
  102. let obj = this;
  103. console.log('加载数据');
  104. if (obj.loadingType == 'noMore' || obj.loadingType == 'loading') {
  105. return;
  106. }
  107. obj.loadingType = 'loading';
  108. console.log(obj.now_date);
  109. merchantList({ page: obj.page, limit: obj.limit, data: obj.now_date, real_name: obj.real_name }).then(({ data }) => {
  110. console.log(data);
  111. obj.num = data.count;
  112. obj.dataList = obj.dataList.concat(data.data);
  113. obj.page++;
  114. if (data.data.length == obj.limit) {
  115. obj.loadingType = 'more';
  116. } else {
  117. obj.loadingType = 'noMore';
  118. }
  119. });
  120. },
  121. toBack() {
  122. uni.navigateBack({});
  123. },
  124. bindDateChange(e) {
  125. console.log(e.detail, 'dddddddddddd');
  126. this.now_date = e.detail.value;
  127. }
  128. }
  129. };
  130. </script>
  131. <style lang="scss" scoped>
  132. page {
  133. background-color: #f5f5f5;
  134. }
  135. .headr {
  136. height: 468rpx;
  137. background: linear-gradient(180deg, #ff4c4c 0%, #ff7474 100%);
  138. position: relative;
  139. .money-box {
  140. padding-top: var(--status-bar-height);
  141. color: #ffffff;
  142. text-align: center;
  143. justify-content: center;
  144. position: relative;
  145. .body-title {
  146. height: 80rpx;
  147. text-align: center;
  148. font-size: 35rpx;
  149. position: relative;
  150. .header {
  151. position: absolute;
  152. left: 0;
  153. top: 0;
  154. width: 100%;
  155. font-size: 36rpx;
  156. font-family: PingFang SC;
  157. font-weight: bold;
  158. color: #fffeff;
  159. height: 80rpx;
  160. font-size: 32rpx;
  161. font-weight: 700;
  162. z-index: 9;
  163. display: flex;
  164. justify-content: center;
  165. align-items: center;
  166. }
  167. .goback-box {
  168. position: absolute;
  169. z-index: 10;
  170. left: 24rpx;
  171. top: 0;
  172. height: 80rpx;
  173. display: flex;
  174. align-items: center;
  175. }
  176. .goback {
  177. width: 30rpx;
  178. height: 36rpx;
  179. }
  180. }
  181. }
  182. .time {
  183. width: 100%;
  184. color: #ffffff;
  185. padding-left: 30rpx;
  186. font-size: 28rpx;
  187. }
  188. .month {
  189. position: absolute;
  190. top: 40rpx;
  191. bottom: 0;
  192. left: 0;
  193. right: 0;
  194. margin: auto;
  195. height: 275rpx;
  196. width: 275rpx;
  197. image {
  198. width: 100%;
  199. height: 100%;
  200. }
  201. .store-data {
  202. position: absolute;
  203. height: 275rpx;
  204. width: 275rpx;
  205. text-align: center;
  206. color: #fff;
  207. top: 0;
  208. display: flex;
  209. flex-direction: column;
  210. align-items: center;
  211. justify-content: center;
  212. .data {
  213. font-size: 50rpx;
  214. font-family: PingFang SC;
  215. font-weight: bold;
  216. color: #ffffff;
  217. padding-bottom: 20rpx;
  218. }
  219. .tit {
  220. font-size: 30rpx;
  221. font-family: PingFang SC;
  222. font-weight: 500;
  223. color: #ffffff;
  224. }
  225. }
  226. }
  227. }
  228. .list-wrapper {
  229. margin-top: 24rpx;
  230. }
  231. .item {
  232. width: 710rpx;
  233. background: #ffffff;
  234. box-shadow: 0px 5rpx 5rpx 0px rgba(35, 24, 21, 0.06);
  235. border-radius: 10rpx;
  236. margin: 0 auto 20rpx;
  237. padding: 26rpx 30rpx 26rpx 20rpx;
  238. .item-left {
  239. display: flex;
  240. justify-content: start;
  241. align-items: center;
  242. .item-avator {
  243. width: 120rpx;
  244. height: 120rpx;
  245. image {
  246. width: 100%;
  247. height: 100%;
  248. }
  249. }
  250. .item-info {
  251. margin-left: 10rpx;
  252. line-height: 1;
  253. .item-name {
  254. font-size: 30rpx;
  255. font-family: PingFang SC;
  256. font-weight: 500;
  257. color: #333333;
  258. }
  259. .address {
  260. font-size: 21rpx;
  261. font-family: PingFang SC;
  262. font-weight: 500;
  263. color: #666666;
  264. margin-top: 20rpx;
  265. }
  266. }
  267. }
  268. .item-right {
  269. font-size: 28rpx;
  270. font-family: PingFang SC;
  271. font-weight: 500;
  272. color: #999999;
  273. text {
  274. color: #ff4c4c;
  275. }
  276. }
  277. }
  278. </style>