cart.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748
  1. <template>
  2. <!-- 购物车 -->
  3. <view class="page">
  4. <u-navbar :safeAreaInsetTop="true" :placeholder="true">
  5. <view class="u-nav-slot" slot="left">
  6. <view class="">
  7. <text class="shopcart">{{ i18n.Shopping }}</text>
  8. <text class="sum">({{ goodsNum }})</text>
  9. </view>
  10. </view>
  11. <view class="u-nav-slot" slot="right">
  12. <view class="u-flex">
  13. <text @click="admin" v-if="success">{{ i18n.manage }}</text>
  14. <text @click="admin" v-else>{{ i18n.complete }}</text>
  15. <view class="" style="width: 200rpx"></view>
  16. </view>
  17. </view>
  18. </u-navbar>
  19. <u-checkbox-group v-model="checkboxValue1" placement="column" @change="checkboxChange">
  20. <view class="box" v-for="(item, idx) in goodsList" :key="idx">
  21. <view class="item">
  22. <view class="shopname u-flex">
  23. <image src="/static/mine/354.png" class="circle" mode="scaleToFill"
  24. @click="shopSelectAll(item.goods)" v-if="shop(item.goods)" />
  25. <image src="/static/mine/353.png" class="circle" mode="scaleToFill"
  26. @click="shopSelectAll(item.goods)" v-else />
  27. <image :src="item.image" style="width: 28rpx; height: 28rpx" mode=""></image>
  28. <text>{{ item.merchant_name }}</text>
  29. <image src="/static/express/next1.png" style="width: 32rpx; height: 32rpx" mode=""></image>
  30. </view>
  31. <u-swipe-action>
  32. <view class="u-flex" style="margin-top: 30rpx; width: 100%" v-for="(chid, index) in item.goods"
  33. :key="index">
  34. <u-swipe-action-item :options="options2" @click="followOrdelete" :autoClose="true"
  35. :name="chid.cart.sku_item_id" :disabled="chid.status == 'down'">
  36. <!-- <view class="" style="position: absolute;top: 0;left: 0;width: 100%;height: 100%;z-index: 100;background-color: rgba(255, 255, 255, 0.5);"></view> -->
  37. <u-checkbox shape="circle" :customStyle="{ marginBottom: '8px' }"
  38. :name="chid.cart.sku_item_id" activeColor="#F83224"
  39. :disabled="chid.status == 'down'">
  40. </u-checkbox>
  41. <view class="" style="
  42. position: relative;
  43. width: 172rpx;
  44. height: 172rpx;
  45. border-radius: 16rpx;
  46. ">
  47. <image :src="chid.image" style="width: 172rpx; height: 172rpx; border-radius: 20rpx"
  48. mode="">
  49. </image>
  50. <view class="down" v-if="chid.status == 'down'">
  51. <view class="sold"> 商品下架 </view>
  52. </view>
  53. </view>
  54. <view class="good" style="flex: 1; margin-left: 10rpx; width: 65%">
  55. <view class="goodname">{{ chid.name_cn }}</view>
  56. <view class="goods" v-if="chid.sku_item.length > 0">{{
  57. chid.sku_item[0].item
  58. }}</view>
  59. <view class="" style="margin-top: 21rpx">
  60. <view class="goodtab" v-for="itemLabel in chid.label_arr" :key="itemLabel.id">
  61. {{ itemLabel.name_cn }}</view>
  62. </view>
  63. <view class="u-flex u-row-between" style="width: 100%; margin-top: 20rpx">
  64. <view class="" v-if="chid.sku_item.length > 0">
  65. <text class="money">¥</text>
  66. <text class="money" style="font-size: 30rpx">{{
  67. chid.sku_item[0].price.split(".")[0]
  68. }}</text>
  69. <text class="money">.{{ chid.sku_item[0].price.split(".")[1] }}</text>
  70. <text class="weight">{{ chid.sku_item[0].weight }}kg</text>
  71. </view>
  72. <view class="aaaaaa">
  73. <!-- <view class="delect" v-if='dele'>{{i18n.delete}}</view> -->
  74. <view class="" v-if="num == chid.cart.sku_item_id && success">
  75. <!-- <u-number-box v-model="value" @change="valChange"></u-number-box> -->
  76. <u-number-box v-model="chid.cart.goods_num" @change="addOrReduce">
  77. <view slot="minus" class="minus">
  78. <u-icon name="minus" color="#B5B5B5" size="12"></u-icon>
  79. </view>
  80. <text slot="input" style="
  81. width: 50px;
  82. text-align: center;
  83. font-size: 20rpx;
  84. " class="input">{{ chid.cart.goods_num }}</text>
  85. <view slot="plus" class="plus">
  86. <u-icon name="plus" color="#B5B5B5" size="12"></u-icon>
  87. </view>
  88. </u-number-box>
  89. </view>
  90. <view class="num" v-if="
  91. num != chid.cart.sku_item_id &&
  92. success &&
  93. chid.status == 'normal'
  94. " @click="num = chid.cart.sku_item_id">
  95. x{{ chid.cart.goods_num }}
  96. </view>
  97. <view v-if="chid.status == 'down'" class="del" @click="
  98. followOrdelete({
  99. index: 1,
  100. name: chid.cart.sku_item_id,
  101. })
  102. ">删除</view>
  103. </view>
  104. <view v-if="success == false" class="icon">
  105. <u-icon name="trash" color="#fff" size="20"></u-icon>
  106. </view>
  107. </view>
  108. </view>
  109. </u-swipe-action-item>
  110. </view>
  111. </u-swipe-action>
  112. </view>
  113. </view>
  114. </u-checkbox-group>
  115. <u-toast ref="uToast"></u-toast>
  116. <view class="" style="height: 260rpx"></view>
  117. <view class="back-top" @click="backTop">
  118. <image class="back-icon" src="../../static/mine/355.png" mode="scaleToFill" />
  119. <text class="back-text">顶部</text>
  120. </view>
  121. <kj-tabbar ref="tabbar1" :value1="3" @allSelect="allSelect" :goodsWeight="goodsWeight"
  122. :goodsPrice="String(goodsPrice.toFixed(2))" :goodsList="goodsList"
  123. :checkboxValue1="checkboxValue1"></kj-tabbar>
  124. </view>
  125. </template>
  126. <script>
  127. export default {
  128. data() {
  129. return {
  130. dele: true,
  131. success: true,
  132. shopitem: -1,
  133. checkboxValue1: [], //商品数组
  134. value: 0,
  135. all: [], //全选数组
  136. goodsList: [],
  137. selectall: -1,
  138. goodsNum: 0,
  139. num: false,
  140. goodsWeight: 0, //商品重量
  141. goodsPrice: 0, //商品价格
  142. options2: [{
  143. text: "移入关注",
  144. style: {
  145. backgroundColor: "#FFB115",
  146. },
  147. },
  148. {
  149. text: "删除",
  150. style: {
  151. backgroundColor: "#F83224",
  152. },
  153. },
  154. ],
  155. tabarheight: "",
  156. removeProducts: 0, //已下架的商品数量
  157. };
  158. },
  159. computed: {
  160. i18n() {
  161. return this.$t("index");
  162. },
  163. },
  164. onLoad() {
  165. const systemInfo = wx.getSystemInfoSync();
  166. const tab =
  167. systemInfo.screenHeight -
  168. systemInfo.safeArea.bottom +
  169. systemInfo.statusBarHeight;
  170. this.tabarheight = tab;
  171. },
  172. onShow() {
  173. this.getShopCarList()
  174. },
  175. methods: {
  176. //返回顶部
  177. backTop() {
  178. uni.pageScrollTo({
  179. scrollTop: 0, // 滚动到页面的目标位置 这个是滚动到顶部, 0
  180. duration: 300, // 滚动动画的时长
  181. });
  182. },
  183. //商品下架之后的商品字体颜色
  184. getFontColor(status) {
  185. if (status == "down") {
  186. return "color:rgba(51, 51, 51, .6)";
  187. }
  188. },
  189. //关注商品 or 删除商品
  190. followOrdelete(e) {
  191. //关注商品
  192. if (e.index == 0) {
  193. this.goodsList.map((item) => {
  194. item.goods.map((items) => {
  195. if (e.name == items.cart.sku_item_id) {
  196. uni.$u.http
  197. .post(`/api/interest/follow`, {
  198. interest_type: 0,
  199. interest_id: items.merchant_goods_id,
  200. })
  201. .then((res) => {
  202. console.log(res);
  203. });
  204. }
  205. });
  206. });
  207. } else {
  208. //删除商品
  209. this.goodsList.map((item) => {
  210. item.goods.map((items) => {
  211. if (e.name == items.cart.sku_item_id) {
  212. uni.$u.http
  213. .delete(`/api/cart?ids=${items.cart.id}`)
  214. .then((res) => {
  215. this.$refs.uToast.show({
  216. type: "default",
  217. title: "默认主题",
  218. message: "删除成功",
  219. });
  220. this.getShopCarList();
  221. });
  222. }
  223. });
  224. });
  225. }
  226. },
  227. shop(value) {
  228. let num = 0;
  229. value.map((item) => {
  230. if (this.checkboxValue1.indexOf(item.cart.sku_item_id) >= 0) {
  231. num++;
  232. }
  233. });
  234. return num;
  235. },
  236. //获取排除下架的商品之后的商品数量
  237. getNormalGoodsNum(value) {
  238. let num = 0;
  239. value.map((item) => {
  240. if (item.status != "down") {
  241. num++;
  242. }
  243. });
  244. return num;
  245. },
  246. //修改购物车商品数量
  247. addOrReduce(n) {
  248. uni.$u.http
  249. .post(`/api/cart/num/${this.num}`, {
  250. goods_num: n.value,
  251. type: ""
  252. })
  253. .then((res) => {
  254. console.log(res);
  255. });
  256. },
  257. //店铺商品全选
  258. shopSelectAll(value) {
  259. this.goodsPrice = 0;
  260. this.goodsWeight = 0;
  261. //先判断存放选中的数组有没有选中的数据
  262. if (this.checkboxValue1.length == 0) {
  263. //没有数据则直接将选中店铺中的商品存入数组
  264. value.map((item) => {
  265. //商品下架不得选中
  266. if (item.status != "down") {
  267. this.checkboxValue1.push(item.cart.sku_item_id);
  268. }
  269. });
  270. } else {
  271. if (
  272. this.shop(value) > 0 &&
  273. this.shop(value) == this.getNormalGoodsNum(value)
  274. ) {
  275. value.map((item) => {
  276. //先判断选中的商品数组中该店铺商品是否已被选中,已被选中则取消选中
  277. if (this.checkboxValue1.indexOf(item.cart.sku_item_id) >= 0) {
  278. this.checkboxValue1.splice(
  279. this.checkboxValue1.indexOf(item.cart.sku_item_id),
  280. 1
  281. );
  282. }
  283. });
  284. } else if (
  285. (this.shop(value) > 0 &&
  286. this.shop(value) != this.getNormalGoodsNum(value)) ||
  287. this.shop(value) == 0
  288. ) {
  289. value.map((item) => {
  290. //先判断选中的商品数组中该店铺商品是否已被选中,未被选中则推入选中状态,商品下架不得选中
  291. if (
  292. this.checkboxValue1.indexOf(item.cart.sku_item_id) == -1 &&
  293. item.status != "down"
  294. ) {
  295. this.checkboxValue1.push(item.cart.sku_item_id);
  296. }
  297. });
  298. }
  299. }
  300. if (this.checkboxValue1.length == this.goodsNum - this.removeProducts) {
  301. this.$refs.tabbar1.cancelAll();
  302. } else {
  303. this.$refs.tabbar1.cancelAll("取消");
  304. }
  305. //将选中的商品价格相加
  306. this.goodsList.map((item) => {
  307. item.goods.map((items) => {
  308. if (this.checkboxValue1.indexOf(items.cart.sku_item_id) > -1) {
  309. this.goodsWeight += items.sku_item[0].weight * items.cart.goods_num;
  310. this.goodsPrice +=
  311. Number(items.sku_item[0].price) * items.cart.goods_num;
  312. }
  313. });
  314. });
  315. this.shop(value);
  316. },
  317. admin() {
  318. this.success = !this.success;
  319. },
  320. valChange(e) {
  321. console.log("当前值为: " + e.value);
  322. },
  323. //全选
  324. checkAll(e) {
  325. console.log("all", e);
  326. },
  327. //购物车单选
  328. checkboxChange(n) {
  329. console.log(n);
  330. //首先将价格和商品重量重置
  331. this.goodsWeight = 0;
  332. this.goodsPrice = 0;
  333. this.checkboxValue1 = n;
  334. this.goodsList.map((item) => {
  335. item.goods.map((items) => {
  336. if (n.indexOf(items.cart.sku_item_id) > -1) {
  337. this.goodsWeight += items.sku_item[0].weight * items.cart.goods_num;
  338. this.goodsPrice +=
  339. Number(items.sku_item[0].price) * items.cart.goods_num;
  340. }
  341. });
  342. });
  343. //判断是否全部选中
  344. if (
  345. this.checkboxValue1.length == this.goodsNum - this.removeProducts &&
  346. this.goodsNum != 0
  347. ) {
  348. this.$refs.tabbar1.cancelAll();
  349. } else if (
  350. this.checkboxValue1.length <
  351. this.goodsNum - this.removeProducts
  352. ) {
  353. this.$refs.tabbar1.cancelAll("取消");
  354. }
  355. },
  356. //购物车全选
  357. allSelect() {
  358. const all = this.$refs.tabbar1.cancelAll("全选");
  359. if (
  360. this.checkboxValue1.length == this.goodsNum - this.removeProducts &&
  361. all.length == 0
  362. ) {
  363. return;
  364. }
  365. //判断是否已经全选,如已全选,则取消全选
  366. if (this.checkboxValue1.length == this.goodsNum - this.removeProducts) {
  367. this.checkboxValue1 = [];
  368. this.goodsPrice = 0;
  369. this.goodsWeight = 0;
  370. } else {
  371. this.goodsList.map((item) => {
  372. item.goods.map((items) => {
  373. //判断是否有商品已被选中
  374. if (
  375. this.checkboxValue1.indexOf(items.cart.sku_item_id) == -1 &&
  376. items.status != "down"
  377. ) {
  378. this.checkboxValue1.push(items.cart.sku_item_id);
  379. this.goodsWeight +=
  380. items.sku_item[0].weight * items.cart.goods_num;
  381. this.goodsPrice +=
  382. Number(items.sku_item[0].price) * items.cart.goods_num;
  383. }
  384. });
  385. });
  386. }
  387. },
  388. //获取购物车数据
  389. getShopCarList() {
  390. uni.$u.http.get(`/api/cart`).then((res) => {
  391. this.goodsList = res.data;
  392. //循环店铺,获取购物车商品数量
  393. this.goodsList.map((item) => {
  394. this.goodsNum += item.goods.length;
  395. item.goods.map((items) => {
  396. if (items.status == "down") {
  397. this.removeProducts++;
  398. }
  399. });
  400. });
  401. });
  402. },
  403. },
  404. // mounted() {
  405. // this.getShopCarList();
  406. // },
  407. };
  408. </script>
  409. <style lang="scss" scoped>
  410. .page {
  411. position: relative;
  412. .back-top {
  413. position: fixed;
  414. display: flex;
  415. flex-direction: column;
  416. justify-content: center;
  417. align-items: center;
  418. width: 88rpx;
  419. height: 88rpx;
  420. background-color: #fff;
  421. border-radius: 50%;
  422. bottom: 280rpx;
  423. right: 20rpx;
  424. z-index: 1000;
  425. .back-icon {
  426. width: 32rpx;
  427. height: 30rpx;
  428. }
  429. .back-text {
  430. font-size: 20rpx;
  431. color: #555;
  432. }
  433. }
  434. }
  435. .sold {
  436. width: 108rpx;
  437. height: 36rpx;
  438. background: rgba(0, 0, 0, 0.4);
  439. border-radius: 18rpx;
  440. // padding: 0 14rpx;
  441. text-align: center;
  442. box-sizing: border-box;
  443. line-height: 36rpx;
  444. font-family: PingFangSC, PingFang SC;
  445. font-weight: 400;
  446. font-size: 20rpx;
  447. color: #ffffff;
  448. font-style: normal;
  449. position: absolute;
  450. top: 50%;
  451. left: 50%;
  452. margin-top: -18rpx;
  453. margin-left: -54rpx;
  454. }
  455. .delect {
  456. // width: 68rpx;
  457. height: 44rpx;
  458. line-height: 44rpx;
  459. border-radius: 22rpx;
  460. border: 1rpx solid #ff1515;
  461. padding: 0 14rpx;
  462. box-sizing: border-box;
  463. font-family: PingFangSC, PingFang SC;
  464. font-weight: 400;
  465. font-size: 20rpx;
  466. color: #ff1515;
  467. text-align: center;
  468. font-style: normal;
  469. }
  470. .allweight {
  471. font-family: PingFangSC, PingFang SC;
  472. font-weight: 400;
  473. font-size: 22rpx;
  474. color: #333333;
  475. line-height: 32rpx;
  476. text-align: left;
  477. font-style: normal;
  478. }
  479. .sum {
  480. font-family: PingFangSC, PingFang SC;
  481. font-weight: 400;
  482. font-size: 22rpx;
  483. color: #333333;
  484. line-height: 32rpx;
  485. text-align: left;
  486. font-style: normal;
  487. }
  488. .summon {
  489. font-family: JDZhengHT, JDZhengHT;
  490. font-weight: 400;
  491. font-size: 24rpx;
  492. color: #ff1515;
  493. line-height: 30rpx;
  494. text-align: left;
  495. font-style: normal;
  496. }
  497. .settle {
  498. width: 176rpx;
  499. height: 68rpx;
  500. background: #f83224;
  501. border-radius: 38rpx;
  502. font-family: PingFangSC, PingFang SC;
  503. font-weight: 500;
  504. font-size: 28rpx;
  505. color: #ffffff;
  506. line-height: 68rpx;
  507. text-align: center;
  508. font-style: normal;
  509. margin-left: 20rpx;
  510. }
  511. .icon {
  512. width: 40rpx;
  513. height: 40rpx;
  514. background: #f83224;
  515. border-radius: 12rpx;
  516. display: flex;
  517. justify-content: center;
  518. align-items: center;
  519. }
  520. .dle {
  521. width: 136rpx;
  522. height: 60rpx;
  523. border-radius: 38rpx;
  524. border: 1rpx solid #979797;
  525. font-family: PingFangSC, PingFang SC;
  526. font-weight: 400;
  527. font-size: 26rpx;
  528. color: #333333;
  529. line-height: 60rpx;
  530. text-align: center;
  531. font-style: normal;
  532. }
  533. ::v-deep .u-swipe-action-item__content {
  534. flex-direction: row !important;
  535. }
  536. ::v-deep .u-swipe-action-item__right__button__wrapper {
  537. width: 32px;
  538. word-wrap: break-word;
  539. font-size: 20rpx !important;
  540. }
  541. ::v-deep .u-swipe-action-item__right__button__wrapper__text {
  542. word-wrap: break-word;
  543. }
  544. ::v-deep .u-swipe-action-item {
  545. width: 100% !important;
  546. }
  547. ::v-deep .u-swipe-action-item__right {
  548. top: 2rpx !important;
  549. right: 2rpx !important;
  550. bottom: 2rpx !important;
  551. }
  552. .bottom {
  553. width: 750rpx;
  554. height: 100rpx;
  555. background: #ffffff;
  556. padding: 0 24rpx;
  557. box-sizing: border-box;
  558. }
  559. .num {
  560. width: 40rpx;
  561. height: 40rpx;
  562. border-radius: 20rpx;
  563. border: 1rpx solid rgba(151, 151, 151, 0.4);
  564. font-family: HarmonyOS_Sans;
  565. font-size: 20rpx;
  566. color: #222222;
  567. line-height: 40rpx;
  568. text-align: center;
  569. font-style: normal;
  570. }
  571. .del {
  572. width: 68rpx;
  573. height: 44rpx;
  574. text-align: center;
  575. line-height: 44rpx;
  576. border: 2rpx solid #f83224;
  577. color: #f83224;
  578. font-size: 20rpx;
  579. border-radius: 22rpx;
  580. }
  581. .box {
  582. padding: 0rpx 24rpx 20rpx;
  583. margin-top: 20rpx;
  584. box-sizing: border-box;
  585. .item {
  586. padding: 36rpx 20rpx;
  587. box-sizing: border-box;
  588. width: 702rpx;
  589. // height: 556rpx;
  590. background: #ffffff;
  591. border-radius: 16rpx;
  592. .money {
  593. font-family: HarmonyOS_Sans_Medium;
  594. font-size: 20rpx;
  595. color: #ff1515;
  596. line-height: 26rpx;
  597. text-align: left;
  598. font-style: normal;
  599. }
  600. .weight {
  601. font-family: SFPro, SFPro;
  602. font-weight: 400;
  603. font-size: 20rpx;
  604. color: #333333;
  605. line-height: 24rpx;
  606. text-align: left;
  607. font-style: normal;
  608. margin-left: 12rpx;
  609. }
  610. .goodtab {
  611. // width: 96rpx;
  612. height: 32rpx;
  613. border-radius: 4rpx;
  614. border: 1rpx solid #ff1515;
  615. padding: 2rpx 8rpx;
  616. box-sizing: border-box;
  617. text-align: center;
  618. line-height: 32rpx;
  619. display: inline;
  620. font-family: PingFangSC, PingFang SC;
  621. font-weight: 400;
  622. font-size: 20rpx;
  623. color: #ff1515;
  624. line-height: 28rpx;
  625. text-align: left;
  626. font-style: normal;
  627. margin-right: 6rpx;
  628. }
  629. .goods {
  630. // width: 284rpx;
  631. height: 40rpx;
  632. background: #f4f4f4;
  633. border-radius: 8rpx;
  634. display: inline;
  635. text-align: center;
  636. line-height: 40rpx;
  637. margin-top: 20rpx;
  638. padding: 6rpx 12rpx;
  639. box-sizing: border-box;
  640. font-family: PingFangSC, PingFang SC;
  641. font-weight: 400;
  642. font-size: 20rpx;
  643. color: #555555;
  644. line-height: 28rpx;
  645. text-align: left;
  646. font-style: normal;
  647. }
  648. .goodname {
  649. font-family: PingFangSC, PingFang SC;
  650. font-weight: 500;
  651. font-size: 28rpx;
  652. color: #333333;
  653. line-height: 40rpx;
  654. text-align: left;
  655. font-style: normal;
  656. overflow: hidden;
  657. text-overflow: ellipsis;
  658. word-break: break-all;
  659. white-space: nowrap;
  660. width: 100%;
  661. }
  662. .shopname {
  663. font-family: PingFangSC, PingFang SC;
  664. font-weight: 500;
  665. font-size: 26rpx;
  666. color: #333333;
  667. line-height: 36rpx;
  668. text-align: left;
  669. font-style: normal;
  670. .circle {
  671. width: 32rpx;
  672. height: 32rpx;
  673. margin-right: 10rpx;
  674. }
  675. }
  676. }
  677. }
  678. .shopcart {
  679. font-family: PingFangSC, PingFang SC;
  680. font-weight: 500;
  681. font-size: 36rpx;
  682. color: #222222;
  683. line-height: 50rpx;
  684. text-align: right;
  685. font-style: normal;
  686. }
  687. .sum {
  688. font-family: HarmonyOS_Sans;
  689. font-size: 22rpx;
  690. color: #333333;
  691. line-height: 32rpx;
  692. text-align: left;
  693. font-style: normal;
  694. }
  695. .down {
  696. position: absolute;
  697. top: 0;
  698. left: 0;
  699. background-color: #c7c7c7;
  700. opacity: 0.7;
  701. width: 100%;
  702. height: 100%;
  703. z-index: 10000;
  704. border-radius: 20rpx;
  705. }
  706. </style>