discountsGoodsList.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  1. <template>
  2. <view class="discounts-list" :style="colorStyle">
  3. <view class="discounts-box" v-for="(item,index) in discountsData" :key="index">
  4. <view class="discounts-title" @click.stop="changeShow(index)">
  5. <view class="discounts-name line1">
  6. 套餐{{index + 1}}:{{item.title}}
  7. </view>
  8. <view class="right-icon">
  9. <text class="count-price"
  10. v-if="selectCountPrice[index].total_pic">¥{{selectCountPrice[index].total_pic}}起</text>
  11. <text class="count-price" v-else>¥{{selectCountPrice[index].min}}起</text>
  12. <text v-if="proNum !== index" class="iconfont icon-xiangxia"></text>
  13. <text v-else class="iconfont icon-xiangshang"></text>
  14. </view>
  15. </view>
  16. <transition name="fade" mode="out-in">
  17. <view class="discounts-cart" v-if="proNum == index">
  18. <view class="list">
  19. <checkbox-group @change="checkboxChange">
  20. <block v-for="(attr,n) in item.products" :key="attr.id">
  21. <view class='item acea-row row-between-wrapper'>
  22. <!-- #ifndef MP -->
  23. <checkbox v-if="item.type == 1" :disabled="item.type == 1 && n ==0"
  24. :value="(attr.id).toString()"
  25. :checked="selectValue.includes(attr.id + '') || (item.type == 1 && n ==0)" />
  26. <!-- #endif -->
  27. <!-- #ifdef MP -->
  28. <checkbox v-if="item.type == 1" :value="attr.id" :disabled="item.type == 1 && n ==0"
  29. :checked="selectValue.includes(attr.id + '') || (item.type == 1 && n ==0)" />
  30. <!-- #endif -->
  31. <view class='pic-txt acea-row row-between-wrapper' @click="selecAttr(index,n)">
  32. <view class='pictrue'>
  33. <image v-if="attr.image" :src='attr.image'>
  34. </image>
  35. </view>
  36. <view class='text'>
  37. <view class='line1' :class="attr.attrStatus?'':'reColor'">
  38. {{attr.title}}
  39. </view>
  40. <view class='infor'>
  41. <text class="line1">
  42. 属性:{{attrValue[n]}}
  43. </text>
  44. <text class="iconfont icon-xiangxia"></text>
  45. </view>
  46. <view class="price acea-row row-bottom" v-if="selectAttr[n]">
  47. <view class='money'>¥{{selectAttr[n].price}}
  48. </view>
  49. <view class="y_money">¥{{selectAttr[n].product_price}}</view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </block>
  55. </checkbox-group>
  56. </view>
  57. <view class="save acea-row row-center-wrapper">省:¥<text class="money">{{saveMoney}}</text></view>
  58. <view class="btn" @click="subData(index)">
  59. 立即下单
  60. </view>
  61. </view>
  62. <view class="goods-image" v-else>
  63. <view class="goods-image-box" v-for="(img,imgIndex) in images[index]" :key="imgIndex">
  64. <view class="add" v-if="imgIndex>0">
  65. +
  66. </view>
  67. <image class="goods-image-sty" :src="img" mode=""></image>
  68. </view>
  69. </view>
  70. </transition>
  71. </view>
  72. <productWindow :attr="attr" :isShow="1" :iScart='1' :title="selectTitle" :iSplus="1" :type="'setMeal'" @myevent="onMyEvent"
  73. @ChangeAttr="ChangeAttr" @attrVal="attrVal" @iptCartNum="iptCartNum" id="product-window" @goCat="goOrder()">
  74. </productWindow>
  75. </view>
  76. </template>
  77. <script>
  78. import {
  79. postCartAdd
  80. } from '@/api/store.js';
  81. import {
  82. storeDiscountsList
  83. } from '@/api/store.js';
  84. import productWindow from '@/components/productWindow'
  85. import colors from "@/mixins/color";
  86. export default {
  87. components: {
  88. productWindow
  89. },
  90. mixins: [colors],
  91. data() {
  92. return {
  93. productId: "",
  94. discountsData: [],
  95. attr: {
  96. cartAttr: false,
  97. productAttr: [],
  98. productSelect: {},
  99. },
  100. productValue: [], //系统属性
  101. isOpen: false, //是否打开属性组件
  102. attrValue: [],
  103. attrTxt: "",
  104. cartList: {
  105. valid: [],
  106. invalid: []
  107. },
  108. selectAttr: [],
  109. selectValue: [], //选中的ID
  110. proNum: 0,
  111. images: [],
  112. selectCountPrice: [],
  113. selectTitle: "",
  114. saveMoney: 0
  115. }
  116. },
  117. onLoad(options) {
  118. this.productId = options.id
  119. this.getData(0)
  120. },
  121. onShow(){
  122. uni.removeStorageSync('form_type_cart');
  123. },
  124. methods: {
  125. getData(index) {
  126. storeDiscountsList(this.productId).then(res => {
  127. this.discountsData = res.data
  128. if (!this.discountsData.length)
  129. return uni.navigateBack({
  130. delta: 1
  131. });
  132. res.data[index].products.map((v, i) => {
  133. this.seleNum = i
  134. this.attr.productAttr = res.data[index].products[i].productAttr
  135. this.productValue = res.data[index].products[i].productValue
  136. this.$set(this.selectAttr, [i], res.data[index].products[i].productValue);
  137. // this.$set(this.selectValue, [i], res.data[index].products[i].id);
  138. this.selectValue.push(res.data[index].products[i].id + "")
  139. this.DefaultSelect()
  140. })
  141. if (!this.images.length) {
  142. for (let i = 0; i < res.data.length; i++) {
  143. this.selectCountPrice.push({
  144. min: res.data[i].min_price,
  145. total_pic: 0
  146. })
  147. this.images.push([])
  148. for (let j = 0; j < res.data[i].products.length; j++) {
  149. this.images[i].push(res.data[i].products[j].image)
  150. }
  151. }
  152. }
  153. console.log(this.images)
  154. this.switchSelect()
  155. }).catch(err=>{
  156. uni.showToast({
  157. title: err,
  158. icon: 'none',
  159. duration: 2000
  160. });
  161. setTimeout(e=>{
  162. uni.navigateTo({
  163. url:'/pages/goods_details/index?id=' + this.productId
  164. })
  165. },1001)
  166. })
  167. },
  168. getList(index) {
  169. this.selectValue = []
  170. this.discountsData[index].products.map((v, i) => {
  171. this.seleNum = i
  172. // this.selectValue.push(this.discountsData[index].products[i].id + "")
  173. this.attr.productAttr = this.discountsData[index].products[i].productAttr
  174. this.productValue = this.discountsData[index].products[i].productValue
  175. this.$set(this.selectAttr, [i], this.discountsData[index].products[i].productValue);
  176. this.$set(this.selectValue, [i], this.discountsData[index].products[i].id + '');
  177. console.log(this.discountsData[index].products[i].productAttr, )
  178. this.DefaultSelect()
  179. })
  180. if (!this.images.length) {
  181. for (let i = 0; i < this.discountsData.length; i++) {
  182. this.selectCountPrice.push({
  183. min: this.discountsData[i].min_price,
  184. total_pic: 0
  185. })
  186. this.images.push([])
  187. for (let j = 0; j < this.discountsData[i].products.length; j++) {
  188. this.images[i].push(this.discountsData[i].products[j].image)
  189. }
  190. }
  191. }
  192. this.switchSelect()
  193. this.proNum = index
  194. },
  195. // getList(index) {
  196. // },
  197. attrVal(val) {
  198. this.$set(this.attr.productAttr[val.indexw], 'index', this.attr.productAttr[val.indexw]
  199. .attr_values[val
  200. .indexn]);
  201. },
  202. /**
  203. * 属性变动赋值
  204. *
  205. */
  206. ChangeAttr: function(res) {
  207. let productSelect = this.productValue[res];
  208. if (productSelect && productSelect.stock > 0) {
  209. this.$set(this.attr.productSelect, 'image', productSelect.image);
  210. this.$set(this.attr.productSelect, 'price', productSelect.price);
  211. this.$set(this.attr.productSelect, 'stock', productSelect.stock);
  212. this.$set(this.attr.productSelect, 'product_stock', productSelect.product_stock);
  213. this.$set(this.attr.productSelect, 'unique', productSelect.unique);
  214. this.$set(this.attr.productSelect, 'cart_num', 1);
  215. this.$set(this.attr.productSelect, 'vip_price', productSelect.vip_price);
  216. // this.$set(this, 'attrValue', res);
  217. this.$set(this, 'attrTxt', '已选择');
  218. this.attrValue[this.seleNum] = res || ""
  219. } else {
  220. this.$set(this.attr.productSelect, 'image', productSelect.image);
  221. this.$set(this.attr.productSelect, 'price', productSelect.price);
  222. this.$set(this.attr.productSelect, 'product_stock', productSelect.product_stock);
  223. this.$set(this.attr.productSelect, 'stock', 0);
  224. this.$set(this.attr.productSelect, 'unique', '');
  225. this.$set(this.attr.productSelect, 'cart_num', 0);
  226. this.$set(this.attr.productSelect, 'vip_price', productSelect.vip_price);
  227. // this.$set(this, 'attrValue', '');
  228. this.attrValue[this.seleNum] = res || ""
  229. this.$set(this, 'attrTxt', '请选择');
  230. }
  231. this.$set(this.selectAttr, [this.seleNum], productSelect);
  232. // this.selectAttr[this.seleNum] = this.attr.productSelect
  233. this.switchSelect();
  234. },
  235. /**
  236. * 默认选中属性
  237. *
  238. */
  239. DefaultSelect: function() {
  240. let productAttr = this.attr.productAttr;
  241. let value = [];
  242. let arrPrice = []
  243. for (var key in this.productValue) {
  244. arrPrice.push(this.productValue[key].price)
  245. }
  246. let min = Math.min.apply(null, arrPrice);
  247. for (var key in this.productValue) {
  248. if (this.productValue[key].product_stock > 0 && this.productValue[key].price == min) {
  249. value = this.attr.productAttr.length ? key.split(',') : [];
  250. break;
  251. }
  252. }
  253. for (let i = 0; i < productAttr.length; i++) {
  254. this.$set(productAttr[i], 'index', value[i]);
  255. }
  256. //sort();排序函数:数字-英文-汉字;
  257. let productSelect = this.productValue[value.join(',')];
  258. if (productSelect && productAttr.length) {
  259. this.$set(this.attr.productSelect, 'store_name', productSelect.title);
  260. this.$set(this.attr.productSelect, 'image', productSelect.image);
  261. this.$set(this.attr.productSelect, 'price', productSelect.price);
  262. this.$set(this.attr.productSelect, 'stock', productSelect.stock);
  263. this.$set(this.attr.productSelect, 'product_stock', productSelect.product_stock);
  264. this.$set(this.attr.productSelect, 'unique', productSelect.unique);
  265. this.$set(this.attr.productSelect, 'cart_num', 1);
  266. // this.$set(this, 'attrValue', value.join(','));
  267. this.$set(this.attr.productSelect, 'vip_price', productSelect.vip_price);
  268. this.attrValue[this.seleNum] = value.join(',')
  269. } else if (!productSelect && productAttr.length) {
  270. this.$set(this.attr.productSelect, 'store_name', productSelect.store_name);
  271. this.$set(this.attr.productSelect, 'image', productSelect.image);
  272. this.$set(this.attr.productSelect, 'price', productSelect.price);
  273. this.$set(this.attr.productSelect, 'product_stock', productSelect.product_stock);
  274. this.$set(this.attr.productSelect, 'stock', 0);
  275. this.$set(this.attr.productSelect, 'unique', '');
  276. this.$set(this.attr.productSelect, 'cart_num', 0);
  277. this.$set(this.attr.productSelect, 'vip_price', productSelect.vip_price);
  278. // this.$set(this, 'attrValue', '');
  279. this.attrValue[this.seleNum] = ''
  280. } else if (!productSelect && !productAttr.length) {
  281. this.$set(this.attr.productSelect, 'store_name', productSelect.store_name);
  282. this.$set(this.attr.productSelect, 'image', productSelect.image);
  283. this.$set(this.attr.productSelect, 'price', productSelect.price);
  284. this.$set(this.attr.productSelect, 'stock', productSelect.stock);
  285. this.$set(this.attr.productSelect, 'product_stock', productSelect.product_stock);
  286. this.$set(this.attr.productSelect, 'unique', productSelect.unique || '');
  287. this.$set(this.attr.productSelect, 'cart_num', 1);
  288. this.$set(this.attr.productSelect, 'vip_price', productSelect.vip_price);
  289. this.$set(this, 'attrValue', '');
  290. this.attrValue[this.seleNum] = ''
  291. this.$set(this, 'attrTxt', '请选择');
  292. }
  293. this.$set(this.selectAttr, [this.seleNum], productSelect);
  294. },
  295. /**
  296. * 打开属性插件
  297. */
  298. selecAttr: function(index, n) {
  299. this.proNum = index
  300. this.seleNum = n
  301. this.selectTitle = this.discountsData[index].products[n].title
  302. this.attr.productAttr = this.discountsData[index].products[n].productAttr
  303. this.productValue = this.discountsData[index].products[n].productValue
  304. this.DefaultSelect()
  305. this.$nextTick((e) => {
  306. this.$set(this.attr, 'cartAttr', true);
  307. this.$set(this, 'isOpen', true);
  308. })
  309. },
  310. onMyEvent: function() {
  311. this.$set(this.attr, 'cartAttr', false);
  312. this.$set(this, 'isOpen', false);
  313. this.switchSelect();
  314. },
  315. setAllSelectValue: function(status) {
  316. let that = this;
  317. let selectValue = [];
  318. let valid = that.cartList.valid;
  319. if (valid.length > 0) {
  320. let newValid = valid.map(item => {
  321. if (status) {
  322. if (that.footerswitch) {
  323. if (item.attrStatus) {
  324. item.checked = true;
  325. selectValue.push(item.id);
  326. } else {
  327. item.checked = false;
  328. }
  329. } else {
  330. item.checked = true;
  331. selectValue.push(item.id);
  332. }
  333. that.isAllSelect = true;
  334. } else {
  335. item.checked = false;
  336. that.isAllSelect = false;
  337. }
  338. return item;
  339. });
  340. that.$set(that.cartList, 'valid', newValid);
  341. that.selectValue = selectValue;
  342. that.switchSelect();
  343. }
  344. },
  345. checkboxChange: function(event) {
  346. let that = this;
  347. let value = event.detail.value;
  348. let valid = that.cartList.valid;
  349. console.log(value, valid)
  350. console.log(this.selectAttr)
  351. let arr1 = [];
  352. let arr2 = [];
  353. let arr3 = [];
  354. let newValid = valid.map(item => {
  355. if (that.inArray(item.id, value)) {
  356. if (that.footerswitch) {
  357. if (item.attrStatus) {
  358. item.checked = true;
  359. arr1.push(item);
  360. } else {
  361. item.checked = false;
  362. }
  363. } else {
  364. item.checked = true;
  365. arr1.push(item);
  366. }
  367. } else {
  368. item.checked = false;
  369. arr2.push(item);
  370. }
  371. return item;
  372. });
  373. if (that.footerswitch) {
  374. arr3 = arr2.filter(item => !item.attrStatus);
  375. }
  376. that.$set(that.cartList, 'valid', newValid);
  377. // let newArr = that.cartList.valid.filter(item => item.attrStatus);
  378. that.isAllSelect = newValid.length === arr1.length + arr3.length;
  379. that.selectValue = value;
  380. that.switchSelect();
  381. },
  382. switchSelect: function() {
  383. let that = this;
  384. let selectCountPrice = 0.00;
  385. let originalPrice = 0.00;
  386. for (let index in this.selectAttr) {
  387. if (this.selectValue.includes(this.selectAttr[
  388. index].product_id + '')) {
  389. selectCountPrice = selectCountPrice + Number(this.selectAttr[
  390. index].price)
  391. originalPrice = originalPrice + Number(this.selectAttr[
  392. index].product_price)
  393. }
  394. }
  395. this.selectCountPrice[this.proNum].total_pic = selectCountPrice
  396. this.saveMoney = Number(originalPrice - selectCountPrice).toFixed(2) || 0;
  397. },
  398. changeShow(index) {
  399. this.selectValue = []
  400. if (index === this.proNum) {
  401. this.proNum = -1
  402. this.selectCountPrice[index].total_pic = 0
  403. } else {
  404. this.proNum = index
  405. this.getList(index)
  406. }
  407. },
  408. subData(index) {
  409. let data = []
  410. let reqData = {
  411. new: 1,
  412. discountId: this.discountsData[index].id,
  413. discountInfos: []
  414. }
  415. console.log(this.selectValue, this.discountsData[index].products[0].id)
  416. console.log(this.selectValue.includes(this.discountsData[index].products[0].id + ''))
  417. if (this.discountsData[index].type == 0) {
  418. this.selectValue = []
  419. this.discountsData[index].products.map(v => {
  420. this.selectValue.push(v.id + '')
  421. })
  422. } else {
  423. if (this.selectValue
  424. .length <
  425. 2) {
  426. this.selectValue = []
  427. return this.$util.Tips({
  428. title: '请先选择套餐商品'
  429. });
  430. }
  431. }
  432. for (let i = 0; i < this.discountsData[index].products.length; i++) {
  433. for (let j = 0; j < this.selectValue.length; j++) {
  434. if (this.discountsData[index].products[i].id == this.selectValue[j]) {
  435. data.push(this.selectAttr[i])
  436. reqData.discountInfos.push({
  437. id: this.discountsData[index].products[i].id,
  438. unique: this.selectAttr[i].unique,
  439. product_id: this.discountsData[index].products[i].product_id
  440. })
  441. }
  442. }
  443. }
  444. postCartAdd(reqData)
  445. .then(function(res) {
  446. uni.navigateTo({
  447. url: '/pages/goods/order_confirm/index?new=1&noCoupon=1&cartId=' + res
  448. .data
  449. .cartId
  450. .join(',')
  451. });
  452. })
  453. .catch(err => {
  454. this.selectValue = []
  455. return this.$util.Tips({
  456. title: err
  457. });
  458. });
  459. },
  460. goOrder() {
  461. this.$set(this, 'isOpen', false);
  462. this.$set(this.attr, 'cartAttr', false);
  463. }
  464. }
  465. }
  466. </script>
  467. <style lang="scss" scoped>
  468. .discounts-list {
  469. background-color: #F5F5F5;
  470. }
  471. .discounts-box {
  472. padding: 15rpx 0 30rpx 0;
  473. background-color: #fff;
  474. margin-bottom: 20rpx;
  475. }
  476. .discounts-title {
  477. display: flex;
  478. justify-content: space-between;
  479. margin: 15rpx 20rpx 0 20rpx;
  480. padding-bottom: 15rpx;
  481. border-bottom: 1px solid #EEEEEE;
  482. font-size: 26rpx;
  483. font-weight: bold;
  484. .discounts-name{
  485. width: 540rpx;
  486. }
  487. .right-icon {
  488. display: flex;
  489. align-items: center;
  490. .iconfont {
  491. font-size: 25rpx;
  492. }
  493. }
  494. }
  495. .discounts-cart .noCart .pictrue image {
  496. width: 100%;
  497. height: 100%;
  498. }
  499. .discounts-cart .list {}
  500. .discounts-cart .list .item {
  501. padding: 25rpx 30rpx;
  502. background-color: #fff;
  503. margin-bottom: 15rpx;
  504. }
  505. .discounts-cart .list .item .pic-txt {
  506. width: 627rpx;
  507. position: relative;
  508. }
  509. .discounts-cart .list .item .pic-txt .pictrue {
  510. width: 160rpx;
  511. height: 160rpx;
  512. }
  513. .discounts-cart .list .item .pic-txt .pictrue image {
  514. width: 100%;
  515. height: 100%;
  516. border-radius: 6rpx;
  517. }
  518. .discounts-cart .list .item .pic-txt .text {
  519. width: 444rpx;
  520. font-size: 28rpx;
  521. color: #282828;
  522. }
  523. .discounts-cart .list .item .pic-txt .text .reColor {
  524. color: #333;
  525. }
  526. .discounts-cart .list .item .pic-txt .text .reElection {
  527. margin-top: 20rpx;
  528. }
  529. .discounts-cart .list .item .pic-txt .text .reElection .title {
  530. font-size: 24rpx;
  531. }
  532. .discounts-cart .list .item .pic-txt .text .reElection .reBnt {
  533. width: 120rpx;
  534. height: 46rpx;
  535. border-radius: 23rpx;
  536. font-size: 26rpx;
  537. }
  538. .discounts-cart .list .item .pic-txt .text .infor {
  539. display: flex;
  540. align-items: center;
  541. justify-content: space-between;
  542. font-size: 24rpx;
  543. color: #868686;
  544. margin-top: 16rpx;
  545. background-color: #F5F5F5;
  546. padding: 6rpx 10rpx;
  547. border-radius: 16rpx;
  548. .icon-xiangxia {
  549. font-size: 16rpx;
  550. }
  551. }
  552. .discounts-cart .list .item .pic-txt .text .price {
  553. margin-top: 28rpx;
  554. }
  555. .discounts-cart .list .item .pic-txt .text .money {
  556. font-size: 32rpx;
  557. color: #282828;
  558. }
  559. .discounts-cart .list .item .pic-txt .text .y_money {
  560. font-size: 22rpx;
  561. color: #999;
  562. text-decoration: line-through;
  563. margin-left: 10rpx;
  564. }
  565. .discounts-cart .list .item .pic-txt .carnum {
  566. height: 47rpx;
  567. position: absolute;
  568. bottom: 7rpx;
  569. right: 0;
  570. }
  571. .discounts-cart .list .item .pic-txt .carnum view {
  572. border: 1rpx solid #a4a4a4;
  573. width: 66rpx;
  574. text-align: center;
  575. height: 100%;
  576. line-height: 40rpx;
  577. font-size: 28rpx;
  578. color: #a4a4a4;
  579. }
  580. .discounts-cart .list .item .pic-txt .carnum .reduce {
  581. border-right: 0;
  582. border-radius: 3rpx 0 0 3rpx;
  583. }
  584. .discounts-cart .list .item .pic-txt .carnum .reduce.on {
  585. border-color: #e3e3e3;
  586. color: #dedede;
  587. }
  588. .discounts-cart .list .item .pic-txt .carnum .plus {
  589. border-left: 0;
  590. border-radius: 0 3rpx 3rpx 0;
  591. }
  592. .discounts-cart .list .item .pic-txt .carnum .num {
  593. color: #282828;
  594. }
  595. .save {
  596. margin-bottom: 20rpx;
  597. color: var(--view-priceColor);
  598. .money {
  599. font-size: 35rpx;
  600. font-weight: bold;
  601. }
  602. }
  603. .btn {
  604. text-align: center;
  605. color: #fff;
  606. padding: 15rpx 0;
  607. margin: 0 30rpx;
  608. background: var(--view-theme);
  609. box-shadow: 0px 0px 8px var(--view-minorColor);
  610. opacity: 1;
  611. border-radius: 16px;
  612. }
  613. .goods-image {
  614. display: flex;
  615. align-items: center;
  616. padding: 30rpx;
  617. width: 100%;
  618. overflow-x: scroll;
  619. .goods-image-box {
  620. display: flex;
  621. align-items: center;
  622. .add {
  623. font-size: 26rpx;
  624. color: #666666;
  625. padding: 0 20rpx;
  626. }
  627. .goods-image-sty {
  628. width: 180rpx;
  629. height: 180rpx;
  630. border-radius: 6rpx;
  631. }
  632. }
  633. }
  634. .count-price {
  635. margin-right: 10rpx;
  636. color: var(--view-priceColor);
  637. }
  638. .fade-enter-active,
  639. .fade-leave-active {
  640. transition: all 0.2s;
  641. }
  642. .fade-enter,
  643. .fade-leave-to
  644. /* .fade-leave-active below version 2.1.8 */
  645. {
  646. opacity: 0;
  647. transform: translateY(-30px);
  648. }
  649. </style>