menu.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731
  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="gbPop">
  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. is_quota: 0,
  167. is_infinite: 0,
  168. quota_num: 0,
  169. stock: 0,
  170. spec_key: '',
  171. goods_spec_id: '',
  172. spec_name: [],
  173. spec_ids: [],
  174. spec_list: [],
  175. spec_attr: [],
  176. },
  177. selectedNum: 1
  178. }
  179. },
  180. watch: {
  181. 'shop_id': function() {
  182. this.getShopGoods();
  183. }
  184. },
  185. mounted() {
  186. this.operate_id = uni.getStorageSync('operate_id')
  187. this.getShopGoods();
  188. this.getShopIngList(true);
  189. },
  190. methods: {
  191. setSpecNum(type) {
  192. if (!this.popData.goods_spec_id) {
  193. tools.error('请选择规格')
  194. return;
  195. }
  196. if (type === 1) {
  197. // 减
  198. if (this.popData.num > 0) {
  199. --this.popData.num;
  200. } else {
  201. this.isAjax = false
  202. }
  203. } else {
  204. // 加
  205. ++this.popData.num;
  206. if (this.popData.is_infinite === 0 && this.popData.num > this.popData.stock) {
  207. tools.error('最多购买' + this.popData.quota_num + '件')
  208. this.popData.num = this.popData.stock
  209. } else if (this.popData.is_quota > 0 && this.popData.num > this.popData.quota_num) {
  210. tools.error('限购' + this.popData.quota_num + '件')
  211. this.popData.num = this.popData.quota_num
  212. }
  213. }
  214. },
  215. getShopGoodsSpec(item) {
  216. shopGoodsSpec({
  217. 'goods_id': item.goods_id
  218. }).then(res => {
  219. this.popData.goodsItem = item
  220. if (this.popData.goods_id !== item.goods_id) {
  221. this.popData.goods_id = item.goods_id
  222. this.popData.spec_name = []
  223. this.popData.price = '0.00'
  224. this.popData.line_price = ''
  225. this.popData.spec_key = ''
  226. this.popData.num = 1
  227. this.popData.spec_ids = []
  228. } else {
  229. this.popData.num = 1;
  230. if (this.cartData.goods_list.length > 0) {
  231. this.cartData.goods_list.forEach(item => {
  232. if (item.spec_sku_id === this.popData.spec_key) {
  233. this.popData.num = item.goods_number
  234. }
  235. })
  236. }
  237. }
  238. this.popData.spec_list = res.data.spec_list
  239. this.popData.spec_attr = res.data.spec_attr
  240. this.$refs.popupGG.open();
  241. this.setGoodsSpecPrice()
  242. this.isAjax = false
  243. }).catch(() => {
  244. tools.error('规格信息异常')
  245. this.isAjax = false
  246. })
  247. },
  248. setGoodsSpecPrice() {
  249. console.log(this.popData.spec_ids)
  250. if (this.popData.spec_ids.length > 0) {
  251. let spec_ids = JSON.parse(JSON.stringify(this.popData.spec_ids))
  252. spec_ids.sort((a, b) => a - b);
  253. let spec_key = spec_ids.join('_')
  254. this.popData.spec_key = spec_key
  255. console.log('this.popData.spec_list[spec_key]', this.popData.spec_list[spec_key])
  256. if (this.popData.spec_list[spec_key] !== undefined) {
  257. this.popData.price = this.popData.spec_list[spec_key].seckill_money > 0 ? this.popData.spec_list[
  258. spec_key].seckill_money : this.popData.spec_list[spec_key].price
  259. this.popData.line_price = this.popData.spec_list[spec_key].line_price
  260. if (this.popData.goods_spec_id !== this.popData.spec_list[spec_key].goods_spec_id + '') {
  261. this.popData.num = 1
  262. }
  263. this.popData.goods_spec_id = this.popData.spec_list[spec_key].goods_spec_id + ''
  264. let cartKey = this.cartData.goods_list.findIndex(row => this.popData.goods_spec_id * 1 === row
  265. .goods_spec_id * 1)
  266. if (cartKey >= 0) {
  267. this.popData.num = this.cartData.goods_list[cartKey].goods_number
  268. }
  269. } else {
  270. this.popData.line_price = '0.00'
  271. this.popData.price = '0.00'
  272. this.popData.num = 0
  273. this.popData.goods_spec_id = ''
  274. }
  275. } else {
  276. this.popData.price = '0.00'
  277. this.popData.line_price = '0.00'
  278. this.popData.num = 0
  279. this.popData.goods_spec_id = ''
  280. }
  281. },
  282. setShopIngList(cartData) {
  283. this.cartData = cartData
  284. this.setGoodsNum()
  285. },
  286. getShopIngList(isStart) {
  287. getShopIngList({
  288. 'shop_id': this.shop_id,
  289. }).then(res => {
  290. if (res.code === 1) {
  291. this.cartData = res.data
  292. this.$emit('setCartData', this.cartData)
  293. this.setGoodsNum()
  294. }
  295. })
  296. },
  297. setGoodsNum() {
  298. if (this.cartData.goods_list.length > 0) {
  299. let goodsIds = []
  300. this.categoryData.forEach(categoryItem => {
  301. categoryItem.list.forEach(goodsItem => {
  302. goodsItem.num = 0
  303. this.cartData.goods_list.forEach(item => {
  304. if (item.goods_id === goodsItem.goods_id) {
  305. if (goodsIds.indexOf(item.goods_id) < 0) {
  306. goodsIds.push(item.goods_id)
  307. goodsItem.num = item.goods_number * 1
  308. } else {
  309. goodsItem.num += item.goods_number * 1
  310. }
  311. }
  312. })
  313. })
  314. })
  315. } else {
  316. //购物车数据清除
  317. this.categoryData.forEach(categoryItem => {
  318. categoryItem.list.forEach(goodsItem => {
  319. goodsItem.num = 0
  320. })
  321. })
  322. }
  323. },
  324. getShopGoods() {
  325. if (this.shop_id < 0 || !this.operate_id) {
  326. return;
  327. }
  328. shopGoods({
  329. 'shop_id': this.shop_id,
  330. operate_id: this.operate_id,
  331. }).then(res => {
  332. if (res.code === 1) {
  333. this.categoryData = res.data
  334. if (this.categoryData.length > 0) {
  335. this.selectType(this.categoryData[0])
  336. }
  337. this.categoryData.forEach(categoryItem => {
  338. categoryItem.list.forEach(goodsItem => {
  339. goodsItem.payNum = 0
  340. goodsItem.spec = []
  341. })
  342. })
  343. // console.log(res)
  344. setTimeout(() => {
  345. this.setGoodsNum()
  346. }, 1000)
  347. }
  348. })
  349. },
  350. selectType(item) {
  351. if (this.type != item.type) {
  352. this.type = item.type;
  353. this.idMark = 'scroll' + item.type
  354. }
  355. },
  356. menuScroll(e) {
  357. let _this = this;
  358. let query = uni.createSelectorQuery().in(this);
  359. // console.log(e.detail, '%%%%%%%%%%');
  360. query.selectAll(".menu-box-only").boundingClientRect(data => {
  361. data.forEach((v) => {
  362. if (data[this.categoryData.length - 1].top <= 392) {
  363. return
  364. }
  365. // console.log(data[this.categoryData.length - 1].top, '^^^^^^^^^^^^^^');
  366. // console.log(v.top, '^^^^^^^^^^^^^^');
  367. if (v.top < 332 && v.top > 0) {
  368. _this.idMark = v.id;
  369. let arr = v.id.split('scroll');
  370. _this.type = Number(arr[1]);
  371. }
  372. })
  373. }).exec();
  374. },
  375. addred(type, i, k, item) {
  376. if (this.isAjax) {
  377. return
  378. }
  379. this.isAjax = true
  380. if (type === 1) {
  381. // 减
  382. if (item.num > 0) {
  383. // --item.num;
  384. this.setSub(item, type);
  385. } else {
  386. this.isAjax = false
  387. }
  388. } else if (type === 2) {
  389. // 加
  390. console.log(item)
  391. console.log(item.is_infinite)
  392. console.log(item.num)
  393. console.log(item.stock)
  394. if (item.is_infinite === 0 && item.num >= item.stock) {
  395. tools.error('最多购买' + item.quota_num + '件')
  396. this.isAjax = false
  397. } else if (item.is_quota > 0 && item.num >= item.quota_num) {
  398. tools.error('限购' + item.quota_num + '件')
  399. this.isAjax = false
  400. } else {
  401. this.setSub(item, type);
  402. }
  403. } else if (type === 3) {
  404. // 选规格
  405. this.popData.is_quota = item.is_quota
  406. this.popData.quota_num = item.quota_num
  407. this.popData.is_infinite = item.is_infinite
  408. this.popData.stock = item.stock
  409. this.getShopGoodsSpec(item)
  410. } else {
  411. this.$refs.popupGG.close();
  412. console.log('this.popData.goods_spec_id')
  413. console.log(this.popData.goods_spec_id)
  414. if (this.popData.goods_spec_id) {
  415. let cartKey = this.cartData.goods_list.findIndex(row => this.popData.goods_spec_id === row
  416. .goods_spec_id)
  417. console.log(cartKey)
  418. let addType = this.popData.num > 0 ? 2 : 1
  419. console.log('addType:' + addType)
  420. if (addType === 2 && cartKey < 0) {
  421. this.setShopIngAdd(this.popData.goods_id, this.popData.goodsItem.category_id, this.popData
  422. .goods_spec_id, this.popData.num)
  423. } else {
  424. this.setShopIngNumber(this.popData.goods_id, this.popData.goodsItem.category_id, type, this
  425. .popData
  426. .goods_spec_id, this.popData.num)
  427. }
  428. } else {
  429. console.log('无规格信息')
  430. }
  431. this.isAjax = false
  432. }
  433. },
  434. gbPop() {
  435. this.$refs.popupGG.close();
  436. },
  437. setSub(item, type) {
  438. let cartKey = this.cartData.goods_list.findIndex(row => row.goods_id === item.goods_id)
  439. if (type === 2 && cartKey < 0) {
  440. this.setShopIngAdd(item.goods_id, item.category_id, '', 1, item)
  441. } else {
  442. this.setShopIngNumber(item.goods_id, item.category_id, type, '', 1, item)
  443. }
  444. },
  445. setShopIngAdd(goodsId, categoryId, goodsSpecId, number, item) {
  446. setShopIngAdd({
  447. 'type': 1,
  448. 'goods_id': goodsId,
  449. 'shop_id': this.shop_id,
  450. 'category_id': categoryId,
  451. 'goods_spec_id': goodsSpecId,
  452. 'number': number,
  453. }).then(res => {
  454. this.isAjax = false
  455. if (res.code === 1) {
  456. if (item) {
  457. ++item.num;
  458. }
  459. this.getShopIngList()
  460. } else {
  461. tools.error(res.msg)
  462. }
  463. }).catch(() => {
  464. this.isAjax = false
  465. })
  466. },
  467. setShopIngNumber(goodsId, categoryId, operation, goodsSpecId, number, item) {
  468. setShopIngNumber({
  469. 'type': 1,
  470. 'goods_id': goodsId,
  471. 'shop_id': this.shop_id,
  472. 'category_id': categoryId,
  473. 'goods_spec_id': goodsSpecId,
  474. 'number': number,
  475. 'operation': operation === 2 ? 1 : 2,
  476. }).then(res => {
  477. this.isAjax = false
  478. if (res.code === 1) {
  479. if (item) {
  480. if (operation === 2) {
  481. ++item.num;
  482. } else {
  483. --item.num;
  484. }
  485. }
  486. this.getShopIngList()
  487. } else {
  488. tools.error(res.msg)
  489. }
  490. }).catch(() => {
  491. this.isAjax = false
  492. })
  493. },
  494. setShopIngDel() {},
  495. // -------弹窗选择规格-----------
  496. selectSpec(info, groupKey) {
  497. let specKey = this.popData.spec_ids.indexOf(info.item_id)
  498. if (specKey >= 0) {
  499. this.popData.spec_ids.splice(specKey, 1)
  500. this.popData.spec_name.splice(specKey, 1)
  501. } else {
  502. this.popData.spec_ids.push(info.item_id)
  503. this.popData.spec_name.push(info.spec_value)
  504. for (const attrKey in this.popData.spec_attr[groupKey].spec_items) {
  505. if (this.popData.spec_attr[groupKey].spec_items[attrKey].item_id !== info.item_id) {
  506. let oldKey = this.popData.spec_ids.indexOf(this.popData.spec_attr[groupKey].spec_items[attrKey]
  507. .item_id)
  508. if (oldKey >= 0) {
  509. this.popData.spec_ids.splice(oldKey, 1)
  510. this.popData.spec_name.splice(oldKey, 1)
  511. }
  512. }
  513. }
  514. }
  515. // this.spec_ids = this.popData.spec_list.join('_')
  516. this.setGoodsSpecPrice()
  517. },
  518. },
  519. }
  520. </script>
  521. <style scoped lang="scss">
  522. .wh-44 {
  523. width: 44rpx;
  524. height: 44rpx;
  525. }
  526. .menu-box {
  527. height: 100%;
  528. .menu-box-left {
  529. width: 160rpx;
  530. height: 100%;
  531. background-color: #F7F8FA;
  532. // border-radius: 0rpx 20rpx 0 0rpx;
  533. .menu-type-list-f {
  534. width: 160rpx;
  535. height: 100%;
  536. .menu-type-list {
  537. width: 160rpx;
  538. min-height: 108rpx;
  539. padding: 18rpx 28rpx;
  540. position: relative;
  541. .menu-type-num {
  542. position: absolute;
  543. top: 2rpx;
  544. right: 8rpx;
  545. padding: 0 6rpx;
  546. min-width: 20rpx;
  547. height: 32rpx;
  548. text-align: center;
  549. line-height: 32rpx;
  550. background: #FB3D03;
  551. border-radius: 50%;
  552. }
  553. }
  554. }
  555. }
  556. .menu-box-right {
  557. // flex: 1;
  558. width: 100%;
  559. height: 100%;
  560. padding: 16rpx 12rpx 16rpx 16rpx;
  561. box-sizing: border-box;
  562. .menu-list {
  563. width: 100%;
  564. // height: 200rpx;
  565. margin-bottom: 40rpx;
  566. .goods_img {
  567. width: 200rpx;
  568. height: 200rpx;
  569. border-radius: 12rpx;
  570. margin-right: 16rpx;
  571. }
  572. .menu-list-right {
  573. flex: 1;
  574. .right-only-right {
  575. width: 100rpx;
  576. height: 44rpx;
  577. background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
  578. border-radius: 12rpx;
  579. line-height: 44rpx;
  580. position: relative;
  581. .selectedNum {
  582. position: absolute;
  583. right: 2rpx;
  584. top: -22rpx;
  585. font-size: 24rpx;
  586. color: #fff;
  587. width: 32rpx;
  588. height: 32rpx;
  589. line-height: 32rpx;
  590. background: #FB3D03;
  591. border-radius: 50%;
  592. }
  593. }
  594. .right-only-right-red {
  595. width: 44rpx;
  596. height: 44rpx;
  597. line-height: 40rpx;
  598. border-radius: 12rpx;
  599. border: 1rpx solid #41ABF5;
  600. color: #41ABF5;
  601. }
  602. .right-only-right-add {
  603. width: 44rpx;
  604. height: 44rpx;
  605. line-height: 40rpx;
  606. background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
  607. border-radius: 12rpx;
  608. }
  609. .right-only-right-2 {
  610. min-width: 50rpx;
  611. }
  612. }
  613. }
  614. }
  615. .gg-box {
  616. width: 750rpx;
  617. height: 1208rpx;
  618. background: #FFFFFF;
  619. border-radius: 24rpx 24rpx 0rpx 0rpx;
  620. .goods-info {
  621. border-bottom: 1rpx solid #EEEEEE;
  622. image {
  623. width: 170rpx;
  624. height: 160rpx;
  625. border-radius: 8rpx;
  626. margin-right: 22rpx;
  627. margin-bottom: 32rpx;
  628. }
  629. }
  630. .pop-buttom {
  631. width: 100%;
  632. // height: 250rpx;
  633. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(51, 51, 51, 0.1);
  634. .pop-buttom-left {
  635. padding-top: 12rpx;
  636. }
  637. .pop-buttom-2 {
  638. width: 100%;
  639. height: 96rpx;
  640. line-height: 96rpx;
  641. background: #41ABF5;
  642. border-radius: 200rpx
  643. }
  644. .right-only-right-red {
  645. width: 44rpx;
  646. height: 44rpx;
  647. line-height: 40rpx;
  648. border-radius: 12rpx;
  649. border: 1rpx solid #41ABF5;
  650. color: #41ABF5;
  651. }
  652. .right-only-right-add {
  653. width: 44rpx;
  654. height: 44rpx;
  655. line-height: 40rpx;
  656. background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
  657. border-radius: 12rpx;
  658. }
  659. .right-only-right-2 {
  660. min-width: 50rpx;
  661. }
  662. }
  663. .spec-item {
  664. min-width: 210rpx;
  665. height: 66rpx;
  666. line-height: 66rpx;
  667. box-sizing: border-box;
  668. border-radius: 12rpx;
  669. margin: 0 26rpx 26rpx 0;
  670. padding: 0 10rpx;
  671. }
  672. .spec-item:nth-child(3) {
  673. margin-right: 0rpx !important;
  674. }
  675. .s-item {
  676. background-color: #ECF7FE;
  677. border: 2rpx solid #41ABF5;
  678. color: #41ABF5;
  679. }
  680. .n-item {
  681. border: 2rpx solid #EEEEEE;
  682. color: #000;
  683. }
  684. }
  685. }
  686. .goods-name {
  687. max-width: 310rpx;
  688. }
  689. </style>