myRegistration.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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}}{{getUnit(item.recruitInformationInfo)}}
  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 style="display: flex;
  38. justify-content: space-between;" >
  39. <span class="tag" v-if="current==1&&!item.isRead">未读</span>
  40. <view class="check" @click="ckInfo(item.recruitInformationInfo,item)">
  41. 查看
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <u-divider v-if="list[current].recordsTotal==list[current].list.length" :isnone="list[current].recordsTotal==0"
  47. nonetext="没有找到相关内容" border-color="#CFD2D5">已经到底了</u-divider>
  48. </view>
  49. </template>
  50. <script>
  51. import * as API from '@/apis/pagejs/packages.js'
  52. export default {
  53. data() {
  54. return {
  55. list: [{
  56. name: '我的报名',
  57. pageIndex: 1,
  58. pageSize: 20,
  59. recordsTotal: 1,
  60. type: "0",
  61. list: []
  62. }, {
  63. name: '收到的邀请',
  64. pageIndex: 1,
  65. pageSize: 20,
  66. recordsTotal: 1,
  67. type: "1",
  68. list: []
  69. }],
  70. current: 0
  71. }
  72. },
  73. onLoad(op) {
  74. if (op.c) {
  75. this.current = op.c
  76. }
  77. this.getList();
  78. },
  79. methods: {
  80. ckInfo(item,item2) {
  81. var isread=""
  82. if(this.current==1&&!item2.isRead){
  83. item2.isRead=true
  84. isread="&isread=1&readid="+item2.id
  85. }
  86. var url = "/pages/packages/jobInformation/jobDetails?id="
  87. uni.navigateTo({
  88. url: url + item.id+isread
  89. })
  90. },
  91. getList() {
  92. uni.showLoading({
  93. title: "加载中",
  94. mask: true,
  95. })
  96. var list = this.list[this.current].list
  97. var obj = this.list[this.current]
  98. var listForm = {
  99. ...obj
  100. }
  101. delete listForm.list
  102. API.myRegistration(listForm).then((res) => {
  103. if (listForm.pageIndex == 1) {
  104. list = res.data.data;
  105. } else {
  106. list = [
  107. ...list,
  108. ...res.data.data
  109. ];
  110. }
  111. this.list[this.current].list = list
  112. this.list[this.current].recordsTotal = res.data.recordsTotal;
  113. uni.hideLoading();
  114. }).catch(error => {
  115. uni.showToast({
  116. icon: 'none',
  117. title: error,
  118. icon: "none"
  119. })
  120. })
  121. },
  122. myLoadmore() {
  123. this.list[this.current].pageIndex += 1;
  124. this.getList();
  125. },
  126. change(index) {
  127. this.current = index;
  128. var list = this.list[this.current].list
  129. if (list.length == 0) {
  130. this.getList();
  131. }
  132. }
  133. }
  134. }
  135. </script>
  136. <style>
  137. page {
  138. background: #F0F0F2;
  139. padding-bottom: 150px;
  140. }
  141. </style>
  142. <style scoped lang="scss">
  143. .card {
  144. margin: 24rpx 32rpx;
  145. background-color: #fff;
  146. padding: 24rpx;
  147. border-radius: 12px;
  148. .positon-salary {
  149. display: flex;
  150. justify-content: space-between;
  151. align-items: center;
  152. .positon {
  153. color: rgba(16, 16, 16, 1);
  154. font-size: 36rpx;
  155. font-family: 'PingFangSC-medium';
  156. }
  157. .salary {
  158. color: rgba(255, 61, 0, 1);
  159. font-size: 32rpx;
  160. font-family: 'PingFangSC-medium';
  161. }
  162. }
  163. .tags-date {
  164. display: flex;
  165. justify-content: space-between;
  166. align-items: center;
  167. margin-top: 16rpx;
  168. margin-bottom: 24rpx;
  169. .tags {
  170. display: flex;
  171. .item {
  172. border-radius: 4px;
  173. background-color: rgba(241, 241, 247, 1);
  174. color: rgba(129, 127, 153, 1);
  175. font-size: 12px;
  176. text-align: center;
  177. line-height: 36rpx;
  178. height: 36rpx;
  179. padding: 0 12rpx;
  180. margin-right: 8rpx;
  181. }
  182. }
  183. .company {
  184. color: rgba(51, 51, 51, 1);
  185. font-size: 24rpx;
  186. }
  187. .date {
  188. color: rgba(153, 153, 153, 1);
  189. font-size: 24rpx;
  190. }
  191. }
  192. // 查看
  193. .check {
  194. width: 120rpx;
  195. height: 56rpx;
  196. line-height: 56rpx;
  197. margin-left: auto;
  198. //margin-top: 24rpx;
  199. border-radius: 50px;
  200. background-color: rgba(255, 255, 255, 1);
  201. color: rgba(119, 119, 119, 1);
  202. text-align: center;
  203. font-family: Microsoft Yahei;
  204. border: 1px solid rgba(207, 210, 213, 1);
  205. }
  206. }
  207. .tag {
  208. top: -160rpx;
  209. left: -40rpx;
  210. position: relative;
  211. border-radius: 4px 4px 4px 0px;
  212. color: #fff;
  213. padding: 2px 6px;
  214. font-size: 20rpx;
  215. line-height: 20rpx;
  216. height: 30rpx;
  217. background: linear-gradient(to right bottom, rgba(255, 255, 255, 0.4), transparent) var(--bg, #EA3447);
  218. background-blend-mode: soft-light;
  219. }
  220. .tag::before {
  221. content: '';
  222. position: absolute;
  223. width: 3px;
  224. height: 3px;
  225. left: 0;
  226. bottom: -3px;
  227. background-color: inherit;
  228. filter: brightness(.7);
  229. clip-path: polygon(0 0, 100% 0, 100% 100%);
  230. }
  231. </style>