goods.vue 26 KB

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