Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
OKR
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanfeng zhang
OKR
Commits
b924797b
Commit
b924797b
authored
Sep 07, 2021
by
hanfeng zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
321
parent
835621d6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
32 deletions
+67
-32
.eslintrc.js
.eslintrc.js
+5
-7
main.ts
src/main.ts
+3
-2
store.dto.ts
src/store/store.dto.ts
+7
-7
two-code.vue
src/views/team/two-code.vue
+52
-16
No files found.
.eslintrc.js
View file @
b924797b
...
...
@@ -9,11 +9,9 @@ module.exports = {
'node'
:
true
,
'es6'
:
true
},
// "rules" : {
// "no-unused-vars" : 2,
// "no-undef" : 2
// },
'parserOptions'
:
{
'sourceType'
:
'module'
}
// "parser": "vue-eslint-parser",
// "parserOptions": {
// "parser": "babel-eslint",
// "sourceType": "module"
// }
}
src/main.ts
View file @
b924797b
...
...
@@ -10,7 +10,7 @@ import service from './service'
import
{
global
}
from
'@/const/Global'
import
dsbridge
from
'dsbridge'
import
{
Dialog
,
Toast
,
Notify
}
from
'vant'
import
VConsole
from
'vconsole'
//
import VConsole from 'vconsole'
Vue
.
config
.
productionTip
=
false
Vue
.
use
(
Dialog
).
use
(
Toast
).
use
(
Notify
)
...
...
@@ -19,7 +19,8 @@ Vue.use(service)
Vue
.
use
(
utils
).
use
(
service
)
Vue
.
prototype
.
$dsbridge
=
dsbridge
Vue
.
prototype
.
$global
=
global
new
VConsole
()
// new VConsole()
new
Vue
({
router
,
...
...
src/store/store.dto.ts
View file @
b924797b
export
interface
EnterpriseInfo
{
"oaServer"
:
string
,
"avatar"
:
string
,
"description"
:
string
,
"id"
:
string
,
"imServer"
:
string
,
"name"
:
string
,
"nodeServer"
:
string
oaServer
:
string
,
avatar
:
string
,
description
:
string
,
id
:
string
,
imServer
:
string
,
name
:
string
,
nodeServer
:
string
}
src/views/team/two-code.vue
View file @
b924797b
...
...
@@ -20,7 +20,6 @@
<vue-qr
:logoSrc=
"require('@/assets/icons/y-chat33.png')"
:text=
"qrCodeText"
:margin=
"2"
:size=
"400"
/>
...
...
@@ -60,10 +59,31 @@ import { formatDate } from '@/util/FormatDate'
import
VueQr
from
'vue-qr'
import
html2canvas
from
'html2canvas'
import
{
CanvasRenderer
}
from
'html2canvas/dist/types/render/canvas/canvas-renderer'
interface
JoinInfoType
{
depId
:
string
entId
:
string
expiration
:
number
hash
:
string
inviterId
:
string
joinTime
:
number
name
:
string
oaServer
:
string
phone
:
string
position
:
string
}
Vue
.
use
(
Image
)
export
default
Vue
.
extend
({
name
:
'Two-code'
,
data
()
{
return
{
formatDate
,
msg1
:
'团队名称'
,
msg2
:
'ABCDEF'
,
msg3
:
'扫描二维码加入我们chat33的团队'
,
joinInfo
:
{}
as
JoinInfoType
,
qrCodeText
:
''
}
},
components
:
{
'main-page'
:
()
=>
import
(
'@/layout/main-page.vue'
),
'code-icon'
:()
=>
import
(
'@/components/common/Icon.vue'
),
...
...
@@ -72,29 +92,45 @@ export default Vue.extend({
},
async
created
()
{
// console.log(Mock, 'mock')
this
.
joinInfo
=
this
.
$store
.
state
.
acceptJoin
||
{}
console
.
log
(
this
.
joinInfo
,
'joinIndo'
)
this
.
qrCodeText
=
JSON
.
stringify
(
this
.
joinInfo
)
this
.
joinInfo
=
this
.
$store
.
state
.
acceptJoin
const
urloutput
=
this
.
outputUrl
(
this
.
joinInfo
)
console
.
log
(
urloutput
);
this
.
qrCodeText
=
JSON
.
stringify
(
this
.
joinInfo
)
let
url
=
window
.
location
.
origin
+
'/team/confirm-join'
// console.log(this.qrCodeText.split(',').map(i=> i.replaceAll(':','=')));
// for(const key in this.joinInfo) {
// url = `${url}?${key}=${this.joinInfo[key]}`
// }
// console.log(url, 'ur;')
this
.
qrCodeText
=
`
${
url
}
?query=
${
this
.
qrCodeText
}
`
// console.log(this.qrCodeText,'sdkfjskldfjlksdfjlksdfklsdkf');
this
.
qrCodeText
=
`
${
url
}
?
${
urloutput
}
`
console
.
log
(
this
.
qrCodeText
,
'output'
);
this
.
dpr
()
// this.drawCanvas()
},
data
()
{
return
{
formatDate
,
msg1
:
'团队名称'
,
msg2
:
'ABCDEF'
,
msg3
:
'扫描二维码加入我们chat33的团队'
,
joinInfo
:
{},
qrCodeText
:
''
}
},
methods
:
{
outputUrl
(
item
:
Object
){
let
res
=
''
const
arr
=
Object
.
entries
(
item
)
arr
.
map
((
i
,
index
)
=>
{
let
string
if
(
index
+
1
<
arr
.
length
){
string
=
`
${
i
[
0
]}
=
${
i
[
1
]}
&`
}
else
{
string
=
`
${
i
[
0
]}
=
${
i
[
1
]}
`
}
res
+=
string
})
return
res
},
handleClickLeft
()
{
this
.
$router
.
push
(
'/team'
)
},
...
...
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