|
@@ -7,7 +7,6 @@ |
|
@@ -7,7 +7,6 @@ |
7
|
var $ = require('yoho-jquery');
|
7
|
var $ = require('yoho-jquery');
|
8
|
|
8
|
|
9
|
var Clipboard = require('clipboard'),
|
9
|
var Clipboard = require('clipboard'),
|
10
|
- QRCode = require('../plugins/qrcode'),
|
|
|
11
|
Dialog = require('../common/dialog').Dialog;
|
10
|
Dialog = require('../common/dialog').Dialog;
|
12
|
|
11
|
|
13
|
var trendWordTpl = require('../../hbs/home/spread/trend-word.hbs');
|
12
|
var trendWordTpl = require('../../hbs/home/spread/trend-word.hbs');
|
|
@@ -23,6 +22,7 @@ var clipboard; |
|
@@ -23,6 +22,7 @@ var clipboard; |
23
|
var defaultWord = $spreadWord.data('word');
|
22
|
var defaultWord = $spreadWord.data('word');
|
24
|
|
23
|
|
25
|
require('../common');
|
24
|
require('../common');
|
|
|
25
|
+require('yoho-jquery-qrcode');
|
26
|
|
26
|
|
27
|
function reseatWordSize(word) {
|
27
|
function reseatWordSize(word) {
|
28
|
if (!word) {
|
28
|
if (!word) {
|
|
@@ -70,11 +70,10 @@ function saveTrendWord(dg) { |
|
@@ -70,11 +70,10 @@ function saveTrendWord(dg) { |
70
|
}
|
70
|
}
|
71
|
|
71
|
|
72
|
// 生成二维码
|
72
|
// 生成二维码
|
73
|
-new QRCode($qrcodeImg.get(0), {
|
|
|
74
|
- text: $qrcodeImg.data('url'),
|
|
|
75
|
- width: parseInt($qrcodeImg.width(), 10),
|
|
|
76
|
- height: parseInt($qrcodeImg.width(), 10),
|
|
|
77
|
- correctLevel: 1
|
73
|
+$qrcodeImg.qrcode({
|
|
|
74
|
+ render: 'div', // 显示方式,canvas,image和div
|
|
|
75
|
+ text: $qrcodeImg.data('url'), // 二维码的内容
|
|
|
76
|
+ size: parseInt($qrcodeImg.width(), 10) // 大小
|
78
|
});
|
77
|
});
|
79
|
|
78
|
|
80
|
clipboard = new Clipboard('.copy-url', {
|
79
|
clipboard = new Clipboard('.copy-url', {
|