Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporateCulture-qd
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王立鹏
corporateCulture-qd
Commits
262f0bf7
Commit
262f0bf7
authored
Dec 23, 2025
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 17679】 perf: 调整格式等
parent
0ca6abec
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
37 additions
and
17 deletions
+37
-17
App.vue
src/App.vue
+1
-0
device.ts
src/store/modules/device.ts
+3
-3
emoji.ts
src/store/modules/emoji.ts
+4
-4
index.ts
src/utils/md5/index.ts
+1
-1
service.ts
src/utils/request/service.ts
+1
-1
local.ts
src/utils/storage/local.ts
+1
-1
array.ts
src/utils/util-function/array.ts
+2
-2
time.ts
src/utils/util-function/time.ts
+5
-1
tree.ts
src/utils/util-function/tree.ts
+5
-1
index.vue
src/views/homePage/yaTab/index.vue
+14
-3
No files found.
src/App.vue
View file @
262f0bf7
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
zhCn
from
'element-plus/es/locale/lang/zh-cn'
import
zhCn
from
'element-plus/es/locale/lang/zh-cn'
import
{
initWxConfig
}
from
'@/utils/wxUtil/initWXConfig'
import
{
initWxConfig
}
from
'@/utils/wxUtil/initWXConfig'
const
locale
=
ref
(
zhCn
)
const
locale
=
ref
(
zhCn
)
onMounted
(()
=>
{
onMounted
(()
=>
{
...
...
src/store/modules/device.ts
View file @
262f0bf7
...
@@ -8,7 +8,7 @@ export const useDeviceStore = defineStore({
...
@@ -8,7 +8,7 @@ export const useDeviceStore = defineStore({
device
:
''
,
device
:
''
,
isPc
:
false
,
isPc
:
false
,
AndroidOrIphone
:
''
AndroidOrIphone
:
''
,
}
}
},
},
actions
:
{
actions
:
{
...
@@ -24,6 +24,6 @@ export const useDeviceStore = defineStore({
...
@@ -24,6 +24,6 @@ export const useDeviceStore = defineStore({
// 判断设备
// 判断设备
handleUserAgent
()
{
handleUserAgent
()
{
this
.
AndroidOrIphone
=
checkUserAgent
()
this
.
AndroidOrIphone
=
checkUserAgent
()
}
}
,
}
}
,
})
})
src/store/modules/emoji.ts
View file @
262f0bf7
...
@@ -19,7 +19,7 @@ export const useEmojiStore = defineStore({
...
@@ -19,7 +19,7 @@ export const useEmojiStore = defineStore({
id
:
'emoji'
,
id
:
'emoji'
,
state
:
()
=>
{
state
:
()
=>
{
return
{
return
{
emoji
:
{}
as
IGroupEmojy
emoji
:
{}
as
IGroupEmojy
,
}
}
},
},
actions
:
{
actions
:
{
...
@@ -49,10 +49,10 @@ export const useEmojiStore = defineStore({
...
@@ -49,10 +49,10 @@ export const useEmojiStore = defineStore({
if
(
!
jsonData
)
return
null
if
(
!
jsonData
)
return
null
const
obj
:
IEmojiObj
=
{}
const
obj
:
IEmojiObj
=
{}
jsonData
.
default
.
forEach
(
v
=>
{
jsonData
.
default
.
forEach
(
(
v
)
=>
{
obj
[
v
.
name
]
=
v
obj
[
v
.
name
]
=
v
})
})
return
obj
return
obj
}
}
,
}
}
,
})
})
src/utils/md5/index.ts
View file @
262f0bf7
...
@@ -23,7 +23,7 @@ export function aesEncrypt(plaintext: string, key: string): string {
...
@@ -23,7 +23,7 @@ export function aesEncrypt(plaintext: string, key: string): string {
// 加密数据
// 加密数据
const
encrypted
=
CryptoJS
.
AES
.
encrypt
(
plaintext
,
CryptoJS
.
enc
.
Utf8
.
parse
(
key
),
{
const
encrypted
=
CryptoJS
.
AES
.
encrypt
(
plaintext
,
CryptoJS
.
enc
.
Utf8
.
parse
(
key
),
{
mode
:
CryptoJS
.
mode
.
ECB
,
mode
:
CryptoJS
.
mode
.
ECB
,
padding
:
CryptoJS
.
pad
.
Pkcs7
padding
:
CryptoJS
.
pad
.
Pkcs7
,
})
})
return
encrypted
.
toString
()
return
encrypted
.
toString
()
...
...
src/utils/request/service.ts
View file @
262f0bf7
...
@@ -43,7 +43,7 @@ export const ERROR_STATUS = {
...
@@ -43,7 +43,7 @@ export const ERROR_STATUS = {
502
:
'502: 错误网关~'
,
502
:
'502: 错误网关~'
,
503
:
'503: 服务不可用'
,
503
:
'503: 服务不可用'
,
504
:
'504: 网关超时~'
,
504
:
'504: 网关超时~'
,
505
:
'505: http版本不支持该请求~'
505
:
'505: http版本不支持该请求~'
,
}
}
/** 不弹出错误信息的code */
/** 不弹出错误信息的code */
...
...
src/utils/storage/local.ts
View file @
262f0bf7
...
@@ -23,7 +23,7 @@ class LocalCache {
...
@@ -23,7 +23,7 @@ class LocalCache {
setCache
(
key
:
string
,
value
:
unknown
,
expireTime
=
0
)
{
setCache
(
key
:
string
,
value
:
unknown
,
expireTime
=
0
)
{
const
obj
=
{
const
obj
=
{
data
:
value
,
data
:
value
,
time
:
expireTime
?
new
Date
().
getTime
()
+
expireTime
:
0
time
:
expireTime
?
new
Date
().
getTime
()
+
expireTime
:
0
,
}
}
window
.
localStorage
.
setItem
(
key
,
JSON
.
stringify
(
obj
))
window
.
localStorage
.
setItem
(
key
,
JSON
.
stringify
(
obj
))
}
}
...
...
src/utils/util-function/array.ts
View file @
262f0bf7
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
export
function
splitArray
<
T
=
unknown
>
(
arr
:
T
[],
callback
:
(
item
:
T
)
=>
boolean
)
{
export
function
splitArray
<
T
=
unknown
>
(
arr
:
T
[],
callback
:
(
item
:
T
)
=>
boolean
)
{
const
arr1
:
T
[]
=
[]
const
arr1
:
T
[]
=
[]
const
arr2
:
T
[]
=
[]
const
arr2
:
T
[]
=
[]
arr
.
forEach
(
v
=>
{
arr
.
forEach
(
(
v
)
=>
{
if
(
callback
(
v
))
{
if
(
callback
(
v
))
{
arr1
.
push
(
v
)
arr1
.
push
(
v
)
}
else
{
}
else
{
...
@@ -15,6 +15,6 @@ export function splitArray<T = unknown>(arr: T[], callback: (item: T) => boolean
...
@@ -15,6 +15,6 @@ export function splitArray<T = unknown>(arr: T[], callback: (item: T) => boolean
})
})
return
{
return
{
false
:
arr2
,
false
:
arr2
,
true
:
arr1
true
:
arr1
,
}
}
}
}
src/utils/util-function/time.ts
View file @
262f0bf7
...
@@ -24,7 +24,11 @@ export function time_format(value?: string | number, format = 'YYYY-MM-DD', useA
...
@@ -24,7 +24,11 @@ export function time_format(value?: string | number, format = 'YYYY-MM-DD', useA
}
}
// 将日期格式化成对应的格式
// 将日期格式化成对应的格式
export
const
formatDate
=
function
(
str
:
string
|
number
,
format
=
'YYYY-MM-DD HH:mm'
,
shortStr
=
false
)
{
export
const
formatDate
=
function
(
str
:
string
|
number
,
format
=
'YYYY-MM-DD HH:mm'
,
shortStr
=
false
,
)
{
// 兼容苹果
// 兼容苹果
if
(
typeof
str
===
'string'
)
{
if
(
typeof
str
===
'string'
)
{
str
=
str
.
replace
(
/-/g
,
'/'
)
str
=
str
.
replace
(
/-/g
,
'/'
)
...
...
src/utils/util-function/tree.ts
View file @
262f0bf7
...
@@ -13,7 +13,11 @@ interface IObject {
...
@@ -13,7 +13,11 @@ interface IObject {
[
key
:
string
]:
any
[
key
:
string
]:
any
children
?:
IObject
[]
children
?:
IObject
[]
}
}
export
function
arrayToTree
<
T
extends
IObject
>
(
items
:
T
[],
parentKey
=
'parentId'
,
primaryKey
=
'id'
)
{
export
function
arrayToTree
<
T
extends
IObject
>
(
items
:
T
[],
parentKey
=
'parentId'
,
primaryKey
=
'id'
,
)
{
const
result
:
T
[]
=
[]
const
result
:
T
[]
=
[]
const
itemMap
=
new
Map
<
string
|
number
,
T
>
()
const
itemMap
=
new
Map
<
string
|
number
,
T
>
()
// 遍历源数组,给map添加数据
// 遍历源数组,给map添加数据
...
...
src/views/homePage/yaTab/index.vue
View file @
262f0bf7
...
@@ -3,9 +3,17 @@
...
@@ -3,9 +3,17 @@
<!-- 头部Tabs -->
<!-- 头部Tabs -->
<div
class=
"header h-40px items-center justify-between"
>
<div
class=
"header h-40px items-center justify-between"
>
<div
class=
"left flex gap-3 flex items-center"
>
<div
class=
"left flex gap-3 flex items-center"
>
<Tabs
:modelValue=
"activeTab"
@
update:modelValue=
"(e) => updateActiveTab(e as string)"
:tabs=
"tabs"
/>
<Tabs
:modelValue=
"activeTab"
@
update:modelValue=
"(e) => updateActiveTab(e as string)"
:tabs=
"tabs"
/>
<!-- 刷新图标 -->
<!-- 刷新图标 -->
<el-icon
size=
"15"
class=
"cursor-pointer hover:rotate-180 transition-all duration-300"
@
click=
"handleRefresh"
>
<el-icon
size=
"15"
class=
"cursor-pointer hover:rotate-180 transition-all duration-300"
@
click=
"handleRefresh"
>
<Refresh
/>
<Refresh
/>
</el-icon>
</el-icon>
</div>
</div>
...
@@ -52,7 +60,10 @@ const handleRefresh = () => {
...
@@ -52,7 +60,10 @@ const handleRefresh = () => {
const
updateActiveTab
=
(
val
:
string
)
=>
{
const
updateActiveTab
=
(
val
:
string
)
=>
{
if
(
val
===
'关爱基金'
)
{
if
(
val
===
'关爱基金'
)
{
window
.
open
(
'https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww42a2d34b42b8d721&redirect_uri=oa.yswg.com.cn:3456/careFund/publicNotice/index&response_type=code&scope=snsapi_base&state=#wechat_redirect'
,
'_blank'
)
window
.
open
(
'https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww42a2d34b42b8d721&redirect_uri=oa.yswg.com.cn:3456/careFund/publicNotice/index&response_type=code&scope=snsapi_base&state=#wechat_redirect'
,
'_blank'
,
)
return
return
}
}
activeTab
.
value
=
val
activeTab
.
value
=
val
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment