my.vue 29 KB

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