Explorar o código

chore: initial commit

pengjq hai 4 días
pai
achega
4d64d86e5f
Modificáronse 5 ficheiros con 2902 adicións e 2816 borrados
  1. 2 2
      env/.env
  2. 0 2
      package.json
  3. 2799 2711
      pnpm-lock.yaml
  4. 92 92
      src/types/auto-import.d.ts
  5. 9 9
      src/utils/index.ts

+ 2 - 2
env/.env

@@ -10,8 +10,8 @@ VITE_WX_APPID = 'wx63c280fe3248a3e7'
 VITE_APP_PUBLIC_BASE=/
 
 # 后台请求地址
-VITE_SERVER_BASEURL = 'http://localhost:48080/admin-api'
-VITE_UPLOAD_BASEURL = 'http://localhost:48080/upload'
+VITE_SERVER_BASEURL = 'http://yu.dgtis.com/admin-api'
+VITE_UPLOAD_BASEURL = 'http://yu.dgtis.com/upload'
 # 备注:如果后台带统一前缀,则也要加到后面,eg: https://ukw0y1.laf.run/api
 
 # 注意,如果是微信小程序,还有一套请求地址的配置,根据 develop、trial、release 分别设置上传地址,见 `src/utils/index.ts`。

+ 0 - 2
package.json

@@ -133,8 +133,6 @@
     "@dcloudio/uni-cli-shared": "3.0.0-4070620250821001",
     "@dcloudio/uni-stacktracey": "3.0.0-4070620250821001",
     "@dcloudio/vite-plugin-uni": "3.0.0-4070620250821001",
-    "@esbuild/darwin-arm64": "0.20.2",
-    "@esbuild/darwin-x64": "0.20.2",
     "@iconify-json/carbon": "^1.2.4",
     "@iconify/utils": "^3.0.2",
     "@rollup/rollup-darwin-x64": "^4.28.0",

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2799 - 2711
pnpm-lock.yaml


+ 92 - 92
src/types/auto-import.d.ts

@@ -6,98 +6,98 @@
 // biome-ignore lint: disable
 export {}
 declare global {
-  const EffectScope: typeof import('vue')['EffectScope']
-  const computed: typeof import('vue')['computed']
-  const createApp: typeof import('vue')['createApp']
-  const customRef: typeof import('vue')['customRef']
-  const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
-  const defineComponent: typeof import('vue')['defineComponent']
-  const effectScope: typeof import('vue')['effectScope']
-  const getBoolDictOptions: typeof import('../hooks/useDict')['getBoolDictOptions']
-  const getCurrentInstance: typeof import('vue')['getCurrentInstance']
-  const getCurrentScope: typeof import('vue')['getCurrentScope']
-  const getCurrentWatcher: typeof import('vue')['getCurrentWatcher']
-  const getDictLabel: typeof import('../hooks/useDict')['getDictLabel']
-  const getDictObj: typeof import('../hooks/useDict')['getDictObj']
-  const getDictOptions: typeof import('../hooks/useDict')['getDictOptions']
-  const getIntDictOptions: typeof import('../hooks/useDict')['getIntDictOptions']
-  const getStrDictOptions: typeof import('../hooks/useDict')['getStrDictOptions']
-  const h: typeof import('vue')['h']
-  const inject: typeof import('vue')['inject']
-  const isProxy: typeof import('vue')['isProxy']
-  const isReactive: typeof import('vue')['isReactive']
-  const isReadonly: typeof import('vue')['isReadonly']
-  const isRef: typeof import('vue')['isRef']
-  const isShallow: typeof import('vue')['isShallow']
-  const markRaw: typeof import('vue')['markRaw']
-  const nextTick: typeof import('vue')['nextTick']
-  const onActivated: typeof import('vue')['onActivated']
-  const onAddToFavorites: typeof import('@dcloudio/uni-app')['onAddToFavorites']
-  const onBackPress: typeof import('@dcloudio/uni-app')['onBackPress']
-  const onBeforeMount: typeof import('vue')['onBeforeMount']
-  const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
-  const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
-  const onDeactivated: typeof import('vue')['onDeactivated']
-  const onError: typeof import('@dcloudio/uni-app')['onError']
-  const onErrorCaptured: typeof import('vue')['onErrorCaptured']
-  const onHide: typeof import('@dcloudio/uni-app')['onHide']
-  const onLaunch: typeof import('@dcloudio/uni-app')['onLaunch']
-  const onLoad: typeof import('@dcloudio/uni-app')['onLoad']
-  const onMounted: typeof import('vue')['onMounted']
-  const onNavigationBarButtonTap: typeof import('@dcloudio/uni-app')['onNavigationBarButtonTap']
-  const onNavigationBarSearchInputChanged: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputChanged']
-  const onNavigationBarSearchInputClicked: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputClicked']
-  const onNavigationBarSearchInputConfirmed: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputConfirmed']
-  const onNavigationBarSearchInputFocusChanged: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputFocusChanged']
-  const onPageNotFound: typeof import('@dcloudio/uni-app')['onPageNotFound']
-  const onPageScroll: typeof import('@dcloudio/uni-app')['onPageScroll']
-  const onPullDownRefresh: typeof import('@dcloudio/uni-app')['onPullDownRefresh']
-  const onReachBottom: typeof import('@dcloudio/uni-app')['onReachBottom']
-  const onReady: typeof import('@dcloudio/uni-app')['onReady']
-  const onRenderTracked: typeof import('vue')['onRenderTracked']
-  const onRenderTriggered: typeof import('vue')['onRenderTriggered']
-  const onResize: typeof import('@dcloudio/uni-app')['onResize']
-  const onScopeDispose: typeof import('vue')['onScopeDispose']
-  const onServerPrefetch: typeof import('vue')['onServerPrefetch']
-  const onShareAppMessage: typeof import('@dcloudio/uni-app')['onShareAppMessage']
-  const onShareTimeline: typeof import('@dcloudio/uni-app')['onShareTimeline']
-  const onShow: typeof import('@dcloudio/uni-app')['onShow']
-  const onTabItemTap: typeof import('@dcloudio/uni-app')['onTabItemTap']
-  const onThemeChange: typeof import('@dcloudio/uni-app')['onThemeChange']
-  const onUnhandledRejection: typeof import('@dcloudio/uni-app')['onUnhandledRejection']
-  const onUnload: typeof import('@dcloudio/uni-app')['onUnload']
-  const onUnmounted: typeof import('vue')['onUnmounted']
-  const onUpdated: typeof import('vue')['onUpdated']
-  const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
-  const provide: typeof import('vue')['provide']
-  const reactive: typeof import('vue')['reactive']
-  const readonly: typeof import('vue')['readonly']
-  const ref: typeof import('vue')['ref']
-  const resolveComponent: typeof import('vue')['resolveComponent']
-  const shallowReactive: typeof import('vue')['shallowReactive']
-  const shallowReadonly: typeof import('vue')['shallowReadonly']
-  const shallowRef: typeof import('vue')['shallowRef']
-  const toRaw: typeof import('vue')['toRaw']
-  const toRef: typeof import('vue')['toRef']
-  const toRefs: typeof import('vue')['toRefs']
-  const toValue: typeof import('vue')['toValue']
-  const triggerRef: typeof import('vue')['triggerRef']
-  const unref: typeof import('vue')['unref']
-  const useAccess: typeof import('../hooks/useAccess')['default']
-  const useAttrs: typeof import('vue')['useAttrs']
-  const useCssModule: typeof import('vue')['useCssModule']
-  const useCssVars: typeof import('vue')['useCssVars']
-  const useId: typeof import('vue')['useId']
-  const useModel: typeof import('vue')['useModel']
-  const useRequest: typeof import('../hooks/useRequest')['default']
-  const useScroll: typeof import('../hooks/useScroll')['useScroll']
-  const useSlots: typeof import('vue')['useSlots']
-  const useTemplateRef: typeof import('vue')['useTemplateRef']
-  const useUpload: typeof import('../hooks/useUpload')['default']
-  const watch: typeof import('vue')['watch']
-  const watchEffect: typeof import('vue')['watchEffect']
-  const watchPostEffect: typeof import('vue')['watchPostEffect']
-  const watchSyncEffect: typeof import('vue')['watchSyncEffect']
+  const EffectScope: typeof import('vue').EffectScope
+  const computed: typeof import('vue').computed
+  const createApp: typeof import('vue').createApp
+  const customRef: typeof import('vue').customRef
+  const defineAsyncComponent: typeof import('vue').defineAsyncComponent
+  const defineComponent: typeof import('vue').defineComponent
+  const effectScope: typeof import('vue').effectScope
+  const getBoolDictOptions: typeof import('../hooks/useDict').getBoolDictOptions
+  const getCurrentInstance: typeof import('vue').getCurrentInstance
+  const getCurrentScope: typeof import('vue').getCurrentScope
+  const getCurrentWatcher: typeof import('vue').getCurrentWatcher
+  const getDictLabel: typeof import('../hooks/useDict').getDictLabel
+  const getDictObj: typeof import('../hooks/useDict').getDictObj
+  const getDictOptions: typeof import('../hooks/useDict').getDictOptions
+  const getIntDictOptions: typeof import('../hooks/useDict').getIntDictOptions
+  const getStrDictOptions: typeof import('../hooks/useDict').getStrDictOptions
+  const h: typeof import('vue').h
+  const inject: typeof import('vue').inject
+  const isProxy: typeof import('vue').isProxy
+  const isReactive: typeof import('vue').isReactive
+  const isReadonly: typeof import('vue').isReadonly
+  const isRef: typeof import('vue').isRef
+  const isShallow: typeof import('vue').isShallow
+  const markRaw: typeof import('vue').markRaw
+  const nextTick: typeof import('vue').nextTick
+  const onActivated: typeof import('vue').onActivated
+  const onAddToFavorites: typeof import('@dcloudio/uni-app').onAddToFavorites
+  const onBackPress: typeof import('@dcloudio/uni-app').onBackPress
+  const onBeforeMount: typeof import('vue').onBeforeMount
+  const onBeforeUnmount: typeof import('vue').onBeforeUnmount
+  const onBeforeUpdate: typeof import('vue').onBeforeUpdate
+  const onDeactivated: typeof import('vue').onDeactivated
+  const onError: typeof import('@dcloudio/uni-app').onError
+  const onErrorCaptured: typeof import('vue').onErrorCaptured
+  const onHide: typeof import('@dcloudio/uni-app').onHide
+  const onLaunch: typeof import('@dcloudio/uni-app').onLaunch
+  const onLoad: typeof import('@dcloudio/uni-app').onLoad
+  const onMounted: typeof import('vue').onMounted
+  const onNavigationBarButtonTap: typeof import('@dcloudio/uni-app').onNavigationBarButtonTap
+  const onNavigationBarSearchInputChanged: typeof import('@dcloudio/uni-app').onNavigationBarSearchInputChanged
+  const onNavigationBarSearchInputClicked: typeof import('@dcloudio/uni-app').onNavigationBarSearchInputClicked
+  const onNavigationBarSearchInputConfirmed: typeof import('@dcloudio/uni-app').onNavigationBarSearchInputConfirmed
+  const onNavigationBarSearchInputFocusChanged: typeof import('@dcloudio/uni-app').onNavigationBarSearchInputFocusChanged
+  const onPageNotFound: typeof import('@dcloudio/uni-app').onPageNotFound
+  const onPageScroll: typeof import('@dcloudio/uni-app').onPageScroll
+  const onPullDownRefresh: typeof import('@dcloudio/uni-app').onPullDownRefresh
+  const onReachBottom: typeof import('@dcloudio/uni-app').onReachBottom
+  const onReady: typeof import('@dcloudio/uni-app').onReady
+  const onRenderTracked: typeof import('vue').onRenderTracked
+  const onRenderTriggered: typeof import('vue').onRenderTriggered
+  const onResize: typeof import('@dcloudio/uni-app').onResize
+  const onScopeDispose: typeof import('vue').onScopeDispose
+  const onServerPrefetch: typeof import('vue').onServerPrefetch
+  const onShareAppMessage: typeof import('@dcloudio/uni-app').onShareAppMessage
+  const onShareTimeline: typeof import('@dcloudio/uni-app').onShareTimeline
+  const onShow: typeof import('@dcloudio/uni-app').onShow
+  const onTabItemTap: typeof import('@dcloudio/uni-app').onTabItemTap
+  const onThemeChange: typeof import('@dcloudio/uni-app').onThemeChange
+  const onUnhandledRejection: typeof import('@dcloudio/uni-app').onUnhandledRejection
+  const onUnload: typeof import('@dcloudio/uni-app').onUnload
+  const onUnmounted: typeof import('vue').onUnmounted
+  const onUpdated: typeof import('vue').onUpdated
+  const onWatcherCleanup: typeof import('vue').onWatcherCleanup
+  const provide: typeof import('vue').provide
+  const reactive: typeof import('vue').reactive
+  const readonly: typeof import('vue').readonly
+  const ref: typeof import('vue').ref
+  const resolveComponent: typeof import('vue').resolveComponent
+  const shallowReactive: typeof import('vue').shallowReactive
+  const shallowReadonly: typeof import('vue').shallowReadonly
+  const shallowRef: typeof import('vue').shallowRef
+  const toRaw: typeof import('vue').toRaw
+  const toRef: typeof import('vue').toRef
+  const toRefs: typeof import('vue').toRefs
+  const toValue: typeof import('vue').toValue
+  const triggerRef: typeof import('vue').triggerRef
+  const unref: typeof import('vue').unref
+  const useAccess: typeof import('../hooks/useAccess').default
+  const useAttrs: typeof import('vue').useAttrs
+  const useCssModule: typeof import('vue').useCssModule
+  const useCssVars: typeof import('vue').useCssVars
+  const useId: typeof import('vue').useId
+  const useModel: typeof import('vue').useModel
+  const useRequest: typeof import('../hooks/useRequest').default
+  const useScroll: typeof import('../hooks/useScroll').useScroll
+  const useSlots: typeof import('vue').useSlots
+  const useTemplateRef: typeof import('vue').useTemplateRef
+  const useUpload: typeof import('../hooks/useUpload').default
+  const watch: typeof import('vue').watch
+  const watchEffect: typeof import('vue').watchEffect
+  const watchPostEffect: typeof import('vue').watchPostEffect
+  const watchSyncEffect: typeof import('vue').watchSyncEffect
 }
 // for type re-export
 declare global {

+ 9 - 9
src/utils/index.ts

@@ -123,9 +123,9 @@ export function getEnvBaseUrl() {
 
   // # 有些同学可能需要在微信小程序里面根据 develop、trial、release 分别设置上传地址,参考代码如下。
   // TODO @芋艿:这个后续也要调整。
-  const VITE_SERVER_BASEURL__WEIXIN_DEVELOP = 'http://localhost:48080/admin-api'
-  const VITE_SERVER_BASEURL__WEIXIN_TRIAL = 'http://localhost:48080/admin-api'
-  const VITE_SERVER_BASEURL__WEIXIN_RELEASE = 'http://localhost:48080/admin-api'
+  const VITE_SERVER_BASEURL__WEIXIN_DEVELOP = 'http://yu.dgtis.com/admin-api'
+  const VITE_SERVER_BASEURL__WEIXIN_TRIAL = 'http://yu.dgtis.com/admin-api'
+  const VITE_SERVER_BASEURL__WEIXIN_RELEASE = 'http://yu.dgtis.com/admin-api'
 
   // 微信小程序端环境区分
   if (isMpWeixin) {
@@ -150,7 +150,7 @@ export function getEnvBaseUrl() {
 }
 
 /**
- * 根据环境变量,获取基础路径的根路径,比如 http://localhost:48080
+ * 根据环境变量,获取基础路径的根路径,比如 http://yu.dgtis.com
  *
  * add by 芋艿:用户类似 websocket 这种需要根路径的场景
  *
@@ -185,15 +185,15 @@ export function redirectAfterLogin(redirectUrl?: string) {
   if (!path.startsWith('/')) {
     path = `/${path}`
   }
-  const { path: _path,query } = parseUrlToObj(path)
+  const { path: _path, query } = parseUrlToObj(path)
   if (isPageTabbar(_path)) {
     uni.switchTab({ url: path })
   } else {
     // 如果 query 有值则通过reLaunch方式跳转过来所以不能用back
-    if(Object.keys(query).length > 0){
-        uni.reLaunch({ url: path })
-    }else{
-        uni.navigateBack()
+    if (Object.keys(query).length > 0) {
+      uni.reLaunch({ url: path })
+    } else {
+      uni.navigateBack()
     }
   }
 }