promoDetail.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  1. <template>
  2. <view class="video-pagesCons">
  3. <view class="tab-search">
  4. <u-search placeholder="请输入产品名称/轮胎规格" shape="round" :clearabled="true" show-action v-model="queryWord" @clear="pageInit" @search="pageInit" @custom="pageInit"></u-search>
  5. </view>
  6. <view class="tab-body">
  7. <!-- <scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom"> -->
  8. <view class="product-list" v-if="list.length">
  9. <view
  10. class="check-order-list"
  11. v-for="(item,index) in list"
  12. :key="item.id"
  13. >
  14. <view class="video-item">
  15. <view>
  16. <u-image :src="item.productImage+'?x-oss-process=image/resize,p_50'" height="140px" width="100%"></u-image>
  17. <view class="back-price" v-if="item.promoRuleValue">返<text>{{item.promoRuleValue}}</text>元</view>
  18. <view class="product-code">{{item.productCode}}</view>
  19. </view>
  20. <view>
  21. <view class="product-name">{{item.productName}}</view>
  22. <view class="product-guige ellipsis-two">{{item.productOrigCode}}</view>
  23. <view class="product-button">
  24. <view class="price-txt">¥<text>{{item.cost}}</text></view>
  25. <view @click="chooseProduct(item)">
  26. <view class="cart-add" :class="!item.checked?'colr-add':'colr-checks'">
  27. <u-icon v-if="!item.checked" color="#fff" name="plus"></u-icon>
  28. <view v-else>
  29. <u-icon name="plus" color="#fff"></u-icon>{{item.qty}}
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. <view style="padding: 20upx;">
  39. <u-empty :src="`/static/nodata.png`" icon-size="180" :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty>
  40. <u-loadmore v-if="(total>=list.length&&list.length)||status=='loading'" :status="status" />
  41. </view>
  42. <!-- </scroll-view> -->
  43. </view>
  44. <!-- 底部栏 -->
  45. <view class="bottom-bar" @click="clearAction">
  46. <view class="bottom-bar-left">
  47. <view class="bottom-bar-left-item">
  48. <view class="bottom-bar-left-item-icon" @click="openChoose">
  49. <u-icon name="shopping-cart" size="40"></u-icon>
  50. <u-badge type="error" :count="totalNum" :offset="[-7,-8]"></u-badge>
  51. </view>
  52. </view>
  53. <view class="bottom-bar-left-item" v-if="showChoosePopu">
  54. 合计:<view class="price-txt">¥<text>{{totalAmount}}</text></view>
  55. </view>
  56. </view>
  57. <view :class="'bottom-bar-right bg-'+(showChoosePopu?'1':'0')" @click="submitOrder">
  58. <view class="bottom-bar-right-item">{{showChoosePopu?'确认采购':'去结算'}}</view>
  59. </view>
  60. </view>
  61. <!-- 已选列表 -->
  62. <page-container
  63. :show="showChoosePopu"
  64. :round="true"
  65. position="bottom"
  66. custom-style="height:80%"
  67. @enter="openRender"
  68. @afterleave="closePopu">
  69. <scroll-view :style="{width:screenWidth + 'px',height:'100%'}" scroll-y="true" @scrolltolower="onreachPopuBottom">
  70. <view class="choose-title">
  71. <view class="flex align_center">
  72. <view>已选<text class="p-nums">{{chooseLength}}</text>款产品 </view>
  73. <u-button @click="claerChoose" size="mini" type="error" plain style="margin: 0 20upx;">清空列表</u-button>
  74. <text class="choose-inf">左滑删除产品</text>
  75. </view>
  76. <u-icon name="close" size="30" @click="showChoosePopu=false"></u-icon>
  77. </view>
  78. <view class="choose-product-list" v-if="showSwipeAction">
  79. <u-swipe-action
  80. :show="item.show"
  81. v-for="(item, index) in chooseProductList"
  82. :index="item.id"
  83. :key="item.id"
  84. @click="chooseClick"
  85. @open="chooseOpen"
  86. :options="chooseOptions"
  87. >
  88. <view class="choose-product-item" :style="{width:(screenWidth-20) + 'px'}">
  89. <view>
  90. <view class="choose-product-item-img">
  91. <u-image :src="item.productImage+'?x-oss-process=image/resize,p_50'" height="200rpx" width="100%"></u-image>
  92. <view class="back-price" v-if="item.promoRuleValue">返<text>{{item.promoRuleValue}}</text>元</view>
  93. <view class="choose-product-item-left-info-code">{{item.productCode}}</view>
  94. </view>
  95. <view class="choose-product-item-info">
  96. <view class="choose-product-item-left-info-name">{{item.productName}}</view>
  97. <view class="choose-product-item-left-info-guige ellipsis-two">{{item.productOrigCode}}</view>
  98. <view class="choose-product-item-left-info-price">
  99. <view class="price-txt">¥<text>{{item.cost}}</text></view>
  100. <view>
  101. <u-number-box v-model="item.qty" :index="item.id" :input-width="60" :input-height="60" size="mini" :min="1" @change="changeQty"></u-number-box>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. </u-swipe-action>
  108. </view>
  109. </scroll-view>
  110. </page-container>
  111. </view>
  112. </template>
  113. <script>
  114. import {
  115. mapState,
  116. mapMutations,
  117. } from 'vuex'
  118. import { queryPromoProductByPage } from '@/api/video.js'
  119. import { purchaseSave } from '@/api/purchase.js'
  120. export default {
  121. data() {
  122. return {
  123. status: 'loading',
  124. noDataText: '暂无数据',
  125. queryWord: '',// 关键词查询列表
  126. // 查询条件
  127. pageNo: 1, // 当前页
  128. pageSize: 6,//每页条数
  129. list: [], // 产品列表
  130. total: 0, // 总记录
  131. showChoosePopu: false,//已选列表弹框
  132. chooseList:[], // 已选数据
  133. chooseProductList:[], // 已选弹框中当前数据
  134. chooseOptions:[
  135. {
  136. text: '删除',
  137. style: {
  138. backgroundColor: '#dd524d'
  139. }
  140. }
  141. ], // 左滑删除已选产品
  142. screenWidth: 750, // 屏幕宽度
  143. showSwipeAction: false, // 已选弹框是否一打开
  144. choosePageNo: 1, // 已选产品当前页
  145. choosePageSize: 4, // 已选产品每页数
  146. chooseTotal: 0 ,// 已选产品总记录数
  147. promoActiveSn: null, // 活动sn
  148. submitOk: false
  149. }
  150. },
  151. computed: {
  152. ...mapState(['hasLogin']),
  153. userInfo(){
  154. return this.$store.state.vuex_userInfo
  155. },
  156. // 已选产品总款数
  157. chooseLength(){
  158. return this.chooseList.length
  159. },
  160. // 已选产品总金额
  161. totalAmount(){
  162. let total = 0
  163. this.chooseList.forEach(key => {
  164. total = total + key.cost * key.qty
  165. })
  166. return total.toFixed(2)
  167. },
  168. // 已选产品总数量
  169. totalNum(){
  170. let total = 0
  171. this.chooseList.forEach(key => {
  172. total = total + key.qty
  173. })
  174. return total
  175. }
  176. },
  177. onLoad(opts) {
  178. uni.setNavigationBarTitle({
  179. title: opts.title||'促销活动产品'
  180. })
  181. this.screenWidth = uni.getSystemInfoSync().windowWidth
  182. this.$store.state.vuex_tempData = null
  183. this.promoActiveSn = opts.promoActiveSn
  184. // 购物车是否有缓存
  185. const cacheList = this.$store.state.vuex_cartList.find(k => k.sn == this.promoActiveSn)
  186. this.chooseList = cacheList ? JSON.parse(JSON.stringify(cacheList.list)) : []
  187. // 查询产品列表
  188. this.pageInit()
  189. },
  190. onShow() {
  191. this.showChoosePopu=false
  192. },
  193. onUnload() {
  194. // 存储已选列表值
  195. const hasCache = this.$store.state.vuex_cartList.find(k => k.sn == this.promoActiveSn)
  196. if(hasCache){
  197. hasCache.list = this.chooseList
  198. }else{
  199. this.$store.state.vuex_cartList.push({sn:this.promoActiveSn,list: this.chooseList})
  200. }
  201. this.$u.vuex('vuex_cartList', this.$store.state.vuex_cartList)
  202. // 清空数据
  203. this.chooseList = null
  204. this.list = null
  205. },
  206. // 到底部加载更多
  207. onReachBottom() {
  208. if(this.list.length < this.total){
  209. this.pageNo += 1
  210. this.getRow()
  211. }else{
  212. this.status = "nomore"
  213. }
  214. },
  215. methods: {
  216. // 初始化页面
  217. pageInit(){
  218. // 重置分页
  219. this.total = 0
  220. this.pageNo = 1
  221. this.list = []
  222. // 获取列表数据
  223. this.getRow()
  224. },
  225. // 添加已选产品
  226. chooseProduct(item){
  227. if(!item.checked){
  228. item.checked = true
  229. item.qty = 1
  230. item.show = false
  231. this.chooseList.unshift(this.$u.deepClone(item))
  232. }else{
  233. item.qty = item.qty + 1
  234. // 已添加,则增加数量
  235. const row = this.chooseList.find(key => key.id == item.id)
  236. if(row){
  237. row.qty = row.qty + 1
  238. }
  239. this.chooseList.splice()
  240. }
  241. },
  242. // 渲染已选产品列表
  243. openRender(){
  244. setTimeout(()=>{
  245. this.showSwipeAction = true
  246. },100)
  247. },
  248. // 关闭已选列表弹框
  249. closePopu(){
  250. this.chooseProductList = []
  251. this.showChoosePopu=false
  252. if(this.submitOk){
  253. uni.hideLoading()
  254. uni.navigateTo({
  255. url: '/pagesB/procureOrder'
  256. })
  257. }
  258. },
  259. // 打开已选产品列表
  260. openChoose(){
  261. this.submitOk = false
  262. if(this.chooseLength){
  263. this.showChoosePopu = !this.showChoosePopu
  264. if(this.showChoosePopu){
  265. console.log(this.chooseList)
  266. // 默认加载第一页数据
  267. this.chooseTotal = this.chooseList.length
  268. this.choosePageNo = 0
  269. this.onreachPopuBottom()
  270. }
  271. }else{
  272. this.$u.toast(`请选择产品`);
  273. }
  274. },
  275. // 已选产品滚动到底部
  276. onreachPopuBottom(){
  277. const totalPages = Math.ceil(this.chooseTotal/this.choosePageSize)
  278. if(this.choosePageNo>=totalPages){
  279. return
  280. }
  281. uni.showLoading({
  282. title: '加载中',
  283. mask: true
  284. })
  285. this.choosePageNo = this.choosePageNo + 1
  286. const start = (this.choosePageNo-1)*this.choosePageSize
  287. const end = this.choosePageNo*this.choosePageSize
  288. const list = this.chooseTotal > this.choosePageSize ? this.chooseList.slice(start,end>this.chooseTotal?this.chooseTotal:end) : this.chooseList
  289. this.chooseProductList = this.chooseProductList.concat(list)
  290. this.chooseProductList.splice()
  291. this.$nextTick(()=>{
  292. uni.hideLoading()
  293. })
  294. },
  295. // 已选产品变更数量
  296. changeQty(e){
  297. const _this = this
  298. const rowIndex = this.chooseProductList.findIndex(key => key.id == e.index)
  299. if(e.value>0){
  300. this.chooseProductList[rowIndex].qty = e.value
  301. // 更新原始数据
  302. const rindex = this.chooseList.findIndex(key => key.id == e.index)
  303. if(rindex>=0){
  304. this.chooseList[rindex].qty = e.value
  305. this.chooseList.splice()
  306. }
  307. // 更新页面产品数据
  308. const aindex = this.list.findIndex(key => key.id == e.index)
  309. if(aindex>=0){
  310. this.list[aindex].qty = e.value
  311. this.list.splice()
  312. }
  313. }else{
  314. // 数量为0时,删除
  315. // this.chooseClick(e.index,0)
  316. }
  317. },
  318. //已选产品删除
  319. chooseClick(index, btns){
  320. if(btns == 0) {
  321. // 更新列表已选状态
  322. const row = this.list.find(item => item.id == index)
  323. if(row){
  324. row.checked = false
  325. row.qty = 0
  326. }
  327. const rindex = this.chooseProductList.findIndex(item => item.id == index)
  328. if(rindex>=0){
  329. this.chooseProductList.splice(rindex, 1);
  330. this.chooseList.splice(rindex, 1);
  331. }
  332. // 如果数量小于每页数量,自动加载下一页
  333. if(this.chooseProductList.length < this.choosePageSize){
  334. this.onreachPopuBottom()
  335. }
  336. this.$u.toast(`删除成功!`);
  337. }
  338. },
  339. // 同时打开一个
  340. chooseOpen(index){
  341. // 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
  342. // 原本为'false',再次设置为'false'会无效
  343. const row = this.chooseProductList.find(item => item.id == index)
  344. if(row) {
  345. row.show = true
  346. }
  347. this.chooseProductList.map((item, idx) => {
  348. if(index != item.id) this.chooseProductList[idx].show = false;
  349. })
  350. },
  351. // 清除滑动按钮
  352. clearAction(){
  353. this.chooseProductList.map(item => {
  354. item.show = false
  355. })
  356. this.chooseProductList.splice()
  357. },
  358. // 确定清空已选列表
  359. claerChoose(){
  360. const _this = this
  361. uni.showModal({
  362. title: '提示',
  363. content: '确定清空已选列表?',
  364. confirmText: '确定',
  365. success(res) {
  366. if(res.confirm){
  367. _this.clearChooseData()
  368. }
  369. }
  370. })
  371. },
  372. // 清空已选数据
  373. clearChooseData(){
  374. this.chooseList = []
  375. this.chooseProductList = []
  376. this.showChoosePopu = false
  377. // nav.navigateBack()
  378. // 重置已选状态
  379. this.list.filter(item => item.checked).map(item=>{
  380. item.checked = false
  381. item.qty = 0
  382. })
  383. },
  384. // 查询列表
  385. getRow () {
  386. let _this = this
  387. let params = {
  388. pageNo: this.pageNo,
  389. pageSize: this.pageSize,
  390. queryWord: this.queryWord,
  391. promoActiveSn: this.promoActiveSn
  392. }
  393. this.status = "loading"
  394. queryPromoProductByPage(params).then(res => {
  395. if (res.code == 200 || res.status == 204 || res.status == 200) {
  396. const list = res.data.list||[]
  397. const ret = []
  398. // 更新已选状态
  399. list.map(k => {
  400. // 如果筛选或分页后,更新页面列表产品数量
  401. const hasChecked = this.chooseList.find(s=>s.id == k.id)
  402. ret.push({
  403. id: k.id,
  404. cost: k.cost,
  405. checked: hasChecked,
  406. qty: hasChecked ? hasChecked.qty : 0,
  407. productCode: k.productCode,
  408. productSn: k.productSn,
  409. productImage: k.productImage,
  410. productName: k.productName,
  411. productOrigCode: k.productOrigCode,
  412. promoActiveSn: k.promoActiveSn,
  413. promoRuleSn: k.promoRuleSn,
  414. promoRuleValue: k.promoRuleValue,
  415. promoRuleType: k.promoRuleType,
  416. show: false
  417. })
  418. })
  419. _this.list = _this.list.concat(ret)
  420. _this.total = res.data.count || 0
  421. } else {
  422. _this.list = []
  423. _this.total = 0
  424. _this.noDataText = res.message
  425. }
  426. _this.status = _this.total>=_this.list.length ? "nomore" : 'loadmore'
  427. })
  428. },
  429. // 提交订单
  430. submitOrder(){
  431. if(this.showChoosePopu){
  432. uni.showLoading({
  433. title: '提交中...',
  434. mask: true
  435. })
  436. const detailList = []
  437. this.chooseList.map(item => {
  438. detailList.push({
  439. promoActiveSn: this.promoActiveSn,
  440. promoRuleSn:item.promoRuleSn,
  441. productSn:item.productSn,
  442. productCode:item.productCode,
  443. qty:item.qty,
  444. price:item.cost,
  445. giveAmount:item.promoRuleValue
  446. })
  447. })
  448. purchaseSave({
  449. promoActiveSn: this.promoActiveSn,
  450. detailList: detailList
  451. }).then(res => {
  452. if(res.status == 200){
  453. this.$store.state.vuex_tempData = res.data
  454. this.clearChooseData()
  455. this.submitOk = true
  456. }
  457. })
  458. }else{
  459. this.openChoose()
  460. }
  461. },
  462. }
  463. }
  464. </script>
  465. <style lang="less">
  466. page{
  467. height: 100vh;
  468. }
  469. .video-pagesCons{
  470. height: 100vh;
  471. position: relative;
  472. .tab-search{
  473. padding: 15rpx 20rpx;
  474. background: #fff;
  475. position: fixed;
  476. top:0;
  477. left:0;
  478. width:100%;
  479. z-index:20;
  480. }
  481. .tab-body{
  482. display: flex;
  483. flex-direction: column;
  484. flex-grow: 1;
  485. padding: 90rpx 0 130rpx 0;
  486. .product-list{
  487. display: flex;
  488. flex-wrap: wrap;
  489. }
  490. .check-order-list{
  491. width: 50%;
  492. padding: 10upx;
  493. .video-item{
  494. background: #ffffff;
  495. border-radius: 10upx;
  496. box-shadow: 1px 1px 3px #EEEEEE;
  497. height: 100%;
  498. display: flex;
  499. flex-direction: column;
  500. > view{
  501. &:first-child{
  502. position: relative;
  503. overflow: hidden;
  504. border-bottom: 1px solid #eee;
  505. .product-code{
  506. color: #666;
  507. position: absolute;
  508. width: 100%;
  509. left:0;
  510. bottom:0;
  511. background: rgba(255,255,255,0.7);
  512. text-align: center;
  513. }
  514. }
  515. &:last-child{
  516. padding: 20rpx 20rpx 70rpx 20rpx;
  517. position: relative;
  518. flex-grow: 1;
  519. .product-name{
  520. font-size: 28rpx;
  521. }
  522. .product-guige{
  523. margin: 10rpx 0 20rpx 0;
  524. color: #2196F3;
  525. text{
  526. margin-right: 10rpx;
  527. }
  528. }
  529. }
  530. .product-button{
  531. display: flex;
  532. justify-content: space-between;
  533. align-items: center;
  534. position: absolute;
  535. bottom: 20rpx;
  536. left: 0;
  537. width: 100%;
  538. padding: 0 20rpx;
  539. }
  540. .cart-add{
  541. padding: 6rpx 15rpx;
  542. border-radius: 30rpx;
  543. background: #2196F3;
  544. color: #fff;
  545. display: flex;
  546. align-items: center;
  547. justify-content: center;
  548. font-size: 24rpx;
  549. }
  550. .colr-add{
  551. background: #2196F3;
  552. padding: 10rpx 20rpx;
  553. }
  554. .colr-checks{
  555. background: #00aa00;
  556. }
  557. }
  558. }
  559. }
  560. }
  561. .bottom-bar{
  562. height: 130upx;
  563. z-index: 200;
  564. background-color: #fff;
  565. display: flex;
  566. align-items: center;
  567. justify-content: space-between;
  568. font-size: 32upx;
  569. position: fixed;
  570. bottom:0;
  571. left:0;
  572. width:100%;
  573. .bottom-bar-left{
  574. padding: 0 30upx;
  575. flex-grow: 1;
  576. display: flex;
  577. align-items: center;
  578. }
  579. .bottom-bar-left-item{
  580. padding-right: 20rpx;
  581. font-size: 24rpx;
  582. display: flex;
  583. align-items: center;
  584. }
  585. .bottom-bar-left-item-icon{
  586. position: relative;
  587. background: #2196F3;
  588. padding: 20rpx;
  589. border-radius: 100%;
  590. color: #fff;
  591. }
  592. .bottom-bar-right{
  593. padding: 0 50rpx;
  594. height: 100%;
  595. background: #2196F3;
  596. display: flex;
  597. align-items: center;
  598. .bottom-bar-right-item{
  599. color: #fff;
  600. }
  601. }
  602. .bg-0{
  603. background: #2196F3;
  604. }
  605. .bg-1{
  606. background: #f44336;
  607. }
  608. }
  609. .price-txt{
  610. color: red;
  611. text{
  612. font-size: 36rpx;
  613. }
  614. }
  615. .choose-title{
  616. display: flex;
  617. align-items:center;
  618. justify-content: space-between;
  619. padding: 25rpx;
  620. position: fixed;
  621. background: #fff;
  622. width: 100%;
  623. z-index: 3;
  624. border-bottom: 1px solid #eee;
  625. .p-nums{
  626. color: #2196F3;
  627. margin: 0 6rpx;
  628. }
  629. .choose-inf{
  630. color: #999;
  631. font-size: 24rpx;
  632. }
  633. }
  634. .choose-product-list{
  635. padding: 100rpx 20rpx 130rpx;
  636. width: 100%;
  637. .choose-product-item{
  638. display: flex;
  639. align-items: center;
  640. justify-content: space-between;
  641. padding: 20rpx 0;
  642. border-bottom: 1px solid #eee;
  643. > view{
  644. display: flex;
  645. align-items: center;
  646. justify-content: space-between;
  647. flex-grow: 1;
  648. width: 100%;
  649. }
  650. .choose-product-item-img{
  651. margin-right: 20rpx;
  652. width: 35%;
  653. position: relative;
  654. overflow: hidden;
  655. border: 1px solid #eee;
  656. padding: 10rpx;
  657. .back-price{
  658. zoom: calc(0.8);
  659. }
  660. .choose-product-item-left-info-code{
  661. color: #666;
  662. position: absolute;
  663. width: 100%;
  664. left:0;
  665. bottom:0;
  666. background: rgba(255,255,255,0.7);
  667. text-align: center;
  668. }
  669. }
  670. .choose-product-item-info{
  671. margin-right: 10rpx;
  672. width: 65%;
  673. flex-grow: 1;
  674. .choose-product-item-left-info-price{
  675. display: flex;
  676. align-items:center;
  677. justify-content: space-between;
  678. >view{
  679. &:last-child{
  680. display: flex;
  681. align-items:center;
  682. }
  683. }
  684. }
  685. .choose-product-item-left-info-name{
  686. font-size: 28rpx;
  687. }
  688. .choose-product-item-left-info-guige{
  689. color: #2196F3;
  690. margin: 10rpx 0;
  691. text{
  692. margin-right: 10rpx;
  693. }
  694. }
  695. }
  696. }
  697. }
  698. .back-price{
  699. padding: 6rpx 55rpx;
  700. background: rgba(255 ,87 ,34 , 1);
  701. position: absolute;
  702. top: 10rpx;
  703. right: -40rpx;
  704. color: #fff;
  705. z-index: 2;
  706. font-size: 20rpx;
  707. text-align: center;
  708. transform: rotate(40deg);
  709. display: flex;
  710. align-items: center;
  711. text{
  712. font-size: 28rpx;
  713. }
  714. }
  715. }
  716. </style>