productGroup.vue 26 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070
  1. <template>
  2. <view class="container">
  3. <!-- 轮播图 -->
  4. <top-swiper :imgList="imgList"></top-swiper>
  5. <!-- 拼团倒计时 -->
  6. <group-time :goodsObjact="groupInfo" :key='goodsObjact.product_price' :seckillObj="seckillObj" :pinkingNum="pinkingNum"></group-time>
  7. <view class="jg"></view>
  8. <!-- 拼团标题 -->
  9. <group-content :goodsObjact="groupInfo"></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. groupInfo: {}
  246. };
  247. },
  248. filters: {
  249. parseIntTo(percent) {
  250. percent = +percent * 100;
  251. if (percent % 1 === 0) {
  252. return percent;
  253. } else {
  254. percent = percent.toFixed(1);
  255. return percent;
  256. }
  257. }
  258. },
  259. async onLoad(options) {
  260. console.log(options)
  261. let obj = this;
  262. obj.userInfo = uni.getStorageSync('userInfo');
  263. //保存商品id
  264. this.goodsid = options.id;
  265. if (options.show) {
  266. this.show = options.show;
  267. }
  268. console.log(this.show, 5656)
  269. // 判断有无人邀请
  270. if (options.spread) {
  271. // 存储邀请人
  272. uni.setStorageSync('spread', options.spread);
  273. }
  274. saveUrl();
  275. // 家在数据
  276. console.log("bigan")
  277. this.groupGoods();
  278. return;
  279. // 注册邀请信息
  280. // #ifdef H5
  281. let bool = uni.getStorageSync('weichatBrowser') || '';
  282. if (bool) {
  283. weixindata();
  284. }
  285. // #endif
  286. },
  287. computed: {
  288. ...mapState(['weichatObj', 'baseURL', 'urlFile']),
  289. pinkingNum() {
  290. return this.people*1 - this.count*1 || 0
  291. },
  292. choNum() {
  293. let a = []
  294. for(let i = 1 ; i <= this.goodsNumberMax ; i++ ){
  295. a.push(i)
  296. }
  297. return a
  298. }
  299. },
  300. // 分享
  301. // onShareAppMessage(options) {
  302. // // 设置菜单中的转发按钮触发转发事件时的转发内容
  303. // let pages = getCurrentPages(); //获取加载的页面
  304. // let currentPage = pages[pages.length - 1]; //获取当前页面的对象
  305. // let url = currentPage.route; //当前页面url
  306. // let item = currentPage.options; //如果要获取url中所带的参数可以查看options
  307. // let shareObj = {
  308. // title: this.goodsObjact.title + ' 价格:' + this.goodsObjact.price, // 默认是小程序的名称(可以写slogan等)
  309. // path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
  310. // imageUrl: this.goodsObjact.image,
  311. // success: function(res) {
  312. // // 转发成功之后的回调
  313. // if (res.errMsg == 'shareAppMessage:ok') {}
  314. // },
  315. // fail: function() {
  316. // // 转发失败之后的回调
  317. // if (res.errMsg == 'shareAppMessage:fail cancel') {
  318. // // 用户取消转发
  319. // } else if (res.errMsg == 'shareAppMessage:fail') {
  320. // // 转发失败,其中 detail message 为详细失败信息
  321. // }
  322. // }
  323. // };
  324. // return shareObj;
  325. // },
  326. methods: {
  327. // 跳转详细规则
  328. ToRule() {
  329. if (this.pink_type == 1) {
  330. // AA团
  331. uni.navigateTo({
  332. url: '/pages/rule/AArule'
  333. })
  334. } else {
  335. // 达人团
  336. uni.navigateTo({
  337. url: '/pages/rule/DaRrule'
  338. })
  339. }
  340. },
  341. //选择规格
  342. selectSpec(item, arr, ind) {
  343. arr.attr_value.forEach(function(e) {
  344. e.check = false;
  345. });
  346. item.check = true;
  347. let obj = this;
  348. obj.specSelected[ind] = item.attr;
  349. let str = obj.specSelected.join(',');
  350. console.log(obj.productValue[str], 116)
  351. if (obj.productValue[str]) {
  352. obj.buys_show = true;
  353. obj.buys_shows = false;
  354. obj.actionPrice = obj.productValue[str].price;
  355. obj.goodsNumberMax = obj.productValue[str].stock;
  356. obj.actionImage = obj.productValue[str].image;
  357. obj.uniqueId = obj.productValue[str].unique;
  358. obj.goodsStore = obj.productValue[str].stock;
  359. // if (obj.goodsType == 2) {
  360. // obj.goodsStore = obj.productValue[str].quota;
  361. // } else {
  362. // obj.goodsStore = obj.productValue[str].product_stock;
  363. // }
  364. } else {
  365. (obj.buys_show = false), (obj.buys_shows = true);
  366. }
  367. },
  368. // 立即购买
  369. buy(item) {
  370. let obj = this;
  371. /* obj.toggleSpec();
  372. this.specClass='show',
  373. console.log(obj.list.productValue.默认.unique)
  374. console.log(obj.chooseGoodsNumber,'chooseGoodsNumber')
  375. return */
  376. // 创建传值对象
  377. console.log(obj.list.productValue);
  378. console.log(obj.list);
  379. console.log(obj.goodsNumber)
  380. let data = {
  381. // cartNum: obj.goodsNumber, //商品数量
  382. cartNum: obj.chooseGoodsNumber, //商品数量
  383. uniqueId: obj.uniqueId, //商品标签
  384. new: 1, //商品是否新增加到购物车1为不加入0为加入
  385. mer_id: obj.shopId,
  386. combinationId: obj.goodsid, //拼团编号
  387. productId: obj.goodsObjact.product_id, //商品编号
  388. };
  389. this.specClass = 'none';
  390. cartAdd(data)
  391. .then(function(e) {
  392. let da = e.data;
  393. console.log(e);
  394. if (obj.type == 1) {
  395. // 跳转到支付页
  396. uni.navigateTo({
  397. url: '/pages/order/createOrder?id=' + da.cartId + '&goodsType=' + obj.goodsType
  398. });
  399. }
  400. if (obj.type == 2) {
  401. obj.$api.msg('成功加入购物车');
  402. obj.toggleSpec();
  403. }
  404. })
  405. .catch(e => {
  406. console.log(e);
  407. });
  408. },
  409. // 去开团
  410. ToKaiTuan(item) {
  411. let id = item.id;
  412. uni.navigateTo({
  413. url: '/pages/product/productGroup?id=' + id
  414. });
  415. },
  416. // 跳转页面
  417. navTo(url) {
  418. uni.navigateTo({
  419. url
  420. });
  421. },
  422. // 查看更多
  423. clickMore() {
  424. this.showlist = this.pinkTlist;
  425. console.log(this.showlist, 22);
  426. this.more = false;
  427. },
  428. //去拼团
  429. groupBooking(item) {
  430. uni.navigateTo({
  431. url: '/pages/groupBooking/groupdetails?id=' + item
  432. });
  433. },
  434. // 获取拼团商品详情
  435. groupGoods() {
  436. let obj = this;
  437. // // 大家还在拼
  438. // nowPinkLst({}).then(({data}) => {
  439. // this.recommendedlist = data;
  440. // })
  441. groupGoods({}, this.goodsid).then(function({
  442. data
  443. }) {
  444. console.log(data,'goodInfo++++++++++++')
  445. let goods = data.product;
  446. obj.goodsObjact = goods;
  447. obj.groupInfo = {
  448. price: data.price,
  449. product_price: data.product.price,
  450. people:data.buying_count_num,
  451. count: data.yet_buying_num ||0,
  452. title: data.product.store_name,
  453. stock: data.stock
  454. }
  455. // obj.goodsObjact.price = goods.price
  456. // obj.goodsObjact.product_price = data.product.product_price
  457. console.log(obj.goodsObjact, 88)
  458. console.log(Array.isArray(data.productValue), 99)
  459. obj.imgList = goods.slider_image; //保存轮播图
  460. obj.actionPrice = goods.sku.image; //保存默认选中商品价格
  461. obj.actionImage = goods.image; //保存默认选中商品图片
  462. obj.goodsNumberMax = 1; //保存默认选中最大可购买商品数量
  463. if (Array.isArray(data.productValue) != true) {
  464. obj.many = 2;
  465. obj.specList = data.productAttr; //保存产品属性
  466. obj.productValue = data.productValue; //保存属性值
  467. obj.specSelected = []; //初始化默认选择对象
  468. for (let i = 0; i < obj.specList.length; i++) {
  469. // 设置默认数据
  470. let attrValue = obj.specList[i].attr_value[0];
  471. attrValue.check = true;
  472. obj.specSelected.push(attrValue.attr);
  473. }
  474. let str = obj.specSelected.join(',');
  475. console.log(str, 'str')
  476. // 设置默认值
  477. obj.actionPrice = obj.productValue[str].price;
  478. obj.goodsNumberMax = obj.productValue[str].stock;
  479. obj.actionImage = obj.productValue[str].image;
  480. obj.uniqueId = obj.productValue[str].unique;
  481. obj.goodsStore = obj.productValue[str].quota;
  482. } else {
  483. obj.many = 1;
  484. }
  485. console.log(obj.many, 'obj.many')
  486. if (obj.goodsObjact.description != null) {
  487. obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
  488. }
  489. if (obj.goodsObjact.pink_type == 'AA团') {
  490. obj.pink_type = 1;
  491. } else {
  492. obj.pink_type = 2;
  493. }
  494. // obj.pinkTlist = data.pink;
  495. obj.pinkTlist = data.groupBuying;
  496. obj.showlist = obj.pinkTlist.slice(0, 2);
  497. if (obj.pinkTlist.length <= 2) {
  498. obj.more = false;
  499. }
  500. // 保存结束时间
  501. obj.seckillObj.stopTime = goods.stop_time * 1000;
  502. // 获取当前时间
  503. let acitonTime = new Date();
  504. // 判断当前时间是否大于结束时间
  505. if (acitonTime.getTime() > obj.seckillObj.stopTime) {
  506. // 当前秒杀时间已经结束
  507. obj.seckillObj.stop = true;
  508. } else {
  509. // 计算倒计时
  510. let time = timeComputed(obj.seckillObj.stopTime)
  511. // 倒计时数据保存
  512. obj.seckillObj = {
  513. stopTime: goods.stop_time * 1000, //结束时间
  514. stop: false, //是否结束
  515. stopTimeD: time.day, //天
  516. stopTimeH: time.hours, //小时
  517. stopTimeM: time.minutes, //分钟
  518. stopTimeS: time.seconds, //秒钟
  519. upTime: (new Date()).getTime()
  520. }
  521. }
  522. });
  523. },
  524. // 立即购买
  525. openPinkT(item) {
  526. let obj = this;
  527. obj.type = item;
  528. // 创建传值对象
  529. console.log(obj.goodsNumber)
  530. let data = {
  531. cartNum: obj.goodsNumber, //商品数量
  532. new: 1, //商品是否新增加到购物车1为不加入0为加入
  533. combinationId: obj.goodsid,
  534. productId: obj.goodsObjact.product_id
  535. };
  536. cartAdd(data)
  537. .then(function(e) {
  538. let da = e.data;
  539. if (obj.type == 1) {
  540. // 跳转到支付页
  541. uni.navigateTo({
  542. url: '/pages/order/createOrder?id=' + da.cartId + '&goodsType=2'
  543. });
  544. }
  545. })
  546. .catch(e => {
  547. console.log(e);
  548. });
  549. },
  550. specOPne(item) {
  551. let obj = this;
  552. obj.specClass = 'show';
  553. console.log(obj.specClass, 'this.specClass')
  554. },
  555. //规格弹窗开关
  556. toggleSpec(str) {
  557. if (this.specClass === 'show') {
  558. this.specClass = 'hide';
  559. setTimeout(() => {
  560. this.specClass = 'none';
  561. }, 250);
  562. } else if (this.specClass === 'none') {
  563. this.specClass = 'show';
  564. }
  565. // 判断是否为数字
  566. if (typeof str == 'number') {
  567. // 保存当前购买类型
  568. this.type = str;
  569. }
  570. },
  571. // 阻止触发上级事件
  572. stopPrevent() {},
  573. bindChange(e) {
  574. this.goodsNumber = this.choNum[e.detail.value]*1;
  575. console.log(this.goodsNumber)
  576. },
  577. numberChange(e) {
  578. //购买数量
  579. this.chooseGoodsNumber = e.number;
  580. }
  581. }
  582. };
  583. </script>
  584. <style lang="scss">
  585. /* 弹出层 */
  586. .popup {
  587. position: fixed;
  588. left: 0;
  589. top: 0;
  590. right: 0;
  591. bottom: 0;
  592. z-index: 99;
  593. &.show {
  594. display: block;
  595. .mask {
  596. animation: showPopup 0.2s linear both;
  597. }
  598. .layer {
  599. animation: showLayer 0.2s linear both;
  600. }
  601. }
  602. &.hide {
  603. .mask {
  604. animation: hidePopup 0.2s linear both;
  605. }
  606. .layer {
  607. animation: hideLayer 0.2s linear both;
  608. }
  609. }
  610. &.none {
  611. display: none;
  612. }
  613. .mask {
  614. position: fixed;
  615. top: 0;
  616. width: 100%;
  617. height: 100%;
  618. z-index: 1;
  619. background-color: rgba(0, 0, 0, 0.4);
  620. }
  621. .layer {
  622. position: fixed;
  623. z-index: 99;
  624. bottom: 0;
  625. width: 100%;
  626. min-height: 35vh;
  627. border-radius: 10rpx 10rpx 0 0;
  628. background-color: #fff;
  629. .btn {
  630. height: 66rpx;
  631. line-height: 66rpx;
  632. border-radius: 100rpx;
  633. // background: $uni-color-primary;
  634. background-color: #901b21;
  635. font-size: $font-base + 2rpx;
  636. color: #fff;
  637. margin: 30rpx auto 20rpx;
  638. }
  639. }
  640. @keyframes showPopup {
  641. 0% {
  642. opacity: 0;
  643. }
  644. 100% {
  645. opacity: 1;
  646. }
  647. }
  648. @keyframes hidePopup {
  649. 0% {
  650. opacity: 1;
  651. }
  652. 100% {
  653. opacity: 0;
  654. }
  655. }
  656. @keyframes showLayer {
  657. 0% {
  658. transform: translateY(120%);
  659. }
  660. 100% {
  661. transform: translateY(0%);
  662. }
  663. }
  664. @keyframes hideLayer {
  665. 0% {
  666. transform: translateY(0);
  667. }
  668. 100% {
  669. transform: translateY(120%);
  670. }
  671. }
  672. }
  673. /* 规格选择弹窗 */
  674. .attr-content {
  675. padding: 25rpx 30rpx;
  676. .a-t {
  677. display: flex;
  678. image {
  679. width: 170rpx;
  680. height: 170rpx;
  681. flex-shrink: 0;
  682. border-radius: 8rpx;
  683. }
  684. .right {
  685. display: flex;
  686. flex-direction: column;
  687. padding-left: 24rpx;
  688. font-size: $font-sm + 2rpx;
  689. color: $font-color-base;
  690. line-height: 42rpx;
  691. width: 75%;
  692. .price {
  693. font-size: $font-lg;
  694. color: #901b21;
  695. margin: 10rpx 0rpx;
  696. }
  697. .name {
  698. font-size: 32rpx;
  699. color: $font-color-dark;
  700. height: 50rpx;
  701. overflow: hidden;
  702. text-overflow: ellipsis;
  703. white-space: nowrap;
  704. display: block;
  705. }
  706. .selected-text {
  707. margin-right: 10rpx;
  708. }
  709. }
  710. }
  711. .attr-list {
  712. display: flex;
  713. flex-direction: column;
  714. font-size: $font-base + 2rpx;
  715. color: $font-color-base;
  716. padding-top: 30rpx;
  717. padding-left: 10rpx;
  718. }
  719. .item-list {
  720. padding: 20rpx 0 0;
  721. display: flex;
  722. flex-wrap: wrap;
  723. text {
  724. display: flex;
  725. align-items: center;
  726. justify-content: center;
  727. background: #eee;
  728. margin-right: 20rpx;
  729. margin-bottom: 20rpx;
  730. border-radius: 100rpx;
  731. min-width: 60rpx;
  732. height: 60rpx;
  733. padding: 0 20rpx;
  734. font-size: $font-base;
  735. color: $font-color-dark;
  736. }
  737. .selected {
  738. // background: #ddffdf;
  739. background-color: rgba($color: #901b21, $alpha: 0.2);
  740. color: #901b21;
  741. }
  742. }
  743. }
  744. //默认商品底部高度
  745. .goodsBottom {
  746. height: 160rpx;
  747. }
  748. page {
  749. background: #f0f0f0;
  750. }
  751. //秒杀、拼团底部高度
  752. .contentBottomHeight {
  753. height: 125rpx;
  754. // background-color: #FFFFFF;
  755. }
  756. //默认商品底部高度
  757. .goodsBottom {
  758. height: 160rpx;
  759. }
  760. /deep/ .iconenter {
  761. font-size: $font-base + 2rpx;
  762. color: #888;
  763. }
  764. /deep/ .con_image {
  765. width: 130rpx;
  766. height: 130rpx;
  767. display: inline-block;
  768. padding: 15rpx;
  769. image {
  770. width: 100%;
  771. height: 100%;
  772. }
  773. }
  774. /* 商品详情中限制图片大小 */
  775. /deep/ .rich-img {
  776. width: 100% !important;
  777. height: auto;
  778. }
  779. .pinklistbox {
  780. background: #ffffff;
  781. margin-top: 25rpx;
  782. overflow: hidden;
  783. }
  784. .pink_num {
  785. background: -webkit-linear-gradient(left, #fdf5f6, #fbebf6);
  786. padding: 15rpx 25rpx;
  787. font-size: 26rpx;
  788. color: #dd524d;
  789. }
  790. .pint {
  791. background: -webkit-linear-gradient(left, #ff1f4f, #ff0409);
  792. padding: 10rpx 25rpx;
  793. color: #ffffff;
  794. font-size: 24rpx;
  795. border-radius: 25rpx;
  796. .iconenter {
  797. font-size: 15px;
  798. color: #ffffff;
  799. }
  800. }
  801. .pinklist {
  802. padding: 0rpx 25rpx;
  803. padding-top: 45rpx !important;
  804. }
  805. .pinklist_list {
  806. margin-bottom: 10rpx;
  807. }
  808. .pink_img {
  809. width: 100rpx;
  810. height: 100rpx;
  811. image {
  812. width: 100%;
  813. height: 100%;
  814. border-radius: 100%;
  815. }
  816. }
  817. .pink_people {
  818. font-size: 28rpx;
  819. text {
  820. color: #dd524d;
  821. }
  822. }
  823. .pink_time {
  824. font-size: 26rpx;
  825. color: #909399;
  826. }
  827. .pink_name {
  828. width: 200rpx;
  829. overflow: hidden;
  830. white-space: nowrap;
  831. text-overflow: ellipsis;
  832. padding-left: 10rpx;
  833. // background: #FC2A3F;
  834. // height: 50rpx;
  835. }
  836. .More {
  837. width: 100%;
  838. line-height: 2;
  839. background-color: #fc2a3f;
  840. font-size: $font-lg;
  841. margin: 0 auto;
  842. text-align: center;
  843. color: #ffffff;
  844. // border-radius: 50rpx;
  845. }
  846. .ping-plan {
  847. background-color: #FFFFFF;
  848. padding: 25rpx 35rpx;
  849. border-top: 15rpx solid #F3F3F4;
  850. border-bottom: 15rpx solid #F3F3F4;
  851. }
  852. .participate-7 {
  853. color: #000000;
  854. font-size: 29rpx;
  855. font-weight: 500;
  856. padding-bottom: 25rpx;
  857. .participate-7-1 {
  858. .word {
  859. color: #ff0a1a;
  860. }
  861. .word1 {
  862. font-size: 25rpx;
  863. color: #989aa0;
  864. }
  865. image {
  866. width: 10rpx;
  867. height: 20rpx;
  868. margin-left: 15rpx;
  869. }
  870. }
  871. }
  872. //左右顶格加上下居中
  873. .flex-between-center {
  874. display: flex;
  875. justify-content: space-between;
  876. align-items: center;
  877. }
  878. .participate-8 {
  879. image {
  880. width: 26rpx;
  881. height: 12rpx;
  882. }
  883. .participate-8-1 {
  884. text-align: center;
  885. .img1 {
  886. width: 43rpx;
  887. height: 50rpx;
  888. }
  889. .img2 {
  890. width: 43rpx;
  891. height: 42rpx;
  892. }
  893. .img3 {
  894. width: 60rpx;
  895. height: 46rpx;
  896. }
  897. .word-1 {
  898. font-size: 23rpx;
  899. color: #000000;
  900. line-height: 34rpx;
  901. }
  902. .word-2 {
  903. font-size: 21rpx;
  904. color: #91949B;
  905. line-height: 34rpx;
  906. }
  907. }
  908. }
  909. .jg {
  910. background-color: #fff;
  911. height: 60.5rpx;
  912. position: relative;
  913. top: -60.5rpx;
  914. margin-bottom: -60.5rpx;
  915. }
  916. .have-know {
  917. height: 100rpx;
  918. width: 750rpx;
  919. line-height: 1;
  920. padding: 35rpx 0 0 30rpx;
  921. background-color: #fff;
  922. margin: 15rpx 0;
  923. font-size: 32rpx;
  924. font-weight: bold;
  925. color: #3B3B3B;
  926. text {
  927. display: inline-block;
  928. padding-left: 31rpx;
  929. font-size: 26rpx;
  930. font-weight: 500;
  931. color: #8A8A8A;
  932. }
  933. }
  934. .way {
  935. padding: 34rpx 97rpx 0 30rpx;
  936. background-color: #fff;
  937. margin: 15rpx 0;
  938. font-size: 32rpx;
  939. font-weight: bold;
  940. color: #3B3B3B;
  941. line-height: 1;
  942. text {
  943. display: inline-block;
  944. padding-left: 186rpx;
  945. font-size: 26rpx;
  946. font-weight: 500;
  947. color: #8A8A8A;
  948. // width: 100%;
  949. position: relative;
  950. top:-34rpx;
  951. line-height: 1.5;
  952. }
  953. }
  954. .row {
  955. display: flex;
  956. align-items: center;
  957. position: relative;
  958. padding: 0 30rpx;
  959. height: 110rpx;
  960. background: #fff;
  961. .refund {
  962. font-size: 30rpx;
  963. color: $font-color-dark;
  964. padding-left: 128rpx;
  965. }
  966. .noRefund {
  967. font-size: 30rpx;
  968. color: $font-color-light;
  969. padding-left: 128rpx;
  970. }
  971. .tit {
  972. flex-shrink: 0;
  973. width: 120rpx;
  974. font-size: 30rpx;
  975. color: $font-color-dark;
  976. }
  977. .input {
  978. flex: 1;
  979. font-size: 30rpx;
  980. color: $font-color-dark;
  981. padding-left: 128rpx;
  982. &.payColor {
  983. color: $color-red;
  984. }
  985. }
  986. .iconlocation {
  987. font-size: 36rpx;
  988. color: $font-color-light;
  989. }
  990. }
  991. </style>