product.vue 18 KB

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