product.vue 20 KB

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