menu.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749
  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. this.$forceUpdate()
  364. }
  365. },
  366. menuScroll(e) {
  367. let _this = this;
  368. let query = uni.createSelectorQuery().in(this);
  369. // console.log(e.detail, '%%%%%%%%%%');
  370. query.selectAll(".menu-box-only").boundingClientRect(data => {
  371. data.forEach((v) => {
  372. if (data[this.categoryData.length - 1].top <= 392) {
  373. return
  374. }
  375. // console.log(data[this.categoryData.length - 1].top, '^^^^^^^^^^^^^^');
  376. // console.log(v.top, '^^^^^^^^^^^^^^');
  377. if (v.top < 332 && v.top > 0) {
  378. _this.idMark = v.id;
  379. let arr = v.id.split('scroll');
  380. _this.type = Number(arr[1]);
  381. }
  382. })
  383. }).exec();
  384. },
  385. addred(type, i, k, item) {
  386. if (this.isAjax) {
  387. return
  388. }
  389. this.isAjax = true
  390. if (type === 1) {
  391. // 减
  392. if (item.num > 0) {
  393. // --item.num;
  394. this.setSub(item, type);
  395. } else {
  396. this.isAjax = false
  397. }
  398. } else if (type === 2) {
  399. // 加
  400. if (item.is_infinite === 0 && item.num >= item.stock) {
  401. tools.error('商品库存' + item.stock + '件')
  402. this.isAjax = false
  403. } else if (item.is_quota > 0 && item.num >= item.quota_num) {
  404. tools.error('限购' + item.quota_num + '件')
  405. this.isAjax = false
  406. } else {
  407. this.setSub(item, type);
  408. }
  409. } else if (type === 3) {
  410. // 选规格
  411. console.log(item)
  412. this.popData.is_quota = item.is_quota
  413. this.popData.quota_num = item.quota_num
  414. this.popData.is_infinite = item.is_infinite
  415. this.popData.payNum = item.num
  416. this.popData.stock = item.stock
  417. this.getShopGoodsSpec(item)
  418. } else {
  419. this.$refs.popupGG.close();
  420. console.log('this.popData.goods_spec_id')
  421. console.log(this.popData.goods_spec_id)
  422. if (this.popData.goods_spec_id) {
  423. if (this.popData.is_infinite === 0 && this.popData.payNum > this.popData.stock) {
  424. tools.error('商品库存' + this.popData.stock + '件')
  425. this.popData.num = this.popData.stock
  426. } else if (this.popData.is_quota > 0 && this.popData.payNum > this.popData.quota_num) {
  427. tools.error('限购' + this.popData.quota_num + '件')
  428. this.popData.num = this.popData.quota_num
  429. } else {
  430. let cartKey = this.cartData.goods_list.findIndex(row => this.popData.goods_spec_id === row
  431. .goods_spec_id)
  432. console.log(cartKey)
  433. let addType = this.popData.num > 0 ? 2 : 1
  434. console.log('addType:' + addType)
  435. if (addType === 2 && cartKey < 0) {
  436. this.setShopIngAdd(this.popData.goods_id, this.popData.goodsItem.category_id, this.popData
  437. .goods_spec_id, this.popData.num)
  438. } else {
  439. this.setShopIngNumber(this.popData.goods_id, this.popData.goodsItem.category_id, type, this
  440. .popData
  441. .goods_spec_id, this.popData.num)
  442. }
  443. }
  444. } else {
  445. console.log('无规格信息')
  446. }
  447. this.isAjax = false
  448. }
  449. },
  450. gbPop() {
  451. this.$refs.popupGG.close();
  452. },
  453. setSub(item, type) {
  454. let cartKey = this.cartData.goods_list.findIndex(row => row.goods_id === item.goods_id)
  455. if (type === 2 && cartKey < 0) {
  456. this.setShopIngAdd(item.goods_id, item.category_id, '', 1, item)
  457. } else {
  458. this.setShopIngNumber(item.goods_id, item.category_id, type, '', 1, item)
  459. }
  460. },
  461. setShopIngAdd(goodsId, categoryId, goodsSpecId, number, item) {
  462. setShopIngAdd({
  463. 'type': 1,
  464. 'goods_id': goodsId,
  465. 'shop_id': this.shop_id,
  466. 'category_id': categoryId,
  467. 'goods_spec_id': goodsSpecId,
  468. 'number': number,
  469. }).then(res => {
  470. this.isAjax = false
  471. if (res.code === 1) {
  472. if (item) {
  473. ++item.num;
  474. }
  475. this.getShopIngList()
  476. } else {
  477. tools.error(res.msg)
  478. }
  479. }).catch(() => {
  480. this.isAjax = false
  481. })
  482. },
  483. setShopIngNumber(goodsId, categoryId, operation, goodsSpecId, number, item) {
  484. setShopIngNumber({
  485. 'type': 1,
  486. 'goods_id': goodsId,
  487. 'shop_id': this.shop_id,
  488. 'category_id': categoryId,
  489. 'goods_spec_id': goodsSpecId,
  490. 'number': number,
  491. 'operation': operation === 2 ? 1 : 2,
  492. }).then(res => {
  493. this.isAjax = false
  494. if (res.code === 1) {
  495. if (item) {
  496. if (operation === 2) {
  497. ++item.num;
  498. } else {
  499. --item.num;
  500. }
  501. }
  502. this.getShopIngList()
  503. } else {
  504. tools.error(res.msg)
  505. }
  506. }).catch(() => {
  507. this.isAjax = false
  508. })
  509. },
  510. setShopIngDel() {},
  511. // -------弹窗选择规格-----------
  512. selectSpec(info, groupKey) {
  513. let specKey = this.popData.spec_ids.indexOf(info.item_id)
  514. if (specKey >= 0) {
  515. this.popData.spec_ids.splice(specKey, 1)
  516. this.popData.spec_name.splice(specKey, 1)
  517. } else {
  518. this.popData.spec_ids.push(info.item_id)
  519. this.popData.spec_name.push(info.spec_value)
  520. for (const attrKey in this.popData.spec_attr[groupKey].spec_items) {
  521. if (this.popData.spec_attr[groupKey].spec_items[attrKey].item_id !== info.item_id) {
  522. let oldKey = this.popData.spec_ids.indexOf(this.popData.spec_attr[groupKey].spec_items[attrKey]
  523. .item_id)
  524. if (oldKey >= 0) {
  525. this.popData.spec_ids.splice(oldKey, 1)
  526. this.popData.spec_name.splice(oldKey, 1)
  527. }
  528. }
  529. }
  530. }
  531. // this.spec_ids = this.popData.spec_list.join('_')
  532. this.setGoodsSpecPrice()
  533. },
  534. },
  535. }
  536. </script>
  537. <style scoped lang="scss">
  538. .wh-44 {
  539. width: 44rpx;
  540. height: 44rpx;
  541. }
  542. .menu-box {
  543. height: 100%;
  544. .menu-box-left {
  545. width: 160rpx;
  546. height: 100%;
  547. background-color: #F7F8FA;
  548. // border-radius: 0rpx 20rpx 0 0rpx;
  549. .menu-type-list-f {
  550. width: 160rpx;
  551. height: 100%;
  552. .menu-type-list {
  553. width: 160rpx;
  554. min-height: 108rpx;
  555. padding: 18rpx 28rpx;
  556. position: relative;
  557. .menu-type-num {
  558. position: absolute;
  559. top: 2rpx;
  560. right: 8rpx;
  561. padding: 0 6rpx;
  562. min-width: 20rpx;
  563. height: 32rpx;
  564. text-align: center;
  565. line-height: 32rpx;
  566. background: #FB3D03;
  567. border-radius: 50%;
  568. }
  569. }
  570. }
  571. }
  572. .menu-box-right {
  573. // flex: 1;
  574. width: 100%;
  575. height: 100%;
  576. padding: 16rpx 12rpx 16rpx 16rpx;
  577. box-sizing: border-box;
  578. .menu-list {
  579. width: 100%;
  580. // height: 200rpx;
  581. margin-bottom: 40rpx;
  582. .goods_img {
  583. width: 200rpx;
  584. height: 200rpx;
  585. border-radius: 12rpx;
  586. margin-right: 16rpx;
  587. }
  588. .menu-list-right {
  589. flex: 1;
  590. .right-only-right {
  591. width: 100rpx;
  592. height: 44rpx;
  593. background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
  594. border-radius: 12rpx;
  595. line-height: 44rpx;
  596. position: relative;
  597. .selectedNum {
  598. position: absolute;
  599. right: 2rpx;
  600. top: -22rpx;
  601. font-size: 24rpx;
  602. color: #fff;
  603. width: 32rpx;
  604. height: 32rpx;
  605. line-height: 32rpx;
  606. background: #FB3D03;
  607. border-radius: 50%;
  608. }
  609. }
  610. .right-only-right-red {
  611. width: 44rpx;
  612. height: 44rpx;
  613. line-height: 40rpx;
  614. border-radius: 12rpx;
  615. border: 1rpx solid #41ABF5;
  616. color: #41ABF5;
  617. }
  618. .right-only-right-add {
  619. width: 44rpx;
  620. height: 44rpx;
  621. line-height: 40rpx;
  622. background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
  623. border-radius: 12rpx;
  624. }
  625. .right-only-right-2 {
  626. min-width: 50rpx;
  627. }
  628. }
  629. }
  630. }
  631. .gg-box {
  632. width: 750rpx;
  633. height: 1208rpx;
  634. background: #FFFFFF;
  635. border-radius: 24rpx 24rpx 0rpx 0rpx;
  636. .goods-info {
  637. border-bottom: 1rpx solid #EEEEEE;
  638. image {
  639. width: 170rpx;
  640. height: 160rpx;
  641. border-radius: 8rpx;
  642. margin-right: 22rpx;
  643. margin-bottom: 32rpx;
  644. }
  645. }
  646. .pop-buttom {
  647. width: 100%;
  648. // height: 250rpx;
  649. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(51, 51, 51, 0.1);
  650. .pop-buttom-left {
  651. padding-top: 12rpx;
  652. }
  653. .pop-buttom-2 {
  654. width: 100%;
  655. height: 96rpx;
  656. line-height: 96rpx;
  657. background: #41ABF5;
  658. border-radius: 200rpx
  659. }
  660. .right-only-right-red {
  661. width: 44rpx;
  662. height: 44rpx;
  663. line-height: 40rpx;
  664. border-radius: 12rpx;
  665. border: 1rpx solid #41ABF5;
  666. color: #41ABF5;
  667. }
  668. .right-only-right-add {
  669. width: 44rpx;
  670. height: 44rpx;
  671. line-height: 40rpx;
  672. background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
  673. border-radius: 12rpx;
  674. }
  675. .right-only-right-2 {
  676. min-width: 50rpx;
  677. }
  678. }
  679. .spec-item {
  680. min-width: 210rpx;
  681. height: 66rpx;
  682. line-height: 66rpx;
  683. box-sizing: border-box;
  684. border-radius: 12rpx;
  685. margin: 0 26rpx 26rpx 0;
  686. padding: 0 10rpx;
  687. }
  688. .spec-item:nth-child(3) {
  689. margin-right: 0rpx !important;
  690. }
  691. .s-item {
  692. background-color: #ECF7FE;
  693. border: 2rpx solid #41ABF5;
  694. color: #41ABF5;
  695. }
  696. .n-item {
  697. border: 2rpx solid #EEEEEE;
  698. color: #000;
  699. }
  700. }
  701. }
  702. .goods-name {
  703. max-width: 310rpx;
  704. }
  705. </style>