myRegistration.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  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. onReachBottom() {
  81. var obj = this.list[this.current]
  82. if (obj.list.length < obj.recordsTotal) {
  83. this.myLoadmore();
  84. }
  85. },
  86. methods: {
  87. ckInfo(item,item2) {
  88. var isread=""
  89. if(this.current==1&&!item2.isRead){
  90. item2.isRead=true
  91. isread="&isread=1&readid="+item2.id
  92. }
  93. var url = "/pages/packages/jobInformation/jobDetails?id="
  94. uni.navigateTo({
  95. url: url + item.id+isread
  96. })
  97. },
  98. getList() {
  99. uni.showLoading({
  100. title: "加载中",
  101. mask: true,
  102. })
  103. var list = this.list[this.current].list
  104. var obj = this.list[this.current]
  105. var listForm = {
  106. ...obj
  107. }
  108. delete listForm.list
  109. API.myRegistration(listForm).then((res) => {
  110. if (listForm.pageIndex == 1) {
  111. list = res.data.data;
  112. } else {
  113. list = [
  114. ...list,
  115. ...res.data.data
  116. ];
  117. }
  118. this.list[this.current].list = list
  119. this.list[this.current].recordsTotal = res.data.recordsTotal;
  120. uni.hideLoading();
  121. }).catch(error => {
  122. uni.showToast({
  123. icon: 'none',
  124. title: error,
  125. icon: "none"
  126. })
  127. })
  128. },
  129. myLoadmore() {
  130. this.list[this.current].pageIndex += 1;
  131. this.getList();
  132. },
  133. change(index) {
  134. this.current = index;
  135. var list = this.list[this.current].list
  136. this.list[this.current].pageIndex = 1;
  137. this.list[this.current].list = [];
  138. this.getList();
  139. }
  140. }
  141. }
  142. </script>
  143. <style>
  144. page {
  145. background: #F0F0F2;
  146. padding-bottom: 150px;
  147. }
  148. </style>
  149. <style scoped lang="scss">
  150. .card {
  151. margin: 24rpx 32rpx;
  152. background-color: #fff;
  153. padding: 24rpx;
  154. border-radius: 12px;
  155. .positon-salary {
  156. display: flex;
  157. justify-content: space-between;
  158. align-items: center;
  159. .positon {
  160. color: rgba(16, 16, 16, 1);
  161. font-size: 36rpx;
  162. font-family: 'PingFangSC-medium';
  163. .positonSpan{
  164. padding:0 6rpx;
  165. font-size: 24rpx;
  166. text-align: center;
  167. border-radius: 4px;
  168. color: rgba(255, 255, 255, 1);
  169. }
  170. .positonSpan1{
  171. background-color: rgba(34, 149, 255, 1);
  172. }
  173. .positonSpan2{
  174. background-color: rgba(178, 184, 190, 1);
  175. }
  176. }
  177. .salary {
  178. min-width: 280rpx;
  179. text-align: end;
  180. color: rgba(255, 61, 0, 1);
  181. font-size: 32rpx;
  182. font-family: 'PingFangSC-medium';
  183. }
  184. }
  185. .tags-date {
  186. //display: flex;
  187. //justify-content: space-between;
  188. align-items: center;
  189. margin-top: 16rpx;
  190. margin-bottom: 24rpx;
  191. .tags {
  192. display: flex;
  193. .item {
  194. border-radius: 4px;
  195. background-color: rgba(241, 241, 247, 1);
  196. color: rgba(129, 127, 153, 1);
  197. font-size: 12px;
  198. text-align: center;
  199. line-height: 36rpx;
  200. height: 36rpx;
  201. padding: 0 12rpx;
  202. margin-right: 8rpx;
  203. }
  204. }
  205. .company {
  206. color: rgba(51, 51, 51, 1);
  207. font-size: 24rpx;
  208. }
  209. .date {
  210. color: rgba(153, 153, 153, 1);
  211. font-size: 24rpx;
  212. }
  213. }
  214. // 查看
  215. .check {
  216. width: 120rpx;
  217. height: 56rpx;
  218. line-height: 56rpx;
  219. margin-left: auto;
  220. //margin-top: 24rpx;
  221. border-radius: 50px;
  222. background-color: rgba(255, 255, 255, 1);
  223. color: rgba(119, 119, 119, 1);
  224. text-align: center;
  225. font-family: Microsoft Yahei;
  226. border: 1px solid rgba(207, 210, 213, 1);
  227. }
  228. }
  229. .tag {
  230. top: -190rpx;
  231. left: -40rpx;
  232. position: relative;
  233. border-radius: 4px 4px 4px 0px;
  234. color: #fff;
  235. padding: 2px 6px;
  236. font-size: 20rpx;
  237. line-height: 20rpx;
  238. height: 30rpx;
  239. background: linear-gradient(to right bottom, rgba(255, 255, 255, 0.4), transparent) var(--bg, #EA3447);
  240. background-blend-mode: soft-light;
  241. }
  242. .tag::before {
  243. content: '';
  244. position: absolute;
  245. width: 3px;
  246. height: 3px;
  247. left: 0;
  248. bottom: -3px;
  249. background-color: inherit;
  250. filter: brightness(.7);
  251. clip-path: polygon(0 0, 100% 0, 100% 100%);
  252. }
  253. </style>