supply.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <template>
  2. <view>
  3. <view class="cu-bar search">
  4. <view class="search-form round text-center">
  5. <text class="cuIcon-search"></text>
  6. <input @input="bindInput" :adjust-position="false" type="text" placeholder="搜索期望工作地点" confirm-type="search"></input>
  7. </view>
  8. <view class="action" v-if="searchval!==''">
  9. <button class="cu-btn bg-white shadow-blur round" @click="btnSearch()">搜索</button>
  10. </view>
  11. </view>
  12. <block v-for="(item,index) in plist" :key="index">
  13. <view class="cu-card dynamic no-card solid-bottom echo-supply-item">
  14. <view class="cu-item shadow padding-top-sm padding-bottom" @tap="goDetail(item.id)">
  15. <view class="padding-lr padding-bottom-sm flex justify-between align-center">
  16. <view class="basis-xl text-bold text-lg text-cut"><text v-if="item.mnumber>0"> 男{{item.mnumber}}人,</text><text v-if="item.wnumber>0"> 女{{item.wnumber}}人</text>【{{item.agegroup}}】</view>
  17. <view class="basis-xs text-cut text-right text-gray text-sm">{{item.updatetime_text}}</view>
  18. </view>
  19. <view class="padding-lr padding-bottom-sm text-cut text-gray text-sm">
  20. {{item.province}} {{item.city}} <text class="cuIcon-move margin-lr-xs text-gray"></text> {{item.descity}}
  21. </view>
  22. <view class="padding-lr text-sm text-gray"> 可到岗日期:{{item.candate}} </view>
  23. <view class="text-gray padding-lr text-sm padding-top-sm flex align-center justify-between" @tap="goShop(item.workerid)">
  24. <view class="text-cut basis-xl flex align-center">
  25. <image class="iconyrz" :src="$getImageUrl('static/images/applet/iconyrz.png')" mode="scaleToFill"></image>
  26. <view class="margin-left-sm">{{item.worker.title}}</view>
  27. </view>
  28. <view class="text-gray text-right basis-xs">
  29. <text class="cuIcon-shop margin-right-xs text-lg"></text>
  30. 进店
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </block>
  36. <uni-load-more :status="pstatus"></uni-load-more>
  37. <view class="padding-sm"></view>
  38. <view class="padding-xl"></view>
  39. <view class="cu-bar tabbar bg-white foot">
  40. <view class="action text-gray" @tap="goNavPage('/pages/worker/worker')">
  41. <view class="cuIcon-cu-image">
  42. <image src="../../static/tabbar/windex.png"></image>
  43. </view>
  44. 首页
  45. </view>
  46. <view class="action text-gray" @tap="goNavPage('/pages/demand/demand')">
  47. <view class="cuIcon-cu-image">
  48. <image src="../../static/tabbar/wdemand.png"></image>
  49. </view>
  50. 抢单大厅
  51. </view>
  52. <!-- #ifndef MP-WEIXIN -->
  53. <view class="action text-gray videoimg" @tap="goNavPage('/pages/video/video')">
  54. <view class="cuIcon-cu-image">
  55. <image src="../../static/tabbar/video.png"></image>
  56. </view>
  57. 录视频
  58. </view>
  59. <!-- #endif -->
  60. <view class="action text-gray" @tap="goNavPage('/pages/resume/resume')">
  61. <view class="cuIcon-cu-image">
  62. <image src="../../static/tabbar/resume.png"></image>
  63. </view>
  64. 简历
  65. </view>
  66. <view class="action text-red" @tap="goNavPage('/pages/supply/supply')">
  67. <view class="cuIcon-cu-image">
  68. <image src="../../static/tabbar/wsupplySelected.png"></image>
  69. </view>
  70. 共享用工
  71. </view>
  72. <!--
  73. <view class="action text-gray" @tap="goNavPage('/pages/worker/workerlist')">
  74. <view class="cuIcon-cu-image">
  75. <image src="../../static/tabbar/wworker.png"></image>
  76. </view>
  77. 企业1
  78. </view>
  79. -->
  80. </view>
  81. <wxContact></wxContact>
  82. </view>
  83. </template>
  84. <script>
  85. import slFilter from '@/components/sl-filter/sl-filter.vue';
  86. import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
  87. var _this;
  88. export default {
  89. components: {
  90. slFilter,
  91. uniLoadMore
  92. },
  93. data() {
  94. return {
  95. userinfo: false,
  96. workerinfo: false,
  97. searchval: "",
  98. pstatus: 'more',
  99. ppage: 1,
  100. psize: 20,
  101. plist: []
  102. };
  103. },
  104. onLoad: function(option){
  105. _this = this;
  106. _this.userinfo = _this.checkLogin("/pages/my/my");
  107. _this.workerinfo = uni.getStorageSync('workerinfo') || false;
  108. if (_this.userinfo === false || _this.workerinfo === false) {
  109. uni.reLaunch({
  110. url: "/pages/my/my"
  111. });
  112. return false;
  113. }
  114. _this.getMore();
  115. },
  116. onPullDownRefresh: function() {
  117. _this.pageRefresh();
  118. },
  119. onReachBottom: function() {
  120. if (_this.pstatus !== 'more') {
  121. return;
  122. }
  123. _this.getMore();
  124. },
  125. onShareAppMessage: function(res) {
  126. return {
  127. title: "供人中心",
  128. path: "/pages/supply/supply"
  129. }
  130. },
  131. methods: {
  132. // 搜索
  133. bindInput: function(e) {
  134. _this.searchval = e.detail.value;
  135. },
  136. btnSearch: function() {
  137. if (_this.searchval == "") {
  138. uni.showModal({
  139. title: '信息提示',
  140. content: "请输入要搜索的关键字...",
  141. showCancel: false
  142. });
  143. return false;
  144. }
  145. _this.pageRefresh();
  146. },
  147. pageRefresh: function() {
  148. _this.pstatus = 'more';
  149. _this.ppage = 1;
  150. _this.plist = [];
  151. _this.getMore();
  152. },
  153. getMore: function() {
  154. _this.$req.ajax({
  155. path: "supply/listsupply",
  156. data: {
  157. ppage: _this.ppage,
  158. psize: _this.psize,
  159. searchval: _this.searchval
  160. }
  161. }).then((data) => {
  162. _this.pstatus = data.pstatus;
  163. _this.plist = _this.plist.concat(data.plist);
  164. _this.ppage += 1;
  165. uni.stopPullDownRefresh();
  166. }).catch((err) => {
  167. uni.showModal({
  168. title: '信息提示',
  169. content: err,
  170. showCancel: false
  171. });
  172. });
  173. },
  174. goDetail: function(supplyid) {
  175. uni.navigateTo({
  176. url: '/pages/supply/detail?supplyid=' + supplyid
  177. });
  178. },
  179. goShop: function(workerid) {
  180. uni.navigateTo({
  181. url: '/pages/worker/shop?workerid=' + workerid
  182. });
  183. },
  184. goNavPage: function(pageurl) {
  185. _this.userinfo = _this.checkLogin("/pages/my/my");
  186. if (_this.userinfo === false) {
  187. return false;
  188. }
  189. uni.redirectTo({
  190. url: pageurl
  191. });
  192. },
  193. }
  194. }
  195. </script>
  196. <style>
  197. </style>