浏览代码

查余额调用优化

lifanagju_citu 9 月之前
父节点
当前提交
118157bcc9

+ 6 - 5
src/components/pay/index.vue

@@ -284,10 +284,10 @@ const payStatus = async () => {
       // 支付成功
       if (timer.value) clearInterval(timer.value); timer.value = null
       setTimeout(() => {
-        // 更新点数(充值、发布职位) 非点数支付时点充值
-        if (!showRecharge.value) updateAccountInfo()
+        // 更新点数(充值、发布职位)
+        updateAccountInfo()
         // 支付成功
-        emit('paySuccess', isWalletPay.value)
+        emit('paySuccess')
         // 返回指定页面
         if (route.fullPath === props.returnUrl) router.go(0)
         else if (props.returnUrl) router.push(props.returnUrl)
@@ -304,9 +304,10 @@ const handleRechargeClose = () => {
   loading.value = false
 }
 
+// 点数发生支付时点充值
 const RechargePaySuccess = () => {
   showRecharge.value = false
-  updateAccountInfo()
+  // updateAccountInfo()
 }
 
 const handleRecharge = () => {
@@ -319,7 +320,7 @@ const updateAccountInfo = async (init = false) => {
   if (init) return
   loading.value = false
 }
-if ((props.appId - 0) !== 11) updateAccountInfo(true) // 充值前不查余额
+if ((props.appId - 0) !== 11) updateAccountInfo(true) // 点数发生支付时点充值-充值不查余额
 
 </script>
 <style lang="scss" scoped>

+ 1 - 1
src/views/recruit/enterprise/memberCenter/myMembers/components/pointsAndBalance.vue

@@ -148,7 +148,7 @@ const handleRecharge = (item) => {
 // 支付成功
 const paySuccess = async () => {
   showConfirmPaymentDialog.value = false
-  emits('paySuccess')
+  emits('paySuccess', 'CtDialogRecharge')
 }