bianjiang 1 year ago
parent
commit
77f886eb94

+ 1 - 0
src/comm/controllers/deviceCtrl.ts

@@ -96,6 +96,7 @@ export class DeviceController extends Controller {
     this.appDataDir = await this.GetAppDataDir();
     const httpServer = await this.StartHttpServer(`${this.appDataDir}/screen`);
     this.httpServer = httpServer.substring(0, httpServer.length - 1);
+
     console.log("current app profile=>", this.profile);
   }
 

+ 1 - 2
src/modules/list/actions/canvas.ts

@@ -9,7 +9,7 @@ export default ListModule.action({
     const totalLines = this.store.animate.totalLines;
     const scrollType = this.store.animate.scrollType;
     const items = await this.actions.loadData();
-    if (!items) {
+    if (!items.length) {
       return;
     }
     const scale = Math.max(devicePixelRatio, 2);
@@ -21,7 +21,6 @@ export default ListModule.action({
       padding: this.store.animate.padding * scale,
       linesCount: Math.ceil(items.length / totalLines) * 2,
     };
-    console.log(canvas);
     this.store.canvas = { ...this.store.canvas, ...canvas };
 
     if (scrollType == "vertical") {

+ 2 - 2
src/modules/list/actions/load.ts

@@ -82,8 +82,8 @@ export default ListModule.action({
     const meshId = item.meshId;
     if (!meshId) return;
 
-    const ret:any = await this.https.loadLocal(deviceCtrl.httpServer + meshId);
-    console.log("loadPack3d",ret);
+    const ret: any = await this.https.loadLocal(deviceCtrl.httpServer + meshId);
+    console.log("loadPack3d", ret);
 
     return ret;
   },

+ 1 - 1
src/pages/App.tsx

@@ -16,7 +16,7 @@ const App = defineComponent(() => {
   });
 
   try {
-    InitControllers().then(() => {
+    InitControllers().then(() => {     
       state.loading = false;
     });
   } catch (error) {

+ 1 - 2
src/pages/website/routes/home/index.tsx

@@ -14,7 +14,7 @@ export default defineComponent({
 
     const rootRef = ref<HTMLElement>();
 
-    onMounted(() => {
+    onMounted(() => {     
       actions.on("getAssetList:success", async () => {
         const res = await actions.initListCanvasData(
           rootRef.value?.clientWidth as number,
@@ -25,7 +25,6 @@ export default defineComponent({
         }
         actions.startListRunning(canvasRef.value);
       });
-
       actions.getAssetList(true);
     });