serviceGood.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920
  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. <!-- <image src="../../../static/delImg/product2.png" mode="aspectFill"></image> -->
  9. <swiper class="swiper" indicator-dots="true" autoplay="true" interval="5000" duration="1500"
  10. circular="true">
  11. <swiper-item v-if="dataForm.video_url">
  12. <!-- <video :src="dataForm.video_url"></video> -->
  13. <j-video class="jvideo" :url="dataForm.video_url" width="750rpx" height="620rpx"></j-video>
  14. </swiper-item>
  15. <swiper-item v-for="(item, index) in imglist" :key="index">
  16. <image :src="item" mode="aspectFill"></image>
  17. </swiper-item>
  18. </swiper>
  19. <view class="p-price">
  20. <view class="pd24" style="display: flex;justify-content: space-between;align-items: flex-end;">
  21. <view style="display: flex; color: #FFFFFF; font-size: 28rpx;align-items: center;margin-left: 6rpx;">
  22. 优惠价:
  23. <view class="u-FFF u-font36">
  24. <rich-text :nodes="$mUtil.priceBigSmallTwo(dataForm.sale_price)"></rich-text>
  25. </view>
  26. </view>
  27. <view class="discount u-font24">
  28. 门市价:
  29. <text class="discount u-font24 u-ml20 u-del">¥{{ dataForm.market_price}}元</text>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="u-plr30" style="margin-top: 100rpx;">
  34. <view>
  35. <view class="tipsStatus" v-if="shop.platform_shop">自营</view>
  36. <text class="u-font34 u-bold u-1A1A1A">{{ dataForm.title}}</text>
  37. </view>
  38. <view class="u-font24 u-mt15 u-999" style="text-align: right;">
  39. <text>消费
  40. <text class="u-ml10">{{
  41. dataForm.result_sale_num
  42. }}</text></text>
  43. </view>
  44. <!--优惠-->
  45. <!-- <view class="bg-FFF6EE pd20 u-mt20 u-flex-center br-rd10" v-if="shopDiscounts.is_use==true">
  46. <view class="u-FF0000 br-FF0000 u-font24">首单优惠</view>
  47. <view class="u-ml15 u-font24 u-CA7E57">满{{shopDiscounts.full}}元减{{shopDiscounts.reduction}}元</view>
  48. </view> -->
  49. </view>
  50. </view>
  51. </view>
  52. <!-- 查看地图 -->
  53. <!-- <view class="u-bg-fff u-mt10">
  54. <view class="u-plr30 u-flex-center-sb pt-pb35">
  55. <view class="u-flex-center">
  56. <view class="u-ml25" @click="openMap(shop)">
  57. <view class="u-999 u-font24 u-text2" style="padding-right: 20rpx;">
  58. <text class="iconfont" style="color: #0F8947;">&#xe6db;</text>
  59. <text
  60. >{{ shop.province_name }}{{ shop.city_name
  61. }}{{ shop.area_name }}{{ shop.address }}
  62. </text>
  63. <text class="u-FE9000">[查看地图]</text></view
  64. >
  65. </view>
  66. <text class="iconfont" style="color: #0F8947;">&#xe6c7;</text>
  67. </view>
  68. </view>
  69. </view> -->
  70. <view class="u-bg-fff u-mt10">
  71. <view class="u-plr30 u-flex-center-sb pt-pb35">
  72. <view class="u-flex-center">
  73. <view @click="goShop">
  74. <image class="u-avatar104" :src="shop.logo"></image>
  75. </view>
  76. <view class="u-ml25">
  77. <view class="u-font28 u-1A1A1A u-bold">{{ shop.shop_name }} </view>
  78. <view class="u-999 u-font24 u-mt5 u-text2" @click="goLocal">
  79. <text class="iconfont " style="color: #0F8947;">&#xe6db;</text>
  80. {{ shop.province_name }}{{ shop.city_name }}{{ shop.area_name
  81. }}{{ shop.address }}
  82. </view>
  83. </view>
  84. </view>
  85. <view class="iconfont" @click="goShop">&#xe6c7;</view>
  86. </view>
  87. </view>
  88. </view>
  89. <view class="u-bg-fff u-mt10">
  90. <view class="tab u-flex-center-sa u-font30 u-1A1A1A u-border-one-one"
  91. :style="`top: calc(${statusBarHeight}px + 44px)`">
  92. <view @tap="change(0)" class="pb30" :class="{ active: isChecked == 0 }">商品详情</view>
  93. <view @tap="change(1)" class="pb30" :class="{ active: isChecked == 1 }">用户评论({{ commentList.length }})</view>
  94. </view>
  95. <view class="u-mt10">
  96. <!--商品详情-->
  97. <view v-if="isChecked == 0">
  98. <view class="introduce">
  99. <view class="top">
  100. <view class="simple">
  101. <view class="line"> </view>
  102. <view class="item"> 套餐内内容 </view>
  103. </view>
  104. <view class="simple-content">
  105. <view v-for="item in dataForm.service_items" :key="item.id" class="row">
  106. <view class="row_l">
  107. <view>{{ item.item_name }}</view> x {{ item.num }}
  108. </view>
  109. <view class="gry">{{ item.item_price }}元</view>
  110. </view>
  111. </view>
  112. </view>
  113. <view class="middle">
  114. <view class="middle-item">
  115. <view class="simple"> </view>
  116. <view class="material"> 福利 </view>
  117. </view>
  118. <view class="item-block">
  119. <view v-for="item in dataForm.welfare_items" :key="item.id" class="row">
  120. <image class="select-icon" :src="imgUrl+'/checked.png'" mode="aspectFill" />
  121. <text>{{ item }} </text>
  122. </view>
  123. </view>
  124. </view>
  125. <view class="practice">
  126. <view class="practice-item">
  127. <view class="simple"> </view>
  128. <view class="practice-details"> 图文介绍 </view>
  129. </view>
  130. </view>
  131. </view>
  132. <view class="richText ql-editor-box">
  133. <rich-text :nodes="mobileDetail"></rich-text>
  134. <!-- <jyf-parser :html="$mUtil.formatRichText(mobileDetail)" ref="article"></jyf-parser> -->
  135. </view>
  136. </view>
  137. <!--评论-->
  138. <view class="u-plr30" v-else>
  139. <comment :value="commentList"></comment>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. <view style="height:170rpx;background-color:white"></view>
  145. <view class="bottom-btn u-bg-fff">
  146. <view class="pt-pb30 u-plr30 u-flex-center-sb">
  147. <button @click="share" class="u-text-center" style="line-height: normal;margin-left: 15rpx;">
  148. <view class="iconfont2 u-font44 u-999">&#xe684;</view>
  149. <view class="u-font28 u-1A1A1A">分享</view>
  150. </button>
  151. <!--普通商品-->
  152. <!-- <view class="cart" @click="goTocart"> -->
  153. <!-- <view class="u-text-center">
  154. <view class="iconfont u-font44 u-999">&#xe609;</view>
  155. <view class="u-font28 u-1A1A1A">购物车</view>
  156. </view> -->
  157. <!-- <view class="number u-font20 u-FFF">10</view> -->
  158. <!-- </view> -->
  159. <!-- <view class="u-flex-center"> -->
  160. <!-- <button class="cart-btn u-00321E u-font30" @click="buy(0,dataForm.id)">加入购物车</button> -->
  161. <button class="buy-btn u-DCCDA4 u-font30" @click="btnBuy()">
  162. 立即购买
  163. </button>
  164. <!-- </view> -->
  165. </view>
  166. </view>
  167. <share ref="shares" :contentHeight="580" v-if="isvisible"></share>
  168. <!--页面加载动画-->
  169. <ldLoading isFullScreen :active="loading"></ldLoading>
  170. <share ref="shares" :contentHeight="580" v-if="isvisible"></share>
  171. </view>
  172. </template>
  173. <script>
  174. import uniPopup from "../../../components/uni-popup/uni-popup.vue";
  175. import comment from "../../../components/ld-comment/ld-comment.vue";
  176. import jyfParser from "../../../components/jyf-parser/jyf-parser";
  177. import share from "./../../public/share";
  178. import jVideo from "../../../components/j-video/j-video.vue"
  179. export default {
  180. components: {
  181. uniPopup,
  182. comment,
  183. jyfParser,
  184. share,
  185. jVideo
  186. },
  187. data() {
  188. return {
  189. //手机状态栏高度
  190. statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
  191. config: {
  192. back: true, //false是tolbar页面 是则不写
  193. title: "服务详情",
  194. color: "#1a1a1a",
  195. //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
  196. backgroundColor: [1, "#ffffff"],
  197. backTabPage: "",
  198. },
  199. imglist: [], //详情图片数组
  200. isChecked: 0,
  201. btnName: "",
  202. btnType: "", //0 购物车,1 立即购买
  203. dataForm: {}, //商品详情
  204. shop: {}, //店铺信息
  205. shopDiscounts: {}, //店铺首单优惠
  206. stock: 0,
  207. cover: "",
  208. loading: true,
  209. moDelPrice: "",
  210. moPrice: "",
  211. goodsSkuList: [], //sku组合值
  212. skuTab: [], //sku二位数组
  213. goods_id: null,
  214. limit_buy_num: 0,
  215. choseConfig: {},
  216. hasId: "",
  217. add_num: 1,
  218. goStatus: 0, //0:购物车,1下单
  219. shop_id: 0,
  220. commentList: [],
  221. dataShopId: "",
  222. isvisible: false,
  223. mobileDetail: "",
  224. option: null,
  225. imgUrl: this.$mConfig.staticUrl,
  226. serviceId: 0
  227. };
  228. },
  229. onShow() {
  230. var pages = getCurrentPages();
  231. var prevPage = pages[pages.length - 2];
  232. if (prevPage == undefined) {
  233. this.config.backTabPage = "/pages/research/homepage/lidaPage";
  234. }
  235. },
  236. onLoad(options) {
  237. console.log(options)
  238. //店铺推荐(商品)
  239. this.option = options.id
  240. this.serviceId = options.id
  241. if (options.id) {
  242. this.getDetailInfo(options.id);
  243. this.loadComment(options.id);
  244. }
  245. if (options.shareId) {
  246. this.recordSave(options.shareId, options.id);
  247. }
  248. },
  249. onShareAppMessage(res) {
  250. if (res.from === "button") {
  251. // 来自页面内分享按钮
  252. console.log(res.target);
  253. }
  254. let that = this
  255. return {
  256. title: that.shareTitle,
  257. imageUrl: that.shareImg,
  258. path: '/pages/product/goods/serviceGood?id=' + that.serviceId,
  259. };
  260. },
  261. methods: {
  262. goLocal() {
  263. uni.openLocation({
  264. latitude: Number(this.shop.tx_latitude),
  265. longitude: Number(this.shop.tx_longitude),
  266. name: this.shop.name,
  267. address: this.shop.address,
  268. success: function() {
  269. console.log("success");
  270. },
  271. });
  272. },
  273. goShop() {
  274. uni.navigateTo({
  275. url: "/pages/research/homepage/shopHomepage?shopId=" + this.shop_id,
  276. });
  277. },
  278. recordSave(share_user_id, goods_id) {
  279. this.$http
  280. .post("/share/record/save", {
  281. share_user_id: share_user_id,
  282. goods_id: goods_id,
  283. })
  284. .then((res) => {});
  285. },
  286. share() {
  287. this.isvisible = false
  288. let token = uni.getStorageSync("apiToken");
  289. if (!token) {
  290. uni.navigateTo({
  291. url: "/pages/login/index",
  292. });
  293. } else {
  294. console.log(this.option)
  295. this.$http.get("/service/goods/info/" + this.option).then(res => {
  296. if (res && res.code == 200) {
  297. if (res.data == null) {
  298. this.$mUtil.toast("该商品不存在")
  299. } else {
  300. let user = uni.getStorageSync("personal");
  301. this.isvisible = true;
  302. this.$nextTick(() => {
  303. this.$refs.shares.shareInfo(
  304. "/?pageType=1&type=4&id=" + this.goodsId + "&shareId=" + user.id,
  305. 'pages/down',
  306. this.dataForm.title,
  307. "",
  308. this.dataForm.cover
  309. );
  310. });
  311. }
  312. }
  313. })
  314. }
  315. },
  316. openMap(shop) {
  317. uni.openLocation({
  318. latitude: Number(shop.tx_latitude),
  319. longitude: Number(shop.tx_longitude),
  320. // name:shop.name,
  321. address: shop.address,
  322. success: function() {
  323. console.log("success");
  324. },
  325. });
  326. },
  327. // 获取主页数据
  328. getIndexList(shopid) {
  329. this.$http.get("/yxt/shop/info/" + shopid).then((res) => {
  330. uni.stopPullDownRefresh();
  331. this.loading = false;
  332. if (res.data && res.code == 200) {
  333. this.shop = res.data;
  334. }
  335. });
  336. },
  337. getByShop(id) {
  338. //店铺优惠查询
  339. this.$http.get("/marketing/firstOrder/getByShop/" + id).then((res) => {
  340. if (res && res.code == 200) {
  341. this.shopDiscounts = res.data;
  342. }
  343. });
  344. },
  345. getDetailInfo(id) {
  346. this.$http.get("/service/goods/info/" + id).then((res) => {
  347. this.loading = false;
  348. if (res && res.code == 200) {
  349. this.dataForm = res.data;
  350. this.goodsId = res.data.id;
  351. console.log('id类型' + typeof this.goodsId)
  352. this.imglist = res.data.images;
  353. this.shareImg = res.data.cover;
  354. this.shareTitle = res.data.title;
  355. this.mobileDetail = res.data.mobile_detail
  356. this.dataShopId = res.data.shop_id;
  357. this.shop_id = res.data.shop_id;
  358. this.getByShop(this.dataShopId);
  359. this.getIndexList(this.dataShopId);
  360. }
  361. });
  362. },
  363. //评论,商品详情切换
  364. change(i) {
  365. this.isChecked = i;
  366. },
  367. //组合数据
  368. btnBuys() {
  369. let dataJson = {
  370. order_type: 2,
  371. shipment_mode: 2,
  372. marketing_type: 0,
  373. service_contacts: {
  374. contacts: "",
  375. mobile: "",
  376. gender: "",
  377. },
  378. shop_orders: [{
  379. shop_id: this.shop_id,
  380. source_shop_id: this.shop_id,
  381. activity_id: 0,
  382. sponsor_activity_id: 0,
  383. user_remark: "",
  384. items: [{
  385. goods_id: this.dataForm.id,
  386. num: 1,
  387. sku_hash_code: this.dataForm.code,
  388. }, ],
  389. }, ],
  390. };
  391. uni.setStorageSync("dataJson", dataJson);
  392. uni.navigateTo({
  393. url: "../surePay/servicePay?type=service",
  394. });
  395. },
  396. //
  397. btnBuy(i) {
  398. this.goStatus = i;
  399. let token = uni.getStorageSync("apiToken");
  400. //判断是否微信授权登录(没有授权登录进wx-login,授权了但没有注册进login)
  401. if (!token) {
  402. uni.navigateTo({
  403. url: "/pages/login/index",
  404. });
  405. } else {
  406. this.btnBuys();
  407. }
  408. //0 购物车,1 立即购买
  409. },
  410. /*评论*/
  411. loadComment(id) {
  412. this.$http
  413. .get(`/comment/orderGoods/service/goods/comments/${id}`)
  414. .then((res) => {
  415. if (res && res.code == 200) {
  416. this.commentList = res.list;
  417. }
  418. });
  419. },
  420. },
  421. };
  422. </script>
  423. <style lang="scss" scoped>
  424. .introduce {
  425. padding: 40rpx 19rpx 40rpx 30rpx;
  426. .practice {
  427. margin-top: 34rpx;
  428. .practice-item {
  429. display: flex;
  430. align-items: center;
  431. .simple {
  432. width: 6rpx;
  433. height: 26rpx;
  434. background: #0B844A;
  435. border-radius: 3rpx;
  436. }
  437. .practice-details {
  438. font-size: 28rpx;
  439. font-weight: 700;
  440. color: #1a1a1a;
  441. margin-left: 16rpx;
  442. }
  443. }
  444. .introduction-details {
  445. margin-top: 19rpx;
  446. font-size: 24rpx;
  447. color: #666666;
  448. font-weight: 500;
  449. text-align: left;
  450. .item {
  451. font-size: 24rpx;
  452. color: #666666;
  453. }
  454. }
  455. }
  456. .middle {
  457. margin-top: 34rpx;
  458. .middle-item {
  459. display: flex;
  460. align-items: center;
  461. .simple {
  462. width: 6rpx;
  463. height: 26rpx;
  464. background-color: #0B844A;
  465. border-radius: 3rpx;
  466. }
  467. .material {
  468. font-size: 28rpx;
  469. font-weight: 700;
  470. color: #1a1a1a;
  471. margin-left: 16rpx;
  472. }
  473. }
  474. .item-block {
  475. margin-top: 19rpx;
  476. font-size: 24rpx;
  477. font-weight: 400;
  478. color: #666;
  479. line-height: 38rpx;
  480. display: flex;
  481. flex-wrap: wrap;
  482. text {
  483. width: 660rpx;
  484. display: inline-block;
  485. white-space: nowrap;
  486. text-overflow: ellipsis;
  487. overflow: hidden;
  488. }
  489. .row {
  490. margin-right: 54rpx;
  491. display: flex;
  492. align-items: center;
  493. }
  494. }
  495. }
  496. .top {
  497. .simple-content {
  498. color: #666666;
  499. font-weight: 400;
  500. font-size: 24rpx;
  501. margin-top: 19rpx;
  502. .row {
  503. display: flex;
  504. justify-content: space-between;
  505. align-items: center;
  506. font-size: 24rpx;
  507. margin-bottom: 14rpx;
  508. color: #1a1a1a;
  509. .row_l {
  510. display: flex;
  511. view {
  512. width: 500rpx;
  513. white-space: nowrap;
  514. text-overflow: ellipsis;
  515. overflow: hidden;
  516. }
  517. }
  518. .gry {
  519. color: #999999;
  520. }
  521. }
  522. }
  523. .simple {
  524. display: flex;
  525. align-items: center;
  526. .line {
  527. width: 6rpx;
  528. height: 26rpx;
  529. line-height: 26rpx;
  530. background-color: #0B844A;
  531. border-radius: 3rpx;
  532. }
  533. .item {
  534. margin-left: 16rpx;
  535. font-size: 28rpx;
  536. font-weight: 700;
  537. color: #1a1a1a;
  538. }
  539. }
  540. }
  541. .select-icon {
  542. width: 27rpx;
  543. height: 27rpx;
  544. border-radius: 4rpx;
  545. margin-right: 11rpx;
  546. }
  547. }
  548. </style>
  549. <style lang="scss">
  550. .u-FE9000 {
  551. color: #fe9000;
  552. }
  553. page {
  554. background-color: #f5f5f5;
  555. }
  556. .pd24 {
  557. padding: 24rpx;
  558. }
  559. .pd20 {
  560. padding: 20rpx;
  561. }
  562. .pt20-pb14 {
  563. padding-top: 20rpx;
  564. padding-bottom: 14rpx;
  565. }
  566. .pt28-pb18 {
  567. padding-top: 28rpx;
  568. padding-bottom: 18rpx;
  569. }
  570. .pb30 {
  571. padding-bottom: 30rpx;
  572. }
  573. .pb40 {
  574. padding-bottom: 40rpx;
  575. }
  576. .pb50 {
  577. padding-bottom: 50rpx;
  578. }
  579. .pt-pb30 {
  580. padding-top: 30rpx;
  581. padding-bottom: 30rpx;
  582. }
  583. .pt-pb35 {
  584. padding-top: 35rpx;
  585. padding-bottom: 35rpx;
  586. }
  587. .ml54 {
  588. margin-left: 54rpx;
  589. }
  590. .ml138 {
  591. margin-left: 138rpx;
  592. }
  593. .br-rd10 {
  594. border-radius: 10rpx;
  595. }
  596. .br-rd20 {
  597. border-radius: 20rpx;
  598. }
  599. .stb-btn {
  600. padding: 8rpx 18rpx;
  601. border-radius: 10rpx;
  602. }
  603. .br-FF0000 {
  604. border: 1rpx solid #ff0000;
  605. border-radius: 24rpx;
  606. padding: 6rpx 12rpx;
  607. }
  608. .bg-FFF6EE {
  609. background-color: #fff6ee;
  610. }
  611. .mt80 {
  612. margin-top: 80rpx;
  613. }
  614. .product {
  615. // padding-bottom: 150rpx;
  616. }
  617. .pic {
  618. width: 100%;
  619. position: relative;
  620. .swiper {
  621. // height: 620rpx;
  622. height: 100vw;
  623. video {
  624. width: 100%;
  625. // height: 620rpx;
  626. height: 100vw;
  627. }
  628. image {
  629. width: 100%;
  630. // height: 620rpx;
  631. height: 100vw;
  632. }
  633. }
  634. .p-price {
  635. width: 100%;
  636. position: absolute;
  637. top: 600rpx;
  638. background: linear-gradient(90deg, #20a733, #0a824b);
  639. border-radius: 20rpx 20rpx 0px 0px;
  640. .discount {
  641. color: #ffffff;
  642. }
  643. }
  644. }
  645. .richText {
  646. padding: 0 30rpx;
  647. /deep/ img {
  648. margin-top: 0 !important;
  649. }
  650. }
  651. //秒杀,拼团样式
  652. .p-ab {
  653. position: absolute;
  654. top: 448rpx;
  655. }
  656. .stb-list {
  657. padding-bottom: 10rpx;
  658. }
  659. .triangle-bottomright {
  660. width: 0;
  661. height: 0;
  662. border-bottom: 108rpx solid #dccda4;
  663. border-left: 60rpx solid transparent;
  664. }
  665. .seckill {
  666. background-color: #dccda4;
  667. color: #0B844A;
  668. padding: 16rpx;
  669. padding-right: 28rpx;
  670. border-radius: 5rpx 20rpx 0px 0px;
  671. }
  672. .seckill-btn {
  673. width: 86%;
  674. }
  675. .br-284534 {
  676. border-bottom: 1rpx solid rgba($color: #284534, $alpha: 0.3);
  677. }
  678. .gb-te {
  679. padding-top: 20rpx;
  680. padding-bottom: 15rpx;
  681. }
  682. .gb-btn {
  683. padding: 18rpx 80rpx 8rpx;
  684. line-height: 30rpx;
  685. }
  686. .btn-bg-dccda4 {
  687. background: #dccda4;
  688. border-radius: 48rpx 0rpx 0rpx 48rpx;
  689. }
  690. .btn-bg-00321E {
  691. background: #0B844A;
  692. border-radius: 0px 48px 48px 0px;
  693. }
  694. .tab {
  695. position: sticky;
  696. top: 0;
  697. background-color: #fff;
  698. padding-top: 38rpx;
  699. background: #ffffff;
  700. z-index: 9;
  701. .pb30 {
  702. position: relative;
  703. &::before {
  704. content: '';
  705. position: absolute;
  706. left: 50%;
  707. bottom: 0;
  708. transform: translateX(-50%);
  709. width: 0;
  710. height: 2px;
  711. background: #0f8a46;
  712. transition: all 0.3s;
  713. }
  714. &.active {
  715. font-size: 30rpx;
  716. color: #0D8847;
  717. font-weight: 700;
  718. &::before {
  719. width: 100%;
  720. }
  721. }
  722. }
  723. }
  724. .bottom-btn {
  725. width: 100%;
  726. position: fixed;
  727. bottom: 0;
  728. z-index: 50;
  729. border-top: 1rpx solid #e6e6e6;
  730. .cart {
  731. position: relative;
  732. .number {
  733. position: absolute;
  734. top: -10rpx;
  735. left: 45rpx;
  736. padding: 4rpx 8rpx;
  737. background-color: #ff0000;
  738. border: 4rpx solid #ffffff;
  739. border-radius: 40rpx;
  740. }
  741. }
  742. .cart-btn {
  743. width: 230rpx;
  744. height: 85rpx;
  745. background: #dccda4;
  746. border-radius: 43rpx 0rpx 0rpx 43rpx;
  747. }
  748. .buy-btn {
  749. width: 76%;
  750. height: 85rpx;
  751. line-height: 85rpx;
  752. background: #0B844A;
  753. border-radius: 43rpx;
  754. }
  755. }
  756. .flex-sb {
  757. display: flex;
  758. justify-content: space-between;
  759. }
  760. //弹窗
  761. .spec {
  762. border-radius: 18rpx 18rpx 0rpx 0rpx;
  763. padding-top: 30rpx;
  764. max-height: 900rpx;
  765. overflow-y: auto;
  766. .spec-item {
  767. background-color: #f6f6f6;
  768. border: 1px solid #f6f6f6;
  769. padding: 12rpx 30rpx;
  770. font-size: 24rpx;
  771. color: #1a1a1a;
  772. border-radius: 4px;
  773. }
  774. .activeColor {
  775. background-color: #e1e6e3;
  776. border: 1px solid #01321d;
  777. color: #01321d;
  778. border-radius: 4px;
  779. }
  780. .spec-item:not(:last-child) {
  781. margin-right: 24rpx;
  782. }
  783. //减号
  784. .minus {
  785. width: 50rpx;
  786. height: 50rpx;
  787. line-height: 50rpx;
  788. text-align: center;
  789. background: #dedede;
  790. border-radius: 8rpx 0rpx 0rpx 8rpx;
  791. }
  792. .num {
  793. width: 74rpx;
  794. height: 46rpx;
  795. line-height: 46rpx;
  796. text-align: center;
  797. border: 1px solid #dedede;
  798. }
  799. //加号
  800. .plus-sign {
  801. width: 50rpx;
  802. height: 50rpx;
  803. line-height: 50rpx;
  804. text-align: center;
  805. background: #dedede;
  806. border-radius: 0rpx 8rpx 8rpx 0rpx;
  807. }
  808. .specOpen-btn {
  809. margin-top: 68rpx;
  810. padding-bottom: 34rpx;
  811. button {
  812. background-color: #0B844A;
  813. color: #ffffff;
  814. }
  815. }
  816. }
  817. </style>