Authored by whb

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy.git into develop

@@ -838,6 +838,14 @@ @@ -838,6 +838,14 @@
838 }, 838 },
839 ... 839 ...
840 ], 840 ],
  841 + defaultSizes: [
  842 + {
  843 + numZero: true,
  844 + name: 'X',
  845 + numStr: '0/10'
  846 + },
  847 + ...
  848 + ]
841 849
842 totalNum: 20 850 totalNum: 20
843 } 851 }
@@ -18,7 +18,6 @@ var $chosePanel = $('#chose-panel'), @@ -18,7 +18,6 @@ var $chosePanel = $('#chose-panel'),
18 $chosed, 18 $chosed,
19 $imgsThumb, 19 $imgsThumb,
20 $leftNum, 20 $leftNum,
21 - $leftNumHtml,  
22 leftNum, 21 leftNum,
23 confirming, 22 confirming,
24 curColorIndex, 23 curColorIndex,
@@ -32,7 +31,6 @@ var $chosePanel = $('#chose-panel'), @@ -32,7 +31,6 @@ var $chosePanel = $('#chose-panel'),
32 queryString, 31 queryString,
33 $yohoPage = $('.yoho-page'); 32 $yohoPage = $('.yoho-page');
34 33
35 -  
36 //初始化购物车面板显示 34 //初始化购物车面板显示
37 function init() { 35 function init() {
38 hasChooseColor = false; 36 hasChooseColor = false;
@@ -43,8 +41,6 @@ function init() { @@ -43,8 +41,6 @@ function init() {
43 $allChoseItems = $('.chose-items'); 41 $allChoseItems = $('.chose-items');
44 $sizeRowList = $('.size-list ul'); 42 $sizeRowList = $('.size-list ul');
45 $leftNum = $('#left-num'); 43 $leftNum = $('#left-num');
46 - $leftNumHtml =  
47 - $sizeRowList.eq(0).toggleClass('hide');  
48 } 44 }
49 45
50 function checkColorSizeNum() { 46 function checkColorSizeNum() {
@@ -34,16 +34,22 @@ @@ -34,16 +34,22 @@
34 <div class="size-list block-list"> 34 <div class="size-list block-list">
35 <span>尺码</span> 35 <span>尺码</span>
36 {{# sizes}} 36 {{# sizes}}
37 -  
38 - <ul class="size-row clearfix hide">  
39 - {{# size}}  
40 - <li class="block {{#if chosed}}chosed{{/if}} {{#unless sizeNum}}zero-stock{{/unless}}" data-id="{{id}}" data-colorid="{{colorId}}" data-num="{{sizeNum}}" data-numstr="{{colorNumStr}}" data-skuid="{{skuId}}" data-goodid="{{goodsId}}">  
41 - {{name}}  
42 - </li>  
43 - {{/ size}}  
44 - </ul>  
45 - 37 + <ul class="size-row clearfix hide">
  38 + {{# size}}
  39 + <li class="block {{#if chosed}}chosed{{/if}} {{#unless sizeNum}}zero-stock{{/unless}}" data-id="{{id}}" data-colorid="{{colorId}}" data-num="{{sizeNum}}" data-numstr="{{colorNumStr}}" data-skuid="{{skuId}}" data-goodid="{{goodsId}}">
  40 + {{name}}
  41 + </li>
  42 + {{/ size}}
  43 + </ul>
46 {{/ sizes}} 44 {{/ sizes}}
  45 +
  46 + {{#if defaultSizes}}
  47 + <ul class="size-row clearfix default-size">
  48 + {{#each defaultSizes}}
  49 + <li class="block {{#if numZero}}zero-stock{{/if}}" data-numstr="{{numStr}}">{{name}}</li>
  50 + {{/each}}
  51 + </ul>
  52 + {{/if}}
47 </div> 53 </div>
48 <p> 54 <p>
49 <div class="num"> 55 <div class="num">
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
13 <script> 13 <script>
14 seajs.use(['js/product/list', 'js/product/product'], function (list, product) { 14 seajs.use(['js/product/list', 'js/product/product'], function (list, product) {
15 15
  16 + product.init(5);
16 window.onresize = function () { 17 window.onresize = function () {
17 setTimeout(function () { 18 setTimeout(function () {
18 product.init(5); 19 product.init(5);
@@ -28,6 +29,7 @@ @@ -28,6 +29,7 @@
28 <script> 29 <script>
29 seajs.use(['js/product/list', 'js/product/product'], function (list, product) { 30 seajs.use(['js/product/list', 'js/product/product'], function (list, product) {
30 31
  32 + product.init(4);
31 window.onresize = function () { 33 window.onresize = function () {
32 setTimeout(function () { 34 setTimeout(function () {
33 product.init(4); 35 product.init(4);
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 26
27 <div class="attr-content clearfix"> 27 <div class="attr-content clearfix">
28 {{#each channel}} 28 {{#each channel}}
29 - <a class="attr" href="{{href}}"> 29 + <a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">
30 {{name}} 30 {{name}}
31 </a> 31 </a>
32 {{/each}} 32 {{/each}}
@@ -42,7 +42,7 @@ @@ -42,7 +42,7 @@
42 <ul class="sort-pre clearfix"> 42 <ul class="sort-pre clearfix">
43 {{#each sort}} 43 {{#each sort}}
44 <li> 44 <li>
45 - <span class="attr"> 45 + <span class="attr {{#if checked}}checked{{/if}}">
46 {{name}} 46 {{name}}
47 </span> 47 </span>
48 </li> 48 </li>
@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
53 {{#each sort}} 53 {{#each sort}}
54 <ul class="sort-sub clearfix hide"> 54 <ul class="sort-sub clearfix hide">
55 {{#each sub}} 55 {{#each sub}}
56 - <li class="attr"> 56 + <li class="attr {{#if checked}}checked{{/if}}">
57 <a href="{{href}}">{{name}}</a> 57 <a href="{{href}}">{{name}}</a>
58 </li> 58 </li>
59 {{/each}} 59 {{/each}}
@@ -71,7 +71,7 @@ @@ -71,7 +71,7 @@
71 <div class="attr-content"> 71 <div class="attr-content">
72 <ul class="default clearfix"> 72 <ul class="default clearfix">
73 {{# default}} 73 {{# default}}
74 - <li class="attr"> 74 + <li class="attr {{#if checked}}checked{{/if}}">
75 <a href="{{href}}" title="{{name}}">{{name}}</a> 75 <a href="{{href}}" title="{{name}}">{{name}}</a>
76 </li> 76 </li>
77 {{/ default}} 77 {{/ default}}
@@ -82,7 +82,7 @@ @@ -82,7 +82,7 @@
82 <em>更多</em> 82 <em>更多</em>
83 <i class="iconfont">&#xe600;</i> 83 <i class="iconfont">&#xe600;</i>
84 </span> 84 </span>
85 - 85 +
86 <span id="brand-multi" class="multi-select">多选 +</span> 86 <span id="brand-multi" class="multi-select">多选 +</span>
87 </div> 87 </div>
88 88
@@ -128,7 +128,7 @@ @@ -128,7 +128,7 @@
128 128
129 <div class="attr-content clearfix"> 129 <div class="attr-content clearfix">
130 {{# price}} 130 {{# price}}
131 - <a class="attr" href="{{href}}">¥{{name}}</a> 131 + <a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">¥{{name}}</a>
132 {{/ price}} 132 {{/ price}}
133 133
134 <div class="ud-price-range"> 134 <div class="ud-price-range">
@@ -146,10 +146,10 @@ @@ -146,10 +146,10 @@
146 {{#if color}} 146 {{#if color}}
147 <div class="color section"> 147 <div class="color section">
148 <span class="title">颜色:</span> 148 <span class="title">颜色:</span>
149 - 149 +
150 <div class="attr-content clearfix"> 150 <div class="attr-content clearfix">
151 {{# color}} 151 {{# color}}
152 - <a class="attr" href="{{href}}"> 152 + <a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">
153 <i class="color-block" style="background: {{rgb}}"></i> 153 <i class="color-block" style="background: {{rgb}}"></i>
154 {{name}} 154 {{name}}
155 </a> 155 </a>
@@ -164,7 +164,7 @@ @@ -164,7 +164,7 @@
164 164
165 <div class="attr-content clearfix"> 165 <div class="attr-content clearfix">
166 {{# size}} 166 {{# size}}
167 - <a class="attr" href="{{href}}">{{name}}</a> 167 + <a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">{{name}}</a>
168 {{/ size}} 168 {{/ size}}
169 </div> 169 </div>
170 </div> 170 </div>
@@ -194,7 +194,7 @@ @@ -194,7 +194,7 @@
194 {{/if}} 194 {{/if}}
195 <ul class="clearfix check-container"> 195 <ul class="clearfix check-container">
196 {{#each sub}} 196 {{#each sub}}
197 - <li class="attr"> 197 + <li class="attr {{#if checked}}checked{{/if}}">
198 <a href="{{href}}"> 198 <a href="{{href}}">
199 <span class="iconfont checkbox" data-id="{{id}}">&#xe613;</span> 199 <span class="iconfont checkbox" data-id="{{id}}">&#xe613;</span>
200 <span>{{name}}</span> 200 <span>{{name}}</span>
@@ -212,4 +212,4 @@ @@ -212,4 +212,4 @@
212 </div> 212 </div>
213 </div> 213 </div>
214 {{/if}} 214 {{/if}}
215 -</div>  
  215 +</div>
@@ -9,7 +9,9 @@ var $ = require('yoho.jquery'); @@ -9,7 +9,9 @@ var $ = require('yoho.jquery');
9 var handlebars = require('yoho.handlebars'); 9 var handlebars = require('yoho.handlebars');
10 var json2 = require('json2'); 10 var json2 = require('json2');
11 var noticeSuccess = false; 11 var noticeSuccess = false;
12 - 12 +var apiDomain = 'http://api.open.yohobuy.com';
  13 +var vipInfoCombine = null;
  14 +var loginInfoCombine = null;
13 /** 15 /**
14 * 判断为1的helper 16 * 判断为1的helper
15 * @param {[type]} v1 [description] 17 * @param {[type]} v1 [description]
@@ -24,6 +26,37 @@ handlebars.registerHelper('equalone', function(v1, options) { @@ -24,6 +26,37 @@ handlebars.registerHelper('equalone', function(v1, options) {
24 return options.inverse(this); 26 return options.inverse(this);
25 } 27 }
26 }); 28 });
  29 +/**
  30 + * 判断等级为3的helper
  31 + * @param {[type]} v1 [description]
  32 + * @param {[type]} options) { if (v1 [description]
  33 + * @return {[type]} [description]
  34 + */
  35 +
  36 +handlebars.registerHelper('equallevelthree', function(v1, options) {
  37 +
  38 + if (v1 === '3') {
  39 + return options.fn(this);
  40 + } else {
  41 + return options.inverse(this);
  42 + }
  43 +});
  44 +
  45 +/**
  46 + * 判断为0的helper
  47 + * @param {[type]} v1 [description]
  48 + * @param {[type]} options) { if (v1 [description]
  49 + * @return {[type]} [description]
  50 + */
  51 +
  52 +handlebars.registerHelper('equalzero', function(v1, options) {
  53 +
  54 + if (v1 === '0') {
  55 + return options.fn(this);
  56 + } else {
  57 + return options.inverse(this);
  58 + }
  59 +});
27 require('../plugin/yohocookie'); 60 require('../plugin/yohocookie');
28 require('../plugin/yohocart'); 61 require('../plugin/yohocart');
29 /** 62 /**
@@ -817,6 +850,7 @@ function actionExeTemplate() { @@ -817,6 +850,7 @@ function actionExeTemplate() {
817 var resulthtml = $('#goodcartempwarpper').html().replace(/\\/g, ''); 850 var resulthtml = $('#goodcartempwarpper').html().replace(/\\/g, '');
818 851
819 $('#goodcartempwarpper').html(resulthtml); 852 $('#goodcartempwarpper').html(resulthtml);
  853 + vipInfoCombine = handlebars.compile($('#tmpl-my-login-new').html())
820 } 854 }
821 /** 855 /**
822 * 执行搜索 856 * 执行搜索
@@ -828,6 +862,138 @@ function actionSearch() { @@ -828,6 +862,138 @@ function actionSearch() {
828 $('#query_key').search(searchDomain); 862 $('#query_key').search(searchDomain);
829 } 863 }
830 /** 864 /**
  865 + * 获取登录状态
  866 + * @return {[type]} [description]
  867 + */
  868 +function actionLoginState(_data) {
  869 + var timestamp = new Date().getTime();
  870 + var noLoginHtml = '<span>Hi~</span>[<a href="http://www.yohobuy.com/signin.html" class="list-a login-out ">请登录</a>]&nbsp;[<a href="http://www.yohobuy.com/reg.html" class="list-a login-out" onclick="">免费注册</a>]'
  871 + var loginHtml = '<span>Hi~<a href="http://www.yohobuy.com/home?t=' + timestamp + '">{{user_name}}</a></span>&nbsp;'+
  872 + '{{#equalone is_login}}'+
  873 + '[<a href="{{logout}}" class="list-a login-out">退出</a>]'+
  874 + '{{else}}'+
  875 + '[<a href="http://www.yohobuy.com/signin.html" class="list-a login-out">请登录</a>]&nbsp;'+
  876 + '[<a href="http://www.yohobuy.com/reg.html" onclick="" class="list-a login-out">免费注册</a>]'+
  877 + '{{/equalone}}';
  878 + var boxObj = $('#loginBox');
  879 + var info = $.cookie('_UID');
  880 + loginInfoCombine = handlebars.compile(loginHtml);
  881 +
  882 + if (typeof info == 'undefined' || info == null) {
  883 + boxObj.html(noLoginHtml);
  884 + return false;
  885 + }
  886 + var user = info.split('::');
  887 + if (typeof user == 'undefined' || user.length < 4) {
  888 + boxObj.html(noLoginHtml);
  889 + return false;
  890 + }
  891 + var userName = user[0] || ' ';
  892 + var name = '';
  893 + var _length = 0;
  894 + for (var t = 0; t < userName.length; t++) {
  895 + var char = userName.substr(t, 1);
  896 + if (/.*[\u4e00-\u9fa5]+.*$/.test(char)) {
  897 + _length += 2;
  898 + } else {
  899 + _length += 1;
  900 + }
  901 + }
  902 + if (_length <= 10) {
  903 + name = userName;
  904 + } else {
  905 + _num = 0;
  906 + for (var t = 0; t < userName.length; t++) {
  907 + if (_num < 10) {
  908 + var char = userName.substr(t, 1);
  909 + if (char != '*') {
  910 + if (/.*[\u4e00-\u9fa5]+.*$/.test(char)) {
  911 + _num += 2;
  912 + } else {
  913 + _num += 1;
  914 + }
  915 + }
  916 + name += char;
  917 + }
  918 + }
  919 + if (name.length < userName.length) {
  920 + name += '...';
  921 + }
  922 + }
  923 + var _logout = '';
  924 + if (/http:\/\//.test(user[3])) {
  925 + _logout = user[3].replace('www.yohobuy.com', 'www.yohobuy.com');
  926 + } else {
  927 + _logout = 'http://www.yohobuy.com/logout_' + user[3] + '.html';
  928 + }
  929 + var data = {
  930 + "user_name": name,
  931 + "logout": _logout,
  932 + "random": Math.random()
  933 + };
  934 + var is_login = '1';
  935 + if (_data.result === -1) {
  936 + is_login = '-1';
  937 + }
  938 + data['is_login'] = is_login;
  939 + boxObj.html(loginInfoCombine(data));
  940 +}
  941 +/**
  942 + * 获得vip用户信息
  943 + * @return {[type]} [description]
  944 + */
  945 +function actionVipInfo(_data) {
  946 + if (_data.result == 1) {
  947 + var vipInfo = _data.data;
  948 +
  949 + if (typeof vipInfo == undefined || vipInfo.length < 1) {
  950 + return false;
  951 + }
  952 + $('#myYohoBox').mouseenter(function() {
  953 + $(this).addClass('acttags');
  954 + $('#myYohoBox .myyoho-info').show().html(vipInfoCombine(vipInfo));
  955 + var headUrl = $('.myyoho-photo img').attr('data-url');
  956 + if ($._checkUrlState == 1) {
  957 + $('.myyoho-photo').show().find('img').attr('src', headUrl);
  958 + return;
  959 + }
  960 + if (headUrl == '' || $._checkUrl != '') {
  961 + return;
  962 + }
  963 + $.ajax({
  964 + url: headUrl,
  965 + type: 'GET',
  966 + complete: function(response) {
  967 + if (response.status == 200 || response.status == 0) {
  968 + $('.myyoho-photo').show().find('img').attr('src', headUrl);
  969 + $._checkUrlState = 1;
  970 + }
  971 + $._checkUrl = headUrl;
  972 + }
  973 + });
  974 +
  975 + ;
  976 + });
  977 + $('#myYohoBox').mouseleave(function() {
  978 + $(this).removeClass('acttags');
  979 + $('#myYohoBox .myyoho-info').hide()
  980 + });
  981 + } else {}
  982 +}
  983 +/**
  984 + * 获取登录信息
  985 + * @return {[type]} [description]
  986 + */
  987 +function actionLoginInfo() {
  988 + var param = {
  989 + method: 'open.passport.get'
  990 + };
  991 + $.getData(apiDomain, param, function(_data) {
  992 + actionLoginState(_data); // 更改登录状态
  993 + actionVipInfo(_data);//获得vip;
  994 + });
  995 +}
  996 +/**
831 * 初始化函数 997 * 初始化函数
832 * @return {[type]} [description] 998 * @return {[type]} [description]
833 */ 999 */
@@ -849,6 +1015,7 @@ function init() { @@ -849,6 +1015,7 @@ function init() {
849 actionClickMiniCartBox(); //点击购物车跳转 1015 actionClickMiniCartBox(); //点击购物车跳转
850 actionListenDelCarGoods(); //监听购物车删除 1016 actionListenDelCarGoods(); //监听购物车删除
851 actionListenCartMore(); // 1017 actionListenCartMore(); //
  1018 + actionLoginInfo();//获取登录信息
852 } 1019 }
853 1020
854 init(); 1021 init();
@@ -143,22 +143,22 @@ exports.init = function(num) { @@ -143,22 +143,22 @@ exports.init = function(num) {
143 display: 'none' 143 display: 'none'
144 }); 144 });
145 }); 145 });
146 -  
147 - //鼠标放在颜色列表上效果  
148 - $(document).on('hover', '.good-select-color li', function() {  
149 - var coverImg = $(this).find('img').attr('data-cover'),  
150 - $coverImg = $(this).closest('.good-item-wrapper').find('.good-detail-img').find('img');  
151 -  
152 - $coverImg.attr('src', coverImg);  
153 - });  
154 -  
155 - // 左侧导航  
156 - $productListNav.click(function() {  
157 - if ($(this).hasClass('active')) {  
158 - $(this).find('.sort-child-list').stop(true, true).slideUp();  
159 - } else {  
160 - $(this).find('.sort-child-list').stop(true, true).slideDown();  
161 - }  
162 - $(this).toggleClass('active');  
163 - });  
164 -};  
  146 +};
  147 +
  148 +//鼠标放在颜色列表上效果
  149 +$(document).on('hover', '.good-select-color li', function() {
  150 + var coverImg = $(this).find('img').attr('data-cover'),
  151 + $coverImg = $(this).closest('.good-item-wrapper').find('.good-detail-img').find('img');
  152 +
  153 + $coverImg.attr('src', coverImg);
  154 +});
  155 +
  156 +// 左侧导航
  157 +$productListNav.click(function() {
  158 + if ($(this).hasClass('active')) {
  159 + $(this).find('.sort-child-list').stop(true, true).slideUp();
  160 + } else {
  161 + $(this).find('.sort-child-list').stop(true, true).slideDown();
  162 + }
  163 + $(this).toggleClass('active');
  164 +});
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 } 12 }
13 } 13 }
14 14
15 - .title { 15 + .title {
16 float: left; 16 float: left;
17 width: 90px; 17 width: 90px;
18 line-height: 30px; 18 line-height: 30px;
@@ -44,6 +44,14 @@ @@ -44,6 +44,14 @@
44 margin-left: 0; 44 margin-left: 0;
45 } 45 }
46 46
  47 + &.checked {
  48 + color: #e01;
  49 +
  50 + a {
  51 + color: #e01;
  52 + }
  53 + }
  54 +
47 -moz-user-select: none; 55 -moz-user-select: none;
48 } 56 }
49 57
@@ -287,4 +295,4 @@ @@ -287,4 +295,4 @@
287 .multi .checkbox { 295 .multi .checkbox {
288 display: inline; 296 display: inline;
289 } 297 }
290 -}  
  298 +}
@@ -44,7 +44,8 @@ class Index1Controller extends AbstractAction @@ -44,7 +44,8 @@ class Index1Controller extends AbstractAction
44 'channel' => array( 44 'channel' => array(
45 array( 45 array(
46 'href' => '/?gender=1,3', 46 'href' => '/?gender=1,3',
47 - 'name' => 'BOYS' 47 + 'name' => 'BOYS',
  48 + 'checked' => true
48 ), 49 ),
49 array( 50 array(
50 'href' => '/?gender=2,3', 51 'href' => '/?gender=2,3',
@@ -63,10 +64,12 @@ class Index1Controller extends AbstractAction @@ -63,10 +64,12 @@ class Index1Controller extends AbstractAction
63 array( 64 array(
64 'id' => '1', 65 'id' => '1',
65 'name' => '上衣', 66 'name' => '上衣',
  67 + 'checked' => true,
66 'sub' => array( 68 'sub' => array(
67 array( 69 array(
68 'href' => '', 70 'href' => '',
69 - 'name' => 'T恤' 71 + 'name' => 'T恤',
  72 + 'checked' => true
70 ), 73 ),
71 array( 74 array(
72 'href' => '', 75 'href' => '',
@@ -95,7 +98,8 @@ class Index1Controller extends AbstractAction @@ -95,7 +98,8 @@ class Index1Controller extends AbstractAction
95 'default' => array( 98 'default' => array(
96 array( 99 array(
97 'href' => '', 100 'href' => '',
98 - 'name' => 'CLOT' 101 + 'name' => 'CLOT',
  102 + 'checked' => true
99 ), 103 ),
100 array( 104 array(
101 'href' => '', 105 'href' => '',
@@ -133,7 +137,8 @@ class Index1Controller extends AbstractAction @@ -133,7 +137,8 @@ class Index1Controller extends AbstractAction
133 'brandIndex' => array( 137 'brandIndex' => array(
134 array( 138 array(
135 'index' => 'all', 139 'index' => 'all',
136 - 'name' => '全部' 140 + 'name' => '全部',
  141 + 'checked' => true
137 ), 142 ),
138 array( 143 array(
139 'index' => '0-9', 144 'index' => '0-9',
@@ -185,7 +190,8 @@ class Index1Controller extends AbstractAction @@ -185,7 +190,8 @@ class Index1Controller extends AbstractAction
185 'price' => array( 190 'price' => array(
186 array( 191 array(
187 'href' => '', 192 'href' => '',
188 - 'name' => '0-239' 193 + 'name' => '0-239',
  194 + 'checked' => true
189 ), 195 ),
190 array( 196 array(
191 'href' => '', 197 'href' => '',
@@ -196,7 +202,8 @@ class Index1Controller extends AbstractAction @@ -196,7 +202,8 @@ class Index1Controller extends AbstractAction
196 array( 202 array(
197 'href' => '', 203 'href' => '',
198 'name' => '黑色', 204 'name' => '黑色',
199 - 'rgb' => '#000' 205 + 'rgb' => '#000',
  206 + 'checked' => true
200 ), 207 ),
201 array( 208 array(
202 'href' => '', 209 'href' => '',
@@ -207,7 +214,8 @@ class Index1Controller extends AbstractAction @@ -207,7 +214,8 @@ class Index1Controller extends AbstractAction
207 'size' => array( 214 'size' => array(
208 array( 215 array(
209 'href' => '', 216 'href' => '',
210 - 'name' => 'S' 217 + 'name' => 'S',
  218 + 'checked' => true
211 ), 219 ),
212 array( 220 array(
213 'href' => '', 221 'href' => '',
@@ -223,7 +231,8 @@ class Index1Controller extends AbstractAction @@ -223,7 +231,8 @@ class Index1Controller extends AbstractAction
223 array( 231 array(
224 'id' => '1', 232 'id' => '1',
225 'href' => '', 233 'href' => '',
226 - 'name' => '街头' 234 + 'name' => '街头',
  235 + 'checked' => true
227 ), 236 ),
228 array( 237 array(
229 'id' => '2', 238 'id' => '2',
@@ -239,7 +248,8 @@ class Index1Controller extends AbstractAction @@ -239,7 +248,8 @@ class Index1Controller extends AbstractAction
239 array( 248 array(
240 'id' => '1', 249 'id' => '1',
241 'href' => '', 250 'href' => '',
242 - 'name' => '春天' 251 + 'name' => '春天',
  252 + 'checked' => true
243 ), 253 ),
244 array( 254 array(
245 'id' => '2', 255 'id' => '2',
@@ -1544,4 +1554,4 @@ class Index1Controller extends AbstractAction @@ -1544,4 +1554,4 @@ class Index1Controller extends AbstractAction
1544 1554
1545 $this->echoJson($data); 1555 $this->echoJson($data);
1546 } 1556 }
1547 -}  
  1557 +}