Commit f30ce811 authored by 郝聪敏's avatar 郝聪敏

Merge branch 'feature/pay' into 'master'

Feature/pay

See merge request !26
parents 3eb69823 9e87ed33
iVrftB7E3ECL2x9u
\ No newline at end of file
...@@ -4,11 +4,16 @@ ...@@ -4,11 +4,16 @@
<div class="loading-container" v-show="isLoading"> <div class="loading-container" v-show="isLoading">
<cr-loading class="loading" size="24px">加载中...</cr-loading> <cr-loading class="loading" size="24px">加载中...</cr-loading>
</div> </div>
<login-modal />
</div> </div>
</template> </template>
<script> <script>
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import LoginModal from "@/components/LoginModal";
export default { export default {
components: {
LoginModal
},
computed: { computed: {
...mapState(["isLoading"]) ...mapState(["isLoading"])
}, },
...@@ -22,7 +27,6 @@ export default { ...@@ -22,7 +27,6 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import "./style/index.less"; @import "./style/index.less";
.loading-container { .loading-container {
position: fixed; position: fixed;
left: 0; left: 0;
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
* @Description: 华贵大麦2020定期寿险 * @Description: 华贵大麦2020定期寿险
* @Date: 2020-07-27 15:46:37 * @Date: 2020-07-27 15:46:37
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-07-28 14:57:28 * @LastEditTime: 2020-07-29 18:55:06
*/ */
import goodsBg from "@/assets/goods/detail/shouxian/bg.png"; import goodsBg from "@/assets/images/goods/detail/shouxian/bg.png";
import intro01 from "@/assets/goods/detail/shouxian/intro-01.png"; import intro01 from "@/assets/images/goods/detail/shouxian/intro-01.png";
import intro02 from "@/assets/goods/detail/shouxian/intro-02.png"; import intro02 from "@/assets/images/goods/detail/shouxian/intro-02.png";
import intro03 from "@/assets/goods/detail/shouxian/intro-03.png"; import intro03 from "@/assets/images/goods/detail/shouxian/intro-03.png";
export default { export default {
headerInfo: { headerInfo: {
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
}, },
{ title: "保险计划" }, { title: "保险计划" },
{ title: "理赔信息" }, { title: "理赔信息" },
{ title: "完整费率" }, { title: "算一算保费" },
{ {
title: "自动续保服务协议", title: "自动续保服务协议",
url: "http://mangguo-contract.qthbx.com/zi-dong-xu-bao-fu-wu-xie-yi-v1/" url: "http://mangguo-contract.qthbx.com/zi-dong-xu-bao-fu-wu-xie-yi-v1/"
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
* @Description:华太30万轻重疾险 * @Description:华太30万轻重疾险
* @Date: 2020-07-27 15:46:37 * @Date: 2020-07-27 15:46:37
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-07-28 15:16:47 * @LastEditTime: 2020-07-29 19:56:56
*/ */
import goodsBg from "@/assets/goods/detail/zhongjixian/bg.png"; import goodsBg from "@/assets/images/goods/detail/zhongjixian/bg.png";
import intro01 from "@/assets/goods/detail/zhongjixian/intro-01.png"; import intro01 from "@/assets/images/goods/detail/zhongjixian/intro-01.png";
import intro02 from "@/assets/goods/detail/zhongjixian/intro-02.png"; import intro02 from "@/assets/images/goods/detail/zhongjixian/intro-02.png";
import intro03 from "@/assets/goods/detail/zhongjixian/intro-03.png"; import intro03 from "@/assets/images/goods/detail/zhongjixian/intro-03.png";
import intro04 from "@/assets/goods/detail/zhongjixian/intro-04.png"; import intro04 from "@/assets/images/goods/detail/zhongjixian/intro-04.png";
export default { export default {
headerInfo: { headerInfo: {
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
* @LastEditTime: 2020-07-28 14:57:18 * @LastEditTime: 2020-07-28 14:57:18
*/ */
import goodsBg from "@/assets/goods/detail/yiliaoxian/bg.png"; import goodsBg from "@/assets/images/goods/detail/yiliaoxian/bg.png";
import intro01 from "@/assets/goods/detail/zhongjixian/intro-01.png"; import intro01 from "@/assets/images/goods/detail/zhongjixian/intro-01.png";
import intro02 from "@/assets/goods/detail/zhongjixian/intro-02.png"; import intro02 from "@/assets/images/goods/detail/zhongjixian/intro-02.png";
import intro03 from "@/assets/goods/detail/zhongjixian/intro-03.png"; import intro03 from "@/assets/images/goods/detail/zhongjixian/intro-03.png";
import intro04 from "@/assets/goods/detail/zhongjixian/intro-04.png"; import intro04 from "@/assets/images/goods/detail/zhongjixian/intro-04.png";
export default { export default {
headerInfo: { headerInfo: {
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
* @LastEditTime: 2020-07-27 20:32:46 * @LastEditTime: 2020-07-27 20:32:46
*/ */
import goodsBg from "@/assets/goods/detail/yiwaixian/bg.png"; import goodsBg from "@/assets/images/goods/detail/yiwaixian/bg.png";
import intro01 from "@/assets/goods/detail/zhongjixian/intro-01.png"; import intro01 from "@/assets/images/goods/detail/zhongjixian/intro-01.png";
import intro02 from "@/assets/goods/detail/zhongjixian/intro-02.png"; import intro02 from "@/assets/images/goods/detail/zhongjixian/intro-02.png";
import intro03 from "@/assets/goods/detail/zhongjixian/intro-03.png"; import intro03 from "@/assets/images/goods/detail/zhongjixian/intro-03.png";
import intro04 from "@/assets/goods/detail/zhongjixian/intro-04.png"; import intro04 from "@/assets/images/goods/detail/zhongjixian/intro-04.png";
export default { export default {
headerInfo: { headerInfo: {
......
import good01 from "@/assets/goods/goods-01.png"; import good01 from "@/assets/images/goods/goods-01.png";
import good02 from "@/assets/goods/goods-02.png"; import good02 from "@/assets/images/goods/goods-02.png";
import good03 from "@/assets/goods/goods-03.png"; import good03 from "@/assets/images/goods/goods-03.png";
import good04 from "@/assets/goods/goods-04.png"; import good04 from "@/assets/images/goods/goods-04.png";
export default [ export default [
{ {
title: "住院医疗险", title: "住院医疗险",
......
<?xml version="1.0" encoding="UTF-8"?>
<svg width="19px" height="19px" viewBox="0 0 19 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>Group 3</title>
<desc>Created with Sketch.</desc>
<g id="顾问" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="专属顾问" transform="translate(-37.000000, -473.000000)" fill="#FFC842" fill-rule="nonzero">
<g id="Group-4" transform="translate(20.000000, 464.000000)">
<g id="Group-3" transform="translate(17.000000, 7.000000)">
<g id="Group-6" transform="translate(0.000000, 2.000000)">
<path d="M11.9936015,12.1684979 C12.1543343,12.0701808 12.2870474,11.9964547 12.4197451,11.9359579 C13.3524142,11.5067995 14.1748045,11.8102407 15.2626056,13.0958173 C15.9354803,13.8917386 16.1345345,14.5978641 15.8747245,15.2264659 C15.6812711,15.6962694 15.3083896,16.020504 14.6448704,16.4212894 C14.6018945,16.446822 14.2196577,16.6717979 14.1215424,16.7332363 C12.5767388,17.6974187 9.03580765,15.490188 6.48918571,11.7185461 C3.93603207,7.93744132 3.27530545,3.905828 4.84066605,2.92747473 L5.04719839,2.79513504 L5.27147961,2.64766723 C6.0630421,2.12965457 6.56955211,1.92264724 7.17045386,2.02567227 C7.77044023,2.12965457 8.2806893,2.57866479 8.71244925,3.39632099 C9.62268406,5.12616847 9.42175254,5.94668081 8.25077686,6.69249412 C8.16668692,6.74732572 7.86762462,6.92977339 7.83958947,6.94772626 C7.55269073,7.12733349 8.0386437,8.33067835 9.1685053,10.0038111 C10.3123767,11.6958539 11.2683955,12.6212902 11.5814677,12.4265548 C11.6095028,12.4095435 11.9066723,12.2214463 11.9936015,12.1684979 Z" id="Path"></path>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="48px" height="48px" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>编组 8</title>
<desc>Created with Sketch.</desc>
<g id="顾问" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-164.000000, -338.000000)" id="Group-9">
<g transform="translate(16.000000, 283.000000)">
<g id="编组-7" transform="translate(148.000000, 55.000000)">
<rect id="矩形备份-4" x="0" y="0" width="48" height="48"></rect>
<g id="编组-4" transform="translate(3.428571, 7.714286)">
<path d="M15.7063638,15.7693789 L15.7063637,15.769379 C17.0067497,14.945011 17.7778777,13.5165163 17.742874,11.9968454 C17.6911279,9.71940124 15.8429285,7.84076668 13.5271016,7.7208605 L13.5271018,7.72086051 C11.0687293,7.58956987 8.9674613,9.44038184 8.83376504,11.8547698 C8.74689453,13.4236977 9.52275543,14.9180303 10.8667694,15.7703917 C11.0384953,15.8800502 11.087191,16.1056668 10.9755345,16.2743199 C10.9343161,16.3365787 10.8747058,16.384977 10.8046927,16.4130281 L10.8046932,16.4130279 C8.74298481,17.2491304 7.2590707,19.0617172 6.8703185,21.21885 C6.78459803,21.7168106 7.12613938,22.1887349 7.63317274,22.2729197 C7.68584918,22.2816659 7.73919438,22.2859434 7.79261795,22.2857048 L18.7794844,22.2857048 C19.2937079,22.2877167 19.712231,21.8799461 19.7142783,21.3749224 C19.7144905,21.3226278 19.7101345,21.2704117 19.7012584,21.2188484 L19.7012586,21.2188496 C19.3122289,19.0623244 17.828296,17.2504558 15.7668838,16.4150529 C15.5767206,16.3395297 15.4849012,16.1269061 15.5618004,15.9401456 C15.5907445,15.8698504 15.641275,15.810161 15.7063639,15.7693793 L15.7063638,15.7693789 Z" id="路径备份" fill="#FFC842"></path>
<g id="编组" transform="translate(21.428571, 8.571429)" fill="#FFC842">
<rect id="矩形" x="0" y="0" width="12.8571429" height="4.28571429" rx="2"></rect>
<rect id="矩形备份" x="0" y="6.85714286" width="12.8571429" height="1.71428571" rx="0.857142857"></rect>
<rect id="矩形备份-2" x="0" y="10.2857143" width="12.8571429" height="1.71428571" rx="0.857142857"></rect>
</g>
<path d="M6,1 C3.23857625,1 1,3.23857625 1,6 L1,23.1428571 C1,25.9042809 3.23857625,28.1428571 6,28.1428571 L34.2857143,28.1428571 C37.047138,28.1428571 39.2857143,25.9042809 39.2857143,23.1428571 L39.2857143,11 C39.2857143,5.4771525 34.8085618,1 29.2857143,1 L6,1 Z" id="矩形" stroke="#333333" stroke-width="2"></path>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="48px" height="48px" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>编组 8</title>
<desc>Created with Sketch.</desc>
<g id="顾问" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-265.000000, -338.000000)" id="Group-9">
<g transform="translate(16.000000, 283.000000)">
<g id="编组-6" transform="translate(249.000000, 55.000000)">
<rect id="矩形备份-5" x="0" y="0" width="48" height="48"></rect>
<g id="编组-3" transform="translate(5.142857, 9.428571)">
<g id="编组-2" stroke="#333333" stroke-width="2">
<rect id="矩形备份-3" x="1" y="1" width="35.7142857" height="23.7142857" rx="6"></rect>
<rect id="矩形备份" x="6" y="29" width="26.2857143" height="1" rx="0.5"></rect>
</g>
<circle id="椭圆形" fill="#FFC842" cx="13.2857143" cy="13.2857143" r="5.57142857"></circle>
<polyline id="路径-4" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" points="13.2857143 10.2857143 13.2857143 13.7142857 15.6534238 15"></polyline>
<rect id="矩形备份" fill="#FFC842" x="21.4285714" y="10.2857143" width="10.2857143" height="1.71428571" rx="0.857142857"></rect>
<rect id="矩形备份-2" fill="#FFC842" x="21.4285714" y="13.7142857" width="10.2857143" height="1.71428571" rx="0.857142857"></rect>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>Group</title>
<desc>Created with Sketch.</desc>
<g id="顾问" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="聘请成功" transform="translate(-286.000000, -292.000000)">
<g id="Group-4" transform="translate(16.000000, 165.000000)">
<g id="Group" transform="translate(31.000000, 127.000000)">
<g id="编组-2备份" transform="translate(239.000000, 0.000000)">
<rect id="矩形" opacity="0.174107143" x="0" y="0" width="28" height="28"></rect>
<g id="编组" transform="translate(5.000000, 3.000000)" stroke-width="1.5">
<path d="M4,0.75 C2.20507456,0.75 0.75,2.20507456 0.75,4 L0.75,18.0840321 C0.75,18.7778162 0.972016476,19.4533941 1.38356853,20.011929 C2.44831657,21.4569442 4.48288167,21.7652116 5.92789687,20.7004636 L9.5,18.0683876 L13.0721031,20.7004636 C13.6306381,21.1120156 14.3062159,21.3340321 15,21.3340321 C16.7949254,21.3340321 18.25,19.8789576 18.25,18.0840321 L18.25,4 C18.25,2.20507456 16.7949254,0.75 15,0.75 L4,0.75 Z" id="矩形" stroke="#333333"></path>
<path d="M12.6184679,7.34507194 C11.7610968,6.5756448 10.3708384,6.54861094 9.47608795,7.28585366 L8.99915858,7.67882658 L8.52222828,7.28585479 C7.62724078,6.54842034 6.23532693,6.57632431 5.37856187,7.34622509 C4.54846489,8.09479872 4.53952596,9.28445061 5.3540918,10.0387327 L5.38207236,10.0642878 L5.45136557,10.1366355 L8.84131833,14.1948452 C8.91400195,14.2625649 9.05338824,14.2683195 9.13354047,14.2139584 L12.5470789,10.1387093 L12.6203403,10.0628009 C13.4511847,9.31513493 13.4609153,8.12481993 12.6466299,7.37079539 L12.6184679,7.34507194 Z" id="路径" stroke="#FFC842"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="15px" height="15px" viewBox="0 0 15 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>Group 2</title>
<desc>Created with Sketch.</desc>
<g id="顾问" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="专属顾问" transform="translate(-44.000000, -133.000000)" fill="#FFDD87">
<g id="Group-5" transform="translate(40.000000, 133.000000)">
<g id="Group-2">
<g id="金牌" transform="translate(4.000000, 0.000000)">
<g id="Group" transform="translate(4.000000, 2.000000)">
<path d="M1.4809322,3.14051122 L1.4809322,0.256858537 L1.4809322,0.256858372 C1.48566559,0.119894469 1.38024349,0.00496373746 1.2454655,0.000153200878 C1.23975344,-5.06598053e-05 1.2340361,-5.06562931e-05 1.2283241,0.000153212466 L0.259992498,0.000153212466 C0.125214631,-0.00465704299 0.0121182675,0.102474813 0.00738451015,0.239439066 C0.00718389976,0.245243777 0.00718389976,0.251053849 0.00738450985,0.2568585 L0.00738450985,2.10513948 C0.00859028811,2.19433301 0.0568120109,2.27600548 0.133689083,2.31906031 L1.4809322,3.14051122 Z M7.12251338,0.000152195122 L6.15418178,0.000152195122 C6.01940392,-0.00465806034 5.90630755,0.102473795 5.9015738,0.239438049 C5.90137318,0.245242759 5.90137318,0.251052831 5.90157379,0.256857483 L5.90157379,3.14051017 L7.24882256,2.28482587 C7.3256992,2.24177127 7.37392096,2.16009845 7.37512716,2.07090508 L7.37512716,0.256856302 L7.37512716,0.256856137 C7.37986055,0.119892234 7.27443845,0.00496150242 7.13966046,0.000150965838 C7.1339484,-5.28948449e-05 7.12823106,-5.28913327e-05 7.12251905,0.000150977426 L7.12251338,0.000152195122 Z M5.16059042,3.98764098 L5.16059042,0.256858537 L5.16059043,0.256858267 C5.1652407,0.119890853 5.05974884,0.00502685254 4.92496821,0.00030060864 C4.92211409,0.000200537889 4.91925848,0.000151355567 4.91640268,0.000153084738 L2.46610434,0.000153084738 C2.3265927,0.000153090935 2.21349634,0.115083934 2.21349634,0.256858255 C2.21349634,0.256858255 2.21349634,0.256858255 2.21349634,0.256858255 L2.21349634,3.98764098 C2.69219933,3.82985878 3.19221268,3.74902092 3.69546557,3.74804922 C4.19321294,3.74897146 4.6876884,3.8298329 5.1605918,3.98764063 L5.16059042,3.98764098 Z" id="Shape" fill-rule="nonzero"></path>
<path d="M0.00738461538,8.24039415 L0.00738460962,8.24060305 C0.00738430207,10.3105152 1.65858922,11.9885016 3.69546429,11.9885016 C5.73233937,11.9885019 7.38354398,10.3105152 7.38354398,8.24060305 C7.38354398,8.2404634 7.38354397,8.24032376 7.38354395,8.24018411 L7.38354396,8.23997464 C7.38354396,6.17006244 5.73233935,4.4920761 3.69546428,4.4920761 C1.6585892,4.4920761 0.00738459241,6.17006244 0.00738459241,8.23997464 C0.00738459241,8.24011429 0.00738460009,8.24025393 0.00738461545,8.24039358 L0.00738461538,8.24039415 Z" id="Path"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="56px" height="56px" viewBox="0 0 56 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>顾问</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="78.1059392%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
<stop stop-color="#C4C7FF" offset="0%"></stop>
<stop stop-color="#9296FF" offset="100%"></stop>
</linearGradient>
<path d="M33.242027,24.8182903 C36.5288312,12.6226156 30.9772397,12 30.9772397,12 C28.6232833,12 28.0447391,13.8679915 27.8675659,14.1804162 C26.8666667,20.1598771 22.628038,24.818311 22.628038,24.818311 L22.628038,41.730621 C22.628038,43.3989598 24.8927873,44 25.7811387,44 L38.5272624,44 C39.7265942,44 40.7041147,40.8410722 40.7041147,40.8410722 C43.8571429,30.0710844 43.8571429,26.866486 43.8571429,26.866486 C43.8571429,24.6403888 41.7250324,24.818311 41.7250324,24.818311 L33.242027,24.8182903 Z M19.1459067,24.8229818 L14.0666895,24.8229818 C13.0168335,24.8229818 13,25.8591669 13,25.8591669 L14.049856,42.9157382 C14.049856,43.9999311 15.1322522,43.9999311 15.1322522,43.9999311 L19.5292468,43.9999311 C20.4452197,43.9999311 20.4368375,43.2834716 20.4368375,43.2834716 L20.4368375,26.1163862 C20.4368021,24.8062255 19.1458928,24.8229784 19.1458928,24.8229784 L19.1459067,24.8229818 Z" id="path-2"></path>
<filter x="-129.6%" y="-100.0%" width="359.3%" height="350.0%" filterUnits="objectBoundingBox" id="filter-3">
<feOffset dx="0" dy="8" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="12" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0.639215686 0 0 0 0 0.654901961 0 0 0 0 1 0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g id="顾问" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-271.000000, -1200.000000)" id="编组-12">
<g transform="translate(271.000000, 1200.000000)">
<rect id="矩形备份-8" x="0" y="0" width="56" height="56"></rect>
<g id="形状" fill-rule="nonzero">
<use fill="black" fill-opacity="1" filter="url(#filter-3)" xlink:href="#path-2"></use>
<use fill="url(#linearGradient-1)" xlink:href="#path-2"></use>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>Group</title>
<desc>Created with Sketch.</desc>
<g id="顾问" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="聘请成功" transform="translate(-62.000000, -292.000000)">
<g id="Group-4" transform="translate(16.000000, 165.000000)">
<g id="Group" transform="translate(31.000000, 127.000000)">
<g id="编组-4" transform="translate(15.000000, 0.000000)">
<rect id="矩形" opacity="0.174107143" x="0" y="0" width="28" height="28"></rect>
<g id="编组" transform="translate(5.000000, 3.000000)" stroke-width="1.5">
<path d="M4,4.75 C2.20507456,4.75 0.75,6.20507456 0.75,8 L0.75,18 C0.75,19.7949254 2.20507456,21.25 4,21.25 L15,21.25 C16.7949254,21.25 18.25,19.7949254 18.25,18 L18.25,8 C18.25,6.20507456 16.7949254,4.75 15,4.75 L4,4.75 Z" id="矩形" stroke="#333333" fill="#333333"></path>
<g id="编组-3" transform="translate(6.000000, 9.000000)" stroke="#E4D82B" stroke-linecap="round" stroke-linejoin="round">
<path d="M0.521402644,0 L0.478597356,3.5" id="路径-3"></path>
<path d="M7.02140264,0 L6.97859736,3.5" id="路径-3备份"></path>
</g>
<path d="M6,4.58427581 L6,3.4494638 C6,1.86706417 7.30244436,0.584275809 8.90909091,0.584275809 L11.0909091,0.584275809 C12.6975556,0.584275809 14,1.86706417 14,3.4494638 L14,4.33700795" id="路径" stroke="#333333"></path>
<path d="M1.54280529,11 L17.5756347,11" id="路径-3" stroke="#E4D82B" stroke-linecap="round" stroke-linejoin="round"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>编组 2</title>
<desc>Created with Sketch.</desc>
<g id="顾问" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="调查问卷1" transform="translate(-174.000000, -60.000000)" stroke-width="1.5">
<g id="编组-2" transform="translate(174.000000, 60.000000)">
<g id="Group" transform="translate(5.000000, 3.000000)">
<g id="编组">
<path d="M4,0.75 C2.20507456,0.75 0.75,2.20507456 0.75,4 L0.75,16 C0.75,18.8994949 3.10050506,21.25 6,21.25 L15,21.25 C16.7949254,21.25 18.25,19.7949254 18.25,18 L18.25,6 C18.25,3.10050506 15.8994949,0.75 13,0.75 L4,0.75 Z" id="矩形" stroke="#333333" fill="#333333"></path>
<path d="M5.71173811,6.83432329 L13.7117381,6.83432329" id="路径-2" stroke="#E4D82B" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M5.71173811,11 L13.7117381,11" id="路径-2备份" stroke="#E4D82B" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M5.71173811,15 L13.7117381,15" id="路径-2备份-2" stroke="#E4D82B" stroke-linecap="round" stroke-linejoin="round"></path>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>Group</title>
<desc>Created with Sketch.</desc>
<g id="顾问" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="聘请成功" transform="translate(-174.000000, -292.000000)">
<g id="Group-4" transform="translate(16.000000, 165.000000)">
<g id="Group" transform="translate(31.000000, 127.000000)">
<g id="编组-2" transform="translate(127.000000, 0.000000)">
<rect id="矩形" opacity="0.174107143" x="0" y="0" width="28" height="28"></rect>
<g id="编组" transform="translate(5.000000, 3.000000)" stroke-width="1.5">
<path d="M3,0.75 C1.75735931,0.75 0.75,1.75735931 0.75,3 L0.75,16 C0.75,18.8994949 3.10050506,21.25 6,21.25 L16,21.25 C17.2426407,21.25 18.25,20.2426407 18.25,19 L18.25,6 C18.25,3.10050506 15.8994949,0.75 13,0.75 L3,0.75 Z" id="矩形" stroke="#333333"></path>
<path d="M5.71173811,6.83432329 L13.7117381,6.83432329" id="路径-2" stroke="#E4D82B" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M5.71173811,11 L13.7117381,11" id="路径-2备份" stroke="#E4D82B" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M5.71173811,15 L13.7117381,15" id="路径-2备份-2" stroke="#E4D82B" stroke-linecap="round" stroke-linejoin="round"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="56px" height="56px" viewBox="0 0 56 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>顾问</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="74.9986743%" y1="17.0135196%" x2="50%" y2="100%" id="linearGradient-1">
<stop stop-color="#FD8484" offset="0%"></stop>
<stop stop-color="#F94C4C" offset="100%"></stop>
</linearGradient>
<path d="M29.1624699,4.92241216 C29.1255689,4.92241216 25.7237076,4.85399667 22.20651,3.53675215 C18.5986344,2.18520307 16.275986,0.632114099 16.2552917,0.613011713 L15.3369803,0 L14.4268922,0.613011713 C14.4062276,0.628215162 12.0793491,2.18150119 8.47567398,3.53675215 C4.96268767,4.853996 1.55660852,4.92260647 1.52370063,4.92260647 L1.42108547e-14,4.94541167 L1.42108547e-14,22.4241564 C1.42108547e-14,29.600181 12.0832632,34 15.3409488,34 C18.5986344,34 30.6863192,29.600181 30.6863192,22.4241564 C30.6905364,22.4317581 30.6821019,4.94541167 30.6821019,4.94541167 L29.1624699,4.92241216 Z" id="path-2"></path>
<filter x="-130.3%" y="-94.1%" width="360.7%" height="335.3%" filterUnits="objectBoundingBox" id="filter-3">
<feOffset dx="0" dy="8" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="12" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0.988235294 0 0 0 0 0.474509804 0 0 0 0 0.474509804 0 0 0 0.4 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g id="顾问" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-160.000000, -1200.000000)" id="编组-13">
<g transform="translate(160.000000, 1200.000000)">
<g id="编组-11">
<rect id="矩形备份-7" x="0" y="0" width="56" height="56"></rect>
<g id="编组-10" transform="translate(13.000000, 11.000000)" fill-rule="nonzero">
<g id="路径">
<use fill="black" fill-opacity="1" filter="url(#filter-3)" xlink:href="#path-2"></use>
<use fill="url(#linearGradient-1)" xlink:href="#path-2"></use>
</g>
<path d="M20.9524782,11.9717092 C19.2748618,10.2326918 16.5735962,10.1727208 14.8106634,11.8218029 C13.0477439,10.1727208 10.3464783,10.2326918 8.66884853,11.9717092 C6.96278885,13.7706977 6.93435896,16.7090502 8.64041864,18.5380171 L8.69729174,18.5979881 L13.8154708,23.9949535 C14.3557186,24.5646285 15.2371783,24.594621 15.8058693,24.0249319 L15.8342992,23.9949535 L20.9524782,18.5979881 C22.6585379,16.7989996 22.6869811,13.8606471 21.0093513,12.0616587 C20.9809214,12.0017018 20.9809214,12.0017018 20.9524782,11.9717092 Z" id="路径" fill="#FFFFFF"></path>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="48px" height="48px" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>编组 8</title>
<desc>Created with Sketch.</desc>
<g id="顾问" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-63.000000, -338.000000)" id="Group-9">
<g transform="translate(16.000000, 283.000000)">
<g id="编组-8" transform="translate(47.000000, 55.000000)">
<rect id="矩形" x="0" y="0" width="48" height="48"></rect>
<path d="M32.1886041,17.1365479 C32.0885616,12.5816596 28.5153761,8.82439051 24.0381107,8.58457814 C19.2852576,8.32199688 15.2228061,12.0236208 14.9643267,16.8523968 C14.7963771,19.9902525 16.2963748,22.9789178 18.8948017,24.6836405 C19.2268051,24.9029576 19.3209502,25.3541908 19.1050809,25.6914969 C19.025392,25.8160145 18.9101455,25.9128111 18.7747869,25.9689133 C14.7888183,27.641118 11.9199176,31.2662914 11.1683301,35.5805572 C11.0026038,36.5764783 11.6629171,37.520327 12.6431816,37.6886965 C12.7450227,37.706189 12.8481568,37.714744 12.9514423,37.7142668 L34.1927175,37.7142668 C35.1868829,37.7182906 35.9960275,36.9027494 35.9999857,35.8927018 C36.0003958,35.7881128 35.9919743,35.6836806 35.9748138,35.5805539 C35.2226902,31.2675059 32.3537533,27.6437687 28.3683564,25.9729629 C28.0007074,25.8219165 27.8231899,25.3966693 27.9718618,25.0231483 C28.0278204,24.882558 28.1255126,24.7631791 28.2513512,24.6816157 C30.7654303,23.0328792 32.2562778,20.1758898 32.1886041,17.1365479 Z" id="路径" fill="#FFC842"></path>
<path d="M13.7142857,13.7297405 L13.6305584,13.7236214 C10.4982835,13.543048 7.81649592,16.0037127 7.64062524,19.2196568 C7.52585924,21.3182108 8.51977633,23.317828 10.2422398,24.4537572 C10.4611134,24.5995296 10.5234487,24.8998736 10.3814695,25.124597 C10.3287476,25.2080434 10.252312,25.2728296 10.1625219,25.3101743 C7.53270449,26.4230326 5.6392611,28.8386788 5.14285714,31.7142857" id="形状" stroke="#333333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill-rule="nonzero"></path>
<path d="M42,13.7297405 L41.9162727,13.7236214 C38.7839978,13.543048 36.1022102,16.0037127 35.9263395,19.2196568 C35.8115735,21.3182108 36.8054906,23.317828 38.5279541,24.4537572 C38.7468276,24.5995296 38.8091629,24.8998736 38.6671838,25.124597 C38.6144619,25.2080434 38.5380263,25.2728296 38.4482361,25.3101743 C35.8184188,26.4230326 33.9249754,28.8386788 33.4285714,31.7142857" id="形状备份" stroke="#333333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill-rule="nonzero" transform="translate(37.714286, 22.714286) scale(-1, 1) translate(-37.714286, -22.714286) "></path>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="56px" height="56px" viewBox="0 0 56 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>顾问</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="100%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
<stop stop-color="#FFE677" offset="0%"></stop>
<stop stop-color="#FFC842" offset="100%"></stop>
</linearGradient>
<path d="M-7.10542736e-15,7.08295844 L-7.10542736e-15,4 C-7.37596886e-15,1.790861 1.790861,4.05812251e-16 4,0 L40,0 C42.209139,-4.05812251e-16 44,1.790861 44,4 L44,7.08295844 C41.1622867,7.55903653 39,10.0270037 39,13 C39,15.9729963 41.1622867,18.4409635 44,18.9170416 L44,22 C44,24.209139 42.209139,26 40,26 L4,26 C1.790861,26 -6.83488586e-15,24.209139 -7.10542736e-15,22 L-7.10542736e-15,18.9170416 C2.83771334,18.4409635 5,15.9729963 5,13 C5,10.0270037 2.83771334,7.55903653 -6.8278716e-15,7.08295844 Z" id="path-2"></path>
<filter x="-90.9%" y="-123.1%" width="281.8%" height="407.7%" filterUnits="objectBoundingBox" id="filter-3">
<feOffset dx="0" dy="8" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="12" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 1 0 0 0 0 0.847058824 0 0 0 0 0.37254902 0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g id="顾问" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-48.000000, -1200.000000)" id="Group-3">
<g transform="translate(48.000000, 1200.000000)">
<rect id="矩形备份-6" x="0" y="0" width="56" height="56"></rect>
<g id="编组-9" transform="translate(6.000000, 15.000000)">
<g id="编组-5"></g>
<g id="形状结合">
<use fill="black" fill-opacity="1" filter="url(#filter-3)" xlink:href="#path-2"></use>
<use fill="url(#linearGradient-1)" fill-rule="evenodd" xlink:href="#path-2"></use>
</g>
<path d="M17.4988671,5 L17.4988671,5 C18.4347244,5 19.3080964,5.46973969 19.8239928,6.25055965 L22.4638507,10.2460399 L24.8467557,6.32125188 C25.344824,5.50090345 26.2349412,5 27.1946513,5 L27.1946513,5 C27.6391196,5 27.9994322,5.36031268 27.9994322,5.80478089 C27.9994322,5.96989959 27.9486428,6.13102222 27.8539534,6.26629269 L24.8058209,10.620764 L27.1482481,10.6793247 C27.9296845,10.6988606 28.5529969,11.3379505 28.5529969,12.1196312 L28.5529969,12.1196312 C28.5529969,12.8796953 27.9368432,13.495849 27.176779,13.495849 C27.1672232,13.495849 27.1576677,13.4957495 27.148114,13.4955505 L24.0564054,13.4311398 L23.8690469,15.2110435 L27.1009723,15.2110435 C27.9029053,15.2110435 28.5530005,15.8611387 28.5530005,16.6630717 L28.5530005,16.6630717 C28.5530005,17.4650048 27.9029053,18.1151 27.1009723,18.1151 L23.8690469,18.1151 L23.8690469,20.6139671 C23.8690469,21.3382931 23.2818647,21.9254754 22.5575386,21.9254754 L22.5575386,21.9254754 C21.8280561,21.9254754 21.2317254,21.3436254 21.2137963,20.6143633 L21.1523512,18.1151 L17.9192206,18.2418891 C17.0990014,18.2740545 16.4080071,17.6352106 16.3758417,16.8149914 C16.3750807,16.7955872 16.3747001,16.7761699 16.3747001,16.7567508 L16.3747001,16.7567508 C16.3747001,15.90308 17.066737,15.2110432 17.9204078,15.2110432 L21.0586537,15.2110432 L21.0586537,13.5248172 L17.7796069,13.4592363 C16.9991951,13.4436281 16.3747001,12.8065183 16.3747001,12.0259504 L16.3747001,12.0259504 C16.3747001,11.2498867 17.0038241,10.6207627 17.7798879,10.6207627 L19.5597932,10.6207627 L16.8019682,6.2662739 C16.5582083,5.88138727 16.6726141,5.37176854 17.0575007,5.12800861 C17.1895271,5.04439241 17.3425896,5 17.4988671,5 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<template>
<modal
v-model="isShowLogin"
title="您好<br />欢迎来到芒果保险"
:closeable="true"
cancel-btn
confirm-btn="确定"
@close="setLoginIsShow(false)"
@confirm="$refs.loginForm.submit()"
>
<cr-form
class="login-form"
ref="loginForm"
validate-trigger="onBlur"
@submit="login"
@failed="onFormFailed"
>
<cr-field
v-model="formData.phoneNo"
name="phoneNo"
type="tel"
label="手机号"
placeholder="请填写您的手机号"
:rules="validOptions[0]"
/>
<cr-field
v-model="formData.verifyCode"
name="verifyCode"
type="tel"
label="验证码"
placeholder="请填写验证码"
:rules="validOptions[1]"
>
<template v-slot:button>
<a href="javascript:;" @click="getCode" v-if="!showCount">获取验证码</a>
<span class="login-form-remain" v-else>{{ count }}s</span>
</template>
</cr-field>
</cr-form>
</modal>
</template>
<script>
import { mapState, mapActions } from "vuex";
import Modal from "@/components/Modal";
import { loginByPhone, getCaptchaSms } from "@/api/user";
import { isPhone, isWeixinBrower } from "@/service/validation";
export default {
name: "LoginModal",
components: {
Modal
},
data() {
return {
show: true,
showCount: false,
count: "",
timer: null,
formData: {
phoneNo: "",
verifyCode: ""
},
validOptions: [
[
{ require: true, message: "请填写您的手机号" },
{ validator: isPhone, message: "请填写正确的手机号码" }
],
[{ require: true, message: "请填写验证码" }]
]
};
},
computed: {
...mapState(["isShowLogin"])
},
methods: {
...mapActions(["setLoginIsShow"]),
onFormFailed(errorInfo) {
const { errors } = errorInfo;
this.$notify({ type: "warning", message: errors[0].message });
},
async login() {
this.formData.loginChannel = isWeixinBrower ? 1 : 2;
this.formData.openId = localStorage.getItem("openId") || null;
const res = await loginByPhone(this.formData);
if (res.code === "0") {
this.$notify("登录成功");
this.setLoginIsShow(false);
localStorage.setItem("mongoToken", res.data.token);
}
},
async getCode() {
const TIME_COUNT = 60;
const { phoneNo } = this.formData;
if (this.timer) return;
if (!isPhone(phoneNo)) {
this.$notify({ type: "warning", message: "请填写正确的手机号码" });
return;
}
const res = await getCaptchaSms({ phoneNo });
if (res.code === "0" && !this.timer) {
this.count = TIME_COUNT;
this.showCount = true;
this.timer = setInterval(() => {
if (this.count > 0 && this.count <= TIME_COUNT) {
this.count--;
} else {
this.showCount = false;
clearInterval(this.timer);
this.timer = null;
}
}, 1000);
}
}
}
};
</script>
<style lang="less" scoped>
@import "../style/var.less";
.login-form {
@{deep} .cr-field--error-message {
display: none;
}
@{deep} .cr-cell {
&-group {
&::after {
display: none;
}
}
background-color: @gray-1;
border-radius: @border-radius-md;
margin-bottom: 12px;
align-items: center;
padding: 9px 16px;
&::after {
display: none;
}
&__title {
color: #333333;
display: flex;
align-items: center;
}
}
}
</style>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="panel"> <div class="panel">
<div class="panel-head"> <div class="panel-head">
<slot name="title"> <slot name="title">
<h4 v-if="title">{{ title }}</h4> <h4 v-if="title" v-html="title"></h4>
</slot> </slot>
</div> </div>
<div class="panel-body"> <div class="panel-body">
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
border-top-left-radius: @border-radius-md; border-top-left-radius: @border-radius-md;
border-top-right-radius: @border-radius-md; border-top-right-radius: @border-radius-md;
padding: @padding-lg @padding-lg 5px @padding-lg; padding: @padding-lg @padding-lg 5px @padding-lg;
background: url("../assets/dialog-header-bg.png") right no-repeat; background: url("../assets/images/dialog-header-bg.png") right no-repeat;
background-size: 34px 25px; background-size: 34px 25px;
background-position: right center; background-position: right center;
h4 { h4 {
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
:class="{ placeholder: !String(pickerValShow) }" :class="{ placeholder: !String(pickerValShow) }"
@click="show = true" @click="show = true"
> >
{{ pickerValShow || placeholder }} <span>{{ pickerValShow || placeholder }}</span>
<svg-icon icon-class="triangle-right" slot="button" />
</div> </div>
<cr-popup v-model="show" position="bottom" get-container="body"> <cr-popup v-model="show" position="bottom" get-container="body">
<cr-area ref="area" :list="areaList" @cancel="onCancel" @confirm="onConfirm" /> <cr-area ref="area" :list="areaList" @cancel="onCancel" @confirm="onConfirm" />
...@@ -46,6 +47,13 @@ export default { ...@@ -46,6 +47,13 @@ export default {
height: 24px; height: 24px;
color: #333; color: #333;
font-size: 14px; font-size: 14px;
display: flex;
justify-content: space-between;
align-items: center;
}
.svg-icon {
height: 16px;
width: 16px;
} }
.placeholder { .placeholder {
color: #ccc; color: #ccc;
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
:class="{ placeholder: !String(pickerValShow) }" :class="{ placeholder: !String(pickerValShow) }"
@click="show = true" @click="show = true"
> >
{{ pickerValShow || placeholder }} <span>{{ pickerValShow || placeholder }}</span>
<svg-icon icon-class="triangle-right" slot="button" />
</div> </div>
<cr-popup v-model="show" position="bottom" get-container="body"> <cr-popup v-model="show" position="bottom" get-container="body">
<cr-date-picker ref="datepicker" @confirm="onConfirm" @cancel="onCancel" /> <cr-date-picker ref="datepicker" @confirm="onConfirm" @cancel="onCancel" />
...@@ -39,6 +40,10 @@ export default { ...@@ -39,6 +40,10 @@ export default {
color: #333; color: #333;
font-size: 14px; font-size: 14px;
} }
.svg-icon {
height: 16px;
width: 16px;
}
.placeholder { .placeholder {
color: #ccc; color: #ccc;
} }
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
:class="{ placeholder: !String(pickerValShow) }" :class="{ placeholder: !String(pickerValShow) }"
@click="show = true" @click="show = true"
> >
{{ pickerValShow || placeholder }} <span>{{ pickerValShow || placeholder }}</span>
<svg-icon icon-class="triangle-right" slot="button" />
</div> </div>
<cr-popup v-model="show" position="bottom" get-container="body"> <cr-popup v-model="show" position="bottom" get-container="body">
<cr-picker <cr-picker
...@@ -40,6 +41,10 @@ export default { ...@@ -40,6 +41,10 @@ export default {
color: #333; color: #333;
font-size: 14px; font-size: 14px;
} }
.svg-icon {
height: 16px;
width: 16px;
}
.placeholder { .placeholder {
color: #ccc; color: #ccc;
} }
......
...@@ -82,12 +82,12 @@ export default { ...@@ -82,12 +82,12 @@ export default {
.body-wrap-mixin { .body-wrap-mixin {
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
height: 75vh; height: 80vh;
padding: @padding-lg; padding: @padding-lg;
} }
.protocol { .protocol {
z-index: 200; z-index: 200;
height: 75vh; height: 80vh;
padding-top: 48px; padding-top: 48px;
overflow: hidden; overflow: hidden;
@{deep} .cr-icon { @{deep} .cr-icon {
...@@ -123,7 +123,7 @@ export default { ...@@ -123,7 +123,7 @@ export default {
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: 201; z-index: 201;
height: 75vh; height: 80vh;
overflow: scroll; overflow: scroll;
width: 100vw; width: 100vw;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
......
export default { export default {
basicHost: "https://talos-vcc.liangkebang.net", basicHost: "http://127.0.0.1:8964/",
// basicHost: "https://hathaway-mg.liangkebang.net/",
wxAppId: "wx514de17b23d53a20" wxAppId: "wx514de17b23d53a20"
}; };
import Vue from "vue"; import Vue from "vue";
import "@/service/load";
import App from "./App.vue"; import App from "./App.vue";
import router from "./router"; import router from "./router";
import store from "./store"; import store from "./store";
...@@ -6,7 +7,6 @@ import "./style/index.less"; ...@@ -6,7 +7,6 @@ import "./style/index.less";
import "amfe-flexible"; import "amfe-flexible";
// import vConsole from "vconsole"; // import vConsole from "vconsole";
import "@/assets/icons/index"; import "@/assets/icons/index";
import "@/service/load";
import "@/service/cherry-ui"; import "@/service/cherry-ui";
Vue.config.productionTip = false; Vue.config.productionTip = false;
......
//引入axios //引入axios
import store from "@/store"; import store from "@/store";
import axios from "axios"; import axios from "axios";
import cherry from "@qg/cherry-ui"; import { Notify } from "@qg/cherry-ui";
import config from "../config"; import config from "../config";
// import qs from "qs"; // import qs from "qs";
const CancelToken = axios.CancelToken; const CancelToken = axios.CancelToken;
const { Notify } = cherry; // const { Notify } = cherry;
axios.defaults.baseURL = config.basicHost; axios.defaults.baseURL = config.basicHost;
axios.defaults.timeout = 30000; axios.defaults.timeout = 30000;
...@@ -53,7 +53,7 @@ axios.interceptors.response.use( ...@@ -53,7 +53,7 @@ axios.interceptors.response.use(
response => { response => {
afterRequest(); afterRequest();
delete pending[response.config.url]; delete pending[response.config.url];
if (response.data.code === 0) { if (response.data.code === "0") {
return response.data; return response.data;
// return response.data.data; // return response.data.data;
} }
...@@ -111,9 +111,8 @@ axios.interceptors.response.use( ...@@ -111,9 +111,8 @@ axios.interceptors.response.use(
err.message = "连接到服务器失败"; err.message = "连接到服务器失败";
} }
} }
afterRequest();
Notify({ type: "danger", message: err.message }); Notify({ type: "danger", message: err.message });
return Promise.resolve(err.response); return Promise.resolve(err.response);
} }
); );
...@@ -129,7 +128,8 @@ export default { ...@@ -129,7 +128,8 @@ export default {
url: url, url: url,
params, params,
headers: { headers: {
"Content-Type": "application/json" "Content-Type": "application/json",
"x-auth-token": localStorage.getItem("mongoToken") || null
} }
}) })
.then(res => { .then(res => {
...@@ -148,7 +148,8 @@ export default { ...@@ -148,7 +148,8 @@ export default {
url, url,
data: params, data: params,
headers: { headers: {
"Content-Type": "application/json" "Content-Type": "application/json",
"x-auth-token": localStorage.getItem("mongoToken") || null
} }
}) })
.then(res => { .then(res => {
......
...@@ -2,9 +2,12 @@ ...@@ -2,9 +2,12 @@
* @Description: 支付微信h5, jsapi, 第三方收银台,跳转) * @Description: 支付微信h5, jsapi, 第三方收银台,跳转)
* @Date: 2020-07-28 15:03:52 * @Date: 2020-07-28 15:03:52
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-07-28 15:20:28 * @LastEditTime: 2020-07-29 15:08:38
*/ */
import { Notify } from "@qg/cherry-ui";
import qs from "qs";
/** /**
* payByWeixinJsapi * payByWeixinJsapi
* @description: 微信通过jsapi支付 * @description: 微信通过jsapi支付
...@@ -12,27 +15,30 @@ ...@@ -12,27 +15,30 @@
* @param {type} * @param {type}
* @return: * @return:
*/ */
export function payByWeixinJsapi() { function payByWeixinJsapi(info, callback) {
function onBridgeReady() { function onBridgeReady() {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
WeixinJSBridge.invoke( WeixinJSBridge.invoke(
"getBrandWCPayRequest", "getBrandWCPayRequest",
{ {
appId: "wx2421b1c4370ec43b", //公众号名称,由商户传入 appId: info.appId, //公众号名称,由商户传入
timeStamp: "1395712654", //时间戳,自1970年以来的秒数 timeStamp: info.timeStamp, //时间戳,自1970年以来的秒数
nonceStr: "e61463f8efa94090b1f366cccfbbb444", //随机串 nonceStr: info.nonceStr, //随机串
package: "prepay_id=u802345jgfjsdfgsdg888", package: `prepay_id=${info.prepayId}&partner_id=${info.partnerId}`,
signType: "MD5", //微信签名方式: signType: "MD5", //微信签名方式:
paySign: "70EA570631E4BB79628FBCA90534C63FF7FADD89" //微信签名 paySign: info.sign //微信签名
}, },
function(res) { function(res) {
if (res.err_msg == "get_brand_wcpay_request:ok") { if (res.err_msg == "get_brand_wcpay_request:ok") {
// 使用以上方式判断前端返回,微信团队郑重提示: // 使用以上方式判断前端返回,微信团队郑重提示:
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。 //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
callback("ok");
} else if (res.err_msg == "get_brand_wcpay_request:cancel") { } else if (res.err_msg == "get_brand_wcpay_request:cancel") {
// 支付取消 // 支付取消
callback("cancel");
} else { } else {
// 支付失败 // 支付失败
callback("fail");
} }
} }
); );
...@@ -56,8 +62,12 @@ export function payByWeixinJsapi() { ...@@ -56,8 +62,12 @@ export function payByWeixinJsapi() {
* @param {type} * @param {type}
* @return: * @return:
*/ */
export function payByWeixinH5() { function payByWeixinH5(info) {
window.location.href = ""; if (!info.url) return;
const currentPath = encodeURIComponent(
window.location.href + qs.stringify(info.params, { encode: true, addQueryPrefix: true })
);
window.location.href = `${info.url}&redirect_url=${currentPath}`;
} }
/** /**
...@@ -66,6 +76,37 @@ export function payByWeixinH5() { ...@@ -66,6 +76,37 @@ export function payByWeixinH5() {
* @param {type} * @param {type}
* @return: * @return:
*/ */
export function payByThirdPartyCashier() { function payByThirdPartyCashier(info) {
window.location.href = ""; if (!info.url) return;
const currentPath = encodeURIComponent(
window.location.href + qs.stringify(info.params, { encode: true, addQueryPrefix: true })
);
window.location.href = `${info.url}&redirect_uri=${currentPath}`;
}
/**
* @description: 支付方式判断, 返回promise
* @param {String} type 支付方式,THIRD -> 第三方,MWEB -> H5支付, JSAPI -> jsapi支付,默认支付方式,THIRD
* @param {Object/String} payInfo 支付信息
* @return {Promise} 回调
*/
export function payByWay(type = "THIRD", payInfo) {
return new Promise(resolve => {
if (type === "JSAPI") {
payByWeixinJsapi(payInfo, function(e) {
if (e === "ok") {
Notify({ type: "success", message: "支付成功" });
} else {
Notify({ type: "warning", message: "支付失败" });
}
resolve(e);
});
} else if (type === "MWEB") {
payByWeixinH5(payInfo);
resolve();
} else {
payByThirdPartyCashier(payInfo);
resolve();
}
});
} }
/**
* 时间转换
* @param {String} time 需要转换的时间
* @param {String} cFormat 格式 {y}-{m}-{d} {h}:{i}:{s}
* @return: {String} timeStr 转换完成的时间
*/
export function parseTime(time, cFormat) {
if (arguments.length === 0) {
return "-";
}
if (time == null) {
return "-";
}
const format = cFormat || "{y}-{m}-{d} {h}:{i}:{s}";
let date;
if (time == "") {
date = new Date();
} else if (typeof time === "object") {
date = time;
} else {
if (("" + time).length === 10) time = parseInt(time) * 1000;
if (String(time).indexOf("T") > -1) {
time = time.replace(/T/g, " ").replace(/\..*/g, "");
}
if (String(time).indexOf("-") > -1 && String(time).indexOf("T") == -1) {
time = time.replace(/-/g, "/");
}
date = new Date(time);
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
};
const timeStr = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key];
if (key === "a") {
return ["", "", "", "", "", "", ""][value];
}
if (result.length > 0 && value < 10) {
value = "0" + value;
}
return value || 0;
});
return timeStr;
}
/**
* 时间显示效果显示
* @param {String} time 需要转换的时间
* @param {String} option 格式 {y}-{m}-{d} {h}:{i}:{s}
* @return: {String} 转换完成的时间
*/
export function formatTime(time, option) {
time = +time * 1000;
const d = new Date(time);
const now = Date.now();
const diff = (now - d) / 1000;
if (diff < 30) {
return "刚刚";
} else if (diff < 3600) {
// less 1 hour
return Math.ceil(diff / 60) + "分钟前";
} else if (diff < 3600 * 24) {
return Math.ceil(diff / 3600) + "小时前";
} else if (diff < 3600 * 24 * 2) {
return "1天前";
}
if (option) {
return parseTime(time, option);
} else {
return (
d.getMonth() + 1 + "" + d.getDate() + "" + d.getHours() + "" + d.getMinutes() + ""
);
}
}
/**
* 延时函数
* @param {Function} func 方法
* @param {Number} wait 等待时间
* @param {Boolean} immediate 是否立即执行
* @return: {Function} result 方法执行
*/
export function debounce(func, wait, immediate) {
let timeout, args, context, timestamp, result;
const later = function() {
// 据上一次触发时间间隔
const last = +new Date() - timestamp;
// 上次被包装函数被调用时间间隔last小于设定时间间隔wait
if (last < wait && last > 0) {
timeout = setTimeout(later, wait - last);
} else {
timeout = null;
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
if (!immediate) {
result = func.apply(context, args);
if (!timeout) context = args = null;
}
}
};
return function(...args) {
context = this;
timestamp = +new Date();
const callNow = immediate && !timeout;
// 如果延时不存在,重新设定延时
if (!timeout) timeout = setTimeout(later, wait);
if (callNow) {
result = func.apply(context, args);
context = args = null;
}
return result;
};
}
/** /**
* 替换邮箱字符 * 替换邮箱字符
* @param {String} email 输入字符串 * @param {String} email 输入字符串
......
...@@ -248,3 +248,9 @@ export function isBankNumber(str) { ...@@ -248,3 +248,9 @@ export function isBankNumber(str) {
} }
return false; return false;
} }
// 判断微信环境
export function isWeixinBrower() {
const ua = window.navigator.userAgent.toLowerCase();
return ua.match(/MicroMessenger/i) == "micromessenger";
}
...@@ -6,7 +6,8 @@ Vue.use(Vuex); ...@@ -6,7 +6,8 @@ Vue.use(Vuex);
export default new Vuex.Store({ export default new Vuex.Store({
state: { state: {
activeIdx: 0, activeIdx: 0,
isLoading: false isLoading: false,
isShowLogin: false
}, },
mutations: { mutations: {
setActiveIdx(state, value) { setActiveIdx(state, value) {
...@@ -14,6 +15,9 @@ export default new Vuex.Store({ ...@@ -14,6 +15,9 @@ export default new Vuex.Store({
}, },
setIsLoading(state, value) { setIsLoading(state, value) {
state.isLoading = value; state.isLoading = value;
},
setIsShowLogin(state, value) {
state.showLogin = value;
} }
}, },
actions: { actions: {
...@@ -22,6 +26,9 @@ export default new Vuex.Store({ ...@@ -22,6 +26,9 @@ export default new Vuex.Store({
}, },
setIsLoading({ commit }, args) { setIsLoading({ commit }, args) {
commit("setIsLoading", args); commit("setIsLoading", args);
},
setIsShowLogin({ commit }, args) {
commit("setIsShowLogin", args);
} }
}, },
modules: {} modules: {}
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div class="cal-footer-num"> <div class="cal-footer-num">
<h4>155<small>元/年起</small></h4> <h4>155<small>元/年起</small></h4>
</div> </div>
<cr-button type="warning">算一算保费</cr-button> <cr-button type="warning" @click="openIframePupop(6)">算一算保费</cr-button>
</div> </div>
</card> </card>
<card class="intro" id="det_intro"> <card class="intro" id="det_intro">
...@@ -69,7 +69,11 @@ ...@@ -69,7 +69,11 @@
</div> </div>
<detail-footer :company-info="companyInfo" /> <detail-footer :company-info="companyInfo" />
<copyright /> <copyright />
<good-action @leftClick="goInsureState = true" :content="goodActionInfo" /> <good-action
@click="$router.push('/policy/add')"
:content="goodActionInfo"
:class="{ 'cal-fee': currentPupopIndex === 6 }"
/>
<popup-with-iframe <popup-with-iframe
v-model="popupShow" v-model="popupShow"
:title="pupopData.title" :title="pupopData.title"
...@@ -77,13 +81,8 @@ ...@@ -77,13 +81,8 @@
:url="pupopData.url" :url="pupopData.url"
> >
<cps-process-detail v-if="currentPupopIndex === 5" :process-data="processDetail" /> <cps-process-detail v-if="currentPupopIndex === 5" :process-data="processDetail" />
<cps-rate v-if="currentPupopIndex === 6" /> <cal-insured-fee v-if="currentPupopIndex === 6" />
</popup-with-iframe> </popup-with-iframe>
<go-insure-dialog
v-model="goInsureState"
:title="headerInfo.title"
:pay-data="goodBuyModalInfo"
/>
</div> </div>
</template> </template>
...@@ -104,9 +103,8 @@ import CpsCase from "./modules/CpsCase"; ...@@ -104,9 +103,8 @@ import CpsCase from "./modules/CpsCase";
import CpsProcess from "./modules/CpsProcess"; import CpsProcess from "./modules/CpsProcess";
import CpsQa from "./modules/CpsQA"; import CpsQa from "./modules/CpsQA";
import PopupWithIframe from "@/components/PopupWithIframe"; import PopupWithIframe from "@/components/PopupWithIframe";
import GoInsureDialog from "./modules/GoInsureDialog";
import CpsProcessDetail from "./modules/CpsProcessDetail"; import CpsProcessDetail from "./modules/CpsProcessDetail";
import CpsRate from "./modules/CpsRate"; import CalInsuredFee from "./modules/CalInsuredFee";
import PlanTip from "./modules/PlanTip"; import PlanTip from "./modules/PlanTip";
import ProtocolRead from "./modules/ProtocolRead"; import ProtocolRead from "./modules/ProtocolRead";
import NavTab from "./modules/NavTab"; import NavTab from "./modules/NavTab";
...@@ -130,12 +128,11 @@ export default { ...@@ -130,12 +128,11 @@ export default {
Copyright, Copyright,
PopupWithIframe, PopupWithIframe,
GoodAction, GoodAction,
GoInsureDialog,
CpsProcessDetail, CpsProcessDetail,
CpsRate,
PlanTip, PlanTip,
NavTab, NavTab,
ProtocolRead ProtocolRead,
CalInsuredFee
}, },
data() { data() {
return { return {
...@@ -147,10 +144,14 @@ export default { ...@@ -147,10 +144,14 @@ export default {
payway: "1", payway: "1",
pact: false pact: false
}, },
goInsureState: false,
showLayer: false showLayer: false
}; };
}, },
watch: {
popupShow(val) {
if (!val && this.currentPupopIndex === 6) this.currentPupopIndex = null;
}
},
computed: { computed: {
pupopData() { pupopData() {
const { popupArray, currentPupopIndex } = this; const { popupArray, currentPupopIndex } = this;
......
...@@ -102,3 +102,6 @@ ...@@ -102,3 +102,6 @@
margin-bottom: 12px; margin-bottom: 12px;
} }
} }
.cal-fee {
z-index: 202;
}
\ No newline at end of file
...@@ -22,7 +22,8 @@ export default { ...@@ -22,7 +22,8 @@ export default {
}, },
data() { data() {
return { return {
detailType: "li" detailType: "li",
show: true
}; };
}, },
mounted() { mounted() {
......
<template>
<modal
v-model="show"
:closeable="true"
cancel-btn=""
confirm-btn="0.99元聘请"
@confirm="go"
class="rec"
>
<div class="rec-title" slot="title">
<small class="rec-title_small">亲爱的用户</small>
<h4 class="rec-title_h4">芒果保险恭喜您<br />受邀0.99元聘请保险顾问</h4>
</div>
<div class="rec-reason">
<div class="rec-reason-item">
<svg-icon icon-class="check-circle" />
<span class="plan-tip_offset">【省钱】帮您最高节省50%保费</span>
</div>
<div class="rec-reason-item">
<svg-icon icon-class="check-circle" />
<span class="plan-tip_offset">【放心】中立客观的量身定制方案</span>
</div>
<div class="rec-reason-item">
<svg-icon icon-class="check-circle" />
<span class="plan-tip_offset">【专业】帮您解读条款做到有效投保 </span>
</div>
</div>
<div class="rec-discount">限时优惠 <del>原价199元</del></div>
</modal>
</template>
<script>
import Modal from "@/components/Modal";
const DIALOG_CHANGE_EVENT = "input";
export default {
name: "AdvisorRecDialog",
components: {
Modal
},
props: {
value: null
},
data() {
return {
show: false
};
},
watch: {
value: {
immediate: true,
handler(val) {
this.show = val;
}
},
show(val) {
this.$emit(DIALOG_CHANGE_EVENT, val);
}
},
methods: {
go() {
this.$router.push("/goods/inform");
}
}
};
</script>
<style lang="less" scoped>
@import "../../../../style/var.less";
.rec {
&-title {
&_small {
font-size: @font-size-16;
color: @gray-4;
line-height: @line-height-sm + 3;
}
&_h4 {
font-size: @font-size-18;
font-weight: @font-weight-bold;
color: @black;
line-height: @line-height-lg + 1;
}
}
&-reason {
margin: 10px 0 40px;
.svg-icon {
width: 14px;
height: 14px;
}
&-item {
font-size: @font-size-14;
color: @gray-4;
line-height: @line-height-lg;
}
}
&-discount {
position: absolute;
bottom: -78px;
left: 0;
right: 0;
margin: auto;
font-size: @font-size-12;
color: @red;
line-height: @line-height-sm;
text-align: center;
}
@{deep} .panel-body {
position: relative;
}
@{deep} .panel-foot {
padding-bottom: 50px;
}
}
</style>
<template>
<cr-form class="policy-form" scroll-to-error @submit="onFormSubmit" @failed="onFormFailed">
<cr-cell-group title="被保人年龄需满足18周岁~60周岁">
<cr-field v-model="formData.text" name="selfName" label="出生日期" readonly>
<template #input>
<popup-date-picker v-model="formData.text" placeholder="请选择被保人出生日期" />
</template>
</cr-field>
<cr-field name="selfName" label="保障额度">
<template #input>
<cr-radio-btn v-model="formData.planValue" :radio-data="countOptions" />
</template>
</cr-field>
<cr-field v-model="formData.text" name="selfName" label="保险期限">
<template #input>
<cr-radio-btn v-model="formData.planValue" :radio-data="termOptions" />
</template>
</cr-field>
<cr-field v-model="formData.text" name="selfName" label="交费年限">
<template #input>
<cr-radio-btn v-model="formData.planValue" :radio-data="benefitOptions" />
</template>
</cr-field>
<cr-field v-model="formData.text" name="selfName" label="性别">
<template #input>
<cr-radio-btn v-model="formData.planValue" :radio-data="sexOptions" />
</template>
</cr-field>
<cr-field v-model="formData.text" name="selfName" label="交费方式">
<template #input>
<cr-radio-btn v-model="formData.planValue" :radio-data="paywayOptions" />
</template>
</cr-field>
</cr-cell-group>
</cr-form>
</template>
<script>
import CrRadioBtn from "@/components/CrRadioBtn";
import PopupDatePicker from "@/components/PopupDatePicker";
export default {
name: "CalInsuredFee",
components: {
CrRadioBtn,
PopupDatePicker
},
data() {
return {
formData: {},
sexOptions: [
{ label: "", value: "1" },
{ label: "", value: "2" }
],
countOptions: [
{ label: "100万", value: "1" },
{ label: "150万", value: "2" },
{ label: "200万", value: "3" },
{ label: "250万", value: "4" },
{ label: "300万", value: "5" },
{ label: "350万", value: "6" }
],
termOptions: [
{ label: "10年", value: "1" },
{ label: "20年", value: "2" },
{ label: "30年", value: "3" },
{ label: "保至60周岁", value: "4" },
{ label: "保至65周岁", value: "5" },
{ label: "保至70周岁", value: "6" }
],
paywayOptions: [
{ label: "年交", value: "1" },
{ label: "月交", value: "2" }
],
benefitOptions: [
{ label: "10年", value: "2" },
{ label: "20年", value: "3" },
{ label: "30年", value: "4" }
]
};
},
watch: {
formData: {
deep: true,
handler() {
this.calFee();
}
}
},
mounted() {},
methods: {
onFormSubmit(values) {
console.log("submit", values);
},
onFormFailed(errorInfo) {
const { errors } = errorInfo;
this.$notify({ type: "warning", message: errors[0].message });
},
calFee() {}
}
};
</script>
<style lang="less" scoped>
@import "../../../Policy/Add/index.less";
.policy-form {
padding: 0;
@{deep} .cr-cell {
&-group {
&__title {
font-size: @font-size-16;
padding: 0 0 @padding-sm;
}
}
}
}
</style>
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
} }
} }
&-header { &-header {
background: url(../../../../assets/goods/detail/assistant-card.png) top no-repeat; background: url(../../../../assets/images/goods/detail/assistant-card.png) top no-repeat;
background-size: contain; background-size: contain;
padding: 24px 24px 21.5px; padding: 24px 24px 21.5px;
h4 { h4 {
......
...@@ -111,7 +111,7 @@ export default { ...@@ -111,7 +111,7 @@ export default {
background-position: bottom right; background-position: bottom right;
background-size: 19%; background-size: 19%;
&.stamp { &.stamp {
background-image: url(../../../../assets/goods/detail/stamp.png); background-image: url(../../../../assets/images/goods/detail/stamp.png);
} }
&-title { &-title {
font-size: 32px; font-size: 32px;
......
<template> <template>
<modal v-model="show" :closeable="true" cancel-btn="" confirm-btn="好的 继续" @confirm="go"> <modal v-model="show" :closeable="true" cancel-btn="" confirm-btn="好的 继续" @confirm="go">
<h4 slot="title">立即拥有<br />{{ title }}</h4> <h4 slot="title" class="pay-title">立即拥有<br />{{ title }}</h4>
<compactCellGroup class="pay-det" :cell-data="payCellData" :text-bold="true" /> <compactCellGroup class="pay-det" :cell-data="payCellData" :text-bold="true" />
<slot>
<div class="pay-tip">*不满意可随时退保</div> <div class="pay-tip">*不满意可随时退保</div>
<div class="pay-protocol"> <div class="pay-protocol">
<div class="pay-protocol-tip">投保前请阅读</div> <div class="pay-protocol-tip">投保前请阅读</div>
...@@ -15,6 +16,7 @@ ...@@ -15,6 +16,7 @@
<a href="javascript:;" @click="openIframePupop(3)">服务协议</a> <a href="javascript:;" @click="openIframePupop(3)">服务协议</a>
</div> </div>
</div> </div>
</slot>
</modal> </modal>
</template> </template>
...@@ -74,44 +76,14 @@ export default { ...@@ -74,44 +76,14 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
@import "../../../../style/var.less"; @import "../../../../style/var.less";
.panel {
background-color: @white; .pay {
border-radius: @border-radius-md; &-title {
width: 300px;
&-wrap {
overflow: initial;
@{deep} .cr-popup--close {
top: -36px;
right: 0;
color: @white;
font-size: 24px;
}
}
&-head {
border-top-left-radius: @border-radius-md;
border-top-right-radius: @border-radius-md;
padding: @padding-lg @padding-lg 5px @padding-lg;
background: url("../../../../assets/dialog-header-bg.png") right no-repeat;
background-size: 34px 25px;
background-position: right center;
h4 {
color: @black; color: @black;
font-size: @font-size-18; font-size: @font-size-18;
font-weight: @font-weight-bold; font-weight: @font-weight-bold;
line-height: @line-height-lg + 1; line-height: @line-height-lg + 1;
} }
}
&-body {
padding: @padding-lg;
}
&-foot {
display: flex;
justify-content: center;
align-items: center;
padding: @padding-lg;
}
}
.pay {
&-det { &-det {
padding-left: 34px; padding-left: 34px;
position: relative; position: relative;
......
...@@ -23,7 +23,6 @@ import GoodList from "@/components/GoodList/index"; ...@@ -23,7 +23,6 @@ import GoodList from "@/components/GoodList/index";
import Tabbar from "@/components/Tabbar"; import Tabbar from "@/components/Tabbar";
import copyright from "@/components/Copyright"; import copyright from "@/components/Copyright";
import RecordLayer from "@/components/RecordLayer"; import RecordLayer from "@/components/RecordLayer";
export default { export default {
name: "GoodsList", name: "GoodsList",
components: { components: {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</div> </div>
<cr-row class="ai-test-cell" type="flex" align="center"> <cr-row class="ai-test-cell" type="flex" align="center">
<cr-col span="5" class="ai-test-cell-image"> <cr-col span="5" class="ai-test-cell-image">
<cr-image width="60px" height="68px" src="@/assets/goods/ai-mongo.png" /> <cr-image width="60px" height="68px" src="@/assets/images/goods/ai-mongo.png" />
</cr-col> </cr-col>
<div class="ai-test-cell-title"> <div class="ai-test-cell-title">
<h5>智能<span>风险测评</span></h5> <h5>智能<span>风险测评</span></h5>
......
...@@ -97,10 +97,10 @@ ...@@ -97,10 +97,10 @@
</template> </template>
<script> <script>
import GoodList from "@/components/GoodList/index"; import GoodList from "@/components/GoodList/index";
import good01 from "@/assets/goods/goods-01.png"; import good01 from "@/assets/images/goods/goods-01.png";
import good02 from "@/assets/goods/goods-02.png"; import good02 from "@/assets/images/goods/goods-02.png";
import good03 from "@/assets/goods/goods-03.png"; import good03 from "@/assets/images/goods/goods-03.png";
import good04 from "@/assets/goods/goods-04.png"; import good04 from "@/assets/images/goods/goods-04.png";
import Tabbar from "@/components/Tabbar"; import Tabbar from "@/components/Tabbar";
const goodsList = [ const goodsList = [
......
...@@ -25,11 +25,6 @@ ...@@ -25,11 +25,6 @@
} }
&-form { &-form {
padding: 0 @padding-md; padding: 0 @padding-md;
.svg-icon {
height: 16px;
width: 16px;
align-self: center;
}
.radio-btn { .radio-btn {
width: 100%; width: 100%;
justify-content: start; justify-content: start;
...@@ -86,3 +81,35 @@ ...@@ -86,3 +81,35 @@
.form-unit { .form-unit {
color: @black; color: @black;
} }
.pay&-protocol {
margin-bottom: 8px;
&-tip {
font-size: @font-size-12;
color: @gray-4;
line-height: @line-height-lg;
margin: 15px 0 10px;
display: flex;
justify-content: space-between;
}
&-link {
a {
font-size: @font-size-12;
vertical-align: middle;
}
i {
display: inline-block;
width: 0;
height: 12px;
border-right: 1px @blue solid;
vertical-align: middle;
margin: 0 2px;
}
&_wrap {
a {
display: block;
margin-top: 8px;
}
}
}
}
\ No newline at end of file
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
<template #input> <template #input>
<popup-area-picker v-model="formData.text" placeholder="请选择投保人居住省市" /> <popup-area-picker v-model="formData.text" placeholder="请选择投保人居住省市" />
</template> </template>
<svg-icon icon-class="triangle-right" slot="button" />
</cr-field> </cr-field>
<cr-field <cr-field
v-model="formData.text" v-model="formData.text"
...@@ -73,7 +72,6 @@ ...@@ -73,7 +72,6 @@
placeholder="请选择投保人职业" placeholder="请选择投保人职业"
/> />
</template> </template>
<svg-icon icon-class="triangle-right" slot="button" />
</cr-field> </cr-field>
<cr-field <cr-field
v-model="formData.text" v-model="formData.text"
...@@ -94,7 +92,6 @@ ...@@ -94,7 +92,6 @@
<template #input> <template #input>
<popup-date-picker v-model="formData.text" placeholder="请选择您的证件有效止期" /> <popup-date-picker v-model="formData.text" placeholder="请选择您的证件有效止期" />
</template> </template>
<svg-icon icon-class="triangle-right" slot="button" />
</cr-field> </cr-field>
</cr-cell-group> </cr-cell-group>
<cr-cell-group title="被保人信息"> <cr-cell-group title="被保人信息">
...@@ -164,15 +161,14 @@ ...@@ -164,15 +161,14 @@
:rules="[{ require: true, message: '请输入投保人年收入' }]" :rules="[{ require: true, message: '请输入投保人年收入' }]"
/> />
<cr-field <cr-field
v-model="formMaskData.text"
name="selfName" name="selfName"
label="居住省市" label="居住省市"
readonly readonly
placeholder="请选择投保人居住省市"
:rules="[{ require: true, message: '请选择投保人居住省市' }]" :rules="[{ require: true, message: '请选择投保人居住省市' }]"
@click.native="handleShowAreaPopup(true)"
> >
<svg-icon icon-class="triangle-right" slot="button" /> <template #input>
<popup-area-picker v-model="formData.text" placeholder="请选择投保人居住省市" />
</template>
</cr-field> </cr-field>
<cr-field <cr-field
v-model="formData.text" v-model="formData.text"
...@@ -182,15 +178,17 @@ ...@@ -182,15 +178,17 @@
:rules="[{ require: true, message: '请输入居住详细地址' }]" :rules="[{ require: true, message: '请输入居住详细地址' }]"
/> />
<cr-field <cr-field
v-model="formData.text"
name="selfName" name="selfName"
label="职业" label="职业"
readonly
placeholder="请选择投保人职业"
:rules="[{ require: true, message: '请选择投保人职业' }]" :rules="[{ require: true, message: '请选择投保人职业' }]"
@click.native="handleShowAreaPopup(true)"
> >
<svg-icon icon-class="triangle-right" slot="button" /> <template #input>
<popup-picker
:picker-data="['老师', '工人']"
v-model="formData.text"
placeholder="请选择投保人职业"
/>
</template>
</cr-field> </cr-field>
<cr-field <cr-field
v-model="formData.text" v-model="formData.text"
...@@ -203,15 +201,14 @@ ...@@ -203,15 +201,14 @@
</template> </template>
</cr-field> </cr-field>
<cr-field <cr-field
v-model="formData.text"
name="selfName" name="selfName"
label="有效期至" label="有效期至"
readonly readonly
placeholder="请选择您的证件有效止期"
:rules="[{ require: true, message: '请选择您的证件有效止期' }]" :rules="[{ require: true, message: '请选择您的证件有效止期' }]"
@click.native="handleShowAreaPopup(true)"
> >
<svg-icon icon-class="triangle-right" slot="button" /> <template #input>
<popup-date-picker v-model="formData.text" placeholder="请选择您的证件有效止期" />
</template>
</cr-field> </cr-field>
</cr-cell-group> </cr-cell-group>
<cr-cell-group title="保障方案"> <cr-cell-group title="保障方案">
...@@ -275,7 +272,25 @@ ...@@ -275,7 +272,25 @@
v-model="goInsureState" v-model="goInsureState"
:title="headerInfo.title" :title="headerInfo.title"
:pay-data="goodBuyModalInfo" :pay-data="goodBuyModalInfo"
/> >
<div class="pay-protocol">
<div class="pay-protocol-tip"><span>投保前请阅读</span><span>*不犹豫期免费退保</span></div>
<div class="pay-protocol-link">
<a href="javascript:;" @click="openIframePupop(0)">保险条款</a>
<i></i>
<a href="javascript:;" @click="openIframePupop(2)">投保须知与声明</a>
<i></i>
<a href="javascript:;" @click="openIframePupop(3)">服务协议</a>
<i></i>
<a href="javascript:;" @click="openIframePupop(1)">转账授权书</a>
</div>
<div class="pay-protocol-link pay-protocol-link_wrap">
<a href="javascript:;" @click="openIframePupop(3)">人身保险投保提示书</a>
<a href="javascript:;" @click="openIframePupop(3)">税收居民身份证明</a>
<a href="javascript:;" @click="openIframePupop(3)">风控查询授权书</a>
</div>
</div>
</go-insure-dialog>
</div> </div>
</template> </template>
...@@ -344,6 +359,7 @@ export default { ...@@ -344,6 +359,7 @@ export default {
methods: { methods: {
onFormSubmit(values) { onFormSubmit(values) {
console.log("submit", values); console.log("submit", values);
this.goInsureState = true;
}, },
onFormFailed(errorInfo) { onFormFailed(errorInfo) {
const { errors } = errorInfo; const { errors } = errorInfo;
......
<template> <template>
<div class="container"> <div class="container">
<cr-button block type="danger" @click="login">登录</cr-button> <cr-button block type="danger" @click="login" v-if="!mongoToken">登录</cr-button>
<cr-divider /> <cr-divider />
<cr-button block>生成订单(微信JSAPI支付)</cr-button> <cr-button block @click="generateOrder('JSAPI')">生成订单(微信JSAPI支付)</cr-button>
<cr-button block>生成订单(微信H5支付)</cr-button> <cr-button block @click="generateOrder('MWEB')">生成订单(微信H5支付)</cr-button>
<cr-button block>生成订单(第三方收银台支付)</cr-button> <cr-button block @click="generateOrder('THRID')">生成订单(第三方收银台支付)</cr-button>
<cr-divider /> <cr-divider />
<cr-button type="warning" block>调起支付</cr-button> <cr-button type="warning" block @click="goPay">调起支付</cr-button>
<cr-divider /> <cr-divider />
<div class="state"> <div class="state">
<h5>基本信息:</h5> <h5>基本信息:</h5>
<p>当前环境:{{ browerEnv }}</p> <p>当前环境:{{ browerEnv }}</p>
<p>登录状态:{{ !!mongoToken }}</p> <p>登录状态:{{ !!mongoToken }}</p>
<p v-if="browerEnv === 'weixin'">微信code获取状态:</p> <p>支付方式:{{ tradeType }}</p>
<p>支付支付状态:{{ payState }}</p>
<p v-if="browerEnv === 'weixin'">微信openId:{{ openId }}</p>
<cr-divider /> <cr-divider />
<h5>登录信息:</h5> <h5>登录信息:</h5>
<p v-for="(item, key) in loginInfo" :key="key">{{ key }}: {{ item }}</p> <p v-for="(item, key) in loginInfo" :key="key">{{ key }}: {{ item }}</p>
...@@ -40,14 +42,17 @@ ...@@ -40,14 +42,17 @@
* @return: * @return:
*/ */
import { loginByPhone, getwxOpenId } from "@/api/user"; import { loginByPhone, getwxOpenId } from "@/api/user";
import { placeOrder } from "@/api/order";
import cfg from "@/config"; import cfg from "@/config";
import { payByWay } from "@/service/pay.service";
let pollTimer = null;
export default { export default {
name: "paytest", name: "paytest",
data() { data() {
return { return {
browerEnv: "", browerEnv: "",
xyqbToken: "", xyqbToken: "",
mongoToken: "", mongoToken: localStorage.getItem("mongoToken"),
loginInfo: { loginInfo: {
phoneNo: "18611428880", phoneNo: "18611428880",
verifyCode: "123456", verifyCode: "123456",
...@@ -100,17 +105,30 @@ export default { ...@@ -100,17 +105,30 @@ export default {
autoRenewPolicy: true autoRenewPolicy: true
}, },
orderInfo: {}, orderInfo: {},
tradeType: "",
openId: localStorage.getItem("openId"), openId: localStorage.getItem("openId"),
payInfo: {} payInfo: {},
payState: "未支付",
payBack: 0 // 0未调起支付,1已调起支付
}; };
}, },
mounted() { mounted() {
this.getCurrentBrowerEnv(); this.getCurrentBrowerEnv();
this.payBack = this.$route.query.state;
if (this.payBack) {
const { payOrderNo, payType, tradeType, orderNo } = this.$route.query;
this.orderInfo = { payOrderNo, payType, orderNo };
this.tradeType = tradeType;
this.getPayState();
}
},
destroyed() {
clearTimeout(pollTimer);
}, },
methods: { methods: {
async login() { async login() {
const res = await loginByPhone(this.loginInfo); const res = await loginByPhone(this.loginInfo);
if (res.code === 0) { if (res.code === "0") {
this.mongoToken = res.data.token; this.mongoToken = res.data.token;
localStorage.setItem("mongoToken", res.data.token); localStorage.setItem("mongoToken", res.data.token);
} }
...@@ -130,7 +148,7 @@ export default { ...@@ -130,7 +148,7 @@ export default {
if (this.openId) return; if (this.openId) return;
const code = this.$route.query.code; const code = this.$route.query.code;
const res = await getwxOpenId({ code, appId: cfg.wxAppId }); const res = await getwxOpenId({ code, appId: cfg.wxAppId });
if (res.code === 0) { if (res.code === "0") {
this.openId = res.data.openId; this.openId = res.data.openId;
localStorage.setItem("openId", res.data.openId); localStorage.setItem("openId", res.data.openId);
} }
...@@ -142,6 +160,64 @@ export default { ...@@ -142,6 +160,64 @@ export default {
let val = JSON.stringify(txt); let val = JSON.stringify(txt);
val = val.replace(/[{},]/g, "<br />").replace(/"/g, ""); val = val.replace(/[{},]/g, "<br />").replace(/"/g, "");
return val; return val;
},
async generateOrder(tradeType) {
if (!this.mongoToken) {
this.$toast("请登录");
return;
}
this.tradeType = tradeType;
const res = await placeOrder.create(this.insuredOrderInfo);
if (res.code === "0") {
this.orderInfo = res.data;
}
},
async goPay() {
const { payOrderNo, payType } = this.orderInfo;
const { tradeType, orderInfo } = this;
if (!payOrderNo) {
this.$toast("请先生成订单");
return;
}
const res = await placeOrder.pay({ payOrderNo, payType, tradeType });
if (res.code === "0") {
let payInfo = {
url: res.data.payUrl,
params: {
...orderInfo,
tradeType,
state: 1
}
};
if (tradeType === "JSAPI") {
payInfo = res.data.payInfo;
payInfo.appId = cfg.wxAppId;
}
payByWay(tradeType, payInfo).then(() => {
this.payBack = 1;
});
}
},
getPayState() {
pollTimer = setTimeout(() => {
const { payOrderNo, payType } = this.orderInfo;
placeOrder.polling({ payOrderNo, payType }).then(res => {
if (res.code === "0") {
const { result, payState } = res.data;
if (result) {
this.$toast("支付成功");
this.payState = "支付成功";
return;
} else if (payState) {
this.payState = "支付中。。。";
this.getPayState();
} else {
this.payState = "支付失败";
return;
}
}
});
}, 3000);
} }
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment