|
|
@@ -140,12 +140,14 @@ define(['app/app'], function (app) {
|
|
|
if ((/[^\x00-\xff]/g).test($scope.applyObj.brand)) {
|
|
|
var chineseIndex = -1;
|
|
|
for (var i = 0; i < $scope.applyObj.brand.length; i++) {
|
|
|
- if ((/[^\x00-\xff]/g).test($scope.applyObj.brand.charAt(i))) {
|
|
|
+ if ((/[^\x00-\xff]/g).test($scope.applyObj.brand.charAt(i)) && !(/[\u4e00-\u9fa5]/).test($scope.applyObj.brand.charAt(i))) {
|
|
|
chineseIndex = i;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- $scope.applyObj.brand = cutOutString($scope.applyObj.brand, chineseIndex);
|
|
|
+ if (chineseIndex > -1) {
|
|
|
+ $scope.applyObj.brand = $scope.applyObj.brand.substring(0, chineseIndex);
|
|
|
+ }
|
|
|
} else if ($scope.applyObj.brand && getRealLen($scope.applyObj.brand) > 50) {
|
|
|
$scope.applyObj.brand = cutOutString($scope.applyObj.brand, 50);
|
|
|
}
|