cart.vue 22 KB

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