goods_cate.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759
  1. <template>
  2. <view class='productSort'>
  3. <!-- #ifdef APP-PLUS || H5 -->
  4. <!-- 状态栏占位 -->
  5. <view class="status_bar"></view>
  6. <!-- #endif -->
  7. <!-- 商品搜索 -->
  8. <view class='header acea-row row-center-wrapper' style="margin-top: var(--status-bar-height)">
  9. <view class='acea-row row-between-wrapper input'>
  10. <!-- #ifdef MP -->
  11. <text class='iconfont icon-sousuo'></text>
  12. <!-- #endif -->
  13. <!-- #ifdef APP-PLUS || H5 -->
  14. <u-icon name="search"></u-icon>
  15. <!-- #endif -->
  16. <input type='text' placeholder='点击搜索商品信息' @confirm="searchSubmitValue" confirm-type='search'
  17. name="search" placeholder-class='placeholder' />
  18. </view>
  19. </view>
  20. <!-- 商品分类(左) -->
  21. <view class='aside' :style="{bottom: tabbarH + 'px',height: height + 'rpx'}">
  22. <scroll-view scroll-y="true" scroll-with-animation='true' style="height: 100%;">
  23. <view class='item acea-row row-center-wrapper' :class='index==navActive?"on":""'
  24. v-for="(item,index) in productList" :key="index" @click='tap(item.id,index,"b"+index)'>
  25. <text>{{item.name}}</text>
  26. </view>
  27. </scroll-view>
  28. </view>
  29. <!-- 商品分类(右) -->
  30. <view class='conter'>
  31. <scroll-view scroll-y="true" :style='"height:"+height+"rpx;margin-top: 96rpx;"'
  32. scroll-with-animation='true'>
  33. <view class='listw'>
  34. <view class='list acea-row'>
  35. <view class='list acea-row row-between-wrapper' :class='is_switch?"":"on"'>
  36. <view class='item' :class='is_switch?"":"on"' hover-class='none'
  37. v-for="(item,index) in goodsRightList" :key="index" @click="godDetail(item)">
  38. <view class='pictrue' :class='is_switch?"":"on"'>
  39. <image :src='item.picUrl' :class='is_switch?"":"on"'></image>
  40. </view>
  41. <view class='text' :class='is_switch?"":"on"'>
  42. <view class='name line1'>{{item.name}}</view>
  43. <view class='money font-color' :class='is_switch?"":"on"'> <text
  44. class='num'>¥{{ fen2yuan(item.price) }}</text>
  45. <view class="carnum num-dis row-left" v-if="item.selected_goods_num>0">
  46. <!-- :class="item.selected_goods_num <= 1 ? 'on' : ''" -->
  47. <view class="item reduce"
  48. @click.stop="CartNumDes(item.id)">
  49. -
  50. </view>
  51. <view class='item num' @click.stop="bindCode()">
  52. <input style="color: #000;background-color: #EAEAEA;" type="number" v-model="item.selected_goods_num"
  53. @input="updateCart" />
  54. </view>
  55. <!-- <view v-if="iSplus" class="item plus"
  56. :class="attr.productSelect.cart_num >= attr.productSelect.stock ? 'on' : ''"
  57. @click.stop="CartNumAdd(item.id)">
  58. +
  59. </view> -->
  60. <view class='item plus' @click.stop='CartNumAdd(item.id)'>+</view>
  61. </view>
  62. <view class="circle" v-else @click.stop="addGoods(item.skus[0].id,index)">+
  63. </view>
  64. </view>
  65. <view class='vip acea-row row-between-wrapper' :class='is_switch?"":"on"'>
  66. <view class='vip-money' v-if="item.vipPrice > 0">
  67. ¥{{ fen2yuan(item.price - item.vipPrice) }}
  68. <image src='../../static/images/vip.png'></image>
  69. </view>
  70. <view>已售 {{ item.salesCount || 0}} 库存{{item.stock}}</view>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. <view :style='"height:"+(height-300)+"rpx;"' v-if="number < 15" />
  78. </scroll-view>
  79. </view>
  80. <!-- 购物车 -->
  81. <!-- <view class='footer acea-row row-between-wrapper' >
  82. <view class="zz" @click="hideShoppingCar"></view>
  83. <view class='money acea-row row-middle' @click="showShoppingCar">
  84. <view>费用:¥{{ fen2yuan(0) }}</view>
  85. <form @submit="subOrder" report-submit='true'>
  86. <button class='placeOrder bg-color' formType="submit">立即下单</button>
  87. </form>
  88. </view>
  89. </view> -->
  90. <!-- 购物车列表 -->
  91. <!-- :style="{display: showCar ? 'flex' : 'none'}" -->
  92. <view class="cart-box" v-if="goodsRightList.length>0">
  93. <orderAddcart ref='orderAddcart' @showMask='isShowMask' @hideMask='hideMask' @cartList="handleCartList"></orderAddcart>
  94. </view>
  95. <view class="zz" @click="hideShoppingCar" v-if="showMask"></view>
  96. </view>
  97. </template>
  98. <script>
  99. import * as CategoryApi from '@/api/product/category.js';
  100. import * as ProductSpuApi from '@/api/product/spu.js';
  101. import * as Util from '@/utils/util.js';
  102. import {
  103. toLogin
  104. } from '@/libs/login.js';
  105. import * as TradeCartApi from '@/api/trade/cart.js';
  106. import {
  107. mapGetters
  108. } from "vuex";
  109. import {
  110. goShopDetail
  111. } from '@/libs/order.js'
  112. import orderAddcart from '@/components/order_addcart/index.vue';
  113. export default {
  114. props: {
  115. attr: {
  116. type: Object,
  117. default: () => {}
  118. },
  119. },
  120. data() {
  121. return {
  122. navlist: [],
  123. productList: [], // 商品分类,树形结构
  124. navActive: 0,
  125. number: "",
  126. height: 0,
  127. hightArr: [],
  128. toView: "",
  129. tabbarH: 0,
  130. limit: 10,
  131. page: 1,
  132. goodsRightList: [],
  133. cartList:[],
  134. //显示购物车
  135. showCar: false,
  136. showMask:false,
  137. is_switch:false,
  138. }
  139. },
  140. components: {
  141. orderAddcart
  142. },
  143. computed: mapGetters(['isLogin']),
  144. // onLoad(options) {
  145. // this.getAllCategory();
  146. // },
  147. onShow(){
  148. this.getAllCategory()
  149. },
  150. methods: {
  151. updateCart: function(event) {
  152. console.log(event,'我是购物车 ')
  153. },
  154. infoScroll: function() {
  155. let len = this.productList.length;
  156. let child = this.productList[len - 1] && this.productList[len - 1].child ? this.productList[len - 1]
  157. .child : [];
  158. this.number = child ? child.length : 0;
  159. // 设置商品列表高度
  160. let that = this;
  161. uni.getSystemInfo({
  162. success: function(res) {
  163. that.height = (res.windowHeight) * (750 / res.windowWidth) - 98;
  164. },
  165. });
  166. let hightArr = [];
  167. // for (let i = 0; i < len; i++) {
  168. // // 获取元素所在位置
  169. // let query = uni.createSelectorQuery().in(this);
  170. // let idView = "#b" + i;
  171. // query.select(idView).boundingClientRect();
  172. // query.exec(function(res) {
  173. // let top = res[0].top;
  174. // hightArr.push(top);
  175. // that.hightArr = hightArr
  176. // });
  177. // }
  178. },
  179. handleCartList(data){
  180. console.log(data,'222222222222222222222222222222',this.goodsRightList)
  181. this.cartList=data
  182. this.goodsRightList.forEach(goodsItem => {
  183. data.forEach(item => {
  184. if (goodsItem.id === item.spu.id) {
  185. // 找到了匹配的数据,将 selected_goods_num 赋值为 data 中的 count
  186. goodsItem.selected_goods_num = item.count;
  187. // 在这里可以对找到的数据进行其他操作
  188. console.log('Matched item:', goodsItem);
  189. }
  190. });
  191. });
  192. },
  193. isShowMask(){
  194. this.showMask=true
  195. },
  196. tap: function(itemId, index, id) {
  197. console.log('点击了', itemId, id, index)
  198. this.toView = id;
  199. this.navActive = index;
  200. this.getGoodsList(itemId)
  201. },
  202. getGoodsList(id) {
  203. ProductSpuApi.getSpuPage({
  204. categoryId: id,
  205. pageNo: this.page,
  206. pageSize: this.limit
  207. }).then(res => {
  208. this.goodsRightList = res.data.list.map(item => {
  209. return {
  210. ...item,
  211. selected_goods_num: 0
  212. }
  213. })
  214. })
  215. },
  216. getAllCategory: function() {
  217. console.log('这里执行了')
  218. CategoryApi.getCategoryList().then(res => {
  219. this.productList = Util.handleTree(res.data);
  220. console.log(this.productList, 'this.productList')
  221. this.getGoodsList(this.productList[0].id)
  222. setTimeout(() => {
  223. this.infoScroll();
  224. }, 500)
  225. })
  226. },
  227. scroll: function(e) {
  228. let scrollTop = e.detail.scrollTop;
  229. let scrollArr = this.hightArr;
  230. for (let i = 0; i < scrollArr.length; i++) {
  231. if (scrollTop >= 0 && scrollTop < scrollArr[1] - scrollArr[0]) {
  232. this.navActive = 0
  233. } else if (scrollTop >= scrollArr[i] - scrollArr[0] && scrollTop < scrollArr[i + 1] - scrollArr[
  234. 0]) {
  235. this.navActive = i
  236. } else if (scrollTop >= scrollArr[scrollArr.length - 1] - scrollArr[0]) {
  237. this.navActive = scrollArr.length - 1
  238. }
  239. }
  240. },
  241. searchSubmitValue: function(e) {
  242. if (this.$util.trim(e.detail.value).length > 0) {
  243. uni.navigateTo({
  244. url: '/pages/goods_list/index?searchValue=' + e.detail.value
  245. })
  246. } else {
  247. return this.$util.Tips({
  248. title: '请填写要搜索的产品信息'
  249. });
  250. }
  251. },
  252. fen2yuan(price) {
  253. return Util.fen2yuan(price)
  254. },
  255. // 去详情页
  256. godDetail(item) {
  257. goShopDetail(item, this.uid).then(res => {
  258. uni.navigateTo({
  259. url: `/pages/goods_details/index?id=${item.id}`
  260. })
  261. })
  262. },
  263. addGoods(id, index) {
  264. // 未登录,需要跳转
  265. if (!this.isLogin) {
  266. toLogin();
  267. return;
  268. }
  269. // // 库存不足
  270. // let sku = this.attr.productSelect;
  271. // if (sku.stock === 0) {
  272. // return that.$util.Tips({
  273. // title: "产品库存不足,请选择其它"
  274. // });
  275. // }
  276. // 添加购物车
  277. TradeCartApi.addCart({
  278. count: 1,
  279. skuId: id,
  280. }).then(res => {
  281. console.log('我进拉了', index, this.goodsRightList, )
  282. // console.log(this.goodsRightList[index].selected_goods_num, 888)
  283. // this.$set(this.goodsRightList[index],'selected_goods_num')
  284. // this.goodsRightList[index].selected_goods_num++
  285. this.$set(this.goodsRightList[index], 'selected_goods_num', this.goodsRightList[index].selected_goods_num + 1);
  286. // console.log(this.goodsRightList[index].selected_goods_num,'我是购物车的数量')
  287. // // 关闭 attr 组件
  288. // this.attr.cartAttr = false;
  289. // 提示成功
  290. this.$util.Tips({
  291. title: "添加购物车成功",
  292. success: () => {
  293. this.$refs.orderAddcart.getCartList()
  294. }
  295. });
  296. }).catch(res => {
  297. this.$util.Tips({
  298. title: res
  299. });
  300. });
  301. },
  302. CartNumDes: function(id) {
  303. console.log('我减少了',id,this.cartList)
  304. const index = this.cartList.findIndex(item => item.spu.id === id);
  305. this.$refs.orderAddcart.subCart(index)
  306. },
  307. CartNumAdd(id) {
  308. console.log('我增加了',id,this.cartList)
  309. const index = this.cartList.findIndex(item => item.spu.id === id);
  310. this.$refs.orderAddcart.addCart(index)
  311. },
  312. //显示购物车
  313. showShoppingCar(){
  314. // if(this.goodsTotalNumber == 0){
  315. // return;
  316. // }
  317. // this.footHeight = '100%';
  318. this.showCar = true;
  319. // this.carGoodsScrollTop = 0;
  320. },
  321. //隐藏购物车
  322. hideShoppingCar(){
  323. // this.footHeight = '0';
  324. this.$refs.orderAddcart.showCartList = false;
  325. this.showMask=false
  326. },
  327. hideMask(){
  328. this.$refs.orderAddcart.showCartList = false;
  329. this.showMask=false
  330. }
  331. }
  332. }
  333. </script>
  334. <style scoped lang="scss">
  335. .cart-box{
  336. display: flex;
  337. justify-content: flex-start;
  338. flex-flow: column;
  339. background: #ffffff;
  340. position: absolute;
  341. bottom: 0;
  342. z-index: 8;
  343. max-height: 66%;
  344. padding-bottom: 48px;
  345. border-top-left-radius: 16px;
  346. border-top-right-radius: 16px;
  347. overflow: hidden;
  348. width: 100%;
  349. }
  350. .zz{
  351. position: absolute;
  352. top: 0;
  353. left: 0;
  354. right: 0;
  355. bottom: 0;
  356. background-color: rgba(0,0,0,.7);
  357. z-index: 1;
  358. }
  359. .productSort .header {
  360. width: 100%;
  361. height: 96rpx;
  362. background-color: #fff;
  363. position: fixed;
  364. left: 0;
  365. right: 0;
  366. top: 0;
  367. z-index: 9;
  368. border-bottom: 1rpx solid #f5f5f5;
  369. }
  370. .productSort .header .input {
  371. width: 700rpx;
  372. height: 60rpx;
  373. background-color: #f5f5f5;
  374. border-radius: 50rpx;
  375. box-sizing: border-box;
  376. padding: 0 25rpx;
  377. }
  378. .productSort .header .input .iconfont {
  379. font-size: 26rpx;
  380. color: #555;
  381. }
  382. .productSort .header .input .placeholder {
  383. color: #999;
  384. }
  385. .productSort .header .input input {
  386. font-size: 26rpx;
  387. height: 100%;
  388. width: 597rpx;
  389. }
  390. .productSort .aside {
  391. position: fixed;
  392. width: 180rpx;
  393. left: 0;
  394. top: 0;
  395. background-color: #f7f7f7;
  396. overflow-y: scroll;
  397. overflow-x: hidden;
  398. height: auto;
  399. /* #ifdef MP */
  400. margin-top: 96rpx;
  401. /* #endif */
  402. /* #ifdef APP-PLUS || H5 */
  403. margin-top: calc(96rpx + var(--status-bar-height));
  404. /* #endif */
  405. }
  406. .productSort .aside .item {
  407. height: 100rpx;
  408. width: 100%;
  409. font-size: 26rpx;
  410. color: #424242;
  411. }
  412. .productSort .aside .item.on {
  413. background-color: #fff;
  414. border-left: 4rpx solid #fc4141;
  415. width: 100%;
  416. text-align: center;
  417. color: #fc4141;
  418. font-weight: bold;
  419. }
  420. .productSort .conter {
  421. /* #ifdef MP */
  422. margin: 96rpx 0 0 180rpx;
  423. /* #endif */
  424. /* #ifdef APP-PLUS || H5 */
  425. margin: calc(96rpx + var(--status-bar-height)) 0 0 180rpx;
  426. /* #endif */
  427. padding: 0 14rpx;
  428. background-color: #fff;
  429. }
  430. .productSort .conter .listw {
  431. // padding-top: 20rpx;
  432. }
  433. .productSort .conter .listw .title {
  434. height: 90rpx;
  435. }
  436. .productSort .conter .listw .title .line {
  437. width: 100rpx;
  438. height: 2rpx;
  439. background-color: #f0f0f0;
  440. }
  441. .productSort .conter .listw .title .name {
  442. font-size: 28rpx;
  443. color: #333;
  444. margin: 0 30rpx;
  445. font-weight: bold;
  446. }
  447. .productSort .conter .list {
  448. flex-wrap: wrap;
  449. }
  450. .productSort .conter .list .item {
  451. // width: 177rpx;
  452. // margin-top: 26rpx;
  453. }
  454. .productSort .conter .list .item .picture {
  455. width: 120rpx;
  456. height: 120rpx;
  457. border-radius: 50%;
  458. }
  459. .productSort .conter .list .item .picture image {
  460. width: 100%;
  461. height: 100%;
  462. border-radius: 50%;
  463. div {
  464. background-color: #f7f7f7;
  465. }
  466. }
  467. .productSort .conter .list .item .name {
  468. font-size: 24rpx;
  469. color: #333;
  470. height: 56rpx;
  471. line-height: 56rpx;
  472. width: 120rpx;
  473. text-align: center;
  474. }
  475. .productSort .conter .listw .list {
  476. padding: 0 30rpx 0 0;
  477. }
  478. .productSort .conter .listw .list.on {
  479. border-radius: 14rpx;
  480. margin-top: 0 !important;
  481. background-color: #fff;
  482. padding: 40rpx 0 0 0;
  483. // margin: 20rpx 0;
  484. // background-color: #fff;
  485. }
  486. .productSort .conter .listw .list .item {
  487. // width: 335rpx;
  488. background-color: #fff;
  489. border-radius: 14rpx;
  490. margin-bottom: 20rpx;
  491. }
  492. .productSort .conter .listw .list .item.on {
  493. width: 100%;
  494. display: flex;
  495. padding: 0 0 50rpx 24rpx;
  496. margin: 0;
  497. border-radius: 14rpx;
  498. }
  499. .productSort .conter .listw .list .item .pictrue {
  500. position: relative;
  501. width: 100%;
  502. height: 335rpx;
  503. }
  504. .productSort .conter .listw .list .item .pictrue.on {
  505. width: 180rpx;
  506. height: 180rpx;
  507. }
  508. .productSort .conter .listw .list .item .pictrue image {
  509. width: 100%;
  510. height: 100%;
  511. border-radius: 20rpx 20rpx 0 0;
  512. }
  513. .productSort .conter .listw .list .item .pictrue image.on {
  514. border-radius: 6rpx;
  515. }
  516. .productSort .conter .listw .list .item .text {
  517. padding: 18rpx 20rpx;
  518. font-size: 30rpx;
  519. color: #222;
  520. }
  521. .productSort .conter .listw .list .item .text.on {
  522. // width: 456rpx;
  523. flex: 1;
  524. padding: 0 0 0 20rpx;
  525. }
  526. .productSort .conter .listw .list .item .text .money {
  527. width: 100%;
  528. font-size: 26rpx;
  529. font-weight: bold;
  530. margin-top: 8rpx;
  531. display: flex;
  532. align-items: center;
  533. justify-content: space-between;
  534. }
  535. .productSort .conter .listw .list .item .text .money.on {
  536. margin-top: 50rpx;
  537. }
  538. .productSort .conter .listw .list .item .text .money .num {
  539. font-size: 28rpx;
  540. }
  541. .productSort .conter .listw .list .item .text .money .carnum {
  542. // height: 54rpx;
  543. // margin-top: 24rpx;
  544. display: flex;
  545. align-items: center;
  546. }
  547. .productSort .conter .listw .list .item .text .money .carnum view {
  548. // border: 1px solid #a4a4a4;
  549. // width: 84rpx;
  550. text-align: center;
  551. height: 100%;
  552. line-height: 54rpx;
  553. color: #282828;
  554. font-size: 45rpx;
  555. margin-left: 10rpx;
  556. }
  557. .productSort .conter .listw .list .item .text .money .carnum .reduce {
  558. border-right: 0;
  559. border-radius: 6rpx 0 0 6rpx;
  560. line-height: 48rpx;
  561. width: 50rpx;
  562. }
  563. .productSort .conter .listw .list .item .text .money .carnum .reduce.on {
  564. // border-color: #e3e3e3;
  565. color: #DEDEDE;
  566. font-size: 44rpx;
  567. }
  568. .productSort .conter .listw .list .item .text .money .carnum .plus {
  569. border-left: 0;
  570. border-radius: 0 6rpx 6rpx 0;
  571. line-height: 46rpx;
  572. width: 50rpx;
  573. }
  574. .productSort .conter .listw .list .item .text .money .carnum .plus.on {
  575. border-color: #e3e3e3;
  576. color: #dedede;
  577. }
  578. .productSort .conter .listw .list .item .text .money .carnum .num {
  579. background: rgba(242, 242, 242, 1);
  580. color: #282828;
  581. font-size: 28rpx;
  582. border-radius: 12rpx;
  583. line-height: 29px;
  584. height: 54rpx;
  585. width: 80rpx;
  586. // margin: 0 20rpx;
  587. input {
  588. display: -webkit-inline-box;
  589. }
  590. }
  591. .productSort .conter .listw .list .item .text .money .circle {
  592. width: 40rpx;
  593. height: 40rpx;
  594. background-color: #E93323;
  595. border-radius: 50%;
  596. display: flex;
  597. justify-content: center;
  598. // align-items: center;
  599. color: white;
  600. font-size: 14px;
  601. }
  602. .productSort .conter .listw .list .item .text .vip {
  603. font-size: 22rpx;
  604. color: #aaa;
  605. margin-top: 7rpx;
  606. }
  607. .productSort .conter .listw .list .item .text .vip.on {
  608. margin-top: 12rpx;
  609. }
  610. .productSort .conter .listw .list .item .text .vip .vip-money {
  611. font-size: 24rpx;
  612. color: #282828;
  613. font-weight: bold;
  614. }
  615. .productSort .conter .listw .list .item .text .vip .vip-money image {
  616. width: 46rpx;
  617. height: 21rpx;
  618. margin-left: 4rpx;
  619. }
  620. .footer {
  621. z-index: 9;
  622. width: 100%;
  623. // height: 100rpx;
  624. // background-color: red;
  625. height: 100rpx;
  626. color: #fff;
  627. background-color: #313131;
  628. border-radius: 49rpx;
  629. position: fixed;
  630. padding: 0 24rpx;
  631. box-sizing: border-box;
  632. border-top: 1rpx solid #eee;
  633. // border-bottom: 1px solid #EEEEEE;
  634. /* #ifdef H5 */
  635. bottom: 98rpx;
  636. /* #endif */
  637. /* #ifdef MP */
  638. bottom: 0;
  639. /* #endif */
  640. /* #ifndef MP */
  641. // bottom: 98rpx;
  642. // bottom: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  643. // bottom: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  644. /* #endif */
  645. }
  646. .footer .checkAll {
  647. font-size: 28rpx;
  648. color: #282828;
  649. margin-left: 14rpx;
  650. }
  651. .footer .money {
  652. font-size: 30rpx;
  653. color: #fff;
  654. width: 100%;
  655. display: flex;
  656. justify-content: space-between;
  657. }
  658. .footer .zz{
  659. position: absolute;
  660. top: 0;
  661. left: 0;
  662. right: 0;
  663. bottom: 0;
  664. background-color: rgba(0,0,0,.7);
  665. z-index: 1;
  666. }
  667. .footer .placeOrder {
  668. color: #fff;
  669. font-size: 30rpx;
  670. width: 226rpx;
  671. height: 70rpx;
  672. border-radius: 50rpx;
  673. text-align: center;
  674. line-height: 70rpx;
  675. margin-left: 22rpx;
  676. background-color: #EC3534;
  677. }
  678. .footer .button .bnt {
  679. font-size: 28rpx;
  680. color: #999;
  681. border-radius: 50rpx;
  682. border: 1px solid #999;
  683. width: 160rpx;
  684. height: 60rpx;
  685. text-align: center;
  686. line-height: 60rpx;
  687. }
  688. .footer .button form~form {
  689. margin-left: 17rpx;
  690. }
  691. </style>