|
@@ -7,34 +7,30 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<div>{{ user.nickName }}</div>
|
|
<div>{{ user.nickName }}</div>
|
|
|
- <div>余额:¥{{ form.money }}</div>
|
|
|
|
|
|
|
+ <div>余额:¥{{ balance }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="info_1"><span>充值</span><span>></span></div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { getUserProfile } from '@/api/system/user.js'
|
|
import { getUserProfile } from '@/api/system/user.js'
|
|
|
-import { getInfo } from '@/api/svc/user'
|
|
|
|
|
|
|
+import { getBalance } from '@/api/svc/user'
|
|
|
import { onMounted } from 'vue';
|
|
import { onMounted } from 'vue';
|
|
|
|
|
|
|
|
const user = ref({})
|
|
const user = ref({})
|
|
|
-const form = ref({})
|
|
|
|
|
|
|
|
|
|
-async function init() {
|
|
|
|
|
- await getUserProfile().then(res => {
|
|
|
|
|
- console.log(res);
|
|
|
|
|
|
|
+const balance = ref(0)
|
|
|
|
|
+
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ getUserProfile().then(res=>{
|
|
|
user.value = res.data
|
|
user.value = res.data
|
|
|
})
|
|
})
|
|
|
- await getInfo(user.value.userId).then(res => {
|
|
|
|
|
- console.log(res);
|
|
|
|
|
- form.value = res.data
|
|
|
|
|
|
|
+ getBalance().then(res=>{
|
|
|
|
|
+ balance.value = res.data
|
|
|
})
|
|
})
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-onMounted(() => {
|
|
|
|
|
- init()
|
|
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
@@ -65,4 +61,13 @@ onMounted(() => {
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+.info_1{
|
|
|
|
|
+ background-color: #FFF;
|
|
|
|
|
+ margin-top: 10px;
|
|
|
|
|
+ padding: 5px;
|
|
|
|
|
+ border-radius: 5px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|