更新第三方登录插件扩展
This commit is contained in:
@@ -398,18 +398,16 @@ define(['jquery', 'bootstrap', 'validator'], function ($, undefined, Validator)
|
||||
return true;
|
||||
}
|
||||
var template = $(this).data("template");
|
||||
var json = [];
|
||||
var json = {};
|
||||
try {
|
||||
var d = textarea.val().split(/[\n,]/g);
|
||||
d.map(function(item, i){
|
||||
json.push(item.split(":"))
|
||||
})
|
||||
// json = JSON.parse(textarea.val());
|
||||
json = JSON.parse(textarea.val());
|
||||
} catch (e) {
|
||||
}
|
||||
$.each(json, function (i, j) {
|
||||
var item = (j.length > 0) ? {key:j[0],value:j[1],other:j[2]} : {key:i,value:j[0]};
|
||||
$(".btn-append,.append", container).trigger('click', template ? j : item);
|
||||
$(".btn-append,.append", container).trigger('click', template ? j : {
|
||||
key: i,
|
||||
value: j
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user