wpfw_ewei_shopv2/plugin/exhelper/static/js/exhelper.js
2023-02-14 19:57:32 +08:00

19 lines
505 B
JavaScript

var Exhelper = {
options: {}
};
Exhelper.init = function(o){
this.options.baseurl = o.baseurl ;
}
Exhelper.getUrl = function(segs,params){
var ops = segs.split('/');
return this.options.baseurl + "&method=" + ops[0] +"&op=" + ops[1] + "&" + params;
}
Exhelper.preview =function(id){
var url = this.getUrl('express/perview','id='+id);
$('#modal-module-preview').modal().find('iframe').get(0).setAttribute('src', url);
}