Authored by 陈轩

限定商品的JS

@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 'use strict'; 7 'use strict';
8 8
9 const mRoot = '../models'; 9 const mRoot = '../models';
  10 +const appSrc = require('../../../config/download');
10 const headerModel = require('../../../doraemon/models/header'); // 头部model 11 const headerModel = require('../../../doraemon/models/header'); // 头部model
11 const detailModel = require(`${mRoot}/detail`); // 商品详情 model 12 const detailModel = require(`${mRoot}/detail`); // 商品详情 model
12 const introModel = require(`${mRoot}/intro`); // 商品尺码信息 model 13 const introModel = require(`${mRoot}/intro`); // 商品尺码信息 model
@@ -259,6 +260,9 @@ exports.consultsubmit = (req, res, next) => { @@ -259,6 +260,9 @@ exports.consultsubmit = (req, res, next) => {
259 * 限定商品 详情页; 260 * 限定商品 详情页;
260 */ 261 */
261 exports.limit = (req, res, next) => { 262 exports.limit = (req, res, next) => {
  263 + res.locals.module = 'product';
  264 + res.locals.page = 'limit';
  265 +
262 const uid = req.user.uid; 266 const uid = req.user.uid;
263 const productCode = (req.query.code || '').trim(); 267 const productCode = (req.query.code || '').trim();
264 268
@@ -272,7 +276,7 @@ exports.limit = (req, res, next) => { @@ -272,7 +276,7 @@ exports.limit = (req, res, next) => {
272 return next(); 276 return next();
273 } 277 }
274 278
275 - result.appSrc = 'http://www.yohoshow.com/about/index/yohobuyqr/'; 279 + result.appSrc = appSrc.common;
276 result.wxshare = { 280 result.wxshare = {
277 shareLink: helpers.urlFormat('/product/detail/limit', {code: productCode}), 281 shareLink: helpers.urlFormat('/product/detail/limit', {code: productCode}),
278 shareImg: result.banner.replace('//', 'http://'), 282 shareImg: result.banner.replace('//', 'http://'),
@@ -48,7 +48,6 @@ @@ -48,7 +48,6 @@
48 </div> 48 </div>
49 </div> 49 </div>
50 {{#wxshare}} 50 {{#wxshare}}
51 - <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>  
52 <input id="shareLink" type="hidden" value="{{shareLink}}"> 51 <input id="shareLink" type="hidden" value="{{shareLink}}">
53 <input id="shareImg" type="hidden" value="{{shareImg}}"> 52 <input id="shareImg" type="hidden" value="{{shareImg}}">
54 <input id="shareTitle" type="hidden" value="{{shareTitle}}"> 53 <input id="shareTitle" type="hidden" value="{{shareTitle}}">
  1 +module.exports = {
  2 + common: 'http://www.yohoshow.com/about/index/yohobuyqr/',
  3 + android: '',
  4 + iphone: '',
  5 + ipad: ''
  6 +};
  1 +var shareAction = require('common/share');
  2 +
  3 +$(function() {
  4 + shareAction({
  5 + title: $('#shareTitle').val(),
  6 + link: $('#shareLink').val(),
  7 + desc: $('#shareDesc').val(),
  8 + imgUrl: $('#shareImg').val(),
  9 + });
  10 +});