goods.vue 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027
  1. <template>
  2. <view class="container">
  3. <view class="view-alert" v-if="showHint">
  4. <view class="alert-text">
  5. 点击右上角按钮,然后在弹出的菜单中,点击在浏览器中打开。
  6. </view>
  7. <image class="alert-arrow" src="../static/alert-arrow.png" mode="aspectFit"></image>
  8. </view>
  9. <view class="product">
  10. <view class="u-bg-fff pb40">
  11. <view class="pic">
  12. <!-- <image src="../../../static/delImg/product2.png" mode="aspectFill"></image> -->
  13. <swiper class="swiper" indicator-dots="true" autoplay="true" interval="5000" duration="1500" circular="true">
  14. <swiper-item v-if="dataForm.video_url">
  15. <video :src="dataForm.video_url" style="height:100%"></video>
  16. </swiper-item>
  17. <swiper-item v-for="(item, index) in imglist" :key="index">
  18. <image :src="item" mode="aspectFill"></image>
  19. </swiper-item>
  20. </swiper>
  21. <view class="p-price">
  22. <view class="pd24 u-flex-center">
  23. <view class="u-FFF u-font36" v-if="type == 1">
  24. <rich-text :nodes="$mUtil.priceBigSmall(dataForm.min_sale_price)"></rich-text>
  25. </view>
  26. <view class="u-FFF u-font36" v-if="type == 2 || type == 3">
  27. <rich-text :nodes="$mUtil.priceBigSmall(dataForm.min_price)"></rich-text>
  28. </view>
  29. <view class="u-FFF u-font36" v-if="type == 5">
  30. {{ dataForm.min_exchange_point }}积分
  31. <!-- <rich-text :nodes="$mUtil.priceBigSmall(dataForm.min_sale_price)"></rich-text> -->
  32. </view>
  33. <text class="discount u-font24 u-ml20 u-del" v-if="type == 1">¥{{ dataForm.max_market_price }}</text>
  34. <text class="discount u-font24 u-ml20 u-del"
  35. v-if="type == 2 || type == 3">¥{{ dataForm.max_sale_price }}</text>
  36. </view>
  37. <view class="p-ab u-flex-center" v-if="type == 2 || type == 3">
  38. <view class="triangle-bottomright"></view>
  39. <view class="seckill u-text-center u-font28">
  40. <!-- active_state 0:未开始 * 1:进行中 * 2:已结束 -->
  41. <view class="u-bold" v-if="dataForm.active_state == 2">已结束</view>
  42. <view class="u-bold" v-if="dataForm.active_state == 1">距结束</view>
  43. <view class="u-bold" v-if="dataForm.active_state == 0">离开抢</view>
  44. <view v-if="dataForm.active_state != 2">
  45. <uni-countdown :backgroundColor="'none'" @timeup="overDown1" :color="'#00321e'"
  46. :splitorColor="'#00321e'" :show-day="time1[0] > 0" :day="time1[0]" :hour="time1[1]"
  47. :minute="time1[2]" :second="time1[3]"></uni-countdown>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="mt30 u-plr30">
  53. <view>
  54. <text class="u-font34 u-bold u-1A1A1A">{{ dataForm.title }}</text>
  55. </view>
  56. <view class="u-font24 u-mt15 u-999" v-if="type==1 ">
  57. <text>已售
  58. <text class="u-FF0000">{{ dataForm.result_sale_num }}</text>件,仅剩<text class="u-FF0000">{{
  59. dataForm.residual_inventory
  60. }}</text>件</text>
  61. </view>
  62. <view class="u-font24 u-mt15 u-999" v-else>
  63. <text>已售
  64. <text class="u-FF0000">{{ dataForm.result_sale_num }}</text>件</text>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="u-bg-fff u-mt10">
  70. <view class="u-plr30 u-flex-center-sb pt-pb35">
  71. <view class="u-flex-center">
  72. <view>
  73. <image class="u-avatar104" :src="shop.logo"></image>
  74. </view>
  75. <view class="u-ml25">
  76. <view class="u-font28 u-1A1A1A u-bold">{{ shop.shop_name }}</view>
  77. <view class="u-999 u-font24 u-mt5 u-text2">
  78. <text class="iconfont u-193E2C">&#xe64b;</text>
  79. {{ shop.province_name }}{{ shop.city_name }}{{ shop.area_name
  80. }}{{ shop.address }}
  81. </view>
  82. </view>
  83. </view>
  84. <!-- <view class="iconfont">&#xe6c7;</view> -->
  85. </view>
  86. </view>
  87. <view class="u-bg-fff u-mt10">
  88. <view class="tab u-flex-center-sa u-font30 u-1A1A1A u-border-one-one"
  89. :style="`top: calc(${statusBarHeight}px + 44px)`">
  90. <view @tap="change(0)" class="pb30" :class="{ active: isChecked == 0 }">商品详情</view>
  91. <view @tap="change(1)" class="pb30" :class="{ active: isChecked == 1 }">
  92. 用户评论({{ commentList.length }})</view>
  93. </view>
  94. <view class="u-mt10">
  95. <!--商品详情-->
  96. <view v-if="isChecked == 0">
  97. <view class="richText ql-editor-box">
  98. <rich-text :nodes="goodsInfo.mobile_detail"></rich-text>
  99. </view>
  100. </view>
  101. <!--评论-->
  102. <view class="u-plr30" v-else>
  103. <comment :value="commentList"></comment>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. <view class="bottom-btn u-bg-fff">
  109. <view class="pt-pb30 u-plr30 u-flex-center-sb">
  110. <view class="leftbox">
  111. <button @click="handleTip()" class="u-text-center goods-tools">
  112. <view class="iconfont2 u-font44 u-999">&#xe684;</view>
  113. <view class="u-font28 u-1A1A1A">分享</view>
  114. </button>
  115. <view class="goods-tools service" @click="handleTip()">
  116. <image src="@/static/kefu.png" mode="aspectFill"></image>
  117. <view class="u-font28 u-1A1A1A">客服</view>
  118. </view>
  119. <view class="cart" @click="handleTip()">
  120. <view class="u-text-center goods-tools">
  121. <view class="iconfont2 car-icon u-font44 u-999">&#xe600;</view>
  122. <view class="u-font28 u-1A1A1A">购物车</view>
  123. </view>
  124. </view>
  125. </view>
  126. <!--普通商品-->
  127. <view class="u-flex-center">
  128. <button class="cart-btn u-font30" @click="handleTip()" v-if="dataForm.area_feature != 1">
  129. 加入购物车
  130. </button>
  131. <button class="buy-btn u-font30" @click="handleTip()">
  132. 立即购买
  133. </button>
  134. </view>
  135. </view>
  136. </view>
  137. <view class="jump-box" @click="openApp">
  138. <image class="logo-img" src="/static/logo.png" mode="aspectFill"></image>
  139. <view class="tip">打开宜格服务APP</view>
  140. </view>
  141. <view class="wx-open">
  142. <wx-open-launch-app id="launch-btn" appid="wx2cbf40f5fffa9e80" :extinfo="queryPath" @launch="launchApp"
  143. @error="errorApp">
  144. <script type="text/wxtag-template">
  145. <style>
  146. .btn {
  147. width: 100%;
  148. height: 100%;
  149. border: none;
  150. font-size: 14px;
  151. border-radius: 4px;
  152. background-color: #fff;
  153. }
  154. </style>
  155. <button class="btn">打开宜格服务APP</button>
  156. <image src="/static/wxbtn.png" mode=""></image>
  157. </script>
  158. </wx-open-launch-app>
  159. </view>
  160. <ldLoading isFullScreen :active="loading"></ldLoading>
  161. </view>
  162. </template>
  163. <script>
  164. import comment from "@/components/ld-comment/ld-comment.vue";
  165. export default {
  166. components: {
  167. comment
  168. },
  169. data() {
  170. return {
  171. config: {
  172. back: false, //false是tolbar页面 是则不写
  173. title: "商品详情",
  174. color: "#FFFFFF",
  175. //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
  176. backgroundColor: [1, "#00321E"],
  177. statusBarFontColor: "#FFFFFF",
  178. backTabPage: "",
  179. },
  180. //手机状态栏高度
  181. statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
  182. imglist: [], //详情图片数组
  183. dataForm: {}, //商品详情
  184. shop: {}, //店铺信息
  185. cover: "",
  186. loading: true,
  187. btnText: "打开App",
  188. time1: [0, 0, 0, 0],
  189. type: null,
  190. commentList: [],
  191. isChecked: 0,
  192. goodsInfo: {},
  193. timer: null,
  194. showHint: false,
  195. queryPath: null
  196. };
  197. },
  198. props: {
  199. options: {
  200. type: Object,
  201. default: null,
  202. },
  203. },
  204. watch: {
  205. options(n) {
  206. this.options = n;
  207. },
  208. },
  209. created() {
  210. this.type = this.options.type;
  211. this.queryPath = `jumpType=goods&goodsType=${this.options.type}&goodsId=${this.options.id}`
  212. alert('res=>' + uni.getStorageSync('wx_access_token'))
  213. alert('res=>' + uni.getStorageSync('wx_js_ticket'))
  214. if ((this.options.type == 1 || this.options.type == 5) && this.options.id) {
  215. this.getDefaultDetailInfo(this.options.id);
  216. }
  217. if (this.options.type == 2 && this.options.id) {
  218. this.getSeckillDetail(this.options.id);
  219. }
  220. if (this.options.type == 3 && this.options.id) {
  221. this.getGroupsDetailInfo(this.options.id);
  222. }
  223. if (this.options.type == 4 && this.options.id) {
  224. this.getserviceDetailInfo(this.options.id);
  225. }
  226. this.goodsDetail(this.options.id)
  227. this.loadComment(this.options.id);
  228. },
  229. onShow() {
  230. document.addEventListener("visibilitychange", function() {
  231. if (that.timer) {
  232. that.opening = false
  233. clearTimeout(that.timer)
  234. }
  235. }, false);
  236. },
  237. onLoad(options) {},
  238. methods: {
  239. launchApp(e) {
  240. console.log(e, 1111)
  241. },
  242. errorApp(e) {
  243. console.log(e, 1111)
  244. },
  245. openApp() {
  246. const ua = navigator.userAgent.toLowerCase()
  247. const isWeixin = ua.indexOf('micromessenger') != -1;
  248. if (isWeixin) {
  249. this.showHint = isWeixin;
  250. uni.pageScrollTo({
  251. scrollTop: 0
  252. })
  253. } else {
  254. const osName = uni.getSystemInfoSync().osName
  255. if (osName == 'android') {
  256. this.getData(0)
  257. } else {
  258. this.getData(1)
  259. }
  260. }
  261. },
  262. getData(type) {
  263. this.$http.get("/app/version/newest", {
  264. type: type
  265. }).then((res) => {
  266. if (res && res.data && res.code == 200) {
  267. // try {
  268. // if (type == 0) {
  269. // window.location = "ygfwUrlSchemes://"
  270. // }
  271. // } catch (e) {}
  272. // window.location.href = res.data.downloadLink;
  273. this.browserOpenApp(type, res.data.downloadLink)
  274. } else {
  275. this.$mUtil.toast("暂无下载地址")
  276. }
  277. });
  278. },
  279. browserOpenApp(type, url) {
  280. let that = this
  281. that.opening = true
  282. let params = JSON.stringify({
  283. goodsTypeJump: that.options.type,
  284. goodsIdJump: that.options.id
  285. })
  286. let schemeUrl = `ygfwUrlSchemes://jumpType=goods&goodsType=${that.options.type}&goodsId=${that.options.id}`
  287. if (type == 0) { // 安卓处理
  288. let ifr = document.createElement('iframe');
  289. ifr.src = schemeUrl;
  290. ifr.style.display = 'none';
  291. document.body.appendChild(ifr);
  292. that.timer = window.setTimeout(function() { // 未安装的情况
  293. that.opening = false
  294. document.body.removeChild(ifr);
  295. // 提示下载
  296. let r = confirm("未安装APP? 是否去下载页下载!")
  297. if (r) {
  298. uni.navigateTo({
  299. url: '/pages/down'
  300. })
  301. }
  302. }, 5000)
  303. } else { // IOS处理
  304. window.location = schemeUrl
  305. that.timer = setTimeout(function() { // 未安装的情况
  306. that.opening = false
  307. // 跳转app store
  308. let r = confirm("未安装APP? 是否去下载页下载!")
  309. if (r) {
  310. uni.navigateTo({
  311. url: '/pages/down'
  312. })
  313. }
  314. }, 5000);
  315. }
  316. },
  317. handleTip() {
  318. uni.showToast({
  319. title: '请前往宜格服务APP操作!',
  320. icon: 'none',
  321. duration: 2000
  322. })
  323. },
  324. // 获取主页数据
  325. getIndexList(shopid) {
  326. this.$shopHttp.get("/yxt/shop/info/" + shopid).then((res) => {
  327. uni.stopPullDownRefresh();
  328. this.loading = false;
  329. if (res.data && res.code == 200) {
  330. this.shop = res.data;
  331. }
  332. });
  333. },
  334. //普通商品
  335. getDefaultDetailInfo(id) {
  336. this.$shopHttp.get("/goods/info/" + id).then((res) => {
  337. this.loading = false;
  338. if (res && res.code == 200) {
  339. this.dataForm = res.data;
  340. this.goodsId = res.data.id;
  341. this.imglist = res.data.images;
  342. this.shareImg = res.data.cover;
  343. this.shareTitle = res.data.title;
  344. if (res.data.point_goods) {
  345. this.type = 5;
  346. }
  347. this.getIndexList(res.data.shop_id);
  348. }
  349. });
  350. },
  351. /**组团商品*/
  352. getGroupsDetailInfo(id) {
  353. this.$shopHttp.get("/groupbuy/activitygoods/goodsInfo/" + id).then((res) => {
  354. this.loading = false;
  355. if (res && res.code == 200) {
  356. this.dataForm = res.data;
  357. this.goodsId = res.data.id;
  358. this.imglist = res.data.cover.split(",");
  359. this.getIndexList(res.data.shop_id);
  360. if (res.data.active_state == 0) {
  361. this.time1 = this.$mUtil
  362. .countDown(res.data.activity_start_time)
  363. .split(":");
  364. } else {
  365. this.time1 = this.$mUtil
  366. .countDown(res.data.finish_time)
  367. .split(":")
  368. .map((val) => Number(val));
  369. }
  370. }
  371. });
  372. },
  373. getSeckillDetail(id) {
  374. this.$shopHttp
  375. .get("/marketing/seckillActivityGoods/info/" + id)
  376. .then((res) => {
  377. this.loading = false;
  378. if (res && res.code == 200) {
  379. this.dataForm = res.data;
  380. this.goodsId = res.data.id;
  381. this.$shopHttp.get("/yxt/shop/info/" + res.data.shop_id).then((res) => {
  382. if (res.data && res.code == 200) {
  383. this.shop = res.data;
  384. }
  385. });
  386. this.imglist = res.data.cover.split(",");
  387. if (res.data.active_state == 0) {
  388. this.time1 = this.$mUtil
  389. .countDown(res.data.activity_start_time)
  390. .split(":");
  391. } else {
  392. this.time1 = this.$mUtil
  393. .countDown(res.data.finish_time)
  394. .split(":");
  395. }
  396. }
  397. });
  398. },
  399. getserviceDetailInfo(id) {
  400. this.$shopHttp.get("/service/goods/info/" + id).then((res) => {
  401. this.loading = false;
  402. if (res && res.code == 200) {
  403. this.dataForm = res.data;
  404. this.goodsId = res.data.id;
  405. this.imglist = res.data.images;
  406. this.shareImg = res.data.cover;
  407. this.shareTitle = res.data.title;
  408. this.getIndexList(res.data.shop_id);
  409. }
  410. });
  411. },
  412. /**
  413. * 详情
  414. * */
  415. goodsDetail(id) {
  416. this.$shopHttp.get(`/goods/content/${id}`).then((res) => {
  417. if (res && res.code == 200) {
  418. this.goodsInfo = res.data;
  419. }
  420. });
  421. },
  422. /*评论*/
  423. loadComment(id) {
  424. this.$shopHttp
  425. .get(`/comment/orderGoods/getgoodscomments/${id}`)
  426. .then((res) => {
  427. if (res && res.code == 200) {
  428. this.commentList = res.list;
  429. }
  430. });
  431. },
  432. //评论,商品详情切换
  433. change(i) {
  434. this.isChecked = i;
  435. },
  436. },
  437. };
  438. </script>
  439. <style lang="scss">
  440. page {
  441. background-color: #f5f5f5;
  442. }
  443. .pd24 {
  444. padding: 24rpx;
  445. }
  446. .pd20 {
  447. padding: 20rpx;
  448. }
  449. .pt20-pb14 {
  450. padding-top: 20rpx;
  451. padding-bottom: 14rpx;
  452. }
  453. .pt28-pb18 {
  454. padding-top: 28rpx;
  455. padding-bottom: 18rpx;
  456. }
  457. .pb30 {
  458. padding-bottom: 30rpx;
  459. }
  460. .pb40 {
  461. padding-bottom: 40rpx;
  462. }
  463. .pb50 {
  464. padding-bottom: 50rpx;
  465. }
  466. .pt-pb30 {
  467. padding-top: 30rpx;
  468. padding-bottom: 30rpx;
  469. }
  470. .pt-pb35 {
  471. padding-top: 35rpx;
  472. padding-bottom: 35rpx;
  473. }
  474. .ml54 {
  475. margin-left: 54rpx;
  476. }
  477. .ml138 {
  478. margin-left: 138rpx;
  479. }
  480. .br-rd10 {
  481. border-radius: 10rpx;
  482. }
  483. .br-rd20 {
  484. border-radius: 20rpx;
  485. }
  486. .stb-btn {
  487. padding: 8rpx 18rpx;
  488. border-radius: 10rpx;
  489. }
  490. .br-FF0000 {
  491. border: 1rpx solid #ff0000;
  492. border-radius: 24rpx;
  493. padding: 6rpx 12rpx;
  494. }
  495. .bg-FFF6EE {
  496. background-color: #fff6ee;
  497. }
  498. .mt30 {
  499. margin-top: 30rpx;
  500. }
  501. .product {
  502. padding-bottom: 150rpx;
  503. }
  504. .pic {
  505. width: 100%;
  506. position: relative;
  507. .swiper {
  508. height: 700rpx;
  509. video {
  510. width: 100%;
  511. height: 700rpx;
  512. }
  513. image {
  514. width: 100%;
  515. height: 700rpx;
  516. }
  517. }
  518. .p-price {
  519. width: 100%;
  520. position: absolute;
  521. top: 580rpx;
  522. background: #FA6138;
  523. position: relative;
  524. top: 0px;
  525. z-index: 9;
  526. .discount {
  527. color: #ffffff;
  528. }
  529. .p-ab {
  530. position: absolute;
  531. top: -5px;
  532. right: 0;
  533. }
  534. }
  535. }
  536. .richText {
  537. padding: 30rpx;
  538. /deep/ img {
  539. margin-top: 0 !important;
  540. vertical-align: middle;
  541. }
  542. }
  543. // 富文本展示
  544. .ql-editor-box {
  545. text-align: justify;
  546. /deep/ .ql-indent-1 {
  547. margin-left: 96rpx;
  548. }
  549. /deep/ .ql-indent-2 {
  550. margin-left: 192rpx;
  551. }
  552. /deep/ .ql-indent-3 {
  553. margin-left: 288rpx;
  554. }
  555. /deep/ .ql-indent-4 {
  556. margin-left: 384rpx;
  557. }
  558. /deep/ .ql-indent-5 {
  559. margin-left: 480rpx;
  560. }
  561. /deep/ .ql-indent-6 {
  562. margin-left: 576rpx;
  563. }
  564. /deep/ .ql-indent-7 {
  565. margin-left: 672rpx;
  566. }
  567. /deep/ .ql-indent-8 {
  568. margin-left: 768rpx;
  569. }
  570. /deep/ img {
  571. max-width: 100%;
  572. }
  573. /deep/ .ql-align-center {
  574. text-align: center;
  575. }
  576. /deep/ .ql-align-right {
  577. text-align: right;
  578. }
  579. /deep/ blockquote {
  580. display: block;
  581. border-left: 8px solid #d0e5f2;
  582. padding: 5px 10px;
  583. margin: 10px 0;
  584. line-height: 1.4;
  585. font-size: 100%;
  586. background-color: #f1f1f1;
  587. }
  588. /deep/ .ql-indent-1 {
  589. margin-left: 60rpx;
  590. }
  591. /deep/ .ql-indent-2 {
  592. margin-left: 120rpx;
  593. }
  594. /deep/ .ql-indent-3 {
  595. margin-left: 180rpx;
  596. }
  597. /deep/ .ql-indent-4 {
  598. margin-left: 240rpx;
  599. }
  600. /deep/ .ql-indent-5 {
  601. margin-left: 300rpx;
  602. }
  603. /deep/ .ql-size-huge {
  604. font-size: 80rpx;
  605. display: inline-block;
  606. line-height: 90rpx;
  607. }
  608. /deep/ .ql-size-large {
  609. font-size: 48rpx;
  610. display: inline-block;
  611. line-height: 50rpx;
  612. }
  613. /deep/ .ql-size-small {
  614. font-size: 24rpx;
  615. display: inline-block;
  616. line-height: 30rpx;
  617. }
  618. /deep/ .ql-font-serif {
  619. font-family: Georgia, Times New Roman, serif;
  620. }
  621. /deep/ .ql-font-monospace {
  622. font-family: Monaco, Courier New, monospace;
  623. }
  624. }
  625. //秒杀,拼团样式
  626. .p-ab {
  627. position: absolute;
  628. top: 448rpx;
  629. }
  630. .stb-list {
  631. padding-bottom: 10rpx;
  632. }
  633. .triangle-bottomright {
  634. width: 0;
  635. height: 0;
  636. border-bottom: 108rpx solid #FA6138;
  637. border-left: 60rpx solid transparent;
  638. }
  639. .seckill {
  640. background-color: #FA6138;
  641. color: #00321e;
  642. padding: 16rpx;
  643. padding-right: 28rpx;
  644. border-radius: 5rpx 20rpx 0px 0px;
  645. }
  646. .seckill-btn {
  647. width: 86%;
  648. }
  649. .br-284534 {
  650. border-bottom: 1rpx solid rgba($color: #284534, $alpha: 0.3);
  651. }
  652. .gb-te {
  653. padding-top: 20rpx;
  654. padding-bottom: 15rpx;
  655. }
  656. .gb-btn {
  657. padding: 18rpx 80rpx 8rpx;
  658. line-height: 30rpx;
  659. }
  660. .btn-bg-dccda4 {
  661. background: #FA6138;
  662. border-radius: 48rpx 0rpx 0rpx 48rpx;
  663. }
  664. .btn-bg-00321E {
  665. background: #00321e;
  666. border-radius: 0px 48px 48px 0px;
  667. }
  668. .tab {
  669. position: sticky;
  670. top: 0;
  671. background-color: #fff;
  672. padding-top: 38rpx;
  673. z-index: 9;
  674. .pb30 {
  675. position: relative;
  676. &::before {
  677. content: '';
  678. position: absolute;
  679. left: 50%;
  680. bottom: 0;
  681. transform: translateX(-50%);
  682. width: 0;
  683. height: 2px;
  684. background: #FA6138;
  685. transition: all 0.3s;
  686. }
  687. &.active {
  688. font-size: 30rpx;
  689. color: #FA6138;
  690. font-weight: 700;
  691. &::before {
  692. width: 100%;
  693. }
  694. }
  695. }
  696. }
  697. .bottom-btn {
  698. width: 100%;
  699. position: fixed;
  700. bottom: 0;
  701. z-index: 9;
  702. border-top: 1rpx solid #e6e6e6;
  703. .leftbox {
  704. display: flex;
  705. align-items: center;
  706. height: 84rpx;
  707. .u-text-center {
  708. margin-right: 20rpx;
  709. }
  710. .service {
  711. image {
  712. width: 40rpx;
  713. height: 40rpx;
  714. margin: 0 auto;
  715. }
  716. margin-right: 20rpx;
  717. }
  718. }
  719. .cart {
  720. position: relative;
  721. .car-icon {
  722. position: relative;
  723. .nums {
  724. font-size: 20rpx;
  725. color: #FFFFFF;
  726. font-weight: 400;
  727. padding: 4rpx;
  728. height: 30rpx;
  729. min-width: 30rpx;
  730. line-height: 23rpx;
  731. background-color: #FF0000;
  732. border-radius: 15rpx;
  733. position: absolute;
  734. right: 5rpx;
  735. top: -10rpx;
  736. }
  737. }
  738. .number {
  739. position: absolute;
  740. top: -10rpx;
  741. left: 45rpx;
  742. padding: 4rpx 8rpx;
  743. background-color: #ff0000;
  744. border: 4rpx solid #ffffff;
  745. border-radius: 40rpx;
  746. }
  747. }
  748. .cart-btn {
  749. width: 200rpx;
  750. height: 85rpx;
  751. line-height: 85rpx;
  752. background: #FF9651;
  753. color: white;
  754. border-radius: 40rpx;
  755. margin-right: 10rpx;
  756. }
  757. .buy-btn {
  758. width: 200rpx;
  759. height: 85rpx;
  760. color: white;
  761. line-height: 85rpx;
  762. background: #FA6138;
  763. border-radius: 40rpx;
  764. margin-left: 10rpx;
  765. }
  766. }
  767. .flex-sb {
  768. display: flex;
  769. justify-content: space-between;
  770. }
  771. //弹窗
  772. .spec {
  773. border-radius: 18rpx 18rpx 0rpx 0rpx;
  774. padding-top: 30rpx;
  775. max-height: 900rpx;
  776. overflow-y: auto;
  777. .spec-item {
  778. background-color: #f6f6f6;
  779. border: 1px solid #f6f6f6;
  780. padding: 12rpx 30rpx;
  781. font-size: 24rpx;
  782. color: #1a1a1a;
  783. border-radius: 4px;
  784. }
  785. .activeColor {
  786. background-color: #e1e6e3;
  787. border: 1px solid #01321d;
  788. color: #01321d;
  789. border-radius: 4px;
  790. }
  791. .spec-item:not(:last-child) {
  792. margin-right: 24rpx;
  793. }
  794. //减号
  795. .minus {
  796. width: 50rpx;
  797. height: 50rpx;
  798. line-height: 50rpx;
  799. text-align: center;
  800. background: #dedede;
  801. border-radius: 8rpx 0rpx 0rpx 8rpx;
  802. }
  803. .num {
  804. width: 74rpx;
  805. height: 46rpx;
  806. line-height: 46rpx;
  807. text-align: center;
  808. border: 1px solid #dedede;
  809. }
  810. //加号
  811. .plus-sign {
  812. width: 50rpx;
  813. height: 50rpx;
  814. line-height: 50rpx;
  815. text-align: center;
  816. background: #dedede;
  817. border-radius: 0rpx 8rpx 8rpx 0rpx;
  818. }
  819. .specOpen-btn {
  820. margin-top: 68rpx;
  821. padding-bottom: 34rpx;
  822. button {
  823. background-color: #01331f;
  824. color: #ffffff;
  825. }
  826. }
  827. }
  828. .goods-tools {
  829. display: flex;
  830. flex-direction: column;
  831. justify-content: flex-end;
  832. height: 84rpx;
  833. line-height: 42rpx;
  834. }
  835. .jump-box {
  836. position: fixed;
  837. left: 50%;
  838. bottom: 200rpx;
  839. display: flex;
  840. justify-content: center;
  841. align-items: center;
  842. width: 350rpx;
  843. height: 80rpx;
  844. color: #fff;
  845. background-color: #6be5f8;
  846. border-radius: 40rpx;
  847. transform: translateX(-50%);
  848. z-index: 99;
  849. .logo-img {
  850. width: 40rpx;
  851. height: 40rpx;
  852. margin-right: 10rpx;
  853. box-shadow: 0 0 10rpx 10rpx rgba(0, 0, 0, 0.1);
  854. }
  855. .tip {
  856. font-size: 28rpx;
  857. }
  858. }
  859. .view-alert {
  860. /* position: absolute;
  861. left: 0;
  862. top: 0;
  863. z-index: 9; */
  864. width: 750rpx;
  865. background: rgb(52, 52, 52);
  866. margin-left: 0px;
  867. margin-right: 0px;
  868. padding: 60rpx 30rpx 60rpx 60rpx;
  869. box-shadow: rgba(22, 22, 23, 0.62) 0px -10px 16px inset;
  870. display: flex;
  871. justify-content: space-between;
  872. align-items: stretch;
  873. box-sizing: border-box;
  874. .alert-text {
  875. flex: 1;
  876. color: #7f7e7e;
  877. font-weight: 400 !important;
  878. padding-right: 60rpx;
  879. line-height: 1.5;
  880. }
  881. .alert-arrow {
  882. flex-shrink: 0;
  883. width: 60rpx;
  884. height: 60rpx;
  885. margin-top: -30rpx;
  886. }
  887. }
  888. .wx-open {
  889. position: fixed;
  890. bottom: 400rpx;
  891. left: 50%;
  892. width: 300rpx;
  893. height: 100rpx;
  894. color: red;
  895. transform: translateX(-50%);
  896. z-index: 9;
  897. #launch-btn {
  898. width: 100%;
  899. height: 100%;
  900. .btn {
  901. width: 100%;
  902. height: 100%;
  903. font-size: 28rpx;
  904. border: none;
  905. border-radius: 8rpx;
  906. background-color: #fff;
  907. }
  908. }
  909. }
  910. </style>