Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
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
71884c8a50dc1e9201a41e678f494321f3d49aff
1 parent
79746a81
限定商品的JS
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
2 deletions
apps/product/controllers/detail.js
apps/product/views/action/detail/limit.hbs
config/download.js
public/js/product/limit.page.js
apps/product/controllers/detail.js
View file @
71884c8
...
...
@@ -7,6 +7,7 @@
'use strict'
;
const
mRoot
=
'../models'
;
const
appSrc
=
require
(
'../../../config/download'
);
const
headerModel
=
require
(
'../../../doraemon/models/header'
);
// 头部model
const
detailModel
=
require
(
`
$
{
mRoot
}
/detail`
)
; /
/
商品详情
model
const
introModel
=
require
(
`
$
{
mRoot
}
/intro`
)
; /
/
商品尺码信息
model
...
...
@@ -259,6 +260,9 @@ exports.consultsubmit = (req, res, next) => {
* 限定商品 详情页;
*/
exports
.
limit
=
(
req
,
res
,
next
)
=>
{
res
.
locals
.
module
=
'product'
;
res
.
locals
.
page
=
'limit'
;
const
uid
=
req
.
user
.
uid
;
const
productCode
=
(
req
.
query
.
code
||
''
).
trim
();
...
...
@@ -272,7 +276,7 @@ exports.limit = (req, res, next) => {
return
next
();
}
result
.
appSrc
=
'http://www.yohoshow.com/about/index/yohobuyqr/'
;
result
.
appSrc
=
appSrc
.
common
;
result
.
wxshare
=
{
shareLink
:
helpers
.
urlFormat
(
'/product/detail/limit'
,
{
code
:
productCode
}),
shareImg
:
result
.
banner
.
replace
(
'//'
,
'http://'
),
...
...
apps/product/views/action/detail/limit.hbs
View file @
71884c8
...
...
@@ -48,7 +48,6 @@
</div>
</div>
{{#
wxshare
}}
<script
type=
"text/javascript"
src=
"//res.wx.qq.com/open/js/jweixin-1.0.0.js"
></script>
<input
id=
"shareLink"
type=
"hidden"
value=
"
{{
shareLink
}}
"
>
<input
id=
"shareImg"
type=
"hidden"
value=
"
{{
shareImg
}}
"
>
<input
id=
"shareTitle"
type=
"hidden"
value=
"
{{
shareTitle
}}
"
>
...
...
config/download.js
0 → 100644
View file @
71884c8
module
.
exports
=
{
common
:
'http://www.yohoshow.com/about/index/yohobuyqr/'
,
android
:
''
,
iphone
:
''
,
ipad
:
''
};
...
...
public/js/product/limit.page.js
0 → 100644
View file @
71884c8
var
shareAction
=
require
(
'common/share'
);
$
(
function
()
{
shareAction
({
title
:
$
(
'#shareTitle'
).
val
(),
link
:
$
(
'#shareLink'
).
val
(),
desc
:
$
(
'#shareDesc'
).
val
(),
imgUrl
:
$
(
'#shareImg'
).
val
(),
});
});
...
...
Please
register
or
login
to post a comment