m_user.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. <template>
  2. <div class="home">
  3. <!-- <img class="home-back" src={require('../../assets/img_home.png')} /> -->
  4. <a-modal v-model="amodal" title="申请试用" on-ok="handleOk" centered @afterClose="fouse" destroyOnClose>
  5. <template slot="footer">
  6. <div class="sub">
  7. <a-button key="submit" type="primary" @click="handleSubmit">
  8. 立即提交
  9. </a-button>
  10. </div>
  11. </template>
  12. <a-form :form="form" :label-col="{ span: 5 }" :wrapper-col="{ span: 50 }" @submit="handleSubmit">
  13. <a-form-item label="CompanyName">
  14. <!-- 公司名称 -->
  15. <a-input v-decorator="['companyName', { rules: [{ required: true, message: '请输入您的公司名称' }] }]"
  16. v-model="customer.companyName" placeholder="请输入您的公司名称*">
  17. <img src="../../static/image/img_home_modal_0.png" class="w-15 h-15" slot="prefix" alt="">
  18. </a-input>
  19. </a-form-item>
  20. <a-form-item label="City">
  21. <!-- 选择所在城市 -->
  22. <a-input v-decorator="['city', { rules: [{ required: true, message: '请输入所在城市' }] }]" v-model="customer.city"
  23. placeholder="请输入所在城市*">
  24. <!-- <a-icon slot="prefix" type="bank" /> -->
  25. <img src="../../static/image/img_home_modal_1.png" class="w-15 h-15" slot="prefix" alt="">
  26. </a-input>
  27. </a-form-item>
  28. <a-form-item label="CustomName">
  29. <!-- 姓名 -->
  30. <a-input v-decorator="['customName', { rules: [{ required: true, message: '请输入您的姓名' }] }]"
  31. v-model="customer.customName" placeholder="请输入您的姓名*">
  32. <!-- <a-icon slot="prefix" type="UserOutlined" /> -->
  33. <img src="../../static/image/img_home_modal_2.png" class="w-15 h-15" slot="prefix" alt="">
  34. </a-input>
  35. </a-form-item>
  36. <a-form-item label="Phone">
  37. <!-- 手机号 -->
  38. <a-input v-decorator="['phone', { rules: [{ required: true, message: '请输入您的联系方式' }] }]" v-model="customer.phone"
  39. placeholder="请输入您的联系方式*">
  40. <!-- <a-icon slot="prefix" type="phone" /> -->
  41. <img src="../../static/image/img_home_modal_3.png" class="w-15 h-15" slot="prefix" alt="">
  42. </a-input>
  43. </a-form-item>
  44. <!-- 验证码 -->
  45. <a-form-item label="VerifyCode">
  46. <a-input v-decorator="['verifyCode', { rules: [{ required: true, message: '请输入验证码' }] }]" placeholder="输入验证码"
  47. v-model="customer.verifyCode" size="large">
  48. <img src="../../static/image/img_home_modal_4.png" class="w-15 h-15" slot="prefix" alt="">
  49. <div slot="suffix" style="cursor: pointer; color: #1890ff;" @click="verifyCodeFn">
  50. {{ countdown == 0 ? '获取验证码' : countdown }}
  51. </div>
  52. </a-input>
  53. </a-form-item>
  54. </a-form>
  55. </a-modal>
  56. <img src="../../static/image/img_home.png" class="home-back" style="cursor: pointer;" alt="" @click="amodalFn">
  57. <div class="home-qa">
  58. <div class="home-title">为什么选择惠融易客</div>
  59. <div class="home-title-sub">
  60. 与传统方式相比较,惠融易客的优势又都有哪些?
  61. </div>
  62. <div class="m-content">
  63. <div class="home-qa-img-row">
  64. <div class="container">
  65. <div v-for="(p, i) in homeList0" :key="i" class="container-row">
  66. <div class='home-qa-img-row-item'>
  67. <img :src="require('../../static/image/img_home_qs_0_' + i + '.png')" alt="">
  68. <div class="home-qa-img-row-item-absolute">
  69. <div class="home-qa-img-row-item-absolute-title">
  70. {{ p.title }}
  71. </div>
  72. <div class="home-qa-img-row-item-absolute-subtitle yc-4">
  73. {{ p.content }}
  74. </div>
  75. </div>
  76. </div>
  77. <!-- </a-col>
  78. </a-row> -->
  79. </div>
  80. </div>
  81. </div>
  82. <div class="home-qa-img-row">
  83. <div class="container">
  84. <div v-for="(p, i) in homeList1" :key="i" class="container-row">
  85. <div class='home-qa-img-row-item'>
  86. <img :src="require('../../static/image/img_home_qs_1_' + i + '.png')" alt="">
  87. <div class="home-qa-img-row-item-absolute">
  88. <div class="home-qa-img-row-item-absolute-title">
  89. <span>0{{ i + 1 }}</span> {{ p.title }}
  90. </div>
  91. <div class="home-qa-img-row-item-absolute-subtitle yc-4">
  92. {{ p.content }}
  93. </div>
  94. </div>
  95. </div>
  96. <!-- </a-col>
  97. </a-row> -->
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. <div class="home-ad">
  104. <div>
  105. <div class="home-title">精准获客</div>
  106. <div class="home-title-sub">
  107. 多渠道投放对接,帮助企业搭建推广产品矩阵
  108. </div>
  109. <div class="home-ad-row">
  110. <div v-for="(index, i) in 6" :key="i" class="home-row-single">
  111. <img :src="require('../../static/image/img_home_ad_' + i + '.png')" alt="">
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. <div class="home-static">
  117. <div class="home-content">
  118. <div class="home-title">免费试用</div>
  119. <div class="home-title-sub">
  120. 立即免费试用惠融易客CRM 提升企业业绩
  121. </div>
  122. <div class="home-ad-free">
  123. <div class="home-static-title">
  124. 已加入
  125. </div>
  126. <div v-for="(index, i) in freeList" :key="i" class="home-row-single">
  127. <div class="home-static-num">
  128. <div class="home-static-num-wrap">{{ index }}</div>
  129. </div>
  130. </div>
  131. <div class="home-static-title">人</div>
  132. </div>
  133. <div style="text-align: center">
  134. <a-button class="home-static-btn" shape="round" @click="amodalFn">立即申请试用</a-button>
  135. </div>
  136. </div>
  137. </div>
  138. <div class="home-qa">
  139. <div class="home-content">
  140. <div class="home-title">咨询信息</div>
  141. <div class="home-title-sub" @click="amodalFn">
  142. 点击了解惠融易客的更多信息
  143. </div>
  144. <div class="home-ad-xw" v-if="homeList3[0]">
  145. <div class="ad-free-img">
  146. <img v-if="activeKey" :src="homeList3[activeKey].images" style="width:100%;height: 100%;" alt="">
  147. <img v-else :src="homeList3[0].images" style="width:100%;height: 100%;" alt="">
  148. </div>
  149. <div class="ad-free-content">
  150. <a-collapse v-model="activeKey" accordion @change="collapseChange">
  151. <a-collapse-panel key="0" :header="homeList3[0].title" :showArrow="false">
  152. <div class="add-title yc-3">
  153. {{ homeList3[0].summary }}
  154. </div>
  155. <a-button type="primary" style="margin-top: 5px;" @click="btnContent(homeList3[0])">
  156. 查看详情
  157. </a-button>
  158. </a-collapse-panel>
  159. <template v-for="(item, index) in homeList3">
  160. <a-collapse-panel v-if="index !== 0" :key="index + ''" :header="item.title" :showArrow="false">
  161. <!-- <p>{{ item.title }}</p> -->
  162. <div class="add-title yc-3">
  163. {{ item.summary }}
  164. </div>
  165. <a-button type="primary" @click="btnContent(item)">
  166. 查看详情
  167. </a-button>
  168. </a-collapse-panel>
  169. </template>
  170. </a-collapse>
  171. <div>
  172. </div>
  173. </div>
  174. </div>
  175. </div>
  176. </div>
  177. <!-- 底部 -->
  178. <div class="home-bottom">
  179. <div>
  180. <a-button type="dashed" shape="round" icon="search">
  181. 电话咨询
  182. </a-button>
  183. </div>
  184. <div>
  185. <a-button type="dashed" shape="round" icon="search">
  186. 加入我们
  187. </a-button>
  188. </div>
  189. <div>
  190. <a-button type="primary" shape="round" icon="search">
  191. 申请试用
  192. </a-button>
  193. </div>
  194. </div>
  195. </div>
  196. </template>
  197. <script>
  198. import { postListData, sendSms, postCustomer } from '../../api/index'
  199. import { message } from 'ant-design-vue'
  200. export default {
  201. name: 'IndexPage',
  202. data() {
  203. return {
  204. homeList0: [
  205. {
  206. title: '传统获得客效率低,成本高',
  207. content:
  208. '3000个白名单里可能只能挖掘出一个意向客户,员工信心不足,线路成本与人工成本均居高不下',
  209. },
  210. {
  211. title: '客户资源易流失',
  212. content:
  213. '高价挖掘的意向客户,面临员工离职带走客户和员工飞单的风险,无法形成客户资产,资源全部在业务员手上',
  214. },
  215. {
  216. title: '跨部门沟通成本高',
  217. content:
  218. '线下上门客户填写个人信息受法律监管,机构对于各类纸质资料不易保存,上门客户服务情况无法掌握,跨部门沟通成本高',
  219. },
  220. ],
  221. homeList1: [
  222. {
  223. title: '轻松获客',
  224. content: '通过惠融易客推广获客,轻松获取意向客户,有效降低获客成本95%',
  225. },
  226. {
  227. title: '客户管理',
  228. content:
  229. '通过惠融易客客户管理系统,科学高效管理企业客户资料,开成公司资产,员工离职一键收回所有权限,客户跟进情况一目了然',
  230. },
  231. {
  232. title: '业务管理',
  233. content:
  234. '通过惠融易客客户管理系统记录跟进,客户从上门到成交的各个环节均可清晰化、信息化记录,有效提高效率与服务质量',
  235. },
  236. ],
  237. freeList: ['3', '0', '7', '0', '1', '3', '7', '4'],
  238. homeList3: [],
  239. activeKey: [0],
  240. text: `A dog is a type of domesticated animal.Known for its loyalty and faithfulness,it can be found as a welcome guest in many households across the world.`,
  241. amodal: false, //申请试用弹窗
  242. countdown: 0,
  243. customer: {
  244. sceneType: "loanofficial", // 场景
  245. companyName: '',// 公司名称
  246. customName: '', // 姓名
  247. city: '', // 所在城市
  248. phone: '', // 手机号
  249. verifyCode: '', //验证码
  250. channel: 17, //pc官网16 手机端17
  251. },
  252. // 定时器
  253. intervalBtn: {},
  254. formLayout: 'horizontal',
  255. form: this.$form.createForm(this, { name: 'coordinated' }),
  256. }
  257. },
  258. created() {
  259. this.postListDataFn()
  260. },
  261. methods: {
  262. async postListDataFn() {
  263. let list = await postListData({
  264. "categoryId": 1
  265. })
  266. list.data.data ? this.homeList3 = list.data.data.list : ''
  267. // console.log('this.homeList3',this.homeList3)
  268. },
  269. collapseChange(e) {
  270. console.log(this.activeKey, 'collapseChange', e)
  271. },
  272. btnContent(item) {
  273. console.log('item', item)
  274. this.$router.push({ path: `/user/content?id=${item.id}` })
  275. },
  276. // 发送
  277. handleSubmit(e) {
  278. e.preventDefault();
  279. this.form.validateFields(async (err, values) => {
  280. if (!err) {
  281. // console.log('Received values of form: ', values);
  282. let z = await postCustomer(this.customer)
  283. console.log('zzz', z)
  284. if (z.data.msg == '成功') {
  285. // 关闭页面
  286. this.fouse()
  287. }
  288. } else {
  289. console.log('进来了')
  290. }
  291. });
  292. },
  293. // 打开
  294. amodalFn() {
  295. this.amodal = true
  296. },
  297. // 关闭
  298. fouse() {
  299. console.log('关闭了')
  300. this.amodal = false
  301. },
  302. handleSelectChange(value) {
  303. console.log(value);
  304. this.form.setFieldsValue({
  305. note: `Hi, ${value === 'male' ? 'man' : 'lady'}!`,
  306. });
  307. },
  308. // 验证码
  309. async verifyCodeFn() {
  310. if (this.customer.phone) {
  311. if (new RegExp('^1[0-9]{10}$').test(this.customer.phone)) {
  312. let z = await sendSms({
  313. sceneType: "loanofficial",
  314. userMobile: this.customer.phone
  315. })
  316. // console.log('zzz', z)
  317. if (z.data.code == 0) {
  318. message.success('发送成功')
  319. this.countdown = 60
  320. this.countDown()
  321. // console.log('进来了', this.countdown)
  322. } else {
  323. message.error('发送失败')
  324. }
  325. } else {
  326. message.error('请输入正确的手机号');
  327. }
  328. } else {
  329. message.error('请输入手机号')
  330. }
  331. },
  332. // 倒计时
  333. countDown() {
  334. // 设置倒计时
  335. this.intervalBtn = setInterval(() => {
  336. if (this.countdown == 1) {
  337. // 清除定时器
  338. clearInterval(this.intervalBtn)
  339. // 重置倒计时状态
  340. // this.countdown = 0
  341. };
  342. // 倒计时
  343. this.countdown--
  344. }, 1000)
  345. },
  346. }
  347. }
  348. </script>
  349. <style lang="less">
  350. @import '../../static/m_index.less';
  351. .ant-collapse-header {
  352. white-space: nowrap !important;
  353. text-overflow: ellipsis !important;
  354. overflow: hidden !important;
  355. }
  356. .ant-btn-primary {
  357. background-color: #526eea !important;
  358. border-color: #526eea !important;
  359. }
  360. .ant-btn-primary {
  361. background-color: #fff !important;
  362. border-color: #fff !important;
  363. color: #1890ff !important;
  364. }
  365. .ant-form-item-label {
  366. display: none !important;
  367. }
  368. .ant-modal-footer {
  369. text-align: center !important;
  370. }
  371. .sub .ant-btn-primary {
  372. background-color: #526eea !important;
  373. border-color: #526eea !important;
  374. color: #fff !important;
  375. width: 150px;
  376. height: 40px;
  377. }
  378. .home-bottom .ant-btn {
  379. height: 80px !important;
  380. }
  381. .home-bottom .ant-btn-primary{
  382. background-color: #526eea !important;
  383. color: #fff !important;
  384. }
  385. </style>