Commit b924797b authored by hanfeng zhang's avatar hanfeng zhang

321

parent 835621d6
......@@ -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"
// }
}
......@@ -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,
......
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
}
......@@ -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')
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment