cart.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970
  1. <template>
  2. <!-- 购物车 -->
  3. <view class="page" @click="num = ''">
  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
  20. v-model="checkboxValue1"
  21. placement="column"
  22. @change="checkboxChange"
  23. >
  24. <view class="box" v-for="(item, idx) in goodsList" :key="idx">
  25. <view class="item">
  26. <view class="shopname u-flex">
  27. <image
  28. src="/static/mine/354.png"
  29. class="circle"
  30. mode="scaleToFill"
  31. @click="shopSelectAll(item.goods)"
  32. v-if="shop(item.goods)"
  33. />
  34. <image
  35. src="/static/mine/353.png"
  36. class="circle"
  37. mode="scaleToFill"
  38. @click="shopSelectAll(item.goods)"
  39. v-else
  40. />
  41. <image
  42. :src="item.image"
  43. style="width: 28rpx; height: 28rpx"
  44. mode=""
  45. ></image>
  46. <text>{{ item.merchant_name }}</text>
  47. <image
  48. src="/static/express/next1.png"
  49. style="width: 32rpx; height: 32rpx"
  50. mode=""
  51. ></image>
  52. </view>
  53. <u-swipe-action>
  54. <view
  55. class="u-flex"
  56. style="margin-top: 30rpx; width: 100%"
  57. v-for="(chid, index) in item.goods"
  58. :key="index"
  59. >
  60. <u-swipe-action-item
  61. ref="show"
  62. :options="options2"
  63. @click="followOrdelete"
  64. :autoClose="true"
  65. :name="chid.cart.id"
  66. :disabled="chid.status == 'down' || chid.sku_item.length == 0"
  67. >
  68. <!-- <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> -->
  69. <u-checkbox
  70. shape="circle"
  71. :customStyle="{ marginBottom: '8px' }"
  72. :name="chid.cart.id"
  73. activeColor="#F83224"
  74. :disabled="chid.status == 'down' || chid.sku_item.length == 0"
  75. >
  76. </u-checkbox>
  77. <view
  78. class=""
  79. style="
  80. position: relative;
  81. width: 172rpx;
  82. height: 172rpx;
  83. border-radius: 16rpx;
  84. "
  85. >
  86. <image
  87. :src="chid.sku_item[0].image"
  88. style="width: 172rpx; height: 172rpx; border-radius: 20rpx"
  89. mode=""
  90. >
  91. </image>
  92. <view
  93. class="down"
  94. v-if="chid.status == 'down' || chid.sku_item.length == 0"
  95. >
  96. <view class="sold"> {{ i18n.offtheshelves }} </view>
  97. </view>
  98. </view>
  99. <view
  100. class="good"
  101. style="flex: 1; margin-left: 10rpx; width: 65%"
  102. >
  103. <view class="goodname" v-if="language == 'zh-CN'">{{
  104. chid.name_cn
  105. }}</view>
  106. <view class="goodname" v-if="language == 'en-US'">{{
  107. chid.name_en
  108. }}</view>
  109. <view class="goodname" v-if="language == 'es-ES'">{{
  110. chid.name_es
  111. }}</view>
  112. <view class="goodname" v-if="language == 'it-IT'">{{
  113. chid.name_ita
  114. }}</view>
  115. <view class="goods" v-if="chid.sku_item.length > 0">
  116. <text v-if="language == 'zh-CN'">{{
  117. chid.sku_item[0].item
  118. }}</text>
  119. <text v-if="language == 'en-US'">{{
  120. chid.sku_item[0].item_en
  121. }}</text>
  122. <text v-if="language == 'es-ES'">{{
  123. chid.sku_item[0].item_es
  124. }}</text>
  125. <text v-if="language == 'it-IT'">{{
  126. chid.sku_item[0].item_ita
  127. }}</text>
  128. </view>
  129. <view class="" style="margin-top: 21rpx">
  130. <view
  131. class="goodtab"
  132. v-for="itemLabel in chid.label_arr"
  133. :key="itemLabel.id"
  134. >
  135. <text v-if="language == 'zh-CN'">{{
  136. itemLabel.name_cn
  137. }}</text>
  138. <text v-if="language == 'en-US'">{{
  139. itemLabel.name_en
  140. }}</text>
  141. <text v-if="language == 'es-ES'">{{
  142. itemLabel.name_es
  143. }}</text>
  144. <text v-if="language == 'it-IT'">{{
  145. itemLabel.name_ita
  146. }}</text>
  147. </view>
  148. </view>
  149. <view
  150. class="u-flex u-row-between"
  151. style="width: 100%; margin-top: 20rpx"
  152. >
  153. <view class="" v-if="chid.sku_item.length > 0">
  154. <text class="money">¥</text>
  155. <text class="money" style="font-size: 30rpx">{{
  156. chid.sku_item[0].discount_price.split(".")[0]
  157. }}</text>
  158. <text class="money"
  159. >.{{
  160. chid.sku_item[0].discount_price.split(".")[1]
  161. }}</text
  162. >
  163. <text class="weight"
  164. >{{ chid.sku_item[0].weight }}kg</text
  165. >
  166. </view>
  167. <view class="aaaaaa">
  168. <!-- <view class="delect" v-if='dele'>{{i18n.delete}}</view> -->
  169. <view class="" v-if="num == chid.cart.id && success">
  170. <!-- <u-number-box v-model="value" @change="valChange"></u-number-box> -->
  171. <u-number-box
  172. v-model="chid.cart.goods_num"
  173. @change="addOrReduce"
  174. >
  175. <view slot="minus" class="minus">
  176. <u-icon
  177. name="minus"
  178. color="#B5B5B5"
  179. size="12"
  180. ></u-icon>
  181. </view>
  182. <text
  183. slot="input"
  184. style="
  185. width: 50px;
  186. text-align: center;
  187. font-size: 20rpx;
  188. "
  189. class="input"
  190. >{{ chid.cart.goods_num }}</text
  191. >
  192. <view slot="plus" class="plus">
  193. <u-icon
  194. name="plus"
  195. color="#B5B5B5"
  196. size="12"
  197. ></u-icon>
  198. </view>
  199. </u-number-box>
  200. </view>
  201. <view
  202. class="num"
  203. v-if="
  204. num != chid.cart.id &&
  205. success &&
  206. chid.status == 'normal' &&
  207. chid.sku_item.length != 0
  208. "
  209. @click.stop="num = chid.cart.id"
  210. >
  211. x{{ chid.cart.goods_num }}
  212. </view>
  213. <view
  214. v-if="
  215. success &&
  216. (chid.status == 'down' || chid.sku_item.length == 0)
  217. "
  218. class="del"
  219. @click="
  220. followOrdelete({
  221. index: 1,
  222. name: chid.cart.id,
  223. })
  224. "
  225. >{{ i18n.delete }}</view
  226. >
  227. </view>
  228. <view
  229. v-if="success == false"
  230. class="icon delete-1"
  231. @click="
  232. followOrdelete({
  233. index: 1,
  234. name: chid.cart.id,
  235. })
  236. "
  237. >
  238. <u-icon name="trash" color="#fff" size="20"></u-icon>
  239. </view>
  240. </view>
  241. </view>
  242. </u-swipe-action-item>
  243. </view>
  244. </u-swipe-action>
  245. </view>
  246. </view>
  247. </u-checkbox-group>
  248. <u-toast ref="uToast"></u-toast>
  249. <view class="" style="height: 260rpx"></view>
  250. <view class="back-top" @click="backTop">
  251. <image
  252. class="back-icon"
  253. src="../../static/mine/355.png"
  254. mode="scaleToFill"
  255. />
  256. <text class="back-text">{{ i18n.top }}</text>
  257. </view>
  258. <kj-tabbar
  259. ref="tabbar1"
  260. :value1="2"
  261. :success="success"
  262. @allSelect="allSelect"
  263. :goodsWeight="goodsWeight"
  264. :goodsPrice="String(goodsPrice.toFixed(2))"
  265. :goodsList="goodsList"
  266. :checkboxValue1="checkboxValue1"
  267. @selectDelete="selectDelete"
  268. ></kj-tabbar>
  269. </view>
  270. </template>
  271. <script>
  272. export default {
  273. data() {
  274. return {
  275. dele: true,
  276. success: true,
  277. shopitem: -1,
  278. checkboxValue1: [], //商品数组
  279. value: 0,
  280. all: [], //全选数组
  281. goodsList: [],
  282. selectall: -1,
  283. goodsNum: 0, //购物车商品数量
  284. num: false,
  285. goodsWeight: 0, //商品重量
  286. goodsPrice: 0, //商品价格
  287. tabarheight: "",
  288. removeProducts: 0, //已下架的商品数量
  289. language: "zh-CN",
  290. };
  291. },
  292. watch: {},
  293. computed: {
  294. i18n() {
  295. return this.$t("index");
  296. },
  297. options2() {
  298. var options = [
  299. {
  300. text: this.i18n.Shiftfocus,
  301. style: {
  302. backgroundColor: "#FFB115",
  303. },
  304. },
  305. {
  306. text: this.i18n.delete,
  307. style: {
  308. backgroundColor: "#F83224",
  309. },
  310. },
  311. ];
  312. return options;
  313. },
  314. },
  315. onLoad() {
  316. const systemInfo = wx.getSystemInfoSync();
  317. const tab =
  318. systemInfo.screenHeight -
  319. systemInfo.safeArea.bottom +
  320. systemInfo.statusBarHeight;
  321. this.tabarheight = tab;
  322. },
  323. onShow() {
  324. this.goodsNum = 0; //购物车商品数量
  325. this.goodsWeight = 0; //商品重量
  326. this.goodsPrice = 0; //商品价格
  327. this.checkboxValue1 = [];
  328. this.getShopCarList();
  329. this.$refs.tabbar1.getNumber();
  330. if (uni.getStorageSync("language") != "") {
  331. this.language = uni.getStorageSync("language");
  332. }
  333. },
  334. methods: {
  335. //返回顶部
  336. backTop() {
  337. uni.pageScrollTo({
  338. scrollTop: 0, // 滚动到页面的目标位置 这个是滚动到顶部, 0
  339. duration: 300, // 滚动动画的时长
  340. });
  341. },
  342. //商品下架之后的商品字体颜色
  343. getFontColor(status) {
  344. if (status == "down") {
  345. return "color:rgba(51, 51, 51, .6)";
  346. }
  347. },
  348. //关注商品 or 删除商品
  349. followOrdelete(e) {
  350. //关注商品
  351. if (e.index == 0) {
  352. this.goodsList.map((item) => {
  353. item.goods.map((items) => {
  354. if (e.name == items.cart.id) {
  355. console.log(items);
  356. uni.$u.http
  357. .post(`/api/interest/follow`, {
  358. interest_type: 0,
  359. interest_id: items.merchant_goods.id,
  360. })
  361. .then((res) => {
  362. this.$refs.show.forEach((item) => item.closeHandler(true));
  363. console.log(res);
  364. uni.showToast({
  365. title: "关注成功",
  366. icon: "none",
  367. });
  368. });
  369. }
  370. });
  371. });
  372. } else {
  373. //删除商品
  374. this.goodsList.map((item) => {
  375. item.goods.map((items) => {
  376. if (e.name == items.cart.id) {
  377. uni.$u.http
  378. .delete(`/api/cart?ids=${items.cart.id}`)
  379. .then((res) => {
  380. this.$refs.uToast.show({
  381. type: "default",
  382. title: this.i18n.defaultTheme,
  383. message: this.i18n.successfullydelete,
  384. });
  385. //删除后关闭滑动打开的单元格
  386. this.$refs.show.forEach((item) => item.closeHandler(true));
  387. this.getShopCarList();
  388. this.$refs.tabbar1.getNumber();
  389. });
  390. }
  391. });
  392. });
  393. }
  394. },
  395. //多选删除
  396. selectDelete() {
  397. let goodsIdList = []; //筛选选中的商品id
  398. this.goodsList.map((item) => {
  399. item.goods.map((items) => {
  400. if (this.checkboxValue1.indexOf(items.cart.id) >= 0) {
  401. goodsIdList.push(items.cart.id);
  402. }
  403. });
  404. });
  405. uni.$u.http
  406. .delete(`/api/cart`, {
  407. ids: goodsIdList.join(","),
  408. })
  409. .then((res) => {
  410. this.$refs.uToast.show({
  411. type: "default",
  412. title: this.i18n.defaultTheme,
  413. message: this.i18n.successfullydelete,
  414. });
  415. this.checkboxValue1 = [];
  416. this.getShopCarList();
  417. this.$refs.tabbar1.getNumber();
  418. });
  419. },
  420. shop(value) {
  421. let num = 0;
  422. value.map((item) => {
  423. if (this.checkboxValue1.indexOf(item.cart.id) >= 0) {
  424. num++;
  425. }
  426. });
  427. return num;
  428. },
  429. //获取排除下架的商品之后的商品数量
  430. getNormalGoodsNum(value) {
  431. let num = 0;
  432. value.map((item) => {
  433. if (item.status != "down") {
  434. num++;
  435. }
  436. });
  437. return num;
  438. },
  439. //修改购物车商品数量
  440. addOrReduce(n) {
  441. console.log(n);
  442. uni.$u.http
  443. .post(`/api/cart/num/${this.num}`, {
  444. goods_num: n.value,
  445. type: "",
  446. })
  447. .then((res) => {
  448. this.goodsPrice = 0;
  449. this.goodsWeight = 0;
  450. this.goodsList.map((item) => {
  451. item.goods.map((items) => {
  452. //判断是否有商品已被选中
  453. if (
  454. this.checkboxValue1.indexOf(items.cart.id) != -1 &&
  455. items.status != "down"
  456. ) {
  457. this.goodsWeight +=
  458. items.sku_item[0].weight * items.cart.goods_num;
  459. this.goodsPrice +=
  460. Number(items.sku_item[0].discount_price) *
  461. items.cart.goods_num;
  462. }
  463. });
  464. });
  465. });
  466. },
  467. //店铺商品全选
  468. shopSelectAll(value) {
  469. this.goodsPrice = 0;
  470. this.goodsWeight = 0;
  471. //先判断存放选中的数组有没有选中的数据
  472. if (this.checkboxValue1.length == 0) {
  473. //没有数据则直接将选中店铺中的商品存入数组
  474. value.map((item) => {
  475. //商品下架不得选中
  476. if (item.status != "down") {
  477. this.checkboxValue1.push(item.cart.id);
  478. }
  479. });
  480. } else {
  481. if (
  482. this.shop(value) > 0 &&
  483. this.shop(value) == this.getNormalGoodsNum(value)
  484. ) {
  485. value.map((item) => {
  486. //先判断选中的商品数组中该店铺商品是否已被选中,已被选中则取消选中
  487. if (this.checkboxValue1.indexOf(item.cart.id) >= 0) {
  488. this.checkboxValue1.splice(
  489. this.checkboxValue1.indexOf(item.cart.id),
  490. 1
  491. );
  492. }
  493. });
  494. } else if (
  495. (this.shop(value) > 0 &&
  496. this.shop(value) != this.getNormalGoodsNum(value)) ||
  497. this.shop(value) == 0
  498. ) {
  499. value.map((item) => {
  500. //先判断选中的商品数组中该店铺商品是否已被选中,未被选中则推入选中状态,商品下架不得选中
  501. if (
  502. this.checkboxValue1.indexOf(item.cart.id) == -1 &&
  503. item.status != "down"
  504. ) {
  505. this.checkboxValue1.push(item.cart.id);
  506. }
  507. });
  508. }
  509. }
  510. if (this.checkboxValue1.length == this.goodsNum - this.removeProducts) {
  511. this.$refs.tabbar1.cancelAll();
  512. } else {
  513. this.$refs.tabbar1.cancelAll(this.i18n.Cancel);
  514. }
  515. //将选中的商品价格相加
  516. this.goodsList.map((item) => {
  517. item.goods.map((items) => {
  518. if (this.checkboxValue1.indexOf(items.cart.id) > -1) {
  519. this.goodsWeight += items.sku_item[0].weight * items.cart.goods_num;
  520. this.goodsPrice +=
  521. Number(items.sku_item[0].discount_price) * items.cart.goods_num;
  522. }
  523. });
  524. });
  525. this.shop(value);
  526. },
  527. admin() {
  528. console.log(this.checkboxValue1);
  529. this.success = !this.success;
  530. },
  531. valChange(e) {
  532. console.log("当前值为: " + e.value);
  533. },
  534. //全选
  535. checkAll(e) {
  536. console.log("all", e);
  537. },
  538. //购物车单选
  539. checkboxChange(n) {
  540. console.log(n);
  541. //首先将价格和商品重量重置
  542. this.goodsWeight = 0;
  543. this.goodsPrice = 0;
  544. this.checkboxValue1 = n;
  545. this.goodsList.map((item) => {
  546. item.goods.map((items) => {
  547. if (n.indexOf(items.cart.id) > -1) {
  548. this.goodsWeight += items.sku_item[0].weight * items.cart.goods_num;
  549. this.goodsPrice +=
  550. Number(items.sku_item[0].discount_price) * items.cart.goods_num;
  551. }
  552. });
  553. });
  554. //判断是否全部选中
  555. if (
  556. this.checkboxValue1.length == this.goodsNum - this.removeProducts &&
  557. this.goodsNum != 0
  558. ) {
  559. this.$refs.tabbar1.cancelAll();
  560. } else if (
  561. this.checkboxValue1.length <
  562. this.goodsNum - this.removeProducts
  563. ) {
  564. this.$refs.tabbar1.cancelAll(this.i18n.Cancel);
  565. }
  566. },
  567. //购物车全选
  568. allSelect() {
  569. const all = this.$refs.tabbar1.cancelAll(this.i18n.selectall);
  570. if (
  571. this.checkboxValue1.length == this.goodsNum - this.removeProducts &&
  572. all.length == 0
  573. ) {
  574. return;
  575. }
  576. //判断是否已经全选,如已全选,则取消全选
  577. if (this.checkboxValue1.length == this.goodsNum - this.removeProducts) {
  578. this.checkboxValue1 = [];
  579. this.goodsPrice = 0;
  580. this.goodsWeight = 0;
  581. } else {
  582. this.goodsList.map((item) => {
  583. item.goods.map((items) => {
  584. //判断是否有商品已被选中
  585. if (
  586. this.checkboxValue1.indexOf(items.cart.id) == -1 &&
  587. items.status != "down"
  588. ) {
  589. this.checkboxValue1.push(items.cart.id);
  590. this.goodsWeight +=
  591. items.sku_item[0].weight * items.cart.goods_num;
  592. this.goodsPrice +=
  593. Number(items.sku_item[0].discount_price) * items.cart.goods_num;
  594. }
  595. });
  596. });
  597. }
  598. },
  599. //获取购物车数据
  600. getShopCarList() {
  601. this.goodsNum = 0;
  602. uni.$u.http.get(`/api/cart`).then((res) => {
  603. this.goodsList = res.data;
  604. //循环店铺,获取购物车商品数量
  605. this.goodsList.map((item) => {
  606. this.goodsNum += item.goods.length;
  607. item.goods.map((items) => {
  608. if (items.status == "down") {
  609. this.removeProducts++;
  610. }
  611. });
  612. });
  613. });
  614. },
  615. },
  616. // mounted() {
  617. // this.getShopCarList();
  618. // },
  619. };
  620. </script>
  621. <style lang="scss" scoped>
  622. .page {
  623. position: relative;
  624. .back-top {
  625. position: fixed;
  626. display: flex;
  627. flex-direction: column;
  628. justify-content: center;
  629. align-items: center;
  630. width: 88rpx;
  631. height: 88rpx;
  632. background-color: #fff;
  633. border-radius: 50%;
  634. bottom: 280rpx;
  635. right: 20rpx;
  636. z-index: 1000;
  637. .back-icon {
  638. width: 32rpx;
  639. height: 30rpx;
  640. }
  641. .back-text {
  642. font-size: 20rpx;
  643. color: #555;
  644. }
  645. }
  646. }
  647. .sold {
  648. width: 108rpx;
  649. height: 36rpx;
  650. background: rgba(0, 0, 0, 0.4);
  651. border-radius: 18rpx;
  652. // padding: 0 14rpx;
  653. text-align: center;
  654. box-sizing: border-box;
  655. line-height: 36rpx;
  656. font-family: PingFangSC, PingFang SC;
  657. font-weight: 400;
  658. font-size: 20rpx;
  659. color: #ffffff;
  660. font-style: normal;
  661. position: absolute;
  662. top: 50%;
  663. left: 50%;
  664. margin-top: -18rpx;
  665. margin-left: -54rpx;
  666. }
  667. .aaaaaa {
  668. float: right;
  669. }
  670. .u-row-between {
  671. // flex-direction: row-reverse;
  672. position: relative;
  673. }
  674. .delect {
  675. // width: 68rpx;
  676. height: 44rpx;
  677. line-height: 44rpx;
  678. border-radius: 22rpx;
  679. border: 1rpx solid #ff1515;
  680. padding: 0 14rpx;
  681. box-sizing: border-box;
  682. font-family: PingFangSC, PingFang SC;
  683. font-weight: 400;
  684. font-size: 20rpx;
  685. color: #ff1515;
  686. text-align: center;
  687. font-style: normal;
  688. }
  689. .allweight {
  690. font-family: PingFangSC, PingFang SC;
  691. font-weight: 400;
  692. font-size: 22rpx;
  693. color: #333333;
  694. line-height: 32rpx;
  695. text-align: left;
  696. font-style: normal;
  697. }
  698. .sum {
  699. font-family: PingFangSC, PingFang SC;
  700. font-weight: 400;
  701. font-size: 22rpx;
  702. color: #333333;
  703. line-height: 32rpx;
  704. text-align: left;
  705. font-style: normal;
  706. }
  707. .summon {
  708. font-family: JDZhengHT, JDZhengHT;
  709. font-weight: 400;
  710. font-size: 24rpx;
  711. color: #ff1515;
  712. line-height: 30rpx;
  713. text-align: left;
  714. font-style: normal;
  715. }
  716. .settle {
  717. width: 176rpx;
  718. height: 68rpx;
  719. background: #f83224;
  720. border-radius: 38rpx;
  721. font-family: PingFangSC, PingFang SC;
  722. font-weight: 500;
  723. font-size: 28rpx;
  724. color: #ffffff;
  725. line-height: 68rpx;
  726. text-align: center;
  727. font-style: normal;
  728. margin-left: 20rpx;
  729. }
  730. .icon {
  731. width: 40rpx;
  732. height: 40rpx;
  733. background: #f83224;
  734. border-radius: 12rpx;
  735. display: flex;
  736. justify-content: center;
  737. align-items: center;
  738. }
  739. .dle {
  740. width: 136rpx;
  741. height: 60rpx;
  742. border-radius: 38rpx;
  743. border: 1rpx solid #979797;
  744. font-family: PingFangSC, PingFang SC;
  745. font-weight: 400;
  746. font-size: 26rpx;
  747. color: #333333;
  748. line-height: 60rpx;
  749. text-align: center;
  750. font-style: normal;
  751. }
  752. ::v-deep .u-swipe-action-item__content {
  753. flex-direction: row !important;
  754. }
  755. ::v-deep .u-swipe-action-item__right__button__wrapper {
  756. width: 32px;
  757. word-wrap: break-word;
  758. font-size: 20rpx !important;
  759. }
  760. ::v-deep .u-swipe-action-item__right__button__wrapper__text {
  761. word-wrap: break-word;
  762. }
  763. ::v-deep .u-swipe-action-item {
  764. width: 100% !important;
  765. }
  766. ::v-deep .u-swipe-action-item__right {
  767. top: 2rpx !important;
  768. right: 2rpx !important;
  769. bottom: 2rpx !important;
  770. }
  771. .bottom {
  772. width: 750rpx;
  773. height: 100rpx;
  774. background: #ffffff;
  775. padding: 0 24rpx;
  776. box-sizing: border-box;
  777. }
  778. .num {
  779. width: 40rpx;
  780. height: 40rpx;
  781. border-radius: 20rpx;
  782. border: 1rpx solid rgba(151, 151, 151, 0.4);
  783. font-family: HarmonyOS_Sans;
  784. font-size: 20rpx;
  785. color: #222222;
  786. line-height: 40rpx;
  787. text-align: center;
  788. font-style: normal;
  789. }
  790. .del {
  791. width: 68rpx;
  792. height: 44rpx;
  793. text-align: center;
  794. line-height: 44rpx;
  795. border: 2rpx solid #f83224;
  796. color: #f83224;
  797. font-size: 20rpx;
  798. border-radius: 22rpx;
  799. position: absolute;
  800. right: 10rpx;
  801. }
  802. .box {
  803. padding: 0rpx 24rpx 20rpx;
  804. margin-top: 20rpx;
  805. box-sizing: border-box;
  806. .item {
  807. padding: 36rpx 20rpx;
  808. box-sizing: border-box;
  809. width: 702rpx;
  810. // height: 556rpx;
  811. background: #ffffff;
  812. border-radius: 16rpx;
  813. .money {
  814. font-family: HarmonyOS_Sans_Medium;
  815. font-size: 20rpx;
  816. color: #ff1515;
  817. line-height: 26rpx;
  818. text-align: left;
  819. font-style: normal;
  820. }
  821. .weight {
  822. font-family: SFPro, SFPro;
  823. font-weight: 400;
  824. font-size: 20rpx;
  825. color: #333333;
  826. line-height: 24rpx;
  827. text-align: left;
  828. font-style: normal;
  829. margin-left: 12rpx;
  830. }
  831. .goodtab {
  832. // width: 96rpx;
  833. height: 32rpx;
  834. border-radius: 4rpx;
  835. border: 1rpx solid #ff1515;
  836. padding: 2rpx 8rpx;
  837. box-sizing: border-box;
  838. text-align: center;
  839. line-height: 32rpx;
  840. display: inline;
  841. font-family: PingFangSC, PingFang SC;
  842. font-weight: 400;
  843. font-size: 20rpx;
  844. color: #ff1515;
  845. line-height: 28rpx;
  846. text-align: left;
  847. font-style: normal;
  848. margin-right: 6rpx;
  849. }
  850. .goods {
  851. // width: 284rpx;
  852. height: 40rpx;
  853. background: #f4f4f4;
  854. border-radius: 8rpx;
  855. display: inline;
  856. text-align: center;
  857. line-height: 40rpx;
  858. margin-top: 20rpx;
  859. padding: 6rpx 12rpx;
  860. box-sizing: border-box;
  861. font-family: PingFangSC, PingFang SC;
  862. font-weight: 400;
  863. font-size: 20rpx;
  864. color: #555555;
  865. line-height: 28rpx;
  866. text-align: left;
  867. font-style: normal;
  868. }
  869. .goodname {
  870. font-family: PingFangSC, PingFang SC;
  871. font-weight: 500;
  872. font-size: 28rpx;
  873. color: #333333;
  874. line-height: 40rpx;
  875. text-align: left;
  876. font-style: normal;
  877. overflow: hidden;
  878. text-overflow: ellipsis;
  879. word-break: break-all;
  880. white-space: nowrap;
  881. width: 100%;
  882. }
  883. .shopname {
  884. font-family: PingFangSC, PingFang SC;
  885. font-weight: 500;
  886. font-size: 26rpx;
  887. color: #333333;
  888. line-height: 36rpx;
  889. text-align: left;
  890. font-style: normal;
  891. .circle {
  892. width: 32rpx;
  893. height: 32rpx;
  894. margin-right: 10rpx;
  895. }
  896. }
  897. }
  898. }
  899. .shopcart {
  900. font-family: PingFangSC, PingFang SC;
  901. font-weight: 500;
  902. font-size: 36rpx;
  903. color: #222222;
  904. line-height: 50rpx;
  905. text-align: right;
  906. font-style: normal;
  907. }
  908. .sum {
  909. font-family: HarmonyOS_Sans;
  910. font-size: 22rpx;
  911. color: #333333;
  912. line-height: 32rpx;
  913. text-align: left;
  914. font-style: normal;
  915. }
  916. .down {
  917. position: absolute;
  918. top: 0;
  919. left: 0;
  920. background-color: #c7c7c7;
  921. opacity: 0.7;
  922. width: 100%;
  923. height: 100%;
  924. z-index: 10000;
  925. border-radius: 20rpx;
  926. }
  927. </style>