productGroup.vue 24 KB

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