benefitPackage.vue 20 KB

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