product.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780
  1. <template>
  2. <view class="container">
  3. <!-- 轮播图 -->
  4. <top-swiper :imgList="imgList"></top-swiper>
  5. <view class="sckill-top">
  6. <view class="top-left">
  7. <view class="left-top">限时秒杀价</view>
  8. <view class="left-btm">
  9. <text class="now-pri">{{ goodsObjact.price }}</text>
  10. <text class="old-pri">¥{{ goodsObjact.ot_price }}</text>
  11. </view>
  12. </view>
  13. <view class="top-right">
  14. <view class="right-top">距离本场结束还剩</view>
  15. <uni-countdown
  16. class="timeBox"
  17. color="#901b21"
  18. background-color="#fff"
  19. splitor-color="#fff"
  20. :show-day="true"
  21. :hour="seckillObj.stopTimeH"
  22. :minute="seckillObj.stopTimeM"
  23. :second="seckillObj.stopTimeS"
  24. ></uni-countdown>
  25. </view>
  26. </view>
  27. <!-- 标题 -->
  28. <product-content :goodsObjact="goodsObjact"></product-content>
  29. <!-- 拼货时间及优惠 -->
  30. <!-- <discounts @clickCoupon="Getcoupon" :Info="goodsObjact.store_info" :showCoupon="true"></discounts> -->
  31. <!-- 猜你喜欢 -->
  32. <!-- <guess-like @Addcar='Addcar' @clickNavTo='navToDetailPage' :goodList = 'good_list||[]'></guess-like> -->
  33. <!-- 评价 -->
  34. <estimate @navTo="navTo('/pages/product/reply?id=' + goodsid)" v-if="reply" :reply="reply" :list="list"></estimate>
  35. <!-- 规格信息 -->
  36. <fresh-detail :goodsObjact="goodsObjact"></fresh-detail>
  37. <!-- 图文详情 -->
  38. <content-text :description="description"></content-text>
  39. <!-- 底部高度撑开 -->
  40. <view class="contentBottomHeight"></view>
  41. <!-- 底部操作菜单 -->
  42. <product-bottom @buy="buy" :goodsObjact="goodsObjact" :goodsid="goodsid" @specOPne="specOPne"></product-bottom>
  43. <!-- 规格-模态层弹窗 -->
  44. <view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec">
  45. <!-- 遮罩层 -->
  46. <view class="mask"></view>
  47. <view class="layer attr-content" @click.stop="stopPrevent">
  48. <view class="a-t">
  49. <image :src="actionImage"></image>
  50. <view class="right">
  51. <text class="name clamp">{{ goodsObjact.store_name }}</text>
  52. <view class="price"><text>¥</text>{{ actionPrice * goodsNumber }}</view>
  53. <image src="../../static/icon/del.png" mode="" class="right-img" @click="close()"></image>
  54. <!-- <text class="stock">库存:{{ goodsStore }}件</text> -->
  55. <!-- <view class="selected" v-if="specList != ''">
  56. 已选:
  57. <text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem }}</text>
  58. </view> -->
  59. </view>
  60. </view>
  61. <view v-for="(item, index) in specList" :key="index" class="attr-list">
  62. <text>选择{{ item.attr_name }}分类</text>
  63. <view class="item-list">
  64. <text
  65. v-for="(childItem, childIndex) in item.attr_value"
  66. :key="childIndex"
  67. class="tit"
  68. :class="{ selected: childItem.check }"
  69. @click="selectSpec(childItem, item, index)"
  70. >
  71. {{ childItem.attr }}
  72. </text>
  73. </view>
  74. </view>
  75. <view class="mun-box">
  76. <text>购买数量</text>
  77. <view class="num">
  78. <uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
  79. </view>
  80. </view>
  81. <button class="btn" @click.stop="buy" v-show="buys_show">完成</button>
  82. <button class="btn" style="background-color: #999999;" v-show="buys_shows">售罄</button>
  83. </view>
  84. </view>
  85. </view>
  86. </template>
  87. <script>
  88. import { goodsDetail, cartAdd, seckillGoods } from '@/api/product.js';
  89. import { mapState } from 'vuex';
  90. import store from '@/store/index.js';
  91. import { saveUrl } from '@/utils/loginUtils.js';
  92. // #ifdef H5
  93. import { weixindata } from '@/utils/wxAuthorized';
  94. // #endif
  95. // 头部轮播图
  96. import topSwiper from './common/topSwiper.vue';
  97. // 标题
  98. import productContent from './common/productContent.vue';
  99. // 到货时间及优惠
  100. import discounts from './common/discounts.vue';
  101. // 规格信息
  102. import freshDetail from './common/freshDetail.vue';
  103. // 图文详情
  104. import contentText from './common/contentText.vue';
  105. // 底部按钮
  106. import productBottom from './common/productBottom.vue';
  107. // 猜你喜欢
  108. import guessLike from './common/guessLike.vue';
  109. // 评价
  110. import estimate from './common/estimate.vue';
  111. //增减数量
  112. import uniNumberBox from '@/components/uni-number-box.vue'
  113. export default {
  114. components: {
  115. guessLike,
  116. topSwiper,
  117. productContent,
  118. discounts,
  119. freshDetail,
  120. contentText,
  121. productBottom,
  122. estimate,
  123. uniNumberBox
  124. },
  125. data() {
  126. return {
  127. isShare: false,
  128. goodsStore: 0, //选中库存
  129. specList: [],
  130. buys_show: true,
  131. buys_shows: false,
  132. specSelected: [], //选中的分类
  133. specClass: 'none', //显示隐藏弹窗
  134. many: 1, //1是单规格 2是多规格
  135. reply: '', //评论
  136. list: '', //商品详情的数据
  137. type: 1, //默认支付方式add为
  138. goodsType: 0,
  139. goodsNumber: 1, //购买数量
  140. goodsid: '', //商品id
  141. description: '', //商品描述
  142. goodsObjact: {
  143. percent: 1
  144. }, //保存商品数据
  145. //图片循环
  146. imgList: [],
  147. // 对比对象
  148. actionPrice: 0, //默认选中商品价格
  149. actionImage: '', //默认选中图片
  150. good_list: '', //猜你喜欢列表
  151. goodsNumberMax: 0, //最大可购买数量
  152. // 倒计时数据保存
  153. seckillObj: {
  154. stopTime: 0, //结束时间
  155. stop: false, //是否结束
  156. stopTimeH: 0, //小时
  157. stopTimeM: 0, //分钟
  158. stopTimeS: 0, //秒钟
  159. stopTimeD: 0, //天
  160. upTime: 0 //更新组件内部组件用
  161. },
  162. // 拼团数据保存
  163. pink: {
  164. id: '', //拼团编号
  165. uid: '', //用户编号
  166. people: '', //拼团人数
  167. price: '', //拼团价格
  168. stop_time: '', //拼团结束时间
  169. nickname: '', //团长昵称
  170. avatar: '', //团长头像
  171. count: '', //拼团剩余人数
  172. h: '', //时
  173. i: '', //分
  174. s: '' //秒
  175. },
  176. userInfo: ''
  177. };
  178. },
  179. filters: {
  180. parseIntTo(percent) {
  181. percent = +percent * 100;
  182. if (percent % 1 === 0) {
  183. return percent;
  184. } else {
  185. percent = percent.toFixed(1);
  186. return percent;
  187. }
  188. }
  189. },
  190. async onLoad(options) {
  191. let obj = this;
  192. obj.userInfo = uni.getStorageSync('userInfo');
  193. //保存商品id
  194. this.goodsid = options.id;
  195. if (options.type) {
  196. this.goodsType = options.type;
  197. }
  198. // 判断有无人邀请
  199. if (options.spread) {
  200. // 存储邀请人
  201. uni.setStorageSync('spread', options.spread);
  202. }
  203. saveUrl();
  204. this.goodsDetail();
  205. // 注册邀请信息
  206. // #ifdef H5
  207. let bool = uni.getStorageSync('weichatBrowser') || '';
  208. if (bool) {
  209. weixindata();
  210. }
  211. // #endif
  212. },
  213. computed: {
  214. ...mapState(['weichatObj', 'baseURL', 'urlFile'])
  215. },
  216. // 分享
  217. onShareAppMessage(options) {
  218. // 设置菜单中的转发按钮触发转发事件时的转发内容
  219. let pages = getCurrentPages(); //获取加载的页面
  220. let currentPage = pages[pages.length - 1]; //获取当前页面的对象
  221. let url = currentPage.route; //当前页面url
  222. let item = currentPage.options; //如果要获取url中所带的参数可以查看options
  223. let shareObj = {
  224. title: this.goodsObjact.store_name + ' 价格:' + this.goodsObjact.price, // 默认是小程序的名称(可以写slogan等)
  225. path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
  226. imageUrl: this.goodsObjact.image,
  227. success: function(res) {
  228. // 转发成功之后的回调
  229. if (res.errMsg == 'shareAppMessage:ok') {
  230. }
  231. },
  232. fail: function() {
  233. // 转发失败之后的回调
  234. if (res.errMsg == 'shareAppMessage:fail cancel') {
  235. // 用户取消转发
  236. } else if (res.errMsg == 'shareAppMessage:fail') {
  237. // 转发失败,其中 detail message 为详细失败信息
  238. }
  239. }
  240. };
  241. return shareObj;
  242. },
  243. methods: {
  244. //选择数量
  245. numberChange(e) {
  246. console.log(e)
  247. this.goodsNumber = e.number
  248. },
  249. close() {
  250. this.specClass = 'none'
  251. },
  252. //选择规格
  253. selectSpec(item, arr, ind) {
  254. arr.attr_value.forEach(function(e) {
  255. e.check = false;
  256. });
  257. item.check = true;
  258. let obj = this;
  259. obj.specSelected[ind] = item.attr;
  260. let str = obj.specSelected.join(',');
  261. // 获取当前选中的对象
  262. if (obj.productValue[str]) {
  263. obj.buys_show = true;
  264. obj.buys_shows = false;
  265. obj.actionPrice = obj.productValue[str].price;
  266. obj.goodsNumberMax = obj.productValue[str].stock;
  267. obj.actionImage = obj.productValue[str].image;
  268. obj.uniqueId = obj.productValue[str].unique;
  269. obj.goodsStore = obj.productValue[str].stock;
  270. } else {
  271. (obj.buys_show = false), (obj.buys_shows = true);
  272. }
  273. if (obj.goodsStore == 0) {
  274. obj.buys_show = false;
  275. obj.buys_shows = true;
  276. }
  277. obj.specSelected[ind] = item.attr;
  278. },
  279. // 打開彈窗
  280. specOPne(type = 1) {
  281. let obj = this;
  282. obj.specClass = 'show';
  283. obj.type = type;
  284. },
  285. //规格弹窗开关
  286. toggleSpec(str) {
  287. if (this.specClass === 'show') {
  288. this.specClass = 'hide';
  289. setTimeout(() => {
  290. this.specClass = 'none';
  291. }, 250);
  292. } else if (this.specClass === 'none') {
  293. this.specClass = 'show';
  294. }
  295. // 保存当前购买类型
  296. this.type = str;
  297. },
  298. //领取优惠券
  299. Getcoupon() {
  300. uni.navigateTo({
  301. url: '/pages/coupon/getcoupon'
  302. });
  303. },
  304. //详情页
  305. navToDetailPage(item) {
  306. let id = item.id;
  307. uni.navigateTo({
  308. url: '/pages/product/product?id=' + id
  309. });
  310. },
  311. // 跳转页面
  312. navTo(url) {
  313. uni.navigateTo({
  314. url: '/pages/product/reply?id=' + this.goodsid
  315. });
  316. },
  317. //加入购物车
  318. Addcar(item) {
  319. let obj = this;
  320. cartAdd({
  321. cartNum: '1', //商品数量
  322. uniqueId: '', //商品标签
  323. new: 0, //商品是否新增加到购物车1为不加入0为加入
  324. mer_id: '',
  325. productId: item.id //商品编号
  326. })
  327. .then(function(e) {
  328. uni.showToast({
  329. title: '成功加入购物车',
  330. type: 'top',
  331. duration: 500,
  332. icon: 'none'
  333. });
  334. obj.goodsDetail();
  335. })
  336. .catch(e => {
  337. console.log(e);
  338. });
  339. },
  340. goodsDetail() {
  341. let obj = this;
  342. // 获取普通商品信息
  343. if (obj.goodsType == 0) {
  344. goodsDetail({}, this.goodsid).then(function({ data }) {
  345. obj.list = data;
  346. console.log(obj.list,'普通商品数据')
  347. obj.good_list = data.good_list; //保存猜你喜欢列表
  348. obj.reply = data.reply; //保存评论列表
  349. let goods = data.storeInfo;
  350. obj.goodsObjact = goods;
  351. if (obj.goodsObjact.description != null) {
  352. obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
  353. } //小程序商品详情图超出屏幕问题
  354. obj.imgList = goods.slider_image; //保存轮播图
  355. obj.specList = data.productAttr; //保存分类列表
  356. if (Array.isArray(data.productValue) != true) {
  357. obj.many = 2;
  358. obj.specList = data.productAttr; //保存产品属性
  359. obj.productValue = data.productValue; //保存属性值
  360. obj.specSelected = []; //初始化默认选择对象
  361. for (let i = 0; i < obj.specList.length; i++) {
  362. // 设置默认数据
  363. let attrValue = obj.specList[i].attr_value[0];
  364. attrValue.check = true;
  365. obj.specSelected.push(attrValue.attr);
  366. }
  367. let str = obj.specSelected.join(',');
  368. console.log(str, 'str');
  369. // 设置默认值
  370. obj.actionPrice = obj.productValue[str].price;
  371. obj.goodsNumberMax = obj.productValue[str].stock;
  372. obj.actionImage = obj.productValue[str].image;
  373. obj.uniqueId = obj.productValue[str].unique;
  374. obj.goodsStore = obj.productValue[str].stock;
  375. } else {
  376. obj.many = 1;
  377. }
  378. obj.productValue = data.productValue; //保存分类查询数据
  379. obj.actionPrice = goods.price; //保存默认选中商品价格
  380. obj.actionImage = goods.image_base; //保存默认选中商品图片
  381. obj.goodsNumberMax = goods.stock; //保存默认选中最大可购买商品数量
  382. obj.shopId = data.mer_id; //保存商店id
  383. });
  384. }
  385. // 获取秒杀商品信息
  386. if (obj.goodsType == 1) {
  387. seckillGoods({}, this.goodsid).then(function({ data }) {
  388. obj.list = data;
  389. console.log(obj.list, '秒杀商品数据++++++++++');
  390. obj.reply = data.reply; //保存评论列表
  391. let goods = data.storeInfo;
  392. obj.goodsNumberMax = goods.num;
  393. console.log(obj.seckillObj, '数据');
  394. obj.goodsObjact = goods;
  395. if (obj.goodsObjact.description != null) {
  396. obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
  397. } //小程序商品详情图超出屏幕问题
  398. obj.imgList = goods.images; //保存轮播图
  399. obj.specList = data.productAttr; //保存分类列表
  400. if (Array.isArray(data.productValue) != true) {
  401. console.log('多规格+++++++++++++');
  402. obj.many = 2;
  403. obj.specList = data.productAttr; //保存产品属性
  404. obj.productValue = data.productValue; //保存属性值
  405. obj.specSelected = []; //初始化默认选择对象
  406. for (let i = 0; i < obj.specList.length; i++) {
  407. // 设置默认数据
  408. let attrValue = obj.specList[i].attr_value[0];
  409. attrValue.check = true;
  410. obj.specSelected.push(attrValue.attr);
  411. }
  412. let str = obj.specSelected.join(',');
  413. console.log(str, 'str');
  414. // 设置默认值
  415. obj.actionPrice = obj.productValue[str].price;
  416. // obj.goodsNumberMax = obj.productValue[str].quota;
  417. // console.log(obj.goodsNumberMax,'obj.goodsNumberMax++++++++++++')
  418. obj.actionImage = obj.productValue[str].image;
  419. obj.uniqueId = obj.productValue[str].unique;
  420. obj.goodsStore = obj.productValue[str].stock;
  421. } else {
  422. console.log('单规格+++++++++++++');
  423. obj.many = 1;
  424. obj.productValue = data.productValue; //保存分类查询数据
  425. obj.actionPrice = goods.price; //保存默认选中商品价格
  426. obj.actionImage = goods.image_base; //保存默认选中商品图片
  427. // obj.goodsNumberMax = goods.quota; //保存默认选中最大可购买商品数量
  428. console.log(obj.goodsNumberMax, 'obj.goodsNumberMax---------------');
  429. obj.shopId = data.mer_id; //保存商店id
  430. }
  431. });
  432. }
  433. },
  434. // 立即购买
  435. buy() {
  436. let obj = this;
  437. // 创建传值对象
  438. let data = {
  439. cartNum: obj.goodsNumber, //商品数量
  440. new: 1,
  441. productId: obj.goodsid, //商品编号
  442. uniqueId: obj.uniqueId,
  443. is_drop: 1
  444. };
  445. if (obj.type == 2) {
  446. data.new = 0;
  447. }
  448. cartAdd(data)
  449. .then(function(e) {
  450. let da = e.data;
  451. if (obj.type == 1) {
  452. // 跳转到支付页
  453. uni.navigateTo({
  454. url: '/pages/order/createOrder?id=' + da.cartId
  455. });
  456. }
  457. if (obj.type == 2) {
  458. uni.showToast({
  459. title: '成功加入购物车',
  460. type: 'top',
  461. duration: 2000,
  462. icon: 'none'
  463. });
  464. obj.goodsDetail();
  465. }
  466. obj.toggleSpec();
  467. })
  468. .catch(e => {
  469. console.log(e);
  470. });
  471. },
  472. // 阻止触发上级事件
  473. stopPrevent() {}
  474. }
  475. };
  476. </script>
  477. <style lang="scss">
  478. /* 弹出层 */
  479. .popup {
  480. position: fixed;
  481. left: 0;
  482. top: 0;
  483. right: 0;
  484. bottom: 0;
  485. z-index: 99;
  486. &.show {
  487. display: block;
  488. .mask {
  489. animation: showPopup 0.2s linear both;
  490. }
  491. .layer {
  492. animation: showLayer 0.2s linear both;
  493. }
  494. }
  495. &.hide {
  496. .mask {
  497. animation: hidePopup 0.2s linear both;
  498. }
  499. .layer {
  500. animation: hideLayer 0.2s linear both;
  501. }
  502. }
  503. &.none {
  504. display: none;
  505. }
  506. .mask {
  507. position: fixed;
  508. top: 0;
  509. width: 100%;
  510. height: 100%;
  511. z-index: 1;
  512. background-color: rgba(0, 0, 0, 0.4);
  513. }
  514. .layer {
  515. position: fixed;
  516. z-index: 99;
  517. bottom: 0;
  518. width: 100%;
  519. min-height: 20vh;
  520. border-radius: 10rpx 10rpx 0 0;
  521. background-color: #fff;
  522. .btn {
  523. height: 66rpx;
  524. line-height: 66rpx;
  525. border-radius: 100rpx;
  526. background: $uni-color-primary;
  527. font-size: $font-base + 2rpx;
  528. color: #fff;
  529. margin: 30rpx auto 20rpx;
  530. }
  531. }
  532. @keyframes showPopup {
  533. 0% {
  534. opacity: 0;
  535. }
  536. 100% {
  537. opacity: 1;
  538. }
  539. }
  540. @keyframes hidePopup {
  541. 0% {
  542. opacity: 1;
  543. }
  544. 100% {
  545. opacity: 0;
  546. }
  547. }
  548. @keyframes showLayer {
  549. 0% {
  550. transform: translateY(120%);
  551. }
  552. 100% {
  553. transform: translateY(0%);
  554. }
  555. }
  556. @keyframes hideLayer {
  557. 0% {
  558. transform: translateY(0);
  559. }
  560. 100% {
  561. transform: translateY(120%);
  562. }
  563. }
  564. }
  565. /* 规格选择弹窗 */
  566. .attr-content {
  567. padding: 25rpx 30rpx;
  568. .a-t {
  569. display: flex;
  570. image {
  571. width: 170rpx;
  572. height: 170rpx;
  573. flex-shrink: 0;
  574. border-radius: 8rpx;
  575. }
  576. .right {
  577. display: flex;
  578. flex-direction: column;
  579. padding-left: 24rpx;
  580. font-size: $font-sm + 2rpx;
  581. color: $font-color-base;
  582. line-height: 42rpx;
  583. width: 75%;
  584. position: relative;
  585. .right-img {
  586. width: 37rpx;
  587. height: 37rpx;
  588. position: absolute;
  589. right: 0;
  590. top: 20rpx;
  591. // background-color: red;
  592. }
  593. .price {
  594. position: absolute;
  595. bottom: 0;
  596. font-size: $font-lg;
  597. color: $uni-color-primary;
  598. margin: 10rpx 0rpx;
  599. font-size: 60rpx;
  600. font-family: PingFang SC;
  601. font-weight: bold;
  602. color: #EF041F;
  603. text {
  604. font-size: 30rpx;
  605. }
  606. }
  607. .name {
  608. width: 350rpx;
  609. font-size: 32rpx;
  610. color: $font-color-dark;
  611. height: 50rpx;
  612. overflow: hidden;
  613. text-overflow: ellipsis;
  614. white-space: nowrap;
  615. display: block;
  616. font-size: 30rpx;
  617. font-family: PingFang SC;
  618. font-weight: bold;
  619. color: #1D2023;
  620. }
  621. .selected-text {
  622. margin-right: 10rpx;
  623. }
  624. }
  625. }
  626. .attr-list {
  627. display: flex;
  628. flex-direction: column;
  629. font-size: $font-base + 2rpx;
  630. color: $font-color-base;
  631. padding-top: 30rpx;
  632. padding-left: 10rpx;
  633. }
  634. .item-list {
  635. padding: 20rpx 0 0;
  636. display: flex;
  637. flex-wrap: wrap;
  638. text {
  639. display: flex;
  640. align-items: center;
  641. justify-content: center;
  642. background: #eee;
  643. margin-right: 20rpx;
  644. margin-bottom: 20rpx;
  645. border-radius: 10rpx;
  646. min-width: 60rpx;
  647. height: 60rpx;
  648. padding: 0 20rpx;
  649. font-size: $font-base;
  650. color: $font-color-dark;
  651. }
  652. .selected {
  653. background: #fceff1;
  654. color: #f35768;
  655. border: 1px solid #f35768;
  656. }
  657. }
  658. }
  659. //默认商品底部高度
  660. .goodsBottom {
  661. height: 160rpx;
  662. }
  663. page {
  664. background: #f0f0f0;
  665. }
  666. //秒杀、拼团底部高度
  667. .contentBottomHeight {
  668. height: 130rpx;
  669. }
  670. //默认商品底部高度
  671. .goodsBottom {
  672. height: 160rpx;
  673. }
  674. /deep/ .iconenter {
  675. font-size: $font-base + 2rpx;
  676. color: #888;
  677. }
  678. /deep/ .con_image {
  679. width: 130rpx;
  680. height: 130rpx;
  681. display: inline-block;
  682. padding: 15rpx;
  683. image {
  684. width: 100%;
  685. height: 100%;
  686. }
  687. }
  688. /* 商品详情中限制图片大小 */
  689. /deep/ .rich-img {
  690. width: 100% !important;
  691. height: auto;
  692. }
  693. .mun-box {
  694. display: flex;
  695. justify-content: space-between;
  696. align-items: center;
  697. }
  698. .sckill-top {
  699. width: 750rpx;
  700. height: 165rpx;
  701. background-image: url(../../static/img/base-sckill.png);
  702. background-size: 100% 100%;
  703. position: relative;
  704. top: -40rpx;
  705. margin-bottom: -40rpx;
  706. display: flex;
  707. justify-content: space-between;
  708. .top-left {
  709. line-height: 1;
  710. .left-top {
  711. padding: 35rpx 0 23rpx 22rpx;
  712. font-size: 44rpx;
  713. font-weight: 500;
  714. color: #ffffff;
  715. line-height: 1;
  716. }
  717. .left-btm {
  718. line-height: 1;
  719. font-size: 30rpx;
  720. font-weight: 500;
  721. padding-left: 25rpx;
  722. // text-decoration: line-through;
  723. color: #ffffff;
  724. .now-pri {
  725. display: inline-block;
  726. padding-right: 8rpx;
  727. font-size: 44rpx;
  728. font-weight: 800;
  729. color: #ffffff;
  730. }
  731. .old-pri {
  732. text-decoration: line-through;
  733. }
  734. }
  735. }
  736. .top-right {
  737. padding: 67rpx 40rpx 18rpx 0;
  738. .right-top {
  739. text-align: center;
  740. font-size: 22rpx;
  741. font-weight: 400;
  742. color: #ffffff;
  743. line-height: 1;
  744. padding-bottom: 8rpx;
  745. }
  746. }
  747. }
  748. </style>