my.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910
  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">经纪人中心</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="../../static/images/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. uni.setStorageSync('residentinfo', data.resident);
  431. uni.setStorageSync('brokerinfo', data.brokerall ? data.brokerall[0] : null);
  432. }).catch((err) => {
  433. uni.showModal({
  434. title: '信息提示',
  435. content: err,
  436. showCancel: false
  437. });
  438. _this.userinfo = false;
  439. uni.removeStorageSync('userinfo');
  440. });
  441. //获取提示数字
  442. _this.$req.ajax({
  443. path: "my/gettipnum",
  444. data: {
  445. userid: _this.userinfo.id
  446. }
  447. }).then((data) => {
  448. _this.tip_num = data;
  449. })
  450. }
  451. },
  452. methods: {
  453. goUrl: function(type, tilurl) {
  454. if (type == 1) {
  455. uni.navigateTo({
  456. url: tilurl,
  457. fail: function() {
  458. uni.switchTab({
  459. url: tilurl
  460. });
  461. }
  462. });
  463. } else {
  464. uni.navigateTo({
  465. url: '/pages/tool/webview?pagesrc=' + encodeURIComponent(tilurl)
  466. });
  467. }
  468. },
  469. goManage: function(e) {
  470. _this.userinfo = _this.checkLogin("/pages/my/my");
  471. if (_this.userinfo === false) {
  472. return false;
  473. }
  474. var mtype = e.currentTarget.dataset.mtype;
  475. var index = e.currentTarget.dataset.index;
  476. var pageurl = "/pages/index/index";
  477. if (mtype == 'worker') {
  478. // if (_this.workerall[index].status==1){
  479. // uni.showModal({
  480. // title: '信息提示',
  481. // content: "信息审核中,请耐心等待。",
  482. // showCancel: false
  483. // });
  484. // return;
  485. // }
  486. pageurl = "/pages/worker/worker";
  487. uni.setStorageSync('workerinfo', _this.workerall[index]);
  488. } else if (mtype == 'agent') {
  489. pageurl = "/pages/agent/agent";
  490. uni.setStorageSync('agentinfo', _this.agentall[index]);
  491. } else if (mtype == 'broker') {
  492. pageurl = "/pages/broker/broker";
  493. uni.setStorageSync('brokerinfo', _this.brokerall[index]);
  494. }
  495. uni.navigateTo({
  496. url: pageurl,
  497. fail: function() {
  498. uni.switchTab({
  499. url: pageurl
  500. });
  501. }
  502. });
  503. },
  504. hideModal: function(e) {
  505. _this.modalName = null;
  506. },
  507. goLogin: function(wtype) {
  508. uni.setStorageSync('identityinfo', true);
  509. uni.navigateTo({
  510. url: "/pages/login/worker?wtype=" + wtype
  511. });
  512. },
  513. goLPage: function(pageurl) {
  514. _this.userinfo = _this.checkLogin("/pages/my/my");
  515. if (_this.userinfo === false) {
  516. return false;
  517. }
  518. uni.navigateTo({
  519. url: pageurl,
  520. fail: function() {
  521. uni.switchTab({
  522. url: pageurl
  523. });
  524. }
  525. });
  526. },
  527. goPage: function(pageurl) {
  528. uni.navigateTo({
  529. url: pageurl,
  530. fail: function() {
  531. uni.switchTab({
  532. url: pageurl
  533. });
  534. }
  535. });
  536. },
  537. goBrokerMyentry: function(pageurl) {
  538. _this.userinfo = uni.getStorageSync('userinfo') || false;
  539. if (!_this.userinfo.brokerid) {
  540. uni.showModal({
  541. title: '暂无权限',
  542. content: '您现在还不是经纪人,请先申请',
  543. success: function(res) {
  544. if (res.confirm) {
  545. uni.navigateTo({
  546. url: "/pages/broker/brokerform"
  547. });
  548. } else if (res.cancel) {
  549. console.log('用户点击取消');
  550. }
  551. }
  552. });
  553. } else {
  554. uni.navigateTo({
  555. url: pageurl,
  556. fail: function() {
  557. uni.switchTab({
  558. url: pageurl
  559. });
  560. }
  561. });
  562. }
  563. },
  564. goNavPage: function(pageurl) {
  565. uni.redirectTo({
  566. url: pageurl
  567. });
  568. },
  569. // 咨询电话
  570. makeTelephone: function(e) {
  571. var telephone = e.currentTarget.dataset.telephone;
  572. uni.makePhoneCall({
  573. phoneNumber: telephone
  574. });
  575. },
  576. loginOut: function() {
  577. uni.clearStorageSync();
  578. uni.showModal({
  579. title: '温馨提示',
  580. content: '退出成功。',
  581. showCancel: false,
  582. success: function(res) {
  583. if (res.confirm) {
  584. uni.reLaunch({
  585. url: "/pages/index/home"
  586. });
  587. }
  588. }
  589. });
  590. },
  591. goWorker: function(e) {
  592. var index = e.currentTarget.dataset.index;
  593. if (_this.workerall[index].status == 1 || _this.workerall[index].status == 4) {
  594. uni.showModal({
  595. title: '信息提示',
  596. content: "信息审核中,请耐心等待。",
  597. showCancel: false
  598. });
  599. return;
  600. }
  601. if (_this.workerall[index].status == 2 || _this.workerall[index].status == 3) {
  602. uni.showModal({
  603. title: '信息提示',
  604. content: "账号存在风险,请联系平台。",
  605. showCancel: false
  606. });
  607. return;
  608. }
  609. uni.setStorageSync('identityinfo', true);
  610. uni.setStorageSync('workerinfo', _this.workerall[index]);
  611. uni.reLaunch({
  612. url: "/pages/worker/worker"
  613. });
  614. },
  615. goHome: function() {
  616. _this.modalName = "workerModal";
  617. // uni.setStorageSync('identityinfo', false);
  618. // uni.setStorageSync('workerinfo', null);
  619. // uni.reLaunch({
  620. // url: "/pages/index/home"
  621. // });
  622. },
  623. }
  624. }
  625. </script>
  626. <style lang="scss">
  627. /* .mytop{ padding: 30rpx 30rpx 50rpx 30rpx; background-repeat: no-repeat; background-size: 100% 100%; background-position: center; position: relative; } */
  628. .topArea {
  629. width: 750rpx;
  630. height: 300rpx;
  631. position: relative;
  632. .topArea-Bg {
  633. position: absolute;
  634. width: 100%;
  635. height: 300rpx;
  636. z-index: -100;
  637. }
  638. .topArea-nav {
  639. padding: 0 20rpx;
  640. display: flex;
  641. justify-content: space-between;
  642. .nav-title {
  643. width: 100%;
  644. font-size: 32rpx;
  645. font-family: PingFang SC, PingFang SC;
  646. font-weight: 500;
  647. color: #FFFFFF;
  648. text-align: center;
  649. }
  650. }
  651. .topArea-main {
  652. width: 100%;
  653. margin-top: 30rpx;
  654. padding: 0 24rpx;
  655. .noLogin {
  656. display: flex;
  657. align-items: center;
  658. .noLogin-icon {
  659. width: 120rpx;
  660. height: 120rpx;
  661. border-radius: 16rpx;
  662. }
  663. .noLogin-title {
  664. margin-left: 20rpx;
  665. font-size: 32rpx;
  666. color: #FFFFFF;
  667. }
  668. }
  669. .haveLogin {
  670. display: flex;
  671. align-items: center;
  672. .login-avatar {
  673. width: 120rpx;
  674. height: 120rpx;
  675. border-radius: 16rpx;
  676. }
  677. .login-infor {
  678. margin-left: 20rpx;
  679. .infor-top {
  680. margin-bottom: 20rpx;
  681. display: flex;
  682. align-items: center;
  683. .infor-top-name {
  684. font-size: 26rpx;
  685. color: #FFFFFF;
  686. }
  687. .infor-top-verify {
  688. margin-left: 30rpx;
  689. font-size: 24rpx;
  690. color: #FFFFFF;
  691. display: flex;
  692. align-items: center;
  693. .verify-icon {
  694. margin-right: 10rpx;
  695. width: 25rpx;
  696. height: 25rpx;
  697. border-radius: 50%;
  698. background-color: #F5DB03;
  699. .verify-icon-image {
  700. width: 25rpx;
  701. height: 25rpx;
  702. }
  703. }
  704. }
  705. .infor-top-noVerify {
  706. margin-left: 30rpx;
  707. font-size: 24rpx;
  708. color: #FFFFFF;
  709. }
  710. }
  711. .infor-bottom {
  712. font-size: 24rpx;
  713. color: #FFFFFF;
  714. }
  715. }
  716. }
  717. }
  718. }
  719. .topMenu {
  720. margin: 20rpx 20rpx;
  721. padding: 30rpx 0;
  722. background: #FFFFFF;
  723. box-shadow: 0rpx 4rpx 8rpx 2rpx rgba(0, 0, 0, 0.1);
  724. border-radius: 14rpx;
  725. opacity: 1;
  726. display: flex;
  727. align-items: flex-end;
  728. justify-content: space-between;
  729. .topMenu-item {
  730. flex: 1;
  731. width: 100%;
  732. display: flex;
  733. flex-direction: column;
  734. align-items: center;
  735. .item-image {
  736. width: 60rpx;
  737. height: 60rpx;
  738. margin-bottom: 10rpx;
  739. }
  740. .item-icon {
  741. width: 60rpx;
  742. height: 60rpx;
  743. margin-bottom: 10rpx;
  744. }
  745. .item-title {
  746. color: #747474;
  747. font-size: 30rpx;
  748. }
  749. .item-titleSmall {
  750. margin-top: 5rpx;
  751. color: #747474;
  752. font-size: 24rpx;
  753. }
  754. }
  755. }
  756. .topApply {
  757. margin: 30rpx 20rpx;
  758. padding: 10rpx 30rpx;
  759. // height: 141rpx;
  760. background: linear-gradient(270deg, #484353 0%, #6F6F6F 100%);
  761. border-radius: 15rpx;
  762. display: flex;
  763. align-items: center;
  764. // justify-content: space-between;
  765. .topApply-left {
  766. width: 62rpx;
  767. height: 62rpx;
  768. border-radius: 50%;
  769. box-shadow: 0rpx 4rpx 8rpx 2rpx rgba(0, 0, 0, 0.3);
  770. opacity: 1;
  771. .left-icon {
  772. width: 62rpx;
  773. height: 62rpx;
  774. border-radius: 50%;
  775. }
  776. }
  777. .topApply-center {
  778. flex: 1;
  779. margin-left: 20rpx;
  780. height: 50rpx;
  781. padding: 0 20rpx;
  782. border-left: 2rpx solid rgba(255, 232, 171, 0.16);
  783. font-size: 26rpx;
  784. line-height: 50rpx;
  785. color: #E0E0E0;
  786. }
  787. .topApply-right {
  788. width: 164rpx;
  789. height: 54rpx;
  790. line-height: 54rpx;
  791. text-align: center;
  792. background: linear-gradient(180deg, #FAE7B5 0%, #F3CA7E 100%);
  793. border-radius: 27rpx;
  794. opacity: 1;
  795. font-size: 22rpx;
  796. color: #3F3852;
  797. }
  798. }
  799. .teacher {
  800. margin: 30rpx 20rpx;
  801. padding: 10rpx 30rpx;
  802. // height: 141rpx;
  803. background: linear-gradient(270deg, #484353 0%, #6F6F6F 100%);
  804. border-radius: 15rpx;
  805. display: flex;
  806. align-items: center;
  807. // justify-content: space-between;
  808. .teacher-left {
  809. width: 62rpx;
  810. height: 62rpx;
  811. border-radius: 50%;
  812. box-shadow: 0rpx 4rpx 8rpx 2rpx rgba(0, 0, 0, 0.3);
  813. opacity: 1;
  814. .left-icon {
  815. width: 62rpx;
  816. height: 62rpx;
  817. border-radius: 50%;
  818. }
  819. }
  820. .teacher-center {
  821. margin-left: 20rpx;
  822. height: 50rpx;
  823. padding: 0 20rpx;
  824. border-left: 2rpx solid rgba(255, 232, 171, 0.16);
  825. font-size: 26rpx;
  826. line-height: 50rpx;
  827. color: #E0E0E0;
  828. }
  829. }
  830. </style>