|
@@ -45,18 +45,44 @@ var consultClick = function () {
|
|
|
};
|
|
|
|
|
|
$(function () {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+ $('.collection p').eq(0).click(function () {
|
|
|
+ let heart = $('.heart');
|
|
|
+ if (heart.hasClass('active')) {
|
|
|
+ collectionApi(0)
|
|
|
+ } else {
|
|
|
+ collectionApi(1)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ let hash = window.location.search,
|
|
|
+ hashArr =hash.split('&'),
|
|
|
+ idArr = hashArr[0].split('='),
|
|
|
+ ids =idArr[1];
|
|
|
+ function collectionApi(index) {
|
|
|
+ let url = index?'/api/user/portal/expertInterest':'/api/user/portal/expertCancelInterest'
|
|
|
+ $.ajax({
|
|
|
+ method: "post",
|
|
|
+ dataType: "json",
|
|
|
+ url: globalConfig.context + url,
|
|
|
+ data: {
|
|
|
+ id:ids
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ $('#msg').val(data.error[0].message);
|
|
|
+ msg();
|
|
|
+ }else{
|
|
|
+ if(!index){
|
|
|
+ $('.heart').removeClass('active');
|
|
|
+ }else{
|
|
|
+ $('.heart').addClass('active');
|
|
|
+ }
|
|
|
+ $('#msg').val(index?'收藏成功,请至个人中心查看.':'撤销收藏');
|
|
|
+ msg();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
$('#submitOrder').click(function () {
|
|
|
addConsultorder()
|
|
|
});
|
|
@@ -95,67 +121,15 @@ $(function () {
|
|
|
$(this).removeClass("active").attr("val","").parent().animate({"height":45},500);
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- function msg(txt) {
|
|
|
- if($('.smg').hasClass('active')){
|
|
|
- return ;
|
|
|
- }
|
|
|
- $('.smg').addClass('active');
|
|
|
- var lit = $('#msg').val(txt);
|
|
|
- setTimeout(function () {
|
|
|
- $('.smg').removeClass('active')
|
|
|
- $('#msg').val('');
|
|
|
- }, 2000)
|
|
|
+
|
|
|
+ function msg() {
|
|
|
+ if($('.smg').hasClass('active')){
|
|
|
+ return ;
|
|
|
}
|
|
|
+ $('.smg').addClass('active')
|
|
|
+ setTimeout(function () {
|
|
|
+ $('.smg').removeClass('active')
|
|
|
+ $('#msg').val('');
|
|
|
+ }, 2000)
|
|
|
+}
|
|
|
})
|