瀏覽代碼

!97 【功能优化】支付方式默认选中首个可用方式
Merge pull request !97 from Lcp/pr

芋道源码 11 月之前
父節點
當前提交
55131bf0c3
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      pages/pay/index.vue

+ 6 - 0
pages/pay/index.vue

@@ -174,6 +174,12 @@
       return
       return
     }
     }
     state.payMethods = getPayMethods(data)
     state.payMethods = getPayMethods(data)
+    state.payMethods.find(item => {
+      if (item.value && !item.disabled) {
+        state.payment = item.value;
+        return true;
+      }
+    });
   }
   }
 
 
   onLoad((options) => {
   onLoad((options) => {