receiveRegistration.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <template>
  2. <view>
  3. <u-navbar back-text="我的报名" back-icon-size="28" back-icon-color="#ffffff"
  4. :background="{backgroundColor: '#2795FD',}" :back-text-style="{color: '#ffffff'}"></u-navbar>
  5. <!-- 标签 -->
  6. <view class="tabs">
  7. <u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
  8. </view>
  9. <!-- 我的报名 -->
  10. <view class="receive-registration" v-for="(item,i) in list[current].list" :key="i">
  11. <view class="card">
  12. <view class="top">
  13. <!-- 头像 -->
  14. <view class="photo">
  15. <img src="@/assets/img/informationPhoto.png"></img>
  16. </view>
  17. <!-- 信息 -->
  18. <view class="infos">
  19. <view class="positon-salary">
  20. <view class="positon">
  21. 家政清洁
  22. </view>
  23. <view class="salary">
  24. 200元/天
  25. </view>
  26. </view>
  27. <view class="tags-date">
  28. <view class="tags">
  29. <view class="item">
  30. </view>
  31. <view class="item">
  32. 21岁
  33. </view>
  34. <view class="item">
  35. 高中
  36. </view>
  37. </view>
  38. <view class="date">
  39. 报名时间:2023-06-01
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <u-line color="#E6E6E6"></u-line>
  45. <view class="buttons">
  46. <view class="btn check" @click="ckInfo(item)">
  47. 查看
  48. </view>
  49. <!-- <view class="btn delete">
  50. 删除
  51. </view> -->
  52. </view>
  53. </view>
  54. </view>
  55. <u-divider v-if="list[current].recordsTotal==list[current].list.length"
  56. :isnone="list[current].recordsTotal==0" nonetext="没有找到相关内容"
  57. border-color="#CFD2D5">已经到底了</u-divider>
  58. </view>
  59. </template>
  60. <script>
  61. import * as API from '@/apis/pagejs/packages.js'
  62. export default {
  63. data() {
  64. return {
  65. list: [{
  66. name: '收到的报名',
  67. pageIndex: 1,
  68. pageSize: 20,
  69. recordsTotal: 1,
  70. status: "0",
  71. list: []
  72. }, {
  73. name: '邀请记录',
  74. pageIndex: 1,
  75. pageSize: 20,
  76. recordsTotal: 1,
  77. status: "1",
  78. list: []
  79. }],
  80. current: 0
  81. }
  82. },
  83. onLoad(op) {
  84. if(op.c){
  85. this.current=op.c
  86. }
  87. this.getList();
  88. },
  89. methods: {
  90. ckInfo(item){
  91. var url="/pages/packages/choreInformation/jobSearchDetails?id="
  92. if(this.current==0){
  93. url+=item.workPersonInfo.id
  94. }
  95. if(this.current==1){
  96. url+=item.jobInformationInfo.id
  97. }
  98. uni.navigateTo({
  99. url:url
  100. })
  101. },
  102. getList() {
  103. uni.showLoading({
  104. title: "加载中",
  105. mask: true,
  106. })
  107. var list = this.list[this.current].list
  108. var obj = this.list[this.current]
  109. var listForm = {
  110. ...obj
  111. }
  112. delete listForm.list
  113. API.myReceivedRegistration(listForm).then((res) => {
  114. if (listForm.pageIndex == 1) {
  115. list = res.data.data;
  116. } else {
  117. list = [
  118. ...list,
  119. ...res.data.data
  120. ];
  121. }
  122. this.list[this.current].list = list
  123. this.list[this.current].recordsTotal = res.data.recordsTotal;
  124. uni.hideLoading();
  125. }).catch(error => {
  126. uni.showToast({
  127. title: error,
  128. icon: "none"
  129. })
  130. })
  131. },
  132. myLoadmore() {
  133. this.list[this.current].pageIndex += 1;
  134. this.getList();
  135. },
  136. change(index) {
  137. this.current = index;
  138. var list = this.list[this.current].list
  139. if (list.length == 0) {
  140. this.getList();
  141. }
  142. }
  143. }
  144. }
  145. </script>
  146. <style>
  147. page {
  148. background: #F0F0F2;
  149. padding-bottom: 150px;
  150. }
  151. </style>
  152. <style scoped lang="scss">
  153. .card{
  154. margin: 24rpx 32rpx;
  155. background-color: #fff;
  156. padding: 24rpx;
  157. border-radius: 12px;
  158. .top{
  159. display: flex;
  160. }
  161. // 头像
  162. .photo{
  163. width: 48px;
  164. height: 48px;
  165. border-radius: 50px;
  166. overflow: hidden;
  167. margin-right: 16rpx;
  168. img{
  169. width: 100%;
  170. height: 100%;
  171. }
  172. }
  173. // 信息
  174. .infos{
  175. flex: 1;
  176. }
  177. .positon-salary{
  178. display: flex;
  179. justify-content: space-between;
  180. align-items: center;
  181. .positon{
  182. color: rgba(16, 16, 16, 1);
  183. font-size: 36rpx;
  184. font-family: 'PingFangSC-medium';
  185. }
  186. .salary{
  187. color: rgba(255, 61, 0, 1);
  188. font-size: 32rpx;
  189. font-family: 'PingFangSC-medium';
  190. }
  191. }
  192. .tags-date{
  193. display: flex;
  194. justify-content: space-between;
  195. align-items: center;
  196. margin-top: 16rpx;
  197. margin-bottom: 24rpx;
  198. .tags{
  199. display: flex;
  200. .item{
  201. border-radius: 4px;
  202. background-color: rgba(241, 241, 247, 1);
  203. color: rgba(129, 127, 153, 1);
  204. font-size: 12px;
  205. text-align: center;
  206. line-height: 36rpx;
  207. height: 36rpx;
  208. padding: 0 12rpx;
  209. margin-right: 8rpx;
  210. }
  211. }
  212. .company{
  213. color: rgba(51, 51, 51, 1);
  214. font-size: 24rpx;
  215. }
  216. .date{
  217. color: rgba(153, 153, 153, 1);
  218. font-size: 24rpx;
  219. }
  220. }
  221. .buttons{
  222. display: flex;
  223. justify-content: flex-end;
  224. margin-top: 24rpx;
  225. // 查看
  226. .btn{
  227. width: 120rpx;
  228. height: 56rpx;
  229. line-height: 56rpx;
  230. border-radius: 50px;
  231. background-color: rgba(255, 255, 255, 1);
  232. color: rgba(119, 119, 119, 1);
  233. text-align: center;
  234. font-family: Microsoft Yahei;
  235. border: 1px solid rgba(207, 210, 213, 1);
  236. margin-left: 24rpx;
  237. }
  238. // 删除
  239. .delete{
  240. color: rgba(255, 61, 0, 1);
  241. }
  242. }
  243. }
  244. </style>