myRegistration.vue 6.0 KB

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