Skip to content
切换导航面板
P
项目
G
群组
S
代码片段
帮助
成立
/
weiduh5
当前项目
正在载入...
登录
切换导航面板
转到一个项目
项目
版本库
问题
0
合并请求
0
流水线
维基
代码片段
设置
活动
图像
图表
创建新的问题
作业
提交
问题看板
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
82204409
authored
Nov 28, 2017
by
颜景龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
领取礼物
parent
2b755894
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
45 行增加
和
35 行删除
gift/gift.html
gift/left_black.png
gift/left_white.png
gift/gift.html
查看文件 @
82204409
...
...
@@ -192,9 +192,19 @@
text-align
:
right
;
}
.return-img
{
background
:
#ccc
;
border-radius
:
2rem
;
z-index
:
11
;
height
:
2rem
;
width
:
2rem
;
margin
:
0.5rem
;
}
</style>
</head>
<body>
<img
id=
"return-img"
class=
"return-img"
src=
"./left_white.png"
/>
<div
class=
"class-banner"
>
</div>
<div
class=
"gift-panel clearfix"
>
...
...
@@ -260,7 +270,7 @@
<p
id=
"description"
class=
"description"
></p>
<div
class=
"form-panel"
>
<form
class=
"zform"
action=
"http://www.baidu.com"
id=
"uploadForm"
>
<form
class=
"zform"
id=
"uploadForm"
>
<input
type=
"hidden"
data-required=
"true"
data-descriptions=
"id"
name=
"id"
id=
"id"
>
<input
type=
"hidden"
data-required=
"true"
data-descriptions=
"customerUserId"
name=
"customerUserId"
id=
"customerUserId"
>
<div
class=
"zform-control"
>
...
...
@@ -289,7 +299,7 @@
<script
src=
"https://cdn.bootcss.com/zepto/1.2.0/zepto.min.js"
></script>
<script
src=
"../js/zepto-mvalidate.js"
></script>
<script
type=
"text/javascript"
>
var
HTTP_URL
=
'http://192.168.31.28:8080/wei
do'
;
var
HTTP_URL
=
'http://192.168.31.217:8080/we
do'
;
function
getUrlParam
(
name
)
{
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
);
//构造一个含有目标参数的正则表达式对象
...
...
@@ -380,38 +390,33 @@
firstInvalidFocus
:
true
,
valid
:
function
(
event
,
options
){
//点击提交按钮时,表单通过验证触发函数
var
body
=
{
id
:
$
(
"#id"
).
val
(),
consigneeName
:
$
(
"#consigneeName"
).
val
(),
telephone
:
$
(
"#telephone"
).
val
(),
address
:
$
(
"#address"
).
val
(),
customerUserId
:
$
(
"#customerUserId"
).
val
()
};
event
.
preventDefault
();
// $.ajax({
// type: 'POST',
// url: HTTP_URL+"/wedofit/gift/info",
// data: JSON.stringify({
// customerUserId: id,
// id: 8356215132383232
// }),
// contentType: 'application/json',
// dataType: 'json',
// success: function(result){
// if (result.code == 0) {
// var data = result.data;
// initGiftList(data.giftInfo);
// $('.class-banner').css({'background-image': `url(${HTTP_URL}${data.imgPath})`});
// }
// },
// error: function(xhr, type){
// alert('Ajax error!')
// }
// });
event
.
preventDefault
();
var
body
=
{
giftId
:
parseInt
(
$
(
"#id"
).
val
()),
consigneeName
:
$
(
"#consigneeName"
).
val
(),
telephone
:
$
(
"#telephone"
).
val
(),
address
:
$
(
"#address"
).
val
(),
userId
:
parseInt
(
$
(
"#customerUserId"
).
val
())
};
$
.
ajax
({
type
:
'POST'
,
url
:
HTTP_URL
+
"/wedofit/gift/getGift"
,
data
:
JSON
.
stringify
(
body
),
contentType
:
'application/json'
,
dataType
:
'json'
,
success
:
function
(
result
){
if
(
result
.
code
==
0
)
{
location
.
href
=
"ydl://goback"
;
}
else
{
alert
(
result
.
data
);
}
},
error
:
function
(
xhr
,
type
){
alert
(
'系统错误!'
);
}
});
},
eachValidField
:
function
(
val
){},
...
...
@@ -434,7 +439,12 @@
required
:
'请填写收获地址'
},
}
});
});
$
(
"#return-img"
).
on
(
'click'
,
function
(
e
){
location
.
href
=
"ydl://goback"
;
});
});
</script>
</body>
...
...
gift/left_black.png
0 → 100644
查看文件 @
82204409
1.21 KB
gift/left_white.png
0 → 100644
查看文件 @
82204409
699 Bytes
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此消息的编辑!
取消
请
注册
或
登录
后发表评论