|
@@ -6,8 +6,9 @@ import '../../css/thinkTank/thinkerDetail.css';
|
|
|
import {
|
|
|
message
|
|
|
} from '../tools.js';
|
|
|
-
|
|
|
+console.log(111);
|
|
|
var addConsultorder = function () {
|
|
|
+
|
|
|
let userId = $('#userId').val();
|
|
|
$.ajax({
|
|
|
method: "post",
|
|
@@ -24,7 +25,7 @@ var addConsultorder = function () {
|
|
|
message('提交会员服务订单成功!');
|
|
|
setTimeout("window.location.href = globalConfig.context + '/user/account/index.html#consultList'", 3000);
|
|
|
};
|
|
|
- }.bind(this),
|
|
|
+ }.bind(this)
|
|
|
});
|
|
|
};
|
|
|
var consultClick = function () {
|
|
@@ -44,19 +45,46 @@ var consultClick = function () {
|
|
|
};
|
|
|
|
|
|
$(function () {
|
|
|
- $('#consultBtn').click(function () {
|
|
|
- if (userData && userData.mobile) {
|
|
|
- if (userData.lvl > 0) {
|
|
|
- consultClick()
|
|
|
- } else {
|
|
|
- message('请先进行实名认证,通过以后才能申请高级会员!');
|
|
|
- setTimeout("window.location.href = globalConfig.context + '/user/account/index.html#normal'", 3000);
|
|
|
- }
|
|
|
- } else {
|
|
|
- $('.login').fadeIn(800)
|
|
|
- }
|
|
|
- });
|
|
|
+ //$('#consultBtn').click(function () {
|
|
|
+ // if (userData && userData.mobile) {
|
|
|
+ // if (userData.lvl > 0) {
|
|
|
+ // consultClick()
|
|
|
+ // } else {
|
|
|
+ // message('请先进行实名认证,通过以后才能申请高级会员!');
|
|
|
+ // setTimeout("window.location.href = globalConfig.context + '/user/account/index.html#normal'", 3000);
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // $('.login').fadeIn(800)
|
|
|
+ // }
|
|
|
+ //});
|
|
|
$('#submitOrder').click(function () {
|
|
|
addConsultorder()
|
|
|
});
|
|
|
+ $("#consultBtn").click(function(){
|
|
|
+ var isLogin=$("#isLogin").attr("islogin");
|
|
|
+ if(isLogin=="true"){
|
|
|
+ $(".head_login").click();
|
|
|
+ }else{
|
|
|
+ var theId = $(".right_btn").attr('val');
|
|
|
+ $.ajax({
|
|
|
+ method: "post",
|
|
|
+ dataType: "json",
|
|
|
+ url: globalConfig.context + "/api/user/consultorder/add",
|
|
|
+ data: {
|
|
|
+ toUserId:theId
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ $('#msg').val(data.error[0].message);
|
|
|
+ msg();
|
|
|
+ }else if(data.error==""){
|
|
|
+ window.open(globalConfig.context+ '/user/account/index.html#consultList');
|
|
|
+ }else{
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
})
|