shop.vue 19 KB

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