Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
8 years ago
Commit
35ecfda8a1b8c5506934239d922f48908deb495d
1 parent
46fe3260
fix chart es6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
public/js/cart/cart-action.js
public/js/common/stringHandle.js
public/js/cart/cart-action.js
View file @
35ecfda
...
...
@@ -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
()
{
...
...
public/js/common/stringHandle.js
View file @
35ecfda
...
...
@@ -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
=
/
[\u
4E00-
\u
9FA5
]
/g
;
if
(
str
.
replace
(
r
,
'mm'
).
length
<=
n
)
{
...
...
Please
register
or
login
to post a comment