my.vue 27 KB

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