goods.vue 25 KB

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