...
|
...
|
@@ -14,6 +14,10 @@ var $intro = $('#intro'), |
|
|
|
|
|
var info = require('../info');
|
|
|
|
|
|
var tip = require('../../plugin/tip');
|
|
|
|
|
|
var brandId = $('#brand-info').data('id');
|
|
|
|
|
|
var mIntro, aIntro;
|
|
|
|
|
|
ellipsis.init();
|
...
|
...
|
@@ -53,5 +57,31 @@ $('#more-intro').bind('touchstart', function() { |
|
|
|
|
|
//品牌收藏
|
|
|
$('#brand-like').bind('touchstart', function(e) {
|
|
|
var opt = 'ok',
|
|
|
$this = $(this);
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
if ($this.hasClass('like')) {
|
|
|
opt = 'cancel';
|
|
|
}
|
|
|
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
|
url: '/guang/opt/favoriteBrand',
|
|
|
data: {
|
|
|
id: brandId,
|
|
|
opt: opt
|
|
|
},
|
|
|
success: function(data) {
|
|
|
if (data.code === 200) {
|
|
|
$this.toggleClass('like');
|
|
|
} else if (data.code === 400) {
|
|
|
tip.show('未登录');
|
|
|
}
|
|
|
},
|
|
|
error: function() {
|
|
|
tip.show('网络断开连接了~');
|
|
|
}
|
|
|
});
|
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|