home.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  1. <template>
  2. <view class="page">
  3. <image class="bg-img" :src="$getImageUrl('static/images/applet/other/identityBg.png')" mode="widthFix"></image>
  4. <image class="idTitle" :src="$getImageUrl('static/images/applet/other/idTitle.png')"></image>
  5. <image class="loginBg" :src="$getImageUrl('static/images/applet/other/loginBg.png')"></image>
  6. <view class="cardList">
  7. <view class="card cardBg-bule" @tap="checkWorker">
  8. <image class="card-avatar" :src="$getImageUrl('static/images/applet/other/employer.png')"></image>
  9. <view class="card-content">
  10. <view class="content-title">我是雇主(企业雇主、个人雇主)</view>
  11. <view class="content-explain">找员工、找服务</view>
  12. <view class="content-explain">找兼职、找外包</view>
  13. </view>
  14. </view>
  15. <!-- <view class="card cardBg-green">
  16. <image class="card-avatar" src="../../static/images/index/recruiter.png"></image>
  17. <view class="card-content">
  18. <view class="content-title">我是经纪人</view>
  19. <view class="content-explain">推荐人才入职领赏金</view>
  20. </view>
  21. </view> -->
  22. <view class="card cardBg-red" @tap="goUser">
  23. <image class="card-avatar" :src="$getImageUrl('static/images/applet/other/jobhunter.png')"></image>
  24. <view class="card-content">
  25. <view class="content-title">我是零工</view>
  26. <view class="content-explain">找工作、接任务</view>
  27. <view class="content-explain">接兼职、接外包</view>
  28. </view>
  29. </view>
  30. </view>
  31. <!-- <view class="bg-white homepage">
  32. <view>
  33. <view class="" @tap="checkWorker">
  34. <view class="padding"></view>
  35. <image mode="widthFix" style="width: 100%;" :src="zqtop"></image>
  36. <view class="padding text-center text-blue">我要招聘</view>
  37. </view>
  38. <view class="" @tap="goUser">
  39. <image mode="widthFix" style="width: 100%; position: fixed; left: 0; bottom: 160rpx;"
  40. :src="zqbottom"></image>
  41. <view class="padding text-center text-blue"
  42. style="width: 100%; position: fixed; left: 0; bottom: 40rpx;">我要求职</view>
  43. </view>
  44. </view>
  45. </view> -->
  46. <view class="cu-modal" :class="modalName=='workerModal'?'show':''">
  47. <view class="cu-dialog">
  48. <view class="cu-bar bg-white justify-end">
  49. <view class="content">身份切换</view>
  50. <view class="action" @tap="hideModal">
  51. <text class="cuIcon-close text-red"></text>
  52. </view>
  53. </view>
  54. <view class="padding-tb-sm">
  55. <view class="cu-list menu">
  56. <block v-if="workerall!=null">
  57. <view class="cu-item arrow" v-for="(item,index) in workerall" :key="index" @tap="goWorker"
  58. :data-index="index">
  59. <view class="content text-left">
  60. <text class="cuIcon-settings text-grey"></text>
  61. <text>{{item.title}}</text>
  62. </view>
  63. <view class="action">
  64. <text class="text-grey">
  65. <text class="margin-left text-red" v-if="item.status==1">待审核</text>
  66. <text class="margin-left text-red" v-if="item.status==4">升级审核</text>
  67. </text>
  68. </view>
  69. </view>
  70. </block>
  71. <view class="cu-item arrow" @click="goLogin(1)">
  72. <view class="content text-left">
  73. <text class="cuIcon-settings text-grey"></text>
  74. <text>个人雇主注册</text>
  75. </view>
  76. </view>
  77. <view class="cu-item arrow" @click="goLogin(2)">
  78. <view class="content text-left">
  79. <text class="cuIcon-settings text-grey"></text>
  80. <text>企业雇主注册</text>
  81. </view>
  82. </view>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. <view class="cu-modal" :class="modalName=='apptreatyModal'?'show':''">
  88. <view class="cu-dialog">
  89. <view class="cu-bar bg-white justify-end">
  90. <view class="content">服务协议和隐私政策</view>
  91. </view>
  92. <view class="padding-tb-sm">
  93. <scroll-view class="xy-content text-left" scroll-y>
  94. <text>请你务必审慎阅读、充分理解“用户服务协议”和“隐私政策”各条款,包括但不限于:为了向你提供即时招聘讯息、内容分享等服务,我们需要收集你的设备信息、操作日志等个人信息。</text>
  95. <br />
  96. <view>你可阅读
  97. <text class="text-blue" @tap="goPage('/pages/tool/sinpage?field=service')">《用户服务协议》</text>
  98. 和<text class="text-blue" @tap="goPage('/pages/tool/sinpage?field=privacy')">《隐私政策》</text>
  99. 了解详细信息,如你同意,请点击“我同意”开始接受我们等服务。
  100. </view>
  101. </scroll-view>
  102. </view>
  103. <view class="cu-bar bg-white justify-end">
  104. <view class="action">
  105. <button class="cu-btn line-blue text-blue" @tap="outApptreaty">不同意</button>
  106. <button class="cu-btn bg-blue margin-left" @tap="setApptreaty">我同意</button>
  107. </view>
  108. </view>
  109. </view>
  110. </view>
  111. </view>
  112. </template>
  113. <script>
  114. var _this;
  115. export default {
  116. data() {
  117. return {
  118. identityinfo: false,
  119. userinfo: false,
  120. workerinfo: null,
  121. workerall: null,
  122. modalName: null,
  123. apptreaty: "",
  124. zqtop: '',
  125. zqbottom: ''
  126. }
  127. },
  128. onLoad: function(option) {
  129. _this = this;
  130. _this.getImage();
  131. _this.identityinfo = uni.getStorageSync('identityinfo') || false;
  132. _this.userinfo = uni.getStorageSync('userinfo') || false;
  133. _this.workerinfo = uni.getStorageSync('workerinfo') || null;
  134. if (_this.identityinfo == true && _this.workerinfo != null) {
  135. uni.reLaunch({
  136. url: "/pages/worker/worker"
  137. });
  138. return;
  139. }
  140. if (_this.identityinfo == true) {
  141. uni.reLaunch({
  142. url: "/pages/index/index"
  143. });
  144. return;
  145. }
  146. _this.$req.ajax({
  147. path: "index/gethomedata",
  148. data: {
  149. userid: _this.userinfo == false ? 0 : _this.userinfo.id
  150. }
  151. }).then((data) => {
  152. _this.apptreaty = data.apptreaty;
  153. _this.workerall = data.workerall;
  154. // #ifdef APP-PLUS
  155. _this.modalName = uni.getStorageSync('apptreatyModal') || "apptreatyModal";
  156. // #endif
  157. }).catch((err) => {
  158. uni.showModal({
  159. title: '信息提示',
  160. content: err,
  161. showCancel: false
  162. });
  163. });
  164. },
  165. onShareAppMessage: function(res) {
  166. return {
  167. title: "晋江人力",
  168. path: "/pages/index/home"
  169. }
  170. },
  171. methods: {
  172. // 获取图片
  173. getImage: function() {
  174. _this.$req.ajax({
  175. path: "my/getauthimg",
  176. data: {}
  177. }).then((data) => {
  178. _this.zqtop = data.head1;
  179. _this.zqbottom = data.head2;
  180. }).catch((err) => {});
  181. },
  182. setApptreaty: function() {
  183. uni.setStorageSync('apptreatyModal', "hideapptreatyModal");
  184. _this.modalName = null;
  185. },
  186. outApptreaty: function() {
  187. plus.runtime.quit();
  188. },
  189. goPage: function(pageurl) {
  190. uni.navigateTo({
  191. url: pageurl,
  192. fail: function() {
  193. uni.switchTab({
  194. url: pageurl
  195. });
  196. }
  197. });
  198. },
  199. checkWorker: function() {
  200. if (_this.workerall == 'null') {
  201. uni.navigateTo({
  202. url: "/pages/login/worker"
  203. });
  204. return false;
  205. }
  206. _this.modalName = "workerModal";
  207. },
  208. hideModal: function(e) {
  209. _this.modalName = null;
  210. },
  211. goWorker: function(e) {
  212. var index = e.currentTarget.dataset.index;
  213. if (_this.workerall[index].status == 1) {
  214. // uni.showModal({
  215. // title: '信息提示',
  216. // content: "信息审核中,请耐心等待。",
  217. // showCancel: false
  218. // });
  219. // return;
  220. }
  221. uni.setStorageSync('identityinfo', true);
  222. uni.setStorageSync('workerinfo', _this.workerall[index]);
  223. uni.reLaunch({
  224. url: "/pages/worker/worker"
  225. });
  226. },
  227. goLogin: function(wtype) {
  228. uni.setStorageSync('identityinfo', true);
  229. uni.navigateTo({
  230. url: "/pages/login/worker?wtype=" + wtype
  231. });
  232. },
  233. goUser: function() {
  234. _this.userinfo = _this.checkLogin("/pages/index/index");
  235. uni.setStorageSync('identityinfo', true);
  236. uni.setStorageSync('workerinfo', null);
  237. uni.reLaunch({
  238. url: "/pages/index/index"
  239. });
  240. }
  241. }
  242. }
  243. </script>
  244. <style lang="scss">
  245. page {
  246. background-color: #fffff6;
  247. text-align: center;
  248. }
  249. bg-color {
  250. background-color: #fffff6;
  251. }
  252. .homepage {
  253. height: calc(100vh);
  254. background-repeat: no-repeat;
  255. background-size: 100%;
  256. background-position: bottom center;
  257. }
  258. .homepage image {
  259. width: 100%;
  260. }
  261. .homepage image.homebg {
  262. width: 750rpx;
  263. position: fixed;
  264. bottom: 0rpx;
  265. }
  266. .homebox {}
  267. .homebox image {
  268. width: 280rpx;
  269. }
  270. .xy-content {
  271. padding: 10rpx 30rpx;
  272. background: #F6F6F6;
  273. line-height: 50rpx;
  274. font-size: 28rpx;
  275. text-align: justify;
  276. box-sizing: border-box;
  277. }
  278. .padding {
  279. padding: 40rpx;
  280. }
  281. .padding15 {
  282. padding: 15rpx;
  283. }
  284. .padding10 {
  285. padding: 10rpx;
  286. }
  287. .bg-img {
  288. position: fixed;
  289. width: 100%;
  290. // height: 100%;
  291. top: 0;
  292. left: 0;
  293. z-index: -1;
  294. }
  295. .idTitle {
  296. margin: 48rpx 0 40rpx;
  297. width: 552rpx;
  298. height: 110rpx;
  299. }
  300. .loginBg {
  301. margin: 0 0 46rpx;
  302. width: 277rpx;
  303. height: 205rpx;
  304. }
  305. .cardList {
  306. padding: 0 18rpx;
  307. .cardBg-bule {
  308. background: linear-gradient(229deg, #7cb8fb 0%, #3492fa 100%);
  309. box-shadow: 0rpx 0rpx 10rpx 2rpx rgba(73, 128, 209, 0.3);
  310. }
  311. .cardBg-green {
  312. box-shadow: 0rpx 0rpx 10rpx 2rpx rgba(19, 192, 180, 0.3);
  313. }
  314. .cardBg-red {
  315. background: linear-gradient(229deg, #EB7600 0%, #F74C00 100%);
  316. box-shadow: 0rpx 8rpx 40rpx 2rpx rgba(255,76,10,0.3);
  317. }
  318. .card {
  319. margin-bottom: 70rpx;
  320. padding-left: 46rpx;
  321. width: 100%;
  322. height: 224rpx;
  323. border-radius: 14rpx;
  324. display: flex;
  325. align-items: center;
  326. .card-avatar {
  327. width: 172rpx;
  328. height: 172rpx;
  329. }
  330. .card-content {
  331. margin-left: 40rpx;
  332. text-align: left;
  333. .content-title {
  334. margin-bottom: 20rpx;
  335. font-size: 28rpx;
  336. font-weight: 600;
  337. color: #FFFFFF;
  338. }
  339. .content-explain {
  340. margin-bottom: 10rpx;
  341. font-size: 24rpx;
  342. color: #FFFFFF;
  343. }
  344. }
  345. }
  346. }
  347. </style>