Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fee0ea0d
authored
Nov 18, 2021
by
zhousil
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://gitlab.corp.qinqinxiaobao.com:9880/uniplat/customer-service
parents
90f2bc96
fd83ad63
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
database/index.ts
xim/models/chat.ts
database/index.ts
View file @
fee0ea0d
...
@@ -42,27 +42,29 @@ class ChatCacheDatabaseController {
...
@@ -42,27 +42,29 @@ class ChatCacheDatabaseController {
// eslint-disable-next-line @typescript-eslint/no-this-alias
// eslint-disable-next-line @typescript-eslint/no-this-alias
const
that
=
this
;
const
that
=
this
;
const
setupDb
=
()
=>
{
const
setupDb
=
()
=>
{
if
(
that
.
db
)
{
if
(
this
.
setuping
)
{
try
{
if
(
that
.
db
)
{
that
.
buildTables
(
that
.
db
,
that
.
chatListKey
);
try
{
console
.
log
(
that
.
buildTables
(
that
.
db
,
that
.
chatListKey
);
`build index database for chat completed, 100%`
console
.
log
(
);
`build index database for chat completed, 100%`
}
catch
(
e
)
{
);
console
.
error
(
e
);
}
catch
(
e
)
{
console
.
error
(
e
);
}
}
}
this
.
setuping
=
false
;
}
}
this
.
setuping
=
false
;
resolve
();
resolve
();
};
};
r
.
onsuccess
=
function
(
e
)
{
r
.
onsuccess
=
function
(
e
)
{
that
.
db
=
(
e
.
target
as
any
).
result
;
that
.
db
=
(
e
.
target
as
any
).
result
;
console
.
log
(
`index database init comepleted
, 33%
`
);
console
.
log
(
`index database init comepleted`
);
setupDb
();
setupDb
();
};
};
r
.
onupgradeneeded
=
function
(
e
)
{
r
.
onupgradeneeded
=
function
(
e
)
{
that
.
db
=
(
e
.
target
as
any
).
result
;
that
.
db
=
(
e
.
target
as
any
).
result
;
console
.
log
(
`
index database init comepleted, 66%
`
);
console
.
log
(
`
upgrade database comepleted
`
);
setupDb
();
setupDb
();
};
};
r
.
onerror
=
function
(
e
)
{
r
.
onerror
=
function
(
e
)
{
...
...
xim/models/chat.ts
View file @
fee0ea0d
...
@@ -47,6 +47,7 @@ export interface Chat {
...
@@ -47,6 +47,7 @@ export interface Chat {
chat_id
:
number
;
chat_id
:
number
;
catalog
:
string
;
catalog
:
string
;
biz_type_id
:
number
;
biz_type_id
:
number
;
biz_type_code
:
string
;
business_data
?:
string
;
business_data
?:
string
;
detail_name
?:
string
;
detail_name
?:
string
;
}
}
...
...
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