Authored by zhangxiaoru

关闭按钮更改 颜色过长截取

... ... @@ -17,13 +17,13 @@ module.exports = {
assetUrl: '//127.0.0.1:5001',
testCode: 'yoho4946abcdef#$%&!@',
domains: {
api: 'http://api-test2.yohops.com:9999/',
service: 'http://service-test2.yohops.com:9999/',
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test2.yohops.com:9999/'
// imSocket: 'ws://im.yohobuy.com:10240',
// imCs: 'http://im.yohobuy.com/api',
// imServer: 'http://im.yohobuy.com/server'
singleApi: 'http://api-test3.yohops.com:9999/',
imSocket: 'ws://im.yohobuy.com:10240',
imCs: 'http://im.yohobuy.com/api',
imServer: 'http://im.yohobuy.com/server'
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
... ...
{{# cartInfo}}
<div class="chose-panel">
<div class="main">
<div class="close">X</div>
<div class="close iconfont">&#xe626;</div>
<div class="infos {{#if @root.tickets}} tickets-info {{/if}}">
<div class="basic-info" >
{{#each thumbs}}
... ...
... ... @@ -64,7 +64,7 @@ var discountNum = $('#mnum').val() - 0,
var C_ID;
var sizeInfo = $('.size-info');
var sizeInfo;
require('../common');
... ... @@ -97,6 +97,7 @@ function init() {
curColorIndex = 0;
curSizeIndex = 0;
isEdit = 0;
sizeInfo = $('.size-info');
}
/*
... ... @@ -372,7 +373,9 @@ function chosedLength() {
var $chosedL = $('.block-list li.chosed'),
infoHtml,
choosedInfo = $('.choosed-info'),
notChoose = $('.not-choose');
notChoose = $('.not-choose'),
chosedStr = $chosedL.eq(0).html(),
strlen = 0;
choosedInfo.removeClass('hide');
... ... @@ -380,13 +383,26 @@ function chosedLength() {
notChoose.addClass('hide');
}
for (var i = 0; i < chosedStr.length; i++) {
if (chosedStr.charCodeAt(i) > 255) {
      strlen += 2;
    } else {
      strlen ++;
}
if (strlen >= 18) {
chosedStr = chosedStr.substring(0, i) + '...';
break;
}
  }
if ($chosedL.length === 2) {
$chosedL.each(function(val) {
infoHtml = '已选:' + $chosedL.eq(0).html() + '、' + $chosedL.eq(1).html();
infoHtml = '已选:' + chosedStr + '、' + $chosedL.eq(1).html();
});
} else if ($chosedL.length === 1) {
infoHtml = '已选:' + $chosedL.eq(0).html();
infoHtml = '已选:' + chosedStr;
} else {
choosedInfo.addClass('hide');
notChoose.removeClass('hide');
... ...
... ... @@ -23,8 +23,9 @@
font-size: 80%;
width: 30px;
height: 30px;
margin-right: 6px;
margin: 16px 16px 0 0;
text-align: right;
color: #b1b1b1;
}
.infos {
... ... @@ -45,6 +46,7 @@
.thumb {
width: 164px;
min-height: 220px;
position: absolute;
top: -60px;
border: 1px solid #e6e6e6;
... ...