menu.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707
  1. <template>
  2. <view class="menu-box display-flex">
  3. <scroll-view scroll-y="true" class="menu-box-left" :scroll-into-view="idMark" :scroll-with-animation='true'>
  4. <view class="menu-type-list-f">
  5. <view class="menu-type-list fs-26 box-border-box align-items-center flex-justify-center"
  6. v-for="(item,i) in categoryData" :key="i" @click="selectType(item)"
  7. :class="type === item.type?'bgc-f fc-3 fw-600':'fc-6 fw-400'" :id="'scroll'+ item.type">
  8. {{item.name}}
  9. <view class="menu-type-num fc-f" v-show="item.num > 0">{{item.num > 99?'99+':item.num}}</view>
  10. </view>
  11. </view>
  12. </scroll-view>
  13. <scroll-view :scroll-y="true" :scroll-with-animation='true' :scroll-into-view="idMark" @scroll="menuScroll">
  14. <view class="menu-box-right">
  15. <view class="menu-box-only" v-for="(item,i) in categoryData" :key="i" :id="'scroll'+ item.type">
  16. <view class="mb-32 fs-30">{{item.name}}</view>
  17. <view class="menu-list flex-justify-space" v-for="(info,k) in item.list" :key="k">
  18. <image class="flex-shrink0 goods_img" :src="info.goods_image" mode="scaleToFill"></image>
  19. <view class="menu-list-right">
  20. <view class="mb-4 goods-name text-overflow-ellipsis fs-34 fw-600">{{info.goods_name}}</view>
  21. <view class="mb-20 fw-400 fc-9 fs-24">月销{{info.sales}}</view>
  22. <view class="flex-justify-space align-items-flex-end">
  23. <view class="">
  24. <span class="fs-24 fw-400 fc-FB3D03">¥</span>
  25. <span
  26. class="fs-40 fw-b fc-FB3D03">{{info.seckill_money>0?info.seckill_money:info.price}}</span>
  27. <view class="">
  28. <span class="fs-24 fc-9 fw-400 text-line-through">¥{{info.line_price}}</span>
  29. </view>
  30. </view>
  31. <view class="display-flex align-items-center" v-if="info.spec_type == 1">
  32. <image v-show="info.num > 0" class="wh-44" @click="addred(1,i,k,info)"
  33. src="@/static/img/takeout/j.png" mode=""></image>
  34. <view v-show="info.num > 0"
  35. class="right-only-right-2 text-align-center fs-28 fw-400">{{info.num}}</view>
  36. <image class="wh-44" src="@/static/img/takeout/add.png" @click="addred(2,i,k,info)"
  37. mode=""></image>
  38. </view>
  39. <view v-else class="right-only-right text-align-center" @click="addred(3,i,k,info)">
  40. <view class="fw-600 fs-28 fc-f">
  41. 选规格
  42. </view>
  43. <view class="selectedNum" v-if="info.num>0">
  44. {{info.num}}
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </scroll-view>
  53. <uni-popup ref="popupGG" type="bottom">
  54. <view class="gg-box flex-index-css">
  55. <view class="flex-justify-space box-border-box p-32">
  56. <view class="fs-32 fw-500 fc-0">商品详情规格</view>
  57. <view class="" @click="addred(4)">
  58. <uni-icons type="closeempty" size="20"></uni-icons>
  59. </view>
  60. </view>
  61. <view class="goods-info flex-justify-space mb-32 box-border-box plr-32">
  62. <image v-if="popData.goodsItem.goods_image" :src="popData.goodsItem.goods_image" mode="scaleToFill">
  63. </image>
  64. <view class="flex-1">
  65. <view style="width: 446rpx;" class="fw-600 fs-34 text-overflow-ellipsis-one">
  66. {{popData.goodsItem.goods_name}}
  67. </view>
  68. <view class="fw-400 fc-9 fs-24">月销{{popData.goodsItem.sales}}</view>
  69. </view>
  70. </view>
  71. <scroll-view scroll-y="true" class="scroll-view-css box-border-box plr-32">
  72. <view class="" v-for="(item,i) in popData.spec_attr" :key="i">
  73. <view class="fs-32 fw-500 fc-0 mb-32">{{item.group_name}}</view>
  74. <view class="flex-wrap-wrap">
  75. <view class="spec-item text-align-center fs-28"
  76. :class="popData.spec_ids.indexOf(info.item_id)>=0?'s-item':'n-item'"
  77. v-for="(info,k) in item.spec_items" :key="k" @click="selectSpec(info,i)">
  78. {{info.spec_value}}
  79. </view>
  80. </view>
  81. </view>
  82. </scroll-view>
  83. <!-- <view class="scroll-view-css box-border-box plr-32">
  84. <view class="" v-for="(item,i) in popData.spec_attr" :key="i">
  85. <view class="fs-32 fw-500 fc-0 mb-32">{{item.group_name}}</view>
  86. <view class="flex-wrap-wrap">
  87. <view class="spec-item text-align-center fs-28"
  88. :class="popData.spec_ids.indexOf(info.item_id)>=0?'s-item':'n-item'"
  89. v-for="(info,k) in item.spec_items" :key="k" @click="selectSpec(info,i)">
  90. {{info.spec_value}}
  91. </view>
  92. </view>
  93. </view>
  94. </view> -->
  95. <view class="pop-buttom box-border-box plr-32">
  96. <view class="flex-justify-space mb-28">
  97. <view class="pop-buttom-left">
  98. <view class="">
  99. <span class="fw-600 fs-32 fc-ED301D">¥</span>
  100. <span class="fw-600 fs-48 fc-ED301D">{{popData.price}}</span>
  101. </view>
  102. <view class="">
  103. <span class="fw-400 fs-24 fc-9">已选规格:</span>
  104. <span class="fw-400 fs-24">{{popData.spec_name.join(';')}}</span>
  105. </view>
  106. </view>
  107. <view class="display-flex align-items-center">
  108. <image class="wh-44" @click.stop="setSpecNum(1)" src="@/static/img/takeout/j.png" mode="">
  109. </image>
  110. <view class="right-only-right-2 text-align-center fs-28 fw-400">{{popData.num}}</view>
  111. <image class="wh-44" src="@/static/img/takeout/add.png" @click.stop="setSpecNum(2)" mode="">
  112. </image>
  113. </view>
  114. </view>
  115. <view class="pop-buttom-2 text-align-center fs-32 fw-600 fc-f" @click="addred(4)">选好了</view>
  116. </view>
  117. </view>
  118. </uni-popup>
  119. </view>
  120. </template>
  121. <script>
  122. import tools from "@/service/tools";
  123. import {
  124. shopCategory,
  125. shopGoods,
  126. shopGoodsSpec
  127. } from "@/api/shop";
  128. import {
  129. getShopIngList,
  130. setShopIngAdd,
  131. setShopIngDel,
  132. setShopIngNumber
  133. } from "@/api/shopping";
  134. export default {
  135. name: 'menu-box',
  136. props: {
  137. 'shop_id': {
  138. default: 0
  139. }
  140. },
  141. data() {
  142. return {
  143. idMark: '', //滚动自适应参数
  144. type: 1, //分类标识
  145. typeList: [],
  146. categoryData: [],
  147. menuList: [],
  148. cartData: {
  149. total_price: 0,
  150. total_num: 0,
  151. total_goods_money: 0,
  152. pack_price: 0,
  153. must_category: 0,
  154. is_place_order: 0,
  155. err_msg: 0,
  156. goods_list: [],
  157. },
  158. isAjax: false,
  159. operate_id: '',
  160. popData: {
  161. goodsItem: {},
  162. price: '0.00',
  163. line_price: '',
  164. num: 0,
  165. goods_id: '',
  166. spec_key: '',
  167. goods_spec_id: '',
  168. spec_name: [],
  169. spec_ids: [],
  170. spec_list: [],
  171. spec_attr: [],
  172. },
  173. selectedNum: 1
  174. }
  175. },
  176. watch: {
  177. 'shop_id': function() {
  178. this.getShopGoods();
  179. }
  180. },
  181. mounted() {
  182. this.operate_id = uni.getStorageSync('operate_id')
  183. this.getShopGoods();
  184. this.getShopIngList(true);
  185. },
  186. methods: {
  187. setSpecNum(type) {
  188. if (!this.popData.goods_spec_id) {
  189. tools.error('请选择规格')
  190. return;
  191. }
  192. if (type === 1) {
  193. // 减
  194. if (this.popData.num > 0) {
  195. --this.popData.num;
  196. } else {
  197. this.isAjax = false
  198. }
  199. } else {
  200. // 加
  201. ++this.popData.num;
  202. }
  203. },
  204. getShopGoodsSpec(item) {
  205. shopGoodsSpec({
  206. 'goods_id': item.goods_id
  207. }).then(res => {
  208. this.popData.goodsItem = item
  209. if (this.popData.goods_id !== item.goods_id) {
  210. this.popData.goods_id = item.goods_id
  211. this.popData.spec_name = []
  212. this.popData.price = '0.00'
  213. this.popData.line_price = ''
  214. this.popData.spec_key = ''
  215. this.popData.num = 1
  216. this.popData.spec_ids = []
  217. } else {
  218. this.popData.num = 1;
  219. if (this.cartData.goods_list.length > 0) {
  220. this.cartData.goods_list.forEach(item => {
  221. if (item.spec_sku_id === this.popData.spec_key) {
  222. this.popData.num = item.goods_number
  223. }
  224. })
  225. }
  226. }
  227. this.popData.spec_list = res.data.spec_list
  228. this.popData.spec_attr = res.data.spec_attr
  229. this.$refs.popupGG.open();
  230. this.setGoodsSpecPrice()
  231. this.isAjax = false
  232. }).catch(() => {
  233. tools.error('规格信息异常')
  234. this.isAjax = false
  235. })
  236. },
  237. setGoodsSpecPrice() {
  238. console.log(this.popData.spec_ids)
  239. if (this.popData.spec_ids.length > 0) {
  240. let spec_ids = JSON.parse(JSON.stringify(this.popData.spec_ids))
  241. spec_ids.sort((a, b) => a - b);
  242. let spec_key = spec_ids.join('_')
  243. this.popData.spec_key = spec_key
  244. console.log('this.popData.spec_list[spec_key]',this.popData.spec_list[spec_key])
  245. if (this.popData.spec_list[spec_key] !== undefined) {
  246. this.popData.price = this.popData.spec_list[spec_key].seckill_money > 0 ? this.popData.spec_list[
  247. spec_key].seckill_money : this.popData.spec_list[spec_key].price
  248. this.popData.line_price = this.popData.spec_list[spec_key].line_price
  249. if(this.popData.goods_spec_id!==this.popData.spec_list[spec_key].goods_spec_id + ''){
  250. this.popData.num =1
  251. }
  252. this.popData.goods_spec_id = this.popData.spec_list[spec_key].goods_spec_id + ''
  253. let cartKey = this.cartData.goods_list.findIndex(row => this.popData.goods_spec_id * 1 === row
  254. .goods_spec_id * 1)
  255. if (cartKey >= 0) {
  256. this.popData.num = this.cartData.goods_list[cartKey].goods_number
  257. }
  258. }else {
  259. this.popData.line_price ='0.00'
  260. this.popData.price ='0.00'
  261. this.popData.num =0
  262. this.popData.goods_spec_id =''
  263. }
  264. }else {
  265. this.popData.price ='0.00'
  266. this.popData.line_price ='0.00'
  267. this.popData.num =0
  268. this.popData.goods_spec_id =''
  269. }
  270. },
  271. setShopIngList(cartData) {
  272. this.cartData = cartData
  273. this.setGoodsNum()
  274. },
  275. getShopIngList(isStart) {
  276. getShopIngList({
  277. 'shop_id': this.shop_id,
  278. }).then(res => {
  279. if (res.code === 1) {
  280. this.cartData = res.data
  281. this.$emit('setCartData', this.cartData)
  282. this.setGoodsNum()
  283. }
  284. })
  285. },
  286. setGoodsNum() {
  287. if (this.cartData.goods_list.length > 0) {
  288. let goodsIds = []
  289. this.cartData.goods_list.forEach(item => {
  290. this.categoryData.forEach(categoryItem => {
  291. if (categoryItem.type === item.category_id) {
  292. categoryItem.list.forEach(goodsItem => {
  293. console.log(item.goods_id, goodsItem.goods_id)
  294. if (item.goods_id === goodsItem.goods_id) {
  295. if (goodsIds.indexOf(item.goods_id) < 0) {
  296. goodsIds.push(item.goods_id)
  297. goodsItem.num = item.goods_number * 1
  298. } else {
  299. goodsItem.num += item.goods_number * 1
  300. }
  301. }
  302. })
  303. }
  304. })
  305. })
  306. } else {
  307. //购物车数据清除
  308. this.categoryData.forEach(categoryItem => {
  309. categoryItem.list.forEach(goodsItem => {
  310. goodsItem.num = 0
  311. })
  312. })
  313. }
  314. },
  315. getShopGoods() {
  316. if (this.shop_id < 0 || !this.operate_id) {
  317. return;
  318. }
  319. shopGoods({
  320. 'shop_id': this.shop_id,
  321. operate_id: this.operate_id,
  322. }).then(res => {
  323. if (res.code === 1) {
  324. this.categoryData = res.data
  325. if (this.categoryData.length > 0) {
  326. this.selectType(this.categoryData[0])
  327. }
  328. this.categoryData.forEach(categoryItem => {
  329. categoryItem.list.forEach(goodsItem => {
  330. goodsItem.payNum = 0
  331. goodsItem.spec = []
  332. })
  333. })
  334. // console.log(res)
  335. setTimeout(() => {
  336. this.setGoodsNum()
  337. }, 1000)
  338. }
  339. })
  340. },
  341. selectType(item) {
  342. if (this.type != item.type) {
  343. this.type = item.type;
  344. this.idMark = 'scroll' + item.type
  345. }
  346. },
  347. menuScroll(e) {
  348. let _this = this;
  349. let query = uni.createSelectorQuery().in(this);
  350. // console.log(e.detail, '%%%%%%%%%%');
  351. query.selectAll(".menu-box-only").boundingClientRect(data => {
  352. data.forEach((v) => {
  353. if (data[this.categoryData.length - 1].top <= 392) {
  354. return
  355. }
  356. // console.log(data[this.categoryData.length - 1].top, '^^^^^^^^^^^^^^');
  357. // console.log(v.top, '^^^^^^^^^^^^^^');
  358. if (v.top < 332 && v.top > 0) {
  359. _this.idMark = v.id;
  360. let arr = v.id.split('scroll');
  361. _this.type = Number(arr[1]);
  362. }
  363. })
  364. }).exec();
  365. },
  366. addred(type, i, k, item) {
  367. if (this.isAjax) {
  368. return
  369. }
  370. this.isAjax = true
  371. if (type === 1) {
  372. // 减
  373. if (item.num > 0) {
  374. // --item.num;
  375. this.setSub(item, type);
  376. } else {
  377. this.isAjax = false
  378. }
  379. } else if (type === 2) {
  380. // 加
  381. if (item.is_infinite === 1 || item.stock > item.num) {
  382. // ++item.num;
  383. this.setSub(item, type);
  384. } else {
  385. this.isAjax = false
  386. }
  387. // this.menuList[i].list[k].num += 1;
  388. // this.setSub(item);
  389. } else if (type === 3) {
  390. // 选规格
  391. this.getShopGoodsSpec(item)
  392. } else {
  393. this.$refs.popupGG.close();
  394. console.log('this.popData.goods_spec_id')
  395. console.log(this.popData.goods_spec_id)
  396. if (this.popData.goods_spec_id) {
  397. let cartKey = this.cartData.goods_list.findIndex(row => this.popData.goods_spec_id === row
  398. .goods_spec_id)
  399. console.log(cartKey)
  400. let addType = this.popData.num > 0 ? 2 : 1
  401. console.log('addType:' + addType)
  402. if (addType === 2 && cartKey < 0) {
  403. this.setShopIngAdd(this.popData.goods_id, this.popData.goodsItem.category_id, this.popData
  404. .goods_spec_id, this.popData.num)
  405. } else {
  406. this.setShopIngNumber(this.popData.goods_id, this.popData.goodsItem.category_id, type, this
  407. .popData
  408. .goods_spec_id, this.popData.num)
  409. }
  410. }else {
  411. console.log('无规格信息')
  412. }
  413. this.isAjax = false
  414. }
  415. },
  416. setSub(item, type) {
  417. let cartKey = this.cartData.goods_list.findIndex(row => row.goods_id === item.goods_id)
  418. if (type === 2 && cartKey < 0) {
  419. this.setShopIngAdd(item.goods_id, item.category_id, '', 1, item)
  420. } else {
  421. this.setShopIngNumber(item.goods_id, item.category_id, type, '', 1, item)
  422. }
  423. },
  424. setShopIngAdd(goodsId, categoryId, goodsSpecId, number, item) {
  425. setShopIngAdd({
  426. 'type': 1,
  427. 'goods_id': goodsId,
  428. 'shop_id': this.shop_id,
  429. 'category_id': categoryId,
  430. 'goods_spec_id': goodsSpecId,
  431. 'number': number,
  432. }).then(res => {
  433. this.isAjax = false
  434. if (res.code === 1) {
  435. if (item) {
  436. ++item.num;
  437. }
  438. this.getShopIngList()
  439. } else {
  440. tools.error(res.msg)
  441. }
  442. }).catch(() => {
  443. this.isAjax = false
  444. })
  445. },
  446. setShopIngNumber(goodsId, categoryId, operation, goodsSpecId, number, item) {
  447. setShopIngNumber({
  448. 'type': 1,
  449. 'goods_id': goodsId,
  450. 'shop_id': this.shop_id,
  451. 'category_id': categoryId,
  452. 'goods_spec_id': goodsSpecId,
  453. 'number': number,
  454. 'operation': operation === 2 ? 1 : 2,
  455. }).then(res => {
  456. this.isAjax = false
  457. if (res.code === 1) {
  458. if (item) {
  459. if (operation === 2) {
  460. ++item.num;
  461. } else {
  462. --item.num;
  463. }
  464. }
  465. this.getShopIngList()
  466. } else {
  467. tools.error(res.msg)
  468. }
  469. }).catch(() => {
  470. this.isAjax = false
  471. })
  472. },
  473. setShopIngDel() {},
  474. // -------弹窗选择规格-----------
  475. selectSpec(info, groupKey) {
  476. let specKey = this.popData.spec_ids.indexOf(info.item_id)
  477. if (specKey >= 0) {
  478. this.popData.spec_ids.splice(specKey, 1)
  479. this.popData.spec_name.splice(specKey, 1)
  480. } else {
  481. this.popData.spec_ids.push(info.item_id)
  482. this.popData.spec_name.push(info.spec_value)
  483. for (const attrKey in this.popData.spec_attr[groupKey].spec_items) {
  484. if (this.popData.spec_attr[groupKey].spec_items[attrKey].item_id !== info.item_id) {
  485. let oldKey = this.popData.spec_ids.indexOf(this.popData.spec_attr[groupKey].spec_items[attrKey]
  486. .item_id)
  487. if (oldKey >= 0) {
  488. this.popData.spec_ids.splice(oldKey, 1)
  489. this.popData.spec_name.splice(oldKey, 1)
  490. }
  491. }
  492. }
  493. }
  494. // this.spec_ids = this.popData.spec_list.join('_')
  495. this.setGoodsSpecPrice()
  496. },
  497. },
  498. }
  499. </script>
  500. <style scoped lang="scss">
  501. .wh-44 {
  502. width: 44rpx;
  503. height: 44rpx;
  504. }
  505. .menu-box {
  506. height: 100%;
  507. .menu-box-left {
  508. width: 160rpx;
  509. height: 100%;
  510. background-color: #F7F8FA;
  511. // border-radius: 0rpx 20rpx 0 0rpx;
  512. .menu-type-list-f {
  513. width: 160rpx;
  514. height: 100%;
  515. .menu-type-list {
  516. width: 160rpx;
  517. min-height: 108rpx;
  518. padding: 18rpx 28rpx;
  519. position: relative;
  520. .menu-type-num {
  521. position: absolute;
  522. top: 2rpx;
  523. right: 8rpx;
  524. padding: 0 6rpx;
  525. min-width: 20rpx;
  526. height: 32rpx;
  527. text-align: center;
  528. line-height: 32rpx;
  529. background: #FB3D03;
  530. border-radius: 50%;
  531. }
  532. }
  533. }
  534. }
  535. .menu-box-right {
  536. // flex: 1;
  537. width: 100%;
  538. height: 100%;
  539. padding: 16rpx 12rpx 16rpx 16rpx;
  540. box-sizing: border-box;
  541. .menu-list {
  542. width: 100%;
  543. // height: 200rpx;
  544. margin-bottom: 40rpx;
  545. .goods_img {
  546. width: 200rpx;
  547. height: 200rpx;
  548. border-radius: 12rpx;
  549. margin-right: 16rpx;
  550. }
  551. .menu-list-right {
  552. flex: 1;
  553. .right-only-right {
  554. width: 100rpx;
  555. height: 44rpx;
  556. background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
  557. border-radius: 12rpx;
  558. line-height: 44rpx;
  559. position: relative;
  560. .selectedNum {
  561. position: absolute;
  562. right: 2rpx;
  563. top: -22rpx;
  564. font-size: 24rpx;
  565. color: #fff;
  566. width: 32rpx;
  567. height: 32rpx;
  568. line-height: 32rpx;
  569. background: #FB3D03;
  570. border-radius: 50%;
  571. }
  572. }
  573. .right-only-right-red {
  574. width: 44rpx;
  575. height: 44rpx;
  576. line-height: 40rpx;
  577. border-radius: 12rpx;
  578. border: 1rpx solid #41ABF5;
  579. color: #41ABF5;
  580. }
  581. .right-only-right-add {
  582. width: 44rpx;
  583. height: 44rpx;
  584. line-height: 40rpx;
  585. background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
  586. border-radius: 12rpx;
  587. }
  588. .right-only-right-2 {
  589. min-width: 50rpx;
  590. }
  591. }
  592. }
  593. }
  594. .gg-box {
  595. width: 750rpx;
  596. height: 1208rpx;
  597. background: #FFFFFF;
  598. border-radius: 24rpx 24rpx 0rpx 0rpx;
  599. .goods-info {
  600. border-bottom: 1rpx solid #EEEEEE;
  601. image {
  602. width: 170rpx;
  603. height: 160rpx;
  604. border-radius: 8rpx;
  605. margin-right: 22rpx;
  606. margin-bottom: 32rpx;
  607. }
  608. }
  609. .pop-buttom {
  610. width: 100%;
  611. // height: 250rpx;
  612. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(51, 51, 51, 0.1);
  613. .pop-buttom-left {
  614. padding-top: 12rpx;
  615. }
  616. .pop-buttom-2 {
  617. width: 100%;
  618. height: 96rpx;
  619. line-height: 96rpx;
  620. background: #41ABF5;
  621. border-radius: 200rpx
  622. }
  623. .right-only-right-red {
  624. width: 44rpx;
  625. height: 44rpx;
  626. line-height: 40rpx;
  627. border-radius: 12rpx;
  628. border: 1rpx solid #41ABF5;
  629. color: #41ABF5;
  630. }
  631. .right-only-right-add {
  632. width: 44rpx;
  633. height: 44rpx;
  634. line-height: 40rpx;
  635. background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
  636. border-radius: 12rpx;
  637. }
  638. .right-only-right-2 {
  639. min-width: 50rpx;
  640. }
  641. }
  642. .spec-item {
  643. min-width: 210rpx;
  644. height: 66rpx;
  645. line-height: 66rpx;
  646. box-sizing: border-box;
  647. border-radius: 12rpx;
  648. margin: 0 26rpx 26rpx 0;
  649. padding: 0 10rpx;
  650. }
  651. .spec-item:nth-child(3) {
  652. margin-right: 0rpx !important;
  653. }
  654. .s-item {
  655. background-color: #ECF7FE;
  656. border: 2rpx solid #41ABF5;
  657. color: #41ABF5;
  658. }
  659. .n-item {
  660. border: 2rpx solid #EEEEEE;
  661. color: #000;
  662. }
  663. }
  664. }
  665. .goods-name {
  666. max-width: 310rpx;
  667. }
  668. </style>