product.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  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.white_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({}).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. console.log(obj.isVip, 'vip');
  196. saveUrl();
  197. this.goodsDetail();
  198. // 注册邀请信息
  199. // #ifdef H5
  200. let bool = uni.getStorageSync('weichatBrowser') || '';
  201. if (bool) {
  202. weixindata();
  203. }
  204. // #endif
  205. },
  206. computed: {
  207. ...mapState(['weichatObj', 'baseURL', 'urlFile'])
  208. },
  209. // 分享
  210. // onShareAppMessage(options) {
  211. // // 设置菜单中的转发按钮触发转发事件时的转发内容
  212. // let pages = getCurrentPages(); //获取加载的页面
  213. // let currentPage = pages[pages.length - 1]; //获取当前页面的对象
  214. // let url = currentPage.route; //当前页面url
  215. // let item = currentPage.options; //如果要获取url中所带的参数可以查看options
  216. // let shareObj = {
  217. // title: this.goodsObjact.store_name,
  218. // desc: obj.goodsObjact.store_info,
  219. // path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
  220. // imageUrl: this.goodsObjact.image,
  221. // success: function(res) {
  222. // // 转发成功之后的回调
  223. // if (res.errMsg == 'shareAppMessage:ok') {
  224. // }
  225. // },
  226. // fail: function() {
  227. // // 转发失败之后的回调
  228. // if (res.errMsg == 'shareAppMessage:fail cancel') {
  229. // // 用户取消转发
  230. // } else if (res.errMsg == 'shareAppMessage:fail') {
  231. // // 转发失败,其中 detail message 为详细失败信息
  232. // }
  233. // }
  234. // };
  235. // return shareObj;
  236. // },
  237. methods: {
  238. //选择规格
  239. selectSpec(item, arr, ind) {
  240. arr.attr_value.forEach(function(e) {
  241. e.check = false;
  242. });
  243. item.check = true;
  244. let obj = this;
  245. obj.specSelected[ind] = item.attr;
  246. let str = obj.specSelected.join(',');
  247. // 获取当前选中的对象
  248. if (obj.productValue[str]) {
  249. obj.buys_show = true;
  250. obj.buys_shows = false;
  251. obj.actionPrice = obj.productValue[str].price;
  252. obj.goodsNumberMax = obj.productValue[str].stock;
  253. obj.actionImage = obj.productValue[str].image;
  254. obj.uniqueId = obj.productValue[str].unique;
  255. obj.goodsStore = obj.productValue[str].stock;
  256. } else {
  257. (obj.buys_show = false), (obj.buys_shows = true);
  258. }
  259. if (obj.goodsStore == 0) {
  260. obj.buys_show = false;
  261. obj.buys_shows = true;
  262. }
  263. obj.specSelected[ind] = item.attr;
  264. },
  265. // 打開彈窗
  266. specOPne(type = 1) {
  267. let obj = this;
  268. obj.specClass = 'show';
  269. obj.type = type;
  270. },
  271. //规格弹窗开关
  272. toggleSpec(str) {
  273. if (this.specClass === 'show') {
  274. this.specClass = 'hide';
  275. setTimeout(() => {
  276. this.specClass = 'none';
  277. }, 250);
  278. } else if (this.specClass === 'none') {
  279. this.specClass = 'show';
  280. }
  281. // 保存当前购买类型
  282. this.type = str;
  283. },
  284. //领取优惠券
  285. Getcoupon() {
  286. uni.navigateTo({
  287. url: '/pages/coupon/getcoupon'
  288. });
  289. },
  290. // 购买数量变化
  291. numberChange(e) {
  292. this.goodsNumber = e.number;
  293. },
  294. // #ifdef H5
  295. // 加载微信html5页面分享方法
  296. shareDate() {
  297. let obj = this;
  298. // 保存分享人id链接
  299. let url = window.location.href + '&spread=' + this.userInfo.uid;
  300. // 判断是否微信浏览器
  301. let bool = uni.getStorageSync('weichatBrowser') || '';
  302. if (bool) {
  303. // 过滤微信强制添加的链接地址
  304. url = url.replace(/[\?,&]from=singlemessage/g, '');
  305. let data = {
  306. link: url, // 分享链接
  307. imgUrl: obj.goodsObjact.image, // 分享图标
  308. desc: obj.goodsObjact.store_info,
  309. title: obj.goodsObjact.store_name,
  310. success: function(e) {
  311. console.log(e);
  312. }
  313. };
  314. console.log(data, '分享');
  315. shareLoad(data);
  316. }
  317. },
  318. // #endif
  319. //详情页
  320. navToDetailPage(item) {
  321. let id = item.id;
  322. uni.navigateTo({
  323. url: '/pages/product/product?id=' + id
  324. });
  325. },
  326. // 跳转页面
  327. navTo(url) {
  328. uni.navigateTo({
  329. url: '/pages/product/reply?id=' + this.goodsid
  330. });
  331. },
  332. //加入购物车
  333. Addcar(item) {
  334. let obj = this;
  335. cartAdd({
  336. cartNum: '1', //商品数量
  337. uniqueId: '', //商品标签
  338. new: 0, //商品是否新增加到购物车1为不加入0为加入
  339. mer_id: '',
  340. productId: item.id //商品编号
  341. })
  342. .then(function(e) {
  343. uni.showToast({
  344. title: '成功加入购物车',
  345. type: 'top',
  346. duration: 500,
  347. icon: 'none'
  348. });
  349. obj.goodsDetail();
  350. })
  351. .catch(e => {
  352. console.log(e);
  353. });
  354. },
  355. goodsDetail() {
  356. let obj = this;
  357. // 获取普通商品信息
  358. goodsDetail({}, this.goodsid).then(function({ data }) {
  359. obj.list = data;
  360. obj.good_list = data.good_list; //保存猜你喜欢列表
  361. obj.reply = data.reply; //保存评论列表
  362. let goods = data.storeInfo;
  363. obj.goodsObjact = goods;
  364. console.log(obj.goodsObjact, 'obj.goodsObjact');
  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. // 创建传值对象
  430. let data = {
  431. cartNum: obj.goodsNumber, //商品数量
  432. new: 1,
  433. productId: obj.goodsid, //商品编号
  434. uniqueId: obj.uniqueId
  435. };
  436. if (obj.type == 2) {
  437. data.new = 0;
  438. }
  439. cartAdd(data)
  440. .then(function(e) {
  441. let da = e.data;
  442. if (obj.type == 1) {
  443. // 跳转到支付页
  444. uni.navigateTo({
  445. url: '/pages/order/createOrder?id=' + da.cartId
  446. });
  447. }
  448. if (obj.type == 2) {
  449. uni.showToast({
  450. title: '成功加入购物车',
  451. type: 'top',
  452. duration: 2000,
  453. icon: 'none'
  454. });
  455. obj.goodsDetail();
  456. }
  457. obj.toggleSpec();
  458. })
  459. .catch(e => {
  460. console.log(e);
  461. });
  462. },
  463. buy1() {
  464. let obj = this;
  465. let data = {
  466. cartNum: obj.goodsNumber, //商品数量
  467. new: 1,
  468. productId: obj.goodsid, //商品编号
  469. uniqueId: obj.uniqueId
  470. };
  471. if (obj.type == 2) {
  472. data.new = 0;
  473. }
  474. cartAdd(data)
  475. .then(function(e) {
  476. let da = e.data;
  477. if (obj.type == 1) {
  478. // 跳转到支付页
  479. uni.navigateTo({
  480. url: '/pages/order/createOrder?id=' + da.cartId
  481. });
  482. }
  483. if (obj.type == 2) {
  484. uni.showToast({
  485. title: '成功加入购物车',
  486. type: 'top',
  487. duration: 2000,
  488. icon: 'none'
  489. });
  490. obj.goodsDetail();
  491. }
  492. obj.toggleSpec();
  493. })
  494. .catch(e => {
  495. console.log(e);
  496. });
  497. },
  498. // 阻止触发上级事件
  499. stopPrevent() {}
  500. }
  501. };
  502. </script>
  503. <style lang="scss">
  504. /* 弹出层 */
  505. .popup {
  506. position: fixed;
  507. left: 0;
  508. top: 0;
  509. right: 0;
  510. bottom: 0;
  511. z-index: 99;
  512. &.show {
  513. display: block;
  514. .mask {
  515. animation: showPopup 0.2s linear both;
  516. }
  517. .layer {
  518. animation: showLayer 0.2s linear both;
  519. }
  520. }
  521. &.hide {
  522. .mask {
  523. animation: hidePopup 0.2s linear both;
  524. }
  525. .layer {
  526. animation: hideLayer 0.2s linear both;
  527. }
  528. }
  529. &.none {
  530. display: none;
  531. }
  532. .mask {
  533. position: fixed;
  534. top: 0;
  535. width: 100%;
  536. height: 100%;
  537. z-index: 1;
  538. background-color: rgba(0, 0, 0, 0.4);
  539. }
  540. .layer {
  541. position: fixed;
  542. z-index: 99;
  543. bottom: 0;
  544. width: 100%;
  545. min-height: 30vh;
  546. border-radius: 10rpx 10rpx 0 0;
  547. background-color: #fff;
  548. .btn {
  549. height: 66rpx;
  550. line-height: 66rpx;
  551. border-radius: 100rpx;
  552. // background: $uni-color-primary;
  553. background: #ff4c4c;
  554. font-size: $font-base + 2rpx;
  555. color: #fff;
  556. margin: 30rpx auto 20rpx;
  557. }
  558. }
  559. @keyframes showPopup {
  560. 0% {
  561. opacity: 0;
  562. }
  563. 100% {
  564. opacity: 1;
  565. }
  566. }
  567. @keyframes hidePopup {
  568. 0% {
  569. opacity: 1;
  570. }
  571. 100% {
  572. opacity: 0;
  573. }
  574. }
  575. @keyframes showLayer {
  576. 0% {
  577. transform: translateY(120%);
  578. }
  579. 100% {
  580. transform: translateY(0%);
  581. }
  582. }
  583. @keyframes hideLayer {
  584. 0% {
  585. transform: translateY(0);
  586. }
  587. 100% {
  588. transform: translateY(120%);
  589. }
  590. }
  591. }
  592. /* 规格选择弹窗 */
  593. .attr-content {
  594. padding: 10rpx 30rpx;
  595. .a-t {
  596. display: flex;
  597. image {
  598. width: 170rpx;
  599. height: 170rpx;
  600. flex-shrink: 0;
  601. border-radius: 8rpx;
  602. }
  603. .right {
  604. display: flex;
  605. flex-direction: column;
  606. padding-left: 24rpx;
  607. font-size: $font-sm + 2rpx;
  608. color: $font-color-base;
  609. line-height: 42rpx;
  610. .good-name {
  611. padding-top: 20rpx;
  612. max-width: 320rpx;
  613. font-size: 30rpx;
  614. font-family: PingFang SC;
  615. font-weight: bold;
  616. color: #1d2023;
  617. line-height: 42rpx;
  618. margin-bottom: 15rpx;
  619. }
  620. .price {
  621. font-size: 60rpx;
  622. font-family: PingFang SC;
  623. font-weight: bold;
  624. color: #ff6f0f;
  625. // font-size: $font-lg;
  626. // color: $uni-color-primary;
  627. // margin-bottom: 10rpx;
  628. }
  629. .selected-text {
  630. margin-right: 10rpx;
  631. }
  632. }
  633. }
  634. .attr-list {
  635. display: flex;
  636. flex-direction: column;
  637. font-size: $font-base + 2rpx;
  638. color: $font-color-base;
  639. padding-top: 30rpx;
  640. padding-left: 10rpx;
  641. }
  642. .item-list {
  643. padding: 20rpx 0 0;
  644. display: flex;
  645. flex-wrap: wrap;
  646. .tit {
  647. display: flex;
  648. align-items: center;
  649. justify-content: center;
  650. background: #eee;
  651. // margin-left: 10rpx;
  652. margin-right: 20rpx;
  653. margin-bottom: 20rpx;
  654. border-radius: 100rpx;
  655. min-width: 60rpx;
  656. height: 60rpx;
  657. padding: 0 20rpx;
  658. font-size: $font-base;
  659. color: $font-color-dark;
  660. }
  661. .selected {
  662. background: #fceff1;
  663. border: 1px solid #ef041f;
  664. color: #ef041f;
  665. }
  666. }
  667. }
  668. //默认商品底部高度
  669. .goodsBottom {
  670. height: 160rpx;
  671. }
  672. page {
  673. background: #f0f0f0;
  674. }
  675. //秒杀、拼团底部高度
  676. .contentBottomHeight {
  677. height: 110rpx;
  678. }
  679. //默认商品底部高度
  680. .goodsBottom {
  681. height: 160rpx;
  682. }
  683. /deep/ .iconenter {
  684. font-size: $font-base + 2rpx;
  685. color: #888;
  686. }
  687. /deep/ .con_image {
  688. width: 130rpx;
  689. height: 130rpx;
  690. display: inline-block;
  691. padding: 15rpx;
  692. image {
  693. width: 100%;
  694. height: 100%;
  695. }
  696. }
  697. /* 商品详情中限制图片大小 */
  698. /deep/ .rich-img {
  699. width: 100% !important;
  700. height: auto;
  701. }
  702. .c-list {
  703. margin-top: 20rpx;
  704. font-size: $font-sm + 2rpx;
  705. color: $font-color-base;
  706. background: #fff;
  707. .c-row {
  708. display: flex;
  709. align-items: center;
  710. padding: 20rpx 30rpx;
  711. position: relative;
  712. }
  713. .tit {
  714. width: 140rpx;
  715. }
  716. .con {
  717. flex: 1;
  718. color: $font-color-dark;
  719. .selected-text {
  720. margin-right: 10rpx;
  721. }
  722. }
  723. .bz-list {
  724. height: 40rpx;
  725. font-size: $font-sm + 2rpx;
  726. color: $font-color-dark;
  727. text {
  728. display: inline-block;
  729. margin-right: 30rpx;
  730. }
  731. }
  732. .con-list {
  733. flex: 1;
  734. display: flex;
  735. flex-direction: column;
  736. color: $font-color-dark;
  737. line-height: 40rpx;
  738. }
  739. .red {
  740. color: $uni-color-primary;
  741. }
  742. }
  743. </style>