product.vue 19 KB

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