confirmCreateOrder.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803
  1. <template>
  2. <view>
  3. <view class="inner-box">
  4. <!-- 收货人 -->
  5. <view class="address-box" v-if="address==null" @click="openAddress()">
  6. <view class="left">
  7. <view class="name-box">
  8. <text class="text name">添加收货地址</text>
  9. </view>
  10. </view>
  11. <view class="arrow-box">
  12. <image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/arrow_gray.png"
  13. mode=""></image>
  14. </view>
  15. </view>
  16. <view class="address-box" v-if="address!=null" @click="openAddress()">
  17. <view class="left">
  18. <view class="name-box">
  19. <text class="text name">{{address.realName}}</text>
  20. <text class="text" v-if="address.phone!=null">{{address.phone}}</text>
  21. </view>
  22. <view class="address">
  23. {{address.province}}{{address.city}}{{address.district}}{{address.detail}}
  24. </view>
  25. </view>
  26. <view class="arrow-box">
  27. <image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/arrow_gray.png"
  28. mode=""></image>
  29. </view>
  30. </view>
  31. <!-- 积分 -->
  32. <view class="price-info">
  33. <view class="price-info-title">价格明细</view>
  34. <view class="points">
  35. <view class="left">
  36. <text class="text">商品总价</text>
  37. </view>
  38. <view class="right" style="align-items: baseline;">
  39. <text class="price-info-unit">¥</text>
  40. <text class="price-info-num">{{(orderData.totalPrice||0).toFixed(2)}}</text>
  41. </view>
  42. </view>
  43. <view class="points" @click="couponVisible = true;">
  44. <view class="left">
  45. <text class="text">优惠券</text>
  46. </view>
  47. <view class="right">
  48. <text class="text">{{couponText}}</text>
  49. <image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/arrow4.png"
  50. mode=""></image>
  51. </view>
  52. </view>
  53. <view class="points">
  54. <view class="left">
  55. <text class="text">运费</text>
  56. </view>
  57. <view class="right">
  58. <text class="text"
  59. v-if="address!=null">{{orderData.payDelivery==null||orderData.payDelivery==0?'免运费':orderData.payDelivery.toFixed(2)}}</text>
  60. <text class="text" v-if="address==null">--</text>
  61. </view>
  62. </view>
  63. <!-- 备注 -->
  64. <view class="remarks">
  65. <input type="text" v-model="orderData.remark" placeholder="备注留言(选填)" placeholder-class="input" />
  66. </view>
  67. <view class="points">
  68. <view class="left">
  69. <text class="text">合计</text>
  70. </view>
  71. <view class="right" style="align-items: baseline;">
  72. <text class="price-info-unit">¥</text>
  73. <text class="price-info-num">{{(orderData.payPrice||0).toFixed(2)}}</text>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. <view class="btn-foot">
  79. <view class="right">
  80. <view class="total">
  81. <text class="label">合计:</text>
  82. <view class="price">
  83. <text class="unit">¥</text>
  84. <text class="num">{{(orderData.payPrice||0).toFixed(2)}}</text>
  85. </view>
  86. </view>
  87. <view class="btn" @click="submitOrder">提交订单</view>
  88. </view>
  89. </view>
  90. <popupBottom ref="popup" :visible.sync="couponVisible" title=" " bgColor="#f5f5f5" radius="30" maxHeight="60%">
  91. <view class="coupon" style="height:650rpx;">
  92. <div class="coupon-list" v-if="couponsList.length > 0">
  93. <div class="item acea-row row-center-wrapper" v-for="(item, index) in couponsList" :key="index">
  94. <div class="money">
  95. <image v-if="item.status==0&&item.useMinPrice<=orderData.totalPrice" class="img"
  96. src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/coupon1.png"
  97. mode="widthFix"></image>
  98. <image v-if="item.status!=0||item.useMinPrice>orderData.totalPrice" class="img"
  99. src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/coupon2.png"
  100. mode="widthFix"></image>
  101. <div style="z-index: 999;">
  102. ¥<span class="num">{{ item.couponPrice }}</span>
  103. </div>
  104. <div class="pic-num">满{{ item.useMinPrice }}元可用</div>
  105. </div>
  106. <div class="text">
  107. <div class="condition line1">
  108. {{ item.couponTitle }}
  109. </div>
  110. <div class="data acea-row row-between-wrapper">
  111. <div>{{ item.limitTime }}到期</div>
  112. <div v-if=" item.status==0&&item.useMinPrice<=orderData.totalPrice"
  113. class="bnt bg-color-red" @click="couponSelect(item)">选择</div>
  114. <div v-else-if="item.status!=0" class="bnt " style="background-color: #878787;">已失效
  115. </div>
  116. <div v-else-if="item.useMinPrice>orderData.totalPrice" class="bnt "
  117. style="background-color: #878787;">未达门槛</div>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. <view v-if="couponsList.length == 0" class="no-data-box">
  123. <image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/no_data.png"
  124. mode="aspectFit"></image>
  125. <view class="empty-title">暂无数据</view>
  126. </view>
  127. </view>
  128. </popupBottom>
  129. </view>
  130. </template>
  131. <script>
  132. import {
  133. createliveOrder, // 创建订单
  134. createReward, // 创建中奖订单
  135. userAddr, // 获取用户收货地址
  136. computed,
  137. computedReward,
  138. liveOrderKey, // 生成订单key
  139. } from "@/api/order.js"
  140. import {
  141. curCoupon
  142. } from "@/api/living.js"
  143. import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
  144. export default {
  145. components: {
  146. popupBottom
  147. },
  148. data() {
  149. return {
  150. orderData: {
  151. totalPrice: null
  152. },
  153. cityId: null,
  154. address: null,
  155. addressId: null,
  156. totalNum: null,
  157. orderKey: null,
  158. goodsId: null,
  159. liveId: null,
  160. orderList: [],
  161. temps: [],
  162. couponUserId: null,
  163. couponText: "请选择",
  164. couponsList: [],
  165. couponVisible: false,
  166. carts: [],
  167. checked: false,
  168. cartIds: null,
  169. confirmParam: [],
  170. type: '',
  171. isFirstLoad: true,
  172. recordId: ''
  173. }
  174. },
  175. onLoad(options) {
  176. console.log("确认订单", options)
  177. this.orderKey = options.orderKey || '';
  178. this.liveId = options.liveId || '';
  179. this.goodsId = options.goodsId || '';
  180. this.productId = options.productId || '';
  181. this.totalNum = Number(options.totalNum) || 0;
  182. this.type = options.type;
  183. this.isFirstLoad = true;
  184. this.recordId = options.recordId || '';
  185. if (options.type == 'win') {
  186. this.getKey()
  187. }
  188. },
  189. onShow() {
  190. this.openCoupon()
  191. if (this.type == 'win') {
  192. this.computedRewardOrder()
  193. } else {
  194. this.computedOrder()
  195. }
  196. if(!this.cityId){
  197. this.getUserAddr()
  198. }
  199. // this.getUserAddr()
  200. uni.$on('updateAddress', (e) => {
  201. this.address = e;
  202. this.addressId = e.addressId;
  203. this.cityId = e.cityId;
  204. console.log("地址", e.cityId)
  205. });
  206. },
  207. mounted() {
  208. // uni.$on('updateAddress', (e) => {
  209. // this.address = e;
  210. // this.addressId = e.addressId;
  211. // });
  212. },
  213. onUnload() {
  214. uni.$off('updateAddress', this.handleAddressUpdate);
  215. },
  216. beforeDestroy() {
  217. uni.$off('updateAddress');
  218. },
  219. methods: {
  220. handleAddressUpdate(item) {
  221. console.log('接收到地址数据:', item);
  222. this.cityId = item.cityId;
  223. this.address = item;
  224. this.addressId = item.addressId;
  225. if (this.type == 'win') {
  226. this.computedRewardOrder()
  227. } else {
  228. this.computedOrder()
  229. }
  230. },
  231. // 获取用户收货地址
  232. getUserAddr() {
  233. userAddr().then(res => {
  234. if (res.code == 200) {
  235. console.log("用户收货地址>>>>", res.data)
  236. if (res.data && !this.address) {
  237. this.address = res.data;
  238. }
  239. if (res.data && res.data.cityIds) {
  240. this.cityId = res.data.cityIds;
  241. }
  242. if (this.type == 'win') {
  243. this.computedRewardOrder()
  244. } else {
  245. this.computedOrder()
  246. }
  247. } else {
  248. uni.showToast({
  249. title: res.msg,
  250. icon: 'none'
  251. });
  252. }
  253. },
  254. rej => {}
  255. );
  256. },
  257. // 获得key
  258. getKey() {
  259. liveOrderKey().then(res => {
  260. if (res.code == 200) {
  261. this.orderKey = res.orderKey
  262. } else {
  263. uni.showToast({
  264. title: res.msg,
  265. icon: 'none'
  266. });
  267. }
  268. },
  269. rej => {}
  270. );
  271. },
  272. // 查询创建订单信息
  273. computedOrder() {
  274. let data = {
  275. cityId: this.cityId || '',
  276. totalNum: this.totalNum,
  277. productId: this.productId,
  278. orderKey: this.orderKey,
  279. couponUserId: this.couponUserId || ''
  280. }
  281. computed(data).then(res => {
  282. if (res.code == 200) {
  283. console.log("查询创建订单信息>>>>", res.data)
  284. this.orderData = res.data
  285. } else {
  286. uni.showToast({
  287. title: res.msg,
  288. icon: 'none'
  289. });
  290. }
  291. },
  292. rej => {}
  293. );
  294. },
  295. // 查询中奖创建订单信息
  296. computedRewardOrder() {
  297. let data = {
  298. cityId: this.cityId || '',
  299. productId: this.productId,
  300. orderKey: this.orderKey,
  301. totalNum: 1,
  302. remark:this.orderData.remark
  303. }
  304. computedReward(data).then(res => {
  305. if (res.code == 200) {
  306. console.log("查询创建订单信息>>>>", res.data)
  307. this.orderData = res.data || {}
  308. } else {
  309. uni.showToast({
  310. title: res.msg,
  311. icon: 'none'
  312. });
  313. }
  314. },
  315. rej => {}
  316. );
  317. },
  318. // 创建订单
  319. createLiveOrder() {
  320. let data = {
  321. cityId: this.cityId,
  322. liveId: this.liveId,
  323. orderKey: this.orderKey,
  324. userName: this.address.realName,
  325. remark:this.orderData.remark||'',
  326. userPhone: this.address.phone,
  327. userAddress: this.address.province + ' ' + this.address.city + ' ' + this.address.district + ' ' +
  328. this.address
  329. .detail,
  330. cartId: "5",
  331. productId: this.productId,
  332. totalNum: this.totalNum,
  333. couponUserId: this.couponUserId
  334. }
  335. return createliveOrder(data).then(res => {
  336. if (res.code == 200) {
  337. this.orderList = res.order;
  338. return res.order;
  339. } else {
  340. uni.showToast({
  341. title: res.msg,
  342. icon: 'none'
  343. });
  344. throw new Error(res.msg);
  345. }
  346. });
  347. },
  348. // 创建抽奖订单
  349. createRewardOrder() {
  350. let data = {
  351. cityId: this.cityId,
  352. liveId: this.liveId,
  353. orderKey: this.orderKey,
  354. userName: this.address.realName,
  355. userPhone: this.address.phone,
  356. userAddress: this.address.province + ' ' + this.address.city + ' ' + this.address.district + ' ' +
  357. this.address.detail,
  358. cartId: "5",
  359. remark:this.orderData.remark||'',
  360. productId: this.productId,
  361. totalNum: 1,
  362. couponUserId: this.couponUserId,
  363. recordId: this.recordId
  364. }
  365. return createReward(data).then(res => {
  366. if (res.code == 200) {
  367. this.orderList = res.order || {};
  368. return res.order || {};
  369. } else {
  370. uni.showToast({
  371. title: res.msg,
  372. icon: 'none'
  373. });
  374. throw new Error(res.msg);
  375. }
  376. });
  377. },
  378. couponSelect(item) {
  379. this.couponText = "-¥" + (item.couponPrice || 0).toFixed(2);
  380. this.couponUserId = item.id;
  381. this.couponVisible = false;
  382. if (this.type == 'win') {
  383. this.computedRewardOrder()
  384. } else {
  385. this.computedOrder()
  386. }
  387. },
  388. // 自动选择最大优惠券
  389. autoSelectMaxCoupon() {
  390. if (this.couponsList.length === 0 || !this.isFirstLoad) {
  391. return;
  392. }
  393. const availableCoupons = this.couponsList.filter(item =>
  394. item.status === 0 && item.useMinPrice <= (this.orderData.totalPrice || 0)
  395. );
  396. if (availableCoupons.length === 0) {
  397. return;
  398. }
  399. availableCoupons.sort((a, b) => b.couponPrice - a.couponPrice);
  400. const maxCoupon = availableCoupons[0];
  401. this.couponText = "-¥" + (maxCoupon.couponPrice || 0).toFixed(2);
  402. this.couponUserId = maxCoupon.id;
  403. console.log('自动选择最大优惠券:', maxCoupon);
  404. this.isFirstLoad = false;
  405. // 重新计算订单价格
  406. if (this.type == 'win') {
  407. this.computedRewardOrder()
  408. } else {
  409. this.computedOrder()
  410. }
  411. },
  412. openCoupon() {
  413. console.log("点了优惠券列表")
  414. if (!this.liveId || !this.goodsId) {
  415. console.log('缺少必要参数,跳过优惠券请求');
  416. return;
  417. }
  418. const data = {
  419. liveId: this.liveId,
  420. goodsId: this.goodsId
  421. };
  422. curCoupon(data).then(res => {
  423. this.couponsList = res.data || [];
  424. if (this.isFirstLoad) {
  425. setTimeout(() => {
  426. this.autoSelectMaxCoupon();
  427. }, 100);
  428. }
  429. })
  430. },
  431. openAddress() {
  432. uni.navigateTo({
  433. url: '/pages_user/user/address'
  434. })
  435. },
  436. // 提交订单
  437. async submitOrder() {
  438. try {
  439. if (this.orderKey == null) {
  440. uni.showToast({
  441. icon: 'none',
  442. title: '订单KEY不存在',
  443. });
  444. return;
  445. }
  446. if (this.address == null) {
  447. uni.showToast({
  448. icon: 'none',
  449. title: '收货地址不能为空',
  450. });
  451. return;
  452. }
  453. let orderList;
  454. if (this.type == "win") {
  455. orderList = await this.createRewardOrder(); // 中奖订单
  456. } else {
  457. orderList = await this.createLiveOrder(); // 购买订单
  458. }
  459. console.log("orderList>>", orderList)
  460. const orderListStr = encodeURIComponent(JSON.stringify(orderList));
  461. uni.navigateTo({
  462. url: `/pages_shopping/live/paymentOrder?orderList=${orderListStr}&couponUserId=${this.couponUserId}&type=${this.type}`
  463. });
  464. } catch (error) {
  465. console.error('提交订单错误:', error);
  466. uni.showToast({
  467. title: error.message || '提交订单失败',
  468. icon: 'none'
  469. });
  470. }
  471. },
  472. }
  473. }
  474. </script>
  475. <style lang="scss">
  476. .inner-box {
  477. padding: 20rpx 20rpx 140rpx;
  478. .address-box {
  479. margin-bottom: 20rpx;
  480. box-sizing: border-box;
  481. min-height: 171rpx;
  482. background: #FFFFFF;
  483. border-radius: 16rpx;
  484. background-repeat: no-repeat;
  485. background-size: 100% 30rpx;
  486. background-position: left bottom;
  487. padding: 38rpx 30rpx 36rpx;
  488. display: flex;
  489. align-items: center;
  490. justify-content: space-between;
  491. .left {
  492. width: 92%;
  493. .name-box {
  494. display: flex;
  495. align-items: center;
  496. .text {
  497. font-size: 32rpx;
  498. font-family: PingFang SC;
  499. font-weight: bold;
  500. color: #111111;
  501. line-height: 1;
  502. &.name {
  503. margin-right: 30rpx;
  504. }
  505. }
  506. }
  507. .address {
  508. font-size: 28rpx;
  509. font-family: PingFang SC;
  510. font-weight: 500;
  511. color: #666666;
  512. line-height: 42rpx;
  513. text-align: left;
  514. margin-top: 23rpx;
  515. }
  516. }
  517. .arrow-box {
  518. width: 12rpx;
  519. height: 23rpx;
  520. display: flex;
  521. align-items: cenetr;
  522. justify-content: cenetr;
  523. image {
  524. width: 100%;
  525. height: 100%;
  526. }
  527. }
  528. }
  529. .price-info {
  530. background: #FFFFFF;
  531. border-radius: 16rpx;
  532. &-title {
  533. padding: 30rpx 30rpx 20rpx 30rpx;
  534. font-family: PingFang SC, PingFang SC;
  535. font-weight: 500;
  536. font-size: 30rpx;
  537. color: #111;
  538. }
  539. &-unit {
  540. font-size: 24rpx;
  541. }
  542. &-num {
  543. font-size: 28rpx;
  544. }
  545. }
  546. .remarks {
  547. height: 88upx;
  548. padding: 0 30upx;
  549. background: #FFFFFF;
  550. border-radius: 16upx;
  551. margin-top: 20upx;
  552. display: flex;
  553. align-items: center;
  554. input {
  555. width: 100%;
  556. font-size: 28upx;
  557. font-family: PingFang SC;
  558. font-weight: 500;
  559. color: #000000;
  560. }
  561. .input {
  562. font-size: 28upx;
  563. font-family: PingFang SC;
  564. font-weight: 500;
  565. color: #999999;
  566. }
  567. }
  568. .points {
  569. height: 88rpx;
  570. padding: 0 30rpx;
  571. background: #FFFFFF;
  572. border-radius: 16rpx;
  573. display: flex;
  574. align-items: center;
  575. justify-content: space-between;
  576. .left {
  577. display: flex;
  578. align-items: center;
  579. image {
  580. width: 28rpx;
  581. height: 28rpx;
  582. margin-right: 20rpx;
  583. }
  584. .text {
  585. font-size: 28rpx;
  586. font-family: PingFang SC;
  587. font-weight: 500;
  588. color: #666666;
  589. }
  590. }
  591. .right {
  592. display: flex;
  593. align-items: center;
  594. .text {
  595. font-size: 28rpx;
  596. font-family: PingFang SC;
  597. font-weight: 500;
  598. color: #111111;
  599. }
  600. image {
  601. margin-left: 15rpx;
  602. width: 14rpx;
  603. height: 24rpx;
  604. }
  605. }
  606. }
  607. }
  608. .btn-foot {
  609. box-sizing: border-box;
  610. width: 100%;
  611. height: 121rpx;
  612. background: #FFFFFF;
  613. padding: 16rpx 30rpx 16rpx 60rpx;
  614. display: flex;
  615. align-items: center;
  616. justify-content: flex-end;
  617. position: fixed;
  618. left: 0;
  619. bottom: 0;
  620. z-index: 99;
  621. .right {
  622. display: flex;
  623. align-items: center;
  624. .total {
  625. display: flex;
  626. align-items: flex-end;
  627. margin-right: 36rpx;
  628. .label {
  629. font-size: 26rpx;
  630. font-family: PingFang SC;
  631. font-weight: 500;
  632. color: #999999;
  633. line-height: 1.5;
  634. }
  635. .price {
  636. display: flex;
  637. align-items: flex-end;
  638. .unit {
  639. font-size: 32rpx;
  640. font-family: PingFang SC;
  641. font-weight: bold;
  642. color: #FF6633;
  643. line-height: 1.2;
  644. margin-right: 10rpx;
  645. }
  646. .num {
  647. font-size: 50rpx;
  648. font-family: PingFang SC;
  649. font-weight: bold;
  650. color: #FF6633;
  651. line-height: 1;
  652. }
  653. }
  654. }
  655. .btn {
  656. width: 200rpx;
  657. height: 88rpx;
  658. line-height: 88rpx;
  659. text-align: center;
  660. font-size: 30rpx;
  661. font-family: PingFang SC;
  662. font-weight: bold;
  663. color: #FFFFFF;
  664. background: #2BC7B9;
  665. border-radius: 44rpx;
  666. }
  667. }
  668. }
  669. .coupon {
  670. height: 100%;
  671. }
  672. /*优惠券列表公共*/
  673. .coupon-list {}
  674. .coupon-list .item {
  675. display: flex;
  676. flex-direction: column;
  677. justify-content: center;
  678. align-items: center;
  679. width: 100%;
  680. height: 1.7 * 100rpx;
  681. margin-bottom: 0.16 * 100rpx;
  682. }
  683. .coupon-list .item .money {
  684. background-size: 100% 100%;
  685. width: 2.4 * 100rpx;
  686. height: 100%;
  687. color: #fff;
  688. font-size: 0.36 * 100rpx;
  689. font-weight: bold;
  690. text-align: center;
  691. display: flex;
  692. flex-direction: column;
  693. align-items: center;
  694. justify-content: center;
  695. position: relative;
  696. }
  697. .coupon-list .item .money .img {
  698. position: absolute;
  699. width: 2.4 * 100rpx;
  700. height: 100%;
  701. color: #fff;
  702. }
  703. .coupon-list .item .money .num {
  704. font-size: 0.6 * 100rpx;
  705. }
  706. .coupon-list .item .money .pic-num {
  707. font-size: 20rpx;
  708. z-index: 99;
  709. }
  710. .coupon-list .item .text {
  711. width: 4.5 * 100rpx;
  712. padding: 0 0.17 * 100rpx 0 0.24 * 100rpx;
  713. background-color: #fff;
  714. box-sizing: border-box;
  715. }
  716. .coupon-list .item .text .condition {
  717. font-size: 0.3 * 100rpx;
  718. color: #282828;
  719. height: 0.93 * 100rpx;
  720. line-height: 0.93 * 100rpx;
  721. border-bottom: 1px solid #f0f0f0;
  722. }
  723. .coupon-list .item .text .data {
  724. font-size: 0.2 * 100rpx;
  725. color: #999;
  726. height: 0.76 * 100rpx;
  727. }
  728. .coupon-list .item .text .data .bnt {
  729. width: 1.36 * 100rpx;
  730. height: 0.44 * 100rpx;
  731. border-radius: 0.22 * 100rpx;
  732. font-size: 0.22 * 100rpx;
  733. color: #fff;
  734. text-align: center;
  735. line-height: 0.44 * 100rpx;
  736. background-color: red;
  737. }
  738. </style>