...
|
...
|
@@ -14,6 +14,8 @@ var phoneReg = /^(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/; |
|
|
|
|
|
var validate = require('./order/validation');
|
|
|
|
|
|
var imgBoxTpl = require('../../tpl/me/thumbnail.hbs');
|
|
|
|
|
|
var validateMap = {
|
|
|
user: {
|
|
|
sl: '#user',
|
...
|
...
|
@@ -400,6 +402,17 @@ function initAddr(areaCode) { |
|
|
}
|
|
|
}
|
|
|
|
|
|
function bindImgDeleteEvent() {
|
|
|
$('.operation-box .delete').off('click').on('click', function() {
|
|
|
var $thumb = $(this).closest('.thumb-box');
|
|
|
var $t = $thumb.siblings('.img-up-tip');
|
|
|
var number = $('.thumb-box').length - 1;
|
|
|
|
|
|
$t.text(number + '/4');
|
|
|
$thumb.remove();
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function bindUploadEvent() {
|
|
|
var $tip = $('.img-up-tip');
|
|
|
|
...
|
...
|
@@ -419,12 +432,13 @@ function bindUploadEvent() { |
|
|
var $t;
|
|
|
|
|
|
if (result.code === 200) {
|
|
|
img = '<img class="envidence" src="' + result.data + '" alt="凭证图片">';
|
|
|
img = imgBoxTpl({src: result.data});
|
|
|
$t = $(that).next('.img-up-tip');
|
|
|
|
|
|
$(that).before(img);
|
|
|
number += 1;
|
|
|
$t.text(number + '/4');
|
|
|
bindImgDeleteEvent();
|
|
|
} else {
|
|
|
new _alert(result.message).show();
|
|
|
}
|
...
|
...
|
|