瀏覽代碼

Merge branch 'master' of http://gogs.chelvc.com/Tim_Walker/chelvc-custom

liude 1 年之前
父節點
當前提交
af04776c63

+ 5 - 1
src/components/settleBottomBtn/settleBottomBtn.vue

@@ -30,6 +30,10 @@
       goodsCateList: {
       goodsCateList: {
         type: Array,
         type: Array,
         default: []
         default: []
+      },
+      ids:{
+        type:String,
+        default:''
       }
       }
     },
     },
     computed: {
     computed: {
@@ -67,7 +71,7 @@
           wx.hideLoading()
           wx.hideLoading()
           this.goodsCateList = []
           this.goodsCateList = []
           uni.navigateTo({
           uni.navigateTo({
-          	url:"/pages/client/clientPackage/uptickOrder"
+          	url:`/pages/client/clientPackage/uptickOrder?ids=${this.ids}`
           })
           })
         },1500)
         },1500)
       }
       }

+ 6 - 0
src/pages.json

@@ -115,6 +115,12 @@
             "navigationBarTitleText": "提交订单"
             "navigationBarTitleText": "提交订单"
           }
           }
         },
         },
+        {
+          "path": "settleStatusPage",
+          "style": {
+            "navigationBarTitleText": "支付"
+          }
+        },
         {
         {
           "path": "orderAll",
           "path": "orderAll",
           "style": {
           "style": {

+ 0 - 1
src/pages/client/clientPackage/orderAll.vue

@@ -43,7 +43,6 @@ export default {
       init_list: [],
       init_list: [],
     };
     };
   },
   },
-
   mounted() {
   mounted() {
     this.userOrdersPage();
     this.userOrdersPage();
   },
   },

+ 76 - 0
src/pages/client/clientPackage/settleStatusPage.vue

@@ -0,0 +1,76 @@
+<template>
+  <view class="container">
+    <view class="pay-box">
+      <image class="pay-img" src="@/static/images/paySuccess.png"></image>
+      <p class="pay-text">支付成功</p>
+    </view>
+
+    <view class="pay-btn-box">
+      <button class='btn btn1' @click='handlerSkipBtn(1)'>返回首页</button>
+      <button class='btn btn2' @click='handlerSkipBtn(2)'>查看订单</button>
+    </view>
+  </view>
+</template>
+
+<script>
+  export default {
+    data(){
+      return{
+
+      }
+    },
+    methods:{
+      handlerSkipBtn(e){
+        switch(e){
+          case 1 :
+            uni.switchTab({
+              url:"/pages/client/tabBar/home/index"
+            })
+          break ;
+          case 2 :
+            uni.switchTab({
+              url:"/pages/client/tabBar/mine/index"
+            })
+          break ;
+        }
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .container{
+    .pay-box{
+      text-align: center;
+      padding-top: 100rpx;
+      .pay-img{
+        width: 160rpx;
+        height: 160rpx;
+        border-radius: 50%;
+      }
+      .pay-text{
+        font-weight: bold;
+        font-size: 42rpx;
+        margin-top: 60rpx;
+      }
+    }
+    .pay-btn-box{
+      display: flex;
+      justify-content: space-evenly;
+      margin-top: 400rpx;
+      .btn{
+        width: 45%;
+        border-radius: 38rpx;
+        font-size:32rpx;
+      }
+      .btn1{
+        background-color: #7785DB;
+        color: #fff;
+      }
+      .btn2{
+        background-color: #FF6201;
+        color: #fff;
+      }
+    }
+  }
+</style>

+ 4 - 2
src/pages/client/clientPackage/storeDetail.vue

@@ -96,7 +96,7 @@
 
 
     <!-- 底部购物车 -->
     <!-- 底部购物车 -->
     <view class="bottom-box">
     <view class="bottom-box">
-      <settleBottomBtn :goodsCateList.sync='goodsCateList'/>
+      <settleBottomBtn :goodsCateList.sync='goodsCateList' :ids='ids'/>
     </view>
     </view>
 
 
     <!-- 弹窗 -->
     <!-- 弹窗 -->
@@ -160,9 +160,11 @@
           appointTime: '',
           appointTime: '',
         },
         },
         template_time: '',
         template_time: '',
+        ids:null // 商家id
       };
       };
     },
     },
     onLoad(option) {
     onLoad(option) {
+      this.ids = option.id
       this.queryParams.id = option.id;
       this.queryParams.id = option.id;
       this.handlerInitLocation();
       this.handlerInitLocation();
     },
     },
@@ -236,7 +238,7 @@
       handlerSkipBuy(item, index) {
       handlerSkipBuy(item, index) {
         this.$store.commit('order/GET_ORDER_LIST', item);
         this.$store.commit('order/GET_ORDER_LIST', item);
         uni.navigateTo({
         uni.navigateTo({
-          url: `/pages/client/clientPackage/uptickOrder?id=${item.id}`,
+          url: `/pages/client/clientPackage/uptickOrder?ids=${this.ids}`,
         });
         });
       },
       },
 
 

+ 13 - 3
src/pages/client/clientPackage/uptickOrder.vue

@@ -175,12 +175,16 @@
         ],
         ],
         init_list:[],
         init_list:[],
         phoneNumber:null ,// 订购电话
         phoneNumber:null ,// 订购电话
-        goodsRemark:'' // 备注
+        goodsRemark:'' ,// 备注
+        merchantId:null
 			}
 			}
 		},
 		},
     mounted(){
     mounted(){
       this.handlerInitList()
       this.handlerInitList()
     },
     },
+    onLoad(option){
+      this.merchantId = option.ids
+    },
     computed: {
     computed: {
       orderParams(){
       orderParams(){
         let price = 0
         let price = 0
@@ -202,18 +206,24 @@
       },
       },
 			// 结算按钮
 			// 结算按钮
 			handlerSettleBtn(){
 			handlerSettleBtn(){
+
+        // uni.navigateTo({
+        //   url:'/pages/client/clientPackage/settleStatusPage'
+        // })
+
         let params = {
         let params = {
           payType:'2',
           payType:'2',
           cartIds:[],
           cartIds:[],
-          merchantId:null
+          merchantId:this.merchantId
         }
         }
         this.init_list.map(rs=>{
         this.init_list.map(rs=>{
           params.cartIds.push(rs.goodsId)
           params.cartIds.push(rs.goodsId)
-          params.merchantId = this.init_list[0].id
         })
         })
         generateOrder(params).then(res=>{
         generateOrder(params).then(res=>{
           console.log("@@@@res",res)
           console.log("@@@@res",res)
         })
         })
+
+
 				// wx.showLoading({
 				// wx.showLoading({
 				//   title: '结算中......',
 				//   title: '结算中......',
 				// })
 				// })

二進制
src/static/images/payFail.png


二進制
src/static/images/paySuccess.png


二進制
src/static/images/payWarning.png