home.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <view class="page">
  3. <view class="bg-white homepage">
  4. <view>
  5. <view class="" @tap="checkWorker">
  6. <view class="padding"></view>
  7. <image mode="widthFix" style="width: 300rpx;" src="../../static/images/index/recruiter.png"></image>
  8. <!-- <image mode="widthFix" style="width: 100%;" :src="zqtop"></image> -->
  9. <view class="padding text-center text-blue">我要招聘</view>
  10. </view>
  11. <view class="" @tap="goUser">
  12. <image mode="widthFix" style="width: 300rpx; position: fixed; left: 50%; bottom: 360rpx; margin-left: -150rpx;" src="../../static/images/index/jobhunter.png"></image>
  13. <!-- <image mode="widthFix" style="width: 100%; position: fixed; left: 0; bottom: 160rpx;" :src="zqbottom"></image> -->
  14. <view class="padding text-center text-blue" style="width: 100%; position: fixed; left: 0; bottom: 240rpx;">我要求职</view>
  15. <!-- <view class="padding text-center text-blue" style="width: 100%; position: fixed; left: 0; bottom: 40rpx;">我要求职</view> -->
  16. </view>
  17. </view>
  18. </view>
  19. <view class="cu-modal" :class="modalName=='workerModal'?'show':''">
  20. <view class="cu-dialog">
  21. <view class="cu-bar bg-white justify-end">
  22. <view class="content">身份切换</view>
  23. <view class="action" @tap="hideModal">
  24. <text class="cuIcon-close text-red"></text>
  25. </view>
  26. </view>
  27. <view class="padding-tb-sm">
  28. <view class="cu-list menu">
  29. <block v-if="workerall!=null">
  30. <view class="cu-item arrow" v-for="(item,index) in workerall" :key="index" @tap="goWorker" :data-index="index">
  31. <view class="content text-left">
  32. <text class="cuIcon-settings text-grey"></text>
  33. <text>{{item.title}}</text>
  34. </view>
  35. <view class="action">
  36. <text class="text-grey">
  37. <text class="margin-left text-red" v-if="item.status==1">待审核</text>
  38. <text class="margin-left text-red" v-if="item.status==4">升级审核</text>
  39. </text>
  40. </view>
  41. </view>
  42. </block>
  43. <view class="cu-item arrow" @click="goLogin(1)">
  44. <view class="content text-left">
  45. <text class="cuIcon-settings text-grey"></text>
  46. <text>个人雇主注册</text>
  47. </view>
  48. </view>
  49. <view class="cu-item arrow" @click="goLogin(2)">
  50. <view class="content text-left">
  51. <text class="cuIcon-settings text-grey"></text>
  52. <text>企业雇主注册</text>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. <view class="cu-modal" :class="modalName=='apptreatyModal'?'show':''">
  60. <view class="cu-dialog">
  61. <view class="cu-bar bg-white justify-end">
  62. <view class="content">服务协议和隐私政策</view>
  63. </view>
  64. <view class="padding-tb-sm">
  65. <scroll-view class="xy-content text-left" scroll-y>
  66. <text>请你务必审慎阅读、充分理解“用户服务协议”和“隐私政策”各条款,包括但不限于:为了向你提供即时招聘讯息、内容分享等服务,我们需要收集你的设备信息、操作日志等个人信息。</text> <br/>
  67. <view>你可阅读
  68. <text class="text-blue" @tap="goPage('/pages/tool/sinpage?field=service')">《用户服务协议》</text>
  69. 和<text class="text-blue" @tap="goPage('/pages/tool/sinpage?field=privacy')">《隐私政策》</text>
  70. 了解详细信息,如你同意,请点击“我同意”开始接受我们等服务。
  71. </view>
  72. </scroll-view>
  73. </view>
  74. <view class="cu-bar bg-white justify-end">
  75. <view class="action">
  76. <button class="cu-btn line-blue text-blue" @tap="outApptreaty">不同意</button>
  77. <button class="cu-btn bg-blue margin-left" @tap="setApptreaty">我同意</button>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. </template>
  84. <script>
  85. var _this;
  86. export default {
  87. data() {
  88. return {
  89. identityinfo: false,
  90. userinfo: false,
  91. workerinfo: null,
  92. workerall: null,
  93. modalName: null,
  94. apptreaty: "",
  95. zqtop: '',
  96. zqbottom: ''
  97. }
  98. },
  99. onLoad: function(option) {
  100. _this = this;
  101. _this.getImage();
  102. _this.identityinfo = uni.getStorageSync('identityinfo') || false;
  103. _this.userinfo = uni.getStorageSync('userinfo') || false;
  104. _this.workerinfo = uni.getStorageSync('workerinfo') || null;
  105. if (_this.identityinfo==true && _this.workerinfo!=null){
  106. uni.reLaunch({
  107. url: "/pages/worker/worker"
  108. });
  109. return;
  110. }
  111. if (_this.identityinfo==true){
  112. uni.reLaunch({
  113. url: "/pages/index/index"
  114. });
  115. return;
  116. }
  117. _this.$req.ajax({
  118. path: "index/gethomedata",
  119. data: {
  120. userid: _this.userinfo==false ? 0 : _this.userinfo.id
  121. }
  122. }).then((data) => {
  123. _this.apptreaty = data.apptreaty;
  124. _this.workerall = data.workerall;
  125. // #ifdef APP-PLUS
  126. _this.modalName = uni.getStorageSync('apptreatyModal') || "apptreatyModal";
  127. // #endif
  128. }).catch((err) => {
  129. uni.showModal({
  130. title: '信息提示',
  131. content: err,
  132. showCancel: false
  133. });
  134. });
  135. },
  136. onShareAppMessage: function(res) {
  137. return {
  138. title: "晋江人力",
  139. path: "/pages/index/home"
  140. }
  141. },
  142. methods: {
  143. // 获取图片
  144. getImage: function() {
  145. _this.$req.ajax({
  146. path: "my/getauthimg",
  147. data: {}
  148. }).then((data) => {
  149. _this.zqtop = data.head1;
  150. _this.zqbottom = data.head2;
  151. }).catch((err) => {});
  152. },
  153. setApptreaty: function() {
  154. uni.setStorageSync('apptreatyModal', "hideapptreatyModal");
  155. _this.modalName = null;
  156. },
  157. outApptreaty: function() {
  158. plus.runtime.quit();
  159. },
  160. goPage: function(pageurl) {
  161. uni.navigateTo({
  162. url: pageurl,
  163. fail: function() {
  164. uni.switchTab({
  165. url: pageurl
  166. });
  167. }
  168. });
  169. },
  170. checkWorker: function() {
  171. if (_this.workerall=='null'){
  172. uni.navigateTo({
  173. url: "/pages/login/worker"
  174. });
  175. return false;
  176. }
  177. _this.modalName = "workerModal";
  178. },
  179. hideModal: function(e) {
  180. _this.modalName = null;
  181. },
  182. goWorker: function(e) {
  183. var index = e.currentTarget.dataset.index;
  184. if (_this.workerall[index].status==1){
  185. // uni.showModal({
  186. // title: '信息提示',
  187. // content: "信息审核中,请耐心等待。",
  188. // showCancel: false
  189. // });
  190. // return;
  191. }
  192. uni.setStorageSync('identityinfo', true);
  193. uni.setStorageSync('workerinfo', _this.workerall[index]);
  194. uni.reLaunch({
  195. url: "/pages/worker/worker"
  196. });
  197. },
  198. goLogin: function(wtype) {
  199. uni.setStorageSync('identityinfo', true);
  200. uni.navigateTo({
  201. url: "/pages/login/worker?wtype="+wtype
  202. });
  203. },
  204. goUser: function() {
  205. _this.userinfo = _this.checkLogin("/pages/index/index");
  206. uni.setStorageSync('identityinfo', true);
  207. uni.setStorageSync('workerinfo', null);
  208. uni.reLaunch({
  209. url: "/pages/index/index"
  210. });
  211. }
  212. }
  213. }
  214. </script>
  215. <style>
  216. page{ background-color:#fffff6; text-align: center;}
  217. bg-color{ background-color:#fffff6;}
  218. .homepage{ height: calc(100vh); background-repeat: no-repeat; background-size: 100%; background-position: bottom center; }
  219. .homepage image{ width: 100%; }
  220. .homepage image.homebg{ width: 750rpx; position: fixed; bottom: 0rpx; }
  221. .homebox{ }
  222. .homebox image{ width: 280rpx; }
  223. .xy-content{padding:10rpx 30rpx; background:#F6F6F6; line-height:50rpx; font-size:28rpx; text-align: justify; box-sizing:border-box;}
  224. .padding{ padding: 40rpx;}
  225. .padding15 {
  226. padding: 15rpx;
  227. }
  228. .padding10 {
  229. padding: 10rpx;
  230. }
  231. </style>