Commit d7ce9b46 by 颜景龙

http://地址常量

parent 4b80722f
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<meta name="format-detection" content="telephone = no"/> <meta name="format-detection" content="telephone = no"/>
<title>教练证书</title> <title>教练证书</title>
<link rel="stylesheet" type="text/css" href="../css/loading.css"> <link rel="stylesheet" type="text/css" href="../css/loading.css">
<script src="../js/constant.js"></script>
<style> <style>
html { html {
...@@ -67,7 +68,7 @@ ...@@ -67,7 +68,7 @@
</div> </div>
<script src="https://cdn.bootcss.com/zepto/1.0rc1/zepto.min.js"></script> <script src="https://cdn.bootcss.com/zepto/1.0rc1/zepto.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var HTTP_URL = 'http://192.168.31.182:8080/wedo-fit'; var HTTP_URL = CONSTANT.getConstant();
function getUrlParam(name) { function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<link rel="stylesheet" type="text/css" href="../css/validate.css"> <link rel="stylesheet" type="text/css" href="../css/validate.css">
<link rel="stylesheet" type="text/css" href="../css/form.css"> <link rel="stylesheet" type="text/css" href="../css/form.css">
<link rel="stylesheet" type="text/css" href="../css/loading.css"> <link rel="stylesheet" type="text/css" href="../css/loading.css">
<title></title> <script src="../js/constant.js"></script>
<title>礼物</title>
<style> <style>
html { html {
font-size: 16px; font-size: 16px;
...@@ -348,8 +349,8 @@ ...@@ -348,8 +349,8 @@
<script src="../js/zepto.alert.js"></script> <script src="../js/zepto.alert.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var HTTP_URL = 'http://192.168.31.182:8080/wedo-fit';
//var HTTP_URL = 'http://192.168.31.217:8080/wedo'; var HTTP_URL = CONSTANT.getConstant();
function getUrlParam(name) { function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<link rel="stylesheet" type="text/css" href="../css/validate.css"> <link rel="stylesheet" type="text/css" href="../css/validate.css">
<link rel="stylesheet" type="text/css" href="../css/form.css"> <link rel="stylesheet" type="text/css" href="../css/form.css">
<link rel="stylesheet" type="text/css" href="../css/loading.css"> <link rel="stylesheet" type="text/css" href="../css/loading.css">
<script src="../js/constant.js"></script>
<title>礼品首页</title> <title>礼品首页</title>
<style> <style>
html { html {
...@@ -85,10 +86,7 @@ ...@@ -85,10 +86,7 @@
if (r != null) return unescape(r[2]); return null; //返回参数值 if (r != null) return unescape(r[2]); return null; //返回参数值
} }
//var HTTP_URL = 'http://192.168.31.182:8080/wedo-fit'; var HTTP_URL = CONSTANT.getConstant();
var HTTP_URL = 'http://192.168.31.217:8080/wedo';
var id = getUrlParam('id'); var id = getUrlParam('id');
var customerUserId = getUrlParam('customerUserId'); var customerUserId = getUrlParam('customerUserId');
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<meta name="format-detection" content="telephone = no"/> <meta name="format-detection" content="telephone = no"/>
<title>团课详情</title> <title>团课详情</title>
<link rel="stylesheet" type="text/css" href="./css/loading.css"> <link rel="stylesheet" type="text/css" href="./css/loading.css">
<script src="./js/constant.js"></script>
<!-- <script src="./echarts.min.js"></script> --> <!-- <script src="./echarts.min.js"></script> -->
<style> <style>
.page2 { .page2 {
...@@ -100,13 +101,13 @@ ...@@ -100,13 +101,13 @@
$(window).resize(function(){ $(window).resize(function(){
$('html').css({'font-size':$(window).width()/375*20}); $('html').css({'font-size':$(window).width()/375*20});
}); });
var apiUrl = 'http://192.168.31.182:8080/wedo-fit'; var HTTP_URL = CONSTANT.getConstant();
var id = getUrlParam('id'); var id = getUrlParam('id');
if (id) { if (id) {
var arr = []; var arr = [];
$.ajax({ $.ajax({
url: apiUrl + '/wedofit/class/group/intro/' + id, url: HTTP_URL + '/wedofit/class/group/intro/' + id,
type: 'GET', type: 'GET',
dataType: 'json', dataType: 'json',
success: function(resp){ success: function(resp){
......
var CONSTANT = (function() {
// Private static attributes.
var HTTP_URL = 'http://192.168.31.182:8080/wedo-fit';
var DATA={};
// 定义了一个静态方法
DATA.getConstant=function(){//获取常量的方法
return HTTP_URL;
}
return DATA;
})();
\ No newline at end of file
...@@ -6,10 +6,11 @@ ...@@ -6,10 +6,11 @@
<meta http-equiv="x-dns-prefetch-control" content="on"> <meta http-equiv="x-dns-prefetch-control" content="on">
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=.0, maximum-scale=.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=.0, maximum-scale=.0, user-scalable=no">
<meta name="format-detection" content="telephone = no"/> <meta name="format-detection" content="telephone = no"/>
<title>私教课程详情</title> <title>私教课程详情</title>
<link rel="stylesheet" href='./class.css'> <link rel="stylesheet" href='./class.css'>
<link rel="stylesheet" type="text/css" href="../css/loading.css"> <link rel="stylesheet" type="text/css" href="../css/loading.css">
<script src="../js/constant.js"></script>
<style> <style>
#className { #className {
width: 60%; width: 60%;
...@@ -106,8 +107,8 @@ ...@@ -106,8 +107,8 @@
</div> </div>
<script src="https://cdn.bootcss.com/zepto/1.0rc1/zepto.min.js"></script> <script src="https://cdn.bootcss.com/zepto/1.0rc1/zepto.min.js"></script>
<script> <script>
var HTTP_URL = 'http://192.168.31.182:8080/wedo-fit'; var HTTP_URL = CONSTANT.getConstant();
function getUrlParam(name) { function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
var r = window.location.search.substr(1).match(reg); //匹配目标参数 var r = window.location.search.substr(1).match(reg); //匹配目标参数
......
...@@ -8,8 +8,9 @@ ...@@ -8,8 +8,9 @@
<meta name="viewport" content="width=device-width, initial-scale=.0, maximum-scale=.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=.0, maximum-scale=.0, user-scalable=no">
<meta name="format-detection" content="telephone = no"/> <meta name="format-detection" content="telephone = no"/>
<title>私教课程详情</title> <title>私教课程详情</title>
<link rel="stylesheet" href='./class.css'> <link rel="stylesheet" href='./class.css'>
<link rel="stylesheet" type="text/css" href="../css/loading.css"> <link rel="stylesheet" type="text/css" href="../css/loading.css">
<script src="../js/constant.js"></script>
<style> <style>
#className { #className {
width: 60%; width: 60%;
...@@ -51,8 +52,7 @@ ...@@ -51,8 +52,7 @@
</div> </div>
<script src="https://cdn.bootcss.com/zepto/1.0rc1/zepto.min.js"></script> <script src="https://cdn.bootcss.com/zepto/1.0rc1/zepto.min.js"></script>
<script> <script>
//var HTTP_URL = 'http://192.168.31.217:8080/wedo'; var HTTP_URL = CONSTANT.getConstant();
var HTTP_URL = 'http://192.168.31.182:8080/wedo-fit';
function getUrlParam(name) { function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<link rel="stylesheet" href='./class.css'> <link rel="stylesheet" href='./class.css'>
<link rel="stylesheet" type="text/css" href="../css/iconfont.css"> <link rel="stylesheet" type="text/css" href="../css/iconfont.css">
<link rel="stylesheet" type="text/css" href="../css/loading.css"> <link rel="stylesheet" type="text/css" href="../css/loading.css">
<script src="../js/constant.js"></script>
<style> <style>
.detail-title { .detail-title {
background: #292C35; background: #292C35;
...@@ -84,8 +85,7 @@ ...@@ -84,8 +85,7 @@
</div> </div>
<script src="https://cdn.bootcss.com/zepto/1.0rc1/zepto.min.js"></script> <script src="https://cdn.bootcss.com/zepto/1.0rc1/zepto.min.js"></script>
<script> <script>
//var HTTP_URL = 'http://192.168.31.217:8080/wedo'; var HTTP_URL = CONSTANT.getConstant();
var HTTP_URL = 'http://192.168.31.182:8080/wedo-fit';
function getUrlParam(name) { function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<link rel="stylesheet" href='./class.css'> <link rel="stylesheet" href='./class.css'>
<link rel="stylesheet" type="text/css" href="../css/iconfont.css"> <link rel="stylesheet" type="text/css" href="../css/iconfont.css">
<link rel="stylesheet" type="text/css" href="../css/loading.css"> <link rel="stylesheet" type="text/css" href="../css/loading.css">
<script src="../js/constant.js"></script>
<style> <style>
.detail-title { .detail-title {
background: #292C35; background: #292C35;
...@@ -97,7 +98,7 @@ ...@@ -97,7 +98,7 @@
<script src="https://cdn.bootcss.com/zepto/1.0rc1/zepto.min.js"></script> <script src="https://cdn.bootcss.com/zepto/1.0rc1/zepto.min.js"></script>
<script> <script>
//var HTTP_URL = 'http://192.168.31.217:8080/wedo'; //var HTTP_URL = 'http://192.168.31.217:8080/wedo';
var HTTP_URL = 'http://192.168.31.182:8080/wedo-fit'; var HTTP_URL = CONSTANT.getConstant();
function getUrlParam(name) { function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<meta name="format-detection" content="telephone = no"/> <meta name="format-detection" content="telephone = no"/>
<title>精品团课课程详情</title> <title>精品团课课程详情</title>
<link rel="stylesheet" type="text/css" href="../css/loading.css"> <link rel="stylesheet" type="text/css" href="../css/loading.css">
<script src="../js/constant.js"></script>
<style> <style>
html { html {
...@@ -84,7 +85,8 @@ ...@@ -84,7 +85,8 @@
</div> </div>
<script src="https://cdn.bootcss.com/zepto/1.0rc1/zepto.min.js"></script> <script src="https://cdn.bootcss.com/zepto/1.0rc1/zepto.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var HTTP_URL = 'http://192.168.31.182:8080/wedo-fit';
var HTTP_URL = CONSTANT.getConstant();
function getUrlParam(name) { function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<title>精品团课课程详情</title> <title>精品团课课程详情</title>
<link rel="stylesheet" type="text/css" href="../css/iconfont.css"> <link rel="stylesheet" type="text/css" href="../css/iconfont.css">
<link rel="stylesheet" type="text/css" href="../css/loading.css"> <link rel="stylesheet" type="text/css" href="../css/loading.css">
<script src="../js/constant.js"></script>
<style> <style>
html { html {
...@@ -127,7 +128,7 @@ ...@@ -127,7 +128,7 @@
</div> </div>
<script src="https://cdn.bootcss.com/zepto/1.0rc1/zepto.min.js"></script> <script src="https://cdn.bootcss.com/zepto/1.0rc1/zepto.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var HTTP_URL = 'http://192.168.31.182:8080/wedo-fit'; var HTTP_URL = CONSTANT.getConstant();
function getUrlParam(name) { function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此消息的编辑!
注册登录 后发表评论