guidePage.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template>
  2. <view class="guide-page">
  3. <view class="guide-item">
  4. <view class="guide-img">
  5. <image src="@/static/images/jobApplicant/woyaozhaogongzuo.svg" mode="aspectFix" />
  6. </view>
  7. <view class="guide-btn" @click="goWork">我要找工作</view>
  8. </view>
  9. <view class="guide-item">
  10. <view class="guide-img">
  11. <image src="@/static/images/jobApplicant/woyaozhaoren.svg" mode="aspectFix" />
  12. </view>
  13. <view class="guide-btn" @click="gotocompany">我要招人</view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. export default {
  19. data() {
  20. return {
  21. companyinfo: ""
  22. };
  23. },
  24. onLoad() {
  25. this.getcompanystatus()
  26. },
  27. methods: {
  28. goWork() {
  29. //修改当前用户身份
  30. var res = this.updateUserResumes(1)
  31. if (!res) {
  32. uni.showToast({
  33. title: "登录信息过期,请重新登录",
  34. icon: "none"
  35. });
  36. }
  37. uni.navigateTo({
  38. url: '/pages/my/jobApplicant/welcomePage'
  39. })
  40. },
  41. // 查询用户企业状态
  42. getcompanystatus() {
  43. this.$Request.get("/app/company/selectCompanyByUserId", "")
  44. .then((res) => {
  45. if (res.code != 0) {
  46. uni.showToast({
  47. title: res.msg || "查询状态失败",
  48. icon: "none"
  49. });
  50. return;
  51. }
  52. this.companyinfo = res.data || {};
  53. console.log("查询用户企业状态", res)
  54. })
  55. .catch((err) => {
  56. console.error("查询失败:", err);
  57. uni.showToast({
  58. title: "网络异常",
  59. icon: "none"
  60. });
  61. });
  62. },
  63. gotocompany() {
  64. //修改当前用户身份
  65. var res = this.updateUserResumes(2)
  66. if (!res) {
  67. uni.showToast({
  68. title: "登录信息过期,请重新登录",
  69. icon: "none"
  70. });
  71. }
  72. console.log("ssss");
  73. //应该要判断这个人有没有公司,
  74. var status = this.companyinfo.status || ""
  75. if (!status) { //没有企业,那就是第一次进来,走企业注册流程
  76. uni.navigateTo({
  77. url: '/pages/my/businessLicense'
  78. })
  79. } else if (status == 2) { //审核通过,如果有职位,跳首页、如果没职位跳职位发布页。
  80. if (status == 2) {
  81. uni.preloadPage({
  82. url: "/pages/index/index"
  83. });
  84. uni.switchTab({
  85. url: '/pages/index/index'
  86. })
  87. } else {
  88. uni.redirectTo({
  89. url: '/pages/index/index.vue'
  90. })
  91. }
  92. } else if (status == 1) { //审核未通过,跳审核信息页。
  93. uni.navigateTo({
  94. url: '/package/jobIntention/underReview'
  95. })
  96. } else {
  97. uni.showToast({
  98. title: "网络异常",
  99. icon: "none"
  100. });
  101. }
  102. },
  103. //修改用户身份状态
  104. updateUserResumes(userType) {
  105. // 调用接口提交
  106. uni.showLoading({
  107. title: "提交中..."
  108. });
  109. this.$Request.postJson("/app/user/updateUserResumes", {
  110. userType: userType
  111. })
  112. .then((res) => {
  113. uni.hideLoading();
  114. if (res.code === 0) {
  115. uni.setStorageSync('userType', userType)
  116. return true
  117. } else {
  118. return false
  119. }
  120. })
  121. .catch((err) => {
  122. uni.hideLoading();
  123. console.error("提交失败:", err);
  124. uni.showToast({
  125. title: "网络异常",
  126. icon: "none"
  127. });
  128. return false
  129. });
  130. }
  131. },
  132. };
  133. </script>
  134. <style scoped lang="scss">
  135. .guide-page {
  136. background: linear-gradient(90deg, rgba(13, 39, 247, 1), rgba(19, 193, 234, 1) 100%);
  137. position: absolute;
  138. left: 0;
  139. right: 0;
  140. top: 0;
  141. bottom: 0;
  142. padding: 120rpx 76rpx;
  143. display: flex;
  144. flex-direction: column;
  145. box-sizing: border-box;
  146. gap: 36rpx;
  147. .guide-item {
  148. width: 100%;
  149. height: 100%;
  150. border-radius: 28rpx;
  151. background: rgba(255, 255, 255, 0.851);
  152. display: flex;
  153. flex-direction: column;
  154. justify-content: center;
  155. align-items: center;
  156. padding: 0 56rpx;
  157. box-sizing: border-box;
  158. gap: 72rpx;
  159. .guide-img {
  160. width: 364rpx;
  161. height: 364rpx;
  162. overflow: hidden;
  163. image {
  164. width: 100%;
  165. height: 100%;
  166. }
  167. }
  168. .guide-btn {
  169. border-radius: 100rpx;
  170. background: rgba(255, 255, 255, 1);
  171. color: #016bf6;
  172. font-family: DM Sans;
  173. font-size: 32rpx;
  174. font-weight: 400;
  175. line-height: 48rpx;
  176. letter-spacing: 0%;
  177. text-align: center;
  178. width: 100%;
  179. padding: 16rpx;
  180. box-sizing: border-box;
  181. }
  182. }
  183. }
  184. </style>