my.vue 25 KB

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