report.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. <template>
  2. <view class="ai-container">
  3. <view class="ai-content">
  4. <view class="top-box">
  5. <view class="back-box x-f">
  6. <image src="/static/image/device/back_icon32.png"></image>
  7. <view @click="back()">返回</view>
  8. </view>
  9. <view class="title">
  10. 舌诊体质辨识报告
  11. </view>
  12. <view></view>
  13. </view>
  14. <!-- <cover-view class="uni-nav-barbox" :style="{height:height+'px',backgroundColor:headerBG,backgroundImage: baseUrl+'/images/ai_top_bg.png'}">
  15. <cover-view class="uni-nav" :style="{height:height+'px',paddingTop: statusBarHeight+ 'px'}">
  16. <cover-view class="uni-nav-back" @click="back()">返回</cover-view>
  17. <cover-view class="uni-nav-title">舌诊体质辨识报告</cover-view>
  18. <cover-view style="min-width: 104rpx;"></cover-view>
  19. </cover-view>
  20. </cover-view> -->
  21. <image class="jkda_top_bg" :src="baseUrl+'/images/ai_top_bg.png'" mode="widthFix"></image>
  22. <image class="ai_bottom_bg" :src="baseUrl+'/images/ai_bottom_bg.png'" mode="widthFix"></image>
  23. <view class="ai-container-body" v-if="item!=null">
  24. <view class="report-avatar">
  25. <image :src="item.avatar" mode="aspectFill" style="width: 100%;height: 100%;"></image>
  26. </view>
  27. <view class="report-user">
  28. <text>{{item.name}}</text>
  29. <text style="padding: 0 18rpx 0 10rpx;">{{item.sex==1?"男":"女"}}</text>
  30. <text>{{item.age}}岁</text>
  31. </view>
  32. <view class="report-infobox">
  33. <image class="ai_sz_img" :src="baseUrl+'/images/ai_sz_img.png'" mode="widthFix"></image>
  34. <view class="report-info-border">
  35. <view class="report-info">
  36. <view class="report-time">检测时间 {{item.createTime}}</view>
  37. <view class="report-info-restit">您属于{{item.typeName}}</view>
  38. <view class="report-info-res">{{item.typeName}}</view>
  39. <!-- 视频 -->
  40. <view class="videobox" v-if="videoUrl">
  41. <video class="myVideo" :src="videoUrl" :poster="imageUrl" :autoplay='true'></video>
  42. </view>
  43. <!-- 舌苔特征 -->
  44. <view class="report-title bold">舌苔特征</view>
  45. <view class="report-info-item">
  46. <view class="item-round"></view>
  47. <view>
  48. <text class="item-title">{{item.taiseName}}:</text>
  49. <text>{{item.taiseDesc}}</text>
  50. </view>
  51. </view>
  52. <view class="report-info-item">
  53. <view class="item-round"></view>
  54. <view>
  55. <text class="item-title">{{item.shemianName}}:</text>
  56. <text>{{item.shemianDesc}}</text>
  57. </view>
  58. </view>
  59. <view class="report-info-item">
  60. <view class="item-round"></view>
  61. <view>
  62. <text class="item-title">{{item.botai==1?"有剥苔":"未见剥苔"}}:</text>
  63. <text>{{item.botaiDesc}}</text>
  64. </view>
  65. </view>
  66. <view class="report-info-item">
  67. <view class="item-round"></view>
  68. <view>
  69. <text class="item-title">{{item.liewen==1?"有裂纹":"未见裂纹"}}:</text>
  70. <text>{{item.liewenDesc}}</text>
  71. </view>
  72. </view>
  73. <view class="report-info-item">
  74. <view class="item-round"></view>
  75. <view>
  76. <text class="item-title">{{item.chihen==1?"有齿痕":"未见齿痕"}}:</text>
  77. <text>{{item.chihenDesc}}</text>
  78. </view>
  79. </view>
  80. <!-- 体质解析 -->
  81. <view class="report-title bold" >体质解析</view>
  82. <view class="report-info-item" v-for="(item) in typeList">
  83. <view class="item-round"></view>
  84. <view>
  85. <text class="item-title">{{item.name}}:</text>
  86. <text>{{item.value}}</text>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <!-- 解锁 -->
  93. <view class="lockbox">
  94. <image class="mask x-c" src="/static/images/other/bg_bar.png"></image>
  95. <view class="lockbox-con y-f">
  96. <view class="lockbox-con-tip">联系伴学助手,查看全部内容</view>
  97. <!-- <image src="@/static/bxzs.jpg" mode="widthFix"></image> -->
  98. <view>注:报告内容参考王琦教授《九种体质使用手册》</view>
  99. </view>
  100. </view>
  101. <!-- 分享弹窗 -->
  102. <u-popup :show="showShare" @close="showShare = false" >
  103. <share-box :shareItem="shareItem" :showCopy="false" @closeShare='showShare = false' ></share-box>
  104. </u-popup>
  105. <view class="footer-btnbox">
  106. <!-- <view class="border-btn">
  107. <button class="footer-btn footer-btn-left">保存本图</button>
  108. </view> -->
  109. <view class="border-btn">
  110. <!-- #ifdef APP-PLUS -->
  111. <view class="footer-btn" v-if="isShare==null" @click="doShare()">分享好友</view>
  112. <!-- #endif -->
  113. <!-- #ifndef APP-PLUS -->
  114. <view class="footer-btn" v-if="isShare==null">
  115. 分享好友
  116. <button class="contact-btn" data-name="shareBtn" open-type="share">分享</button>
  117. </view>
  118. <!-- #endif -->
  119. <!-- #ifdef H5 -->
  120. <view class="footer-btn" v-if="isShare!=null&&isShare==1" @click="doTongue()">
  121. 开始检测
  122. </view>
  123. <!-- #endif -->
  124. </view>
  125. </view>
  126. <!-- <view class="banner-box">
  127. <image src="@/static/images/banner.png" mode="widthFix"></image>
  128. </view> -->
  129. </view>
  130. </view>
  131. </view>
  132. </template>
  133. <script>
  134. import {getHealthTongueById} from '@/api/healthTongue.js'
  135. export default {
  136. data() {
  137. return {
  138. type:null,
  139. id:null,
  140. isShare:null,
  141. avatar:null,
  142. item:null,
  143. typeList:[],
  144. baseUrl:uni.getStorageSync('requestPath'),
  145. statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
  146. defaultHeadimg: "/static/images/my_heads_icon.png",
  147. showShare:false,
  148. shareItem:{ imageUrl:"",title:"",path:"",isMini:true },
  149. isLock: true,
  150. videoUrl: '',
  151. imageUrl: '',
  152. headerBG:"transparent",
  153. height: 44
  154. }
  155. },
  156. onLoad(options) {
  157. this.type=options.type;
  158. this.isShare=options.isShare;
  159. this.id=options.id;
  160. this.height = this.statusBarHeight + 44
  161. // var json=uni.getStorageSync("tongueResult")
  162. // this.item=JSON.parse(json);
  163. // this.typeList=JSON.parse(this.item.typeJson)
  164. this.getHealthTongueById()
  165. },
  166. onShow() {
  167. if(!this.$isLogin()) {
  168. this.$showLoginPage()
  169. }
  170. },
  171. //发送给朋友
  172. onShareAppMessage(res) {
  173. return {
  174. title: "舌苔检测报告",
  175. path:"/pages_user/tongue/report?isShare=1&id="+this.id
  176. }
  177. },
  178. //分享到朋友圈
  179. onShareTimeline(res) {
  180. return {
  181. title: "舌苔检测报告",
  182. path:"/pages_user/tongue/report?isShare=1&id="+this.id
  183. }
  184. },
  185. onPageScroll(e) {
  186. if(e.scrollTop > 44) {
  187. this.headerBG = '#FF8A00'
  188. } else {
  189. this.headerBG = "transparent"
  190. }
  191. },
  192. methods: {
  193. doTongue(){
  194. uni.redirectTo({
  195. url:"/pages/user/tongue/index"
  196. })
  197. },
  198. getHealthTongueById(){
  199. getHealthTongueById(this.id).then(
  200. res => {
  201. if(res.code==200){
  202. this.isLock = res.isAddQw == 1 ? true : false
  203. this.videoUrl = res.url || ''
  204. this.imageUrl = res.imageUrl || ''
  205. this.item=res.data;
  206. const jsoninfo = JSON.parse(this.item.typeJson)
  207. let index = jsoninfo.findIndex(item => item.name === '用药调治');
  208. if(index > -1) {
  209. this.typeList=jsoninfo.splice(0,index)
  210. } else {
  211. this.typeList=jsoninfo
  212. }
  213. }else{
  214. }
  215. },
  216. rej => {}
  217. );
  218. },
  219. back() {
  220. if(this.type!=null&&this.type=="back"){
  221. uni.navigateBack()
  222. }
  223. else{
  224. uni.redirectTo({
  225. url:"/pages/index/index"
  226. })
  227. }
  228. },
  229. doShare(){
  230. //#ifdef APP-PLUS
  231. this.shareItem.title= "舌苔检测报告";
  232. this.shareItem.imageUrl="https://cos.his.cdwjyyh.com/fs/20250730/186f5f22c89f46d29882227f199ab673.png"; // logo
  233. this.shareItem.isMini=true;
  234. this.shareItem.path="/pages_user/tongue/report?isShare=1&id="+this.id
  235. let cdn=uni.getStorageSync('h5Path');
  236. this.shareItem.url=cdn+"/pages/user/tongue/report?isShare=1&id="+this.id
  237. this.showShare=true;
  238. //#endif
  239. }
  240. }
  241. }
  242. </script>
  243. <style scoped lang="scss">
  244. @mixin u-flex($flexD, $alignI, $justifyC) {
  245. display: flex;
  246. flex-direction: $flexD;
  247. align-items: $alignI;
  248. justify-content: $justifyC;
  249. }
  250. .pb50 {
  251. padding-bottom: calc(var(--window-bottom) + 50rpx);
  252. }
  253. .lockbox {
  254. margin-top: -200rpx;
  255. position: relative;
  256. z-index: 9;
  257. .mask{
  258. width: 100%;
  259. height:160rpx;
  260. margin-bottom: -2px;
  261. }
  262. &-con-tip {
  263. padding: 16rpx 24rpx 30rpx 24rpx;
  264. box-sizing: border-box;
  265. color: #8F6726;
  266. font-size: 32rpx;
  267. font-weight: bold;
  268. }
  269. &-con {
  270. padding: 0 24rpx 40rpx 24rpx;
  271. box-sizing: border-box;
  272. font-family: PingFang SC, PingFang SC;
  273. font-weight: 400;
  274. font-size: 24rpx;
  275. color: #999999;
  276. background-color: #fff;
  277. image {
  278. width: 702rpx;
  279. height: auto;
  280. border-radius: 16rpx;
  281. overflow: hidden;
  282. margin-bottom: 40rpx;
  283. }
  284. }
  285. }
  286. .footer-btnbox {
  287. width: 100%;
  288. padding-bottom: 44rpx;
  289. @include u-flex(row, center, center);
  290. background-color: #fff;
  291. .border-btn {
  292. width: 400rpx;
  293. height: 78rpx;
  294. padding: 4rpx;
  295. box-sizing: border-box;
  296. background: linear-gradient(0deg, #8F6726, #FBF4EE);
  297. box-shadow: 0rpx 9rpx 17rpx 0rpx #FBF4EE;
  298. border-radius: 78rpx;
  299. }
  300. .footer-btn {
  301. width: 100%;
  302. height: 100%;
  303. background: #8F6726;
  304. border-radius: 78rpx;
  305. font-family: SourceHanSansCN-Bold;
  306. font-weight: bold;
  307. font-size: 40rpx;
  308. color: #FFFFFF;
  309. line-height: 69rpx;
  310. border-radius: 33rpx;
  311. border: 3rpx solid #FBF4EE;
  312. text-align: center;
  313. &::after {
  314. border: none;
  315. }
  316. position: relative;
  317. .contact-btn{
  318. display: inline-block;
  319. position: absolute;
  320. top: 0;
  321. left: 0;
  322. width: 100%;
  323. height: 100%;
  324. opacity: 0;
  325. z-index: 9999;
  326. }
  327. }
  328. }
  329. .uni-nav-bar_bg {
  330. width: 100%;
  331. height: 782rpx;
  332. }
  333. .uni-nav-barbox {
  334. position: fixed;
  335. top: 0;
  336. left: 0;
  337. width: 100%;
  338. z-index: 998;
  339. overflow: hidden;
  340. font-family: PingFang SC, PingFang SC;
  341. font-weight: 500;
  342. color: #FFFFFF;
  343. font-size: 32rpx;
  344. background-repeat: no-repeat;
  345. background-size: 100% auto;
  346. .uni-nav {
  347. width: 100%;
  348. padding-left: 20rpx;
  349. box-sizing: border-box;
  350. @include u-flex(row, center, space-between);
  351. }
  352. .uni-nav-back {
  353. width: 110rpx;
  354. box-sizing: border-box;
  355. @include u-flex(row, center, center);
  356. text-align: center;
  357. }
  358. }
  359. .videobox {
  360. width: 568rpx;
  361. height: 320rpx;
  362. margin-top: 40rpx;
  363. position: relative;
  364. .myVideo {
  365. width: 568rpx;
  366. height: 320rpx;
  367. }
  368. }
  369. .ai-container {
  370. width: 100vw;
  371. min-height: 100vh;
  372. background-image: url(/static/image/device/ipad_yjf_boder.png);
  373. background-repeat: no-repeat;
  374. position: relative;
  375. background-size: 100% 100%;
  376. box-sizing: border-box;
  377. padding: 20rpx;
  378. .ai-content {
  379. // height: 100%;
  380. width: 100%;
  381. height: 100%;
  382. background-image: url(/static/image/device/inner_page_bg.png);
  383. background-repeat: no-repeat;
  384. background-size: 100% 100%;
  385. position: relative;
  386. padding: 30rpx;
  387. .top-box {
  388. width: 100%;
  389. display: flex;
  390. align-items: center;
  391. justify-content: space-between;
  392. margin-bottom: 60rpx;
  393. .title {
  394. font-family: PingFang SC, PingFang SC;
  395. font-weight: bold;
  396. font-size: 40rpx;
  397. color: #8F6726;
  398. text-align: center;
  399. }
  400. .back-box {
  401. width: 138rpx;
  402. height: 64rpx;
  403. background: #FFFFFF;
  404. border-radius: 8rpx;
  405. border: 2rpx solid #8F6726;
  406. padding: 24rpx 16rpx;
  407. justify-content: center;
  408. view {
  409. font-family: PingFang SC, PingFang SC;
  410. font-weight: 400;
  411. font-size: 24rpx;
  412. color: #8F6726;
  413. text-align: center;
  414. margin-left: 10rpx;
  415. }
  416. // position: absolute;
  417. // left: 30rpx;
  418. image {
  419. width: 32rpx;
  420. height: 32rpx;
  421. }
  422. }
  423. }
  424. }
  425. // background: #FF8A00;
  426. .jkda_top_bg {
  427. position: absolute;
  428. top: 0;
  429. left: 0;
  430. width: 100%;
  431. height: auto;
  432. }
  433. .ai_bottom_bg {
  434. position: absolute;
  435. bottom: 0;
  436. left: 0;
  437. width: 100%;
  438. height: auto;
  439. }
  440. &-body {
  441. position: relative;
  442. // padding-top: calc(var(--status-bar-height) + 132rpx);
  443. }
  444. }
  445. .bold {
  446. height: 42rpx;
  447. font-size: 44rpx !important;
  448. color: #8F6726 !important;
  449. border-left: 10rpx solid #8F6726;
  450. line-height: 42rpx;
  451. margin: 54rpx 0 40rpx 0;
  452. }
  453. .ai_sz_img {
  454. width: 100%;
  455. height: auto;
  456. position: absolute;
  457. top: 0;
  458. left: 16rpx;
  459. z-index: 1;
  460. }
  461. .item-round {
  462. flex-shrink: 0;
  463. width: 23rpx;
  464. height: 23rpx;
  465. margin-right: 12rpx;
  466. background: #8F6726;
  467. border-radius: 50%;
  468. }
  469. .report {
  470. &-avatar {
  471. width: 171rpx;
  472. height: 171rpx;
  473. padding: 3rpx;
  474. margin: 0 auto;
  475. border-radius: 50%;
  476. overflow: hidden;
  477. box-sizing: border-box;
  478. background: linear-gradient(0deg, #8F6726, #FBF4EE);
  479. }
  480. &-user {
  481. font-family: SourceHanSansCN;
  482. font-weight: bold;
  483. font-size: 40rpx;
  484. color: #FFFFFF;
  485. line-height: 91rpx;
  486. text-shadow: 2rpx 2rpx 3rpx #8F6726;
  487. text-align: center;
  488. }
  489. &-infobox {
  490. padding: 36rpx 47rpx 0 47rpx;
  491. // padding-top: 184rpx;
  492. position: relative;
  493. }
  494. &-info-border {
  495. padding: 4rpx;
  496. border-radius: 45rpx;
  497. box-sizing: border-box;
  498. background: linear-gradient(0deg, #8F6726, #FBF4EE);
  499. box-shadow: 8rpx 11rpx 14rpx 0rpx #8F6726;
  500. position: relative;
  501. z-index: 2;
  502. }
  503. &-info {
  504. padding: 34rpx 40rpx;
  505. box-sizing: border-box;
  506. background: #FFFFFF;
  507. border-radius: 45rpx;
  508. font-family: SourceHanSansCN-Regular;
  509. font-weight: 400;
  510. color: #4D4D4D;
  511. &-restit {
  512. margin: 27rpx 0 33rpx 0;
  513. font-family: SourceHanSansCN-Bold;
  514. font-weight: bold;
  515. font-size: 33rpx;
  516. color: #4D4D4D;
  517. text-align: center;
  518. }
  519. &-res {
  520. font-weight: 800;
  521. font-size: 54rpx;
  522. color: #8F6726;
  523. text-align: center;
  524. }
  525. &-item {
  526. margin-bottom: 30rpx;
  527. display: flex;
  528. align-items: baseline;
  529. font-family: SourceHanSansCN-Regular;
  530. font-size: 27rpx;
  531. color: #414141;
  532. line-height: 36rpx;
  533. word-break: break-all;
  534. .item-title {
  535. font-family: SourceHanSansCN-Bold;
  536. font-weight: bold;
  537. font-size: 27rpx;
  538. color: #414141;
  539. }
  540. }
  541. }
  542. &-time {
  543. font-size: 24rpx;
  544. text-align: center;
  545. }
  546. &-title {
  547. padding-left: 10rpx;
  548. font-family: SourceHanSansCN-Bold;
  549. font-weight: bold;
  550. color: #414141;
  551. }
  552. }
  553. .banner-box {
  554. padding: 48rpx 34rpx 0 34rpx;
  555. image {
  556. width: 100%;
  557. height: auto;
  558. }
  559. }
  560. </style>