productGroup.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008
  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="../../../static/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. font-size: $font-base + 2rpx;
  612. color: #fff;
  613. margin: 30rpx auto 20rpx;
  614. }
  615. }
  616. @keyframes showPopup {
  617. 0% {
  618. opacity: 0;
  619. }
  620. 100% {
  621. opacity: 1;
  622. }
  623. }
  624. @keyframes hidePopup {
  625. 0% {
  626. opacity: 1;
  627. }
  628. 100% {
  629. opacity: 0;
  630. }
  631. }
  632. @keyframes showLayer {
  633. 0% {
  634. transform: translateY(120%);
  635. }
  636. 100% {
  637. transform: translateY(0%);
  638. }
  639. }
  640. @keyframes hideLayer {
  641. 0% {
  642. transform: translateY(0);
  643. }
  644. 100% {
  645. transform: translateY(120%);
  646. }
  647. }
  648. }
  649. /* 规格选择弹窗 */
  650. .attr-content {
  651. padding: 25rpx 30rpx;
  652. .a-t {
  653. display: flex;
  654. image {
  655. width: 170rpx;
  656. height: 170rpx;
  657. flex-shrink: 0;
  658. border-radius: 8rpx;
  659. }
  660. .right {
  661. display: flex;
  662. flex-direction: column;
  663. padding-left: 24rpx;
  664. font-size: $font-sm + 2rpx;
  665. color: $font-color-base;
  666. line-height: 42rpx;
  667. width: 75%;
  668. .price {
  669. font-size: $font-lg;
  670. color: $uni-color-primary;
  671. margin: 10rpx 0rpx;
  672. }
  673. .name {
  674. font-size: 32rpx;
  675. color: $font-color-dark;
  676. height: 50rpx;
  677. overflow: hidden;
  678. text-overflow: ellipsis;
  679. white-space: nowrap;
  680. display: block;
  681. }
  682. .selected-text {
  683. margin-right: 10rpx;
  684. }
  685. }
  686. }
  687. .attr-list {
  688. display: flex;
  689. flex-direction: column;
  690. font-size: $font-base + 2rpx;
  691. color: $font-color-base;
  692. padding-top: 30rpx;
  693. padding-left: 10rpx;
  694. }
  695. .item-list {
  696. padding: 20rpx 0 0;
  697. display: flex;
  698. flex-wrap: wrap;
  699. text {
  700. display: flex;
  701. align-items: center;
  702. justify-content: center;
  703. background: #eee;
  704. margin-right: 20rpx;
  705. margin-bottom: 20rpx;
  706. border-radius: 100rpx;
  707. min-width: 60rpx;
  708. height: 60rpx;
  709. padding: 0 20rpx;
  710. font-size: $font-base;
  711. color: $font-color-dark;
  712. }
  713. .selected {
  714. background: #ddffdf;
  715. color: $uni-color-primary;
  716. }
  717. }
  718. }
  719. //默认商品底部高度
  720. .goodsBottom {
  721. height: 160rpx;
  722. }
  723. page {
  724. background: #f0f0f0;
  725. }
  726. //秒杀、拼团底部高度
  727. .contentBottomHeight {
  728. height: 110rpx;
  729. // background-color: #FFFFFF;
  730. }
  731. //默认商品底部高度
  732. .goodsBottom {
  733. height: 160rpx;
  734. }
  735. /deep/ .iconenter {
  736. font-size: $font-base + 2rpx;
  737. color: #888;
  738. }
  739. /deep/ .con_image {
  740. width: 130rpx;
  741. height: 130rpx;
  742. display: inline-block;
  743. padding: 15rpx;
  744. image {
  745. width: 100%;
  746. height: 100%;
  747. }
  748. }
  749. /* 商品详情中限制图片大小 */
  750. /deep/ .rich-img {
  751. width: 100% !important;
  752. height: auto;
  753. }
  754. .pinklistbox {
  755. background: #ffffff;
  756. margin-top: 25rpx;
  757. overflow: hidden;
  758. }
  759. .pink_num {
  760. background: -webkit-linear-gradient(left, #fdf5f6, #fbebf6);
  761. padding: 15rpx 25rpx;
  762. font-size: 26rpx;
  763. color: #dd524d;
  764. }
  765. .pint {
  766. background: -webkit-linear-gradient(left, #ff1f4f, #ff0409);
  767. padding: 10rpx 25rpx;
  768. color: #ffffff;
  769. font-size: 24rpx;
  770. border-radius: 25rpx;
  771. .iconenter {
  772. font-size: 15px;
  773. color: #ffffff;
  774. }
  775. }
  776. .pinklist {
  777. padding: 0rpx 25rpx;
  778. padding-top: 45rpx !important;
  779. }
  780. .pinklist_list {
  781. margin-bottom: 10rpx;
  782. }
  783. .pink_img {
  784. width: 100rpx;
  785. height: 100rpx;
  786. image {
  787. width: 100%;
  788. height: 100%;
  789. border-radius: 100%;
  790. }
  791. }
  792. .pink_people {
  793. font-size: 28rpx;
  794. text {
  795. color: #dd524d;
  796. }
  797. }
  798. .pink_time {
  799. font-size: 26rpx;
  800. color: #909399;
  801. }
  802. .pink_name {
  803. width: 200rpx;
  804. overflow: hidden;
  805. white-space: nowrap;
  806. text-overflow: ellipsis;
  807. padding-left: 10rpx;
  808. // background: #FC2A3F;
  809. // height: 50rpx;
  810. }
  811. .More {
  812. width: 100%;
  813. line-height: 2;
  814. background-color: #fc2a3f;
  815. font-size: $font-lg;
  816. margin: 0 auto;
  817. text-align: center;
  818. color: #ffffff;
  819. // border-radius: 50rpx;
  820. }
  821. .ping-plan {
  822. background-color: #FFFFFF;
  823. padding: 25rpx 35rpx;
  824. border-top: 15rpx solid #F3F3F4;
  825. border-bottom: 15rpx solid #F3F3F4;
  826. }
  827. .participate-7 {
  828. color: #000000;
  829. font-size: 29rpx;
  830. font-weight: 500;
  831. padding-bottom: 25rpx;
  832. .participate-7-1 {
  833. .word {
  834. color: #ff0a1a;
  835. }
  836. .word1 {
  837. font-size: 25rpx;
  838. color: #989aa0;
  839. }
  840. image {
  841. width: 10rpx;
  842. height: 20rpx;
  843. margin-left: 15rpx;
  844. }
  845. }
  846. }
  847. //左右顶格加上下居中
  848. .flex-between-center {
  849. display: flex;
  850. justify-content: space-between;
  851. align-items: center;
  852. }
  853. .participate-8 {
  854. image {
  855. width: 26rpx;
  856. height: 12rpx;
  857. }
  858. .participate-8-1 {
  859. text-align: center;
  860. .img1 {
  861. width: 43rpx;
  862. height: 50rpx;
  863. }
  864. .img2 {
  865. width: 43rpx;
  866. height: 42rpx;
  867. }
  868. .img3 {
  869. width: 60rpx;
  870. height: 46rpx;
  871. }
  872. .word-1 {
  873. font-size: 23rpx;
  874. color: #000000;
  875. line-height: 34rpx;
  876. }
  877. .word-2 {
  878. font-size: 21rpx;
  879. color: #91949B;
  880. line-height: 34rpx;
  881. }
  882. }
  883. }
  884. .p-list {
  885. width: 100%;
  886. height: 300rpx;
  887. background-color: #fff;
  888. margin: 20rpx 0;
  889. .p-list-tit {
  890. padding-left: 20rpx;
  891. line-height: 80rpx;
  892. font-size: 28rpx;
  893. }
  894. .p-list-wrap {
  895. height: 220rpx;
  896. .p-list-item {
  897. height: 110rpx;
  898. width: 100%;
  899. // background-color: #009688;
  900. padding: 0 30rpx;
  901. .p-item-img {
  902. flex-grow: 0;
  903. width: 70rpx;
  904. height: 70rpx;
  905. border-radius: 50%;
  906. // background-color: red;
  907. image {
  908. width: 70rpx;
  909. height: 70rpx;
  910. border-radius: 50%;
  911. }
  912. }
  913. .p-item-name {
  914. flex-grow: 1;
  915. padding-left: 50rpx;
  916. line-height: 110rpx;
  917. font-size: 26rpx;
  918. }
  919. .p-item-btn {
  920. width: 130rpx;
  921. height: 60rpx;
  922. background-color: #df2e24;
  923. color: #fff;
  924. border-radius: 10rpx;
  925. line-height: 60rpx;
  926. text-align: center;
  927. font-size: 24rpx;
  928. }
  929. }
  930. }
  931. }
  932. </style>