修复有时捐赠金额显示不出来的问题
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, watch } from "vue";
|
import { ref, reactive, watch, onMounted } from "vue";
|
||||||
|
import { getAppConfig, donateAPI } from "@/apis";
|
||||||
import { donateAPI } from "@/apis";
|
|
||||||
import useStore from "@/store";
|
import useStore from "@/store";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const { config } = storeToRefs(store);
|
const { config } = storeToRefs(store);
|
||||||
|
const { updateConfig } = store;
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
show: {
|
show: {
|
||||||
@@ -82,6 +82,13 @@ watch(
|
|||||||
formData.suggestion = "";
|
formData.suggestion = "";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
if (!config.value.donateAmount) {
|
||||||
|
const config = await getAppConfig();
|
||||||
|
updateConfig(config);
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -137,10 +137,6 @@ onMounted(async () => {
|
|||||||
</view>
|
</view>
|
||||||
<view :style="{ marginBottom: '20px' }">
|
<view :style="{ marginBottom: '20px' }">
|
||||||
<SButton :rounded="50" :onClick="toEditPage">下一步</SButton>
|
<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>
|
</view>
|
||||||
</Container>
|
</Container>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user