seckillGoods.vue 20 KB

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