Authored by 陈轩

商品详情页 领券 cmd

... ... @@ -154,6 +154,6 @@ require('./detail/page-render')(function() {
$(function() {
if ($('#product-coupon-switch').val() === 'true') {
require(['./detail/brand-coupon']); // amd
require('./detail/brand-coupon'); // amd
}
});
... ...
/* global define */
// amd
define(function(require) {
'use strict';
'use strict';
/**
/**
* 商品详情: 品牌券
*/
var tip = require('plugin/tip');
var $ = require('yoho-jquery');
var $body = $(document.body);
var tip = require('plugin/tip');
var $ = require('yoho-jquery');
var $body = $(document.body);
var brandCoupon = {
var brandCoupon = {
skn: null,
brandId: null,
$entry: null,
... ... @@ -116,10 +113,9 @@ define(function(require) {
this.$couponDrawer.toggleClass('open', bool);
$body.toggleClass('coupon-drawer-open', bool);
}
};
};
brandCoupon.init(
brandCoupon.init(
$('#productSkn').val(),
$('#brand-id').val()
);
});
);
... ...