my.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915
  1. <template name="mypage">
  2. <view class="mypage">
  3. <u-sticky>
  4. <view class="topArea">
  5. <image class="topArea-Bg" :src="$getImageUrl('static/images/applet/my/myTopBg.png')"></image>
  6. <view class="topArea-top" :style="{height:navBarTop + 'px'}"></view>
  7. <view class="topArea-nav" :style="{height:navBarHeight + 'px',lineHeight:navBarHeight + 'px'}">
  8. <view class="nav-title">个人中心</view>
  9. </view>
  10. <view class="topArea-main">
  11. <view class="noLogin" @click="goLPage('/pages/my/myinfo')" v-if="userinfo==false">
  12. <image class="noLogin-icon" :src="$getImageUrl('static/images/applet/dfhead.jpg')"></image>
  13. <view class="noLogin-title">未登录</view>
  14. </view>
  15. <view class="haveLogin" v-else>
  16. <image class="login-avatar" :src="userinfo.avatar"></image>
  17. <view class="login-infor">
  18. <view class="infor-top">
  19. <text class="infor-top-name">{{userinfo.nickname}}</text>
  20. <view class="infor-top-verify" v-if="brokerall != null">
  21. <view class="verify-icon">
  22. <image class="verify-icon-image"
  23. :src="$getImageUrl('static/images/applet/my/verify.png')">
  24. </image>
  25. </view>
  26. <view class="verify-text">经纪人</view>
  27. </view>
  28. <text class="infor-top-noVerify" v-if="userinfo.authstatus == 1">(未实名)</text>
  29. </view>
  30. <view class="infor-bottom">{{userinfo.mobile}}</view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </u-sticky>
  36. <view class="topMenu">
  37. <view class="topMenu-item" @click="goLPage('/pages/my/myinfo')">
  38. <image class="item-image" :src="$getImageUrl('static/images/applet/my/infor.png')" mode="widthFix">
  39. </image>
  40. <view class="item-title">基本信息</view>
  41. </view>
  42. <view class="topMenu-item" @click="goLPage('/pages/my/mycode')">
  43. <image class="item-image" :src="$getImageUrl('static/images/applet/my/code.png')" mode="widthFix">
  44. </image>
  45. <view class="item-title">我的推广码</view>
  46. </view>
  47. <view class="topMenu-item" @click="goLPage('/pages/my/myteam')">
  48. <image class="item-image" :src="$getImageUrl('static/images/applet/my/invite.png')" mode="widthFix">
  49. </image>
  50. <view class="item-title">我的邀请</view>
  51. </view>
  52. </view>
  53. <view class="topApply">
  54. <view class="topApply-left">
  55. <image class="left-icon" :src="$getImageUrl('static/images/applet/index/topApplyIcon.png')"></image>
  56. </view>
  57. <view class="topApply-center" v-if="brokerall == null">经纪人福利多多</view>
  58. <view class="topApply-center" v-if="brokerall != null">{{brokerall[0].type == 1 ? '经纪人中心' : '红色合伙人'}}</view>
  59. <view class="topApply-right" v-if="brokerall == null" @tap="goLPage('/pages/broker/brokerform')">立即开通</view>
  60. <view class="topApply-right" v-if="brokerall != null" @tap="goLPage('/pages/broker/center')">进入工作台</view>
  61. </view>
  62. <view class="teacher" @click="goLPage('/pages/resident/resident')" v-if="resident != null">
  63. <view class="teacher-left">
  64. <image class="left-icon" :src="$getImageUrl('static/images/applet/index/topApplyIcon.png')"></image>
  65. </view>
  66. <view class="teacher-center">驻场老师</view>
  67. </view>
  68. <view class="topMenu">
  69. <view class="topMenu-item" @click="goLPage('/pages/my/mybag')">
  70. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/wallet.png')"></image>
  71. <view class="item-titleSmall">我的钱包</view>
  72. </view>
  73. <view class="topMenu-item" @click="goLPage('/pages/my/myauth')">
  74. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/verifyName.png')"></image>
  75. <view class="item-titleSmall">实名认证</view>
  76. </view>
  77. <view class="topMenu-item" @click="goLPage('/pages/comjobs/star')">
  78. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/collect.png')"></image>
  79. <view class="item-titleSmall">我的收藏</view>
  80. </view>
  81. <view class="topMenu-item" @click="goLPage('/pages/my/task')">
  82. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/task.png')"></image>
  83. <view class="item-titleSmall">任务中心</view>
  84. </view>
  85. </view>
  86. <view class="topMenu">
  87. <view class="topMenu-item" @click="goPage('/pages/comjobs/log')">
  88. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/apply.png')"></image>
  89. <view class="item-titleSmall">我的报名</view>
  90. </view>
  91. <view class="topMenu-item" @click="goLPage('/pages/resume/log')">
  92. <image class="item-icon" :src="$getImageUrl('static/images/applet/my/invitation.png')"></image>
  93. <view class="item-titleSmall">收到的邀请</view>
  94. </view>
  95. <view class="topMenu-item" @click="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="padding-sm"></view>
  339. <view class="padding-xl"></view>
  340. <view class="cu-bar tabbar bg-white foot">
  341. <view class="action text-gray" @tap="goNavPage('/pages/index/index')">
  342. <view class="cuIcon-cu-image">
  343. <image src="../../static/tabbar/index.png"></image>
  344. </view>
  345. 首页
  346. </view>
  347. <view class="action text-gray" @tap="goNavPage('/pages/comjobs/comjobs')">
  348. <view class="cuIcon-cu-image">
  349. <image src="../../static/tabbar/jobs.png"></image>
  350. </view>
  351. 招聘
  352. </view>
  353. <!-- #ifndef MP-WEIXIN -->
  354. <view class="action text-gray videoimg" @tap="goNavPage('/pages/video/videolist')">
  355. <view class="cuIcon-cu-image">
  356. <image src="../../static/tabbar/video.png"></image>
  357. </view>
  358. 微工作
  359. </view>
  360. <!-- #endif -->
  361. <view class="action text-gray" @tap="goNavPage('/pages/broker/brokerlist')">
  362. <view class="cuIcon-cu-image">
  363. <image src="../../static/tabbar/broker.png"></image>
  364. </view>
  365. 经纪人
  366. </view>
  367. <view class="action text-red" @tap="goNavPage('/pages/my/my')">
  368. <view class="cuIcon-cu-image">
  369. <image src="../../static/tabbar/mySelected.png"></image>
  370. </view>
  371. 我的
  372. </view>
  373. </view>
  374. <!-- <button class="cu-btn bg-blue lg shadow echo-gohome" @tap="goHome"> 切换身份 </button> -->
  375. <wxContact></wxContact>
  376. </view>
  377. </template>
  378. <script>
  379. var _this;
  380. export default {
  381. data() {
  382. return {
  383. appplatform: "",
  384. param: {},
  385. userinfo: false,
  386. workerall: null,
  387. agentall: null,
  388. brokerall: null,
  389. modalName: null,
  390. resident: null,
  391. tip_num: {
  392. comjobs_num: 0,
  393. invite_num: 0,
  394. },
  395. navBarTop: 0,
  396. navBarHeight: 0,
  397. }
  398. },
  399. onLoad: function() {
  400. _this = this;
  401. //#ifdef APP-PLUS
  402. _this.appplatform = uni.getSystemInfoSync().platform;
  403. //#endif
  404. let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
  405. _this.navBarTop = menuButtonInfo.top;
  406. _this.navBarHeight = menuButtonInfo.height;
  407. },
  408. onShareAppMessage: function(res) {
  409. return {
  410. title: "个人中心",
  411. path: "/pages/my/my"
  412. }
  413. },
  414. onShow: function() {
  415. _this = this;
  416. _this.userinfo = uni.getStorageSync('userinfo') || false;
  417. _this.workerall = null;
  418. _this.agentall = null;
  419. _this.brokerall = null;
  420. if (_this.userinfo !== false) {
  421. _this.$req.ajax({
  422. path: "my/getuser",
  423. data: {
  424. userid: _this.userinfo.id
  425. }
  426. }).then((data) => {
  427. _this.param = data.param;
  428. _this.userinfo = data.user;
  429. uni.setStorageSync('userinfo', data.user);
  430. _this.workerall = data.workerall;
  431. _this.agentall = data.agentall;
  432. _this.brokerall = data.brokerall;
  433. _this.resident = data.resident;
  434. console.log("经纪人",_this.brokerall)
  435. uni.setStorageSync('residentinfo', data.resident);
  436. uni.setStorageSync('brokerinfo', data.brokerall ? data.brokerall[0] : null);
  437. }).catch((err) => {
  438. uni.showModal({
  439. title: '信息提示',
  440. content: err,
  441. showCancel: false
  442. });
  443. _this.userinfo = false;
  444. uni.removeStorageSync('userinfo');
  445. });
  446. //获取提示数字
  447. _this.$req.ajax({
  448. path: "my/gettipnum",
  449. data: {
  450. userid: _this.userinfo.id
  451. }
  452. }).then((data) => {
  453. _this.tip_num = data;
  454. })
  455. }
  456. },
  457. methods: {
  458. goUrl: function(type, tilurl) {
  459. if (type == 1) {
  460. uni.navigateTo({
  461. url: tilurl,
  462. fail: function() {
  463. uni.switchTab({
  464. url: tilurl
  465. });
  466. }
  467. });
  468. } else {
  469. uni.navigateTo({
  470. url: '/pages/tool/webview?pagesrc=' + encodeURIComponent(tilurl)
  471. });
  472. }
  473. },
  474. goManage: function(e) {
  475. _this.userinfo = _this.checkLogin("/pages/my/my");
  476. if (_this.userinfo === false) {
  477. return false;
  478. }
  479. var mtype = e.currentTarget.dataset.mtype;
  480. var index = e.currentTarget.dataset.index;
  481. var pageurl = "/pages/index/index";
  482. if (mtype == 'worker') {
  483. // if (_this.workerall[index].status==1){
  484. // uni.showModal({
  485. // title: '信息提示',
  486. // content: "信息审核中,请耐心等待。",
  487. // showCancel: false
  488. // });
  489. // return;
  490. // }
  491. pageurl = "/pages/worker/worker";
  492. uni.setStorageSync('workerinfo', _this.workerall[index]);
  493. } else if (mtype == 'agent') {
  494. pageurl = "/pages/agent/agent";
  495. uni.setStorageSync('agentinfo', _this.agentall[index]);
  496. } else if (mtype == 'broker') {
  497. pageurl = "/pages/broker/broker";
  498. uni.setStorageSync('brokerinfo', _this.brokerall[index]);
  499. }
  500. uni.navigateTo({
  501. url: pageurl,
  502. fail: function() {
  503. uni.switchTab({
  504. url: pageurl
  505. });
  506. }
  507. });
  508. },
  509. hideModal: function(e) {
  510. _this.modalName = null;
  511. },
  512. goLogin: function(wtype) {
  513. uni.setStorageSync('identityinfo', true);
  514. uni.navigateTo({
  515. url: "/pages/login/worker?wtype=" + wtype
  516. });
  517. },
  518. goLPage: function(pageurl) {
  519. _this.userinfo = _this.checkLogin("/pages/my/my");
  520. if (_this.userinfo === false) {
  521. return false;
  522. }
  523. uni.navigateTo({
  524. url: pageurl,
  525. fail: function() {
  526. uni.switchTab({
  527. url: pageurl
  528. });
  529. }
  530. });
  531. },
  532. goPage: function(pageurl) {
  533. uni.navigateTo({
  534. url: pageurl,
  535. fail: function() {
  536. uni.switchTab({
  537. url: pageurl
  538. });
  539. }
  540. });
  541. },
  542. goBrokerMyentry: function(pageurl) {
  543. _this.userinfo = uni.getStorageSync('userinfo') || false;
  544. if (!_this.userinfo.brokerid) {
  545. uni.showModal({
  546. title: '暂无权限',
  547. content: '您现在还不是经纪人,请先申请',
  548. success: function(res) {
  549. if (res.confirm) {
  550. uni.navigateTo({
  551. url: "/pages/broker/brokerform"
  552. });
  553. } else if (res.cancel) {
  554. console.log('用户点击取消');
  555. }
  556. }
  557. });
  558. } else {
  559. uni.navigateTo({
  560. url: pageurl,
  561. fail: function() {
  562. uni.switchTab({
  563. url: pageurl
  564. });
  565. }
  566. });
  567. }
  568. },
  569. goNavPage: function(pageurl) {
  570. uni.redirectTo({
  571. url: pageurl
  572. });
  573. },
  574. // 咨询电话
  575. makeTelephone: function(e) {
  576. var telephone = e.currentTarget.dataset.telephone;
  577. uni.makePhoneCall({
  578. phoneNumber: telephone
  579. });
  580. },
  581. loginOut: function() {
  582. uni.clearStorageSync();
  583. uni.showModal({
  584. title: '温馨提示',
  585. content: '退出成功。',
  586. showCancel: false,
  587. success: function(res) {
  588. if (res.confirm) {
  589. uni.reLaunch({
  590. url: "/pages/index/home"
  591. });
  592. }
  593. }
  594. });
  595. },
  596. goWorker: function(e) {
  597. var index = e.currentTarget.dataset.index;
  598. if (_this.workerall[index].status == 1 || _this.workerall[index].status == 4) {
  599. uni.showModal({
  600. title: '信息提示',
  601. content: "信息审核中,请耐心等待。",
  602. showCancel: false
  603. });
  604. return;
  605. }
  606. if (_this.workerall[index].status == 2 || _this.workerall[index].status == 3) {
  607. uni.showModal({
  608. title: '信息提示',
  609. content: "账号存在风险,请联系平台。",
  610. showCancel: false
  611. });
  612. return;
  613. }
  614. uni.setStorageSync('identityinfo', true);
  615. uni.setStorageSync('workerinfo', _this.workerall[index]);
  616. uni.reLaunch({
  617. url: "/pages/worker/worker"
  618. });
  619. },
  620. goHome: function() {
  621. _this.modalName = "workerModal";
  622. // uni.setStorageSync('identityinfo', false);
  623. // uni.setStorageSync('workerinfo', null);
  624. // uni.reLaunch({
  625. // url: "/pages/index/home"
  626. // });
  627. },
  628. }
  629. }
  630. </script>
  631. <style lang="scss">
  632. /* .mytop{ padding: 30rpx 30rpx 50rpx 30rpx; background-repeat: no-repeat; background-size: 100% 100%; background-position: center; position: relative; } */
  633. .topArea {
  634. width: 750rpx;
  635. height: 300rpx;
  636. position: relative;
  637. .topArea-Bg {
  638. position: absolute;
  639. width: 100%;
  640. height: 300rpx;
  641. z-index: -100;
  642. }
  643. .topArea-nav {
  644. padding: 0 20rpx;
  645. display: flex;
  646. justify-content: space-between;
  647. .nav-title {
  648. width: 100%;
  649. font-size: 32rpx;
  650. font-family: PingFang SC, PingFang SC;
  651. font-weight: 500;
  652. color: #FFFFFF;
  653. text-align: center;
  654. }
  655. }
  656. .topArea-main {
  657. width: 100%;
  658. margin-top: 30rpx;
  659. padding: 0 24rpx;
  660. .noLogin {
  661. display: flex;
  662. align-items: center;
  663. .noLogin-icon {
  664. width: 120rpx;
  665. height: 120rpx;
  666. border-radius: 16rpx;
  667. }
  668. .noLogin-title {
  669. margin-left: 20rpx;
  670. font-size: 32rpx;
  671. color: #FFFFFF;
  672. }
  673. }
  674. .haveLogin {
  675. display: flex;
  676. align-items: center;
  677. .login-avatar {
  678. width: 120rpx;
  679. height: 120rpx;
  680. border-radius: 16rpx;
  681. }
  682. .login-infor {
  683. margin-left: 20rpx;
  684. .infor-top {
  685. margin-bottom: 20rpx;
  686. display: flex;
  687. align-items: center;
  688. .infor-top-name {
  689. font-size: 26rpx;
  690. color: #FFFFFF;
  691. }
  692. .infor-top-verify {
  693. margin-left: 30rpx;
  694. font-size: 24rpx;
  695. color: #FFFFFF;
  696. display: flex;
  697. align-items: center;
  698. .verify-icon {
  699. margin-right: 10rpx;
  700. width: 25rpx;
  701. height: 25rpx;
  702. border-radius: 50%;
  703. background-color: #F5DB03;
  704. .verify-icon-image {
  705. width: 25rpx;
  706. height: 25rpx;
  707. }
  708. }
  709. }
  710. .infor-top-noVerify {
  711. margin-left: 30rpx;
  712. font-size: 24rpx;
  713. color: #FFFFFF;
  714. }
  715. }
  716. .infor-bottom {
  717. font-size: 24rpx;
  718. color: #FFFFFF;
  719. }
  720. }
  721. }
  722. }
  723. }
  724. .topMenu {
  725. margin: 20rpx 20rpx;
  726. padding: 30rpx 0;
  727. background: #FFFFFF;
  728. box-shadow: 0rpx 4rpx 8rpx 2rpx rgba(0, 0, 0, 0.1);
  729. border-radius: 14rpx;
  730. opacity: 1;
  731. display: flex;
  732. align-items: flex-end;
  733. justify-content: space-between;
  734. .topMenu-item {
  735. flex: 1;
  736. width: 100%;
  737. display: flex;
  738. flex-direction: column;
  739. align-items: center;
  740. .item-image {
  741. width: 60rpx;
  742. height: 60rpx;
  743. margin-bottom: 10rpx;
  744. }
  745. .item-icon {
  746. width: 60rpx;
  747. height: 60rpx;
  748. margin-bottom: 10rpx;
  749. }
  750. .item-title {
  751. color: #747474;
  752. font-size: 30rpx;
  753. }
  754. .item-titleSmall {
  755. margin-top: 5rpx;
  756. color: #747474;
  757. font-size: 24rpx;
  758. }
  759. }
  760. }
  761. .topApply {
  762. margin: 30rpx 20rpx;
  763. padding: 10rpx 30rpx;
  764. // height: 141rpx;
  765. background: linear-gradient(270deg, #484353 0%, #6F6F6F 100%);
  766. border-radius: 15rpx;
  767. display: flex;
  768. align-items: center;
  769. // justify-content: space-between;
  770. .topApply-left {
  771. width: 62rpx;
  772. height: 62rpx;
  773. border-radius: 50%;
  774. box-shadow: 0rpx 4rpx 8rpx 2rpx rgba(0, 0, 0, 0.3);
  775. opacity: 1;
  776. .left-icon {
  777. width: 62rpx;
  778. height: 62rpx;
  779. border-radius: 50%;
  780. }
  781. }
  782. .topApply-center {
  783. flex: 1;
  784. margin-left: 20rpx;
  785. height: 50rpx;
  786. padding: 0 20rpx;
  787. border-left: 2rpx solid rgba(255, 232, 171, 0.16);
  788. font-size: 26rpx;
  789. line-height: 50rpx;
  790. color: #E0E0E0;
  791. }
  792. .topApply-right {
  793. width: 164rpx;
  794. height: 54rpx;
  795. line-height: 54rpx;
  796. text-align: center;
  797. background: linear-gradient(180deg, #FAE7B5 0%, #F3CA7E 100%);
  798. border-radius: 27rpx;
  799. opacity: 1;
  800. font-size: 22rpx;
  801. color: #3F3852;
  802. }
  803. }
  804. .teacher {
  805. margin: 30rpx 20rpx;
  806. padding: 10rpx 30rpx;
  807. // height: 141rpx;
  808. background: linear-gradient(270deg, #484353 0%, #6F6F6F 100%);
  809. border-radius: 15rpx;
  810. display: flex;
  811. align-items: center;
  812. // justify-content: space-between;
  813. .teacher-left {
  814. width: 62rpx;
  815. height: 62rpx;
  816. border-radius: 50%;
  817. box-shadow: 0rpx 4rpx 8rpx 2rpx rgba(0, 0, 0, 0.3);
  818. opacity: 1;
  819. .left-icon {
  820. width: 62rpx;
  821. height: 62rpx;
  822. border-radius: 50%;
  823. }
  824. }
  825. .teacher-center {
  826. margin-left: 20rpx;
  827. height: 50rpx;
  828. padding: 0 20rpx;
  829. border-left: 2rpx solid rgba(255, 232, 171, 0.16);
  830. font-size: 26rpx;
  831. line-height: 50rpx;
  832. color: #E0E0E0;
  833. }
  834. }
  835. </style>