model_2.vue 17 KB

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