|
@@ -0,0 +1,846 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="zh-CN" style="font-size: 50px;">
|
|
|
+
|
|
|
+<head>
|
|
|
+ <title>完善信息</title>
|
|
|
+ <meta name="viewport"
|
|
|
+ content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
|
|
+ <meta name="apple-mobile-web-app-capable" content="yes">
|
|
|
+ <meta name="format-detection" content="telephone=yes"/>
|
|
|
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
|
+ <meta name="referrer" content="always">
|
|
|
+ <!--引入公共资源头部-->
|
|
|
+ {{include "/big-member/meta.html"}}
|
|
|
+ <script src="{{Msg "seo" "cdn"}}/js/jquery-3.2.1.min.js?v={{Msg "seo" "version"}}"></script>
|
|
|
+ <script src="/big-member/js/rem.js"></script>
|
|
|
+ {{include "/common/weixin.html"}}
|
|
|
+
|
|
|
+ <!--S-当前页必定需要预加载的资源-->
|
|
|
+ <link rel="preload" as="style" href='//cdn-common.jianyu360.com/cdn/lib/vant/2.8.2/lib/index.css'/>
|
|
|
+ <link rel="preload" as="style" href='//cdn-common.jianyu360.com/cdn/lib/vant/2.8.2/lib/icon/local.css'/>
|
|
|
+ <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/big-member/weixin/css/public.css?v={{Msg "seo" "version"}}'>
|
|
|
+ <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/big-member/css/j-icons.css?v={{Msg "seo" "version"}}'>
|
|
|
+ <!--E-当前页必定需要预加载的资源-->
|
|
|
+
|
|
|
+
|
|
|
+ <!--S-当前页面的css资源-->
|
|
|
+ <link rel="stylesheet" href='//cdn-common.jianyu360.com/cdn/lib/vant/2.8.2/lib/index.css'/>
|
|
|
+ <link rel="stylesheet" href='//cdn-common.jianyu360.com/cdn/lib/vant/2.8.2/lib/icon/local.css'/>
|
|
|
+ <link rel="stylesheet"
|
|
|
+ href='{{Msg "seo" "cdn"}}/common-module/perfect-info/index.css?v={{Msg "seo" "version"}}'/>
|
|
|
+ <style>
|
|
|
+ .exhibition-page .van-field__control,
|
|
|
+ .exhibition-page .sendbtn {
|
|
|
+ font-size: 0.32rem;
|
|
|
+ font-style: normal;
|
|
|
+ font-weight: 500;
|
|
|
+ line-height: 0.48rem;
|
|
|
+ color: #5F5E64;
|
|
|
+ }
|
|
|
+ .exhibition-page .van-field__control::placeholder {
|
|
|
+ color: #C0C4CC;
|
|
|
+ }
|
|
|
+
|
|
|
+ .exhibition-page .sendbtn.canNextSend {
|
|
|
+ color: #2ABED1;
|
|
|
+ }
|
|
|
+ .exhibition-page .top-banner-group img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ .exhibition-page .van-cell {
|
|
|
+ font-size: 0.3rem;
|
|
|
+ font-style: normal;
|
|
|
+ font-weight: 500;
|
|
|
+ line-height: 0.44rem;
|
|
|
+ color: #5F5E64;
|
|
|
+ padding: 0.3rem 0.32rem;
|
|
|
+ }
|
|
|
+ .exhibition-page .top-banner-group {
|
|
|
+ max-height: 1.6rem;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <!--E-当前页面的css资源-->
|
|
|
+ <script>
|
|
|
+ try {
|
|
|
+ window.JyObj.hiddenBottom('0')
|
|
|
+ } catch (e) {
|
|
|
+ console.log('error: app not function')
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+</head>
|
|
|
+
|
|
|
+<body>
|
|
|
+<div class="j-container">
|
|
|
+ {{include "/big-member/header.html"}}
|
|
|
+ <div class="j-main perfect-info-group exhibition-page" id="perfect-info-page" v-cloak>
|
|
|
+ <div class="j-container">
|
|
|
+ <div class="j-main info-collect">
|
|
|
+ <div class="top-banner-group" @click="openTopBanner" v-if="topBannerInfo.s_pic">
|
|
|
+ <img :src="topBannerInfo.s_pic" :alt="topBannerInfo.s_picalt || '完善信息-顶部广告展示'">
|
|
|
+ </div>
|
|
|
+ <div class="form-card-group">
|
|
|
+ <div class="form-title">基本信息</div>
|
|
|
+ <div class="form-content-card">
|
|
|
+ <van-field v-model.trim="infoMap.name" label="姓名" @focus="infoCheckMap.name = ''" @blur="getCheckMap('name')"
|
|
|
+ :error-message="infoCheckMap.name" required placeholder="请输入姓名"></van-field>
|
|
|
+ <van-field @input="getInputPhone" v-model.trim="infoMap.phone" label="手机号" @focus="infoCheckMap.phone = ''"
|
|
|
+ @blur="getCheckMap('phone')" :error-message="infoCheckMap.phone" required
|
|
|
+ placeholder="请输入准确的手机号"></van-field>
|
|
|
+ <van-field v-if="setcodeShow" v-model.trim="infoMap.vercode" label="验证码" @focus="infoCheckMap.vercode = ''"
|
|
|
+ @blur="getCheckMap('vercode')" :error-message="infoCheckMap.vercode" required
|
|
|
+ @input="getCheckCode"
|
|
|
+ placeholder="请输入短信验证码">
|
|
|
+ <template #button>
|
|
|
+ <span v-show="sendShow" style="font-size: .28rem;" class="sendbtn" :class="{'canNextSend': canNextSend}" @click="sendMsg">发送验证码</span>
|
|
|
+ <span class="timedown" v-show="!sendShow"></span>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+ <van-field v-model.trim="infoMap.email" label="邮箱" @focus="infoCheckMap.email = ''" @blur="getCheckMap('email')"
|
|
|
+ :error-message="infoCheckMap.email" placeholder="请输入邮箱"></van-field>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-card-group">
|
|
|
+ <div class="form-title">公司信息</div>
|
|
|
+ <div class="form-content-card">
|
|
|
+ <div class="associate-ent-group" v-show="isAssociateShow">
|
|
|
+ <div class="associate-ent-item" @click="selectEnt(item)" v-for="(item, i) in searchList" v-bind:key="i" v-html="highlightText(item, infoMap.company)"></div>
|
|
|
+ </div>
|
|
|
+ <van-field @input="entOnChange('input')" @blur="getCheckMap('company')" @focus="infoCheckMap.company = ''"
|
|
|
+ :error-message="infoCheckMap.company" required v-model.trim="infoMap.company" label="公司名称" placeholder="请输入准确的公司名称"></van-field>
|
|
|
+ <van-field v-model="infoMap.companyType" label="公司类型"
|
|
|
+ @click="openPop('公司类型')" readonly is-link placeholder="请选择公司类型"></van-field>
|
|
|
+ <van-field :class="{'hide-border': infoMap.position === '其他'}" @blur="getCheckMap('position')" v-model="infoMap.position" label="职位" @click="openPop('职位')" readonly is-link
|
|
|
+ placeholder="请选择职位"></van-field>
|
|
|
+ <van-field class="other-input-group" @focus="infoCheckMap.position_other = ''"
|
|
|
+ :error-message="infoCheckMap.position_other" v-model.trim="infoMap.position_other" v-show="infoMap.position === '其他'" required label="职位" placeholder="请输入职位"></van-field>
|
|
|
+ <van-field v-if="showBranch" :error-message="infoCheckMap.branch" v-model="infoMap.branch" @blur="getCheckMap('branch')" label="部门" @click="openPop('部门')" readonly is-link placeholder="请选择部门"></van-field>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="warm-prompt">
|
|
|
+ <span class="icon-warning"></span>
|
|
|
+ <span class="warm-text">温馨提示:请提供准确的信息,我们将为您推荐更准确、更个性化的商机和服务</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="j-footer">
|
|
|
+ <div class="j-button-group">
|
|
|
+ <button class="j-button-confirm" :data-cl-event="submitElEvent" :disabled="isSubmitDisabled" @click="submitForm">提交</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <van-popup class="prefect-pop-group" v-model="popInfo.show" round position="bottom"
|
|
|
+ :style="{ height: getPopHeight }">
|
|
|
+ <div class="j-container">
|
|
|
+ <div class="j-header">
|
|
|
+ <div class="pop-title-group">
|
|
|
+ <span>@@popInfo.title@@</span>
|
|
|
+ <div class="close-padding-box" @click="popInfo.show = false">
|
|
|
+ <i class="j-icon base-icon icon-delete-gray"></i>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="j-main" v-show="conditionMap[popInfo.label]">
|
|
|
+ <div class="condition-select-group" :class="{more: isMoreSelect}">
|
|
|
+ <div class="condition-select-item" @click="onSelectItem(item, popInfo.label)" v-for="(item,i) in conditionMap[popInfo.label]" :class="{checked: item.checked}">
|
|
|
+ <div>@@item.title@@</div>
|
|
|
+ <i v-if="!isMoreSelect" class="j-icon base-icon icon-tick"></i>
|
|
|
+ <div class="more-icon-box" v-else>
|
|
|
+ <i class="j-icon base-icon icon-tick-circle"></i>
|
|
|
+ <i class="j-icon base-icon icon-tick-circle-fill"></i>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="j-footer">
|
|
|
+ <div class="j-button-group">
|
|
|
+ <button class="j-button-confirm" :disabled="isNextDisabled" @click="submitPop">确认</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </van-popup>
|
|
|
+ </div>
|
|
|
+ <van-popup v-model="commitshow" class="commitdialog" :close-on-click-overlay="overlayShow">
|
|
|
+ <div class="j-container">
|
|
|
+ <div class="j-header com-header">
|
|
|
+ <span class="infor-icon-close"></span>
|
|
|
+ </div>
|
|
|
+ <div class="j-main com-main">
|
|
|
+ <div class="img-duihao">
|
|
|
+ <img src="/structuredata/mobile/image/choose.png" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="commit_success">提交成功</div>
|
|
|
+ <div class="commit_tip">我们稍后将以邮件的形式发送数据样例</div>
|
|
|
+ <div class="commit_know">
|
|
|
+ <button class="commit_btn" @click="history.back()">我知道了</button>
|
|
|
+ </div>
|
|
|
+ <div class="data_exportclick">
|
|
|
+ <img @click="location.href = '/front/wx_dataExport/toSieve'" src='{{Msg "seo" "cdn"}}/common-module/perfect-info/image/dataimg.png' alt="">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="j-footer com-footer"></div>
|
|
|
+ </div>
|
|
|
+ </van-popup>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+
|
|
|
+<script rel="preload" as="script" src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
|
|
|
+<script rel="preload" as="script" src=//cdn-common.jianyu360.com/cdn/lib/vant/2.8.2/vant.min.js></script>
|
|
|
+<script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
|
|
|
+<script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.8.2/vant.min.js></script>
|
|
|
+<script src='{{Msg "seo" "cdn"}}/common-module/public/js/utils.js'></script>
|
|
|
+{{include "/big-member/commonjs.html"}}
|
|
|
+
|
|
|
+<script>
|
|
|
+ var vNode = {
|
|
|
+ delimiters: ['@@', '@@'],
|
|
|
+ el: '#perfect-info-page',
|
|
|
+ data: {
|
|
|
+ sendShow: true, // 倒计时切换
|
|
|
+ vercodecor: false, // 验证码是否正确
|
|
|
+ setcodeShow: true, // 验证码输入框是否显示
|
|
|
+ commitshow: false, // 提交成功显示弹窗
|
|
|
+ overlayShow: false,
|
|
|
+ searchList: [],
|
|
|
+ isAssociateShow: false,
|
|
|
+ isAssociateUpTime: -1,
|
|
|
+ infoMap: {
|
|
|
+ name: '',
|
|
|
+ phone: '',
|
|
|
+ vercode: '',
|
|
|
+ email: '',
|
|
|
+ company: '',
|
|
|
+ companyType: '',
|
|
|
+ position: '',
|
|
|
+ position_other: '',
|
|
|
+ branch: ''
|
|
|
+ },
|
|
|
+ infoCheckMap: {
|
|
|
+ name: '',
|
|
|
+ phone: '',
|
|
|
+ vercode: '',
|
|
|
+ email: '',
|
|
|
+ company: '',
|
|
|
+ position: '',
|
|
|
+ position_other: '',
|
|
|
+ branch: ''
|
|
|
+ },
|
|
|
+ isEchoInfoLoading: true,
|
|
|
+ popInfo: {
|
|
|
+ show: false,
|
|
|
+ label: '',
|
|
|
+ title: ''
|
|
|
+ },
|
|
|
+ conditionMap: {
|
|
|
+ '公司类型': [{
|
|
|
+ title: '投标企业',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '招标采购单位',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '厂商',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '招标代理机构',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '经销商',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '服务提供商',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '其他',
|
|
|
+ checked: false
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ '职位': [
|
|
|
+ {
|
|
|
+ title: '总裁',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '总经理',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '总监',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '经理',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '主管',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '职员',
|
|
|
+ checked: false
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ '部门': [
|
|
|
+ {
|
|
|
+ title: '市场',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '产品',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '销售',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '渠道',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '其他',
|
|
|
+ checked: false
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ ajaxParams: {
|
|
|
+ "name": "",
|
|
|
+ "phone": "",
|
|
|
+ "source": utils.getParam('source'), // 推送消息点进来的
|
|
|
+ "mail": "",
|
|
|
+ "company": "",
|
|
|
+ "companyType": "",
|
|
|
+ "position": "",
|
|
|
+ "branch": '',
|
|
|
+ origin: location.origin
|
|
|
+ },
|
|
|
+ jobJson: [
|
|
|
+ '总裁',
|
|
|
+ '总经理',
|
|
|
+ '总监',
|
|
|
+ '经理',
|
|
|
+ '主管',
|
|
|
+ '职员'
|
|
|
+ ],
|
|
|
+ topBannerInfo: {
|
|
|
+ s_pic: ""
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ // source=message_bigmember app消息大会员留资地
|
|
|
+ // source=message_structeddata app消息结构化数据留资地
|
|
|
+ this.ajaxGetEchoInfo()
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ canNextSend: function () {
|
|
|
+ return this.checkPhone
|
|
|
+ },
|
|
|
+ submitElEvent: function () {
|
|
|
+ var type = 'structeddata'
|
|
|
+ return 'c_wx_' + type + '_submit_buttonclick'
|
|
|
+ },
|
|
|
+ getPopHeight () {
|
|
|
+ return this.popInfo.label === '受雇类型' ? '5.42rem' : '8.36rem'
|
|
|
+ },
|
|
|
+ checkName () {
|
|
|
+ if (this.infoMap.name.length > 10) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ var namereg = /^[\u4E00-\u9FA5A-Za-z\s]+(·[\u4E00-\u9FA5A-Za-z]+)*$/;//中英文或加.的少数民族名字
|
|
|
+ return namereg.test(this.infoMap.name)
|
|
|
+ },
|
|
|
+ checkPhone () {
|
|
|
+ return /^1[3-9]\d{9}$/.test(this.infoMap.phone)
|
|
|
+ },
|
|
|
+ checkEmail () {
|
|
|
+ if (this.infoMap.email === '') return true
|
|
|
+ if (this.infoMap.email.length > 50) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(this.infoMap.email)
|
|
|
+ },
|
|
|
+ checkEntName () {
|
|
|
+ if (this.infoMap.company.trim().length > 50 || this.infoMap.company.trim().length < 2) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return true
|
|
|
+ },
|
|
|
+ checkEntType() {
|
|
|
+ if (this.infoMap.companyType === '') {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return true
|
|
|
+ },
|
|
|
+ isMoreSelect () {
|
|
|
+ return this.popInfo.label === '公司类型'
|
|
|
+ },
|
|
|
+ checkPosition () {
|
|
|
+ if (this.infoMap.position !== "" && this.infoMap.position !== '其他') {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ if (this.infoMap.position_other.length > 50) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ var namereg = /^[\u4E00-\u9FA5A-Za-z\s]+(·[\u4E00-\u9FA5A-Za-z]+)*$/;
|
|
|
+ return namereg.test(this.infoMap.position_other)
|
|
|
+ },
|
|
|
+ checkBranch(){
|
|
|
+ if(this.infoMap.position.indexOf('总裁') > -1 || this.infoMap.position.indexOf('总经理') > -1){
|
|
|
+ return false
|
|
|
+ } else if(this.infoMap.branch !== ""){
|
|
|
+ return false
|
|
|
+ }else{
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ isSubmitDisabled () {
|
|
|
+ return !this.checkName || !this.checkPhone || !this.checkEmail || !this.checkEntName || !this.vercodecor
|
|
|
+ },
|
|
|
+ isNextDisabled () {
|
|
|
+ var type = this.popInfo.label
|
|
|
+ var result = false
|
|
|
+ switch (type) {
|
|
|
+ case '职位': {
|
|
|
+ result = this.conditionMap[type].filter(v => v.checked).length
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case '部门': {
|
|
|
+ result = this.conditionMap[type].filter(v => v.checked).length
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case '公司类型': {
|
|
|
+ result = this.conditionMap[type].filter(v => v.checked).length
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return !result
|
|
|
+ },
|
|
|
+ showBranch () {
|
|
|
+ // 切换到总裁或总经理之后 把之前选择的部门清空
|
|
|
+ if (this.infoMap.position.indexOf('总裁') > -1 || this.infoMap.position.indexOf('总经理') > -1) {
|
|
|
+ this.infoMap.branch = ''
|
|
|
+ this.conditionMap['部门'].forEach(v => {
|
|
|
+ v.checked = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ var zc = this.infoMap.position.indexOf('总裁') > -1
|
|
|
+ var zjl = this.infoMap.position.indexOf('总经理') > -1
|
|
|
+ return !(zc || zjl) && this.infoMap.position
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 顶部广告
|
|
|
+ openTopBanner: function () {
|
|
|
+ location.href = this.topBannerInfo.s_link
|
|
|
+ },
|
|
|
+ // 手机号输入事件
|
|
|
+ getInputPhone: function(value) {
|
|
|
+ let exhibition_phone = sessionStorage.getItem('exhibition_phone')
|
|
|
+ if(value === exhibition_phone) {
|
|
|
+ // this.setcodeShow = false
|
|
|
+ } else {
|
|
|
+ // this.setcodeShow = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 点击发送验证码
|
|
|
+ sendMsg: function () {
|
|
|
+ let _this = this
|
|
|
+ if(!this.checkPhone) return
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/salesLeads/sendMsg',
|
|
|
+ data: {
|
|
|
+ phoneNum: _this.infoMap.phone,
|
|
|
+ source: this.ajaxParams.source
|
|
|
+ },
|
|
|
+ success:function(res) {
|
|
|
+ console.log(res)
|
|
|
+ if(res.data.success) {
|
|
|
+ _this.countdown()
|
|
|
+ }else{
|
|
|
+ if (res.data.msg.indexOf("phoneErr")>-1){
|
|
|
+ _this.showToast("手机号错误")
|
|
|
+ }else if (res.data.msg.indexOf("sended")>-1){
|
|
|
+ _this.showToast("验证码已发送")
|
|
|
+ }else{
|
|
|
+ _this.showToast(res.data.msg)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 验证码输入事件
|
|
|
+ getCheckCode: function() {
|
|
|
+ let _this = this
|
|
|
+ if(this.infoMap.vercode.length == 6){
|
|
|
+ $.ajax({
|
|
|
+ url:'/salesLeads/checkCode',
|
|
|
+ type:'POST',
|
|
|
+ data:{
|
|
|
+ phoneNum:_this.infoMap.phone,
|
|
|
+ code:_this.infoMap.vercode
|
|
|
+ },
|
|
|
+ success:function(res) {
|
|
|
+ if(res.error_code == 0) {
|
|
|
+ _this.vercodecor = res.data.flag
|
|
|
+ if(res.data.flag) {
|
|
|
+ _this.$toast('验证码正确')
|
|
|
+ }else{
|
|
|
+ _this.$toast('验证码错误')
|
|
|
+ }
|
|
|
+ _this.getCheckMap('vercode')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error:function(err) {
|
|
|
+ console.log(err)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ _this.getCheckMap('vercode')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ajaxFn: function (url, data, callback, type) {
|
|
|
+ return $.ajax({
|
|
|
+ type: 'post',
|
|
|
+ url: url,
|
|
|
+ contentType: type ? 'application/x-www-form-urlencoded' : "application/json;charset=utf-8",
|
|
|
+ data: type ? data : JSON.stringify(data),
|
|
|
+ dataType: "json",
|
|
|
+ success: typeof callback === 'function' ? callback.bind(this) : new Function()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 倒计时
|
|
|
+ countdown() {
|
|
|
+ let _this = this
|
|
|
+ this.sendShow = false
|
|
|
+ var time=60;
|
|
|
+ setTime=setInterval(function(){
|
|
|
+ if(time<=0){
|
|
|
+ _this.sendShow = true
|
|
|
+ time=59
|
|
|
+ clearInterval(setTime);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ time--;
|
|
|
+ $(".timedown").text(time+'s');
|
|
|
+ },1000);
|
|
|
+ },
|
|
|
+ ajaxGetEchoInfo() {
|
|
|
+ this.isEchoInfoLoading = true
|
|
|
+ this.ajaxFn('/salesLeads/retainedCapital' + '?source=' + this.ajaxParams.source, {source: this.ajaxParams.source}, function (r) {
|
|
|
+ this.isEchoInfoLoading = false
|
|
|
+ if (r && r.info) {
|
|
|
+ r.data = r.info
|
|
|
+ }
|
|
|
+ // 广告及手机号是否绑定相关业务逻辑
|
|
|
+ var needVerifyBindPhone = false
|
|
|
+ if (r && r.active) {
|
|
|
+ this.topBannerInfo = r.active.adList[0] || {}
|
|
|
+ needVerifyBindPhone = r.active.bindOrNot
|
|
|
+ }
|
|
|
+ // 原留资业务
|
|
|
+ if (r && r.error_msg === '' && r.data) {
|
|
|
+ if(r.data.phone != '' && !needVerifyBindPhone) {
|
|
|
+ this.vercodecor = true
|
|
|
+ this.setcodeShow = false
|
|
|
+ sessionStorage.setItem('exhibition_phone', r.data.phone)
|
|
|
+ } else {
|
|
|
+ this.setcodeShow = true
|
|
|
+ }
|
|
|
+ this.setEchoInfo(r.data)
|
|
|
+ // var result = checkRequiredKeys(['name', 'phone', 'company', 'companyType', 'mail', 'position', 'branch'], r.data)
|
|
|
+ // if (result) {
|
|
|
+ // var skipAuto = ['jyarticle_see3', 'article_collection', 'article_original', 'jypush_see10']
|
|
|
+ // var _this = this
|
|
|
+ // var canAuto = !skipAuto.some(function (v) {
|
|
|
+ // return _this.ajaxParams.source.indexOf(v) > -1
|
|
|
+ // })
|
|
|
+ // this.submitForm(canAuto)
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ highlightText (value, keyStr) {
|
|
|
+ return utils.replaceKeyword(value, keyStr, '<span class="highlight-text">' + keyStr + '</span>')
|
|
|
+ },
|
|
|
+ entOnChange (type) {
|
|
|
+ if (type === 'blur') {
|
|
|
+ this.getCheckMap('company')
|
|
|
+ setTimeout(() => {
|
|
|
+ this.isAssociateShow = false
|
|
|
+ this.searchList = []
|
|
|
+ }, 300)
|
|
|
+ } else {
|
|
|
+ clearTimeout(this.isAssociateUpTime)
|
|
|
+ this.isAssociateUpTime = setTimeout(() => {
|
|
|
+ this.ajaxEntList(this.infoMap.company)
|
|
|
+ }, 200)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ selectEnt (item) {
|
|
|
+ console.log('item', item)
|
|
|
+ this.infoMap.company = item
|
|
|
+ this.isAssociateShow = false
|
|
|
+ this.searchList = []
|
|
|
+ },
|
|
|
+ ajaxEntList (str) {
|
|
|
+ if (str.length <= 2) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.ajaxFn('/jypay/user/company/association', { name: str,companyCount:10 }, function (r) {
|
|
|
+ if (r && r.error_msg === '' && r.data) {
|
|
|
+ this.isAssociateShow = true
|
|
|
+ this.searchList = r.data
|
|
|
+ }
|
|
|
+ }, true)
|
|
|
+ },
|
|
|
+ setEchoInfo (data) {
|
|
|
+ if (data.companyType) {
|
|
|
+ this.setCheckForData('companyType', 'companyType', data.companyType, '公司类型')
|
|
|
+ }
|
|
|
+ if (data.position) {
|
|
|
+ this.setCheckForData('position', 'position', data.position, '职位')
|
|
|
+ }
|
|
|
+ if (data.name) {
|
|
|
+ this.setCheckForData('name', 'name', data.name)
|
|
|
+ }
|
|
|
+ if (data.phone) {
|
|
|
+ this.setCheckForData('phone', 'phone', data.phone)
|
|
|
+ }
|
|
|
+ if (data.mail) {
|
|
|
+ this.setCheckForData('mail', 'email', data.mail)
|
|
|
+ }
|
|
|
+ if (data.company) {
|
|
|
+ this.setCheckForData('company', 'company', data.company)
|
|
|
+ }
|
|
|
+ if (data.branch) {
|
|
|
+ this.setCheckForData('branch', 'branch', data.branch, '部门')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ setCheckForData (aKey, iKey, cKey, label) {
|
|
|
+ this.ajaxParams[aKey] = cKey
|
|
|
+ this.infoMap[iKey] = cKey
|
|
|
+ if (label === '职位' && this.jobJson.indexOf(cKey) === -1) {
|
|
|
+ // this.infoMap[iKey] = '其他'
|
|
|
+ // this.infoMap.position_other = cKey.split('/')[1]
|
|
|
+ this.infoMap[iKey] = ''
|
|
|
+ this.infoMap.position_other = ''
|
|
|
+ }
|
|
|
+ if (label) {
|
|
|
+ var checkDatas = [cKey]
|
|
|
+ if (label === '公司类型') {
|
|
|
+ checkDatas = cKey.split(',')
|
|
|
+ }
|
|
|
+ this.conditionMap[label].forEach(v => {
|
|
|
+ if (checkDatas.indexOf(v.title) !== -1) {
|
|
|
+ v.checked = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ submitPop() {
|
|
|
+ var type = this.popInfo.label
|
|
|
+ switch (type) {
|
|
|
+ case '职位': {
|
|
|
+ var tempData = this.conditionMap[type].filter(v => v.checked)
|
|
|
+ this.setCheckForData('position', 'position', tempData[0].title)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case '部门': {
|
|
|
+ var tempData = this.conditionMap[type].filter(v => v.checked)
|
|
|
+ this.setCheckForData('branch', 'branch', tempData[0].title)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case '公司类型': {
|
|
|
+ var tempData = this.conditionMap[type].filter(v => v.checked).map(v => v.title)
|
|
|
+ this.setCheckForData('companyType', 'companyType', tempData.join(','))
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.popInfo.show = false
|
|
|
+ },
|
|
|
+ openPop(type) {
|
|
|
+ switch (type) {
|
|
|
+ case '职位': {
|
|
|
+ this.popInfo.title = '职位'
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case '部门': {
|
|
|
+ this.popInfo.title = '部门'
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case '公司类型': {
|
|
|
+ this.popInfo.title = '公司类型'
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.popInfo.label = type
|
|
|
+ this.popInfo.show = true
|
|
|
+ },
|
|
|
+ onSelectItem (item, index) {
|
|
|
+ if (this.isMoreSelect) {
|
|
|
+ item.checked = !item.checked
|
|
|
+ } else {
|
|
|
+ this.conditionMap[index].forEach(function (v) {
|
|
|
+ v.checked = false
|
|
|
+ })
|
|
|
+ item.checked = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getCheckMap (type) {
|
|
|
+ switch (type) {
|
|
|
+ case 'name': {
|
|
|
+ this.infoCheckMap.name = this.infoMap.name === '' ? '姓名为必填项' : ''
|
|
|
+ if (this.infoCheckMap.name === '' && !this.checkName) {
|
|
|
+ this.infoCheckMap.name = '请输入正确格式的姓名'
|
|
|
+ }
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 'phone': {
|
|
|
+ this.infoCheckMap.phone = this.infoMap.phone === '' ? '手机号码为必填项' : ''
|
|
|
+ if (this.infoCheckMap.phone === '' && !this.checkPhone) {
|
|
|
+ this.infoCheckMap.phone = '请输入正确格式的手机号码'
|
|
|
+ }
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 'vercode': {
|
|
|
+ this.infoCheckMap.vercode = this.infoMap.vercode === '' ? '验证码为必填项' : ''
|
|
|
+ if (this.infoMap.vercode.length != 6 || !this.vercodecor) {
|
|
|
+ this.infoCheckMap.vercode = '请输入正确的验证码'
|
|
|
+ } else {
|
|
|
+ this.infoCheckMap.vercode = ''
|
|
|
+ }
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 'email': {
|
|
|
+ if (this.infoMap.email !== '') {
|
|
|
+ if (!this.checkEmail) {
|
|
|
+ this.infoCheckMap.email = '请输入正确格式的邮箱'
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.infoCheckMap.email = ''
|
|
|
+ }
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 'company': {
|
|
|
+ this.infoCheckMap.company = this.infoMap.company === '' ? '公司名称为必填项' : ''
|
|
|
+ if (this.infoCheckMap.company === '' && !this.checkEntName) {
|
|
|
+ this.infoCheckMap.company = '请输入正确格式的公司名称'
|
|
|
+ if (this.infoMap.company.length < 2) {
|
|
|
+ this.infoCheckMap.company = '公司名称至少输入2个字'
|
|
|
+ }
|
|
|
+ if (this.infoMap.company.length > 50) {
|
|
|
+ this.infoCheckMap.company = '公司名称最多输入50个字'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 'position': {
|
|
|
+ var isOther = this.infoMap.position === '其他' && this.infoMap.position_other === ''
|
|
|
+ this.infoCheckMap.position_other = isOther ? '职位为必填项' : ''
|
|
|
+ if (this.infoCheckMap.position_other === '' && !this.checkPosition) {
|
|
|
+ this.infoCheckMap.position_other = '请输入正确格式的职位'
|
|
|
+ }
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ cancelForm () {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$dialog.confirm({
|
|
|
+ title: ' ',
|
|
|
+ message: '您可以通过剑鱼标讯提供的全国招投标数据自助导出功能,指定关键词、发布时间、地区或行业等筛选条件,以Excel表格的形式打包下载,精准获取所需数据。',
|
|
|
+ className: 'ent-search-dialog no-infor',
|
|
|
+ overlayClass: 'z-2030',
|
|
|
+ showCancelButton: false,
|
|
|
+ getContainer: '.perfect-info-group',
|
|
|
+ confirmButtonText: '数据自助导出',
|
|
|
+ }).then(function () {
|
|
|
+ location.href = '/front/wx_dataExport/toSieve'
|
|
|
+ }).catch(function () {
|
|
|
+ history.back()
|
|
|
+ });
|
|
|
+ },300)
|
|
|
+ setTimeout(() => {
|
|
|
+ const htmlclose = `<span class="infor-icon-close"></span>`
|
|
|
+ $('.no-infor .van-dialog__header').html(htmlclose)
|
|
|
+ },400)
|
|
|
+ },
|
|
|
+ submitForm () {
|
|
|
+ this.ajaxParams.name = this.infoMap.name
|
|
|
+ this.ajaxParams.phone = this.infoMap.phone
|
|
|
+ this.ajaxParams.mail = this.infoMap.email
|
|
|
+ this.ajaxParams.company = this.infoMap.company
|
|
|
+ this.ajaxParams.companyType = this.infoMap.companyType
|
|
|
+ this.ajaxParams.position = this.infoMap.position
|
|
|
+ if(this.setcodeShow) {
|
|
|
+ this.ajaxParams.code = this.infoMap.vercode
|
|
|
+ }
|
|
|
+ if (this.infoMap.position === '其他') {
|
|
|
+ this.ajaxParams.position = '其他/' + this.infoMap.position_other
|
|
|
+ }
|
|
|
+ this.ajaxParams.branch = this.infoMap.branch.indexOf('总裁') > -1 || this.infoMap.branch.indexOf('总经理') > -1 ? '' : this.infoMap.branch
|
|
|
+ var _this = this
|
|
|
+ var loading = _this.showLoading()
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/salesLeads/collectInfo',
|
|
|
+ contentType: "application/json;charset=utf-8",
|
|
|
+ data: JSON.stringify(_this.ajaxParams),
|
|
|
+ success: function(r) {
|
|
|
+ loading.clear()
|
|
|
+ if (r.error_msg === '' || r.data) {
|
|
|
+ if (r.activeHref!==""){
|
|
|
+ location.href = r.activeHref
|
|
|
+ }else{
|
|
|
+ location.href = "/"
|
|
|
+ }
|
|
|
+ // _this.commitshow = true
|
|
|
+ } else {
|
|
|
+ _this.showToast(r.error_msg || '提交失败')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(err) {
|
|
|
+ loading.clear()
|
|
|
+ _this.showToast('提交失败')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ showLoading: function () {
|
|
|
+ var loading = this.$toast.loading({
|
|
|
+ duration: 0,
|
|
|
+ forbidClick: true,
|
|
|
+ message: '提交中...',
|
|
|
+ })
|
|
|
+ return loading
|
|
|
+ },
|
|
|
+ showToast: function (message) {
|
|
|
+ this.$toast({
|
|
|
+ duration: 1500,
|
|
|
+ forbidClick: true,
|
|
|
+ message: message,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var vPerfect = new Vue(vNode)
|
|
|
+</script>
|
|
|
+<script>
|
|
|
+ $(function () {
|
|
|
+ $("#perfect-info-page").on('click tap', '.infor-icon-close', function(e) {
|
|
|
+ e.stopPropagation()
|
|
|
+ history.back()
|
|
|
+ })
|
|
|
+ })
|
|
|
+</script>
|
|
|
+{{include "/common/baiducc.html"}}
|
|
|
+</body>
|
|
|
+
|
|
|
+</html>
|