فهرست منبع

feat: pc端增加用户留资功能

yangfeng 4 سال پیش
والد
کامیت
7575501467

+ 221 - 0
src/web/staticres/common-module/selector/js/static-data.js

@@ -0,0 +1,221 @@
+var industryJson = [
+  {
+    name: '互联网/IT/电子/通信',
+    children: [
+      {name: '电子商务'},
+      {name: '企业服务'},
+      {name: '人工智能'},
+      {name: '在线教育'},
+      {name: '在线医疗'},
+      {name: '新媒体'},
+      {name: '物联网'},
+      {name: '新零售'},
+      {name: '区跨链'},
+      {name: '互联网'},
+      {name: '游戏'},
+      {name: '云计算/大数据'},
+      {name: '网络/信息安全'},
+      {name: '在线生活服务(O2O)'},
+      {name: '在线音乐/视频/阅读'},
+      {name: 'IT服务'},
+      {name: '计算机软件'},
+      {name: '计算机硬件'},
+      {name: '通信/网络设备'},
+      {name: '运营商/增值服务'},
+      {name: '电子/半导体/集成电路'}
+    ]
+  },
+  {
+    name: '房地产/建筑',
+    children: [
+      {name: '房地产开发与经营'},
+      {name: '土地与公共设施管理'},
+      {name: '公共建筑装饰装修'},
+      {name: '房地产中介'},
+      {name: '物业服务'},
+      {name: '建筑设计'},
+      {name: '工程施工'},
+      {name: '建筑设备安装'},
+      {name: '装饰装修'},
+      {name: '建材'},
+      {name: '建筑工程检测'}
+    ]
+  },
+  {
+    name: '金融业',
+    children: [
+      {name: '银行'},
+      {name: '保险业'},
+      {name: '基金'},
+      {name: '信托'},
+      {name: '证券/期货'},
+      {name: '投资/融资'},
+      {name: '汽车金融服务'},
+      {name: '互联网金融/小额贷款'},
+      {name: '租赁/拍卖/典当/担保'}
+    ]
+  },
+  {
+    name: '教育培训/科研',
+    children: [
+      {name: '培训/课外教育/教育辅助'},
+      {name: '学校教育'},
+      {name: '学术/科研'},
+      {name: '科学技术推广服务业'}
+    ]
+  },
+  {
+    name: '广告/传媒/文化/体育',
+    children: [
+      {name: '广告业'},
+      {name: '广播/电视/电影/录音制作'},
+      {name: '会议/展览服务'},
+      {name: '文化艺术/娱乐'},
+      {name: '体育'},
+      {name: '新闻/出版'}
+    ]
+  },
+  {
+    name: '制药/医疗',
+    children: [
+      {name: '医院'},
+      {name: '卫生服务'},
+      {name: '生物工程'},
+      {name: '医药制造'},
+      {name: '医疗设备/器械'}
+    ]
+  },
+  {
+    name: '批发/零售/贸易',
+    children: [
+      {name: '快速消费品'},
+      {name: '耐用消费品'},
+      {name: '零售/批发'},
+      {name: '食品/饮料'},
+      {name: '烟酒'},
+      {name: '日化'},
+      {name: '服装/纺织/皮革'},
+      {name: '玩具/礼品'},
+      {name: '珠宝/首饰'},
+      {name: '办公用品设备'},
+      {name: '工艺品/收藏品'},
+      {name: '家具/家居/家电'},
+      {name: '贸易/进出口代理'},
+    ]
+  },
+  {
+    name: '制造业',
+    children: [
+      {name: '船舶/航空/航天/火车制造'},
+      {name: '电气机械/器材制造'},
+      {name: '电子设备制造'},
+      {name: '钢铁和有色金属冶炼及加工'},
+      {name: '专用设备制造'},
+      {name: '金属制品业'},
+      {name: '通用设备制造'},
+      {name: '仪器仪表制造'},
+      {name: '非金属矿物制品业'},
+      {name: '化学纤维制造业'},
+      {name: '化学原料/化学制品'},
+      {name: '日化产品制造'},
+      {name: '纺织业/服饰产品加工制造'},
+      {name: '农副产品加工制造'},
+      {name: '燃料资源加工制造'},
+      {name: '橡胶和塑料制品'},
+      {name: '印刷/包装/造纸'},
+      {name: '家具制造'},
+      {name: '文体/办公设备制造'},
+      {name: '工业自动化'}
+    ]
+  },
+  {
+    name: '汽车',
+    children: [
+      {name: '汽车销售与服务'},
+      {name: '汽车制造'},
+      {name: '汽车零部件'}
+    ]
+  },
+  {
+    name: '交通运输/仓储/物流',
+    children: [
+      {name: '火车站/港口/汽车站/路政'},
+      {name: '民航/铁路/公路/水路客运'},
+      {name: '货运/物流仓储'},
+      {name: '邮政/快递'}
+    ]
+  },
+  {
+    name: '专业服务',
+    children: [
+      {name: '法律服务'},
+      {name: '咨询服务'},
+      {name: '翻译服务'},
+      {name: '人力资源服务'},
+      {name: '财务/审计/税务'},
+      {name: '工程技术与设计服务'},
+      {name: '检测/认证'},
+      {name: '景区/商业/市场等综合管理'},
+      {name: '商业代理服务'},
+      {name: '专利/商标/知识产权'},
+      {name: '租赁服务'},
+      {name: '专业技术服务'}
+    ]
+  },
+  {
+    name: '生活服务',
+    children: [
+      {name: '餐饮业'},
+      {name: '酒店/民宿'},
+      {name: '旅游业'},
+      {name: '婚庆/摄影'},
+      {name: '美容/保健/养生'},
+      {name: '居民服务'}
+    ]
+  },
+  {
+    name: '能源/环保/矿产',
+    children: [
+      {name: '石油/石化'},
+      {name: '化工'},
+      {name: '电力/水利/热力/燃气'},
+      {name: '新能源'},
+      {name: '环保'},
+      {name: '矿产/采掘'}
+    ]
+  },
+  {
+    name: '政府/非盈利机构',
+    children: [
+      {name: '国家机构'},
+      {name: '社团/组织/社会保障'},
+      {name: '养老/孤儿/看护等社会服务'}
+    ]
+  },
+  {
+    name: '农/林/牧/渔',
+    children: [
+      {name: '农/林/牧/渔'}
+    ]
+  }
+]
+var jobJson = [
+  '总裁/总经理/总监', 
+  '市场经理/主管',
+  '销售经理/主管',
+  '渠道经理/主管',
+  '投标经理/专员',
+  '采购经理/专员',
+  '数据分析师',
+  '招标师', 
+  '项目经理', 
+  '其他'
+]
+var companyScaleJson = [
+  '0-19人',
+  '20-99人',
+  '100-499人',
+  '500-999人',
+  '1000-9999人',
+  '100000人以上'
+]

+ 281 - 0
src/web/staticres/css/collect-user-info.css

@@ -0,0 +1,281 @@
+.fl{
+  float: left;
+}
+.fr{
+  float: right;
+}
+#collectUserInfoDialog .mask{
+  position: fixed;
+  width: 100%;
+  height: 100%;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: #000000;
+  opacity: 0.6;
+  z-index: 999;
+}
+#collectUserInfoDialog .dialog-container{
+  position: fixed;
+  left: 50%;
+  top: 50%;
+  width: 752px;
+  height: auto;
+  margin: 0 auto;
+  padding: 32px;
+  background: #fff;
+  border-radius: 8px;
+  transform: translate(-50%,-50%);
+  z-index: 1000;
+  box-sizing: border-box;
+}
+#collectUserInfoDialog .dialog-header{
+  color: #1D1D1D;
+  font-size: 18px;
+  line-height: 28px;
+  text-align: center;
+}
+#collectUserInfoDialog .dialog-content{
+  margin-top: 20px;
+}
+#collectUserInfoDialog .form-title{
+  font-size: 14px;
+  line-height: 22px;
+  color: #2CB7CA;
+}
+#collectUserInfoDialog .form-main{
+  margin: 10px 0 14px;
+}
+#collectUserInfoDialog .short-control{
+  width: calc(50% - 16px);
+}
+#collectUserInfoDialog .long-control{
+  width: 100%;
+}
+
+#collectUserInfoDialog .item-input{
+  width: auto;
+}
+#collectUserInfoDialog .company-result{
+  position: absolute;
+  width: 600px;
+  top: 38px;
+  left: 88px;
+  height: auto;
+  background-color: #fff;
+  border: 1px solid #2CB7CA;
+  z-index: 100;
+  border-radius: 4px;
+}
+#collectUserInfoDialog .company-list{
+  padding: 0 16px;
+  height: 30px;
+  line-height: 30px;
+  font-size: 14px;
+  color: #1D1D1D;
+  cursor: pointer;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+}
+#collectUserInfoDialog .company-list:hover{
+  background: #ECECEC;
+}
+#collectUserInfoDialog [data-short-input]{
+  width: 240px;
+  height: 36px;
+  box-sizing: border-box;
+  border-radius: 4px;
+}
+#collectUserInfoDialog [data-long-input]{
+  width: 600px;
+  height: 36px;
+  border: 1px solid #E0E0E0;
+  box-sizing: border-box;
+  border-radius: 4px;
+}
+#collectUserInfoDialog .agree-service{
+  text-align: center;
+}
+#collectUserInfoDialog .agree-service .el-checkbox__label, 
+#collectUserInfoDialog .agree-service .el-checkbox__input.is-checked+.el-checkbox__label{
+  color: #686868;
+}
+#collectUserInfoDialog .dialog-footer{
+  padding-top: 20px;
+  text-align: center;
+}
+#collectUserInfoDialog .cancel-btn{
+  width: 132px;
+  height: 36px;
+  line-height: 36px;
+  padding: 0;
+  border-radius: 6px;
+}
+#collectUserInfoDialog .submit-btn{
+  width: 132px;
+  height: 36px;
+  padding: 0;
+  color: #fff;
+  line-height: 36px;
+  background: #2CB7CA;
+  border-radius: 6px;
+  border: 1px solid #2CB7CA;
+}
+#collectUserInfoDialog .submit-btn:hover{
+  color: #fff;
+  border-color: #2cb7ca99;
+  background: #2cb7ca99;
+}
+/* element-ui reset */
+#collectUserInfoDialog .company-type > .el-form-item__label,
+#collectUserInfoDialog .company-type > .el-form-item__content{
+  line-height: 22px;
+}
+.el-form-item{
+  margin-bottom: 12px;
+}
+.el-form-item__error{
+  padding: 0px 0 0 90px;
+}
+.el-form-item__label{
+  width: 80px;
+  padding: 0;
+  margin-right: 8px;
+  color: #686868;
+}
+.el-cascader-panel{
+  min-width: 240px;
+}
+.el-cascader{
+  line-height: 36px;
+  border: 0;
+}
+#collectUserInfoDialog .el-input__inner{
+  height: 36px;
+  line-height: 36px;
+}
+.el-cascader-menu{
+  min-width: 0;
+}
+.el-cascader-node{
+  padding: 0 28px 0 6px;
+}
+.el-cascader-node__prefix{
+  display: none;
+}
+.el-cascader-menu:last-child{
+  flex: 1;
+}
+.el-cascader__dropdown{
+  border-color: #2CB7CA;
+}
+.el-select-dropdown{
+  border-color: #2CB7CA;
+}
+.el-popper[x-placement^=bottom]{
+  margin-top: 0;
+}
+.el-popper[x-placement^=bottom] .popper__arrow{
+  display: none;
+}
+.el-input.is-active .el-input__inner, 
+.el-input__inner:focus{
+  border-color: #2CB7CA;
+}
+.el-select .el-input.is-focus .el-input__inner,
+.el-select .el-input__inner:focus{
+  border-color: #2CB7CA;
+}
+.el-cascader .el-input .el-input__inner:focus, 
+.el-cascader .el-input.is-focus .el-input__inner {
+  border-color: #2CB7CA;
+}
+.el-checkbox__input.is-focus{
+  border-color: #2CB7CA;
+}
+.el-checkbox{
+  margin-right: 12px;
+}
+.el-checkbox__label{
+  padding-left: 3px;
+  color: #1D1D1D;
+}
+.el-checkbox__input.is-checked+.el-checkbox__label{
+  color: #1D1D1D;
+}
+.el-checkbox__input.is-checked .el-checkbox__inner, 
+.el-checkbox__input.is-indeterminate .el-checkbox__inner{
+  background-color: #2CB7CA;
+  border-color: #2CB7CA;
+}
+.el-checkbox__inner:hover{
+  border-color: #DCDFE6;
+}
+.el-cascader-node.in-active-path, .el-cascader-node.is-active, .el-cascader-node.is-selectable.in-checked-path,
+.el-select-dropdown__item.selected{
+  color: #2CB7CA;
+}
+
+
+#success-dialog .success-dialog-container{
+  position: fixed;
+  width: 380px;
+  top: 50%;
+  left: 50%;
+  padding: 20px;
+  transform: translateX(-50%) translateY(-50%);
+  background: #ffffff;
+  border-radius: 8px;
+  transition: all 2s linear;
+  z-index: 1038;
+}
+#success-dialog .success-title{
+  padding: 12px 0 20px;
+  color: #1d1d1d;
+  line-height: 28px;
+  font-size: 18px;
+  text-align: center;
+}
+#success-dialog .success-content{
+  text-align: center;
+  color: #686868;
+  line-height: 22px;
+  font-size: 14px;
+}
+#success-dialog .success-footer{
+  padding: 32px 0 12px;
+  text-align: center;
+}
+.mask {
+  position: fixed;
+  width: 100%;
+  height: 100%;
+  right: 0;
+  left: 0;
+  top: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, .5);
+  z-index: 1031;
+}
+
+#success-dialog .custom-btn{
+  display: inline-block;
+  width: 132px;
+  height: 36px;
+  line-height: 36px;
+  background: #2cb7ca;
+  border-radius: 6px;
+  text-align: center;
+  color: #fff;
+  font-size: 16px;
+  cursor: pointer;
+}
+#collect-dialog .custom-btn:disabled{
+  opacity: 0.5;
+  cursor:not-allowed;
+}
+.el-popper ul li{
+  float: none!important;
+}

+ 528 - 0
src/web/staticres/js/pc-collect-user-info.js

@@ -0,0 +1,528 @@
+var temp = `
+  <div>
+    <div class="user-data-dialog" id="collectUserInfoDialog" v-if="showForm">
+      <div class="mask"></div>
+      <div class="dialog-container">
+        <div class="dialog-header">@@dialogTitle@@</div>
+        <div class="dialog-content">
+          <el-form class="user-form" :model="form" :rules="rules" ref="ruleForm">
+            <!-- 基本信息 -->
+            <div class="basic clearfix">
+              <div class="form-title">基本信息</div>
+              <div class="form-main clearfix">
+                <div class="short-control fl">
+                  <el-form-item label="姓名 :" prop="name">
+                    <el-input v-model.trim="form.name" data-short-input class="item-input" placeholder="请输入姓名" required>
+                    </el-input>
+                  </el-form-item>
+                </div>
+                <div class="short-control fr">
+                  <el-form-item label="手机号 :" prop="phone">
+                    <el-input v-model.trim="form.phone" maxlength="11" @input="inputPhone" data-short-input class="item-input" placeholder="请输入手机号"></el-input>
+                  </el-form-item>
+                </div>
+                <div class="short-control fl">
+                  <el-form-item label="邮箱 :" prop="email">
+                    <el-input v-model.trim="form.email" data-short-input class="item-input" placeholder="请输入邮箱"></el-input>
+                  </el-form-item>
+                </div>
+                <div class="short-control fr">
+                  <el-form-item label="地区 :">
+                    <el-cascader data-short-input v-model="form.region" class="item-input" :options="regionData"
+                      placeholder="请选择省份城市" clearable></el-cascader>
+                  </el-form-item>
+                </div>
+                <div class="short-control fl">
+                  <el-form-item label="行业 :">
+                    <el-cascader data-short-input v-model="form.industry" class="item-input" :options="industryData"
+                      placeholder="请选择所属行业" clearable></el-cascader>
+                  </el-form-item>
+                </div>
+                <div class="short-control fr">
+                  <el-form-item label="受雇类型 :">
+                    <el-select v-model="form.mold" data-short-input class="item-input">
+                      <el-option v-for="item in moldData" :key="item.value" :label="item.label" :value="item.value">
+                      </el-option>
+                    </el-select>
+                  </el-form-item>
+                </div>
+              </div>
+            </div>
+            <div class="company clearfix" v-show="showCompany">
+              <div class="form-title">公司信息</div>
+              <div class="form-main">
+                <div class="long-control" style="position: relative;">
+                  <el-form-item label="公司名称 :" prop="companyName">
+                    <el-input 
+                    v-model.trim="form.companyName" 
+                    data-long-input
+                    class="item-input company-name" 
+                    @focus="companyFocus"
+                    @input="searchCompany"
+                    placeholder="请输入公司名称">
+                    </el-input>
+                  </el-form-item>
+                  <div class="company-result" v-if="showSearchResult">
+                    <div class="company-list" v-for="item in companyList" :key="item" @click="selectCompany(item)" v-html="item"></div>
+                  </div>
+                </div>
+                <div class="long-control">
+                  <el-form-item label="公司类型 :" class="company-type">
+                    <el-checkbox-group v-model="form.companyType">
+                      <el-checkbox label="投标企业"></el-checkbox>
+                      <el-checkbox label="招标采购单位"></el-checkbox>
+                      <el-checkbox label="厂商"></el-checkbox>
+                      <el-checkbox label="招标代理机构"></el-checkbox>
+                      <el-checkbox label="经销商"></el-checkbox>
+                      <el-checkbox label="服务提供商"></el-checkbox>
+                      <el-checkbox label="其他"></el-checkbox>
+                    </el-checkbox-group>
+                  </el-form-item>
+                </div>
+                <div class="long-control">
+                  <el-form-item label="职位 :">
+                    <el-select v-model="form.job" placeholder="请选择职位" data-short-input class="item-input" clearable>
+                      <el-option v-for="item in jobData" :key="item.value" :label="item.label" :value="item.value">
+                      </el-option>
+                    </el-select>
+                    <el-input 
+                    v-if="showOtherJob"
+                    v-model.trim="form.otherJob" 
+                    data-short-input
+                    class="item-input"
+                    placeholder="请输入职位名称">
+                    </el-input>
+                  </el-form-item>
+                </div>
+                <div class="long-control">
+                  <el-form-item label="公司规模 :">
+                    <el-select v-model="form.scale" placeholder="请选择公司规模" data-short-input class="item-input" clearable>
+                      <el-option v-for="item in scaleData" :key="item.value" :label="item.label" :value="item.value">
+                      </el-option>
+                    </el-select>
+                  </el-form-item>
+                </div>
+                <div class="long-control">
+                  <el-form-item label="业务范围 :">
+                    <el-input v-model="form.business" data-long-input class="item-input"
+                      placeholder="请输入业务范围,让合作伙伴充分了解公司业务内容"></el-input>
+                  </el-form-item>
+                </div>
+                <div class="long-control">
+                  <el-form-item label="合作需求 :">
+                    <el-input v-model="form.need" data-long-input class="item-input"
+                      placeholder="请输入合作需求,从而创造并匹配更多合作交流机会"></el-input>
+                  </el-form-item>
+                </div>
+              </div>
+            </div>
+            <div class="agree-service">
+              <el-checkbox v-model="form.agreeChecked">&nbsp;我同意剑鱼标讯将业务范围及合作需求提供给潜在合作伙伴搜索、查看</el-checkbox>
+            </div>
+            <div class="dialog-footer">
+              <el-button class="cancel-btn" @click="cancelForm">暂不提供</el-button>
+              <el-button class="submit-btn" @click="submitForm('ruleForm')">提交</el-button>
+            </div>
+          </el-form>
+        </div>
+      </div>
+    </div>
+    <div id="success-dialog" style="display: none;" v-show="showSuccess">
+      <div class="mask"></div>
+      <div class="success-dialog-container">
+        <div class="success-title">提交成功</div>
+        <div class="success-content">我们的客户经理会在24小时内尽快与您联系。</div>
+        <div class="success-footer">
+          <button type="button" class="custom-btn go-know" @click="showSuccess = false">我知道了</button>
+        </div>
+      </div>
+    </div>
+  </div>
+  `
+var filterData = chinaMapJSON.filter(function (item) {
+  item.name = item.name.replace(/\s*/g,"")
+  return item.name !== '海外' && item.name !== '钓鱼岛'
+})
+filterData.forEach(function (item) {
+  if (item.name == '台湾省') { item.name = '台湾'}
+  item.name = item.name.replace(/自治区|特别行政区|壮族|回族|维吾尔/g, '')
+  item.label = item.name
+  item.value = item.name
+  var filterWord = ['北京市', '上海市', '天津市', '上海市', '重庆市', '香港', '澳门', '台湾']
+  if (filterWord.indexOf(item.name) == -1) {
+    item.children = item.city.map(function (v) {
+      return {
+        value: v.name,
+        label: v.name
+      }
+    })
+  }
+})
+industryJson.forEach(function (item) {
+  item.label = item.name
+  item.value = item.name
+  item.children = item.children.map(function (v) {
+    return {
+      value: v.name,
+      label: v.name
+    }
+  })
+})
+var jobData = jobJson.map(function (item) {
+  return {
+    value: item,
+    label: item
+  }
+})
+var companyScaleData = companyScaleJson.map(function (item) {
+  return {
+    value: item,
+    label: item
+  }
+})
+// 防抖
+function debounce(fn, delay) {
+  var timer
+  return function () {
+    var context = this
+    var args = arguments
+    clearTimeout(timer)
+    timer = setTimeout(function () {
+      fn.apply(context, args)
+    }, delay)
+  }
+}
+var vm = new Vue({
+  el: '#vue-collect-user-info',
+  delimiters: ['@@', '@@'],
+  template: temp,
+  data: function () {
+    var validName = function(rule,value,callback) {
+      if(value === '') {
+        return callback(new Error('姓名为必填项'));
+      } else {
+        if (value.length < 2) {
+          return callback(new Error('姓名填写不正确'));
+        }
+        callback();
+      }
+    }
+    var validPhone = function(rule,value,callback) {
+      var status = /^1[3456789]\d{9}$/.test(value)
+      if(value === '') {
+        return callback(new Error('手机号为必填项'));
+      } else if (!status) {
+        return callback(new Error('手机号填写不正确'));
+      } else {
+        callback();
+      }
+    }
+    var validEmail = function(rule,value,callback) {
+      var status = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(value)
+      if (value === '') {
+        callback();
+      } else {
+        if (!status) {
+          return callback(new Error('邮箱填写不正确'));
+        } else {
+          callback();
+        }
+      }
+    }
+    var validCompany = function(rule,value,callback) {
+      if (value === '') {
+        callback();
+      } else {
+        if (value.length < 2) {
+          return callback(new Error('公司名称至少输入2个字'));
+        } else {
+          callback();
+        }
+      }
+    }
+    return {
+      dialogTitle: '为给您匹配精准的推荐信息,请完善个人信息',
+      // showCompany: true, // 是否显示公司信息
+      regionData: filterData, // 地区数据
+      industryData: industryJson, // 行业数据
+      jobData: jobData, // 职位数据
+      scaleData: companyScaleData, // 公司规模数据
+      moldData: [{ // 公司类型数据
+        label: '公司',
+        value: '公司'
+      }, {
+        label: '个体经营者',
+        value: '个体经营者'
+      },{
+        label: '其他',
+        value: '其他'
+      }],
+      form: {
+        name: '', // 姓名
+        phone: '', // 手机号
+        email: '', // 邮箱
+        region: [], // 地区值
+        industry: [], // 行业值
+        mold: '公司', // 受雇类型值
+        companyName: '', // 公司名称
+        companyType: [], // 公司类型值
+        job: '', // 职位值
+        otherJob: '', //自定义职位
+        scale: '', // 公司规模
+        business: '', // 业务范围
+        need: '', // 合作需求
+        agreeChecked: true
+      },
+      rules: {
+        name: [
+          {
+            required: true,
+            validator: validName
+          }
+        ],
+        phone: [
+          {
+            required: true,
+            validator: validPhone
+          }
+        ],
+        email: [
+          {
+            validator: validEmail,
+            trigger: 'blur'
+          }
+        ],
+        companyName: [
+          {
+            validator: validCompany,
+            trigger: 'blur'
+          }
+        ]
+      },
+      showSearchResult: false,
+      companyList: [],
+      showForm: false,  // 显示表单填写弹框
+      showSuccess: false, // 显示提交成功弹框
+      isForce: false, // 是否强制
+      source: '' // 来源模块
+    }
+  },
+  computed: {
+    showOtherJob: function() {
+      return this.form.job == '其他'
+    },
+    showCompany: function() {
+      return this.form.mold === '公司'
+    }
+  },
+  mounted() {
+    let that = this;
+    $(document).on('click', function (e) {
+        let dom = $('.company-name')[0];
+        if (dom) {
+            // 如果点击的区域不在自定义dom范围
+            if (!dom.contains((e.target))) {
+              that.showSearchResult = false
+            }
+        } 
+    })
+  },
+  beforeDestroy() {
+    $(document).off('click')
+  },
+  methods: {
+    // 是否留资
+    isNeedSubmit: function(source, callback) {
+      /*
+        三级页-阅读原文	article_original
+        三级页-收藏	article_collection
+        大会员落地页-免费体验	member_freeuse
+      */
+      this.source = source
+      var _this = this
+      $.ajax({
+        type:'POST',
+        url:'/salesLeads/retainedCapital',
+        data: {
+          source: source
+        },
+        success:function (res) {
+          if (res.data) {
+            if (res.data.retainedCapital) {
+              _this.showForm = true
+              _this.getOldInfo()
+            } else {
+              callback && callback()
+            }
+            _this.isForce = res.data.fource
+          }
+        }
+      })
+    },
+    // 表单提交事件
+    submitForm: function(formName) {
+      var _this = this
+      this.$refs[formName].validate(function (valid) {
+        if (valid) {
+          _this.formAjax(_this.source)
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    // 表单提交请求
+    formAjax: function(source) {
+      var params;
+      if (this.form.mold == '公司') {
+        params = {
+          source: source, // 来源模块
+          name: this.form.name,
+          phone: this.form.phone, // 手机号
+          email: this.form.email, // 邮箱
+          province: this.form.region[0],
+          city: this.form.region[1] ? this.form.region[1] : '',
+          industry: this.form.industry.join('_'), // 行业值
+          hireType: this.form.mold, // 受雇类型值
+          company: this.form.companyName, // 公司名称
+          companyType: this.form.companyType.join(','), // 公司类型值
+          position: this.form.job == '其他' ? this.form.otherJob : this.form.job, // 职位值
+          company_size: this.form.scale, // 公司规模
+          workScope: this.form.business, // 业务范围
+          partnerNeeds: this.form.need, // 合作需求
+          agree: true
+        }
+      } else {
+        params = {
+          source: source, // 来源模块
+          name: this.form.name,
+          phone: this.form.phone, // 手机号
+          email: this.form.email, // 邮箱
+          province: this.form.region[0],
+          city: this.form.region[1] ? this.form.region[1] : '',
+          industry: this.form.industry.join('_'), // 行业值
+          hireType: this.form.mold, // 受雇类型值
+          agree: true
+        }
+      }
+      console.log(params)
+      var _this = this
+      $.ajax({
+        type:'POST',
+        url:'/salesLeads/collectInfo',
+        contentType: "application/json;charset=utf-8",
+        data: JSON.stringify(params),
+        success:function (res) {
+          if (res.data) {
+            _this.showForm = false
+            _this.showSuccess = true
+          }
+        }
+      })
+    },
+    // 手机号输入框input事件
+    inputPhone: function(val) {
+      this.form.phone = val.replace(/[^\d]/g,'')
+    },
+    // 查询表单回显信息
+    getOldInfo: function() {
+      var _this = this
+      $.ajax({
+        type:'POST',
+        url:'/salesLeads/echoInfo?t=' + Date.now(),
+        success:function (res) {
+          if (res.data) {
+            _this.form.name = res.data.name ? res.data.name : ''
+            _this.form.phone = res.data.phone ? res.data.phone : ''
+            _this.form.email = res.data.email ? res.data.email : ''
+            if (res.data.province && res.data.city) {
+              _this.form.region = [res.data.province, res.data.city]
+            } else if (res.data.province && !res.data.city) {
+              _this.form.region = [res.data.province]
+            } else {
+              _this.form.region = []
+            }
+            _this.form.industry = res.data.industry ? res.data.industry.split('_') : []
+            _this.form.mold = res.data.hireType ? res.data.hireType : '公司'
+            _this.form.companyName = res.data.company ? res.data.company : ''
+            _this.form.companyType = res.data.companyType ? res.data.companyType.split(',') : []
+            if (res.data.position) {
+              if (jobJson.indexOf(res.data.position) == -1) {
+                _this.form.job = '其他'
+                _this.form.otherJob = res.data.position
+              } else {
+                _this.form.job = res.data.position
+              }
+            } else {
+              _this.form.job = ''
+            }
+            _this.form.scale = res.data.company_size ? res.data.company_size : ''
+            _this.form.business = res.data.workScope ? res.data.workScope : ''
+            _this.form.need = res.data.partnerNeeds ? res.data.partnerNeeds : ''
+            _this.form.agreeChecked = res.data.agree ? res.data.agree : true
+          }
+        }
+      })
+    },
+    // 公司名称获取焦点时
+    companyFocus: function() {
+      this.getResult(this.form.companyName)
+    },
+    // 企业名称联想
+    getResult:function(name) {
+      // 名称为空或长度小于2不发请求
+      if (!name || name.length < 2) return
+      var _this = this
+      $.ajax({
+        type:'POST',
+        url:'/jypay/user/company/association',
+        data: {
+          name: name
+        },
+        heads : {
+          'content-type': 'application/x-www-form-urlencoded'
+        },
+        success:function (res) {
+          console.log(res)
+          if (res.data && res.data.length > 0) {
+            var result = []
+            res.data.map(function(item){
+              item = _this.brightKeyword(item)
+              result.push(item)
+              return result
+            })
+            _this.companyList = result
+            _this.showSearchResult = true
+          }
+        }
+      })
+    },
+    searchCompany: debounce(function(val){
+      if(val === '') { this.showSearchResult = false}
+      this.getResult(val)
+    }, 600),
+    // 选择联想出来的公司名称
+    selectCompany: function(item) {
+      this.form.companyName = item.replace(/<.*?>/ig, '')
+      this.showSearchResult = false
+    },
+    // 关键词高亮
+    brightKeyword: function (val) {
+      var name = this.form.companyName
+      if (val.indexOf(name) !== -1) {
+        return val.replace(name, `<font style='color:#2ABED1;'>${name}</font>`)
+      } else {
+        return val
+      }
+    },
+    // 暂不提供 
+    cancelForm: function() {
+      this.showForm = false
+      // if (this.isForce) {
+      //   history.back()
+      // } else {
+      //   this.showForm = false
+      // }
+    }
+  }
+})

+ 23 - 83
src/web/templates/big-member/pc/page_index.html

@@ -16,6 +16,8 @@
     <link href='{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
     <link href='{{Msg "seo" "cdn"}}/css/swiper.min.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
     <link href='{{Msg "seo" "cdn"}}/big-member/css/page_index.css?v={{Msg "seo" "version"}}2' rel="stylesheet" type="text/css"/>
+    <link href="//cdn.jsdelivr.net/npm/element-ui@2.13.2/lib/theme-chalk/index.css" rel="stylesheet" />
+    <link href='{{Msg "seo" "cdn"}}/css/collect-user-info.css?v={{Msg "seo" "version"}}' rel="stylesheet">
     <style>
         body #public-nav[data-theme] .iner .jynav li:hover > a,
         body #public-nav[data-theme] .iner .jynav li.hover > a,
@@ -53,8 +55,10 @@
 </head>
 <body>
 {{include "/common/pchead.html"}}
-
+<!-- 用户留资 -->
+<div id="vue-collect-user-info"></div>
 <div class="page--big--index">
+    
     <div class="w-box top-barner">
         <div class="w1200">
             <div class="top-title">
@@ -930,7 +934,7 @@
       </div>
     </div>
     <!-- 提交成功弹框 -->
-    <div id="success-dialog" style="display: none;">
+    <!-- <div id="success-dialog" style="display: none;">
       <div class="mask"></div>
       <div class="success-dialog-container">
         <div class="success-title">提交成功</div>
@@ -939,12 +943,17 @@
           <button type="button" class="custom-btn go-know">我知道了</button>
         </div>
       </div>
-    </div>
+    </div> -->
 </div>
 <script src='{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
 <script src='{{Msg "seo" "cdn"}}/js/jquery.cookie.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
 <script src="https://cdn.jsdelivr.net/npm/countup.js@1.9.3/dist/countUp.js"></script>
 <script src='{{Msg "seo" "cdn"}}/js/swiper.min.js'></script>
+<script src="https://cdn-ali2.jianyu360.com/common-module/selector/js/china_area.js"></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/selector/js//static-data.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
+<script src="//cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js"></script>
+<script src="//cdn.jsdelivr.net/npm/element-ui@2.13.2/lib/index.js"></script>
+<script src='{{Msg "seo" "cdn"}}/js/pc-collect-user-info.js?v={{Msg "seo" "version"}}'></script>
 <script>
     $("img").on('dragstart',false)
     function computeSliderStyle () {
@@ -1063,7 +1072,7 @@
               }
               location.href = buy_ontrial_href;
             */
-            $(".click-button-box.free").trigger('click')
+            $(".click-button-box.free:eq(0)").trigger('click')
         })
         /* 功能演示 */
         $(".click-button-box.free").on('mouseenter', function () {
@@ -1072,7 +1081,12 @@
             //     $('#iphoneX-box').append('<iframe data-src="/demo-member/demo_action.html" src="/demo-member/demo_action.html" scrolling="no" frameborder="0"></iframe>')
             // }
         })
-        $(".click-button-box.free").on('click', function () {
+        $('.click-button-box.free').each(function(i) {
+          $(this).unbind('click').click(function(){
+            if (!loginflag) {
+              openLoginDig()
+              return
+            }
             $.get('/front/pc/sobot?t=' + new Date().getTime() + '&q=大会员-pc-免费体验');
             var member_pc = getMemberSource(source);
             try {
@@ -1080,85 +1094,11 @@
             } catch (e) {
               console.log('未初始化百度统计')
             }
-            /*
-              // 原功能演示代码
-              var scaleRote = document.documentElement.clientHeight / 700
-              $("#iphoneX-box").css('transform', 'scale('+(scaleRote > 1 ? 1 : scaleRote)+')')
-              var iphoneDom = $('#iphoneX-box')
-              iphoneDom.show()
-              $("#iphoneX-box iframe")[0].contentWindow.OtherExitExperience = function() {
-                  iphoneDom.hide()
-                  $("#iphoneX-box iframe").remove()
-                  iphoneDom.append('<iframe data-src="/demo-member/demo_action.html" src="/demo-member/demo_action.html" scrolling="no" frameborder="0"></iframe>')
-              }
-            */
-            // 采集信息弹框
-            $('#collect-dialog').show()
-            $('body').css('overflow', 'hidden')
-            // 校验
-            validateInput()
-            function validateInput() {
-              var regName = $('.name-val').val().trim().length >= 2
-              var regPhone = /^1[3456789]\d{9}$/.test($('.phone-val').val())
-              var regCompany = $('.company-val').val().trim().length >= 2
-              if (regName && regPhone && regCompany) {
-                $('#collect-dialog .go-confirm').removeAttr('disabled')
-              } else {
-                $('#collect-dialog .go-confirm').attr('disabled', true)
-              }
-            }
-            $('.name-val').on("input", function () {
-              validateInput()
-            })
-            $('.phone-val').on("input", function () {
-              var val = $(this).val().replace(/[^\d]/g,'')
-              $(this).val(val)
-              validateInput()
-            })
-            $('.company-val').on("input", function () {
-              validateInput()
-            })
-            // 信息提交事件
-            $('#collect-dialog .go-confirm').unbind('click').bind('click', function() {
-              $(this).attr('disabled', true)
-              var obj = {
-                name: $('.name-val').val(),
-                phone: $('.phone-val').val(),
-                company: $('.company-val').val(),
-                position: $('.job-val').val()
-              }
-              console.log(obj)
-              $.ajax({
-                type:'POST',
-                url:'/salesLeads/member/trialInfo',
-                data: obj,
-                success:function (res) {
-                  $('#collect-dialog .go-confirm').removeAttr('disabled')
-                  if (res) {
-                    if (res.status === 1) {
-                      $('#collect-dialog').hide()
-                      $('#success-dialog').show()
-                    } else {
-                      console.log('提交失败')
-                    }
-                  }
-                }
-              })
-            })
-            // 关闭按钮
-            $('#collect-dialog .dialog-close').on('click',function() {
-              $('#collect-dialog').fadeOut()
-              $('body').css('overflow', 'auto')
-            })
-            // I know
-            $('#success-dialog .go-know').on('click',function() {
-              $('#success-dialog').fadeOut()
-              $('body').css('overflow', 'auto')
-              $('.name-val').val('')
-              $('.phone-val').val('')
-              $('.company-val').val('')
-              $('.job-val').val('')
+            vm.dialogTitle = '请完善个人信息,立刻获得全部功能的产品试用'
+            vm.isNeedSubmit('member_freeuse',function(){
+              vm.showSuccess = true
             })
+          })
         })
         try {
             var injectLogic = logic

+ 29 - 8
src/web/templates/pc/biddetail_rec.html

@@ -13,6 +13,8 @@
 <script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js"></script>
 <script src="{{Msg "seo" "cdn"}}/js/pdfobject.min.js"></script>
 <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}" />
+<link href="//cdn.jsdelivr.net/npm/element-ui@2.13.2/lib/theme-chalk/index.css" rel="stylesheet" />
+<link href='{{Msg "seo" "cdn"}}/css/collect-user-info.css?v={{Msg "seo" "version"}}' rel="stylesheet">
 <link href="{{Msg "seo" "cdn"}}/css/dev2/newBidSearch.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
 <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/pc_detail_tags.js?v={{Msg "seo" "version"}}"></script>
@@ -407,6 +409,8 @@ function isWechat() {
 }
 </script>
 <div class="j-content" style="padding-top: 26px;">
+  <!-- 用户留资 -->
+<div id="vue-collect-user-info"></div>
 <div class="main-content" style="width: 1200px; position: relative; margin: 0 auto">
 	<div class="biddetail-content" style="width:980px; margin-left:0px;">
 		<div class="com-title" id="com-title">
@@ -471,13 +475,17 @@ function isWechat() {
           collectBaiduEvent()
           var top = (parseInt($(this).position().top) + 30 ) + 'px';
           var bids = [{bid: {{.T.obj._id}}}]
-          collBidAction('C',bids,function(r) {
-            if (r.data) {
-              $('#bidCollected').show()
-              $('#bidCollect').hide()
-              $('.tags-box').show().css('top', top)
-              getUserTags()
-            }
+          vm.dialogTitle = '重要项目一键创建标签收藏!请完善个人信息,为您匹配精准服务'
+          // 查询是否需要用户留资料 不需要 则执行下一步回调(收藏标讯行为)
+          vm.isNeedSubmit('article_collection', function() {
+            collBidAction('C',bids,function(r) {
+              if (r.data) {
+                $('#bidCollected').show()
+                $('#bidCollect').hide()
+                $('.tags-box').show().css('top', top)
+                getUserTags()
+              }
+            })
           })
         })
         // 取消收藏事件
@@ -1163,7 +1171,12 @@ function isWechat() {
 var ucbs_source="pc_rec",ucbsId="{{.T.obj.ucbsId}}";
 </script>
 <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/ucbs.js?v={{Msg "seo" "version"}}"></script>-->
+<script src="https://cdn-ali2.jianyu360.com/common-module/selector/js/china_area.js"></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/selector/js//static-data.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
 <script src="{{Msg "seo" "cdn"}}/js/zxx.drag.1.0-min.js"></script>
+<script src="//cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js"></script>
+<script src="//cdn.jsdelivr.net/npm/element-ui@2.13.2/lib/index.js"></script>
+<script src="{{Msg "seo" "cdn"}}/js/pc-collect-user-info.js?v={{Msg "seo" "version"}}"></script>
 <script type="text/javascript">
 var oBox = document.getElementById("popup");
 var oBar = document.getElementById("pop-head");
@@ -1953,7 +1966,15 @@ $(function(){
 		//window.open('javascript:window.name', '<script>location.replace("'+url+'")<\/script>');
 	  originalhref=url
   }
-  $(".com-original").attr("dataHref",originalhref);
+  // $(".com-original").attr("dataHref",originalhref);
+  // 点击阅读原文 用户留资
+  $(".com-original").on('click',function() {
+    console.log('三级页-阅读原文:article_original')
+    vm.dialogTitle = '为给您匹配精准的推荐信息,请完善个人信息,免费查看原文'
+    vm.isNeedSubmit('article_original', function() {
+      window.open(originalhref)
+    })
+  })
 
 	//var sds = {{.T.keywords}};
 	var sds = getQueryString("kds");