product.vue 20 KB

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