model_1.vue 17 KB

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