Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
tokcos-socket-web-ts
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
小豪
tokcos-socket-web-ts
Commits
f80d52cf
提交
f80d52cf
authored
4月 28, 2024
作者:
Hao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add
父级
4e581bb4
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
42 行增加
和
34 行删除
+42
-34
.env.development
+2
-2
.env.production
+2
-2
src/minxins/UploadMixin.ts
+4
-18
src/store/modules/index.ts
+13
-0
src/store/modules/user.ts
+2
-0
src/views/HomeView.vue
+19
-12
没有找到文件。
.env.development
浏览文件 @
f80d52cf
NODE_ENV=development
VITE_USER_APP_API_URL=192.168.31.135
\ No newline at end of file
VITE_USER_APP_API_URL=192.168.31.112
\ No newline at end of file
.env.production
浏览文件 @
f80d52cf
NODE_ENV=production
VITE_USER_APP_API_URL=192.168.31.101
\ No newline at end of file
VITE_USER_APP_API_URL=192.168.31.112
\ No newline at end of file
src/minxins/UploadMixin.ts
浏览文件 @
f80d52cf
...
...
@@ -99,7 +99,6 @@ export const upLoadHander = async (obj: any) => {
uploadMixin
.
uploadMixinType
=
result
.
uploadType
;
staticDomain
=
result
.
staticDomain
||
"https://cdn.tikcos.cn"
;
if
(
uploadMixin
.
uploadMixinType
===
"txcos"
)
{
console
.
log
(
result
.
response
,
" result.response"
);
const
ress
=
res
.
result
.
response
;
const
credentials
=
ress
.
credentials
;
uploadMixin
.
uploadMixinCredentials
=
{
...
...
@@ -109,11 +108,6 @@ export const upLoadHander = async (obj: any) => {
StartTime
:
ress
?.
startTime
,
ExpiredTime
:
ress
?.
expiredTime
,
};
console
.
log
(
result
,
"result"
);
console
.
log
(
uploadMixin
.
uploadMixinCredentials
,
" uploadMixin.uploadMixinCredentials"
);
}
}
else
{
resResult
=
false
;
...
...
@@ -123,10 +117,7 @@ export const upLoadHander = async (obj: any) => {
if
(
resResult
)
{
const
query
=
{};
// const res: any = await getUploadConfigInfo(query);
console
.
log
(
uploadMixin
.
uploadMixinCredentials
,
" console.log(uploadMixin.uploadMixinCredentials)"
);
const
result
:
any
=
uploadMixin
.
upLoadMixinResult
;
if
(
uploadMixin
.
uploadMixinType
===
"txcos"
)
{
//走对象存储
...
...
@@ -147,17 +138,10 @@ export const upLoadHander = async (obj: any) => {
Key
:
uploadMixin
.
uploadMixinPath
+
tempFolder
+
folder
,
Body
:
fileInfo
.
file
,
onProgress
:
function
(
progressData
)
{
console
.
log
(
progressData
,
"ada"
);
obj
.
onProgress
(
progressData
);
},
},
(
err
,
data
)
=>
{
console
.
log
(
err
,
data
,
"打印一下"
);
console
.
log
({
success
:
true
});
console
.
log
(
`
${
staticDomain
}
/
${
uploadMixin
.
uploadMixinPath
}${
tempFolder
}${
folder
}
`
,
"打印一下,数据"
);
if
(
!
err
&&
data
.
statusCode
===
200
)
{
const
imgurl
=
`
${
staticDomain
}
/
${
uploadMixin
.
uploadMixinPath
}${
tempFolder
}${
folder
}
`
;
...
...
@@ -178,7 +162,8 @@ export const upLoadHander = async (obj: any) => {
let
formData
=
new
FormData
();
formData
.
append
(
"biz"
,
fileInfo
.
biz
);
formData
.
append
(
"file"
,
newFile
);
const
uploadRes
=
await
axios
.
post
(
`http://
${
VUE_APP_API_URL
}
:8080/sys/common/upload`
,
const
uploadRes
=
await
axios
.
post
(
`http://
${
VUE_APP_API_URL
}
:8080/sys/common/upload`
,
formData
,
{
headers
:
{
...
obj
.
headers
},
...
...
@@ -193,6 +178,7 @@ export const upLoadHander = async (obj: any) => {
url
=
uploadRes
.
message
.
replaceAll
(
"//"
,
"/"
);
const
pre
=
url
.
startsWith
(
"/"
)
?
""
:
"/"
;
url
=
`http://
${
VUE_APP_API_URL
}
/sys/common/static`
+
pre
+
url
;
console
.
log
(
url
,
"图片上传失败"
);
obj
.
onSuccess
({
success
:
true
,
message
:
url
});
}
else
{
obj
.
onError
({
...
...
src/store/modules/index.ts
0 → 100644
浏览文件 @
f80d52cf
export
type
appType
=
{
sidebar
:{
opened
:
boolean
;
withoutAnimation
:
boolean
;
isClickCollapse
:
boolean
;
}
}
export
type
setType
=
{
path
:
string
,
name
:
string
,
query
?:
object
}
\ No newline at end of file
src/store/modules/user.ts
浏览文件 @
f80d52cf
...
...
@@ -32,7 +32,9 @@ export const useUserStore = defineStore("user", {
return
new
Promise
((
resolve
,
reject
)
=>
{
const
query
=
{
code
:
this
.
userInfo
.
username
,
name
:
res
.
nickame
};
console
.
log
(
query
)
getUserList
(
query
).
then
(({
success
,
result
,
message
}:
any
)
=>
{
if
(
success
)
{
this
.
userList
=
result
.
map
((
item
:
any
)
=>
{
...
...
src/views/HomeView.vue
浏览文件 @
f80d52cf
...
...
@@ -3,12 +3,11 @@
<el-container>
<el-aside
width=
"280px"
class=
"el-aside-left"
>
<el-header
class=
"el-header-left"
>
<el-input
placeholder=
"搜索"
/>
<el-input
placeholder=
"搜索"
v-model=
"queryParams.nickame"
@
input=
"handleInput"
/>
</el-header>
<div
active-text-color=
"#000"
background-co
lor=
"#fff"
background-color=
"#fff"
class=
"el-menu-item-box"
>
<div
...
...
@@ -16,7 +15,7 @@
:class=
"getMenuItem(item)"
:index=
"item?.id"
:key=
"item?.id"
v-for=
"
item
in list"
v-for=
"
(item, index)
in list"
@
click=
"handleMenuClick(item)"
>
<div
class=
"user-info-box"
>
...
...
@@ -331,7 +330,6 @@ import { InquiryAdd, checkMesssages } from '../axios/model/user'
import
useMenu
from
'@/components/Menu/RightClickMenu'
import
ShopList
from
'@/components/ShopList.vue'
let
{
showContextMenu
}
=
useMenu
()
console
.
log
(
useMenu
(),
'useMenu'
)
const
ruleForm
=
ref
({})
const
ruleFormRef
=
ref
<
FormInstance
>
()
const
shopListRef
=
ref
(
null
)
...
...
@@ -340,7 +338,6 @@ const getUseUserStore = useUserStore()
const
list
=
ref
([])
const
automaticPromptRef
=
ref
(
''
)
const
inquiryInfo
=
ref
([])
console
.
log
(
shopListRef
)
const
rules
=
reactive
({
customerName
:
[
{
...
...
@@ -391,20 +388,27 @@ let currentInfo = ref({
messages
:
[],
username
:
''
,
})
let
queryParams
=
ref
({})
const
connectMsg
=
()
=>
{
const
useUser
=
useUserStore
()
//
const useUser = useUserStore()
const
toIp
=
`ws://
${
import
.
meta
.
env
.
VITE_USER_APP_API_URL
}
:8081?type=kf&code=
${
getUseUserStore
.
userInfo
?.
username
}
`
useUser
.connect()
getUseUserStore
.connect()
initWebSocket(toIp)
useUser.setUserListMessages({}).then((res: any) => {
list.value = useUser.userList
})
getUserList()
}
onMounted(() => {
connectMsg()
})
const getUserList = (queryParams:any) => {
getUseUserStore.setUserListMessages(queryParams).then((res: any) => {
list.value = getUseUserStore.userList
})
}
const handleInput = () => {
getUserList(queryParams)
}
//设置message
const isSelf = computed(() => {
return (e: any) => {
...
...
@@ -537,6 +541,7 @@ const handleDelete = (item, index) => {
//提交询价单
const sumbitFuleForm = (formEl: FormInstance | undefined) => {
console.log('sumbitFuleForm', formEl)
if (!formEl) return
formEl.validate(async (valid: boolean) => {
if (valid) {
...
...
@@ -602,7 +607,6 @@ const selectionChange = (arr: any) => {
item.count = 1
return item
})
console.log(inquiryInfo.value)
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
@@ -958,6 +962,9 @@ const selectionChange = (arr: any) => {
.el-input__wrapper
{
width
:
48px
;
}
.query
{
}
.avatar-input-box
{
:deep(.el-input-number__increase),
:deep(.el-input-number__decrease)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论