Explorar o código

加气量上限从接口获取

chenlei hai 1 ano
pai
achega
006e1e61ee
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      src/App.vue

+ 10 - 0
src/App.vue

@@ -1,5 +1,15 @@
 <script setup lang="ts">
 onLaunch(async () => {
+  await webapi.strategy
+    .get_by_Name<null, SystemConfig对象>({
+      // 加气量上限
+      name: 'gas_limit',
+    })
+    .then((res) => {
+      if (res?.value && Number(res.value)) {
+        store.common.data.preferWeight = Number(res.value)
+      }
+    })
   // #ifdef MP
   // store.common.data.mockScenes = ''
   // // 容器中心需要等待的等待放行器