videolist.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <view>
  3. <view class="listbox grid col-2">
  4. <block v-for="(item,index) in plist" :key="index">
  5. <view class="cu-card case vitembox" @tap="goDetail(item.id)">
  6. <view class="cu-item shadow">
  7. <view class="image">
  8. <image :src="item.imageurl" mode="aspectFill" style="height: 350rpx;"></image>
  9. <view class="cu-bar bg-shadeBottom"> <text class="text-cut">{{item.title}}</text></view>
  10. </view>
  11. <!-- <view class="text-content padding-lr-xs padding-top-xs text-cut">{{item.title}}</view> -->
  12. <view class="cu-list menu-avatar">
  13. <view class="cu-item">
  14. <view class="cu-avatar round" :style="'background-image:url('+item.worker.tilpic+');'"></view>
  15. <view class="content flex-sub">
  16. <view class="text-grey"><text class="text-sm text-cur" style="height: 44rpx; overflow: hidden;">{{item.worker.title}}</text></view>
  17. <view class="text-gray text-sm flex justify-between">
  18. <view>{{item.createtime}}</view>
  19. <!-- <view class="text-gray text-right basis-xs text-sm">
  20. <text class="cuIcon-shop margin-right-xs text-lg"></text>
  21. 进店
  22. </view> -->
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </block>
  30. </view>
  31. <uni-load-more :status="pstatus"></uni-load-more>
  32. <view class="padding-sm"></view>
  33. <view class="padding-xl"></view>
  34. <view class="cu-bar tabbar bg-white foot">
  35. <view class="action text-gray" @tap="goNavPage('/pages/index/index')">
  36. <view class="cuIcon-cu-image">
  37. <image src="../../static/tabbar/index.png"></image>
  38. </view>
  39. 首页
  40. </view>
  41. <view class="action text-gray" @tap="goNavPage('/pages/comjobs/comjobs')">
  42. <view class="cuIcon-cu-image">
  43. <image src="../../static/tabbar/jobs.png"></image>
  44. </view>
  45. 招聘
  46. </view>
  47. <!-- #ifndef MP-WEIXIN -->
  48. <view class="action text-blue videoimg" @tap="goNavPage('/pages/video/videolist')">
  49. <view class="cuIcon-cu-image">
  50. <image src="../../static/tabbar/video.png"></image>
  51. </view>
  52. 微工作
  53. </view>
  54. <!-- #endif -->
  55. <!--
  56. <view class="action text-gray" @tap="goNavPage('/pages/broker/brokerlist')">
  57. <view class="cuIcon-cu-image">
  58. <image src="../../static/tabbar/broker.png"></image>
  59. </view>
  60. 经纪人
  61. </view>
  62. -->
  63. <view class="action text-gray" @tap="goNavPage('/pages/my/my')">
  64. <view class="cuIcon-cu-image">
  65. <image src="../../static/tabbar/my.png"></image>
  66. </view>
  67. 我的
  68. </view>
  69. </view>
  70. </view>
  71. </template>
  72. <script>
  73. import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
  74. var _this;
  75. export default {
  76. components: {
  77. uniLoadMore
  78. },
  79. data() {
  80. return {
  81. userinfo: false,
  82. pstatus: 'more',
  83. ppage: 1,
  84. psize: 20,
  85. plist: [],
  86. }
  87. },
  88. onLoad: function(option) {
  89. _this = this;
  90. _this.userinfo = uni.getStorageSync('userinfo') || false;
  91. _this.getMore();
  92. },
  93. onPullDownRefresh: function() {
  94. _this.pageRefresh();
  95. },
  96. onReachBottom: function() {
  97. if (_this.pstatus !== 'more') {
  98. return;
  99. }
  100. _this.getMore();
  101. },
  102. onShareAppMessage: function(res) {
  103. return {
  104. title: "视频动态",
  105. path: "/pages/video/videolist"
  106. }
  107. },
  108. methods: {
  109. goDetail: function(videoid) {
  110. uni.navigateTo({
  111. url: '/pages/video/detail?videoid=' + videoid
  112. });
  113. },
  114. pageRefresh: function() {
  115. _this.pstatus = 'more';
  116. _this.ppage = 1;
  117. _this.plist = [];
  118. _this.getMore();
  119. },
  120. getMore: function() {
  121. _this.$req.ajax({
  122. path: "video/getmore",
  123. data: {
  124. ppage: _this.ppage,
  125. psize: _this.psize
  126. }
  127. }).then((data) => {
  128. _this.pstatus = data.pstatus;
  129. _this.plist = _this.plist.concat(data.plist);
  130. _this.ppage += 1;
  131. uni.stopPullDownRefresh();
  132. }).catch((err) => {
  133. uni.showModal({
  134. title: '信息提示',
  135. content: err,
  136. showCancel: false
  137. });
  138. });
  139. },
  140. goNavPage: function(pageurl) {
  141. uni.redirectTo({
  142. url: pageurl
  143. });
  144. },
  145. }
  146. }
  147. </script>
  148. <style lang="scss">
  149. .cu-card>.cu-item { margin: 30rpx 15rpx 0rpx 15rpx; border-radius: 6rpx; }
  150. .vitembox{ width: 360rpx; }
  151. .cu-list.menu-avatar>.cu-item>.cu-avatar{ left: 15rpx !important; }
  152. .cu-list.menu-avatar>.cu-item .content.flex-sub {
  153. width: calc(100% - 60rpx - 20rpx);
  154. }
  155. .cu-list.menu-avatar>.cu-item {
  156. height: 120rpx;
  157. }
  158. .cu-list.menu-avatar>.cu-item .content {
  159. left: 90rpx;
  160. }
  161. .cu-card.case .image .cu-bar{ padding: 0rpx 15rpx; }
  162. // .vitembox image{ width: 360rpx; height: 165rpx; }
  163. </style>