goods.vue 25 KB

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