menu.vue 21 KB

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