更新第三方登录插件扩展

This commit is contained in:
2020-04-19 21:03:28 +08:00
parent 48d8de4946
commit 1a68cddd1c
18 changed files with 793 additions and 53 deletions

View File

@@ -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
});
});
});
});