Authored by yyq

样式调整

... ... @@ -63,7 +63,7 @@
\{{consignee}}
<span class="right">\{{mobile}}</span>
</p>
<p class="area">\{{area}}</p>
<p class="area">\{{areaShow}}</p>
<p class="street">\{{address}}</p>
<p class="option">
<label class="set-default">设为默认</label>
... ...
... ... @@ -27,6 +27,23 @@ var addrList = {},
var addrSelect;
function handleAreaText(areaInfo) {
var maxLength = 30;
var aList, tlen = 0;
if (areaInfo.length > maxLength) {
aList = areaInfo.split(' ');
if (aList[3] && aList[3].length) {
tlen = aList[3].length;
}
return areaInfo.substr(0, maxLength - tlen - 2) + '...' + (aList[3] || '');
}
return areaInfo;
}
// 获取地址数据
$('.addr-item').each(function() {
var data = $(this).data();
... ... @@ -34,6 +51,11 @@ $('.addr-item').each(function() {
if (data.id) {
if (data.area) {
data.areaText = data.area.split(' ').join('/');
data.areaShow = handleAreaText(data.area);
if (data.area !== data.areaShow) {
$(this).find('.area').text(data.areaShow);
}
}
addrList[data.id] = data;
... ... @@ -209,6 +231,7 @@ function handelAddrInfo(data, reqData, $el) {
$.extend(addrList[reqData.id], {
consignee: reqData.consignee,
area: reqData.area,
areaShow: handleAreaText(reqData.area),
areaText: reqData.areaText,
address: reqData.address,
mobile: reqData.mobile,
... ... @@ -233,6 +256,7 @@ function handelAddrInfo(data, reqData, $el) {
id: data.id,
consignee: data.consignee,
area: data.area,
areaShow: handleAreaText(reqData.area),
areaText: data.area.split(' ').join('/'),
address: data.address,
mobile: data.mobile,
... ...
... ... @@ -1202,6 +1202,7 @@
color: #fff;
background-color: #000;
cursor: pointer;
font-weight: 300;
}
}
... ... @@ -1269,7 +1270,7 @@
border: 1px solid #b0b0b0;
padding: 5px;
margin-right: 10px;
font-size: 13px;
font-size: 14px;
}
input[name="address"] {
... ... @@ -1287,6 +1288,9 @@
.red {
color: $red;
margin-right: 10px;
font-size: 18px;
position: relative;
top: 4px;
}
.mg {
... ... @@ -1312,16 +1316,20 @@
z-index: 1;
> span {
width: 98%;
font-size: 13px;
line-height: 26px;
width: 92%;
font-size: 14px;
max-height: 28px;
line-height: 28px;
padding-left: 5px;
display: inline-block;
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
}
.area-text {
width: 98%;
width: 92%;
background: #fff;
color: #444;
position: absolute;
... ... @@ -1347,6 +1355,7 @@
background-color: #f8f8f8;
text-align: center;
cursor: pointer;
font-weight: 300;
}
li:first-child {
... ... @@ -1408,6 +1417,7 @@
.area-select .tab-on {
background-color: #fff;
color: $red;
font-weight: normal;
&:after {
content: '';
... ... @@ -1439,6 +1449,7 @@
background: #000;
color: #fff;
margin-right: 18px;
font-weight: 300;
}
}
}
... ... @@ -1479,6 +1490,7 @@
color: #fff;
background-color: #000;
margin-right: 4px;
font-weight: 300;
}
}
... ... @@ -1615,6 +1627,7 @@
.save-invoice {
background-color: #000;
color: #fff;
font-weight: 300;
}
}
}
... ...