Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
梁志锋
9 years ago
Commit
ce1b37f3f375fb73e31a8d9ac455a00a031cd3ba
1 parent
6ce92f53
我要咨询页面提交功能实现 code review by zhaobiao
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
8 deletions
static/js/product/detail/consultform.js
template/m.yohobuy.com/actions/product/detail/consultform.phtml
template/m.yohobuy.com/actions/product/detail/index.phtml
template/m.yohobuy.com/partials/layout/use.phtml
template/m.yohobuy.com/partials/product/feedback-tab.phtml
static/js/product/detail/consultform.js
View file @
ce1b37f
...
...
@@ -10,9 +10,6 @@ var $ = require('jquery'),
var
$consultForm
=
$
(
'.consult-form'
),
$submit
=
$
(
'#submit'
),
$content
=
$
(
'#content'
),
$footer
=
$
(
'#yoho-footer'
),
$navTitle
=
$
(
'.nav-title'
),
navTitle
=
$navTitle
.
html
(),
productId
=
$
(
'#product_id'
).
val
(),
isSubmiting
;
...
...
@@ -39,6 +36,7 @@ $content.on('focus', function() {
// 提交表单请求
$consultForm
.
on
(
'submit'
,
function
()
{
var
content
;
if
(
isSubmiting
)
{
return
false
;
}
...
...
template/m.yohobuy.com/actions/product/detail/consultform.phtml
View file @
ce1b37f
...
...
@@ -3,7 +3,7 @@
<form
class=
"consult-form"
url=
"{{formUrl}}"
>
<textarea
id=
"content"
name=
"content"
>请输入咨询内容</textarea>
<input
type=
"hidden"
id=
"product_id"
value=
"{{productId}}"
>
<a
type=
"submit"
>提交</a>
<a
type=
"submit"
id=
"submit"
>提交</a>
</form>
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/product/detail/index.phtml
View file @
ce1b37f
...
...
@@ -95,7 +95,7 @@
{
{else
}
}
<div
class=
"nodata"
>
<span>暂无商品评价和咨询</span>
<a
href=
"
/product/detail/consultform
"
class=
"go-consult"
>我要咨询<span
class=
"iconfont"
>
604
;</span></a>
<a
href=
"
{{link}}
"
class=
"go-consult"
>我要咨询<span
class=
"iconfont"
>
604
;</span></a>
</div>
{
{/if
}
}
{
{/if
}
}
...
...
@@ -130,10 +130,10 @@
</div>
{
{/cartInfo
}
}
{
{#if
introUrl
}
}
<input
id=
"introUrl"
type=
"hidden"
value=
{
{introUrl
}
}
>
<input
id=
"introUrl"
type=
"hidden"
value=
'
{
{introUrl
}
}'
>
{
{/if
}
}
{
{#if
id
}
}
<input
id=
"productId"
type=
"hidden"
value=
{
{id
}
}
>
<input
id=
"productId"
type=
"hidden"
value=
'
{
{id
}
}'
>
{
{/if
}
}
</div>
...
...
template/m.yohobuy.com/partials/layout/use.phtml
View file @
ce1b37f
<script>
seajs.use('js/common');
</script>
<script>
seajs.use('js/product/detail/consultform');
</script>
{{!-- 逛(PLUS+STAR) --}}
{{#if psList}}
<script>
...
...
template/m.yohobuy.com/partials/product/feedback-tab.phtml
View file @
ce1b37f
...
...
@@ -59,7 +59,7 @@
<span class="iconfont"></span>暂无咨询
</div>
<div class="consult-content-footer">
<a href="
/product/detail/consultform
">
<a href="
{{link}}
">
我要咨询
<span class="iconfont"></span></a>
</div>
...
...
Please
register
or
login
to post a comment