Compare commits

..

2 Commits

Author SHA1 Message Date
wxy b603b06f05 Merge remote-tracking branch 'origin/master' 2024-08-25 11:52:25 +08:00
wxy 95b3db2f10 ```feat(user): 添加导航至充值页面的按钮
用户余额页面现在包含一个“充值”按钮,点击后将导向充值页面,以提升用户交互体验。
```
2024-08-25 11:52:08 +08:00
1 changed files with 4 additions and 1 deletions

View File

@ -3,11 +3,11 @@
<el-card style="margin-top: 50px;">
<h1>用户余额</h1>
<p>余额{{ userBalanceData.userBalance || '加载中...' }}</p>
<el-button type="primary" @click="navigateToRecharge"></el-button>
</el-card>
</div>
</template>
<script>
import { userBalance } from "@/api/system/user"; // userBalance@/api/money
@ -23,6 +23,9 @@ export default {
this.fetchUserBalance();
},
methods: {
navigateToRecharge() {
this.$router.push('/money/zfb');
},
async fetchUserBalance() {
try {
const userId = localStorage.getItem('userId');