miaosha.vue 20 KB

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