product.vue 19 KB

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