@dongkboy 1 mese fa
parent
commit
26e0780431
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 6 1
      pages/wallet/myWallet.vue

+ 6 - 1
pages/wallet/myWallet.vue

@@ -364,6 +364,9 @@
 					userId: item.userInfoId,
 					id: item.id,
 				});
+				if (res.code == 200) {
+					this.getcardPack();
+				}
 			},
 			//跳转添加银行卡
 			addBankCard() {
@@ -398,12 +401,14 @@
 			 * @param {Boolean} val - 单选按钮的选中状态
 			 */
 			async setDefaultCard(val, item) {
-				console.log(item);
 				this.defaultCard = val;
 				let res = await this.$http.post('/userBankCard/setDefaultCard', {
 					userId: item.userInfoId,
 					id: item.id,
 				});
+				if (res.code == 200) {
+					this.getcardPack();
+				}
 				// 实际项目这里应调用API更新默认卡
 			},
 			async getcardPack() {