my.vue 27 KB

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