|  | @@ -3,6 +3,9 @@ import 'bootstrap/dist/js/bootstrap.js';
 | 
	
		
			
				|  |  |  import '../css/public.css';
 | 
	
		
			
				|  |  |  import '../css/member.css';
 | 
	
		
			
				|  |  |  import './public.js';
 | 
	
		
			
				|  |  | +import {
 | 
	
		
			
				|  |  | +    message
 | 
	
		
			
				|  |  | +} from './tools.js';
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  function loadBenefit(callback) {
 | 
	
		
			
				|  |  |      $.ajax({
 | 
	
	
		
			
				|  | @@ -10,7 +13,7 @@ function loadBenefit(callback) {
 | 
	
		
			
				|  |  |          dataType: "json",
 | 
	
		
			
				|  |  |          url: globalConfig.context + "/open/html/json/member_benefit",
 | 
	
		
			
				|  |  |          success: function (data) {
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +            callback(data)
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |  }
 | 
	
	
		
			
				|  | @@ -26,70 +29,57 @@ function loadData(pageNo) {
 | 
	
		
			
				|  |  |              var theArr = [];
 | 
	
		
			
				|  |  |              if (data.data && data.data.length) {
 | 
	
		
			
				|  |  |                  //黄金会员
 | 
	
		
			
				|  |  | -                let thisdata = data.data[0];
 | 
	
		
			
				|  |  | -                let theBusiness = [];
 | 
	
		
			
				|  |  | -                let theCost = [];
 | 
	
		
			
				|  |  | -                for (let item in thisdata.business) {
 | 
	
		
			
				|  |  | -                    theBusiness.push('<li data-toggle="modal" data-target="#myModal" data-mouth="' + item + '" data-money="' + thisdata.cost[item] + '" data-rank="' + thisdata.memberRank + '" data-gradename="' + thisdata.gradeName + '">' + thisdata.cost[item] + '/' + item + '个月</li>')
 | 
	
		
			
				|  |  | +                let thisdata1 = data.data[0],
 | 
	
		
			
				|  |  | +                    thisdata2 = data.data[1];
 | 
	
		
			
				|  |  | +                let theBusiness1 = [],
 | 
	
		
			
				|  |  | +                    theBusiness2 = [];
 | 
	
		
			
				|  |  | +                let theCost1 = [],
 | 
	
		
			
				|  |  | +                    theCost2 = [];
 | 
	
		
			
				|  |  | +                loadBenefit((x) => {
 | 
	
		
			
				|  |  | +                    let BenefitObj = x;
 | 
	
		
			
				|  |  | +                    for (let item in thisdata1.business) {
 | 
	
		
			
				|  |  | +                        if (thisdata1.business[item] == "1") {
 | 
	
		
			
				|  |  | +                            theBusiness1.push('<p>' + BenefitObj[item] + '</p>')
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    };
 | 
	
		
			
				|  |  | +                    for (let item in thisdata2.business) {
 | 
	
		
			
				|  |  | +                        if (thisdata2.business[item] == "1") {
 | 
	
		
			
				|  |  | +                            theBusiness2.push('<p>' + BenefitObj[item] + '</p>')
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    };
 | 
	
		
			
				|  |  | +                    $('#member1business').append(theBusiness1.join(''));
 | 
	
		
			
				|  |  | +                    $('#member2business').append(theBusiness2.join(''));
 | 
	
		
			
				|  |  | +                });
 | 
	
		
			
				|  |  | +                for (let item in thisdata1.cost) {
 | 
	
		
			
				|  |  | +                    theCost1.push('<li data-mouth="' + item + '" data-money="' + thisdata1.cost[item] + '" data-rank="' + thisdata1.memberRank + '" data-gradename="' + thisdata1.gradeName + '">' + thisdata1.cost[item] + '/' + item + '个月</li>')
 | 
	
		
			
				|  |  |                  };
 | 
	
		
			
				|  |  | -                for (let item in thisdata.cost) {
 | 
	
		
			
				|  |  | -                    theCost.push('<li data-toggle="modal" data-target="#myModal" data-mouth="' + item + '" data-money="' + thisdata.cost[item] + '" data-rank="' + thisdata.memberRank + '" data-gradename="' + thisdata.gradeName + '">' + thisdata.cost[item] + '/' + item + '个月</li>')
 | 
	
		
			
				|  |  | +                for (let item in thisdata2.cost) {
 | 
	
		
			
				|  |  | +                    theCost2.push('<li data-mouth="' + item + '" data-money="' + thisdata2.cost[item] + '" data-rank="' + thisdata2.memberRank + '" data-gradename="' + thisdata2.gradeName + '">' + thisdata2.cost[item] + '/' + item + '个月</li>')
 | 
	
		
			
				|  |  |                  };
 | 
	
		
			
				|  |  | -                $('#member1cost').append(theCost.join(''));
 | 
	
		
			
				|  |  | +                $('#member1cost').append(theCost1.join(''));
 | 
	
		
			
				|  |  | +                $('#member2cost').append(theCost2.join(''));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                for (let i = 0; i < data.data.length; i++) {
 | 
	
		
			
				|  |  | -                    let thisdata = data.data[i];
 | 
	
		
			
				|  |  | -                    let theCost = [];
 | 
	
		
			
				|  |  | -                    for (let item in thisdata.cost) {
 | 
	
		
			
				|  |  | -                        theCost.push('<p><a class="toCostLink" href="" data-toggle="modal" data-target="#myModal" data-mouth="' + item + '" data-money="' + thisdata.cost[item] + '" data-rank="' + thisdata.memberRank + '" data-gradename="' + thisdata.gradeName + '">' + thisdata.cost[item] + '/' + item + '月</a></p>')
 | 
	
		
			
				|  |  | -                    };
 | 
	
		
			
				|  |  | -                    theArr.push([
 | 
	
		
			
				|  |  | -                        '<li style="width:' + thewidth + '">',
 | 
	
		
			
				|  |  | -                        '<div>',
 | 
	
		
			
				|  |  | -                        '<div class="level">',
 | 
	
		
			
				|  |  | -                        '<img src="' + globalConfig.avatarUploadHost + "/rank/level_" + thisdata.memberRank + '.png" alt="">',
 | 
	
		
			
				|  |  | -                        thisdata.gradeName,
 | 
	
		
			
				|  |  | -                        '</div>',
 | 
	
		
			
				|  |  | -                        '<div class="top">',
 | 
	
		
			
				|  |  | -                        '<i class="topImg"></i>',
 | 
	
		
			
				|  |  | -                        '<span>提供的专属服务</span>',
 | 
	
		
			
				|  |  | -                        '</div>',
 | 
	
		
			
				|  |  | -                        '<div class="server">',
 | 
	
		
			
				|  |  | -                        thisdata.business && thisdata.business['1001'] == 1 ? '<p>科技成果,专家信息定点推送</p>' : '',
 | 
	
		
			
				|  |  | -                        thisdata.business && thisdata.business['1002'] == 1 ? '<p>查看专家的联系方式</p>' : '',
 | 
	
		
			
				|  |  | -                        thisdata.business && thisdata.business['1003'] == 1 ? '<p>任何业务申请,付费业享受会员专属折扣。</p>' : '',
 | 
	
		
			
				|  |  | -                        thisdata.business && thisdata.business['1004'] == 1 ? '<p>一对一的技术经纪人服务,进行技术成果媒合服务</p>' : '',
 | 
	
		
			
				|  |  | -                        thisdata.business && thisdata.business['1005'] == 1 ? '<p>一对一的科技咨询师服务</p>' : '',
 | 
	
		
			
				|  |  | -                        thisdata.business && thisdata.business['1006'] == 1 ? '<p>一对一的专业技术顾问,搜集技术情报,提供研发高参</p>' : '',
 | 
	
		
			
				|  |  | -                        thisdata.business && thisdata.business['1007'] == 1 ? '<p>免费参加现场业务培训会</p>' : '',
 | 
	
		
			
				|  |  | -                        thisdata.business && thisdata.business['1008'] == 1 ? '<p>免前期费用做科技类扶持资金项目申报</p>' : '',
 | 
	
		
			
				|  |  | -                        '</div>',
 | 
	
		
			
				|  |  | -                        '<div class="money">',
 | 
	
		
			
				|  |  | -                        theCost.join(''),
 | 
	
		
			
				|  |  | -                        '</div>',
 | 
	
		
			
				|  |  | -                        '</div>',
 | 
	
		
			
				|  |  | -                        '</li>'
 | 
	
		
			
				|  |  | -                    ].join(''));
 | 
	
		
			
				|  |  | -                };
 | 
	
		
			
				|  |  |              } else {
 | 
	
		
			
				|  |  | -                $('#msg').val(data.error[0].message);
 | 
	
		
			
				|  |  | -                msg();
 | 
	
		
			
				|  |  | +                message(data.error[0].message);
 | 
	
		
			
				|  |  |              };
 | 
	
		
			
				|  |  | -            $('#member-list').empty();
 | 
	
		
			
				|  |  | -            $('#member-list').append(theArr.join(''));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            $('.toCostLink').on('click', function (e) {
 | 
	
		
			
				|  |  | +            $('.member_on ul').on('click', 'li', function (e) {
 | 
	
		
			
				|  |  |                  e.preventDefault();
 | 
	
		
			
				|  |  |                  if (userData && userData.mobile) {
 | 
	
		
			
				|  |  | -                    mouth = this.dataset.mouth;
 | 
	
		
			
				|  |  | -                    money = this.dataset.money;
 | 
	
		
			
				|  |  | -                    rank = this.dataset.rank;
 | 
	
		
			
				|  |  | -                    gradeName = this.dataset.gradename;
 | 
	
		
			
				|  |  | -                    $('#modal-content').append("确认提交 " + money + " 元/ " + mouth + " 月的 " + gradeName + " 订单吗?");
 | 
	
		
			
				|  |  | +                    if (userData.lvl > 0) {
 | 
	
		
			
				|  |  | +                        mouth = this.dataset.mouth;
 | 
	
		
			
				|  |  | +                        money = this.dataset.money;
 | 
	
		
			
				|  |  | +                        rank = this.dataset.rank;
 | 
	
		
			
				|  |  | +                        gradeName = this.dataset.gradename;
 | 
	
		
			
				|  |  | +                        $('#modal-content').append("确认提交 " + money + " 元/ " + mouth + " 月的 " + gradeName + " 订单吗?");
 | 
	
		
			
				|  |  | +                        $('#myModal').modal('show');
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        message('请先进行实名认证,通过以后才能申请高级会员!');
 | 
	
		
			
				|  |  | +                        setTimeout("window.location.href = globalConfig.context + '/user/account/index.html#normal'", 3000);
 | 
	
		
			
				|  |  | +                        return;
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                  } else {
 | 
	
		
			
				|  |  | -                    $('#msg').val('获取用户信息失败,请重新登录!');
 | 
	
		
			
				|  |  | -                    msg();
 | 
	
		
			
				|  |  | -                    setTimeout("window.location.href = globalConfig.context + '/user/login.html'", 3000);
 | 
	
		
			
				|  |  | +                    $('.login').fadeIn(800)
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -106,11 +96,9 @@ function loadData(pageNo) {
 | 
	
		
			
				|  |  |                      },
 | 
	
		
			
				|  |  |                      success: function (data) {
 | 
	
		
			
				|  |  |                          if (data.error && data.error.length) {
 | 
	
		
			
				|  |  | -                            $('#msg').val(data.error[0].message);
 | 
	
		
			
				|  |  | -                            msg();
 | 
	
		
			
				|  |  | +                            message(data.error[0].message);
 | 
	
		
			
				|  |  |                          } else {
 | 
	
		
			
				|  |  | -                            $('#msg').val('提交会员服务订单成功!');
 | 
	
		
			
				|  |  | -                            msg();
 | 
	
		
			
				|  |  | +                            message('提交会员服务订单成功!');
 | 
	
		
			
				|  |  |                              setTimeout("window.location.href = globalConfig.context + '/user/account/index.html#serviceList'", 3000);
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                      },
 |