|
@@ -84,7 +84,7 @@ export default {
|
|
|
width: 280, // 设置宽度,单位像素
|
|
|
height: 280, // 设置高度,单位像素
|
|
|
// text: encodeURI(url), // 编码处理
|
|
|
- text: encodeURI(this.config.simpleUrl), // 编码处理
|
|
|
+ text: this.config.simpleUrl ? encodeURI(this.config.simpleUrl) : (this.shortUrl.result || encodeURI(this.config.url)), // 编码处理
|
|
|
// text: shortUrl.result || encodeURI(this.config.url), // 编码处理
|
|
|
correctLevel: QRCode.CorrectLevel.Q //解决编码后网址太长的问题
|
|
|
})
|
|
@@ -92,7 +92,7 @@ export default {
|
|
|
} else {
|
|
|
this.joinQRcode.clear()
|
|
|
// this.joinQRcode.makeCode(shortUrl.result || encodeURI(this.config.url))
|
|
|
- this.joinQRcode.makeCode(encodeURI(this.config.simpleUrl))
|
|
|
+ this.joinQRcode.makeCode(this.config.simpleUrl ? encodeURI(this.config.simpleUrl) : (this.shortUrl.result || encodeURI(this.config.url)))
|
|
|
}
|
|
|
let dom = document.getElementById('qrcode')
|
|
|
if (dom) dom.title = ''
|