var jsplugin = {
/**
* @名称 音乐插件
* @兼容 google
* @目录 jq223185
*/
jq2020110514180989: function (audio_name, audio_src) {
localStorage.setItem('jsplugin2020110514180989', JSON.stringify({
"audio_name": audio_name,
"audio_src": audio_src,
}));
layer.open({
title: audio_name,
type: 2,
area: ['500px', '500px'], //宽高
content: '/jsplugin/google/jq223185/jq223185.html?v=' + Math.round(Math.random() * 10 + 10)
});
},
/**
* @名称 平台监管措施
* @兼容 dogie9
* @目录 copywriting
*/
jq2020110514590989: function (thisOpenPage) {
if (thisOpenPage) {
window.open('/jsplugin/dogie9/copywriting/平台监管措施.html?v=' + Math.round(Math.random() * 10 + 10));
} else {
layer.open({
title: '平台监管措施',
type: 2,
area: ['70%', '70%'], //宽高
content: '/jsplugin/dogie9/copywriting/平台监管措施.html?v=' + Math.round(Math.random() * 10 + 10)
});
}
},
/**
* @名称 信息内容审核制度
* @兼容 dogie9
* @目录 copywriting
*/
jq2020110515120989: function (thisOpenPage) {
if (thisOpenPage) {
window.open('/jsplugin/dogie9/copywriting/信息内容审核制度.html?v=' + Math.round(Math.random() * 10 + 10));
} else {
layer.open({
title: '信息内容审核制度',
type: 2,
area: ['70%', '70%'], //宽高
content: '/jsplugin/dogie9/copywriting/信息内容审核制度.html?v=' + Math.round(Math.random() * 10 + 10)
});
}
},
/**
* @名称 分页代码
* @兼容 dogie9
* @目录 paging
*/
jq2020111214070989: function (listObj, pagenumber, type, default_page) {
if (!listObj) { return ''; }
if ((typeof listObj == 'object') && (JSON.stringify(listObj) == '{}')) { return ''; }
if (!pagenumber) { pagenumber = 3; }
if (!type) { type = 0; }
if (location.search) {
var search = location.search + '&';
search = search.replace(/page=(.*?)&/g, '');
search = search + '&';
search = search.replace(/&&/g, '&');
} else {
var search = '?';
}
// 如果没有页码值
if (!listObj.current_page) {
listObj.current_page = 1;
}
if (!listObj.last_page) {
listObj.last_page = pagenumber;
}
// 如果没有输入默认页码
if (!default_page) {
default_page = Number(listObj.current_page);
} else {
listObj.current_page = Number(default_page);
}
// 上一页页码
if (listObj.current_page > 1) {
var s_current_page = listObj.current_page - 1;
} else {
var s_current_page = listObj.current_page;
}
// 下一页页码
if (listObj.current_page < listObj.last_page) {
var x_current_page = listObj.current_page + 1;
} else {
var x_current_page = listObj.current_page;
}
if (type == 0) {
var html_string = '';
html_string += '';
html_string += '
';
html_string += '
»
';
html_string += '
末页
';
html_string += '
';
// 初始页码按钮数
var pageq;
if (listObj.current_page > (Math.ceil(pagenumber / 2))) {
pageq = listObj.current_page - (Math.floor(pagenumber / 2));
} else {
pageq = 1;
}
var newnumber = 1;
for (var i = pageq; i <= listObj.last_page; i++) {
if (newnumber <= pagenumber) {
if (default_page == i) {
html_string += '- ' + i + '
';
} else {
html_string += '- ' + i + '
';
}
newnumber++;
}
}
html_string += '
';
html_string += '
首页
';
html_string += '
«
';
html_string += '
';
html_string += '
';
return html_string;
}
if (type == 1) {
var html_string = '';
html_string += '';
html_string += '';
html_string += '
';
html_string += '
首页';
html_string += '
上一页';
// 初始页码按钮数
var pageq;
if (listObj.current_page > (Math.ceil(pagenumber / 2))) {
pageq = listObj.current_page - (Math.floor(pagenumber / 2));
} else {
pageq = 1;
}
var newnumber = 1;
for (var i = pageq; i <= listObj.last_page; i++) {
if (newnumber <= pagenumber) {
if (default_page == i) {
html_string += '
' + i + '';
} else {
html_string += '
' + i + '';
}
newnumber++;
}
}
html_string += '
下一页';
html_string += '
尾页';
html_string += '
';
html_string += '
';
html_string += '';
return html_string;
}
if (type == 2) {
var html_string = '';
html_string += '';
html_string += '';
html_string += '
';
html_string += '- 首页
';
html_string += '- 上一页
';
// 初始页码按钮数
var pageq;
if (listObj.current_page > (Math.ceil(pagenumber / 2))) {
pageq = listObj.current_page - (Math.floor(pagenumber / 2));
} else {
pageq = 1;
}
var newnumber = 1;
for (var i = pageq; i <= listObj.last_page; i++) {
if (newnumber <= pagenumber) {
if (default_page == i) {
html_string += '- ' + i + '
';
} else {
html_string += '- ' + i + '
';
}
newnumber++;
}
}
html_string += '- 下一页
';
html_string += '- 尾页
';
html_string += '
';
html_string += '
';
return html_string;
}
},
/**
* @名称 维权中心
* @兼容 dogie9
* @目录 copywriting
*/
jq2020111711330989: function (thisOpenPage) {
if (thisOpenPage) {
window.open('/jsplugin/dogie9/copywriting/维权中心.html?v=' + Math.round(Math.random() * 10 + 10));
} else {
layer.open({
title: '维权中心',
type: 2,
area: ['70%', '70%'], //宽高
content: '/jsplugin/dogie9/copywriting/维权中心.html?v=' + Math.round(Math.random() * 10 + 10)
});
}
},
/**
* @名称 消费者保障中心
* @兼容 dogie9
* @目录 copywriting
*/
jq2020111711340989: function (uuid, thisOpenPage) {
if (thisOpenPage) {
window.open('/jsplugin/dogie9/copywriting/消费者保障中心.php?uuid=' + uuid);
} else {
layer.open({
title: '消费者保障中心',
type: 2,
area: ['70%', '70%'], //宽高
content: '/jsplugin/dogie9/copywriting/消费者保障中心.php?uuid=' + uuid
});
}
},
/**
* @名称 隐私政策
* @兼容 dogie9
* @目录 copywriting
*/
jq2020112014020989: function (uuid, thisOpenPage) {
if (thisOpenPage) {
window.open('/jsplugin/dogie9/copywriting/隐私政策.php?uuid=' + uuid);
} else {
layer.open({
title: '隐私政策',
type: 2,
area: ['70%', '70%'], //宽高
content: '/jsplugin/dogie9/copywriting/隐私政策.php?uuid=' + uuid
});
}
},
/**
* @名称 用户注册协议
* @兼容 dogie9
* @目录 copywriting
*/
jq2020112014030989: function (uuid, thisOpenPage) {
if (thisOpenPage) {
window.open('/jsplugin/dogie9/copywriting/用户注册协议.php?uuid=' + uuid);
} else {
layer.open({
title: '用户注册协议',
type: 2,
area: ['70%', '70%'], //宽高
content: '/jsplugin/dogie9/copywriting/用户注册协议.php?uuid=' + uuid
});
}
},
/**
* @名称 个人中心【ICP】
* @兼容 dogie9
* @目录 personal_center
*/
jq2020112311060989: function (VConfigObj) {
if (!VConfigObj) {
layer.msg('个人中心插件缺少配置信息');
return;
}
if (typeof VConfigObj != 'object') {
layer.msg('个人中心插件配置信息错误');
return;
}
if (!VConfigObj.webconfig) {
layer.msg('个人中心插件配置信息,缺少网站配置UUID参数');
return;
}
for (var i in VConfigObj.list) {
VConfigObj.list[i].desc_url = location.pathname.replace(
/js_(app|page|)_\w{16,}/ig,
VConfigObj.list[i].desc_url
);
}
Api.get({
http: '/js-api/mysql/first_webconfig',
data: {
"uuid": VConfigObj.webconfig
},
success: function (result) {
localStorage.setItem('jq2020112311060989', JSON.stringify({
webConfig: result.data,
listArray: VConfigObj.list
}));
window.open('/jsplugin/dogie9/personal_center/v1/index.php');
},
});
},
/**
* @名称 个人中心【EDI】
* @兼容 dogie9
* @目录 personal_center
*/
jq2020112709540989: function (VConfigObj, param) {
if (!param) {
param = '';
}
if (!VConfigObj) {
layer.msg('个人中心插件缺少配置信息');
return;
}
if (typeof VConfigObj != 'object') {
layer.msg('个人中心插件配置信息错误');
return;
}
if (!VConfigObj.webconfig) {
layer.msg('个人中心插件配置信息,缺少网站配置UUID参数');
return;
}
VConfigObj.goods_url = location.pathname.replace(
/js_(app|page|)_\w{16,}/ig,
VConfigObj.goods_url
);
Api.get({
http: '/js-api/mysql/first_webconfig',
data: {
"uuid": VConfigObj.webconfig
},
success: function (result) {
localStorage.setItem('jq2020112311060989', JSON.stringify({
webConfig: result.data,
goods_url: VConfigObj.goods_url
}));
window.open('/jsplugin/dogie9/personal_center/v2/index.php?uuid=' + VConfigObj.webconfig + param);
},
});
},
/**
* @名称 商家入驻流程细则及费用
* @兼容 dogie9
* @目录 copywriting
*/
jq2020120811270989: function (thisOpenPage) {
if (thisOpenPage) {
window.open('/jsplugin/dogie9/copywriting/商家入驻流程细则及费用.php');
} else {
layer.open({
title: '商家入驻流程细则及费用',
type: 2,
area: ['70%', '70%'], //宽高
content: '/jsplugin/dogie9/copywriting/商家入驻流程细则及费用.php'
});
}
},
/**
* @名称 七天无理由退换货
* @兼容 dogie9
* @目录 copywriting
*/
jq2021012715230989: function (thisOpenPage) {
if (thisOpenPage) {
window.open('/jsplugin/dogie9/copywriting/jq2021012715230989/default.html?v=' + Math.round(Math.random() * 10 + 10));
} else {
layer.open({
title: '七天无理由退换货',
type: 2,
area: ['70%', '70%'], //宽高
content: '/jsplugin/dogie9/copywriting/jq2021012715230989/default.html?v=' + Math.round(Math.random() * 10 + 10)
});
}
},
/**
* @名称 播放音乐插件
* @兼容 dogie9
*/
jq2021042214280989: function (name, src, text) {
var my_html = '';
my_html = my_html + '';
my_html = my_html + '';
my_html = my_html + '' + text + '
';
layer.open({
title: name,
type: 1,
area: ['400px', '400px'], //宽高
content: my_html
});
}
};