goods.vue 25 KB

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