Pārlūkot izejas kodu

集成vant和各环境配置设置

songxy 1 gadu atpakaļ
vecāks
revīzija
5a8802a871

+ 1 - 0
client_h5/.env.dev

@@ -0,0 +1 @@
+VITE_BASE_URL='http://10.10.10.7:48080/'

+ 1 - 0
client_h5/.env.pro

@@ -0,0 +1 @@
+VITE_BASE_URL='http://10.10.10.7:48080/'

+ 9 - 2
client_h5/package.json

@@ -4,14 +4,21 @@
   "version": "0.0.0",
   "type": "module",
   "scripts": {
-    "dev": "vite",
-    "build": "vue-tsc && vite build",
+    "start": "npm run dev",
+    "local": "vite --mode local",
+    "dev": "vite --mode dev",
+    "pro": "vite --mode pro",
+    "build": "npm run build:dev",
+    "build:local": "vue-tsc && vite build --mode local",
+    "build:dev": "vue-tsc && vite build --mode dev",
+    "build:prod": "vue-tsc && vite build --mode pro",
     "preview": "vite preview"
   },
   "dependencies": {
     "axios": "^1.6.8",
     "dingtalk-jsapi": "^3.0.33",
     "pinia": "^2.1.7",
+    "vant": "^4.8.11",
     "vue": "^3.4.19",
     "vue-router": "^4.2.5"
   },

+ 5 - 0
client_h5/src/main.ts

@@ -1,4 +1,8 @@
 import { createApp } from 'vue'
+// 1. 引入你需要的组件
+import vant from 'vant';
+// 2. 引入组件样式
+import 'vant/lib/index.css';
 import { setupStore } from '@/stores'
 import setupRouter from './router'
 import './style.css'
@@ -7,6 +11,7 @@ import App from './App.vue'
 
 const setupAll = () => {
   const app = createApp(App)
+  app.use(vant)
   setupStore(app)
   setupRouter(app)
   return app;

+ 1 - 0
client_h5/src/pages/home/index.vue

@@ -1,6 +1,7 @@
 <script setup lang="ts">
 import { useUserStoreWithOut } from "@/stores/modules/user";
 import { getAssetsURI } from "@/utils/common";
+import { ref } from "vue";
 
 const userStore = useUserStoreWithOut();
 

+ 0 - 8
client_h5/src/router/routes.ts

@@ -13,14 +13,6 @@ const routes: RouteRecordRaw[] = [
         },
         component: () => import("@/pages/home/index.vue"),
       },
-      {
-        path: "daily",
-        name: "Daily",
-        meta: {
-          title: "日报填写",
-        },
-        component: () => import("@/pages/logs/Daily/index.vue"),
-      },
     ] as RouteRecordRaw[],
   },
 ] as RouteRecordRaw[];

+ 1 - 1
client_h5/src/utils/request.ts

@@ -2,7 +2,7 @@ import axios from 'axios';
  
  
 const defaultConfig = {
-  baseURL:'http://10.10.10.7:48080/'
+  baseURL: import.meta.env.VITE_BASE_URL
 };
  
 const instance = axios.create(Object.assign({}, defaultConfig));

+ 4 - 1
zjugis-business/src/main/resources/templates/Leave/js/mobileIndex.js

@@ -31,7 +31,10 @@
             var rowDom = generateCardHtml({}, index, uuid);
             $(".table_box_list").append(rowDom);
             z.ui.datetime("[name='createReqVO$startTime_"+uuid+"']").init({
-                done: function(val){
+                onSuccess: function(val){
+
+                },
+                onFail: function(err){
 
                 }
             });