Skip to content
切换导航面板
P
项目
G
群组
S
代码片段
帮助
成立
/
weiduh5
当前项目
正在载入...
登录
切换导航面板
转到一个项目
项目
版本库
问题
0
合并请求
0
流水线
维基
代码片段
设置
活动
图像
图表
创建新的问题
作业
提交
问题看板
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a3dfc727
authored
Dec 15, 2017
by
颜景龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
礼物领取
parent
57ac99e5
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
24 行增加
和
10 行删除
gift/gift.html
gift/giftindex.html
gift/gift.html
查看文件 @
a3dfc727
...
...
@@ -348,8 +348,8 @@
<script
src=
"../js/zepto.alert.js"
></script>
<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 = 'http://192.168.31.182:8080/wedo-fit';
var
HTTP_URL
=
'http://192.168.31.217:8080/wedo'
;
function
getUrlParam
(
name
)
{
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
);
//构造一个含有目标参数的正则表达式对象
...
...
@@ -409,6 +409,7 @@
});
if
(
id
&&
customerUserId
)
{
$
.
ajax
({
type
:
'POST'
,
url
:
HTTP_URL
+
"/wedofit/gift/info"
,
...
...
@@ -436,13 +437,17 @@
}
$
(
'#submitBtn'
).
on
(
'click'
,
function
(
e
)
{
$
(
'#submitBtn'
).
addClass
(
"disabled"
);
});
$
(
"#uploadForm"
).
mvalidate
({
type
:
1
,
onKeyup
:
true
,
sendForm
:
true
,
firstInvalidFocus
:
true
,
invalid
:
function
()
{
$
(
'#submitBtn'
).
removeClass
(
"disabled"
);
},
valid
:
function
(
event
,
options
){
//点击提交按钮时,表单通过验证触发函数
...
...
@@ -456,6 +461,7 @@
userId
:
parseInt
(
$
(
"#customerUserId"
).
val
())
};
$
.
ajax
({
type
:
'POST'
,
url
:
HTTP_URL
+
"/wedofit/gift/getGift"
,
...
...
@@ -463,6 +469,7 @@
contentType
:
'application/json'
,
dataType
:
'json'
,
success
:
function
(
result
){
$
(
'#submitBtn'
).
removeClass
(
"disabled"
);
if
(
result
.
code
==
0
)
{
$
(
"#uploadForm"
)[
0
].
reset
();
$
.
dialog
({
...
...
@@ -473,7 +480,7 @@
});
}
else
{
$
.
dialog
({
content
:
result
.
data
,
content
:
result
.
message
,
title
:
'alert'
,
width
:
600
,
time
:
2000
...
...
@@ -481,7 +488,13 @@
}
},
error
:
function
(
xhr
,
type
){
alert
(
'系统错误!'
);
$
.
dialog
({
content
:
"系统错误!"
,
title
:
'alert'
,
width
:
600
,
time
:
2000
});
$
(
'#submitBtn'
).
removeClass
(
"disabled"
);
}
});
...
...
gift/giftindex.html
查看文件 @
a3dfc727
...
...
@@ -85,9 +85,9 @@
if
(
r
!=
null
)
return
unescape
(
r
[
2
]);
return
null
;
//返回参数值
}
var
HTTP_URL
=
'http://192.168.31.182:8080/wedo-fit'
;
//
var HTTP_URL = 'http://192.168.31.182:8080/wedo-fit';
//
var HTTP_URL = 'http://192.168.31.217:8080/wedo';
var
HTTP_URL
=
'http://192.168.31.217:8080/wedo'
;
var
id
=
getUrlParam
(
'id'
);
var
customerUserId
=
getUrlParam
(
'customerUserId'
);
...
...
@@ -101,6 +101,10 @@
$
(
'html'
).
css
({
'font-size'
:
$
(
window
).
width
()
/
375
*
16
});
});
setTimeout
(
function
()
{
$
(
'.loading'
).
remove
();
},
200
);
if
(
id
&&
customerUserId
)
{
$
.
ajax
({
type
:
'get'
,
...
...
@@ -115,9 +119,6 @@
location
.
href
=
'./gift.html?id='
+
id
+
"&customerUserId="
+
customerUserId
;
}
});
setTimeout
(
function
()
{
$
(
'.loading'
).
remove
();
},
200
);
}
},
error
:
function
(
xhr
,
type
){
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此消息的编辑!
取消
请
注册
或
登录
后发表评论