seckillGoods.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868
  1. <template>
  2. <view class="container">
  3. <view id="page-top">
  4. <view class="product">
  5. <view class="u-bg-fff pb40">
  6. <view class="pic">
  7. <swiper
  8. class="swiper"
  9. indicator-dots="true"
  10. :autoplay="true"
  11. interval="2000"
  12. duration="1500"
  13. circular="true"
  14. >
  15. <swiper-item v-if="dataForm.videoUrl">
  16. <j-video
  17. class="jvideo"
  18. :url="dataForm.videoUrl"
  19. width="750rpx"
  20. height="620rpx"
  21. ></j-video>
  22. </swiper-item>
  23. <swiper-item v-for="(item, index) in imglist" :key="index">
  24. <image :src="item" mode="aspectFill"></image>
  25. </swiper-item>
  26. </swiper>
  27. <view class="p-price">
  28. <view class="pd24 u-flex-center" style="align-items: baseline">
  29. <view class="u-FFF u-font36">
  30. <rich-text
  31. :nodes="$mUtil.priceBigSmallTwo(dataForm.minPrice)"
  32. ></rich-text>
  33. </view>
  34. <text class="discount u-font24 u-ml20 u-del"
  35. >¥{{ dataForm.maxSalePrice }}</text
  36. >
  37. </view>
  38. <view class="p-ab u-flex-center">
  39. <view class="triangle-bottomright"></view>
  40. <view class="seckill u-text-center u-font28">
  41. <!-- active_state 0:未开始 * 1:进行中 * 2:已结束 -->
  42. <view class="u-bold" v-if="dataForm.activeTimeState == 1"
  43. >距结束</view
  44. >
  45. <view
  46. class="u-bold"
  47. v-if="
  48. dataForm.activeTimeState == 0 ||
  49. dataForm.activeTimeState == 2
  50. "
  51. >已结束</view
  52. >
  53. <view v-if="dataForm.activeTimeState != 2">
  54. <uv-count-down
  55. :time="remainingTime"
  56. format="HH:mm:ss"
  57. ></uv-count-down>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. <view class="mt10 u-plr30">
  63. <view>
  64. <view
  65. v-if="shop.platformShop"
  66. class="tipsStatus"
  67. style="vertical-align: middle"
  68. >自营</view
  69. >
  70. <text class="u-font34 u-bold u-1A1A1A">{{
  71. dataForm.title
  72. }}</text>
  73. </view>
  74. <view class="u-font24 u-mt15 u-999">
  75. <text
  76. >已售
  77. <text class="u-FF0000">{{ dataForm.resultSaleNum }}</text
  78. >件,仅剩<text class="u-FF0000">{{
  79. dataForm.residueStockTotal
  80. }}</text
  81. >件</text
  82. >
  83. </view>
  84. <!--优惠-->
  85. </view>
  86. </view>
  87. </view>
  88. <view class="u-bg-fff u-mt10">
  89. <view class="u-plr30 u-flex-center-sb pt-pb35">
  90. <view class="u-flex-center" @click="goShop">
  91. <view>
  92. <image class="u-avatar104" :src="shop.image"></image>
  93. </view>
  94. <view class="u-ml25">
  95. <view class="u-font28 u-1A1A1A u-bold"
  96. >{{ shop.businessName }}
  97. </view>
  98. <view class="u-999 u-font24 u-mt5 u-text2">
  99. <text
  100. class="iconfont"
  101. style="color: #fa6138"
  102. @click.stop="goLocal"
  103. >&#xe990;</text
  104. >
  105. {{ shop.provinceName }}{{ shop.cityName }}{{ shop.areaName
  106. }}{{ shop.address }}
  107. </view>
  108. </view>
  109. </view>
  110. <view class="iconfont" @click="goShop">&#xe6c7;</view>
  111. </view>
  112. </view>
  113. </view>
  114. <view class="u-bg-fff u-mt10">
  115. <view
  116. class="tab u-flex-center-sa u-font30 u-1A1A1A u-border-one-one"
  117. :style="[{ top: `calc(${statusBarHeight}px + 44px)` }]"
  118. >
  119. <view
  120. @tap="change(0)"
  121. class="pb30"
  122. :class="{ active: isChecked == 0 }"
  123. >商品详情</view
  124. >
  125. <view
  126. @tap="change(1)"
  127. class="pb30"
  128. :class="{ active: isChecked == 1 }"
  129. >用户评论({{ commentListLength }})</view
  130. >
  131. </view>
  132. <view class="u-mt10">
  133. <!--商品详情-->
  134. <view v-if="isChecked == 0">
  135. <view class="richText ql-editor-box">
  136. <uv-parse
  137. class="custom-parse"
  138. :content="productObj.content"
  139. ></uv-parse>
  140. </view>
  141. </view>
  142. <!--评论-->
  143. <view class="u-plr30" v-else>
  144. <comment :value="commentList"></comment>
  145. </view>
  146. </view>
  147. </view>
  148. </view>
  149. <view style="height: 170rpx; background-color: white"></view>
  150. <view class="bottom-btn u-bg-fff">
  151. <view class="pt-pb30 u-plr30 u-flex-center-sb">
  152. <button
  153. open-type="share"
  154. class="u-text-center"
  155. style="line-height: normal; margin-left: 25rpx"
  156. >
  157. <view class="iconfont2 u-font44 u-999">&#xe684;</view>
  158. <view class="u-font28 u-1A1A1A">分享</view>
  159. </button>
  160. <!--秒杀按钮-->
  161. <view class="seckill-btn" v-if="dataForm.activeTimeState == 0">
  162. <button v-if="ispay" class="u-btn-two u-DCCDA4" @click="notStarted()">
  163. 立即购买
  164. </button>
  165. </view>
  166. <view class="seckill-btn" v-if="dataForm.activeTimeState == 1">
  167. <button
  168. v-if="ispay"
  169. class="u-btn-two u-DCCDA4"
  170. @click="buy(1, dataForm.id)"
  171. >
  172. 立即购买
  173. </button>
  174. </view>
  175. <view class="seckill-btn" v-if="dataForm.activeTimeState == 2">
  176. <button
  177. v-if="ispay"
  178. class="u-btn-two u-DCCDA4"
  179. @click="itSover(1, dataForm.id)"
  180. >
  181. 立即购买
  182. </button>
  183. </view>
  184. </view>
  185. </view>
  186. <!--规格-->
  187. <uv-popup mode="bottom" ref="specOpenRef" round="30rpx">
  188. <view class="u-bg-fff spec">
  189. <view class="u-plr30 flex-sb u-border-one-one pb30">
  190. <view class="u-flex-center">
  191. <image
  192. class="u-goods200"
  193. :src="skuObj.cover ? skuObj.cover : cover"
  194. ></image>
  195. <view class="u-ml20">
  196. <view class="u-999 u-font24 u-flex-center">
  197. <view class="u-00BF5A u-font36">
  198. <rich-text
  199. :nodes="$mUtil.priceBigSmall(skuObj.salePrice || 0)"
  200. ></rich-text>
  201. </view>
  202. <text class="u-del u-ml15"
  203. >¥{{ skuObj.originalSalePrice || 0 }}
  204. </text>
  205. </view>
  206. <view class="u-font22 u-999 u-mt5"
  207. >活动库存 {{ skuObj.stock }} 件
  208. </view>
  209. <view class="u-1A1A1A u-mt25"
  210. >{{ skuObj.skuSetName ? skuObj.skuSetName : "请选择" }}
  211. </view>
  212. </view>
  213. </view>
  214. <!-- <view class="iconfont u-999 closeIcon" @click="specOpenRef.close()"
  215. >&#xe612;</view
  216. > -->
  217. <view class="closeIcon" @click.stop="specOpenRef.close()">
  218. <uv-icon name="close-circle" color="#999999" size="36rpx"></uv-icon>
  219. </view>
  220. </view>
  221. <view>
  222. <scroll-view scroll-y style="max-height: 30vh">
  223. <view class="">
  224. <view
  225. class="u-mt30"
  226. v-for="(item, index) in skuTab"
  227. :key="item.head.id"
  228. >
  229. <view class="u-plr30">{{ item.head.name }}</view>
  230. <view class="u-mt20 u-border-one-one pb30">
  231. <view class="u-plr30 u-flex u-flex-warp">
  232. <view
  233. class="spec-item"
  234. :class="childrenItem.flag ? 'activeColor' : ''"
  235. @click="chonseSku(index, childrenItem.id)"
  236. v-for="childrenItem in item.values"
  237. :key="childrenItem.id"
  238. >{{ childrenItem.name }}</view
  239. >
  240. </view>
  241. </view>
  242. </view>
  243. </view>
  244. </scroll-view>
  245. <view class="u-plr30 u-mt30">
  246. <view class="u-flex-center-sb">
  247. <view>购买数量</view>
  248. <view class="u-flex-center">
  249. <uv-number-box
  250. v-model="addNumber"
  251. disabledInput
  252. ></uv-number-box>
  253. </view>
  254. </view>
  255. <view class="specOpen-btn">
  256. <view>
  257. <button class="u-btn-two" @click="btnBuy(1)">
  258. {{ btnName }}
  259. </button>
  260. </view>
  261. </view>
  262. </view>
  263. </view>
  264. </view>
  265. </uv-popup>
  266. <!--页面加载动画-->
  267. <ldLoading isFullScreen :active="loading"></ldLoading>
  268. </view>
  269. </template>
  270. <script setup>
  271. import { ref } from "vue";
  272. import { onShareAppMessage, onShow, onLoad } from "@dcloudio/uni-app";
  273. import { seckillActivityProductInfo_Api } from "@/api/seckill.js";
  274. import {
  275. getBusinessInfoId_Api,
  276. productInfo,
  277. shopOrderCommentPage,
  278. } from "@/api/shop.js";
  279. import comment from "@/components/ld-comment/ld-comment.vue";
  280. import utils from "@/util/index.js";
  281. const specOpenRef = ref(null);
  282. // 手机状态栏高度
  283. const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight);
  284. const imglist = ref([]); // 详情图片数组
  285. const isChecked = ref(0);
  286. const btnName = ref("");
  287. const dataForm = ref({}); // 商品详情
  288. const shop = ref({}); // 店铺信息
  289. const cover = ref("");
  290. const loading = ref(true);
  291. const skuTab = ref([]); // sku 二位数组
  292. const skuObj = ref({}); // sku 对象
  293. const hasId = ref("");
  294. const addNumber = ref(1);
  295. const commentList = ref([]);
  296. const commentListLength = ref(0);
  297. const productObj = ref({});
  298. const remainingTime = ref(0); // 剩余时间
  299. const ispay = ref(true);
  300. // 生命周期
  301. onShow(() => {});
  302. onLoad((options) => {
  303. // 当用户进来有缓存店铺
  304. // 店铺推荐(商品)
  305. if (options.id) {
  306. getDetailInfo(options.id);
  307. }
  308. if (options.shareId) {
  309. recordSave(options.shareId, options.id);
  310. }
  311. });
  312. onShareAppMessage(() => {
  313. let user = uni.getStorageSync("personal");
  314. if (res.from === "button") {
  315. // 来自页面内分享按钮
  316. console.log(res.target);
  317. }
  318. return {
  319. title: dataForm.value.title,
  320. imageUrl: dataForm.value.cover,
  321. path: `/pages/product/goods/seckillGoods?id=${
  322. dataForm.value.id
  323. }&share=1&shareId=${user.id || ""}`,
  324. };
  325. });
  326. // 方法
  327. const notStarted = () => {
  328. uni.$uv.toast("活动尚未开始");
  329. };
  330. const itSover = () => {
  331. uni.$uv.toast("活动已结束");
  332. };
  333. const goLocal = () => {
  334. uni.openLocation({
  335. latitude: Number(shop.value.txLatitude),
  336. longitude: Number(shop.value.txLongitude),
  337. name: shop.value.name,
  338. address: shop.value.address,
  339. success: function () {
  340. console.log("success");
  341. },
  342. });
  343. };
  344. const goShop = () => {
  345. uni.navigateTo({
  346. url: "/pages/shop/index?businessId=" + dataForm.value.businessId,
  347. });
  348. };
  349. const recordSave = (shareUserId, productId) => {
  350. return;
  351. $http
  352. .post("/share/record/save", {
  353. shareUserId: shareUserId,
  354. productId: productId,
  355. })
  356. .then((res) => {});
  357. };
  358. const getDetailInfo = (id) => {
  359. seckillActivityProductInfo_Api(id).then((res) => {
  360. loading.value = false;
  361. if (res && res.code == 200) {
  362. dataForm.value = res.data;
  363. if (res.data.activeTimeState == 1) {
  364. remainingTime.value = res.data.finishTime * 1000 - new Date().getTime();
  365. // console.log("remainingTime.value", remainingTime.value);
  366. }
  367. productInfo(dataForm.value.productId).then((ret) => {
  368. if (ret && ret.code == 200) {
  369. productObj.value = ret.data;
  370. imglist.value = ret.data.images;
  371. skuTab.value = ret.data.skuTable.map((item) => {
  372. if (item.values) {
  373. item.values[0].flag = true;
  374. }
  375. return item;
  376. });
  377. }
  378. });
  379. getBusinessInfoId_Api(dataForm.value.businessId).then((ret) => {
  380. if (ret.data && ret.code == 200) {
  381. shop.value = ret.data;
  382. }
  383. });
  384. // return
  385. shopOrderCommentPage({
  386. productId: dataForm.value.productId,
  387. page: 1,
  388. pageSize: 10,
  389. }).then((res) => {
  390. if (res && res.code == 200) {
  391. commentList.value = res.list;
  392. commentListLength.value =
  393. res.list && res.list.length ? res.list.length : 0;
  394. }
  395. });
  396. }
  397. });
  398. };
  399. const change = (i) => {
  400. isChecked.value = i;
  401. };
  402. const buy = (i, id) => {
  403. chonseSku();
  404. btnName.value = "立即购买";
  405. specOpenRef.value.open();
  406. };
  407. // 处理选中的
  408. const chonseSku = (index, id) => {
  409. if (index != null) {
  410. skuTab.value[index].values.forEach((res) => {
  411. res.flag = false;
  412. if (res.id == id) {
  413. res.flag = true;
  414. }
  415. });
  416. }
  417. let choseId = [];
  418. skuTab.value.forEach((res) => {
  419. res.values.forEach((Key) => {
  420. if (Key.flag) {
  421. choseId.push(Key.id);
  422. }
  423. });
  424. });
  425. let totalId = choseId.sort((a, b) => a - b).join("_");
  426. totalId = "_" + totalId + "_";
  427. hasId.value = totalId;
  428. if (productObj.value.singleSku) {
  429. if(dataForm.value.productSkuSetList.length>0) skuObj.value = dataForm.value.productSkuSetList[0];
  430. } else {
  431. dataForm.value.productSkuSetList.forEach((res) => {
  432. if (res.skuHashCode == totalId) {
  433. skuObj.value = res;
  434. }
  435. });
  436. }
  437. };
  438. const btnBuys = () => {
  439. if (!skuObj.value.id && hasId.value == "") {
  440. uni.$uv.toast("请选中 sku");
  441. return false;
  442. }
  443. if (
  444. Number(addNumber.value) > dataForm.value.limitBuyNum &&
  445. dataForm.value.limitBuyNum != 0
  446. ) {
  447. uni.$uv.toast("商品限购" + dataForm.value.limitBuyNum + "件");
  448. return false;
  449. }
  450. if (
  451. dataForm.value.productSkuSetList.length > 0 &&
  452. Number(skuObj.value.stock) < Number(addNumber.value)
  453. ) {
  454. uni.$uv.toast("商品库存只有" + skuObj.value.stock + "件");
  455. return false;
  456. }
  457. // psotJson();
  458. };
  459. const psotJson = () => {
  460. let dataJson = {};
  461. let childArr = [];
  462. let parendArr = [];
  463. skuObj.value;
  464. childArr.push({
  465. userCartId: 0,
  466. activityGoodsId: skuObj.value.activityGoodsId,
  467. productId: dataForm.value.productId,
  468. num: addNumber.value,
  469. skuHashCode: skuObj.value.skuHashCode,
  470. });
  471. parendArr.push({
  472. businessId: shop.value.id,
  473. sourceBusinessId: shop.value.id,
  474. activityId: dataForm.value.seckillId,
  475. sponsorActivityId: 0,
  476. userRemark: "",
  477. items: childArr,
  478. });
  479. dataJson = {
  480. isCart: false,
  481. receiptId: null,
  482. shipment_mode: 0,
  483. shopOrders: parendArr,
  484. marketingType: 1,
  485. };
  486. uni.setStorageSync("dataJson", dataJson);
  487. uni.navigateTo({
  488. url: "../surePay/surePaySechill",
  489. });
  490. };
  491. const btnBuy = (i) => {
  492. if (!utils.isLoginTo(true)) {
  493. btnBuys();
  494. }
  495. };
  496. </script>
  497. <style lang="scss" scoped>
  498. .pd24 {
  499. padding: 24rpx;
  500. }
  501. .pd20 {
  502. padding: 20rpx;
  503. }
  504. .pt20-pb14 {
  505. padding-top: 20rpx;
  506. padding-bottom: 14rpx;
  507. }
  508. .pt28-pb18 {
  509. padding-top: 28rpx;
  510. padding-bottom: 18rpx;
  511. }
  512. .pb30 {
  513. padding-bottom: 30rpx;
  514. }
  515. .pb40 {
  516. padding-bottom: 40rpx;
  517. }
  518. .pb50 {
  519. padding-bottom: 50rpx;
  520. }
  521. .pt-pb30 {
  522. padding-top: 30rpx;
  523. padding-bottom: 30rpx;
  524. }
  525. .pt-pb35 {
  526. padding-top: 35rpx;
  527. padding-bottom: 35rpx;
  528. }
  529. .ml54 {
  530. margin-left: 54rpx;
  531. }
  532. .ml138 {
  533. margin-left: 138rpx;
  534. }
  535. .br-rd10 {
  536. border-radius: 10rpx;
  537. }
  538. .br-rd20 {
  539. border-radius: 20rpx;
  540. }
  541. .stb-btn {
  542. padding: 8rpx 18rpx;
  543. border-radius: 10rpx;
  544. }
  545. .br-FF0000 {
  546. border: 1rpx solid #fa6138;
  547. border-radius: 24rpx;
  548. padding: 6rpx 12rpx;
  549. }
  550. .bg-FFF6EE {
  551. background-color: #fff6ee;
  552. }
  553. .mt80 {
  554. margin-top: 80rpx;
  555. }
  556. .mt10 {
  557. margin-top: 10rpx;
  558. }
  559. .product {
  560. // padding-bottom: 150rpx;
  561. }
  562. .pic {
  563. width: 100%;
  564. position: relative;
  565. .swiper {
  566. // height: 620rpx;
  567. height: 100vw;
  568. video {
  569. width: 100%;
  570. // height: 620rpx;
  571. height: 100vw;
  572. }
  573. image {
  574. width: 100%;
  575. // height: 620rpx;
  576. height: 100vw;
  577. }
  578. }
  579. .p-price {
  580. width: 100%;
  581. // position: absolute;
  582. top: 460rpx;
  583. // background: linear-gradient(90deg,#20a733, #0a824b);
  584. background: #fa6138;
  585. border-radius: 20rpx 20rpx 0px 0px;
  586. position: relative;
  587. top: -16rpx;
  588. .discount {
  589. color: #ffffff;
  590. }
  591. }
  592. }
  593. .richText {
  594. padding: 30rpx;
  595. ::v-deep img {
  596. margin-top: 0 !important;
  597. }
  598. }
  599. //秒杀,拼团样式
  600. .p-ab {
  601. position: absolute;
  602. top: 0;
  603. right: 0;
  604. height: 100%;
  605. }
  606. .stb-list {
  607. padding-bottom: 10rpx;
  608. }
  609. .triangle-bottomright {
  610. width: 0;
  611. height: 0;
  612. border-bottom: 105rpx solid #dccda4;
  613. border-left: 60rpx solid transparent;
  614. }
  615. .seckill {
  616. background-color: #dccda4;
  617. color: #fa6138;
  618. padding: 12rpx 15rpx;
  619. box-sizing: border-box;
  620. border-radius: 5rpx 20rpx 0px 0px;
  621. text-align: center;
  622. // width: 150rpx;
  623. &:deep(.uv-count-down__text) {
  624. color: #3775f6;
  625. font-size: 24rpx;
  626. }
  627. }
  628. .seckill-btn {
  629. width: 76%;
  630. }
  631. .br-284534 {
  632. border-bottom: 1rpx solid rgba($color: #284534, $alpha: 0.3);
  633. }
  634. .gb-te {
  635. padding-top: 20rpx;
  636. padding-bottom: 15rpx;
  637. }
  638. .gb-btn {
  639. padding: 18rpx 80rpx 8rpx;
  640. line-height: 30rpx;
  641. }
  642. .btn-bg-dccda4 {
  643. background: #dccda4;
  644. border-radius: 48rpx 0rpx 0rpx 48rpx;
  645. }
  646. .btn-bg-00321E {
  647. background: #0b844a;
  648. border-radius: 0px 48px 48px 0px;
  649. }
  650. .tab {
  651. position: sticky;
  652. top: 0;
  653. background-color: #fff;
  654. padding-top: 38rpx;
  655. z-index: 9;
  656. .pb30 {
  657. position: relative;
  658. &::before {
  659. content: "";
  660. position: absolute;
  661. left: 50%;
  662. bottom: 0;
  663. transform: translateX(-50%);
  664. width: 0;
  665. height: 2px;
  666. background: #fa6138;
  667. transition: all 0.3s;
  668. }
  669. &.active {
  670. font-size: 30rpx;
  671. color: #fa6138;
  672. font-weight: 700;
  673. &::before {
  674. width: 100%;
  675. }
  676. }
  677. }
  678. }
  679. .bottom-btn {
  680. width: 100%;
  681. position: fixed;
  682. bottom: 0;
  683. z-index: 9;
  684. border-top: 1rpx solid #e6e6e6;
  685. .cart {
  686. position: relative;
  687. .number {
  688. position: absolute;
  689. top: -10rpx;
  690. left: 45rpx;
  691. padding: 4rpx 8rpx;
  692. background-color: #ff0000;
  693. border: 4rpx solid #ffffff;
  694. border-radius: 40rpx;
  695. }
  696. }
  697. .cart-btn {
  698. width: 230rpx;
  699. height: 85rpx;
  700. background: #dccda4;
  701. border-radius: 43rpx 0rpx 0rpx 43rpx;
  702. }
  703. .buy-btn {
  704. width: 230rpx;
  705. height: 85rpx;
  706. line-height: 85rpx;
  707. background: #0b844a;
  708. border-radius: 0rpx 43rpx 43rpx 0rpx;
  709. }
  710. }
  711. .flex-sb {
  712. display: flex;
  713. justify-content: space-between;
  714. }
  715. //弹窗
  716. .spec {
  717. border-radius: 18rpx 18rpx 0rpx 0rpx;
  718. padding-top: 30rpx;
  719. // max-height: 900rpx;
  720. overflow-y: auto;
  721. .spec-item {
  722. background-color: #f6f6f6;
  723. border: 1px solid #f6f6f6;
  724. padding: 12rpx 30rpx;
  725. margin-bottom: 24rpx;
  726. font-size: 24rpx;
  727. color: #1a1a1a;
  728. border-radius: 4px;
  729. }
  730. .activeColor {
  731. background-color: #e1e6e3;
  732. border: 1px solid #3775f6;
  733. color: #fa6138;
  734. border-radius: 4px;
  735. }
  736. .spec-item:not(:last-child) {
  737. margin-right: 24rpx;
  738. }
  739. //减号
  740. .minus {
  741. width: 50rpx;
  742. height: 50rpx;
  743. line-height: 50rpx;
  744. text-align: center;
  745. background: #dedede;
  746. border-radius: 8rpx 0rpx 0rpx 8rpx;
  747. }
  748. .num {
  749. width: 74rpx;
  750. height: 46rpx;
  751. line-height: 46rpx;
  752. text-align: center;
  753. border: 1px solid #dedede;
  754. }
  755. //加号
  756. .plus-sign {
  757. width: 50rpx;
  758. height: 50rpx;
  759. line-height: 50rpx;
  760. text-align: center;
  761. background: #dedede;
  762. border-radius: 0rpx 8rpx 8rpx 0rpx;
  763. }
  764. .specOpen-btn {
  765. margin-top: 68rpx;
  766. padding-bottom: 34rpx;
  767. button {
  768. background-color: #fa6138;
  769. color: #ffffff;
  770. }
  771. }
  772. }
  773. </style>