my.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911
  1. <template name="mypage">
  2. <view class="mypage">
  3. <u-sticky>
  4. <view class="topArea">
  5. <image class="topArea-Bg" :src="$getImageUrl('static/images/applet/my/myTopBg.png')"></image>
  6. <view class="topArea-top" :style="{height:navBarTop + 'px'}"></view>
  7. <view class="topArea-nav" :style="{height:navBarHeight + 'px',lineHeight:navBarHeight + 'px'}">
  8. <view class="nav-title">个人中心</view>
  9. </view>
  10. <view class="topArea-main">
  11. <view class="noLogin" @click="goLPage('/pages/my/myinfo')" v-if="userinfo==false">
  12. <image class="noLogin-icon" :src="$getImageUrl('static/images/applet/dfhead.jpg')"></image>
  13. <view class="noLogin-title">未登录</view>
  14. </view>
  15. <view class="haveLogin" v-else>
  16. <image class="login-avatar" :src="userinfo.avatar"></image>
  17. <view class="login-infor">
  18. <view class="infor-top">
  19. <text class="infor-top-name">{{userinfo.nickname}}</text>
  20. <view class="infor-top-verify" v-if="brokerall != null">
  21. <view class="verify-icon">
  22. <image class="verify-icon-image"
  23. :src="$getImageUrl('static/images/applet/my/verify.png')">
  24. </image>
  25. </view>
  26. <view class="verify-text">经纪人</view>
  27. </view>
  28. <text class="infor-top-noVerify" v-if="userinfo.authstatus == 1">(未实名)</text>
  29. </view>
  30. <view class="infor-bottom">{{userinfo.mobile}}</view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </u-sticky>
  36. <view class="topMenu">
  37. <view class="topMenu-item" @click="goLPage('/pages/my/myinfo')">
  38. <image class="item-image" :src="$getImageUrl('static/images/applet/my/infor.png')" mode="widthFix">
  39. </image>
  40. <view class="item-title">基本信息</view>
  41. </view>
  42. <view class="topMenu-item" @click="goLPage('/pages/my/mycode')">
  43. <image class="item-image" :src="$getImageUrl('static/images/applet/my/code.png')" mode="widthFix">
  44. </image>
  45. <view class="item-title">我的推广码</view>
  46. </view>
  47. <view class="topMenu-item" @click="goLPage('/pages/my/myteam')">
  48. <image class="item-image" :src="$getImageUrl('static/images/applet/my/invite.png')" mode="widthFix">
  49. </image>
  50. <view class="item-title">我的邀请</view>
  51. </view>
  52. </view>
  53. <view class="topApply">
  54. <view class="topApply-left">
  55. <image class="left-icon" :src="$getImageUrl('static/images/applet/index/topApplyIcon.png')"></image>
  56. </view>
  57. <view class="topApply-center" v-if="brokerall == null">经纪人福利多多</view>
  58. <view class="topApply-center" v-if="brokerall != null">{{brokerall[0].type == 1 ? '经纪人中心' : '红色合伙人'}}</view>
  59. <view class="topApply-right" v-if="brokerall == null" @tap="goLPage('/pages/broker/brokerform')">立即开通</view>
  60. <view class="topApply-right" v-if="brokerall != null" @tap="goLPage('/pages/broker/center')">进入工作台</view>
  61. </view>
  62. <view class="teacher" @click="goLPage('/pages/resident/resident')" v-if="resident != null">
  63. <view class="teacher-left">
  64. <image class="left-icon" :src="$getImageUrl('static/images/applet/index/topApplyIcon.png')"></image>
  65. </view>
  66. <view class="teacher-center">驻场老师</view>
  67. </view>
  68. <view class="topMenu">
  69. <view class="topMenu-item" @click="goLPage('/pages/my/mybag')">
  70. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/wallet.png')"></image>
  71. <view class="item-titleSmall">我的钱包</view>
  72. </view>
  73. <view class="topMenu-item" @click="goLPage('/pages/my/myauth')">
  74. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/verifyName.png')"></image>
  75. <view class="item-titleSmall">实名认证</view>
  76. </view>
  77. <view class="topMenu-item" @click="goLPage('/pages/comjobs/star')">
  78. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/collect.png')"></image>
  79. <view class="item-titleSmall">我的收藏</view>
  80. </view>
  81. <view class="topMenu-item" @click="goLPage('/pages/my/task')">
  82. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/task.png')"></image>
  83. <view class="item-titleSmall">任务中心</view>
  84. </view>
  85. </view>
  86. <view class="topMenu">
  87. <view class="topMenu-item" @click="goPage('/pages/comjobs/log')">
  88. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/apply.png')"></image>
  89. <view class="item-titleSmall">我的报名</view>
  90. </view>
  91. <view class="topMenu-item" @click="goLPage('/pages/resume/log')">
  92. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/invitation.png')"></image>
  93. <view class="item-titleSmall">收到的邀请</view>
  94. </view>
  95. <view class="topMenu-item" @click="goHome">
  96. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/recruit.png')"></image>
  97. <view class="item-titleSmall">我要招聘</view>
  98. </view>
  99. <view class="topMenu-item" @click="goLPage('/pages/train/joinlist')">
  100. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/cultivate.png')"></image>
  101. <view class="item-titleSmall">培训意愿</view>
  102. </view>
  103. </view>
  104. <view class="topMenu">
  105. <view class="topMenu-item" @click="goLPage('/pages/notice/notice')">
  106. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/notice.png')"></image>
  107. <view class="item-titleSmall">通知公告</view>
  108. </view>
  109. <view class="topMenu-item" @click="goLPage('/pages/my/feedback')">
  110. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/feedback.png')"></image>
  111. <view class="item-titleSmall">意见反馈</view>
  112. </view>
  113. <view class="topMenu-item" @click="goPage('/pages/my/about')">
  114. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/about.png')"></image>
  115. <view class="item-titleSmall">关于我们</view>
  116. </view>
  117. <view class="topMenu-item" @tap="goHome">
  118. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/exchange.png')"></image>
  119. <view class="item-titleSmall">切换身份</view>
  120. </view>
  121. </view>
  122. <view style="margin-top: 60rpx; display: flex;justify-content: center;">
  123. <image style=" width: 127rpx;" :src="$getImageUrl('static/images/applet/my/empty.png')" mode="widthFix">
  124. </image>
  125. </view>
  126. <view style="margin-top: 34rpx; text-align: center; font-size: 24rpx; color: #B4B5B5;">没有更多数据了</view>
  127. <view class="margin-bottom" style="position: relative;" v-if="false">
  128. <view class="padding-lr padding-top" style="z-index: 999; position: absolute; top: 0rpx; width: 100%;">
  129. <view class="bg-white radius flex justify-start padding-lr padding-tb-xl shadow shadow-lg"
  130. :style="{'background-image':'url('+$getImageUrl('static/images/applet/mytop.png')+')'}"
  131. @click="goLPage('/pages/my/myinfo')" v-if="userinfo==false">
  132. <view class="cu-avatar lg round"
  133. :style="{'background-image':'url('+$getImageUrl('static/images/applet/dfhead.jpg')+')'}"></view>
  134. <view class="padding-lr padding-top text-lg">未登录</view>
  135. </view>
  136. <view
  137. class="bg-white radius flex justify-between align-center padding-lr padding-tb-xl shadow shadow-lg"
  138. :style="{'background-image':'url('+$getImageUrl('static/images/applet/mytop.png')+')'}" v-else>
  139. <view class="flex justify-start">
  140. <view class="cu-avatar lg round margin-left"
  141. :style="'background-image:url('+userinfo.avatar+');'"></view>
  142. <view class="padding-lr padding-top-xs text-lg">
  143. <view class="padding-bottom-xs">
  144. {{userinfo.nickname}}
  145. <text class="text-sm text-red" v-if="userinfo.authstatus == 1">(未实名)</text>
  146. <text class="text-sm text-red" v-if="brokerall != null">(经纪人)</text>
  147. </view>
  148. <view class="text-sm text-gray">{{userinfo.mobile}}</view>
  149. </view>
  150. </view>
  151. <!-- <view @click="goBrokerMyentry('/pages/my/myentry')" style="font-weight:bold;color: red;">【经纪人中心】</view> -->
  152. </view>
  153. </view>
  154. <view style="height: 140rpx; width: 100%;" v-if="false"></view>
  155. <view class="cu-list grid col-3 no-border" style="padding-top: 120rpx;" v-if="appplatform=='ios'">
  156. <view class="cu-item text-center" @click="goLPage('/pages/my/myinfo')">
  157. <image class="myicon" :src="$getImageUrl('static/images/applet/myicon01.png')"></image>
  158. <text>基本信息</text>
  159. </view>
  160. <view class="cu-item text-center" @click="goLPage('/pages/my/myteam')">
  161. <image class="myicon" :src="$getImageUrl('static/images/applet/myicon03.png')"></image>
  162. <text>我的邀请</text>
  163. </view>
  164. <view class="cu-item text-center" @click="goLPage('/pages/mall/mall')">
  165. <image class="myicon" :src="$getImageUrl('static/images/applet/myicon04.png')"></image>
  166. <text>积分商城</text>
  167. </view>
  168. </view>
  169. <view class="cu-list grid col-3 no-border" style="padding-top: 120rpx;" v-else>
  170. <view class="cu-item text-center" @click="goLPage('/pages/my/myinfo')">
  171. <image class="myicon" :src="$getImageUrl('static/images/applet/myicon01.png')"></image>
  172. <text>基本信息</text>
  173. </view>
  174. <view class="cu-item text-center" @click="goLPage('/pages/my/mycode')">
  175. <image class="myicon" :src="$getImageUrl('static/images/applet/myicon02.png')"></image>
  176. <text>我的推广码</text>
  177. </view>
  178. <view class="cu-item text-center" @click="goLPage('/pages/my/myteam')">
  179. <image class="myicon" :src="$getImageUrl('static/images/applet/myicon03.png')"></image>
  180. <text>我的邀请</text>
  181. </view>
  182. <!-- <view class="cu-item text-center" @click="goLPage('/pages/mall/mall')">
  183. <image class="myicon" :src="$getImageUrl('static/images/applet/myicon04.png')"></image>
  184. <text>积分商城</text>
  185. </view> -->
  186. </view>
  187. </view>
  188. <view class="cu-list menu sm-border" v-if="false">
  189. <view class="cu-item arrow" @click="goLPage('/pages/broker/center')" v-if="brokerall != null">
  190. <view class="content">
  191. <text class="cuIcon-friend text-grey"></text>
  192. <text>经纪人中心</text>
  193. </view>
  194. </view>
  195. <view class="cu-item arrow" @click="goLPage('/pages/resident/resident')" v-if="resident != null">
  196. <view class="content">
  197. <text class="cuIcon-friend text-grey"></text>
  198. <text>驻场老师</text>
  199. </view>
  200. </view>
  201. <view class="cu-item arrow" @click="goPage('/pages/comjobs/log')">
  202. <view class="content">
  203. <text class="cuIcon-edit text-grey"></text>
  204. <text>我的报名</text>
  205. </view>
  206. <view class="action" v-if="tip_num.comjobs_num > 0">
  207. <view class="cu-tag round bg-red sm">{{tip_num.comjobs_num}}</view>
  208. </view>
  209. </view>
  210. <view class="cu-item arrow" @click="goLPage('/pages/comjobs/star')">
  211. <view class="content">
  212. <text class="cuIcon-like text-grey"></text>
  213. <text>我的收藏</text>
  214. </view>
  215. </view>
  216. <view class="cu-item arrow" @click="goLPage('/pages/resume/log')">
  217. <view class="content">
  218. <text class="cuIcon-profile text-grey"></text>
  219. <text>收到的邀请</text>
  220. </view>
  221. <view class="action" v-if="tip_num.invite_num > 0">
  222. <view class="cu-tag round bg-red sm">{{tip_num.invite_num}}</view>
  223. </view>
  224. </view>
  225. <view class="cu-item arrow" @click="goLPage('/pages/my/mybag')">
  226. <view class="content">
  227. <text class="cuIcon-moneybag text-grey"></text>
  228. <text>我的钱包</text>
  229. </view>
  230. </view>
  231. <view class="cu-item arrow" @click="goLPage('/pages/notice/notice')">
  232. <view class="content">
  233. <text class="cuIcon-punch text-grey"></text>
  234. <text>通知公告</text>
  235. </view>
  236. </view>
  237. <view class="cu-item arrow" @click="goLPage('/pages/train/joinlist')">
  238. <view class="content">
  239. <text class="cuIcon-calendar text-grey"></text>
  240. <text>培训意愿</text>
  241. </view>
  242. </view>
  243. <!-- <view class="cu-item arrow" @click="goLPage('/pages/my/myintegral')">
  244. <view class="content">
  245. <text class="cuIcon-sponsor text-grey"></text>
  246. <text>我的积分</text>
  247. </view>
  248. </view> -->
  249. <!-- <view class="cu-item arrow" @click="goPage('/pages/article/article')">
  250. <view class="content">
  251. <text class="cuIcon-news text-grey"></text>
  252. <text>政策资讯</text>
  253. </view>
  254. </view> -->
  255. <view class="cu-item arrow" @click="goLPage('/pages/my/myauth')">
  256. <view class="content">
  257. <text class="cuIcon-news text-grey"></text>
  258. <text>实名认证</text>
  259. </view>
  260. <view class="action">
  261. <text class="text-grey" v-if="userinfo.authstatus==1">待认证</text>
  262. <text class="text-grey" v-if="userinfo.authstatus==2">审核中</text>
  263. <text class="text-grey" v-if="userinfo.authstatus==3">已认证</text>
  264. </view>
  265. </view>
  266. <view class="cu-item arrow" @click="goLPage('/pages/my/task')">
  267. <view class="content">
  268. <text class="cuIcon-album text-grey"></text>
  269. <text>任务中心</text>
  270. </view>
  271. </view>
  272. <view class="cu-item arrow" @click="goHome">
  273. <view class="content">
  274. <text class="cuIcon-friend text-grey"></text>
  275. <text>我要招聘</text>
  276. </view>
  277. </view>
  278. </view>
  279. <view class="cu-list menu sm-border" v-if="false">
  280. <view class="cu-item arrow" @click="goLPage('/pages/my/feedback')">
  281. <view class="content">
  282. <text class="cuIcon-warn text-grey"></text>
  283. <text>意见反馈</text>
  284. </view>
  285. </view>
  286. <view class="cu-item arrow" @click="goPage('/pages/my/about')">
  287. <view class="content">
  288. <text class="cuIcon-info text-grey"></text>
  289. <text>关于我们</text>
  290. </view>
  291. </view>
  292. </view>
  293. <view class="cu-modal" :class="modalName=='workerModal'?'show':''">
  294. <view class="cu-dialog">
  295. <view class="cu-bar bg-white justify-end">
  296. <view class="content">身份切换</view>
  297. <view class="action" @tap="hideModal">
  298. <text class="cuIcon-close text-red"></text>
  299. </view>
  300. </view>
  301. <view class="padding-tb-sm">
  302. <view class="cu-list menu">
  303. <block v-if="workerall!=null">
  304. <view class="cu-item arrow" v-for="(item,index) in workerall" :key="index" @tap="goWorker"
  305. :data-index="index">
  306. <view class="content text-left">
  307. <text class="cuIcon-settings text-grey"></text>
  308. <text>{{item.title}}</text>
  309. </view>
  310. <view class="action">
  311. <text class="text-grey">
  312. <text class="margin-left text-red" v-if="item.status==1">待审核</text>
  313. <text class="margin-left text-red" v-if="item.status==4">升级审核</text>
  314. </text>
  315. </view>
  316. </view>
  317. </block>
  318. <view class="cu-item arrow" @click="goLogin(1)">
  319. <view class="content text-left">
  320. <text class="cuIcon-settings text-grey"></text>
  321. <text>个人雇主注册</text>
  322. </view>
  323. </view>
  324. <view class="cu-item arrow" @click="goLogin(2)">
  325. <view class="content text-left">
  326. <text class="cuIcon-settings text-grey"></text>
  327. <text>企业雇主注册</text>
  328. </view>
  329. </view>
  330. </view>
  331. </view>
  332. </view>
  333. </view>
  334. <view class="padding-sm"></view>
  335. <view class="padding-xl"></view>
  336. <view class="cu-bar tabbar bg-white foot">
  337. <view class="action text-gray" @tap="goNavPage('/pages/index/index')">
  338. <view class="cuIcon-cu-image">
  339. <image src="../../static/tabbar/index.png"></image>
  340. </view>
  341. 首页
  342. </view>
  343. <view class="action text-gray" @tap="goNavPage('/pages/comjobs/comjobs')">
  344. <view class="cuIcon-cu-image">
  345. <image src="../../static/tabbar/jobs.png"></image>
  346. </view>
  347. 招聘
  348. </view>
  349. <!-- #ifndef MP-WEIXIN -->
  350. <view class="action text-gray videoimg" @tap="goNavPage('/pages/video/videolist')">
  351. <view class="cuIcon-cu-image">
  352. <image src="../../static/tabbar/video.png"></image>
  353. </view>
  354. 微工作
  355. </view>
  356. <!-- #endif -->
  357. <view class="action text-gray" @tap="goNavPage('/pages/broker/brokerlist')">
  358. <view class="cuIcon-cu-image">
  359. <image src="../../static/tabbar/broker.png"></image>
  360. </view>
  361. 经纪人
  362. </view>
  363. <view class="action text-red" @tap="goNavPage('/pages/my/my')">
  364. <view class="cuIcon-cu-image">
  365. <image src="../../static/tabbar/mySelected.png"></image>
  366. </view>
  367. 我的
  368. </view>
  369. </view>
  370. <!-- <button class="cu-btn bg-blue lg shadow echo-gohome" @tap="goHome"> 切换身份 </button> -->
  371. <wxContact></wxContact>
  372. </view>
  373. </template>
  374. <script>
  375. var _this;
  376. export default {
  377. data() {
  378. return {
  379. appplatform: "",
  380. param: {},
  381. userinfo: false,
  382. workerall: null,
  383. agentall: null,
  384. brokerall: null,
  385. modalName: null,
  386. resident: null,
  387. tip_num: {
  388. comjobs_num: 0,
  389. invite_num: 0,
  390. },
  391. navBarTop: 0,
  392. navBarHeight: 0,
  393. }
  394. },
  395. onLoad: function() {
  396. _this = this;
  397. //#ifdef APP-PLUS
  398. _this.appplatform = uni.getSystemInfoSync().platform;
  399. //#endif
  400. let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
  401. _this.navBarTop = menuButtonInfo.top;
  402. _this.navBarHeight = menuButtonInfo.height;
  403. },
  404. onShareAppMessage: function(res) {
  405. return {
  406. title: "个人中心",
  407. path: "/pages/my/my"
  408. }
  409. },
  410. onShow: function() {
  411. _this = this;
  412. _this.userinfo = uni.getStorageSync('userinfo') || false;
  413. _this.workerall = null;
  414. _this.agentall = null;
  415. _this.brokerall = null;
  416. if (_this.userinfo !== false) {
  417. _this.$req.ajax({
  418. path: "my/getuser",
  419. data: {
  420. userid: _this.userinfo.id
  421. }
  422. }).then((data) => {
  423. _this.param = data.param;
  424. _this.userinfo = data.user;
  425. uni.setStorageSync('userinfo', data.user);
  426. _this.workerall = data.workerall;
  427. _this.agentall = data.agentall;
  428. _this.brokerall = data.brokerall;
  429. _this.resident = data.resident;
  430. console.log("经纪人",_this.brokerall)
  431. uni.setStorageSync('residentinfo', data.resident);
  432. uni.setStorageSync('brokerinfo', data.brokerall ? data.brokerall[0] : null);
  433. }).catch((err) => {
  434. uni.showModal({
  435. title: '信息提示',
  436. content: err,
  437. showCancel: false
  438. });
  439. _this.userinfo = false;
  440. uni.removeStorageSync('userinfo');
  441. });
  442. //获取提示数字
  443. _this.$req.ajax({
  444. path: "my/gettipnum",
  445. data: {
  446. userid: _this.userinfo.id
  447. }
  448. }).then((data) => {
  449. _this.tip_num = data;
  450. })
  451. }
  452. },
  453. methods: {
  454. goUrl: function(type, tilurl) {
  455. if (type == 1) {
  456. uni.navigateTo({
  457. url: tilurl,
  458. fail: function() {
  459. uni.switchTab({
  460. url: tilurl
  461. });
  462. }
  463. });
  464. } else {
  465. uni.navigateTo({
  466. url: '/pages/tool/webview?pagesrc=' + encodeURIComponent(tilurl)
  467. });
  468. }
  469. },
  470. goManage: function(e) {
  471. _this.userinfo = _this.checkLogin("/pages/my/my");
  472. if (_this.userinfo === false) {
  473. return false;
  474. }
  475. var mtype = e.currentTarget.dataset.mtype;
  476. var index = e.currentTarget.dataset.index;
  477. var pageurl = "/pages/index/index";
  478. if (mtype == 'worker') {
  479. // if (_this.workerall[index].status==1){
  480. // uni.showModal({
  481. // title: '信息提示',
  482. // content: "信息审核中,请耐心等待。",
  483. // showCancel: false
  484. // });
  485. // return;
  486. // }
  487. pageurl = "/pages/worker/worker";
  488. uni.setStorageSync('workerinfo', _this.workerall[index]);
  489. } else if (mtype == 'agent') {
  490. pageurl = "/pages/agent/agent";
  491. uni.setStorageSync('agentinfo', _this.agentall[index]);
  492. } else if (mtype == 'broker') {
  493. pageurl = "/pages/broker/broker";
  494. uni.setStorageSync('brokerinfo', _this.brokerall[index]);
  495. }
  496. uni.navigateTo({
  497. url: pageurl,
  498. fail: function() {
  499. uni.switchTab({
  500. url: pageurl
  501. });
  502. }
  503. });
  504. },
  505. hideModal: function(e) {
  506. _this.modalName = null;
  507. },
  508. goLogin: function(wtype) {
  509. uni.setStorageSync('identityinfo', true);
  510. uni.navigateTo({
  511. url: "/pages/login/worker?wtype=" + wtype
  512. });
  513. },
  514. goLPage: function(pageurl) {
  515. _this.userinfo = _this.checkLogin("/pages/my/my");
  516. if (_this.userinfo === false) {
  517. return false;
  518. }
  519. uni.navigateTo({
  520. url: pageurl,
  521. fail: function() {
  522. uni.switchTab({
  523. url: pageurl
  524. });
  525. }
  526. });
  527. },
  528. goPage: function(pageurl) {
  529. uni.navigateTo({
  530. url: pageurl,
  531. fail: function() {
  532. uni.switchTab({
  533. url: pageurl
  534. });
  535. }
  536. });
  537. },
  538. goBrokerMyentry: function(pageurl) {
  539. _this.userinfo = uni.getStorageSync('userinfo') || false;
  540. if (!_this.userinfo.brokerid) {
  541. uni.showModal({
  542. title: '暂无权限',
  543. content: '您现在还不是经纪人,请先申请',
  544. success: function(res) {
  545. if (res.confirm) {
  546. uni.navigateTo({
  547. url: "/pages/broker/brokerform"
  548. });
  549. } else if (res.cancel) {
  550. console.log('用户点击取消');
  551. }
  552. }
  553. });
  554. } else {
  555. uni.navigateTo({
  556. url: pageurl,
  557. fail: function() {
  558. uni.switchTab({
  559. url: pageurl
  560. });
  561. }
  562. });
  563. }
  564. },
  565. goNavPage: function(pageurl) {
  566. uni.redirectTo({
  567. url: pageurl
  568. });
  569. },
  570. // 咨询电话
  571. makeTelephone: function(e) {
  572. var telephone = e.currentTarget.dataset.telephone;
  573. uni.makePhoneCall({
  574. phoneNumber: telephone
  575. });
  576. },
  577. loginOut: function() {
  578. uni.clearStorageSync();
  579. uni.showModal({
  580. title: '温馨提示',
  581. content: '退出成功。',
  582. showCancel: false,
  583. success: function(res) {
  584. if (res.confirm) {
  585. uni.reLaunch({
  586. url: "/pages/index/home"
  587. });
  588. }
  589. }
  590. });
  591. },
  592. goWorker: function(e) {
  593. var index = e.currentTarget.dataset.index;
  594. if (_this.workerall[index].status == 1 || _this.workerall[index].status == 4) {
  595. uni.showModal({
  596. title: '信息提示',
  597. content: "信息审核中,请耐心等待。",
  598. showCancel: false
  599. });
  600. return;
  601. }
  602. if (_this.workerall[index].status == 2 || _this.workerall[index].status == 3) {
  603. uni.showModal({
  604. title: '信息提示',
  605. content: "账号存在风险,请联系平台。",
  606. showCancel: false
  607. });
  608. return;
  609. }
  610. uni.setStorageSync('identityinfo', true);
  611. uni.setStorageSync('workerinfo', _this.workerall[index]);
  612. uni.reLaunch({
  613. url: "/pages/worker/worker"
  614. });
  615. },
  616. goHome: function() {
  617. _this.modalName = "workerModal";
  618. // uni.setStorageSync('identityinfo', false);
  619. // uni.setStorageSync('workerinfo', null);
  620. // uni.reLaunch({
  621. // url: "/pages/index/home"
  622. // });
  623. },
  624. }
  625. }
  626. </script>
  627. <style lang="scss">
  628. /* .mytop{ padding: 30rpx 30rpx 50rpx 30rpx; background-repeat: no-repeat; background-size: 100% 100%; background-position: center; position: relative; } */
  629. .topArea {
  630. width: 750rpx;
  631. height: 300rpx;
  632. position: relative;
  633. .topArea-Bg {
  634. position: absolute;
  635. width: 100%;
  636. height: 300rpx;
  637. z-index: -100;
  638. }
  639. .topArea-nav {
  640. padding: 0 20rpx;
  641. display: flex;
  642. justify-content: space-between;
  643. .nav-title {
  644. width: 100%;
  645. font-size: 32rpx;
  646. font-family: PingFang SC, PingFang SC;
  647. font-weight: 500;
  648. color: #FFFFFF;
  649. text-align: center;
  650. }
  651. }
  652. .topArea-main {
  653. width: 100%;
  654. margin-top: 30rpx;
  655. padding: 0 24rpx;
  656. .noLogin {
  657. display: flex;
  658. align-items: center;
  659. .noLogin-icon {
  660. width: 120rpx;
  661. height: 120rpx;
  662. border-radius: 16rpx;
  663. }
  664. .noLogin-title {
  665. margin-left: 20rpx;
  666. font-size: 32rpx;
  667. color: #FFFFFF;
  668. }
  669. }
  670. .haveLogin {
  671. display: flex;
  672. align-items: center;
  673. .login-avatar {
  674. width: 120rpx;
  675. height: 120rpx;
  676. border-radius: 16rpx;
  677. }
  678. .login-infor {
  679. margin-left: 20rpx;
  680. .infor-top {
  681. margin-bottom: 20rpx;
  682. display: flex;
  683. align-items: center;
  684. .infor-top-name {
  685. font-size: 26rpx;
  686. color: #FFFFFF;
  687. }
  688. .infor-top-verify {
  689. margin-left: 30rpx;
  690. font-size: 24rpx;
  691. color: #FFFFFF;
  692. display: flex;
  693. align-items: center;
  694. .verify-icon {
  695. margin-right: 10rpx;
  696. width: 25rpx;
  697. height: 25rpx;
  698. border-radius: 50%;
  699. background-color: #F5DB03;
  700. .verify-icon-image {
  701. width: 25rpx;
  702. height: 25rpx;
  703. }
  704. }
  705. }
  706. .infor-top-noVerify {
  707. margin-left: 30rpx;
  708. font-size: 24rpx;
  709. color: #FFFFFF;
  710. }
  711. }
  712. .infor-bottom {
  713. font-size: 24rpx;
  714. color: #FFFFFF;
  715. }
  716. }
  717. }
  718. }
  719. }
  720. .topMenu {
  721. margin: 20rpx 20rpx;
  722. padding: 30rpx 0;
  723. background: #FFFFFF;
  724. box-shadow: 0rpx 4rpx 8rpx 2rpx rgba(0, 0, 0, 0.1);
  725. border-radius: 14rpx;
  726. opacity: 1;
  727. display: flex;
  728. align-items: flex-end;
  729. justify-content: space-between;
  730. .topMenu-item {
  731. flex: 1;
  732. width: 100%;
  733. display: flex;
  734. flex-direction: column;
  735. align-items: center;
  736. .item-image {
  737. width: 60rpx;
  738. height: 60rpx;
  739. margin-bottom: 10rpx;
  740. }
  741. .item-icon {
  742. width: 60rpx;
  743. height: 60rpx;
  744. margin-bottom: 10rpx;
  745. }
  746. .item-title {
  747. color: #747474;
  748. font-size: 30rpx;
  749. }
  750. .item-titleSmall {
  751. margin-top: 5rpx;
  752. color: #747474;
  753. font-size: 24rpx;
  754. }
  755. }
  756. }
  757. .topApply {
  758. margin: 30rpx 20rpx;
  759. padding: 10rpx 30rpx;
  760. // height: 141rpx;
  761. background: linear-gradient(270deg, #484353 0%, #6F6F6F 100%);
  762. border-radius: 15rpx;
  763. display: flex;
  764. align-items: center;
  765. // justify-content: space-between;
  766. .topApply-left {
  767. width: 62rpx;
  768. height: 62rpx;
  769. border-radius: 50%;
  770. box-shadow: 0rpx 4rpx 8rpx 2rpx rgba(0, 0, 0, 0.3);
  771. opacity: 1;
  772. .left-icon {
  773. width: 62rpx;
  774. height: 62rpx;
  775. border-radius: 50%;
  776. }
  777. }
  778. .topApply-center {
  779. flex: 1;
  780. margin-left: 20rpx;
  781. height: 50rpx;
  782. padding: 0 20rpx;
  783. border-left: 2rpx solid rgba(255, 232, 171, 0.16);
  784. font-size: 26rpx;
  785. line-height: 50rpx;
  786. color: #E0E0E0;
  787. }
  788. .topApply-right {
  789. width: 164rpx;
  790. height: 54rpx;
  791. line-height: 54rpx;
  792. text-align: center;
  793. background: linear-gradient(180deg, #FAE7B5 0%, #F3CA7E 100%);
  794. border-radius: 27rpx;
  795. opacity: 1;
  796. font-size: 22rpx;
  797. color: #3F3852;
  798. }
  799. }
  800. .teacher {
  801. margin: 30rpx 20rpx;
  802. padding: 10rpx 30rpx;
  803. // height: 141rpx;
  804. background: linear-gradient(270deg, #484353 0%, #6F6F6F 100%);
  805. border-radius: 15rpx;
  806. display: flex;
  807. align-items: center;
  808. // justify-content: space-between;
  809. .teacher-left {
  810. width: 62rpx;
  811. height: 62rpx;
  812. border-radius: 50%;
  813. box-shadow: 0rpx 4rpx 8rpx 2rpx rgba(0, 0, 0, 0.3);
  814. opacity: 1;
  815. .left-icon {
  816. width: 62rpx;
  817. height: 62rpx;
  818. border-radius: 50%;
  819. }
  820. }
  821. .teacher-center {
  822. margin-left: 20rpx;
  823. height: 50rpx;
  824. padding: 0 20rpx;
  825. border-left: 2rpx solid rgba(255, 232, 171, 0.16);
  826. font-size: 26rpx;
  827. line-height: 50rpx;
  828. color: #E0E0E0;
  829. }
  830. }
  831. </style>