productGroup.vue 25 KB

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