Authored by yyq

fix chart es6

... ... @@ -12,7 +12,7 @@ var $ = require('yoho-jquery'), // eslint-disable-line
var $cartnewTips = $('.cartnew-tips'),
$cartListWrap = $('#Y_CartListWrap');
require('../common/function')
require('../common/function');
// 关闭温馨提示
$cartnewTips.find('.btn-close').click(function() {
... ...
... ... @@ -10,7 +10,7 @@ let stringHandle = {
* 汉字相当于两个字符的字符串长度计算
* @param {*} str
*/
chinese2(str) {
chinese2: function(str) {
let total = 0,
charCode,
i,
... ... @@ -26,13 +26,12 @@ let stringHandle = {
}
return total;
},
/**
* 中文相当于两个字符情况下的字符串截取
* @param {*} str
* @param {*} n
*/
sub_chinese2(str, n) {
sub_chinese2: function(str, n) {
let r = /[\u4E00-\u9FA5]/g;
if (str.replace(r, 'mm').length <= n) {
... ...