Browse Source

H5-支付方式选择组件化

panyong 3 years ago
parent
commit
71329cd3b4
1 changed files with 58 additions and 3 deletions
  1. 58 3
      htmldev/dashboard/src/views/sell/pay/index.vue

+ 58 - 3
htmldev/dashboard/src/views/sell/pay/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="pay-detail">
     <div class="order-status">
       <p>待支付</p>
       <p>取消订单</p>
@@ -38,17 +38,24 @@
         <p class="label">¥2700</p>
       </li>
     </ul>
-    <payment @onChange="handlePayment"/>
+    <payment class="margin-top-20"
+             @onChange="handlePayment"/>
+    <div class="footer">
+      <p class="price">¥2700</p>
+      <van-button class="btn" type="warning">去结算</van-button>
+    </div>
   </div>
 </template>
 
 <script>
 import payment from '../../common/payment'
+import { Button } from 'vant'
 
 export default {
   name: 'index',
   components: {
-    payment
+    payment,
+    'van-button': Button
   },
   data () {
     return {
@@ -64,6 +71,14 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.pay-detail {
+  padding-bottom: 68px;
+}
+
+.margin-top-20 {
+  margin-top: 20px;
+}
+
 .order-status {
   display: flex;
   justify-content: space-between;
@@ -179,4 +194,44 @@ export default {
     color: #D32323;
   }
 }
+
+.footer {
+  position: fixed;
+  left: 0;
+  bottom: 0;
+  right: 0;
+  z-index: 50;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  width: 100%;
+  height: 68px;
+  padding: 0 20px;
+  background: #FFFFFF;
+  box-shadow: 0 -2px 4px 0 rgba(13, 13, 13, 0.03);
+
+  .price {
+    font-size: 21px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+    color: #D32323;
+    line-height: 29px;
+  }
+}
+
+.btn {
+  width: 124px;
+  height: 40px;
+  background: #D32323;
+  border-radius: 25px;
+  border: none;
+
+  ::v-deep .van-button__text {
+    font-size: 16px;
+    font-family: PingFangSC-Semibold, PingFang SC;
+    font-weight: 600;
+    color: #FFFFFF;
+    line-height: 40px;
+  }
+}
 </style>