12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- jcapp = {}
- // jcapp.test_server = "http://w.eqbidding.com";
- jcapp.test_server = "http://www.eqbidding.com";
- // 获取服务器 ip+端口
- function getServerHttp(type) {
- var host = document.domain;
- var port = '';
- if (type == null) {
- port = ':16027';
- type = '/web-back'
- } else if (type == 'expert') {
- port = ':16026';
- type = '/web-expert'
- } else if (type == 'cp') {
- port = ':16025';
- type = '/web-cp-all'
- }
- if (host.indexOf('eqbidding') == -1) {
- host = jcapp.test_server + type;
- } else {
- //否则例如 w,www 等则直接用域名即可
- host = type;
- }
- return host;
- };
- // 转换时间戳
- function checkDateTime(time) {
- var today = new Date(time);
- var month = today.getMonth() + 1;
- var date = today.getDate();
- var year = today.getFullYear();
- month = today.getMonth() + 1;
- date = today.getDate();
- var day = today.getDay();
- var hour = today.getHours();
- var minute = today.getMinutes();
- var second = today.getSeconds();
- var dateTime = addZero(year) + "年" + addZero(month) + "月" + addZero(date) + "日 ";
- return dateTime
- }
- function addZero(num, end) {
- return num < 10 ? "0" + num : num;
- }
- function ajaxDataParames(data) {
- if (data.code !== 200) {
- // alert(data.message);
- return false;
- } else {
- return data.result;
- }
- // return data;
- }
|