product.vue 20 KB

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