confirmCreateOrder.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804
  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. productValueSelect:''
  174. }
  175. },
  176. onLoad(options) {
  177. console.log("确认订单", options)
  178. this.orderKey = options.orderKey || '';
  179. this.liveId = options.liveId || '';
  180. this.goodsId = options.goodsId || '';
  181. this.productId = options.productId || '';
  182. this.totalNum = Number(options.totalNum) || 0;
  183. this.type = options.type;
  184. this.isFirstLoad = true;
  185. this.recordId = options.recordId || '';
  186. this.productValueSelect=options.productValueSelect||''
  187. if (options.type == 'win') {
  188. this.getKey()
  189. }
  190. },
  191. onShow() {
  192. this.openCoupon()
  193. if (this.type == 'win') {
  194. this.computedRewardOrder()
  195. } else {
  196. this.computedOrder()
  197. }
  198. if(!this.cityId){
  199. this.getUserAddr()
  200. }
  201. // this.getUserAddr()
  202. uni.$on('updateAddress', (e) => {
  203. this.address = e;
  204. this.addressId = e.addressId;
  205. this.cityId = e.cityId;
  206. console.log("地址", e.cityId)
  207. });
  208. },
  209. mounted() {
  210. // uni.$on('updateAddress', (e) => {
  211. // this.address = e;
  212. // this.addressId = e.addressId;
  213. // });
  214. },
  215. onUnload() {
  216. uni.$off('updateAddress', this.handleAddressUpdate);
  217. },
  218. beforeDestroy() {
  219. uni.$off('updateAddress');
  220. },
  221. methods: {
  222. handleAddressUpdate(item) {
  223. console.log('接收到地址数据:', item);
  224. this.cityId = item.cityId;
  225. this.address = item;
  226. this.addressId = item.addressId;
  227. if (this.type == 'win') {
  228. this.computedRewardOrder()
  229. } else {
  230. this.computedOrder()
  231. }
  232. },
  233. // 获取用户收货地址
  234. getUserAddr() {
  235. userAddr().then(res => {
  236. if (res.code == 200) {
  237. console.log("用户收货地址>>>>", res.data)
  238. if (res.data && !this.address) {
  239. this.address = res.data;
  240. }
  241. if (res.data && res.data.cityIds) {
  242. this.cityId = res.data.cityIds;
  243. }
  244. if (this.type == 'win') {
  245. this.computedRewardOrder()
  246. } else {
  247. this.computedOrder()
  248. }
  249. } else {
  250. uni.showToast({
  251. title: res.msg,
  252. icon: 'none'
  253. });
  254. }
  255. },
  256. rej => {}
  257. );
  258. },
  259. // 获得key
  260. getKey() {
  261. liveOrderKey().then(res => {
  262. if (res.code == 200) {
  263. this.orderKey = res.orderKey
  264. } else {
  265. uni.showToast({
  266. title: res.msg,
  267. icon: 'none'
  268. });
  269. }
  270. },
  271. rej => {}
  272. );
  273. },
  274. // 查询创建订单信息
  275. computedOrder() {
  276. let data = {
  277. cityId: this.cityId || '',
  278. totalNum: this.totalNum,
  279. productId: this.productId,
  280. orderKey: this.orderKey,
  281. couponUserId: this.couponUserId || '',
  282. attrValueId:this.productValueSelect
  283. }
  284. computed(data).then(res => {
  285. if (res.code == 200) {
  286. console.log("查询创建订单信息>>>>", res.data)
  287. this.orderData = res.data
  288. } else {
  289. uni.showToast({
  290. title: res.msg,
  291. icon: 'none'
  292. });
  293. }
  294. },
  295. rej => {}
  296. );
  297. },
  298. // 查询中奖创建订单信息
  299. computedRewardOrder() {
  300. let data = {
  301. cityId: this.cityId || '',
  302. productId: this.productId,
  303. orderKey: this.orderKey,
  304. totalNum: 1,
  305. remark:this.orderData.remark
  306. }
  307. computedReward(data).then(res => {
  308. if (res.code == 200) {
  309. console.log("查询创建订单信息>>>>", res.data)
  310. this.orderData = res.data || {}
  311. } else {
  312. uni.showToast({
  313. title: res.msg,
  314. icon: 'none'
  315. });
  316. }
  317. },
  318. rej => {}
  319. );
  320. },
  321. // 创建订单
  322. createLiveOrder() {
  323. let data = {
  324. cityId: this.cityId,
  325. liveId: this.liveId,
  326. orderKey: this.orderKey,
  327. userName: this.address.realName,
  328. remark:this.orderData.remark||'',
  329. userPhone: this.address.phone,
  330. userAddress: this.address.province + ' ' + this.address.city + ' ' + this.address.district + ' ' +this.address.detail,
  331. cartId: "5",
  332. productId: this.productId,
  333. totalNum: this.totalNum,
  334. couponUserId: this.couponUserId,
  335. attrValueId:this.productValueSelect
  336. }
  337. return createliveOrder(data).then(res => {
  338. if (res.code == 200) {
  339. this.orderList = res.order;
  340. return res.order;
  341. } else {
  342. uni.showToast({
  343. title: res.msg,
  344. icon: 'none'
  345. });
  346. throw new Error(res.msg);
  347. }
  348. });
  349. },
  350. // 创建抽奖订单
  351. createRewardOrder() {
  352. let data = {
  353. cityId: this.cityId,
  354. liveId: this.liveId,
  355. orderKey: this.orderKey,
  356. userName: this.address.realName,
  357. userPhone: this.address.phone,
  358. userAddress: this.address.province + ' ' + this.address.city + ' ' + this.address.district + ' ' +
  359. this.address.detail,
  360. cartId: "5",
  361. remark:this.orderData.remark||'',
  362. productId: this.productId,
  363. totalNum: 1,
  364. couponUserId: this.couponUserId,
  365. recordId: this.recordId
  366. }
  367. return createReward(data).then(res => {
  368. if (res.code == 200) {
  369. this.orderList = res.order || {};
  370. return res.order || {};
  371. } else {
  372. uni.showToast({
  373. title: res.msg,
  374. icon: 'none'
  375. });
  376. throw new Error(res.msg);
  377. }
  378. });
  379. },
  380. couponSelect(item) {
  381. this.couponText = "-¥" + (item.couponPrice || 0).toFixed(2);
  382. this.couponUserId = item.id;
  383. this.couponVisible = false;
  384. if (this.type == 'win') {
  385. this.computedRewardOrder()
  386. } else {
  387. this.computedOrder()
  388. }
  389. },
  390. // 自动选择最大优惠券
  391. autoSelectMaxCoupon() {
  392. if (this.couponsList.length === 0 || !this.isFirstLoad) {
  393. return;
  394. }
  395. const availableCoupons = this.couponsList.filter(item =>
  396. item.status === 0 && item.useMinPrice <= (this.orderData.totalPrice || 0)
  397. );
  398. if (availableCoupons.length === 0) {
  399. return;
  400. }
  401. availableCoupons.sort((a, b) => b.couponPrice - a.couponPrice);
  402. const maxCoupon = availableCoupons[0];
  403. this.couponText = "-¥" + (maxCoupon.couponPrice || 0).toFixed(2);
  404. this.couponUserId = maxCoupon.id;
  405. console.log('自动选择最大优惠券:', maxCoupon);
  406. this.isFirstLoad = false;
  407. // 重新计算订单价格
  408. if (this.type == 'win') {
  409. this.computedRewardOrder()
  410. } else {
  411. this.computedOrder()
  412. }
  413. },
  414. openCoupon() {
  415. console.log("点了优惠券列表")
  416. if (!this.liveId || !this.goodsId) {
  417. console.log('缺少必要参数,跳过优惠券请求');
  418. return;
  419. }
  420. const data = {
  421. liveId: this.liveId,
  422. goodsId: this.goodsId
  423. };
  424. curCoupon(data).then(res => {
  425. this.couponsList = res.data || [];
  426. if (this.isFirstLoad) {
  427. setTimeout(() => {
  428. this.autoSelectMaxCoupon();
  429. }, 100);
  430. }
  431. })
  432. },
  433. openAddress() {
  434. uni.navigateTo({
  435. url: '/pages_user/user/address'
  436. })
  437. },
  438. // 提交订单
  439. async submitOrder() {
  440. try {
  441. if (this.orderKey == null) {
  442. uni.showToast({
  443. icon: 'none',
  444. title: '订单KEY不存在',
  445. });
  446. return;
  447. }
  448. if (this.address == null) {
  449. uni.showToast({
  450. icon: 'none',
  451. title: '收货地址不能为空',
  452. });
  453. return;
  454. }
  455. let orderList;
  456. if (this.type == "win") {
  457. orderList = await this.createRewardOrder(); // 中奖订单
  458. } else {
  459. orderList = await this.createLiveOrder(); // 购买订单
  460. }
  461. console.log("orderList>>", orderList)
  462. const orderListStr = encodeURIComponent(JSON.stringify(orderList));
  463. uni.navigateTo({
  464. url: `/pages_shopping/live/paymentOrder?orderList=${orderListStr}&couponUserId=${this.couponUserId}&type=${this.type}`
  465. });
  466. } catch (error) {
  467. console.error('提交订单错误:', error);
  468. uni.showToast({
  469. title: error.message || '提交订单失败',
  470. icon: 'none'
  471. });
  472. }
  473. },
  474. }
  475. }
  476. </script>
  477. <style lang="scss">
  478. .inner-box {
  479. padding: 20rpx 20rpx 140rpx;
  480. .address-box {
  481. margin-bottom: 20rpx;
  482. box-sizing: border-box;
  483. min-height: 171rpx;
  484. background: #FFFFFF;
  485. border-radius: 16rpx;
  486. background-repeat: no-repeat;
  487. background-size: 100% 30rpx;
  488. background-position: left bottom;
  489. padding: 38rpx 30rpx 36rpx;
  490. display: flex;
  491. align-items: center;
  492. justify-content: space-between;
  493. .left {
  494. width: 92%;
  495. .name-box {
  496. display: flex;
  497. align-items: center;
  498. .text {
  499. font-size: 32rpx;
  500. font-family: PingFang SC;
  501. font-weight: bold;
  502. color: #111111;
  503. line-height: 1;
  504. &.name {
  505. margin-right: 30rpx;
  506. }
  507. }
  508. }
  509. .address {
  510. font-size: 28rpx;
  511. font-family: PingFang SC;
  512. font-weight: 500;
  513. color: #666666;
  514. line-height: 42rpx;
  515. text-align: left;
  516. margin-top: 23rpx;
  517. }
  518. }
  519. .arrow-box {
  520. width: 12rpx;
  521. height: 23rpx;
  522. display: flex;
  523. align-items: cenetr;
  524. justify-content: cenetr;
  525. image {
  526. width: 100%;
  527. height: 100%;
  528. }
  529. }
  530. }
  531. .price-info {
  532. background: #FFFFFF;
  533. border-radius: 16rpx;
  534. &-title {
  535. padding: 30rpx 30rpx 20rpx 30rpx;
  536. font-family: PingFang SC, PingFang SC;
  537. font-weight: 500;
  538. font-size: 30rpx;
  539. color: #111;
  540. }
  541. &-unit {
  542. font-size: 24rpx;
  543. }
  544. &-num {
  545. font-size: 28rpx;
  546. }
  547. }
  548. .remarks {
  549. height: 88upx;
  550. padding: 0 30upx;
  551. background: #FFFFFF;
  552. border-radius: 16upx;
  553. margin-top: 20upx;
  554. display: flex;
  555. align-items: center;
  556. input {
  557. width: 100%;
  558. font-size: 28upx;
  559. font-family: PingFang SC;
  560. font-weight: 500;
  561. color: #000000;
  562. }
  563. .input {
  564. font-size: 28upx;
  565. font-family: PingFang SC;
  566. font-weight: 500;
  567. color: #999999;
  568. }
  569. }
  570. .points {
  571. height: 88rpx;
  572. padding: 0 30rpx;
  573. background: #FFFFFF;
  574. border-radius: 16rpx;
  575. display: flex;
  576. align-items: center;
  577. justify-content: space-between;
  578. .left {
  579. display: flex;
  580. align-items: center;
  581. image {
  582. width: 28rpx;
  583. height: 28rpx;
  584. margin-right: 20rpx;
  585. }
  586. .text {
  587. font-size: 28rpx;
  588. font-family: PingFang SC;
  589. font-weight: 500;
  590. color: #666666;
  591. }
  592. }
  593. .right {
  594. display: flex;
  595. align-items: center;
  596. .text {
  597. font-size: 28rpx;
  598. font-family: PingFang SC;
  599. font-weight: 500;
  600. color: #111111;
  601. }
  602. image {
  603. margin-left: 15rpx;
  604. width: 14rpx;
  605. height: 24rpx;
  606. }
  607. }
  608. }
  609. }
  610. .btn-foot {
  611. box-sizing: border-box;
  612. width: 100%;
  613. height: 121rpx;
  614. background: #FFFFFF;
  615. padding: 16rpx 30rpx 16rpx 60rpx;
  616. display: flex;
  617. align-items: center;
  618. justify-content: flex-end;
  619. position: fixed;
  620. left: 0;
  621. bottom: 0;
  622. z-index: 99;
  623. .right {
  624. display: flex;
  625. align-items: center;
  626. .total {
  627. display: flex;
  628. align-items: flex-end;
  629. margin-right: 36rpx;
  630. .label {
  631. font-size: 26rpx;
  632. font-family: PingFang SC;
  633. font-weight: 500;
  634. color: #999999;
  635. line-height: 1.5;
  636. }
  637. .price {
  638. display: flex;
  639. align-items: flex-end;
  640. .unit {
  641. font-size: 32rpx;
  642. font-family: PingFang SC;
  643. font-weight: bold;
  644. color: #FF6633;
  645. line-height: 1.2;
  646. margin-right: 10rpx;
  647. }
  648. .num {
  649. font-size: 50rpx;
  650. font-family: PingFang SC;
  651. font-weight: bold;
  652. color: #FF6633;
  653. line-height: 1;
  654. }
  655. }
  656. }
  657. .btn {
  658. width: 200rpx;
  659. height: 88rpx;
  660. line-height: 88rpx;
  661. text-align: center;
  662. font-size: 30rpx;
  663. font-family: PingFang SC;
  664. font-weight: bold;
  665. color: #FFFFFF;
  666. background: #2BC7B9;
  667. border-radius: 44rpx;
  668. }
  669. }
  670. }
  671. .coupon {
  672. height: 100%;
  673. }
  674. /*优惠券列表公共*/
  675. .coupon-list {}
  676. .coupon-list .item {
  677. display: flex;
  678. flex-direction: column;
  679. justify-content: center;
  680. align-items: center;
  681. width: 100%;
  682. height: 1.7 * 100rpx;
  683. margin-bottom: 0.16 * 100rpx;
  684. }
  685. .coupon-list .item .money {
  686. background-size: 100% 100%;
  687. width: 2.4 * 100rpx;
  688. height: 100%;
  689. color: #fff;
  690. font-size: 0.36 * 100rpx;
  691. font-weight: bold;
  692. text-align: center;
  693. display: flex;
  694. flex-direction: column;
  695. align-items: center;
  696. justify-content: center;
  697. position: relative;
  698. }
  699. .coupon-list .item .money .img {
  700. position: absolute;
  701. width: 2.4 * 100rpx;
  702. height: 100%;
  703. color: #fff;
  704. }
  705. .coupon-list .item .money .num {
  706. font-size: 0.6 * 100rpx;
  707. }
  708. .coupon-list .item .money .pic-num {
  709. font-size: 20rpx;
  710. z-index: 99;
  711. }
  712. .coupon-list .item .text {
  713. width: 4.5 * 100rpx;
  714. padding: 0 0.17 * 100rpx 0 0.24 * 100rpx;
  715. background-color: #fff;
  716. box-sizing: border-box;
  717. }
  718. .coupon-list .item .text .condition {
  719. font-size: 0.3 * 100rpx;
  720. color: #282828;
  721. height: 0.93 * 100rpx;
  722. line-height: 0.93 * 100rpx;
  723. border-bottom: 1px solid #f0f0f0;
  724. }
  725. .coupon-list .item .text .data {
  726. font-size: 0.2 * 100rpx;
  727. color: #999;
  728. height: 0.76 * 100rpx;
  729. }
  730. .coupon-list .item .text .data .bnt {
  731. width: 1.36 * 100rpx;
  732. height: 0.44 * 100rpx;
  733. border-radius: 0.22 * 100rpx;
  734. font-size: 0.22 * 100rpx;
  735. color: #fff;
  736. text-align: center;
  737. line-height: 0.44 * 100rpx;
  738. background-color: red;
  739. }
  740. </style>