shop.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897
  1. <template>
  2. <view class="container">
  3. <scroll-view style="height: 100vh;" class="floor-list"
  4. :scroll-top="scrollTop" scroll-y="true" @scroll="scroll" @scrolltoupper="upper" @scrolltolower="lower"
  5. refresher-enabled="true">
  6. <view class="carousel">
  7. <swiper indicator-dots circular=true duration="400">
  8. <swiper-item class="swiper-item" v-for="(item,index) in datalist.images" :key="index">
  9. <view class="image-wrapper">
  10. <image
  11. :src="pictureUrl+'/uploads/home/adv/'+item.goodsimage_url"
  12. class="loaded"
  13. mode="aspectFill"
  14. ></image>
  15. </view>
  16. </swiper-item>
  17. </swiper>
  18. </view>
  19. <view class="introduce-section">
  20. <view class="titleLayout" >
  21. <view class="title">{{datalist.goods_name}}</view>
  22. <view @tap="shopDetail" style="display: flex;flex-direction: row;">
  23. <view class="titleRight">
  24. <view style="font-size: 36upx;color: #D9332E;text-align: right;">{{datalist.praise}}%</view>
  25. <view style="color: #606266;font-size: 28upx;">好评率</view>
  26. </view>
  27. <view style="display: flex;align-items: center;">
  28. <uni-icon size="18" type="arrowright"></uni-icon>
  29. </view>
  30. </view>
  31. </view>
  32. <view style="color: #909399;padding: 10upx 0 15upx 0;" v-if="datalist.points>0">购买得{{datalist.points}}圈币</view>
  33. <view class="titleLayout price-box">
  34. <view>
  35. <text class="price-tip">¥</text>
  36. <text class="price">{{datalist.goods_price}}</text>
  37. <text class="m-price">¥{{datalist.goods_marketprice}}</text>
  38. <text class="price-tip" v-if="datalist.goods_storage == 0">已下架</text>
  39. </view>
  40. <view>
  41. <text style="color: #909399">月销售{{datalist.sale_number}}</text>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="c-list">
  46. <view style="display: flex;justify-content: space-between;" class="c-row b-b" @click="toggleSpec">
  47. <view style="font-size: 32upx;color: #909399;">规则数量选择</view>
  48. <view>
  49. <uni-icon size="20" type="arrowright"></uni-icon>
  50. </view>
  51. </view>
  52. </view>
  53. <!-- 评价 -->
  54. <view @tap="shopDetail" style="border-bottom: 20rpx solid #F5F5F5;" class="eva-section">
  55. <view style="display: flex;justify-content: space-between;" class="c-row b-b">
  56. <view style="font-size: 32upx;color: #909399;">评价</view>
  57. <view>
  58. <uni-icon size="20" type="arrowright"></uni-icon>
  59. </view>
  60. </view>
  61. <assess />
  62. </view>
  63. <!-- :class="iScrolltop == 2?'activeColor' : ''" -->
  64. <view class="detail-desc" >
  65. <van-tabs v-model="active" @click="onChange">
  66. <van-tab :name="0" title="详情">
  67. <view style="padding: 0 32upx;">
  68. <rich-text :nodes="datalist.goods_body"></rich-text>
  69. </view>
  70. </van-tab>
  71. <van-tab :name="1" title="常见问题">
  72. <view style="padding: 0 32upx;">
  73. <rich-text :nodes="datalist.issue"></rich-text>
  74. </view>
  75. </van-tab>
  76. </van-tabs>
  77. </view>
  78. <!-- 底部操作菜单 -->
  79. <view class="page-bottom">
  80. <navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
  81. <text class="yticon icon-xiatubiao--copy"></text>
  82. <text>首页</text>
  83. </navigator>
  84. <navigator url="/pages/index/cart" open-type="navigate" class="p-b-btn">
  85. <text class="yticon icon-gouwuche"></text>
  86. <text>购物车</text>
  87. </navigator>
  88. <view class="p-b-btn" :class="{active: favorite}" @click="toFavorite">
  89. <text class="yticon icon-shoucang"></text>
  90. <text>收藏</text>
  91. </view>
  92. <view class="action-btn-group">
  93. <button type="primary" @click="openCar" class=" action-btn no-border add-cart-btn">加入购物车</button>
  94. <button type="primary" class=" action-btn no-border buy-now-btn" @click="buy">立即购买</button>
  95. </view>
  96. </view>
  97. <!-- 规格-模态层弹窗 -->
  98. <view
  99. class="popup spec"
  100. :class="specClass"
  101. @touchmove.stop.prevent="stopPrevent"
  102. @click="toggleSpec"
  103. >
  104. <!-- 遮罩层 -->
  105. <view class="mask"></view>
  106. <view class="layer attr-content" @click.stop="stopPrevent">
  107. <view class="a-t">
  108. <image :src="nuberImg"></image>
  109. <view class="right">
  110. <text class="price" style="font-size: 36upx;color: #303133">{{datalist.goods_price}}</text>
  111. <view class="selected" v-if="specSelected.length > 0">
  112. <text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">
  113. {{sItem.value_name}}X {{shopnumber}}
  114. </text>
  115. </view>
  116. <view class="selected" v-else>
  117. <text class="selected-text">
  118. 请选择规格数量
  119. </text>
  120. </view>
  121. </view>
  122. <view @click="closeCar" style="position: absolute;right: 10%;">
  123. <uni-icon size="20" type="close"></uni-icon>
  124. </view>
  125. </view>
  126. <view v-for="(item,index) in datalist.spec_list" :key="index" class="attr-list">
  127. <text>{{item.spec_name}}</text>
  128. <view class="item-list">
  129. <!-- v-if="childItem.pid === item.id" -->
  130. <text
  131. v-for="(childItem, childIndex) in item.value_list"
  132. :key="childIndex" class="tit"
  133. :class="{selected: childItem.selected, disabled: childItem.goods_storage==0}"
  134. @click="selectSpec(index, childItem.value_id, childItem.value_name, childItem.goods_storage)"
  135. >
  136. {{childItem.value_name}}
  137. </text>
  138. </view>
  139. </view>
  140. <view class="numberchange">
  141. <span>数量</span>
  142. <uninumberbox :max="goods_storage" :min="1" @change="changestorage"/>
  143. </view>
  144. </view>
  145. </view>
  146. <!-- 分享 -->
  147. <!-- <share
  148. ref="share"
  149. :contentHeight="580"
  150. :shareList="shareList"
  151. ></share> -->
  152. </scroll-view>
  153. </view>
  154. </template>
  155. <script>
  156. import uninumberbox from '@/component/uinNumber.vue'
  157. import assess from '@/component/assess.vue' // 评价列表
  158. import uniIcon from '@/component/uni-icon/uni-icon.vue'
  159. export default{
  160. components: {
  161. uniIcon,
  162. assess,
  163. uninumberbox
  164. },
  165. data() {
  166. return {
  167. changnumber: 100,
  168. ismax: false, // 输入狂禁止数量
  169. goods_storage: 0, // 规格商品参数
  170. nuberImg:'',
  171. shopnumber: 1,
  172. pictureUrl: this.pictureUrl,
  173. datalist: {},
  174. store_id: 0, // 酒店id
  175. goodId: 0, // 商品id
  176. windowHeight: 0, // 窗口高度
  177. iScrolltop: 1,
  178. active: 0,
  179. scrollTop: 0,
  180. old: {
  181. scrollTop: 0
  182. },
  183. specClass: 'none',
  184. specSelected:[],
  185. favorite: true,
  186. shareList: [],
  187. imgList: [
  188. ],
  189. desc: `
  190. `,
  191. specList: [
  192. ]
  193. };
  194. },
  195. onLaunch: function(){
  196. this.active = 1;
  197. },
  198. onShow: function() {
  199. let _this = this;
  200. uni.getSystemInfo({
  201. success: function (res) {
  202. _this.windowHeight = res.screenHeight;
  203. // console.log("屏幕宽度:"+res.screenWidth);
  204. // console.log("屏幕高度:"+res.screenHeight);
  205. // console.log("可使用窗口宽度:"+res.windowWidth);
  206. // console.log("可使用窗口高度:"+res.windowHeight);
  207. }
  208. });
  209. },
  210. async onLoad(options){
  211. this.goodId = options.id; // 商品Id
  212. this.store_id = options.store_id;
  213. this.getshopdetail(); // 获取商品详情
  214. //规格 默认选中第一条
  215. // this.datalist.spec_list[0].value_list.forEach(item=>{
  216. // for(let cItem of this.specChildList){
  217. // if(cItem.pid === item.id){
  218. // this.$set(cItem, 'selected', true);
  219. // this.specSelected.push(cItem);
  220. // break; //forEach不能使用break
  221. // }
  222. // }
  223. // })
  224. //this.shareList = await this.$api.json('shareList');
  225. },
  226. methods:{
  227. // 更改商品数量
  228. changestorage(e) {
  229. this.shopnumber = e;
  230. },
  231. // 获取商品详情
  232. getshopdetail() {
  233. let _this = this;
  234. let params = {};
  235. params.goods_commonid =_this.goodId;
  236. params.store_id = _this.store_id;
  237. this.request({
  238. url:'/v2/goods/detail',
  239. method:'POST',
  240. data: params,
  241. success: function(res) {
  242. let { data } = res.data;
  243. let array = data;
  244. array.spec_list[0].value_list.forEach( (item,idx) => {
  245. item.goods_storage = data.goods_list[idx].goods_storage;
  246. })
  247. _this.datalist = array;
  248. }
  249. })
  250. },
  251. shopDetail() {
  252. // url: `/pages/index/shop?id=${id}&store_id=${store_id}`
  253. let goodId = this.goodId; // 商品Id
  254. let store_id = this.store_id;
  255. uni.navigateTo({
  256. url: `/pages/index/commemt?goodId=${goodId}&store_id=${store_id}`
  257. });
  258. },
  259. onChange(event) {
  260. this.active = event.detail.name;
  261. console.log(this.active)
  262. },
  263. //规格弹窗开关
  264. toggleSpec() {
  265. this.specClass = 'show';
  266. // if(this.specClass === 'show'){
  267. // this.specClass = 'hide';
  268. // setTimeout(() => {
  269. // this.specClass = 'none';
  270. // }, 250);
  271. // }else if(this.specClass === 'none'){
  272. // this.specClass = 'show';
  273. // }
  274. },
  275. //
  276. openCar() {
  277. this.specClass = 'show';
  278. if(this.specSelected.length == 0) {
  279. this.$msg("请选择规格数量");
  280. }
  281. },
  282. closeCar() {
  283. this.specClass = 'none';
  284. },
  285. //选择规格
  286. selectSpec(index, pid,value_name,goods_storage){
  287. console.log(goods_storage)
  288. if(goods_storage == 0) {
  289. return;
  290. }
  291. let list = this.datalist.spec_list[index].value_list;
  292. this.datalist.spec_list[index].value_list.forEach(item=>{
  293. if(item.value_id === pid){
  294. this.$set(item, 'selected', true);
  295. }else {
  296. this.$set(item, 'selected', false);
  297. }
  298. })
  299. this.datalist.spec_list[index].value_list = list;
  300. let scopemapId = pid;
  301. let goodId = this.datalist.spec_map[scopemapId];
  302. let items = this.datalist.goods_list[goodId]
  303. items.value_name = value_name;
  304. this.nuberImg = items.spec_img;
  305. this.specSelected = [];
  306. this.specSelected.push(items)
  307. this.goods_storage = items.goods_storage;
  308. },
  309. // 滚动到顶部
  310. upper(e) {
  311. console.log(e)
  312. console.log("顶部")
  313. },
  314. // 滚到底部
  315. lower(e) {
  316. console.log("底部")
  317. },
  318. // 滚动时触发
  319. scroll(e) {
  320. this.old.scrollTop = e.detail.scrollTop
  321. if(e.detail.scrollTop > this.windowHeight) {
  322. this.iScrolltop = 2;
  323. }else {
  324. this.iScrolltop = 1;
  325. }
  326. },
  327. //收藏
  328. toFavorite(){
  329. this.favorite = !this.favorite;
  330. },
  331. buy(){
  332. uni.navigateTo({
  333. url: './sureBuy'
  334. })
  335. },
  336. stopPrevent(){}
  337. },
  338. }
  339. </script>
  340. <style lang='scss'>
  341. page{
  342. /* background: $page-color-base; */
  343. padding-bottom: 160upx;
  344. }
  345. .icon-you{
  346. font-size: 28upx + 2upx;
  347. color: #888;
  348. }
  349. .carousel {
  350. height: 722upx;
  351. position:relative;
  352. swiper{
  353. height: 100%;
  354. }
  355. .image-wrapper{
  356. width: 100%;
  357. height: 100%;
  358. }
  359. .swiper-item {
  360. display: flex;
  361. justify-content: center;
  362. align-content: center;
  363. height: 750upx;
  364. overflow: hidden;
  365. image {
  366. width: 100%;
  367. height: 100%;
  368. }
  369. }
  370. }
  371. .titleLayout {
  372. display: flex;
  373. justify-content: space-between;
  374. padding-bottom: 20upx;
  375. }
  376. /* 标题简介 */
  377. .introduce-section{
  378. background: #fff;
  379. padding: 20upx 30upx;
  380. .title{
  381. font-size: 36upx;
  382. color: #303133;
  383. height: 50upx;
  384. line-height: 50upx;
  385. width: 70%;
  386. white-space:nowrap;
  387. overflow:hidden;
  388. text-overflow:ellipsis;
  389. }
  390. .titleRight {
  391. border-left: 1px solid #F5F5F5;
  392. padding-left: 32upx;
  393. }
  394. .price-box{
  395. display:flex;
  396. align-items:baseline;
  397. height: 64upx;
  398. padding: 10upx 0;
  399. font-size: 26upx;
  400. color:#fa436a;
  401. }
  402. .price{
  403. font-size: $font-lg + 2upx;
  404. }
  405. .m-price{
  406. margin:0 12upx;
  407. color: #909399;
  408. text-decoration: line-through;
  409. }
  410. .coupon-tip{
  411. align-items: center;
  412. padding: 4upx 10upx;
  413. background: #fa436a;
  414. font-size: 24upx;
  415. color: #fff;
  416. border-radius: 6upx;
  417. line-height: 1;
  418. transform: translateY(-4upx);
  419. }
  420. .bot-row{
  421. display:flex;
  422. align-items:center;
  423. height: 50upx;
  424. font-size: 24upx;
  425. color: #909399;
  426. text{
  427. flex: 1;
  428. }
  429. }
  430. }
  431. /* 分享 */
  432. .share-section{
  433. display:flex;
  434. align-items:center;
  435. color: #606266;
  436. background: linear-gradient(left, #fdf5f6, #fbebf6);
  437. padding: 12upx 30upx;
  438. .share-icon{
  439. display:flex;
  440. align-items:center;
  441. width: 70upx;
  442. height: 30upx;
  443. line-height: 1;
  444. border: 1px solid #fa436a;
  445. border-radius: 4upx;
  446. position:relative;
  447. overflow: hidden;
  448. font-size: 22upx;
  449. color: #fa436a;
  450. &:after{
  451. content: '';
  452. width: 50upx;
  453. height: 50upx;
  454. border-radius: 50%;
  455. left: -20upx;
  456. top: -12upx;
  457. position:absolute;
  458. background: #fa436a;
  459. }
  460. }
  461. .icon-xingxing{
  462. position:relative;
  463. z-index: 1;
  464. font-size: 24upx;
  465. margin-left: 2upx;
  466. margin-right: 10upx;
  467. color: #fff;
  468. line-height: 1;
  469. }
  470. .tit{
  471. font-size: 28upx;
  472. margin-left:10upx;
  473. }
  474. .icon-bangzhu1{
  475. padding: 10upx;
  476. font-size: 30upx;
  477. line-height: 1;
  478. }
  479. .share-btn{
  480. flex: 1;
  481. text-align:right;
  482. font-size: 24upx;
  483. color: #fa436a;
  484. }
  485. .icon-you{
  486. font-size: 24upx;
  487. margin-left: 4upx;
  488. color: #fa436a;
  489. }
  490. }
  491. .c-list{
  492. font-size: 24upx + 2upx;
  493. color: #606266;
  494. background: #fff;
  495. border-top: 20upx solid #F5F5F5;
  496. border-bottom: 20upx solid #F5F5F5;
  497. .c-row{
  498. display:flex;
  499. align-items:center;
  500. padding: 20upx 30upx;
  501. position:relative;
  502. }
  503. .tit{
  504. width: 140upx;
  505. }
  506. .con{
  507. flex: 1;
  508. color: #303133;
  509. .selected-text{
  510. margin-right: 10upx;
  511. }
  512. }
  513. .bz-list{
  514. height: 40upx;
  515. font-size: 24upx+2upx;
  516. color: #303133;
  517. text{
  518. display: inline-block;
  519. margin-right: 30upx;
  520. }
  521. }
  522. .con-list{
  523. flex: 1;
  524. display:flex;
  525. flex-direction: column;
  526. color: #303133;
  527. line-height: 40upx;
  528. }
  529. .red{
  530. color: #fa436a;
  531. }
  532. }
  533. /* 评价 */
  534. .eva-section{
  535. display: flex;
  536. flex-direction: column;
  537. padding: 20upx 30upx;
  538. background: #fff;
  539. margin-top: 16upx;
  540. .e-header{
  541. display: flex;
  542. align-items: center;
  543. height: 70upx;
  544. font-size: 24upx + 2upx;
  545. color: #909399;
  546. .tit{
  547. font-size: 28upx + 2upx;
  548. color: #303133;
  549. margin-right: 4upx;
  550. }
  551. .tip{
  552. flex: 1;
  553. text-align: right;
  554. }
  555. .icon-you{
  556. margin-left: 10upx;
  557. }
  558. }
  559. }
  560. .eva-box{
  561. display: flex;
  562. padding: 20upx 0;
  563. .portrait{
  564. flex-shrink: 0;
  565. width: 80upx;
  566. height: 80upx;
  567. border-radius: 100px;
  568. }
  569. .right{
  570. flex: 1;
  571. display: flex;
  572. flex-direction: column;
  573. font-size: 28upx;
  574. color: #606266;
  575. padding-left: 26upx;
  576. .con{
  577. font-size: 28upx;
  578. color: #303133;
  579. padding: 20upx 0;
  580. }
  581. .bot{
  582. display: flex;
  583. justify-content: space-between;
  584. font-size: 24upx;
  585. color:#909399;
  586. }
  587. }
  588. }
  589. /* 详情 */
  590. .detail-desc{
  591. background: #fff;
  592. margin-top: 16upx;
  593. width: 100%;
  594. .d-header{
  595. display: flex;
  596. justify-content: center;
  597. align-items: center;
  598. height: 80upx;
  599. font-size: 28upx + 2upx;
  600. color: #303133;
  601. position: relative;
  602. text{
  603. padding: 0 20upx;
  604. background: #fff;
  605. position: relative;
  606. z-index: 1;
  607. }
  608. &:after{
  609. position: absolute;
  610. left: 50%;
  611. top: 50%;
  612. transform: translateX(-50%);
  613. width: 300upx;
  614. height: 0;
  615. content: '';
  616. border-bottom: 1px solid #ccc;
  617. }
  618. }
  619. }
  620. /* 规格选择弹窗 */
  621. .attr-content{
  622. padding: 10upx 30upx;
  623. .a-t{
  624. display: flex;
  625. image{
  626. width: 170upx;
  627. height: 170upx;
  628. flex-shrink: 0;
  629. margin-top: -40upx;
  630. border-radius: 8upx;;
  631. }
  632. .right{
  633. display: flex;
  634. flex-direction: column;
  635. padding-left: 24upx;
  636. font-size: 24upx + 2upx;
  637. color: #606266;
  638. line-height: 42upx;
  639. justify-content: space-around;
  640. .price{
  641. font-size: $font-lg;
  642. color: #fa436a;
  643. margin-bottom: 10upx;
  644. }
  645. .selected-text{
  646. margin-right: 10upx;
  647. }
  648. }
  649. }
  650. .attr-list{
  651. display: flex;
  652. flex-direction: column;
  653. font-size: 28upx + 2upx;
  654. color: #606266;
  655. padding-top: 30upx;
  656. padding-left: 10upx;
  657. }
  658. .item-list{
  659. padding: 20upx 0 0;
  660. display: flex;
  661. flex-wrap: wrap;
  662. text{
  663. display: flex;
  664. align-items: center;
  665. justify-content: center;
  666. background: #eee;
  667. margin-right: 20upx;
  668. margin-bottom: 20upx;
  669. border-radius: 100upx;
  670. min-width: 60upx;
  671. height: 60upx;
  672. padding: 0 20upx;
  673. font-size: 28upx;
  674. color: #303133;
  675. }
  676. .selected{
  677. background: #fbebee;
  678. color: #fa436a;
  679. }
  680. .disabled {
  681. color:#fbebee;
  682. background: rgba(245,245,245, 0.5);
  683. }
  684. }
  685. }
  686. /* 弹出层 */
  687. .popup {
  688. position: fixed;
  689. left: 0;
  690. top: 0;
  691. right: 0;
  692. bottom: 100upx;
  693. z-index: 99;
  694. &.show {
  695. display: block;
  696. .mask{
  697. animation: showPopup 0.2s linear both;
  698. }
  699. .layer {
  700. animation: showLayer 0.2s linear both;
  701. }
  702. }
  703. &.hide {
  704. .mask{
  705. animation: hidePopup 0.2s linear both;
  706. }
  707. .layer {
  708. animation: hideLayer 0.2s linear both;
  709. }
  710. }
  711. &.none {
  712. display: none;
  713. }
  714. .mask{
  715. position: fixed;
  716. top: 0;
  717. width: 100%;
  718. height: 90%;
  719. z-index: 1;
  720. background-color: rgba(0, 0, 0, 0.4);
  721. }
  722. .layer {
  723. position: fixed;
  724. z-index: 99;
  725. bottom: 100upx;
  726. width: 100%;
  727. min-height: 40vh;
  728. border-radius: 10upx 10upx 0 0;
  729. background-color: #fff;
  730. .btn{
  731. height: 66upx;
  732. line-height: 66upx;
  733. border-radius: 100upx;
  734. background: #fa436a;
  735. font-size: 28upx + 2upx;
  736. color: #fff;
  737. margin: 30upx auto 20upx;
  738. }
  739. }
  740. @keyframes showPopup {
  741. 0% {
  742. opacity: 0;
  743. }
  744. 100% {
  745. opacity: 1;
  746. }
  747. }
  748. @keyframes hidePopup {
  749. 0% {
  750. opacity: 1;
  751. }
  752. 90% {
  753. opacity: 0;
  754. }
  755. }
  756. @keyframes showLayer {
  757. 0% {
  758. transform: translateY(120%);
  759. }
  760. 100% {
  761. transform: translateY(0%);
  762. }
  763. }
  764. @keyframes hideLayer {
  765. 0% {
  766. transform: translateY(0);
  767. }
  768. 100% {
  769. transform: translateY(120%);
  770. }
  771. }
  772. }
  773. .van-sticky {
  774. /* z-index: 0!important; */
  775. }
  776. /* 详情固定 */
  777. .activeColor {
  778. /* background: #fff!important; */
  779. position: fixed;
  780. background-color: #fff;
  781. top: 0upx;
  782. z-index: 99;
  783. margin-top: 0;
  784. }
  785. .numberchange {
  786. padding-top: 48px;
  787. overflow: hidden;
  788. clear: both;
  789. padding-right: 59rpx;
  790. }
  791. .uni-numbox {
  792. float: right;
  793. }
  794. /* 底部操作菜单 */
  795. .page-bottom{
  796. position: fixed;
  797. left: 0;
  798. bottom: 0;
  799. display: flex;
  800. justify-content: center;
  801. align-items: center;
  802. width: 100%;
  803. height: 100upx;
  804. z-index: 99;
  805. background: rgba(255,255,255,.9);
  806. .p-b-btn{
  807. display:flex;
  808. flex-direction: column;
  809. align-items: center;
  810. justify-content: center;
  811. font-size: 24upx;
  812. color: #606266;
  813. width: 96upx;
  814. height: 80upx;
  815. .yticon{
  816. font-size: 40upx;
  817. line-height: 48upx;
  818. color: #909399;
  819. }
  820. &.active, &.active .yticon{
  821. color: #fa436a;
  822. }
  823. .icon-fenxiang2{
  824. font-size: 42upx;
  825. transform: translateY(-2upx);
  826. }
  827. .icon-shoucang{
  828. font-size: 46upx;
  829. }
  830. }
  831. .action-btn-group{
  832. display: flex;
  833. height: 76upx;
  834. border-radius: 100px;
  835. overflow: hidden;
  836. box-shadow: 0 20upx 40upx -16upx #fa436a;
  837. box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
  838. background: linear-gradient(to right, #ffac30,#fa436a,#F56C6C);
  839. margin-left: 20upx;
  840. position:relative;
  841. &:after{
  842. content: '';
  843. position:absolute;
  844. top: 50%;
  845. right: 50%;
  846. transform: translateY(-50%);
  847. height: 28upx;
  848. width: 0;
  849. border-right: 1px solid rgba(255,255,255,.5);
  850. }
  851. .action-btn{
  852. display:flex;
  853. align-items: center;
  854. justify-content: center;
  855. width: 180upx;
  856. height: 100%;
  857. font-size: 28upx ;
  858. padding: 0;
  859. border-radius: 0;
  860. background: transparent;
  861. }
  862. }
  863. }
  864. </style>