Authored by yyq

fix qrcode

... ... @@ -10,7 +10,6 @@ const helpers = global.yoho.helpers;
const defaultAvatar = '//img10.static.yhbimg.com/headimg/' +
'2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100';
module.exports = class extends global.yoho.BaseModel {
constructor(ctx) {
super(ctx);
... ... @@ -27,6 +26,7 @@ module.exports = class extends global.yoho.BaseModel {
{name: '我的有货币', href: '/home/currency'},
{name: '我的红包', href: '/home/redenvelopes'},
{name: '我的优惠券', href: '/home/coupons'},
{name: '我的邀请好友', href: '/home/spread'},
{name: '我的VIP', href: '/home/vip'}
]
},
... ... @@ -38,7 +38,6 @@ module.exports = class extends global.yoho.BaseModel {
{name: '我的评论', href: '/home/comment'},
// {name: '我的投诉', href: '/home/complaints'},
{name: '我的邀请好友', href: '/home/spread'},
{name: '我的信息', href: '/home/message', count: 0},
{
name: '在线客服',
... ...
... ... @@ -3,7 +3,7 @@
{{> navigation}}
<div class="me-main">
<div class="spread block">
<h2 class="title"></h2>
<h2 class="title">我的邀请好友</h2>
{{# spread}}
<div class="spread-wrap clearfix">
<div class="item-card">
... ...
... ... @@ -5,7 +5,9 @@
*/
var $ = require('yoho-jquery');
var Clipboard = require('clipboard'),
QRCode = require('../plugins/qrcode'),
Dialog = require('../common/dialog').Dialog;
var trendWordTpl = require('../../hbs/home/spread/trend-word.hbs');
... ... @@ -21,7 +23,6 @@ var clipboard;
var defaultWord = $spreadWord.data('word');
require('../common');
require('yoho-jquery-qrcode');
function reseatWordSize(word) {
if (!word) {
... ... @@ -69,10 +70,11 @@ function saveTrendWord(dg) {
}
// 生成二维码
$qrcodeImg.qrcode({
render: 'div', // 显示方式,canvas,image和div
text: $qrcodeImg.data('url'), // 二维码的内容
size: parseInt($qrcodeImg.width(), 10) // 大小
new QRCode($qrcodeImg.get(0), {
text: $qrcodeImg.data('url'),
width: parseInt($qrcodeImg.width(), 10),
height: parseInt($qrcodeImg.width(), 10),
correctLevel: 1
});
clipboard = new Clipboard('.copy-url', {
... ...
... ... @@ -2,7 +2,8 @@
font-size: 12px;
.spread > .title {
background-image: resolve(home/my-spread.jpg);
font-size: 14px;
font-weight: bold;
}
.spread-wrap {
... ...