Authored by ccbikai

拷贝改为深度拷贝

@@ -45,7 +45,7 @@ const processPublicData = (req, title) => { @@ -45,7 +45,7 @@ const processPublicData = (req, title) => {
45 */ 45 */
46 exports.index = (req, res) => { 46 exports.index = (req, res) => {
47 starModel.getIndexData().then((result) => { 47 starModel.getIndexData().then((result) => {
48 - const pageHeadTab = _.clone(headTab); 48 + const pageHeadTab = _.cloneDeep(headTab);
49 49
50 pageHeadTab[0].cur = true; 50 pageHeadTab[0].cur = true;
51 res.render('star/index', _.assign({ 51 res.render('star/index', _.assign({
@@ -71,7 +71,7 @@ exports.index = (req, res) => { @@ -71,7 +71,7 @@ exports.index = (req, res) => {
71 */ 71 */
72 exports.special = (req, res) => { 72 exports.special = (req, res) => {
73 starModel.getSpecialData().then((result) => { 73 starModel.getSpecialData().then((result) => {
74 - const pageHeadTab = _.clone(headTab); 74 + const pageHeadTab = _.cloneDeep(headTab);
75 75
76 pageHeadTab[1].cur = true; 76 pageHeadTab[1].cur = true;
77 res.render('star/special', _.assign({ 77 res.render('star/special', _.assign({
@@ -91,7 +91,7 @@ exports.special = (req, res) => { @@ -91,7 +91,7 @@ exports.special = (req, res) => {
91 * @return {[type]} 91 * @return {[type]}
92 */ 92 */
93 exports.collocation = (req, res) => { 93 exports.collocation = (req, res) => {
94 - const pageHeadTab = _.clone(headTab); 94 + const pageHeadTab = _.cloneDeep(headTab);
95 95
96 pageHeadTab[2].cur = true; 96 pageHeadTab[2].cur = true;
97 res.render('star/collocation', _.assign({ 97 res.render('star/collocation', _.assign({
@@ -153,4 +153,3 @@ exports.detailList = (req, res) => { @@ -153,4 +153,3 @@ exports.detailList = (req, res) => {
153 })); 153 }));
154 }); 154 });
155 }; 155 };
156 -  
@@ -10,14 +10,12 @@ var $ = require('yoho-jquery'), @@ -10,14 +10,12 @@ var $ = require('yoho-jquery'),
10 require('../common/common'); 10 require('../common/common');
11 11
12 // 星搭配收藏请求 12 // 星搭配收藏请求
13 -$(document).on('touchstart', '.collection', function(event) { 13 +$(document).on('click', '.collection', function() {
14 var $that = $(this), 14 var $that = $(this),
15 $icon = $that.find('.collected-ico'); 15 $icon = $that.find('.collected-ico');
16 16
17 var type; 17 var type;
18 18
19 - event.stopPropagation();  
20 -  
21 if ($icon.hasClass('collected')) { 19 if ($icon.hasClass('collected')) {
22 type = 'del'; 20 type = 'del';
23 } else { 21 } else {