benefitPackage.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776
  1. <template>
  2. <view class="page">
  3. <!-- 头部切换 -->
  4. <u-sticky zIndex="999" customNavHeight="0">
  5. <uni-NavBar headerTitle="权益套餐" background="#fff" :isSlot="false" :rightSlot="true"
  6. borderBottom="1rpx solid #eee">
  7. </uni-NavBar>
  8. <uni-dropdown :close-on-click-mask="mask" ref="uDropdown" :activeColor="activeColor" border-radius="10"
  9. menuIcon="arrow-down-fill" :borderBottom="borderBottom" @menuClick="menuClick">
  10. <uni-dropdown-item :title="location.cityName || '地区'"></uni-dropdown-item>
  11. <uni-dropdown-item title="价格区间">
  12. <view class="slotArea">
  13. <view class="p-3">
  14. <!-- 双边滑动选择器 -->
  15. <view class="slider-header dis a-c j-s ">
  16. <text>价值</text>
  17. <text>{{ queryInfo.minPrice }}-{{ queryInfo.maxPrice }}元</text>
  18. </view>
  19. <view style="padding: 0 40rpx;">
  20. <uni-tianzai-slider-range :step="50" :min="0" :max="1000"
  21. :value="[queryInfo.minPrice, queryInfo.maxPrice]" @change="onChange" @end="onEnd">
  22. </uni-tianzai-slider-range>
  23. </view>
  24. <view class="options dis a-c f-wrap mt-3">
  25. <view class="options-card dis a-c j-c"
  26. :class="item.label == priceRangeName ? 'active' : ''"
  27. v-for="(item, index) in priceRangeOptions" :key="index"
  28. @click="filterCriteriaClick(item)">
  29. {{ item.label }}
  30. </view>
  31. </view>
  32. </view>
  33. <!-- 按钮 -->
  34. <view class="slider-btn dis a-c j-s">
  35. <view class="btn dis a-c j-c mr-3" @click="clearForm">
  36. 清空
  37. </view>
  38. <view class="btn btns dis a-c j-c" @click="querySearch">
  39. 确定
  40. </view>
  41. </view>
  42. </view>
  43. </uni-dropdown-item>
  44. <uni-dropdown-item title="默认排序">
  45. <view class="slotArea">
  46. <view class="sort">
  47. <view class="item dis a-c " @click="sortItem(item.value)"
  48. v-for="(item, index) in sortOrderOptions" :key="index">
  49. <text class="text" :class="{ 'sort-active': item.value === queryInfo.sortType }">{{
  50. item.label }}</text>
  51. <view class="slice dis a-c j-c " v-if="item.value === queryInfo.sortType">
  52. <u-icon name="checkmark" color="#333" size="11" :bold="true"></u-icon>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </uni-dropdown-item>
  58. </uni-dropdown>
  59. </u-sticky>
  60. <!-- 内容 -->
  61. <view class="content-body">
  62. <!-- 权益列表 -->
  63. <view class="view-card dis f-c " v-for="(item, index) in benefitPackageList" :key="index"
  64. v-if="benefitPackageList.length">
  65. <!-- 权益信息 -->
  66. <view class="dis view-header">
  67. <!-- 图片 -->
  68. <image class="image" :src="item.packageImage" mode=""></image>
  69. <view class="content dis f-c j-s">
  70. <u--text :lines="1" :text="item.equityPackageName" color="#333" size="16" :bold="true"
  71. style="line-height: 1;flex:0 auto;"></u--text>
  72. <view class="sum dis a-c ">
  73. <!-- 市场价/ 券数量 -->
  74. <text class="couponCount mr-2">券数量{{ item.totalNumber }}张</text>
  75. <text class="marketPrice">市场价 {{ item.totalPackagePrice }}</text>
  76. <u-number-box v-model="item.rightsCount" :min="0" style="margin-left: auto;"
  77. @change="val => onRightsCountChange(val, index, 'benefitPackageList', 'packagePrice')"
  78. :asyncChange="true">
  79. <view slot="minus" class="numberBoxMinus dis a-c j-c ">
  80. <u-icon name="minus" size="12" color="#333" bold></u-icon>
  81. </view>
  82. <text slot="input" class="numberBoxInput">
  83. {{ item.rightsCount }}
  84. </text>
  85. <view slot="plus" class="numberBoxPlus dis a-c j-c ">
  86. <u-icon name="plus" color="#333" size="12" bold></u-icon>
  87. </view>
  88. </u-number-box>
  89. </view>
  90. <view class=" dis a-c j-s ">
  91. <text class="plice">¥{{ item.packagePrice }}</text>
  92. <view class="Detail dis a-c " @click="rightsDetails(item, index)">
  93. <text>查看明细</text>
  94. <u-icon :name="item.vehicleTaxIsExpanded ? 'arrow-up' : 'arrow-down'" color="#FFAC1D"
  95. size="12"></u-icon>
  96. </view>
  97. </view>
  98. </view>
  99. </view>
  100. <!-- 明细列表 -->
  101. <view class="Detail-list"
  102. v-if="item.vehicleTaxIsExpanded && item.rightsDetailsList && item.rightsDetailsList.length > 0">
  103. <view class="view">
  104. <view class="dis view-header" v-for="(DetailsItem, DetailsIndex) in item.rightsDetailsList"
  105. :key="DetailsIndex">
  106. <image class="image" :src="DetailsItem.rightsPicture" mode=""
  107. style="height: 116rpx;width: 116rpx;">
  108. </image>
  109. <view class="content dis f-c j-s ">
  110. <u--text :lines="1" :text="DetailsItem.rightsName" color="#333" size="16" :bold="true"
  111. style="line-height: 1;flex:0 auto;"></u--text>
  112. <view class="sum dis a-c mt-1 mb-1">
  113. <text class="marketPrice">市场价 {{ DetailsItem.marketPrice }}</text>
  114. </view>
  115. <text class="plice">¥{{ DetailsItem.contractRate }}</text>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. </view>
  121. </view>
  122. <u-empty v-if="benefitPackageList.length == 0" mode="car" icon="/static/image/Empty1.png"
  123. text="没有可用的权益券,换个地区试试~" width="120" height="120">
  124. </u-empty>
  125. <!-- 底部样式 -->
  126. <view class="footer dis a-c">
  127. <!-- 图标 -->
  128. <view class="icon-view dis f-c a-c ">
  129. <view class="">
  130. <image src="/static/icon/balance/balance.png" mode=""></image>
  131. <u-badge numberType="overflow" :max="99" :value="selectedCount" :absolute="true" color="#fff"
  132. bgColor="#FF4545" :offset="[-5, -5]" style="font-size: 18rpx;"></u-badge>
  133. </view>
  134. <text>已选</text>
  135. </view>
  136. <!-- 价格 -->
  137. <view class="dis f-c a-start">
  138. <view class="price">
  139. <text>¥</text>
  140. <text>{{ totalPriceCount }}</text>
  141. </view>
  142. <text class="marketPrice">市场价:{{ totalMarketPriceCount }}</text>
  143. </view>
  144. <view class="footer-btn" @click="userRightsSubmit">
  145. 立即发放
  146. </view>
  147. </view>
  148. <!-- 省市区组件 -->
  149. <uni-areaCascadePicker :show="addressPickershow" @confirm="addressConfirm" @close="areaCascadeClose"
  150. @cancel="addressPickershow = false"></uni-areaCascadePicker>
  151. <!-- 自定义加载动画 -->
  152. <u-overlay :show="loadingShow" style="background-color: rgba(255, 255, 255, 0.6);">
  153. <view class="dis f-c a-c j-c " style="height: 100%;">
  154. <u-loading-icon></u-loading-icon>
  155. <text style="color: #909399;" class="mt-1">{{ loadingText }}</text>
  156. </view>
  157. </u-overlay>
  158. </view>
  159. </template>
  160. <script>
  161. import LocationService from '@/utils/location';
  162. import Decimal from 'decimal.js';
  163. export default {
  164. data() {
  165. return {
  166. availableAmount: 0, //可用金额
  167. loadingShow: true, //加载
  168. loadingText: '加载中', //加载提示文字
  169. vehicleTaxIsExpanded: false, //明细 展开收起
  170. // 位置信息
  171. location: {
  172. cityName: "",
  173. },
  174. benefitPackageList: [], //权益套餐列表
  175. privilegeItem: [], //权益单品列表
  176. // 页面初始化查询信息
  177. queryInfo: {
  178. countryAll: "", //省市区
  179. minPrice: 0,
  180. maxPrice: 1000,
  181. sortType: 0, //排序 0 默认 1低价 2高价
  182. pageNo: 1,
  183. pageSize: 20,
  184. },
  185. addressPickershow: false, //省市区组件
  186. mask: true, //点遮罩关闭
  187. borderBottom: true,
  188. activeColor: '#333', //下拉菜单选中激活项
  189. doubleResult: null,
  190. singleResult: null,
  191. statusCurrent: 1, //状态tabs切换
  192. statusList: [{
  193. name: "权益套餐",
  194. },
  195. {
  196. name: "权益单品",
  197. },
  198. ],
  199. // 排序
  200. sortOrderOptions: [{
  201. label: '默认排序',
  202. value: 0,
  203. },
  204. {
  205. label: '低价优先',
  206. value: 1,
  207. },
  208. {
  209. label: '高价优先',
  210. value: 2,
  211. }
  212. ],
  213. priceRangeName: "", //区间选中
  214. // 价格区间列表
  215. priceRangeOptions: [{
  216. label: "100元以下",
  217. value: [0, 100]
  218. },
  219. {
  220. label: "100-200元",
  221. value: [100, 200]
  222. },
  223. {
  224. label: "200-300元",
  225. value: [200, 300]
  226. },
  227. {
  228. label: "300-400元",
  229. value: [300, 400]
  230. },
  231. {
  232. label: "400-500元",
  233. value: [400, 500]
  234. },
  235. {
  236. label: "500-1000元",
  237. value: [500, 1000]
  238. },
  239. ],
  240. }
  241. },
  242. onShow() {
  243. },
  244. async onLoad(options) {
  245. this.loadingShow = true;
  246. try {
  247. if (options) {
  248. // this.availableAmount = options.availableAmount;
  249. }
  250. // 获取定位城市信息
  251. const locationData = await LocationService.initLocation();
  252. if (locationData.provinceCode) {
  253. this.queryInfo.countryAll =
  254. `${locationData.provinceCode},${locationData.cityCode},${locationData.districtCode}`; //
  255. this.location.cityName =
  256. `${locationData.provinceName}-${locationData.cityName}-${locationData.districtName}`;
  257. }
  258. await this.getbenefitPackageList(); //权益套餐列表
  259. await this.getprivilegeItem(); //权益单品列表
  260. this.loadingShow = false;
  261. } catch (error) {
  262. this.loadingShow = false;
  263. }
  264. },
  265. computed: {
  266. selectedCount() {
  267. const total = this.benefitPackageList.reduce(
  268. (sum, item) => sum.plus(new Decimal(item.rightsCount)),
  269. new Decimal(0)
  270. );
  271. const sum = new Decimal(total);
  272. return sum.toString();
  273. },
  274. //选中售价总和
  275. totalPriceCount() {
  276. const total = this.benefitPackageList.reduce(
  277. (sum, item) => {
  278. // 计算当前项的 packagePrice * quantity(高精度乘法)
  279. const itemTotal = new Decimal(item.packagePrice).times(new Decimal(item.rightsCount));
  280. // 累加到总和
  281. return sum.plus(itemTotal);
  282. },
  283. new Decimal(0) // 初始值
  284. );
  285. const sum = new Decimal(total);
  286. return sum.toString(); // 返回字符串
  287. },
  288. //选中市场价总和
  289. totalMarketPriceCount() {
  290. const total = this.benefitPackageList.reduce(
  291. (sum, item) => {
  292. // 计算当前项的 packagePrice * quantity(高精度乘法)
  293. const itemTotal = new Decimal(item.totalPackagePrice).times(new Decimal(item.rightsCount));
  294. // 累加到总和
  295. return sum.plus(itemTotal);
  296. },
  297. new Decimal(0) // 初始值
  298. );
  299. const sum = new Decimal(total);
  300. return sum.toString(); // 返回字符串
  301. }
  302. },
  303. methods: {
  304. // 权益数量变化监听
  305. onRightsCountChange(e, index, name, field) {
  306. // 获取当前项
  307. const item = this[name][index];
  308. // 获取当前数量和新数量
  309. const currentCount = item.rightsCount;
  310. const newCount = e.value;
  311. // 计算价格
  312. const price = parseFloat(item[field]);
  313. // 计算当前总价
  314. const currentTotalPrice = parseFloat(this.totalPriceCount);
  315. // 计算数量变化和价格变化
  316. const countChange = newCount - currentCount;
  317. const priceChange = countChange * price;
  318. // 计算新总价
  319. const newTotalPrice = currentTotalPrice + priceChange;
  320. // 如果是增加数量,检查是否超过可用金额
  321. if (countChange > 0 && newTotalPrice > this.availableAmount) {
  322. uni.showToast({
  323. title: `权益总价不能超过可用金额${this.availableAmount}元`,
  324. icon: 'none'
  325. });
  326. } else {
  327. // 无论是减少数量还是增加数量且未超过限制,都允许更新
  328. item.rightsCount = newCount;
  329. }
  330. },
  331. // 确认选择
  332. async userRightsSubmit() {
  333. // 验证是否有选择权益
  334. if (parseInt(this.selectedCount) === 0) {
  335. uni.showToast({
  336. title: '请至少选择一项权益',
  337. icon: 'none'
  338. });
  339. return;
  340. }
  341. // 收集选择的权益套餐
  342. const selectedPackages = this.benefitPackageList
  343. .filter(item => item.rightsCount > 0)
  344. let pages = getCurrentPages(); //获取所有页面栈实例列表
  345. let prevPage = pages[pages.length - 2]; //上一页页面实例
  346. prevPage.$vm.insOrderRightsPackageList = selectedPackages; //选中权益列表
  347. uni.navigateBack({ //uni.navigateTo跳转的返回,默认1为返回上一级
  348. delta: 1
  349. });
  350. },
  351. //获取权益套餐列表
  352. async getbenefitPackageList() {
  353. let res = await this.$http.post('/rightsGrant/package/list', this.queryInfo);
  354. if (res.code == 200) {
  355. res.data.records.map(val => {
  356. val.vehicleTaxIsExpanded = false;
  357. return val;
  358. })
  359. this.benefitPackageList = res.data.records;
  360. }
  361. },
  362. // 获取权益明细
  363. async rightsDetails(item, index) {
  364. if (!item.rightsDetailsList) {
  365. let res = await this.$http.get(`/rightsGrant/package/detail/${item.id}`);
  366. if (res.code == 200) {
  367. this.benefitPackageList[index].rightsDetailsList = res.data; //群益明细赋值对应套餐
  368. this.benefitPackageList[index].vehicleTaxIsExpanded = !this.benefitPackageList[index]
  369. .vehicleTaxIsExpanded; //展开收起
  370. }
  371. } else {
  372. this.benefitPackageList[index].vehicleTaxIsExpanded = !this.benefitPackageList[index]
  373. .vehicleTaxIsExpanded; //展开收起
  374. }
  375. },
  376. // 省市区选择回调
  377. async addressConfirm(e) {
  378. this.queryInfo.countryAll = e.codes.join(',') || "";
  379. this.location.cityName = e.fullAddress;
  380. this.addressPickershow = false;
  381. this.$refs.uDropdown.close();
  382. await this.getbenefitPackageList();
  383. },
  384. // 查看明细
  385. detailClick() {
  386. },
  387. async querySearch() {
  388. console.log(this.statusCurrent);
  389. this.$refs.uDropdown.close();
  390. await this.getbenefitPackageList();
  391. },
  392. //清空价格区间
  393. async clearForm() {
  394. this.queryInfo.minPrice = 0;
  395. this.queryInfo.maxPrice = 1000;
  396. this.priceRangeName = "";
  397. this.$refs.uDropdown.close();
  398. await this.getbenefitPackageList();
  399. },
  400. filterCriteriaClick(item) {
  401. this.priceRangeName = item.label;
  402. this.queryInfo.minPrice = item.value[0];
  403. this.queryInfo.maxPrice = item.value[1];
  404. },
  405. //排序选择
  406. async sortItem(value) {
  407. this.queryInfo.sortType = value;
  408. this.$refs.uDropdown.close();
  409. await this.getbenefitPackageList();
  410. },
  411. // 价格区间选择
  412. onChange(values) {
  413. this.queryInfo.minPrice = values[0];
  414. this.queryInfo.maxPrice = values[1];
  415. },
  416. // 下拉菜单选项事件
  417. menuClick(value) {
  418. if (value == 0) {
  419. this.addressPickershow = true;
  420. }
  421. },
  422. onEnd(event) {
  423. console.log('最终选择:', event.values);
  424. },
  425. areaCascadeClose() {
  426. this.addressPickershow = false;
  427. this.$refs.uDropdown.close();
  428. },
  429. }
  430. }
  431. </script>
  432. <style lang="scss" scoped>
  433. page {
  434. background-color: #F8F8F8;
  435. height: 100vh;
  436. }
  437. .container {
  438. padding: 20rpx;
  439. }
  440. .dropdown-title {
  441. font-size: 32rpx;
  442. color: #333;
  443. }
  444. .reward-tabs {
  445. margin-right: 48rpx;
  446. flex: 1;
  447. }
  448. /* 自定义tab滑块样式 */
  449. ::v-deep .u-tabs__wrapper__nav__line {
  450. background-color: transparent !important;
  451. font-size: 30px;
  452. }
  453. ::v-deep .u-tabs__wrapper__nav__item__text {
  454. font-size: 32rpx;
  455. }
  456. .slotArea {
  457. background-color: #FFFFFF;
  458. border-top: 1rpx solid #eee;
  459. .slider-header {
  460. text:first-child {
  461. font-size: 30rpx;
  462. color: #333;
  463. font-weight: bold;
  464. }
  465. text:last-child {
  466. font-size: 28rpx;
  467. color: #333;
  468. }
  469. }
  470. .slider-btn {
  471. background: #FFFFFF;
  472. border-radius: 0rpx 0rpx 20rpx 20rpx;
  473. border-top: 1rpx solid #EEEEEE;
  474. padding: 30rpx 44rpx;
  475. box-sizing: border-box;
  476. .btn {
  477. padding: 18rpx 30rpx;
  478. box-sizing: border-box;
  479. width: 50%;
  480. border-radius: 50rpx 50rpx 50rpx 50rpx;
  481. border: 1rpx solid #FDE935;
  482. font-size: 30rpx;
  483. color: #333;
  484. }
  485. .btns {
  486. width: 50%;
  487. background: #FDE935;
  488. border-radius: 50rpx 50rpx 50rpx 50rpx;
  489. }
  490. }
  491. .sort {
  492. padding: 30rpx;
  493. box-sizing: border-box;
  494. display: grid;
  495. grid-template-columns: repeat(1, 1fr);
  496. grid-template-rows: auto;
  497. row-gap: 30rpx;
  498. .item {
  499. text {
  500. font-size: 30rpx;
  501. color: #333;
  502. }
  503. .slice {
  504. margin-left: auto;
  505. width: 32rpx;
  506. height: 32rpx;
  507. background: #FDE935;
  508. border-radius: 20rpx 20rpx 20rpx 20rpx;
  509. }
  510. }
  511. .sort-active {
  512. font-weight: bold;
  513. }
  514. }
  515. .item-box {
  516. margin-bottom: 50rpx;
  517. display: flex;
  518. flex-wrap: wrap;
  519. justify-content: space-between;
  520. .item {
  521. border: 1px solid #f2f2f2;
  522. color: #333;
  523. padding: 8rpx 40rpx;
  524. border-radius: 100rpx;
  525. margin-top: 30rpx;
  526. }
  527. .active {
  528. color: #FFFFFF;
  529. background-color: #000;
  530. }
  531. }
  532. .options {
  533. display: grid;
  534. /* 启用网格布局 */
  535. grid-template-columns: repeat(3, 1fr);
  536. /* 3 列,每列等宽 */
  537. grid-template-rows: auto;
  538. /* 行高自适应 */
  539. row-gap: 30rpx;
  540. /* 只设置行间距(上下) */
  541. column-gap: 20rpx;
  542. /* 列间距设为 0(可选) */
  543. }
  544. .options-card {
  545. padding: 11rpx 24rpx;
  546. box-sizing: border-box;
  547. border-radius: 4rpx 4rpx 4rpx 4rpx;
  548. border: 1rpx solid #EEEEEE;
  549. font-size: 28rpx;
  550. color: #666;
  551. }
  552. .active {
  553. background-color: rgba(253, 233, 53, 0.2);
  554. border: 1rpx solid #FDE935;
  555. color: #333;
  556. }
  557. }
  558. .content-body {
  559. padding: 20rpx 30rpx 166rpx;
  560. box-sizing: border-box;
  561. position: relative;
  562. .view-card {
  563. background-color: #fff;
  564. border-radius: 10rpx;
  565. margin-bottom: 20rpx;
  566. .view-header {
  567. padding: 25rpx 30rpx;
  568. box-sizing: border-box;
  569. .image {
  570. width: 136rpx;
  571. height: 136rpx;
  572. border-radius: 10rpx;
  573. flex-shrink: 0;
  574. margin-right: 20rpx;
  575. }
  576. .content {
  577. flex: 1;
  578. min-width: 0;
  579. line-height: 1;
  580. .sum {
  581. text {
  582. font-size: 24rpx;
  583. color: #666;
  584. }
  585. }
  586. .plice {
  587. font-size: 30rpx;
  588. color: #FF540A;
  589. font-weight: bold;
  590. line-height: 1;
  591. }
  592. .Detail {
  593. font-size: 26rpx;
  594. color: #FFAC1D;
  595. line-height: 1.4;
  596. text {
  597. margin-right: 5rpx;
  598. }
  599. }
  600. }
  601. }
  602. .Detail-list {
  603. padding: 0 30rpx 25rpx;
  604. box-sizing: border-box;
  605. .view {
  606. background-color: #f8f8f8;
  607. border-radius: 6rpx;
  608. padding: 10rpx 20rpx;
  609. .view-header {
  610. padding: 20rpx 0;
  611. box-sizing: border-box;
  612. border-bottom: 1rpx solid #eee;
  613. }
  614. .view-header:last-child {
  615. border-bottom: none;
  616. }
  617. }
  618. }
  619. }
  620. }
  621. // 步进器自定义样式
  622. .numberBoxMinus {
  623. width: 32rpx;
  624. height: 32rpx;
  625. border-radius: 20rpx 20rpx 20rpx 20rpx;
  626. border: 1rpx solid #FDE935;
  627. }
  628. .numberBoxInput {
  629. font-size: 30rpx;
  630. color: #333;
  631. padding: 0 20rpx;
  632. box-sizing: border-box;
  633. text-align: center;
  634. }
  635. .numberBoxPlus {
  636. width: 32rpx;
  637. height: 32rpx;
  638. border-radius: 20rpx 20rpx 20rpx 20rpx;
  639. background-color: #FDE935;
  640. border: 1rpx solid #FDE935;
  641. }
  642. .footer {
  643. position: fixed;
  644. bottom: 0;
  645. left: 0;
  646. right: 0;
  647. padding: 25rpx 30rpx 55rpx;
  648. box-sizing: border-box;
  649. background: linear-gradient(0deg, #FFFFFF 0%, rgba(255, 254, 245, 0.7) 100%);
  650. border-radius: 0rpx 0rpx 0rpx 0rpx;
  651. backdrop-filter: blur(12rpx);
  652. .icon-view {
  653. margin-right: 30rpx;
  654. >view {
  655. position: relative;
  656. image {
  657. width: 48rpx;
  658. height: 48rpx;
  659. }
  660. }
  661. text {
  662. font-size: 20rpx;
  663. color: #333;
  664. }
  665. }
  666. .price {
  667. text:nth-child(1) {
  668. font-size: 28rpx;
  669. color: #FF540A;
  670. }
  671. text:nth-child(2) {
  672. font-size: 42rpx;
  673. color: #FF540A;
  674. }
  675. }
  676. .marketPrice {
  677. font-size: 20rpx;
  678. color: #999;
  679. letter-spacing: 1rpx;
  680. margin-left: 4rpx;
  681. }
  682. .footer-btn {
  683. padding: 20rpx 68rpx;
  684. box-sizing: border-box;
  685. background: #FDE935;
  686. border-radius: 58rpx 58rpx 58rpx 58rpx;
  687. font-size: 36rpx;
  688. color: #1F1F1F;
  689. font-weight: bold;
  690. margin-left: auto;
  691. }
  692. }
  693. .tabView {
  694. padding: 20rpx 0;
  695. box-sizing: border-box;
  696. background-color: #fff;
  697. }
  698. .u-empty {
  699. position: absolute;
  700. top: 50%;
  701. left: 50%;
  702. transform: translate(-50%, -50%);
  703. /* 反向偏移自身宽高的50% */
  704. }
  705. </style>