Skip to content
切换导航面板
P
项目
G
群组
S
代码片段
帮助
成立
/
weiduh5
当前项目
正在载入...
登录
切换导航面板
转到一个项目
项目
版本库
问题
0
合并请求
0
流水线
维基
代码片段
设置
活动
图像
图表
创建新的问题
作业
提交
问题看板
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3d8b6e0d
authored
Dec 08, 2017
by
颜景龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
礼物页面
parent
9229b923
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
36 行增加
和
13 行删除
gift/gift.html
gift/giftindex.html
readmine.md
归档.zip
gift/gift.html
查看文件 @
3d8b6e0d
...
@@ -107,6 +107,7 @@
...
@@ -107,6 +107,7 @@
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
overflow
:
hidden
;
color
:
#000
;
color
:
#000
;
line-height
:
1.375rem
;
}
}
.card-type
{
.card-type
{
...
@@ -201,6 +202,7 @@
...
@@ -201,6 +202,7 @@
height
:
2rem
;
height
:
2rem
;
width
:
2rem
;
width
:
2rem
;
margin
:
0.5rem
;
margin
:
0.5rem
;
margin-top
:
1.2rem
;
}
}
</style>
</style>
...
@@ -328,7 +330,7 @@
...
@@ -328,7 +330,7 @@
var cardFooter = $("
<
div
class
=
'card-footer'
><
/div>"
)
;
var cardFooter = $("
<
div
class
=
'card-footer'
><
/div>"
)
;
var
cardType
=
$
(
"
<
div
class
=
'card-type'
><
/div>"
)
;
var
cardType
=
$
(
"
<
div
class
=
'card-type'
><
/div>"
)
;
$
(
'
<
span
class
=
"gift-name"
><
/span>'
)
.text
(
list
[
i
]
.name
)
.appendTo
(
cardType
)
;
$
(
'
<
span
class
=
"gift-name"
><
/span>'
)
.text
(
list
[
i
]
.name
)
.appendTo
(
cardType
)
;
$
(
'
<
span
class
=
"gift-price"
><
/span>'
)
.text
(
list
[
i
]
.price
)
.appendTo
(
cardType
)
;
$
(
'
<
span
class
=
"gift-price"
><
/span>'
)
.text
(
'¥ '+
list
[
i
]
.price
)
.appendTo
(
cardType
)
;
cardFooter
.
append
(
cardType
);
cardFooter
.
append
(
cardType
);
$
(
"
<
p
><
/p>"
)
.text
(
list
[
i
]
.description
)
.appendTo
(
cardFooter
)
;
$
(
"
<
p
><
/p>"
)
.text
(
list
[
i
]
.description
)
.appendTo
(
cardFooter
)
;
...
@@ -391,9 +393,7 @@
...
@@ -391,9 +393,7 @@
sendForm
:
true
,
sendForm
:
true
,
firstInvalidFocus
:
true
,
firstInvalidFocus
:
true
,
invalid
:
function
()
{
invalid
:
function
()
{
setTimeout
(()
=>
{
console
.
log
(
$
(
'.field-tooltipWrap'
).
children
().
children
().
children
());
},
500
);
},
},
valid
:
function
(
event
,
options
){
valid
:
function
(
event
,
options
){
//点击提交按钮时,表单通过验证触发函数
//点击提交按钮时,表单通过验证触发函数
...
@@ -415,6 +415,7 @@
...
@@ -415,6 +415,7 @@
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
result
){
success
:
function
(
result
){
if
(
result
.
code
==
0
)
{
if
(
result
.
code
==
0
)
{
$
(
"#uploadForm"
)[
0
].
reset
();
location
.
href
=
"ydl://goback"
;
location
.
href
=
"ydl://goback"
;
}
else
{
}
else
{
alert
(
result
.
data
);
alert
(
result
.
data
);
...
...
gift/giftindex.html
查看文件 @
3d8b6e0d
...
@@ -58,13 +58,14 @@
...
@@ -58,13 +58,14 @@
height
:
2rem
;
height
:
2rem
;
width
:
2rem
;
width
:
2rem
;
margin
:
0.5rem
;
margin
:
0.5rem
;
margin-top
:
1.2rem
;
}
}
</style>
</style>
</head>
</head>
<body>
<body>
<img
id=
"return-img"
class=
"return-img"
src=
"./left_white.png"
/>
<img
id=
"return-img"
class=
"return-img"
src=
"./left_white.png"
/>
<img
class=
"img"
src=
"./giftindex.jpg"
>
<img
class=
"img"
src=
"./giftindex.jpg"
>
<
button
type=
"submit"
id=
"submitBtn"
class=
"zbtn zbtn-full zbtn-lg submit-btn"
>
参加活动
</button>
<
!-- <button type="submit" id="submitBtn" class="zbtn zbtn-full zbtn-lg submit-btn">参加活动</button> -->
<script
src=
"https://cdn.bootcss.com/zepto/1.2.0/zepto.min.js"
></script>
<script
src=
"https://cdn.bootcss.com/zepto/1.2.0/zepto.min.js"
></script>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
function
getUrlParam
(
name
)
{
function
getUrlParam
(
name
)
{
...
@@ -73,6 +74,13 @@
...
@@ -73,6 +74,13 @@
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
=
'http://192.168.31.217:8080/wedo'
;
var
id
=
getUrlParam
(
'id'
);
var
customerUserId
=
getUrlParam
(
'customerUserId'
);
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
window
).
ready
(
function
(){
$
(
window
).
ready
(
function
(){
...
@@ -82,14 +90,27 @@
...
@@ -82,14 +90,27 @@
$
(
'html'
).
css
({
'font-size'
:
$
(
window
).
width
()
/
375
*
16
});
$
(
'html'
).
css
({
'font-size'
:
$
(
window
).
width
()
/
375
*
16
});
});
});
$
(
"#submitBtn"
).
on
(
'click'
,
function
(
e
){
if
(
id
&&
customerUserId
)
{
var
id
=
getUrlParam
(
'id'
);
$
.
ajax
({
var
customerUserId
=
getUrlParam
(
'customerUserId'
);
type
:
'get'
,
url
:
HTTP_URL
+
"/wedofit/gift/isAcquireGift/"
+
customerUserId
,
if
(
id
&&
customerUserId
)
{
contentType
:
'application/json'
,
location
.
href
=
'./gift.html?id='
+
id
+
"&customerUserId="
+
customerUserId
;
dataType
:
'json'
,
success
:
function
(
result
){
if
(
result
.
code
==
0
&&
result
.
data
.
status
)
{
$
(
'
<
button
type
=
"submit"
id
=
"submitBtn"
class
=
"zbtn zbtn-full zbtn-lg submit-btn"
>
参加活动
<
/button>'
)
.appendTo
(
$
(
"body"
))
;
$
(
"#submitBtn"
).
on
(
'click'
,
function
(
e
){
if
(
id
&&
customerUserId
)
{
location
.
href
=
'./gift.html?id='
+
id
+
"&customerUserId="
+
customerUserId
;
}
});
}
},
error
:
function
(
xhr
,
type
){
alert
(
'Ajax error!'
)
}
}
});
});
}
$
(
"#return-img"
).
on
(
'click'
,
function
(
e
){
$
(
"#return-img"
).
on
(
'click'
,
function
(
e
){
...
...
readmine.md
查看文件 @
3d8b6e0d
...
@@ -25,5 +25,5 @@
...
@@ -25,5 +25,5 @@
### 礼品活动页面(id="活动id", customerUserId="用户id")
### 礼品活动页面(id="活动id", customerUserId="用户id")
> http://192.168.31.182:8080/wedo-fit/htmlpages/course/gift/gift.html?id=8356215132383232&customerUserId=8355171395831808
> http://192.168.31.182:8080/wedo-fit/htmlpages/course/gift/gift.html?id=8356215132383232&customerUserId=8355171395831808
### 礼品展示页面
### 礼品展示页面
(id="活动id", customerUserId="用户id")
> http://192.168.31.182:8080/wedo-fit/htmlpages/course/gift/giftindex.html
> http://192.168.31.182:8080/wedo-fit/htmlpages/course/gift/giftindex.html
\ No newline at end of file
归档.zip
deleted
100644 → 0
查看文件 @
9229b923
此文件类型无法预览
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此消息的编辑!
取消
请
注册
或
登录
后发表评论