productGroup.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990
  1. <template>
  2. <view class="container">
  3. <!-- 轮播图 -->
  4. <top-swiper :imgList="imgList"></top-swiper>
  5. <!-- 拼团倒计时 -->
  6. <group-time :goodsObjact="goodsObjact" :key='goodsObjact.product_price' :seckillObj="seckillObj" :pinkingNum="pinkingNum"></group-time>
  7. <view class="jg"></view>
  8. <!-- 拼团标题 -->
  9. <group-content :goodsObjact="goodsObjact"></group-content>
  10. <view class="have-know">拼团须知<text>开团/参团-邀请好友-满员发货</text></view>
  11. <view class="way">开团玩法<text>开团玩法详细介绍开团玩法详细介绍开团 玩法详细介绍开团玩法详细介绍开团玩法 详细介绍开团玩法详细介绍</text></view>
  12. <!-- 拼团到货时间及优惠 -->
  13. <!-- <discounts :mark='goodsObjact.mark' :Info="goodsObjact.info" @clickCoupon="Getcoupon" :showCoupon='false'> -->
  14. </discounts>
  15. <!-- 规格信息 -->
  16. <!-- <fresh-detail :goodsObjact="goodsObjact"></fresh-detail> -->
  17. <!-- <view class="uni-padding-wrap pinklistbox" v-if="pinkTlist.length > 0">
  18. <view class="pinklist">
  19. <view v-for="(ls, ind) in showlist">
  20. <view class="flex pinklist_list">
  21. <view class="pink_img"><image :src="ls.avatar"></image></view>
  22. <view class="pink_name">{{ ls.nickname }}</view>
  23. <view class="pink_tpl">
  24. <view class="pink_people">
  25. 还差
  26. <text>{{ ls.count }}</text>
  27. 人拼团
  28. </view>
  29. </view>
  30. <view class="pint" @click="groupBooking(ls.id)">
  31. 去拼团
  32. <text class="iconfont iconenter"></text>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="More" @click="clickMore" v-if="more">查看更多</view>
  38. </view> -->
  39. <!-- <view class="ping-plan">
  40. <view class="participate-7 flex-between-center">
  41. <view class="participate-7-1">
  42. <text class="word" v-if="pink_type == 1">AA团</text>
  43. <text class="word" v-else>达人团</text>
  44. <text>玩法</text>
  45. </view>
  46. <view class="participate-7-1" @click="ToRule()">
  47. <text class="word1">详细规则</text>
  48. <image src="../../../static/img/img74.png"></image>
  49. </view>
  50. </view>
  51. <view class="participate-8 flex-between-center">
  52. <view class="participate-8-1">
  53. <image class="img1" src="https://shicai.liuniu946.com/img/img76.png"></image>
  54. <view class="word-1">开团/参团</view>
  55. <view class="word-2">拼团享低价</view>
  56. </view>
  57. <image src="https://shicai.liuniu946.com/img/img75.png"></image>
  58. <view class="participate-8-1">
  59. <image class="img2" src="https://shicai.liuniu946.com/img/img77.png"></image>
  60. <view class="word-1">邀请邻里参团</view>
  61. <view class="word-2">分享优惠多</view>
  62. </view>
  63. <image src="https://shicai.liuniu946.com/img/img75.png"></image>
  64. <view class="participate-8-1">
  65. <image class="img3" src="https://shicai.liuniu946.com/img/img78.png"></image>
  66. <view class="word-1">人满发货</view>
  67. <view class="word-2">人不满退款</view>
  68. </view>
  69. </view>
  70. </view> -->
  71. <!-- 大家都在拼 达人团显示 -->
  72. <!-- <now-list v-if="pink_type == 2" :recommendedlist="recommendedlist"></now-list> -->
  73. <!-- 图文详情 -->
  74. <content-text :description="description"></content-text>
  75. <!-- 底部高度撑开 -->
  76. <view class="contentBottomHeight"></view>
  77. <!-- 底部操作菜单 -->
  78. <view>
  79. <view>
  80. <group-bottom :peoplePrize='goodsObjact.people_prize' @buy="openPinkT" @specOPne="specOPne"
  81. :seckillObj="seckillObj" :many='many'></group-bottom>
  82. </view>
  83. </view>
  84. <!-- 规格-模态层弹窗 -->
  85. <view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec()">
  86. <!-- 遮罩层 -->
  87. <view class="mask"></view>
  88. <view class="layer attr-content" @click.stop="stopPrevent">
  89. <view class="a-t">
  90. <image :src="actionImage"></image>
  91. <view class="right">
  92. <text class="name">{{ goodsObjact.store_name }}</text>
  93. <text class="price">¥{{ actionPrice * goodsNumber }}</text>
  94. <text class="stock">库存:{{ goodsStore }}件</text>
  95. <view class="selected" v-if="specList != ''">
  96. 已选:
  97. <text class="selected-text" v-for="(sItem, sIndex) in specSelected"
  98. :key="sIndex">{{ sItem }}</text>
  99. </view>
  100. </view>
  101. </view>
  102. <view v-for="(item, index) in specList" :key="index" class="attr-list">
  103. <text>{{ item.attr_name }}</text>
  104. <view class="item-list">
  105. <text v-for="(childItem, childIndex) in item.attr_value" :key="childIndex" class="tit"
  106. :class="{ selected: childItem.check }" @click="selectSpec(childItem, item, index)">
  107. {{ childItem.attr }}
  108. </text>
  109. </view>
  110. </view>
  111. <!-- <view class="attr-list">
  112. <text>购买数量</text>
  113. <view class="item-list">
  114. <uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
  115. </view>
  116. </view> -->
  117. <button class="btn" @click.stop="buy" v-show="buys_show">完成</button>
  118. <button class="btn" style="background-color: #999999;" v-show="buys_shows">售罄</button>
  119. </view>
  120. </view>
  121. <!-- 返回按钮 -->
  122. <!-- <return-button></return-button> -->
  123. </view>
  124. </template>
  125. <script>
  126. import {
  127. nowPinkLst
  128. } from '@/api/order.js';
  129. import {
  130. goodsDetail,
  131. cartAdd,
  132. collectAdd,
  133. collectDel,
  134. seckillGoods,
  135. groupGoods
  136. } from '@/api/product.js';
  137. import {
  138. mapState
  139. } from 'vuex';
  140. import store from '@/store/index.js';
  141. import {
  142. saveUrl
  143. } from '@/utils/loginUtils.js';
  144. import {
  145. timeComputed
  146. } from '@/utils/rocessor.js';
  147. // #ifdef H5
  148. import {
  149. weixindata
  150. } from '@/utils/wxAuthorized';
  151. // #endif
  152. // 头部轮播图
  153. import topSwiper from '../common/topSwiper.vue';
  154. // 拼团倒计时
  155. import groupTime from '../common/groupTime.vue';
  156. // 拼团标题
  157. import groupContent from '../common/groupContent.vue';
  158. // 拼团到货时间及优惠
  159. import discounts from '../common/discounts.vue';
  160. // 规格信息
  161. import freshDetail from '../common/freshDetail.vue';
  162. // 图文详情
  163. import contentText from '../common/contentText.vue';
  164. // 底部按钮
  165. import groupBottom from '../common/groupBottom.vue';
  166. // 返回按钮
  167. import returnButton from '@/components/returnButton.vue';
  168. // 大家还在拼
  169. import NowList from '@/components/newlist/nowList.vue';
  170. export default {
  171. components: {
  172. topSwiper,
  173. groupTime,
  174. groupContent,
  175. discounts,
  176. freshDetail,
  177. contentText,
  178. groupBottom,
  179. returnButton,
  180. NowList
  181. },
  182. data() {
  183. return {
  184. goodsStore: 0, //选中库存
  185. specList: [],
  186. buys_show: true,
  187. buys_shows: false,
  188. specSelected: [], //选中的分类
  189. reply: '', //评论
  190. list: '', //商品详情的数据
  191. type: 1, //默认支付方式add为
  192. goodsNumber: 1, //购买数量
  193. goodsid: '', //商品id
  194. description: '', //商品描述
  195. goodsObjact: {}, //保存商品数据
  196. //图片循环
  197. imgList: [],
  198. // 对比对象
  199. actionPrice: 0, //默认选中商品价格
  200. actionImage: '', //默认选中图片
  201. good_list: '', //猜你喜欢列表
  202. goodsNumberMax: 0, //最大可购买数量
  203. many: 1, //1是单规格 2是多规格
  204. // 倒计时数据保存
  205. seckillObj: {
  206. stopTime: 0, //结束时间
  207. stop: false, //是否结束
  208. stopTimeH: 0, //小时
  209. stopTimeM: 0, //分钟
  210. stopTimeS: 0, //秒钟
  211. stopTimeD: 0, //天
  212. upTime: 0 //更新组件内部组件用
  213. },
  214. // 拼团数据保存
  215. pink: {
  216. id: '', //拼团编号
  217. uid: '', //用户编号
  218. people: '', //拼团人数
  219. price: '', //拼团价格
  220. stop_time: '', //拼团结束时间
  221. nickname: '', //团长昵称
  222. avatar: '', //团长头像
  223. count: '', //拼团剩余人数
  224. h: '', //时
  225. i: '', //分
  226. s: '' //秒
  227. },
  228. userInfo: '',
  229. pinkTlist: '', //拼团数据
  230. more: true, //查看更多按钮
  231. showlist: [],
  232. pink_type: 1, //拼团类别
  233. show: false, // 是否显示底部按钮
  234. recommendedlist: [], // 大家都在拼
  235. specClass: 'none', //显示隐藏弹窗
  236. };
  237. },
  238. filters: {
  239. parseIntTo(percent) {
  240. percent = +percent * 100;
  241. if (percent % 1 === 0) {
  242. return percent;
  243. } else {
  244. percent = percent.toFixed(1);
  245. return percent;
  246. }
  247. }
  248. },
  249. async onLoad(options) {
  250. let obj = this;
  251. obj.userInfo = uni.getStorageSync('userInfo');
  252. //保存商品id
  253. this.goodsid = options.id;
  254. if (options.show) {
  255. this.show = options.show;
  256. }
  257. console.log(this.show, 5656)
  258. // 判断有无人邀请
  259. if (options.spread) {
  260. // 存储邀请人
  261. uni.setStorageSync('spread', options.spread);
  262. }
  263. saveUrl();
  264. // 家在数据
  265. this.groupGoods();
  266. return;
  267. // 注册邀请信息
  268. // #ifdef H5
  269. let bool = uni.getStorageSync('weichatBrowser') || '';
  270. if (bool) {
  271. weixindata();
  272. }
  273. // #endif
  274. },
  275. computed: {
  276. ...mapState(['weichatObj', 'baseURL', 'urlFile']),
  277. pinkingNum() {
  278. return this.people*1 - this.count*1 || 0
  279. }
  280. },
  281. // 分享
  282. // onShareAppMessage(options) {
  283. // // 设置菜单中的转发按钮触发转发事件时的转发内容
  284. // let pages = getCurrentPages(); //获取加载的页面
  285. // let currentPage = pages[pages.length - 1]; //获取当前页面的对象
  286. // let url = currentPage.route; //当前页面url
  287. // let item = currentPage.options; //如果要获取url中所带的参数可以查看options
  288. // let shareObj = {
  289. // title: this.goodsObjact.title + ' 价格:' + this.goodsObjact.price, // 默认是小程序的名称(可以写slogan等)
  290. // path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
  291. // imageUrl: this.goodsObjact.image,
  292. // success: function(res) {
  293. // // 转发成功之后的回调
  294. // if (res.errMsg == 'shareAppMessage:ok') {}
  295. // },
  296. // fail: function() {
  297. // // 转发失败之后的回调
  298. // if (res.errMsg == 'shareAppMessage:fail cancel') {
  299. // // 用户取消转发
  300. // } else if (res.errMsg == 'shareAppMessage:fail') {
  301. // // 转发失败,其中 detail message 为详细失败信息
  302. // }
  303. // }
  304. // };
  305. // return shareObj;
  306. // },
  307. methods: {
  308. // 跳转详细规则
  309. ToRule() {
  310. if (this.pink_type == 1) {
  311. // AA团
  312. uni.navigateTo({
  313. url: '/pages/rule/AArule'
  314. })
  315. } else {
  316. // 达人团
  317. uni.navigateTo({
  318. url: '/pages/rule/DaRrule'
  319. })
  320. }
  321. },
  322. //选择规格
  323. selectSpec(item, arr, ind) {
  324. arr.attr_value.forEach(function(e) {
  325. e.check = false;
  326. });
  327. item.check = true;
  328. let obj = this;
  329. obj.specSelected[ind] = item.attr;
  330. let str = obj.specSelected.join(',');
  331. console.log(obj.productValue[str], 116)
  332. if (obj.productValue[str]) {
  333. obj.buys_show = true;
  334. obj.buys_shows = false;
  335. obj.actionPrice = obj.productValue[str].price;
  336. obj.goodsNumberMax = obj.productValue[str].stock;
  337. obj.actionImage = obj.productValue[str].image;
  338. obj.uniqueId = obj.productValue[str].unique;
  339. obj.goodsStore = obj.productValue[str].stock;
  340. // if (obj.goodsType == 2) {
  341. // obj.goodsStore = obj.productValue[str].quota;
  342. // } else {
  343. // obj.goodsStore = obj.productValue[str].product_stock;
  344. // }
  345. } else {
  346. (obj.buys_show = false), (obj.buys_shows = true);
  347. }
  348. },
  349. // 立即购买
  350. buy(item) {
  351. let obj = this;
  352. /* obj.toggleSpec();
  353. this.specClass='show',
  354. console.log(obj.list.productValue.默认.unique)
  355. console.log(obj.chooseGoodsNumber,'chooseGoodsNumber')
  356. return */
  357. // 创建传值对象
  358. console.log(obj.list.productValue);
  359. console.log(obj.list);
  360. let data = {
  361. // cartNum: obj.goodsNumber, //商品数量
  362. cartNum: obj.chooseGoodsNumber, //商品数量
  363. uniqueId: obj.uniqueId, //商品标签
  364. new: 1, //商品是否新增加到购物车1为不加入0为加入
  365. mer_id: obj.shopId,
  366. combinationId: obj.goodsid, //拼团编号
  367. productId: obj.goodsObjact.product_id, //商品编号
  368. };
  369. this.specClass = 'none';
  370. cartAdd(data)
  371. .then(function(e) {
  372. let da = e.data;
  373. console.log(e);
  374. if (obj.type == 1) {
  375. // 跳转到支付页
  376. uni.navigateTo({
  377. url: '/pages/order/createOrder?id=' + da.cartId + '&goodsType=' + obj.goodsType
  378. });
  379. }
  380. if (obj.type == 2) {
  381. obj.$api.msg('成功加入购物车');
  382. obj.toggleSpec();
  383. }
  384. })
  385. .catch(e => {
  386. console.log(e);
  387. });
  388. },
  389. // 去开团
  390. ToKaiTuan(item) {
  391. let id = item.id;
  392. uni.navigateTo({
  393. url: '/pages/product/productGroup?id=' + id
  394. });
  395. },
  396. // 跳转页面
  397. navTo(url) {
  398. uni.navigateTo({
  399. url
  400. });
  401. },
  402. // 查看更多
  403. clickMore() {
  404. this.showlist = this.pinkTlist;
  405. console.log(this.showlist, 22);
  406. this.more = false;
  407. },
  408. //去拼团
  409. groupBooking(item) {
  410. uni.navigateTo({
  411. url: '/pages/groupBooking/groupdetails?id=' + item
  412. });
  413. },
  414. // 获取拼团商品详情
  415. groupGoods() {
  416. let obj = this;
  417. // // 大家还在拼
  418. // nowPinkLst({}).then(({data}) => {
  419. // this.recommendedlist = data;
  420. // })
  421. groupGoods({}, this.goodsid).then(function({
  422. data
  423. }) {
  424. let goods = data.storeInfo;
  425. obj.goodsObjact = goods;
  426. console.log(obj.goodsObjact, 88)
  427. console.log(Array.isArray(data.productValue), 99)
  428. if (Array.isArray(data.productValue) != true) {
  429. obj.many = 2;
  430. obj.specList = data.productAttr; //保存产品属性
  431. obj.productValue = data.productValue; //保存属性值
  432. obj.specSelected = []; //初始化默认选择对象
  433. for (let i = 0; i < obj.specList.length; i++) {
  434. // 设置默认数据
  435. let attrValue = obj.specList[i].attr_value[0];
  436. attrValue.check = true;
  437. obj.specSelected.push(attrValue.attr);
  438. }
  439. let str = obj.specSelected.join(',');
  440. console.log(str, 'str')
  441. // 设置默认值
  442. obj.actionPrice = obj.productValue[str].price;
  443. obj.goodsNumberMax = obj.productValue[str].stock;
  444. obj.actionImage = obj.productValue[str].image;
  445. obj.uniqueId = obj.productValue[str].unique;
  446. obj.goodsStore = obj.productValue[str].quota;
  447. } else {
  448. obj.many = 1;
  449. }
  450. console.log(obj.many, 'obj.many')
  451. if (obj.goodsObjact.description != null) {
  452. obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
  453. }
  454. obj.imgList = goods.images; //保存轮播图
  455. obj.actionPrice = goods.price; //保存默认选中商品价格
  456. obj.actionImage = goods.image_base; //保存默认选中商品图片
  457. obj.goodsNumberMax = 1; //保存默认选中最大可购买商品数量
  458. if (obj.goodsObjact.pink_type == 'AA团') {
  459. obj.pink_type = 1;
  460. } else {
  461. obj.pink_type = 2;
  462. }
  463. obj.pinkTlist = data.pink;
  464. obj.showlist = obj.pinkTlist.slice(0, 2);
  465. if (obj.pinkTlist.length <= 2) {
  466. obj.more = false;
  467. }
  468. // 保存结束时间
  469. obj.seckillObj.stopTime = goods.stop_time * 1000;
  470. // 获取当前时间
  471. let acitonTime = new Date();
  472. // 判断当前时间是否大于结束时间
  473. if (acitonTime.getTime() > obj.seckillObj.stopTime) {
  474. // 当前秒杀时间已经结束
  475. obj.seckillObj.stop = true;
  476. } else {
  477. // 计算倒计时
  478. let time = timeComputed(obj.seckillObj.stopTime)
  479. // 倒计时数据保存
  480. obj.seckillObj = {
  481. stopTime: goods.stop_time * 1000, //结束时间
  482. stop: false, //是否结束
  483. stopTimeD: time.day, //天
  484. stopTimeH: time.hours, //小时
  485. stopTimeM: time.minutes, //分钟
  486. stopTimeS: time.seconds, //秒钟
  487. upTime: (new Date()).getTime()
  488. }
  489. }
  490. });
  491. },
  492. // 立即购买
  493. openPinkT(item) {
  494. let obj = this;
  495. obj.type = item;
  496. // 创建传值对象
  497. let data = {
  498. cartNum: obj.goodsNumber, //商品数量
  499. new: 1, //商品是否新增加到购物车1为不加入0为加入
  500. combinationId: obj.goodsid,
  501. productId: obj.goodsObjact.product_id
  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 + '&goodsType=2'
  510. });
  511. }
  512. })
  513. .catch(e => {
  514. console.log(e);
  515. });
  516. },
  517. specOPne(item) {
  518. let obj = this;
  519. obj.specClass = 'show';
  520. console.log(obj.specClass, 'this.specClass')
  521. },
  522. //规格弹窗开关
  523. toggleSpec(str) {
  524. if (this.specClass === 'show') {
  525. this.specClass = 'hide';
  526. setTimeout(() => {
  527. this.specClass = 'none';
  528. }, 250);
  529. } else if (this.specClass === 'none') {
  530. this.specClass = 'show';
  531. }
  532. // 判断是否为数字
  533. if (typeof str == 'number') {
  534. // 保存当前购买类型
  535. this.type = str;
  536. }
  537. },
  538. // 阻止触发上级事件
  539. stopPrevent() {}
  540. }
  541. };
  542. </script>
  543. <style lang="scss">
  544. /* 弹出层 */
  545. .popup {
  546. position: fixed;
  547. left: 0;
  548. top: 0;
  549. right: 0;
  550. bottom: 0;
  551. z-index: 99;
  552. &.show {
  553. display: block;
  554. .mask {
  555. animation: showPopup 0.2s linear both;
  556. }
  557. .layer {
  558. animation: showLayer 0.2s linear both;
  559. }
  560. }
  561. &.hide {
  562. .mask {
  563. animation: hidePopup 0.2s linear both;
  564. }
  565. .layer {
  566. animation: hideLayer 0.2s linear both;
  567. }
  568. }
  569. &.none {
  570. display: none;
  571. }
  572. .mask {
  573. position: fixed;
  574. top: 0;
  575. width: 100%;
  576. height: 100%;
  577. z-index: 1;
  578. background-color: rgba(0, 0, 0, 0.4);
  579. }
  580. .layer {
  581. position: fixed;
  582. z-index: 99;
  583. bottom: 0;
  584. width: 100%;
  585. min-height: 35vh;
  586. border-radius: 10rpx 10rpx 0 0;
  587. background-color: #fff;
  588. .btn {
  589. height: 66rpx;
  590. line-height: 66rpx;
  591. border-radius: 100rpx;
  592. // background: $uni-color-primary;
  593. background-color: #901b21;
  594. font-size: $font-base + 2rpx;
  595. color: #fff;
  596. margin: 30rpx auto 20rpx;
  597. }
  598. }
  599. @keyframes showPopup {
  600. 0% {
  601. opacity: 0;
  602. }
  603. 100% {
  604. opacity: 1;
  605. }
  606. }
  607. @keyframes hidePopup {
  608. 0% {
  609. opacity: 1;
  610. }
  611. 100% {
  612. opacity: 0;
  613. }
  614. }
  615. @keyframes showLayer {
  616. 0% {
  617. transform: translateY(120%);
  618. }
  619. 100% {
  620. transform: translateY(0%);
  621. }
  622. }
  623. @keyframes hideLayer {
  624. 0% {
  625. transform: translateY(0);
  626. }
  627. 100% {
  628. transform: translateY(120%);
  629. }
  630. }
  631. }
  632. /* 规格选择弹窗 */
  633. .attr-content {
  634. padding: 25rpx 30rpx;
  635. .a-t {
  636. display: flex;
  637. image {
  638. width: 170rpx;
  639. height: 170rpx;
  640. flex-shrink: 0;
  641. border-radius: 8rpx;
  642. }
  643. .right {
  644. display: flex;
  645. flex-direction: column;
  646. padding-left: 24rpx;
  647. font-size: $font-sm + 2rpx;
  648. color: $font-color-base;
  649. line-height: 42rpx;
  650. width: 75%;
  651. .price {
  652. font-size: $font-lg;
  653. color: #901b21;
  654. margin: 10rpx 0rpx;
  655. }
  656. .name {
  657. font-size: 32rpx;
  658. color: $font-color-dark;
  659. height: 50rpx;
  660. overflow: hidden;
  661. text-overflow: ellipsis;
  662. white-space: nowrap;
  663. display: block;
  664. }
  665. .selected-text {
  666. margin-right: 10rpx;
  667. }
  668. }
  669. }
  670. .attr-list {
  671. display: flex;
  672. flex-direction: column;
  673. font-size: $font-base + 2rpx;
  674. color: $font-color-base;
  675. padding-top: 30rpx;
  676. padding-left: 10rpx;
  677. }
  678. .item-list {
  679. padding: 20rpx 0 0;
  680. display: flex;
  681. flex-wrap: wrap;
  682. text {
  683. display: flex;
  684. align-items: center;
  685. justify-content: center;
  686. background: #eee;
  687. margin-right: 20rpx;
  688. margin-bottom: 20rpx;
  689. border-radius: 100rpx;
  690. min-width: 60rpx;
  691. height: 60rpx;
  692. padding: 0 20rpx;
  693. font-size: $font-base;
  694. color: $font-color-dark;
  695. }
  696. .selected {
  697. // background: #ddffdf;
  698. background-color: rgba($color: #901b21, $alpha: 0.2);
  699. color: #901b21;
  700. }
  701. }
  702. }
  703. //默认商品底部高度
  704. .goodsBottom {
  705. height: 160rpx;
  706. }
  707. page {
  708. background: #f0f0f0;
  709. }
  710. //秒杀、拼团底部高度
  711. .contentBottomHeight {
  712. height: 110rpx;
  713. // background-color: #FFFFFF;
  714. }
  715. //默认商品底部高度
  716. .goodsBottom {
  717. height: 160rpx;
  718. }
  719. /deep/ .iconenter {
  720. font-size: $font-base + 2rpx;
  721. color: #888;
  722. }
  723. /deep/ .con_image {
  724. width: 130rpx;
  725. height: 130rpx;
  726. display: inline-block;
  727. padding: 15rpx;
  728. image {
  729. width: 100%;
  730. height: 100%;
  731. }
  732. }
  733. /* 商品详情中限制图片大小 */
  734. /deep/ .rich-img {
  735. width: 100% !important;
  736. height: auto;
  737. }
  738. .pinklistbox {
  739. background: #ffffff;
  740. margin-top: 25rpx;
  741. overflow: hidden;
  742. }
  743. .pink_num {
  744. background: -webkit-linear-gradient(left, #fdf5f6, #fbebf6);
  745. padding: 15rpx 25rpx;
  746. font-size: 26rpx;
  747. color: #dd524d;
  748. }
  749. .pint {
  750. background: -webkit-linear-gradient(left, #ff1f4f, #ff0409);
  751. padding: 10rpx 25rpx;
  752. color: #ffffff;
  753. font-size: 24rpx;
  754. border-radius: 25rpx;
  755. .iconenter {
  756. font-size: 15px;
  757. color: #ffffff;
  758. }
  759. }
  760. .pinklist {
  761. padding: 0rpx 25rpx;
  762. padding-top: 45rpx !important;
  763. }
  764. .pinklist_list {
  765. margin-bottom: 10rpx;
  766. }
  767. .pink_img {
  768. width: 100rpx;
  769. height: 100rpx;
  770. image {
  771. width: 100%;
  772. height: 100%;
  773. border-radius: 100%;
  774. }
  775. }
  776. .pink_people {
  777. font-size: 28rpx;
  778. text {
  779. color: #dd524d;
  780. }
  781. }
  782. .pink_time {
  783. font-size: 26rpx;
  784. color: #909399;
  785. }
  786. .pink_name {
  787. width: 200rpx;
  788. overflow: hidden;
  789. white-space: nowrap;
  790. text-overflow: ellipsis;
  791. padding-left: 10rpx;
  792. // background: #FC2A3F;
  793. // height: 50rpx;
  794. }
  795. .More {
  796. width: 100%;
  797. line-height: 2;
  798. background-color: #fc2a3f;
  799. font-size: $font-lg;
  800. margin: 0 auto;
  801. text-align: center;
  802. color: #ffffff;
  803. // border-radius: 50rpx;
  804. }
  805. .ping-plan {
  806. background-color: #FFFFFF;
  807. padding: 25rpx 35rpx;
  808. border-top: 15rpx solid #F3F3F4;
  809. border-bottom: 15rpx solid #F3F3F4;
  810. }
  811. .participate-7 {
  812. color: #000000;
  813. font-size: 29rpx;
  814. font-weight: 500;
  815. padding-bottom: 25rpx;
  816. .participate-7-1 {
  817. .word {
  818. color: #ff0a1a;
  819. }
  820. .word1 {
  821. font-size: 25rpx;
  822. color: #989aa0;
  823. }
  824. image {
  825. width: 10rpx;
  826. height: 20rpx;
  827. margin-left: 15rpx;
  828. }
  829. }
  830. }
  831. //左右顶格加上下居中
  832. .flex-between-center {
  833. display: flex;
  834. justify-content: space-between;
  835. align-items: center;
  836. }
  837. .participate-8 {
  838. image {
  839. width: 26rpx;
  840. height: 12rpx;
  841. }
  842. .participate-8-1 {
  843. text-align: center;
  844. .img1 {
  845. width: 43rpx;
  846. height: 50rpx;
  847. }
  848. .img2 {
  849. width: 43rpx;
  850. height: 42rpx;
  851. }
  852. .img3 {
  853. width: 60rpx;
  854. height: 46rpx;
  855. }
  856. .word-1 {
  857. font-size: 23rpx;
  858. color: #000000;
  859. line-height: 34rpx;
  860. }
  861. .word-2 {
  862. font-size: 21rpx;
  863. color: #91949B;
  864. line-height: 34rpx;
  865. }
  866. }
  867. }
  868. .jg {
  869. background-color: #fff;
  870. height: 60.5rpx;
  871. position: relative;
  872. top: -60.5rpx;
  873. margin-bottom: -60.5rpx;
  874. }
  875. .have-know {
  876. height: 100rpx;
  877. width: 750rpx;
  878. line-height: 1;
  879. padding: 35rpx 0 0 30rpx;
  880. background-color: #fff;
  881. margin: 15rpx 0;
  882. font-size: 32rpx;
  883. font-weight: bold;
  884. color: #3B3B3B;
  885. text {
  886. display: inline-block;
  887. padding-left: 31rpx;
  888. font-size: 26rpx;
  889. font-weight: 500;
  890. color: #8A8A8A;
  891. }
  892. }
  893. .way {
  894. padding: 34rpx 97rpx 0 30rpx;
  895. background-color: #fff;
  896. margin: 15rpx 0;
  897. font-size: 32rpx;
  898. font-weight: bold;
  899. color: #3B3B3B;
  900. line-height: 1;
  901. text {
  902. display: inline-block;
  903. padding-left: 186rpx;
  904. font-size: 26rpx;
  905. font-weight: 500;
  906. color: #8A8A8A;
  907. // width: 100%;
  908. position: relative;
  909. top:-34rpx;
  910. line-height: 1.5;
  911. }
  912. }
  913. </style>