myRegistration.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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="my-registration" v-for="(item,i) in list[current].list" :key="i" >
  11. <view class="card">
  12. <view class="positon-salary">
  13. <view class="positon">
  14. {{item.recruitInformationInfo.positionName}}
  15. </view>
  16. <view class="salary">
  17. {{item.recruitInformationInfo.salary}}元/天
  18. </view>
  19. </view>
  20. <view class="tags-date">
  21. <view class="company" >
  22. {{item.recruitInformationInfo.enterpriseName}}
  23. </view>
  24. <view class="tags" v-if="current==0&&false">
  25. <view class="item">
  26. 企业
  27. </view>
  28. <view class="item">
  29. 周结
  30. </view>
  31. </view>
  32. <view class="date">
  33. {{current==0?'报名时间':'邀请时间'}}:{{item.createTime.substring(0,10)}}
  34. </view>
  35. </view>
  36. <u-line color="#E6E6E6"></u-line>
  37. <view class="check" @click="ckInfo(item.recruitInformationInfo)">
  38. 查看
  39. </view>
  40. </view>
  41. </view>
  42. <u-divider v-if="list[current].recordsTotal==list[current].list.length"
  43. :isnone="list[current].recordsTotal==0" nonetext="没有找到相关内容"
  44. border-color="#CFD2D5">已经到底了</u-divider>
  45. </view>
  46. </template>
  47. <script>
  48. import * as API from '@/apis/pagejs/packages.js'
  49. export default {
  50. data() {
  51. return {
  52. list: [{
  53. name: '我的报名',
  54. pageIndex: 1,
  55. pageSize: 20,
  56. recordsTotal: 1,
  57. type: "0",
  58. list: []
  59. }, {
  60. name: '收到的邀请',
  61. pageIndex: 1,
  62. pageSize: 20,
  63. recordsTotal: 1,
  64. type: "1",
  65. list: []
  66. }],
  67. current: 0
  68. }
  69. },
  70. onLoad(op) {
  71. if(op.c){
  72. this.current=op.c
  73. }
  74. this.getList();
  75. },
  76. methods: {
  77. ckInfo(item){
  78. var url="/pages/packages/jobInformation/jobDetails?id="
  79. uni.navigateTo({
  80. url:url+item.id
  81. })
  82. },
  83. getList() {
  84. uni.showLoading({
  85. title: "加载中",
  86. mask: true,
  87. })
  88. var list = this.list[this.current].list
  89. var obj = this.list[this.current]
  90. var listForm = {
  91. ...obj
  92. }
  93. delete listForm.list
  94. API.myRegistration(listForm).then((res) => {
  95. if (listForm.pageIndex == 1) {
  96. list = res.data.data;
  97. } else {
  98. list = [
  99. ...list,
  100. ...res.data.data
  101. ];
  102. }
  103. this.list[this.current].list = list
  104. this.list[this.current].recordsTotal = res.data.recordsTotal;
  105. uni.hideLoading();
  106. }).catch(error => {
  107. uni.showToast({icon: 'none',
  108. title: error,
  109. icon: "none"
  110. })
  111. })
  112. },
  113. myLoadmore() {
  114. this.list[this.current].pageIndex += 1;
  115. this.getList();
  116. },
  117. change(index) {
  118. this.current = index;
  119. var list = this.list[this.current].list
  120. if (list.length == 0) {
  121. this.getList();
  122. }
  123. }
  124. }
  125. }
  126. </script>
  127. <style>
  128. page {
  129. background: #F0F0F2;
  130. padding-bottom: 150px;
  131. }
  132. </style>
  133. <style scoped lang="scss">
  134. .card{
  135. margin: 24rpx 32rpx;
  136. background-color: #fff;
  137. padding: 24rpx;
  138. border-radius: 12px;
  139. .positon-salary{
  140. display: flex;
  141. justify-content: space-between;
  142. align-items: center;
  143. .positon{
  144. color: rgba(16, 16, 16, 1);
  145. font-size: 36rpx;
  146. font-family: 'PingFangSC-medium';
  147. }
  148. .salary{
  149. color: rgba(255, 61, 0, 1);
  150. font-size: 32rpx;
  151. font-family: 'PingFangSC-medium';
  152. }
  153. }
  154. .tags-date{
  155. display: flex;
  156. justify-content: space-between;
  157. align-items: center;
  158. margin-top: 16rpx;
  159. margin-bottom: 24rpx;
  160. .tags{
  161. display: flex;
  162. .item{
  163. border-radius: 4px;
  164. background-color: rgba(241, 241, 247, 1);
  165. color: rgba(129, 127, 153, 1);
  166. font-size: 12px;
  167. text-align: center;
  168. line-height: 36rpx;
  169. height: 36rpx;
  170. padding: 0 12rpx;
  171. margin-right: 8rpx;
  172. }
  173. }
  174. .company{
  175. color: rgba(51, 51, 51, 1);
  176. font-size: 24rpx;
  177. }
  178. .date{
  179. color: rgba(153, 153, 153, 1);
  180. font-size: 24rpx;
  181. }
  182. }
  183. // 查看
  184. .check{
  185. width: 120rpx;
  186. height: 56rpx;
  187. line-height: 56rpx;
  188. margin-left: auto;
  189. margin-top: 24rpx;
  190. border-radius: 50px;
  191. background-color: rgba(255, 255, 255, 1);
  192. color: rgba(119, 119, 119, 1);
  193. text-align: center;
  194. font-family: Microsoft Yahei;
  195. border: 1px solid rgba(207, 210, 213, 1);
  196. }
  197. }
  198. </style>