CustomMessageRender.vue 19 KB

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