Blame view

src/views/service/insureDetail.vue 4.2 KB
c4b8bb3c   刘淇   黄石保险服务
1
  <template>
d4009a7c   刘淇   黄石保险服务
2
3
4
5
6
7
8
9
    <div style="padding: 0 10px">
  
      <div class="first-header-class">
        <swiper  height="150px" dots-position="center" :loop="true" :auto="true" :show-dots="false">
          <swiper-item v-for="(item,index) in  companyData.imgList" :key="index" >
            <img :src="item" class="img-class-all" />
          </swiper-item>
        </swiper>
c4b8bb3c   刘淇   黄石保险服务
10
      </div>
d4009a7c   刘淇   黄石保险服务
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
  
  
      <!--<flexbox>-->
        <!--<flexbox-item v-for="i in companyData.imgList">-->
          <!--<div class="flex-demo">-->
            <!--<img :src="i" alt="">-->
          <!--</div>-->
        <!--</flexbox-item>-->
        <!--&lt;!&ndash;<flexbox-item>&ndash;&gt;-->
          <!--&lt;!&ndash;<div class="flex-demo">&ndash;&gt;-->
            <!--&lt;!&ndash;<img src="../../assets/images/service/insure2.png" alt="">&ndash;&gt;-->
          <!--&lt;!&ndash;</div>&ndash;&gt;-->
        <!--&lt;!&ndash;</flexbox-item>&ndash;&gt;-->
        <!--&lt;!&ndash;<flexbox-item>&ndash;&gt;-->
          <!--&lt;!&ndash;<div class="flex-demo">&ndash;&gt;-->
            <!--&lt;!&ndash;<img src="../../assets/images/service/insure3.png" alt="">&ndash;&gt;-->
          <!--&lt;!&ndash;</div>&ndash;&gt;-->
        <!--&lt;!&ndash;</flexbox-item>&ndash;&gt;-->
      <!--</flexbox>-->
  
  
      <p style="margin-top: 15px;">{{companyData.companyName}}</p>
      <p>{{companyData.serviceCommitment}}</p>
      <p>公司地址:{{companyData.companyAddress}}</p>
      <p>电话:{{companyData.contactTel}}</p>
  
  
      <p style="margin: 40px 0 20px;color: red;text-align: center">
        若有业务咨询,请预留电话,客服人员会尽快联系到您
      </p>
  
      <!--<x-input title="手机号码格式化" mask="999 9999 9999" v-model="maskValue" :max="13" is-type="china-mobile"></x-input>-->
  
      <group title=" ">
        <x-input v-model="phoneValue" title="手机号码" name="mobile" placeholder="请输入手机号码" keyboard="number"
                 is-type="china-mobile"></x-input>
      </group>
  
      <x-button type="primary" style="margin-top: 20px" @click.native="submitPhone">确定</x-button>
    </div>
c4b8bb3c   刘淇   黄石保险服务
51
52
53
  </template>
  
  <script>
d4009a7c   刘淇   黄石保险服务
54
55
  import { queryInsuranceCompanyInfo, saveInsuranceCompanyInfo } from "@/api/service/service.js";
  import { Toast } from "mint-ui";
c4b8bb3c   刘淇   黄石保险服务
56
57
  export default {
    name: "insureDetail",
d4009a7c   刘淇   黄石保险服务
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    data() {
      return {
        phoneValue: "",
        companyData: {}
      };
    },
    created() {
      let id = this.$route.query.id;
      console.log(id);
      this.queryInsuranceCompanyInfo(id);
    },
    methods: {
      queryInsuranceCompanyInfo: function(_id) {
        let salt = this.$utils.myCommonSalt(32);
        let jsondata = {
          app_id: this.$utils.myVarAppid,
          deviceInfo: this.$utils.myDeviceInfo,
          salt: salt,
          sign_type: "md5",
          orgId: this.$utils.myOrgId,
          id: _id
        };
        jsondata.sign = this.$utils.signObject(jsondata);
        queryInsuranceCompanyInfo(jsondata).then(response => {
          console.log(response);
          this.companyData = response.data;
        });
      },
      submitPhone: function() {
        console.log(this.phoneValue);
        // console.log(this.$utils.testPhone(this.phoneValue))
        let reg = /^1[0-9]{10}$/;
        if (this.phoneValue == "" || this.phoneValue.length <= 10 || !reg.test(this.phoneValue)) {
          Toast("请输入正确的手机号");
          return false;
        }
        let salt = this.$utils.myCommonSalt(32);
        let jsondata = {
          app_id: this.$utils.myVarAppid,
          deviceInfo: this.$utils.myDeviceInfo,
          salt: salt,
          sign_type: "md5",
          orgId: this.$utils.myOrgId,
          companyNo: this.companyData.companyNo,
          companyName: this.companyData.companyName,
          userTel: this.phoneValue
        };
        jsondata.sign = this.$utils.signObject(jsondata);
        saveInsuranceCompanyInfo(jsondata).then(response => {
          console.log(response);
          if(response.code == 0){
            Toast("联系方式提交成功");
          }
  
        });
c4b8bb3c   刘淇   黄石保险服务
113
114
115
116
117
118
      }
    }
  };
  </script>
  
  <style scoped lang="scss">
d4009a7c   刘淇   黄石保险服务
119
120
121
122
123
124
125
126
    .first-header-class{
      img{
        img {
          width: 100%;
          height: 100%;
        }
      }
    }
c4b8bb3c   刘淇   黄石保险服务
127
128
129
130
131
132
133
    .flex-demo {
      text-align: center;
      color: #fff;
      background-color: #20b907;
      border-radius: 4px;
      background-clip: padding-box;
      height: 100px;
d4009a7c   刘淇   黄石保险服务
134
      img {
c4b8bb3c   刘淇   黄石保险服务
135
136
137
138
139
        width: 100%;
        height: 100%;
      }
    }
  </style>