Authored by 陈轩

限定商品的JS

... ... @@ -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://'),
... ...
... ... @@ -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}}">
... ...
module.exports = {
common: 'http://www.yohoshow.com/about/index/yohobuyqr/',
android: '',
iphone: '',
ipad: ''
};
... ...
var shareAction = require('common/share');
$(function() {
shareAction({
title: $('#shareTitle').val(),
link: $('#shareLink').val(),
desc: $('#shareDesc').val(),
imgUrl: $('#shareImg').val(),
});
});
... ...