benefitPackage.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781
  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" @click="details(DetailsItem)">
  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: 500, //可用金额
  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. details(item) {
  305. // uni.navigateTo({
  306. // url: '/pages/reward/locationFilter?id=' + item.id,
  307. // })
  308. },
  309. // 权益数量变化监听
  310. onRightsCountChange(e, index, name, field) {
  311. // 获取当前项
  312. const item = this[name][index];
  313. // 获取当前数量和新数量
  314. const currentCount = item.rightsCount;
  315. const newCount = e.value;
  316. // 计算价格
  317. const price = parseFloat(item[field]);
  318. // 计算当前总价
  319. const currentTotalPrice = parseFloat(this.totalPriceCount);
  320. // 计算数量变化和价格变化
  321. const countChange = newCount - currentCount;
  322. const priceChange = countChange * price;
  323. // 计算新总价
  324. const newTotalPrice = currentTotalPrice + priceChange;
  325. // 如果是增加数量,检查是否超过可用金额
  326. if (countChange > 0 && newTotalPrice > this.availableAmount) {
  327. uni.showToast({
  328. title: `权益总价不能超过可用金额${this.availableAmount}元`,
  329. icon: 'none'
  330. });
  331. } else {
  332. // 无论是减少数量还是增加数量且未超过限制,都允许更新
  333. item.rightsCount = newCount;
  334. }
  335. },
  336. // 确认选择
  337. async userRightsSubmit() {
  338. // 验证是否有选择权益
  339. if (parseInt(this.selectedCount) === 0) {
  340. uni.showToast({
  341. title: '请至少选择一项权益',
  342. icon: 'none'
  343. });
  344. return;
  345. }
  346. // 收集选择的权益套餐
  347. const selectedPackages = this.benefitPackageList
  348. .filter(item => item.rightsCount > 0)
  349. let pages = getCurrentPages(); //获取所有页面栈实例列表
  350. let prevPage = pages[pages.length - 2]; //上一页页面实例
  351. prevPage.$vm.insOrderRightsPackageList = selectedPackages; //选中权益列表
  352. uni.navigateBack({ //uni.navigateTo跳转的返回,默认1为返回上一级
  353. delta: 1
  354. });
  355. },
  356. //获取权益套餐列表
  357. async getbenefitPackageList() {
  358. let res = await this.$http.post('/rightsGrant/package/list', this.queryInfo);
  359. if (res.code == 200) {
  360. res.data.records.map(val => {
  361. val.vehicleTaxIsExpanded = false;
  362. return val;
  363. })
  364. this.benefitPackageList = res.data.records;
  365. }
  366. },
  367. // 获取权益明细
  368. async rightsDetails(item, index) {
  369. if (!item.rightsDetailsList) {
  370. let res = await this.$http.get(`/rightsGrant/package/detail/${item.id}`);
  371. if (res.code == 200) {
  372. this.benefitPackageList[index].rightsDetailsList = res.data; //群益明细赋值对应套餐
  373. this.benefitPackageList[index].vehicleTaxIsExpanded = !this.benefitPackageList[index]
  374. .vehicleTaxIsExpanded; //展开收起
  375. }
  376. } else {
  377. this.benefitPackageList[index].vehicleTaxIsExpanded = !this.benefitPackageList[index]
  378. .vehicleTaxIsExpanded; //展开收起
  379. }
  380. },
  381. // 省市区选择回调
  382. async addressConfirm(e) {
  383. this.queryInfo.countryAll = e.codes.join(',') || "";
  384. this.location.cityName = e.fullAddress;
  385. this.addressPickershow = false;
  386. this.$refs.uDropdown.close();
  387. await this.getbenefitPackageList();
  388. },
  389. // 查看明细
  390. detailClick() {
  391. },
  392. async querySearch() {
  393. console.log(this.statusCurrent);
  394. this.$refs.uDropdown.close();
  395. await this.getbenefitPackageList();
  396. },
  397. //清空价格区间
  398. async clearForm() {
  399. this.queryInfo.minPrice = 0;
  400. this.queryInfo.maxPrice = 1000;
  401. this.priceRangeName = "";
  402. this.$refs.uDropdown.close();
  403. await this.getbenefitPackageList();
  404. },
  405. filterCriteriaClick(item) {
  406. this.priceRangeName = item.label;
  407. this.queryInfo.minPrice = item.value[0];
  408. this.queryInfo.maxPrice = item.value[1];
  409. },
  410. //排序选择
  411. async sortItem(value) {
  412. this.queryInfo.sortType = value;
  413. this.$refs.uDropdown.close();
  414. await this.getbenefitPackageList();
  415. },
  416. // 价格区间选择
  417. onChange(values) {
  418. this.queryInfo.minPrice = values[0];
  419. this.queryInfo.maxPrice = values[1];
  420. },
  421. // 下拉菜单选项事件
  422. menuClick(value) {
  423. if (value == 0) {
  424. this.addressPickershow = true;
  425. }
  426. },
  427. onEnd(event) {
  428. console.log('最终选择:', event.values);
  429. },
  430. areaCascadeClose() {
  431. this.addressPickershow = false;
  432. this.$refs.uDropdown.close();
  433. },
  434. }
  435. }
  436. </script>
  437. <style lang="scss" scoped>
  438. page {
  439. background-color: #F8F8F8;
  440. height: 100vh;
  441. }
  442. .container {
  443. padding: 20rpx;
  444. }
  445. .dropdown-title {
  446. font-size: 32rpx;
  447. color: #333;
  448. }
  449. .reward-tabs {
  450. margin-right: 48rpx;
  451. flex: 1;
  452. }
  453. /* 自定义tab滑块样式 */
  454. ::v-deep .u-tabs__wrapper__nav__line {
  455. background-color: transparent !important;
  456. font-size: 30px;
  457. }
  458. ::v-deep .u-tabs__wrapper__nav__item__text {
  459. font-size: 32rpx;
  460. }
  461. .slotArea {
  462. background-color: #FFFFFF;
  463. border-top: 1rpx solid #eee;
  464. .slider-header {
  465. text:first-child {
  466. font-size: 30rpx;
  467. color: #333;
  468. font-weight: bold;
  469. }
  470. text:last-child {
  471. font-size: 28rpx;
  472. color: #333;
  473. }
  474. }
  475. .slider-btn {
  476. background: #FFFFFF;
  477. border-radius: 0rpx 0rpx 20rpx 20rpx;
  478. border-top: 1rpx solid #EEEEEE;
  479. padding: 30rpx 44rpx;
  480. box-sizing: border-box;
  481. .btn {
  482. padding: 18rpx 30rpx;
  483. box-sizing: border-box;
  484. width: 50%;
  485. border-radius: 50rpx 50rpx 50rpx 50rpx;
  486. border: 1rpx solid #FDE935;
  487. font-size: 30rpx;
  488. color: #333;
  489. }
  490. .btns {
  491. width: 50%;
  492. background: #FDE935;
  493. border-radius: 50rpx 50rpx 50rpx 50rpx;
  494. }
  495. }
  496. .sort {
  497. padding: 30rpx;
  498. box-sizing: border-box;
  499. display: grid;
  500. grid-template-columns: repeat(1, 1fr);
  501. grid-template-rows: auto;
  502. row-gap: 30rpx;
  503. .item {
  504. text {
  505. font-size: 30rpx;
  506. color: #333;
  507. }
  508. .slice {
  509. margin-left: auto;
  510. width: 32rpx;
  511. height: 32rpx;
  512. background: #FDE935;
  513. border-radius: 20rpx 20rpx 20rpx 20rpx;
  514. }
  515. }
  516. .sort-active {
  517. font-weight: bold;
  518. }
  519. }
  520. .item-box {
  521. margin-bottom: 50rpx;
  522. display: flex;
  523. flex-wrap: wrap;
  524. justify-content: space-between;
  525. .item {
  526. border: 1px solid #f2f2f2;
  527. color: #333;
  528. padding: 8rpx 40rpx;
  529. border-radius: 100rpx;
  530. margin-top: 30rpx;
  531. }
  532. .active {
  533. color: #FFFFFF;
  534. background-color: #000;
  535. }
  536. }
  537. .options {
  538. display: grid;
  539. /* 启用网格布局 */
  540. grid-template-columns: repeat(3, 1fr);
  541. /* 3 列,每列等宽 */
  542. grid-template-rows: auto;
  543. /* 行高自适应 */
  544. row-gap: 30rpx;
  545. /* 只设置行间距(上下) */
  546. column-gap: 20rpx;
  547. /* 列间距设为 0(可选) */
  548. }
  549. .options-card {
  550. padding: 11rpx 24rpx;
  551. box-sizing: border-box;
  552. border-radius: 4rpx 4rpx 4rpx 4rpx;
  553. border: 1rpx solid #EEEEEE;
  554. font-size: 28rpx;
  555. color: #666;
  556. }
  557. .active {
  558. background-color: rgba(253, 233, 53, 0.2);
  559. border: 1rpx solid #FDE935;
  560. color: #333;
  561. }
  562. }
  563. .content-body {
  564. padding: 20rpx 30rpx 166rpx;
  565. box-sizing: border-box;
  566. position: relative;
  567. .view-card {
  568. background-color: #fff;
  569. border-radius: 10rpx;
  570. margin-bottom: 20rpx;
  571. .view-header {
  572. padding: 25rpx 30rpx;
  573. box-sizing: border-box;
  574. .image {
  575. width: 136rpx;
  576. height: 136rpx;
  577. border-radius: 10rpx;
  578. flex-shrink: 0;
  579. margin-right: 20rpx;
  580. }
  581. .content {
  582. flex: 1;
  583. min-width: 0;
  584. line-height: 1;
  585. .sum {
  586. text {
  587. font-size: 24rpx;
  588. color: #666;
  589. }
  590. }
  591. .plice {
  592. font-size: 30rpx;
  593. color: #FF540A;
  594. font-weight: bold;
  595. line-height: 1;
  596. }
  597. .Detail {
  598. font-size: 26rpx;
  599. color: #FFAC1D;
  600. line-height: 1.4;
  601. text {
  602. margin-right: 5rpx;
  603. }
  604. }
  605. }
  606. }
  607. .Detail-list {
  608. padding: 0 30rpx 25rpx;
  609. box-sizing: border-box;
  610. .view {
  611. background-color: #f8f8f8;
  612. border-radius: 6rpx;
  613. padding: 10rpx 20rpx;
  614. .view-header {
  615. padding: 20rpx 0;
  616. box-sizing: border-box;
  617. border-bottom: 1rpx solid #eee;
  618. }
  619. .view-header:last-child {
  620. border-bottom: none;
  621. }
  622. }
  623. }
  624. }
  625. }
  626. // 步进器自定义样式
  627. .numberBoxMinus {
  628. width: 32rpx;
  629. height: 32rpx;
  630. border-radius: 20rpx 20rpx 20rpx 20rpx;
  631. border: 1rpx solid #FDE935;
  632. }
  633. .numberBoxInput {
  634. font-size: 30rpx;
  635. color: #333;
  636. padding: 0 20rpx;
  637. box-sizing: border-box;
  638. text-align: center;
  639. }
  640. .numberBoxPlus {
  641. width: 32rpx;
  642. height: 32rpx;
  643. border-radius: 20rpx 20rpx 20rpx 20rpx;
  644. background-color: #FDE935;
  645. border: 1rpx solid #FDE935;
  646. }
  647. .footer {
  648. position: fixed;
  649. bottom: 0;
  650. left: 0;
  651. right: 0;
  652. padding: 25rpx 30rpx 55rpx;
  653. box-sizing: border-box;
  654. background: linear-gradient(0deg, #FFFFFF 0%, rgba(255, 254, 245, 0.7) 100%);
  655. border-radius: 0rpx 0rpx 0rpx 0rpx;
  656. backdrop-filter: blur(12rpx);
  657. .icon-view {
  658. margin-right: 30rpx;
  659. >view {
  660. position: relative;
  661. image {
  662. width: 48rpx;
  663. height: 48rpx;
  664. }
  665. }
  666. text {
  667. font-size: 20rpx;
  668. color: #333;
  669. }
  670. }
  671. .price {
  672. text:nth-child(1) {
  673. font-size: 28rpx;
  674. color: #FF540A;
  675. }
  676. text:nth-child(2) {
  677. font-size: 42rpx;
  678. color: #FF540A;
  679. }
  680. }
  681. .marketPrice {
  682. font-size: 20rpx;
  683. color: #999;
  684. letter-spacing: 1rpx;
  685. margin-left: 4rpx;
  686. }
  687. .footer-btn {
  688. padding: 20rpx 68rpx;
  689. box-sizing: border-box;
  690. background: #FDE935;
  691. border-radius: 58rpx 58rpx 58rpx 58rpx;
  692. font-size: 36rpx;
  693. color: #1F1F1F;
  694. font-weight: bold;
  695. margin-left: auto;
  696. }
  697. }
  698. .tabView {
  699. padding: 20rpx 0;
  700. box-sizing: border-box;
  701. background-color: #fff;
  702. }
  703. .u-empty {
  704. position: absolute;
  705. top: 50%;
  706. left: 50%;
  707. transform: translate(-50%, -50%);
  708. /* 反向偏移自身宽高的50% */
  709. }
  710. </style>