model_1.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696
  1. <template>
  2. <view class="mone">
  3. <view class="m-top">
  4. <view class="top-user flex">
  5. <image :src="cardInfo.avatar" mode="" class="user-logo"></image>
  6. </view>
  7. <view class="user-name">
  8. {{cardInfo.name || '暂无'}}
  9. </view>
  10. <view class="u-zy" v-if="cardInfo.user_work_type_title">
  11. {{cardInfo.user_work_type_title || '暂无'}}
  12. </view>
  13. <button type="default" class="top-btn fx-btn" v-if="isShare" open-type="share">
  14. <image :src="baseURL + '/resource/icon/model1/fx.png'" mode=""></image>
  15. </button>
  16. <view class="top-btn visit mvisit padding-r-10" v-if="isLook==1||isLook==2">
  17. 浏览:{{shareNumber}}
  18. </view>
  19. </view>
  20. <view class="m-body gr">
  21. <!-- 个人信息 -->
  22. <view class="hua2">
  23. <view class="m-card">
  24. <image :src="baseURL + '/resource/icon/model1/card-bg.png'" mode="" class="card-bg"></image>
  25. <view class="card-tit flex">
  26. <image :src="baseURL + '/resource/icon/model1/m1.png'" mode="" class="tit-logo"></image>个人信息
  27. </view>
  28. <view class="card-content">
  29. <view class="user-info flex">
  30. <view class="info-item-b">
  31. 年<text class="qianger"></text>龄: {{cardInfo.age|| '暂无'}}
  32. </view>
  33. <view class="info-item-b">
  34. 属<text class="qianger"></text>相: {{cardInfo.twelve|| '暂无'}}
  35. </view>
  36. <view class="info-item-b">
  37. 从<text class="qianger"></text>业: {{(cardInfo.work_year + '年')|| '暂无'}}
  38. </view>
  39. <view class="info-item-b">
  40. 星<text class="qianger"></text>座: {{cardInfo.constellation || '暂无'}}
  41. </view>
  42. <!-- <view class="info-item-b">
  43. 职<text class="qianger"></text>业: {{cardInfo.user_work_type_title || '暂无'}}
  44. </view> -->
  45. <view class="info-item-b">
  46. 籍<text class="qianger"></text>贯: {{cardInfo.ancestral_place || '暂无'}}
  47. </view>
  48. <view class="info-item-b">
  49. 民<text class="qianger"></text>族: {{cardInfo.minority || '暂无'}}
  50. </view>
  51. <view class="info-item-b">
  52. 学<text class="qianger"></text>历: {{cardInfo.education || '暂无'}}
  53. </view>
  54. <!-- <view class="info-item-b">
  55. 学<text class="qianger"></text>历: {{cardInfo.education || '暂无'}}
  56. </view> -->
  57. <!-- <view class="info-item-b">
  58. 综 <text class="laner"></text> 合<text class="laner"></text>分: 50
  59. </view> -->
  60. <view class="info-item-q flex" style="align-items: flex-start;">
  61. <text style="flex-shrink: 0;">服务地区:</text>
  62. <view class="fwdz flex">
  63. <view v-for="(fwitem,fwindex) in cardInfo.service_area_all">
  64. {{fwitem}}{{fwindex ==(cardInfo.service_area_all.length -1) ?'': '、' }}
  65. </view>
  66. </view>
  67. </view>
  68. <view class="info-item-q flex" style="align-items: flex-start;">
  69. <text style="flex-shrink: 0;">服务价格: </text>
  70. <view class="gzt">
  71. <image :src="baseURL + '/resource/icon/model1/tiao.png'" mode=""></image>
  72. <view class="gzt-price">
  73. <text>{{cardInfo.service_min_price}}</text>元/{{ cardInfo.service_time_type_title && cardInfo.service_time_type_title.replace('每','')}}
  74. </view>
  75. <view class=" gzt-price-b">
  76. <text>{{cardInfo.service_max_price}}</text>元/{{cardInfo.service_time_type_title && cardInfo.service_time_type_title.replace('每','')}}
  77. </view>
  78. </view>
  79. <image :src="baseURL + '/resource/icon/model1/yrz.png'" mode="" class="rz"
  80. v-if="cardInfo.is_type_audit == 1"></image>
  81. </view>
  82. </view>
  83. </view>
  84. <view class="" style="height: 80rpx;"></view>
  85. </view>
  86. </view>
  87. <!-- 自我评价 -->
  88. <view class="hua4">
  89. <view class="hua3">
  90. <view class="m-card">
  91. <image :src="baseURL + '/resource/icon/model1/card-bg.png'" mode="" class="card-bg"></image>
  92. <view class="card-tit flex">
  93. <image :src="baseURL + '/resource/icon/model1/m2.png'" mode="" class="tit-logo"></image>自我展示
  94. </view>
  95. <view class="card-content">
  96. {{cardInfo.service_intro_content}}
  97. </view>
  98. <view class="img-list flex" style="padding-top: 0;">
  99. <image :src="siiitem" mode="" v-for="siiitem in cardInfo.service_intro_imgs"></image>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. <!-- 我的证书 -->
  105. <view class="hua5" v-if="cardInfo.service_audit_imgs && cardInfo.service_audit_imgs.length > 0">
  106. <view class="m-card">
  107. <image :src="baseURL + '/resource/icon/model1/card-bg.png'" mode="" class="card-bg"></image>
  108. <view class="card-tit flex">
  109. <image :src="baseURL + '/resource/icon/model1/m3.png'" mode="" class="tit-logo"></image>我的证书
  110. </view>
  111. <view class="img-list flex">
  112. <image :src="saiitem" mode="" v-for="saiitem in cardInfo.service_audit_imgs"></image>
  113. </view>
  114. </view>
  115. </view>
  116. <!-- 服务内容 -->
  117. <view class="hua6">
  118. <view class="m-card">
  119. <image :src="baseURL + '/resource/icon/model1/card-bg.png'" mode="" class="card-bg"></image>
  120. <view class="card-tit flex">
  121. <image :src="baseURL + '/resource/icon/model1/m4.png'" mode="" class="tit-logo"></image>服务内容
  122. </view>
  123. <view class="card-content">
  124. <view class="fw" v-for="spaitem in cardInfo.service_project_ar">
  125. <view class="fw-tit">
  126. <text class="yg"></text>{{spaitem.title}}
  127. </view>
  128. <view class="fw-content">
  129. {{spaitem.content}}
  130. </view>
  131. </view>
  132. </view>
  133. </view>
  134. </view>
  135. <!-- 服务照片 -->
  136. <view class="m-card" v-if="cardInfo.service_imgs && cardInfo.service_imgs.length > 0">
  137. <image :src="baseURL + '/resource/icon/model1/card-bg.png'" mode="" class="card-bg"></image>
  138. <view class="card-tit flex">
  139. <image :src="baseURL + '/resource/icon/model1/m5.png'" mode="" class="tit-logo"></image>服务照片
  140. </view>
  141. <view class="img-list flex">
  142. <image :src="siitem" mode="" v-for="siitem in cardInfo.service_imgs"></image>
  143. </view>
  144. </view>
  145. <!-- 底部图片 -->
  146. <image :src="baseURL + '/resource/icon/model1/m-btm.png'" mode="" class="m-btm"></image>
  147. </view>
  148. </view>
  149. </template>
  150. <script>
  151. import {
  152. mapState,
  153. mapMutations
  154. } from 'vuex';
  155. import {
  156. getUserCardInfo,
  157. getCommonUserCardInfo,
  158. getShowTemplateItem,
  159. subShowTemplateOrder
  160. } from '@/api/model.js'
  161. import {
  162. getUser
  163. } from '@/api/user.js';
  164. export default {
  165. props: {
  166. // 浏览数量
  167. shareNumber: {
  168. type: Number,
  169. default:0
  170. },
  171. // 是否显示默认数据
  172. isDefault: {
  173. type: Boolean,
  174. default: true
  175. },
  176. isShare: {
  177. type: Boolean,
  178. default: false
  179. },
  180. //1为模板2为用户
  181. isLook: {
  182. type: Number,
  183. default: 0
  184. },
  185. templateDetail: {
  186. type: Object,
  187. default: () => {
  188. return {}
  189. }
  190. },
  191. },
  192. data() {
  193. return {
  194. default: {
  195. user_work_type_title:'母婴护理师',
  196. name: '佚名',
  197. avatar: 'https://api.myjie.cn/resource/icon/base/f.png',
  198. age: '41',
  199. twelve: '鼠',
  200. work_year: '10',
  201. constellation: '处女座',
  202. ancestral_place: '浙江',
  203. minority: '汉族',
  204. education: '本科',
  205. service_area_all: ['浙江省台州市路桥区'],
  206. service_min_price: 100,
  207. service_max_price: 200,
  208. service_time_type_title: '每小时',
  209. service_intro_content: '高级育婴师证|高级催乳师证|早产儿护理师母婴护理证|金牌月嫂证|产后恢复师证|公共营养师证|月子药膳调理师证|国际宝宝睡眠咨询师证|普通话二级甲等|中央广播电视大学学历|学前教育专业,深耕幼教十年,技能全面,性格活泼,有亲和力,做事干净利落,有很强的责任心。对宝宝有爱心,体贴新手妈妈。专业技能熟练。应急能力强。让家人放心、产妇舒心的坐好月子。',
  210. service_intro_imgs: ['https://api.myjie.cn/resource/icon/base/pj1.png',
  211. 'https://api.myjie.cn/resource/icon/base/pj2.png',
  212. 'https://api.myjie.cn/resource/icon/base/pj3.png',
  213. 'https://api.myjie.cn/resource/icon/base/pj4.png'
  214. ],
  215. service_audit_imgs: ['https://api.myjie.cn/resource/icon/base/zs1.png',
  216. 'https://api.myjie.cn/resource/icon/base/zs2.png',
  217. 'https://api.myjie.cn/resource/icon/base/zs3.png',
  218. 'https://api.myjie.cn/resource/icon/base/zs4.png'
  219. ],
  220. service_project_ar: [{
  221. title: '婴幼儿睡眠管理',
  222. content: '如:日夜颠倒、睡眠不规律、乳头混淆、奶睡、抱睡等问题,帮助宝爸宝妈规律孩子作息、解决婴幼儿喂养困扰,培养良好的生活、学习习惯。'
  223. }, {
  224. title: '特色月子餐',
  225. content: '套用客户的一句话“养眼、养心更养胃”!家常菜、面食、点心、甜品、靓汤、五谷杂粮粥、婴幼儿花样辅食等。'
  226. },
  227. {
  228. title: '早产儿特殊护理',
  229. content: '包括早产儿基础护理、安全喂养方法、追赶性生长、消化与免疫系统等技能,根据宝宝具体情况给予早产儿家长的科学入户指导。'
  230. },
  231. {
  232. title: '0-6岁早期教育',
  233. content: '在婴孩最敏感最能接受的时期进行事半功倍的适时教育,针对不同年龄段的孩子,开发婴幼儿潜能的教育,为孩子多元化和健康人格打下良好基础。'
  234. }
  235. ],
  236. is_type_audit: 1
  237. }
  238. }
  239. },
  240. computed: {
  241. ...mapState(['baseURL']),
  242. ...mapState('user', ['userInfo']),
  243. cardInfo() {
  244. console.log("进入");
  245. if (this.isDefault) {
  246. return this.default
  247. } else {
  248. return this.templateDetail
  249. }
  250. }
  251. },
  252. onShow() {
  253. // this.getUser()
  254. },
  255. onUnload() {
  256. let pages = getCurrentPages(); //获取加载的页面
  257. let currentPage = pages[pages.length - 2]; //获取当前页面的对象
  258. if (currentPage.route == 'pages/public/wxLogin') {
  259. uni.switchTab({
  260. url: '/pages/index/index'
  261. })
  262. }
  263. },
  264. methods: {}
  265. }
  266. </script>
  267. <style lang="scss" scoped>
  268. .mone {
  269. background-color: #f8e1df;
  270. padding-bottom: 30rpx;
  271. .m-top {
  272. width: 750rpx;
  273. position: relative;
  274. width: 750rpx;
  275. height: 450rpx;
  276. .readme {
  277. width: 534rpx;
  278. height: 83rpx;
  279. position: absolute;
  280. top: 172rpx;
  281. left: 0;
  282. right: 0;
  283. margin: auto;
  284. }
  285. .u-zy {
  286. // width: 204rpx;
  287. padding: 8rpx 8rpx 8rpx 16rpx;
  288. height: 39rpx;
  289. border: 1px solid #F46C85;
  290. border-radius: 10rpx;
  291. }
  292. .top-user {
  293. width: 222rpx;
  294. height: 222rpx;
  295. background: #FEFEFE;
  296. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
  297. border-radius: 50%;
  298. position: absolute;
  299. left: 0;
  300. right: 0;
  301. top: 80rpx;
  302. justify-content: center;
  303. align-items: center;
  304. margin: auto;
  305. .user-logo {
  306. width: 200rpx;
  307. height: 200rpx;
  308. border-radius: 50%;
  309. background-color: #fff;
  310. }
  311. .gp {
  312. width: 133rpx;
  313. height: 38rpx;
  314. position: absolute;
  315. bottom: 0;
  316. left: 0;
  317. right: 0;
  318. margin: auto;
  319. }
  320. }
  321. .user-name {
  322. width: 750rpx;
  323. font-size: 38rpx;
  324. font-weight: bold;
  325. color: #000000;
  326. text-align: center;
  327. position: absolute;
  328. top: 318rpx;
  329. }
  330. .fx-btn {
  331. padding: 0;
  332. &::after {
  333. border: none;
  334. }
  335. border-radius: 24rpx 0 0 24rpx;
  336. image {
  337. width: 150rpx;
  338. height: 48rpx;
  339. display: block;
  340. }
  341. }
  342. .top-btn {
  343. height: 48rpx;
  344. position: absolute;
  345. right: 0;
  346. top: 70rpx;
  347. line-height: 48rpx;
  348. font-size: 24rpx;
  349. }
  350. .visit {
  351. border-radius: 24rpx 0 0 24rpx;
  352. top: 130rpx;
  353. border: 1px solid #f65486;
  354. color: #f65486;
  355. padding-left: 24rpx;
  356. }
  357. .mvisit {
  358. // top: 70rpx;
  359. top:150rpx;
  360. }
  361. }
  362. }
  363. .m-body {
  364. width: 705rpx;
  365. margin: auto;
  366. margin-top: 20rpx;
  367. background-color: #fff;
  368. border-left: 8rpx solid #efa0ab;
  369. border-right: 8rpx solid #efa0ab;
  370. padding: 45rpx 0;
  371. }
  372. .gr {
  373. position: relative;
  374. &::before {
  375. content: '';
  376. position: absolute;
  377. // left: 75px;
  378. right: 0;
  379. top: -30rpx;
  380. width: 120px;
  381. height: 174px;
  382. background: url($base-url + '/resource/icon/model1/hua1.png') no-repeat;
  383. background-size: 100% 100%;
  384. }
  385. }
  386. .m-card {
  387. width: 640rpx;
  388. background: #fcf4f1;
  389. border-radius: 20rpx;
  390. position: relative;
  391. // min-height: 270rpx;
  392. margin: 0 auto 46rpx;
  393. .card-tit {
  394. width: 219rpx;
  395. height: 57rpx;
  396. background: #F46C85;
  397. border-radius: 20rpx 28rpx 29rpx 0rpx;
  398. justify-content: flex-start;
  399. align-items: center;
  400. padding: 0 20rpx;
  401. font-size: 32rpx;
  402. font-weight: bold;
  403. color: #FFFFFF;
  404. .tit-logo {
  405. width: 32rpx;
  406. height: 32rpx;
  407. margin-right: 18rpx;
  408. }
  409. }
  410. .card-bg {
  411. width: 100%;
  412. height: 270rpx;
  413. position: absolute;
  414. bottom: 0rpx;
  415. }
  416. .card-content {
  417. padding: 25rpx 35rpx;
  418. font-size: 26rpx;
  419. font-weight: 500;
  420. color: #2C2E35;
  421. position: relative;
  422. }
  423. .img-list {
  424. justify-content: space-between;
  425. flex-wrap: wrap;
  426. margin: auto;
  427. padding: 30rpx 30rpx 0;
  428. position: relative;
  429. image {
  430. width: 270rpx;
  431. height: 270rpx;
  432. background-color: #fff;
  433. margin-bottom: 30rpx;
  434. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.6);
  435. }
  436. }
  437. .fw {
  438. font-size: 26rpx;
  439. font-weight: 500;
  440. color: #2C2E35;
  441. padding: 10rpx 0;
  442. .fw-tit {
  443. color: #F46C85;
  444. display: flex;
  445. align-items: center;
  446. .yg {
  447. background-color: #F46C85;
  448. display: inline-block;
  449. width: 10rpx;
  450. height: 10rpx;
  451. border-radius: 50%;
  452. margin-right: 10rpx;
  453. }
  454. }
  455. .fw-content {
  456. padding-top: 10rpx;
  457. padding-left: 18rpx;
  458. text-align: justify;
  459. }
  460. }
  461. .user-info {
  462. flex-wrap: wrap;
  463. font-size: 26rpx;
  464. font-weight: 500;
  465. color: #000000;
  466. position: relative;
  467. .info-item-b,
  468. .info-item-q {
  469. padding: 10rpx 0;
  470. color: #000000;
  471. position: relative;
  472. padding-left: 20rpx;
  473. &::before {
  474. display: inline-block;
  475. content: '';
  476. width: 10rpx;
  477. height: 10rpx;
  478. border-radius: 50%;
  479. background-color: #F46C85;
  480. position: absolute;
  481. top: 22rpx;
  482. left: 0;
  483. }
  484. .qianger {
  485. width: 2em;
  486. display: inline-block;
  487. }
  488. .laner {
  489. width: 0.5em;
  490. display: inline-block;
  491. }
  492. }
  493. .info-item-b {
  494. width: 50%;
  495. }
  496. .info-item-q {
  497. width: 100%;
  498. display: flex;
  499. align-items: flex-start;
  500. justify-content: start;
  501. .fwdz {
  502. flex-direction: column;
  503. align-items: flex-start;
  504. }
  505. .gzt {
  506. width: 312rpx;
  507. height: 24rpx;
  508. padding-top: 10rpx;
  509. position: relative;
  510. image {
  511. width: 312rpx;
  512. height: 24rpx;
  513. position: relative;
  514. }
  515. .gzt-price,
  516. .gzt-price-b {
  517. width: 200rpx;
  518. text-align: center;
  519. position: absolute;
  520. padding-top: 20rpx;
  521. &::after {
  522. content: '';
  523. width: 0px;
  524. height: 0rpx;
  525. // background: #FEB8C6;
  526. border: 14rpx solid;
  527. border-color: transparent transparent #FEB8C6;
  528. // border-top:transparent;
  529. // border-left: transparent;
  530. // border-right: transparent;
  531. position: absolute;
  532. top: -14rpx;
  533. left: 0;
  534. right: 0;
  535. margin: auto;
  536. }
  537. text {
  538. color: #F46C85;
  539. }
  540. }
  541. .gzt-price {
  542. left: -100rpx;
  543. }
  544. .gzt-price-b {
  545. right: -100rpx;
  546. }
  547. }
  548. .rz {
  549. margin-top: 10rpx;
  550. margin-left: 10rpx;
  551. width: 87rpx;
  552. height: 26rpx;
  553. }
  554. }
  555. }
  556. }
  557. .m-btm {
  558. width: 660rpx;
  559. height: 384rpx;
  560. }
  561. .hua2 {
  562. position: relative;
  563. &::before {
  564. content: '';
  565. width: 199rpx;
  566. height: 298rpx;
  567. background: url($base-url + '/resource/icon/model1/hua2.png') no-repeat;
  568. position: absolute;
  569. bottom: -100rpx;
  570. right: 0;
  571. background-size: 100% 100%;
  572. }
  573. }
  574. .hua3 {
  575. position: relative;
  576. &::before {
  577. content: '';
  578. width: 192rpx;
  579. height: 223rpx;
  580. background: url($base-url + '/resource/icon/model1/hua3.png') no-repeat;
  581. position: absolute;
  582. top: 0;
  583. bottom: 0;
  584. left: 0;
  585. margin: auto;
  586. background-size: 100% 100%;
  587. }
  588. }
  589. .hua4 {
  590. position: relative;
  591. &::before {
  592. content: '';
  593. width: 128rpx;
  594. height: 145rpx;
  595. background: url($base-url + '/resource/icon/model1/hua4.png') no-repeat;
  596. position: absolute;
  597. bottom: -70rpx;
  598. right: 0;
  599. background-size: 100% 100%;
  600. }
  601. }
  602. .hua5 {
  603. position: relative;
  604. &::before {
  605. content: '';
  606. width: 199rpx;
  607. height: 298rpx;
  608. background: url($base-url + '/resource/icon/model1/hua2.png') no-repeat;
  609. position: absolute;
  610. bottom: -100rpx;
  611. left: 0;
  612. background-size: 100% 100%;
  613. transform: rotateY(180deg);
  614. }
  615. }
  616. .hua6 {
  617. position: relative;
  618. &::before {
  619. content: '';
  620. width: 192rpx;
  621. height: 223rpx;
  622. background: url($base-url + '/resource/icon/model1/hua3.png') no-repeat;
  623. position: absolute;
  624. bottom: -110rpx;
  625. right: 0;
  626. background-size: 100% 100%;
  627. transform: rotateY(180deg);
  628. }
  629. }
  630. </style>