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