CustomMessageRender.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812
  1. <template>
  2. <view class="custom" @click="handleCustomerItem">
  3. <template v-if="isCustom === 'order'">
  4. <view class="order-item">
  5. <view class="title">问诊订单</view>
  6. <view class="text">患者:{{ extension.patientName }} {{ extension.sex }} {{ extension.mobile }}</view>
  7. <view class="text">患病时间:{{ extension.duration }}</view>
  8. <view class="text">就诊情况:{{ extension.isVisit }}</view>
  9. <view class="text">病情描述:{{ extension.title }}</view>
  10. </view>
  11. </template>
  12. <template v-else-if="isCustom === 'prescribe'">
  13. <view class="prescribe-item">
  14. <view class="title">电子处方单</view>
  15. <view class="text">诊断:{{ extension.diagnose }}</view>
  16. <view class="btns">
  17. <view class="btn">查看处方</view>
  18. </view>
  19. </view>
  20. </template>
  21. <template v-else-if="isCustom === 'report'">
  22. <view class="report-item">
  23. <view class="title">问诊报告单</view>
  24. <view class="btns">
  25. <view class="btn">查看报告单</view>
  26. </view>
  27. </view>
  28. </template>
  29. <template v-else-if="isCustom === 'follow'">
  30. <view class="prescribe-item">
  31. <view class="title">随访单</view>
  32. <view class="btns">
  33. <view class="btn">查看随访</view>
  34. </view>
  35. </view>
  36. </template>
  37. <template v-else-if="isCustom === 'drugReport'">
  38. <view class="report-item">
  39. <view class="title">用药报告单</view>
  40. <view class="btns">
  41. <view class="btn">查看报告单</view>
  42. </view>
  43. </view>
  44. </template>
  45. <template v-else-if="isCustom === 'package'">
  46. <view class="package-item">
  47. <view class="title">{{extension.title}}</view>
  48. <view class="cover" v-if="!!extension.image">
  49. <image :src="extension.image" mode="aspectFill"></image>
  50. </view>
  51. <view v-else class="btns">
  52. <view class="btn">查看疗法</view>
  53. </view>
  54. </view>
  55. </template>
  56. <template v-else-if="isCustom === 'couponPackage'">
  57. <view class="package-item">
  58. <view class="title">{{extension.title}}</view>
  59. <view class="stitle"><i class="psub">¥</i> <i class="psub price"> {{ extension.price.toFixed(2) }} </i>
  60. {{ "(满"+extension.minPrice.toFixed(2)+"元可用)" }}
  61. </view>
  62. <view class="stitle stitle1">{{ extension.limitTime+"到期 不可叠加使用"}}</view>
  63. <view class="cover" v-if="!!extension.image">
  64. <image :src="extension.image" mode="aspectFill"></image>
  65. </view>
  66. <view v-else class="btns">
  67. <view class="btn">查看私域疗法券</view>
  68. </view>
  69. </view>
  70. </template>
  71. <template v-else-if="isCustom === 'inquirySelect'">
  72. <view class="package-item">
  73. <view class="title">{{extension.title}}</view>
  74. <view class="stitle">医疗专家团队远程咨询</view>
  75. <view class="cover" v-if="!!extension.image">
  76. <image :src="extension.image" mode="aspectFill"></image>
  77. </view>
  78. <view v-else class="btns">
  79. <view class="btn">查看会诊</view>
  80. </view>
  81. </view>
  82. </template>
  83. <template v-else-if="isCustom === 'startInquiry'">
  84. <view class="content content-in">
  85. <span>{{ extension.title }}</span>
  86. </view>
  87. </template>
  88. <template v-else-if="isCustom === 'finishInquiry'">
  89. <view class="content content-ou">
  90. <span>{{ extension.title }}</span>
  91. </view>
  92. </template>
  93. <template v-else-if="isCustom === 'course'">
  94. <view class="box">
  95. <view class="list-item">
  96. <view class="list-con border-line">
  97. <view class="list-itemtxt">
  98. <!-- <text class="list-title textOne">{{extension.courseName}}</text> -->
  99. <text class="list-desc textTwo">{{extension.title}}</text>
  100. </view>
  101. <view class="list-cover">
  102. <image :src="extension.courseUrl" mode="aspectFill"></image>
  103. </view>
  104. </view>
  105. <!-- <view class="list-footer">
  106. <view style="flex: 1;overflow: hidden;">
  107. <image :src="extension.imageUrl" mode="aspectFill"></image>
  108. <text class="list-time textOne">{{extension.qwUserName}}</text>
  109. </view>
  110. <text class="list-time">过期时间:{{extension.updateTime}}</text>
  111. </view> -->
  112. </view>
  113. </view>
  114. </template>
  115. <template v-else-if="isCustom === 'live'">
  116. <view class="box">
  117. <view class="liveList">
  118. <view class="list-item">
  119. <image :src="liveDefUrl" mode="aspectFill"></image>
  120. <view class="info">
  121. <text>{{extension.liveName}}</text>
  122. </view>
  123. <view class="livebox">直播</view>
  124. </view>
  125. </view>
  126. </view>
  127. </template>
  128. <template v-else-if="isCustom === 'luckyBag'">
  129. <view class="box">
  130. <view class="luckyBagBox">
  131. <view class="u-f">
  132. <view class="u-f-ajc es-mr-20">
  133. <image class="es-icon-56" src="/pages_im/static/images/luckyBag/new_lucky_bag_icon.png"
  134. mode=""></image>
  135. </view>
  136. <view class="es-fs-32 es-fw-500 es-c-white">
  137. 福袋
  138. </view>
  139. </view>
  140. <view class="es-mt-16 luckyBagBox-line"></view>
  141. <view class="es-mt-16 es-fs-20 es-c-white">
  142. 专属福袋
  143. </view>
  144. </view>
  145. </view>
  146. </template>
  147. <template v-else>
  148. <view class="content"></view>
  149. </template>
  150. <CollectLuckyBag :luckyBagExtension="luckyBagExtension" @close="collectLuckyBagShow=false"
  151. :show="collectLuckyBagShow" />
  152. </view>
  153. </template>
  154. <script>
  155. import {
  156. getLuckyBagInfo
  157. } from '@/pages_im/api/luckyBag.js'
  158. import CollectLuckyBag from '@/pages_im/pages/conversation/chating/components/ChatingFooter/CollectLuckyBag.vue'
  159. import MyAvatar from '../../../../../components/MyAvatar/index.vue';
  160. export default {
  161. name: 'CustomMessageRender',
  162. components: {
  163. MyAvatar,
  164. CollectLuckyBag
  165. },
  166. props: {
  167. message: {
  168. type: Object,
  169. default: () => ({
  170. customElem: {
  171. data: '{}' // 默认空JSON
  172. },
  173. cardElem: {
  174. userID: ''
  175. }
  176. })
  177. }
  178. },
  179. data() {
  180. return {
  181. isCustom: {}, // 明确初始化null
  182. payload: {}, // 与服务端数据结构对齐
  183. extension: {}, // 保持响应式基础结构
  184. liveDefUrl: "https://fbylive.obs.cn-southwest-2.myhuaweicloud.com/fs/20250920/1758354962430.png",
  185. collectLuckyBagShow: false,
  186. luckyBagExtension: '',
  187. };
  188. },
  189. mounted() {
  190. this.safeParseData();
  191. },
  192. methods: {
  193. safeParseData() {
  194. try {
  195. const rawData = this.message?.customElem?.data || '{}';
  196. const parsed = JSON.parse(rawData);
  197. //结构化赋值
  198. this.payload = parsed.payload || {};
  199. this.extension = this.payload.extension || {};
  200. this.isCustom = this.payload.data ?? null;
  201. } catch (e) {
  202. console.error('[消息解析失败]', e);
  203. this.$emit('parse-error', {
  204. raw: this.message,
  205. error: e
  206. });
  207. }
  208. },
  209. async handleCustomerItem() {
  210. const rawData = this.message?.customElem.data;
  211. let item = JSON.parse(rawData);
  212. console.log("handleCustomerItem:::");
  213. console.log(item);
  214. if (item.payload.data == 'order') {
  215. uni.navigateTo({
  216. url: '/pages/store/inquiryOrderDetails?orderId=' + item.payload.description
  217. });
  218. } else if (item.payload.data == 'prescribe') {
  219. var prescribe = item.payload.extension;
  220. uni.navigateTo({
  221. url: '/pages/store/prescribeDetails?prescribeId=' + prescribe.prescribeId
  222. });
  223. } else if (item.payload.data == 'package') {
  224. var packageItem = item.payload.extension;
  225. let companyId = packageItem.companyId;
  226. let companyUserId = packageItem.companyUserId;
  227. let nUrl = "/pages/store/packageDetails?packageId=" + packageItem.packageId + "&companyId=" +
  228. companyId + "&companyUserId=" + companyUserId;
  229. uni.navigateTo({
  230. url: nUrl
  231. });
  232. } else if (item.payload.data == 'couponPackage') {
  233. console.log("qxj item", item);
  234. var cItem = item.payload.extension;
  235. let companyId = cItem.companyId;
  236. let companyUserId = cItem.companyUserId;
  237. let nUrl = '/pages/company/couponDetails?couponId=' + cItem.couponId;
  238. if (this.$companyUserIsLogin()) {
  239. nUrl += "&isShare=1"
  240. }
  241. uni.navigateTo({
  242. url: nUrl
  243. });
  244. } else if (item.payload.data == 'inquirySelect') {
  245. var cItem = item.payload.extension;
  246. let companyId = cItem.companyId;
  247. let companyUserId = cItem.companyUserId;
  248. let type = cItem.type;
  249. if (type == 3) {
  250. let nUrl = "/pages/store/inquiryForm2_2?inquiryType=2&orderType=2&inquirySubType=" + type +
  251. "&companyId=" + companyId + "&companyUserId=" + companyUserId;
  252. if (this.$companyUserIsLogin()) {
  253. nUrl += "&isShare=1"
  254. }
  255. uni.navigateTo({
  256. url: nUrl
  257. });
  258. } else if (type == 4) {
  259. } else {
  260. let nUrl = "/pages/store/inquiryForm2_1?inquiryType=2&orderType=2&inquirySubType=" + type +
  261. "&companyId=" + companyId + "&companyUserId=" + companyUserId;
  262. if (this.$companyUserIsLogin()) {
  263. nUrl += "&isShare=1"
  264. }
  265. uni.navigateTo({
  266. url: nUrl
  267. });
  268. }
  269. } else if (item.payload.data == 'follow') {
  270. var follow = item.payload.extension;
  271. if (follow.writeStatus == 0) {
  272. uni.navigateTo({
  273. url: '/pages/user/doFollow?followId=' + follow.followId
  274. });
  275. } else if (follow.writeStatus == 1) {
  276. uni.navigateTo({
  277. url: '/pages/user/followDetails?followId=' + follow.followId
  278. });
  279. }
  280. } else if (item.payload.data == 'report') {
  281. uni.navigateTo({
  282. url: '/pages/store/inquiryOrderReport?orderId=' + item.payload.description
  283. });
  284. } else if (item.payload.data == 'drugReport') {
  285. // var report=JSON.parse(item.payload.extension);
  286. uni.navigateTo({
  287. url: '/pages/user/drugReportDetails?reportId=' + item.payload.description
  288. });
  289. } else if (item.payload.data == 'course') {
  290. uni.removeStorageSync('showCourseBox')
  291. console.log("qxj extension", item);
  292. let couseItem = item.payload.extension;
  293. if (uni.getStorageSync('companyUserId')) {
  294. const queryString = couseItem.appRealLink.split('?')[1] || '';
  295. const courseParamMatch = queryString.match(/course=({[^&]+})/);
  296. if (!courseParamMatch) {
  297. uni.showToast({
  298. icon: 'none',
  299. title: '看课链接不存在'
  300. })
  301. }
  302. const courseJson = decodeURIComponent(courseParamMatch[1]);
  303. const courseData = JSON.parse(courseJson);
  304. return uni.navigateTo({
  305. url: `/pages_managedata/coursedetail?videoId=${courseData.videoId}&id=${courseData.id}&periodId=${courseData.periodId}`
  306. });
  307. }
  308. if (couseItem.appRealLink) {
  309. if (/^\//.test(couseItem.appRealLink)) {
  310. uni.navigateTo({
  311. url: couseItem.appRealLink,
  312. })
  313. } else {
  314. uni.navigateTo({
  315. url: "/pages_im/pages/common/webH5/index?url=" + couseItem.appRealLink
  316. });
  317. }
  318. } else {
  319. uni.showToast({
  320. icon: 'none',
  321. title: "暂无看课链接",
  322. });
  323. }
  324. } else if (item.payload.data == 'live') {
  325. var liveItem = item.payload.extension;
  326. let userInfo = JSON.parse(uni.getStorageSync("userInfo"));
  327. let timeSpan = (new Date()).getTime();
  328. let liveUrl =
  329. `http://h5.fbylive.com/videoH5/pages/home/living?liveId=${liveItem.liveId}&userId=${userInfo.userId}&t=${timeSpan}`;
  330. console.log("qxj liveUrl", liveUrl);
  331. //let liveUrl=`http://localhost:8081/videoH5/pages/home/living?liveId=${liveItem.liveId}&name=直播间`
  332. if (liveUrl) {
  333. uni.navigateTo({
  334. url: "/pages_im/pages/common/webH5/index?url=" + liveUrl + "&name=直播间"
  335. });
  336. } else {
  337. uni.showToast({
  338. icon: 'none',
  339. title: "暂无直播间链接",
  340. });
  341. }
  342. } else if (item.payload.data == "luckyBag") {
  343. const res = await getLuckyBagInfo({
  344. recordId: item.payload.extension.recordId
  345. })
  346. if (res.code == 200) {
  347. let msg = ''
  348. if (res.data.collectType == 0) {
  349. let companyUserInfo = uni.getStorageSync('companyUserInfo')
  350. if (companyUserInfo) {
  351. return uni.showToast({
  352. icon: 'none',
  353. title: '福袋还未领取'
  354. })
  355. }
  356. this.luckyBagExtension = item.payload.extension
  357. this.collectLuckyBagShow = true
  358. return
  359. } else if (res.data.collectType == 1) {
  360. msg = '福袋已领取'
  361. } else if (res.data.collectType == 2) {
  362. msg = '福袋已失效'
  363. }
  364. uni.showToast({
  365. icon: 'none',
  366. title: msg
  367. })
  368. } else {
  369. uni.showToast({
  370. icon: 'none',
  371. title: res.msg
  372. })
  373. }
  374. }
  375. }
  376. }
  377. };
  378. </script>
  379. <style lang="scss" scoped>
  380. @mixin u-flex($flexD, $alignI, $justifyC) {
  381. display: flex;
  382. flex-direction: $flexD;
  383. align-items: $alignI;
  384. justify-content: $justifyC;
  385. }
  386. .card_message_container {
  387. @include colBox(false);
  388. background-color: #fff;
  389. box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
  390. border-radius: 12rpx;
  391. width: 444rpx;
  392. border: 1px solid #ececec;
  393. .card_info {
  394. @include vCenterBox();
  395. padding: 24rpx 32rpx;
  396. border-bottom: 1px solid #e9e9e9;
  397. .card_name {
  398. @include ellipsisWithLine(1);
  399. margin-left: 24rpx;
  400. }
  401. }
  402. .card_desc {
  403. padding: 8rpx 0 8rpx 42rpx;
  404. color: #999;
  405. }
  406. }
  407. .custom {
  408. padding: 0 0 12px 0;
  409. .order-item {
  410. width: 400rpx;
  411. padding: 15rpx;
  412. padding: 15rpx;
  413. border: 1rpx solid #ececec;
  414. box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.05);
  415. background-color: #fff;
  416. border-radius: 15rpx;
  417. display: flex;
  418. flex-direction: column;
  419. align-items: flex-start;
  420. justify-content: flex-start;
  421. .title {
  422. font-size: 16px;
  423. font-family: PingFang SC;
  424. font-weight: bold;
  425. color: #111111;
  426. }
  427. .text {
  428. font-size: 12px;
  429. font-family: PingFang SC;
  430. color: #9a9a9c;
  431. padding: 6rpx 0;
  432. }
  433. }
  434. .prescribe-item {
  435. width: 400rpx;
  436. padding: 15rpx;
  437. border: 1rpx solid #ececec;
  438. box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.05);
  439. background-color: #fff;
  440. border-radius: 15rpx;
  441. display: flex;
  442. flex-direction: column;
  443. align-items: flex-start;
  444. justify-content: flex-start;
  445. .title {
  446. font-size: 16px;
  447. font-family: PingFang SC;
  448. font-weight: bold;
  449. color: #111111;
  450. }
  451. .text {
  452. margin-top: 10rpx;
  453. font-size: 12px;
  454. font-family: PingFang SC;
  455. color: #9a9a9c;
  456. }
  457. .btns {
  458. padding: 15rpx;
  459. display: flex;
  460. align-items: center;
  461. justify-content: center;
  462. width: 100%;
  463. .btn {
  464. border-radius: 30rpx;
  465. padding: 15rpx 30rpx;
  466. border: 1rpx solid #ececec;
  467. font-family: PingFang SC;
  468. color: #333333;
  469. }
  470. }
  471. }
  472. .report-item {
  473. width: 400rpx;
  474. padding: 15rpx;
  475. border: 1rpx solid #ececec;
  476. box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.05);
  477. background-color: #fff;
  478. border-radius: 15rpx;
  479. display: flex;
  480. flex-direction: column;
  481. align-items: flex-start;
  482. justify-content: flex-start;
  483. .title {
  484. font-size: 16px;
  485. font-family: PingFang SC;
  486. font-weight: bold;
  487. color: #111111;
  488. }
  489. .text {
  490. margin-top: 10rpx;
  491. font-size: 12px;
  492. font-family: PingFang SC;
  493. color: #9a9a9c;
  494. }
  495. .btns {
  496. padding: 15rpx;
  497. display: flex;
  498. align-items: center;
  499. justify-content: center;
  500. width: 100%;
  501. .btn {
  502. border-radius: 30rpx;
  503. padding: 15rpx 30rpx;
  504. border: 1rpx solid #ececec;
  505. font-family: PingFang SC;
  506. color: #333333;
  507. }
  508. }
  509. }
  510. .package-item {
  511. width: 450rpx;
  512. padding: 15rpx;
  513. border: 1rpx solid #ececec;
  514. box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.05);
  515. background-color: #fff;
  516. border-radius: 15rpx;
  517. display: flex;
  518. flex-direction: column;
  519. align-items: flex-start;
  520. justify-content: flex-start;
  521. .title {
  522. font-size: 16px;
  523. font-family: PingFang SC;
  524. font-weight: bold;
  525. color: #333;
  526. margin-bottom: 10rpx;
  527. }
  528. .stitle {
  529. font-size: 15px;
  530. font-family: PingFang SC;
  531. font-weight: 500;
  532. color: #666;
  533. margin-bottom: 10rpx;
  534. }
  535. .psub {
  536. color: #e41f19;
  537. font-size: 15px;
  538. font-style: normal;
  539. }
  540. .price {
  541. font-size: 18px;
  542. font-style: normal;
  543. font-weight: bold;
  544. }
  545. .stitle1 {
  546. font-size: 14px;
  547. }
  548. .cover {
  549. width: calc(100%);
  550. height: 400rpx;
  551. border-radius: 16rpx;
  552. box-sizing: border-box;
  553. image {
  554. width: 100%;
  555. height: 100%;
  556. }
  557. }
  558. }
  559. }
  560. .content {
  561. padding: 10px;
  562. background: #f0f0f0;
  563. &-in {
  564. border-radius: 0px 10px 10px 10px;
  565. }
  566. &-out {
  567. border-radius: 10px 0px 10px 10px;
  568. }
  569. }
  570. .list {
  571. &-item {
  572. width: 450rpx;
  573. padding: 0rpx;
  574. border: 1rpx solid #ececec;
  575. box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.05);
  576. background-color: #fff;
  577. border-radius: 16rpx;
  578. margin-bottom: 20rpx;
  579. box-sizing: border-box;
  580. font-family: PingFang SC, PingFang SC;
  581. font-weight: 400;
  582. font-size: 15px;
  583. color: #333333;
  584. line-height: 36rpx;
  585. image {
  586. flex-shrink: 0;
  587. width: 150rpx;
  588. height: 120rpx;
  589. margin-left: 16rpx;
  590. background: #F5F6F6;
  591. border-radius: 10rpx 10rpx 10rpx 10rpx;
  592. overflow: hidden;
  593. }
  594. }
  595. &-con {
  596. width: 100%;
  597. padding: 24rpx;
  598. box-sizing: border-box;
  599. @include u-flex(column, flex-start, space-between);
  600. }
  601. &-cover {
  602. width: 100%;
  603. margin-top: 20rpx;
  604. @include u-flex(row, flex-start, flex-end);
  605. }
  606. &-itemtxt {
  607. flex: 1;
  608. overflow: hidden;
  609. word-break: break-all;
  610. display: block;
  611. }
  612. &-title {
  613. word-break: break-all;
  614. display: block;
  615. }
  616. &-desc {
  617. margin-top: 0rpx;
  618. font-size: 18px;
  619. color: #333;
  620. line-height: 44rpx;
  621. }
  622. &-time {
  623. font-size: 11px;
  624. color: #999999;
  625. }
  626. &-footer {
  627. padding: 20rpx 24rpx;
  628. box-sizing: border-box;
  629. @include u-flex(row, center, space-between);
  630. position: relative;
  631. view {
  632. @include u-flex(row, center, flex-start);
  633. }
  634. image {
  635. height: 50rpx;
  636. width: 50rpx;
  637. border-radius: 50%;
  638. margin: 0 10rpx 0 0;
  639. }
  640. }
  641. }
  642. .liveList {
  643. // display: flex;
  644. // justify-content: space-between;
  645. // flex-wrap: wrap;
  646. .list-item {
  647. border-radius: 16rpx;
  648. width: 300rpx;
  649. height: 500rpx;
  650. background-color: #0d0d0d;
  651. margin-bottom: 24rpx;
  652. overflow: hidden;
  653. position: relative;
  654. .livebox {
  655. background: #ff5500;
  656. border-radius: 20rpx;
  657. font-size: 26rpx;
  658. color: #fff;
  659. text-align: center;
  660. position: absolute;
  661. left: 18rpx;
  662. top: 18rpx;
  663. padding: 8rpx 14rpx;
  664. }
  665. image {
  666. width: 100%;
  667. height: 100%;
  668. margin-left: 0;
  669. }
  670. video {
  671. width: 100%;
  672. height: 100%;
  673. object-fit: cover;
  674. }
  675. .info {
  676. position: absolute;
  677. left: 20rpx;
  678. bottom: 14rpx;
  679. right: 20rpx;
  680. color: #ffffff;
  681. display: flex;
  682. align-items: center;
  683. .live-badge {
  684. background-color: #e74c3c;
  685. padding: 4rpx 12rpx;
  686. border-radius: 8rpx;
  687. font-size: 20rpx;
  688. margin-right: 12rpx;
  689. }
  690. .record-badge {
  691. background-color: #3498db;
  692. padding: 4rpx 12rpx;
  693. border-radius: 8rpx;
  694. font-size: 20rpx;
  695. margin-right: 12rpx;
  696. }
  697. }
  698. .error-tip {
  699. position: absolute;
  700. top: 50%;
  701. left: 50%;
  702. transform: translate(-50%, -50%);
  703. color: #fff;
  704. background-color: rgba(0, 0, 0, 0.7);
  705. padding: 16rpx 24rpx;
  706. border-radius: 8rpx;
  707. font-size: 24rpx;
  708. }
  709. }
  710. // 使列表项均匀分布
  711. .list-item:nth-child(2n) {
  712. margin-right: 0;
  713. }
  714. }
  715. .luckyBagBox {
  716. width: 384rpx;
  717. height: 160rpx;
  718. border-radius: 8rpx;
  719. padding: 24rpx;
  720. background: linear-gradient(180deg, #FD303D 0%, #FEB6A7 99.99%);
  721. .luckyBagBox-line {
  722. width: 100%;
  723. height: 1rpx;
  724. background: rgba(255, 255, 255, 0.2);
  725. }
  726. }
  727. </style>