Jelajahi Sumber

余额支付

panhui 3 tahun lalu
induk
melakukan
7a4a2bf7e8
1 mengubah file dengan 20 tambahan dan 2 penghapusan
  1. 20 2
      src/views/Submit.vue

+ 20 - 2
src/views/Submit.vue

@@ -51,7 +51,25 @@
                 <!-- <wx-open-launch-weapp id="launch-btn" :username="launchName" :path="launchPath"> </wx-open-launch-weapp> -->
                 <!-- <wx-open-launch-weapp id="launch-btn" :username="launchName" :path="launchPath"> </wx-open-launch-weapp> -->
             </div>
             </div>
         </div>
         </div>
-        <pay-balance v-model:tradeCode="tradeCode" @pay="pay" ref="payBalance"></pay-balance>
+        <van-number-keyboard v-model="tradeCode" :show="showKeyboard" @blur="showKeyboard = false" />
+        <van-dialog
+            v-model:show="showPwdDialog"
+            title="请输入支付密码"
+            confirmButtonText="立即支付"
+            show-cancel-button
+            confirmButtonColor="#3ab200"
+            @cancel="(showPwdDialog = false), $toast.clear()"
+            @confirm="pay"
+        >
+            <div style="padding: 20px 0">
+                <van-password-input
+                    :value="tradeCode"
+                    :focused="showKeyboard"
+                    @focus="showKeyboard = true"
+                    gutter="4px"
+                />
+            </div>
+        </van-dialog>
     </div>
     </div>
 </template>
 </template>
 
 
@@ -428,7 +446,7 @@ export default {
             } else if (this.payType === 'BALANCE') {
             } else if (this.payType === 'BALANCE') {
                 if (!this.tradeCode) {
                 if (!this.tradeCode) {
                     this.$toast.clear();
                     this.$toast.clear();
-                    this.$refs.payBalance.show();
+                    this.showPwdDialog = true;
                     return;
                     return;
                 }
                 }
                 this.$toast.loading({
                 this.$toast.loading({