Просмотр исходного кода

feat:修复订单列表一键支付、余额不显示问题

LuoDLeo 2 лет назад
Родитель
Сommit
49af4bcc10
2 измененных файлов с 9 добавлено и 4 удалено
  1. 5 3
      orderPages/orderDetail/index.vue
  2. 4 1
      pages/order/index.vue

+ 5 - 3
orderPages/orderDetail/index.vue

@@ -277,11 +277,12 @@ export default {
     onLoad(e) {
     onLoad(e) {
         this.orderId = e.id
         this.orderId = e.id
         this.getOrderDetailByOrderId(e.id)
         this.getOrderDetailByOrderId(e.id)
-        this.userInfo = uni.getStorageSync('userInfo')
-
+        this.getUserInfo();
     },
     },
     methods: {
     methods: {
-
+      getUserInfo() {
+        this.userInfo = uni.getStorageSync('userInfo');
+      },
         balancePay(){
         balancePay(){
 
 
             let that = this;
             let that = this;
@@ -361,6 +362,7 @@ export default {
         },
         },
 
 
         qenPayInfo(){
         qenPayInfo(){
+          this.getUserInfo();
             let orderServiceIds = []
             let orderServiceIds = []
             this.order.child.forEach(i=>{
             this.order.child.forEach(i=>{
                 if (i.tick){
                 if (i.tick){

+ 4 - 1
pages/order/index.vue

@@ -206,7 +206,9 @@
 
 
 		methods: {
 		methods: {
 
 
-
+      getUserInfo() {
+        this.userInfo = uni.getStorageSync('userInfo');
+      },
 
 
 			balancePay(){
 			balancePay(){
 
 
@@ -246,6 +248,7 @@
 			},
 			},
 
 
 			openPay(order){
 			openPay(order){
+        this.getUserInfo();
 				this.$api.oneClickPay({
 				this.$api.oneClickPay({
 					orderId:order.orderId
 					orderId:order.orderId
 				}).then(res=>{
 				}).then(res=>{