修复有时捐赠金额显示不出来的问题
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<script setup>
|
||||
import { ref, reactive, watch } from "vue";
|
||||
|
||||
import { donateAPI } from "@/apis";
|
||||
import { ref, reactive, watch, onMounted } from "vue";
|
||||
import { getAppConfig, donateAPI } from "@/apis";
|
||||
import useStore from "@/store";
|
||||
import { storeToRefs } from "pinia";
|
||||
const store = useStore();
|
||||
const { config } = storeToRefs(store);
|
||||
const { updateConfig } = store;
|
||||
|
||||
const props = defineProps({
|
||||
show: {
|
||||
@@ -82,6 +82,13 @@ watch(
|
||||
formData.suggestion = "";
|
||||
}
|
||||
);
|
||||
|
||||
onMounted(async () => {
|
||||
if (!config.value.donateAmount) {
|
||||
const config = await getAppConfig();
|
||||
updateConfig(config);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -137,10 +137,6 @@ onMounted(async () => {
|
||||
</view>
|
||||
<view :style="{ marginBottom: '20px' }">
|
||||
<SButton :rounded="50" :onClick="toEditPage">下一步</SButton>
|
||||
<view class="see-more" @click="toListPage">
|
||||
<text>历史计分记录</text>
|
||||
<image src="../static/enter-arrow-blue.png" mode="widthFix" />
|
||||
</view>
|
||||
</view>
|
||||
</Container>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user