product.vue 19 KB

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