Authored by 陈轩

商品详情页 领券 cmd

@@ -154,6 +154,6 @@ require('./detail/page-render')(function() { @@ -154,6 +154,6 @@ require('./detail/page-render')(function() {
154 154
155 $(function() { 155 $(function() {
156 if ($('#product-coupon-switch').val() === 'true') { 156 if ($('#product-coupon-switch').val() === 'true') {
157 - require(['./detail/brand-coupon']); // amd 157 + require('./detail/brand-coupon'); // amd
158 } 158 }
159 }); 159 });
1 -/* global define */  
2 -// amd  
3 -define(function(require) {  
4 - 'use strict'; 1 +'use strict';
5 2
6 - /** 3 +/**
7 * 商品详情: 品牌券 4 * 商品详情: 品牌券
8 */ 5 */
9 - var tip = require('plugin/tip');  
10 - var $ = require('yoho-jquery');  
11 - var $body = $(document.body); 6 +var tip = require('plugin/tip');
  7 +var $ = require('yoho-jquery');
  8 +var $body = $(document.body);
12 9
13 - var brandCoupon = { 10 +var brandCoupon = {
14 skn: null, 11 skn: null,
15 brandId: null, 12 brandId: null,
16 $entry: null, 13 $entry: null,
@@ -116,10 +113,9 @@ define(function(require) { @@ -116,10 +113,9 @@ define(function(require) {
116 this.$couponDrawer.toggleClass('open', bool); 113 this.$couponDrawer.toggleClass('open', bool);
117 $body.toggleClass('coupon-drawer-open', bool); 114 $body.toggleClass('coupon-drawer-open', bool);
118 } 115 }
119 - }; 116 +};
120 117
121 - brandCoupon.init( 118 +brandCoupon.init(
122 $('#productSkn').val(), 119 $('#productSkn').val(),
123 $('#brand-id').val() 120 $('#brand-id').val()
124 - );  
125 -}); 121 +);