Commit d4009a7c48d9d76f7d1cfc656e5a26e9b467ca61

Authored by 刘淇
1 parent c4b8bb3c

黄石保险服务

src/api/service/service.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +// 1 获取列表
  4 +export function queryInsuranceCompanyList(params) {
  5 + return request({
  6 + url: 'insuranceCompany/queryInsuranceCompanyList',
  7 + method: 'post',
  8 + data: params
  9 + })
  10 +}
  11 +
  12 +// 1 详情
  13 +export function queryInsuranceCompanyInfo(params) {
  14 + return request({
  15 + url: 'insuranceCompany/queryInsuranceCompanyInfo',
  16 + method: 'post',
  17 + data: params
  18 + })
  19 +}
  20 +
  21 +
  22 +// 1 保存手机
  23 +export function saveInsuranceCompanyInfo(params) {
  24 + return request({
  25 + url: 'insuranceCompany/saveInsuranceCompanyInfo',
  26 + method: 'post',
  27 + data: params
  28 + })
  29 +}
  30 +
  31 +
  32 +// 获取美食店铺列表
  33 +export function queryInsuranceShopList(params) {
  34 + return request({
  35 + url: 'insuranceShop/queryInsuranceShopList',
  36 + method: 'post',
  37 + data: params
  38 + })
  39 +}
  40 +
  41 +
  42 +// 获取美食店铺详情
  43 +export function queryInsuranceShopInfo (params) {
  44 + return request({
  45 + url: 'insuranceShop/queryInsuranceShopInfo ',
  46 + method: 'post',
  47 + data: params
  48 + })
  49 +}
  50 +
  51 +
  52 +
  53 +
src/assets/images/service/foodIcon.png 0 → 100644

2.45 KB

src/router/index.js
@@ -276,6 +276,18 @@ export default new Router({ @@ -276,6 +276,18 @@ export default new Router({
276 }, 276 },
277 277
278 { 278 {
  279 + path: '/foodService',
  280 + name: 'foodService',
  281 + component: () => import("@/views/service/foodService.vue"),
  282 + meta:{
  283 + title:'周边美食'
  284 + }
  285 + },
  286 +
  287 +
  288 +
  289 +
  290 + {
279 path: '/insureDetail', 291 path: '/insureDetail',
280 name: 'insureDetail', 292 name: 'insureDetail',
281 component: () => import("@/views/service/insureDetail.vue"), 293 component: () => import("@/views/service/insureDetail.vue"),
src/utils/request.js
@@ -5,7 +5,7 @@ import axios from 'axios' @@ -5,7 +5,7 @@ import axios from 'axios'
5 const service = axios.create({ 5 const service = axios.create({
6 // http://dev.renniting.cn/pay/ 赤峰测试 6 // http://dev.renniting.cn/pay/ 赤峰测试
7 // http://pay.service.renniting.cn/ 赤峰 7 // http://pay.service.renniting.cn/ 赤峰
8 - baseURL: 'http://pay.service.renniting.cn/', // url = base url + request url 8 + baseURL: 'http://test.renniting.cn/pay/', // url = base url + request url
9 // withCredentials: true, // send cookies when cross-domain requests 9 // withCredentials: true, // send cookies when cross-domain requests
10 timeout: 6000 // request timeout 10 timeout: 6000 // request timeout
11 }) 11 })
src/utils/utils.js
1 import md5 from "./md5.min.js"; 1 import md5 from "./md5.min.js";
  2 +import { Toast } from 'mint-ui';
2 export default { 3 export default {
3 myCommonSalt: function(val) { // 获取盐值 4 myCommonSalt: function(val) { // 获取盐值
4 let len = parseInt(val); 5 let len = parseInt(val);
@@ -11,6 +12,21 @@ export default { @@ -11,6 +12,21 @@ export default {
11 console.log(pwd); 12 console.log(pwd);
12 return pwd; 13 return pwd;
13 }, 14 },
  15 +
  16 + testPhone : (resPhone) => {
  17 + console.log(resPhone, "resPhone")
  18 + const reg = /^1[3|4|5|7|8|9][0-9]d{8}$/;
  19 + if (resPhone == "" || resPhone == undefined || resPhone == null || resPhone.length == 0) {
  20 + Toast("手机号不能为空");
  21 + return false
  22 + } else if (reg.test(resPhone)) {
  23 + Toast("正确");
  24 + return true
  25 + } else {
  26 + Toast("手机号格式不正确");
  27 + return false
  28 + }
  29 + },
14 formatDate: function(secs, type = 0) { //type是可选参数,因为json中时间的格式是year-month-date,不能识别XX年XX月XX日 30 formatDate: function(secs, type = 0) { //type是可选参数,因为json中时间的格式是year-month-date,不能识别XX年XX月XX日
15 var t = new Date(secs); 31 var t = new Date(secs);
16 var year = t.getFullYear(); 32 var year = t.getFullYear();
src/views/service/foodService.vue 0 → 100644
  1 +<template>
  2 + <div>
  3 + <div style="height: 44px;">
  4 + <mt-search
  5 + v-model="value"
  6 + cancel-text="取消"
  7 + placeholder="搜索">
  8 + </mt-search>
  9 + </div>
  10 +
  11 + <group title="" label-width="5em">
  12 + <popup-picker :title="title1" :data="list1" v-model="value1" @on-show="onShow" @on-hide="onHide" @on-change="onChange" placeholder="请选择"></popup-picker>
  13 + <popup-picker :title="title2" :data="list2" v-model="value2" @on-show="onShow" @on-hide="onHide" @on-change="onChange" placeholder="请选择"></popup-picker>
  14 + </group>
  15 + <ul class="serviceDetailWrap" v-if="dataList.length>0">
  16 + <li v-for="(i, index) in dataList" :key="i.id">
  17 + <div class="serviceDetailTop serviceDetailTop1" :style="{'background-image':'url('+i.logoUrl+')'}">
  18 + <p>
  19 + <span style="color: #ffbe00;font-weight: 600;font-size: 16px;">{{i.shopName}}</span>
  20 + </p>
  21 + <p style="padding: 8px 0">
  22 + <span style="color: #ff4949">营业时间:{{i.workTime}}</span>
  23 + </p>
  24 + <!--<p>-->
  25 + <!--<span>联系人:{{i.contactPerson}}</span>-->
  26 + <!--</p>-->
  27 + <p>
  28 +
  29 + <span>联系电话:{{i.contactTel}}</span>
  30 +
  31 + </p>
  32 + </div>
  33 + <p style="display: flex;justify-content: space-between;">
  34 + <span class="fontSize12">位置:{{i.shopAddress}}</span>
  35 + <span @click="toLinkApp(i.lonId,i.latId,i.shopName)">
  36 + <img src="../../assets/images/service/serviceNav.png" height="18" width="18"/>
  37 + </span>
  38 + </p>
  39 +
  40 + <!--<p>-->
  41 + <!--<span class="fontSize12">服务范围:{{i.mainBusines}}</span>-->
  42 + <!--</p>-->
  43 + <!--<p>-->
  44 + <!--<span></span>-->
  45 + <!--</p>-->
  46 + <p style="display: flex;justify-content: space-between;padding-top: 5px;">
  47 + <span class="serviceStar fontSize12">{{i.serviceFeatures}}</span>
  48 + <span @click="callPhone(i.contactTel)">
  49 + <img src="../../assets/images/service/serviceIphone.png" height="18" width="18"/>
  50 + </span>
  51 + </p>
  52 +
  53 + <!--<p style="display: flex;justify-content: space-between;padding-top: 5px;" @click="toInsureDetail(i.id)">-->
  54 + <!--<span class=" fontSize12">查看详情</span>-->
  55 + <!--<span>-->
  56 + <!--<img src="../../assets/images/service/rightArrow.png" height="16" width="16"/>-->
  57 + <!--</span>-->
  58 + <!--</p>-->
  59 + </li>
  60 +
  61 +
  62 + <!--<li>-->
  63 + <!--<div class="serviceDetailTop serviceDetailTop2">-->
  64 + <!--<p>-->
  65 + <!--<span style="color: #ffbe00;font-weight: 600;font-size: 16px;">途虎养车磁湖东路店</span>-->
  66 + <!--</p>-->
  67 + <!--<p>-->
  68 + <!--<span style="color: #ff4949">营业时间:08:00-21:00</span>-->
  69 + <!--</p>-->
  70 + <!--<p>-->
  71 + <!--<span>联系人:梁浩</span>-->
  72 + <!--</p>-->
  73 + <!--<p>-->
  74 +
  75 + <!--<span>联系电话:13339906728</span>-->
  76 +
  77 + <!--</p>-->
  78 + <!--</div>-->
  79 + <!--<p style="display: flex;justify-content: space-between;">-->
  80 + <!--<span class="fontSize12">位置: 黄石西塞山区磁湖东路26号途虎养车</span>-->
  81 + <!--<span @click="toLinkApp('115.089421','30.211496','途虎养车磁湖东路店')">-->
  82 + <!--<img src="../../assets/images/service/serviceNav.png" height="18" width="18"/>-->
  83 + <!--</span>-->
  84 + <!--</p>-->
  85 +
  86 + <!--<p>-->
  87 + <!--<span class="fontSize12">服务范围:轮胎更换,美容洗车,车品安装</span>-->
  88 + <!--</p>-->
  89 + <!--&lt;!&ndash;<p>&ndash;&gt;-->
  90 + <!--&lt;!&ndash;<span></span>&ndash;&gt;-->
  91 + <!--&lt;!&ndash;</p>&ndash;&gt;-->
  92 + <!--<p style="display: flex;justify-content: space-between;padding-top: 5px;">-->
  93 + <!--<span class="serviceStar fontSize12">维修、保养、美容</span>-->
  94 + <!--<span @click="callPhone('13339906728')">-->
  95 + <!--<img src="../../assets/images/service/serviceIphone.png" height="18" width="18"/>-->
  96 + <!--</span>-->
  97 + <!--</p>-->
  98 + <!--</li>-->
  99 +
  100 +
  101 + </ul>
  102 + <p v-else style="padding-top: 20px">暂无数据</p>
  103 + </div>
  104 +</template>
  105 +
  106 +<script>
  107 +
  108 +import { queryInsuranceShopList } from '@/api/service/service.js'
  109 +
  110 +export default {
  111 + name: "foodService",
  112 + data () {
  113 + return {
  114 + value:'',
  115 + title1: '全部服务',
  116 + value1: ['全部'],
  117 + list1: [['全部', '餐厅', '酒吧']],
  118 + title2: '附近',
  119 + value2: ['3KM'],
  120 + list2: [['3KM', '10KM', '20KM']],
  121 + dataList:[],
  122 + }
  123 + },
  124 + mounted() {
  125 + window.toLinkApp = this.toLinkApp;
  126 + window.callPhone = this.callPhone;
  127 +
  128 + },
  129 + created() {
  130 + this.queryInsuranceShopList()
  131 + },
  132 + methods: {
  133 + queryInsuranceShopList(){ // 获取停车记录数据
  134 + var salt = this.$utils.myCommonSalt(32);
  135 + var jsondata = {
  136 + app_id: this.$utils.myVarAppid,
  137 + deviceInfo: this.$utils.myDeviceInfo,
  138 + salt: salt,
  139 + sign_type: "md5",
  140 + orgId: this.$utils.myOrgId,
  141 + companyName: "",
  142 + companyNo: "",
  143 + id: "",
  144 + latId: "",
  145 + lonId: "",
  146 + raidus: "",
  147 + servicesType: "",
  148 +
  149 + }
  150 + jsondata.sign = this.$utils.signObject(jsondata)
  151 +
  152 + // jsondata.sign = md5sign
  153 + queryInsuranceShopList(jsondata).then(response => {
  154 + console.log(response)
  155 + this.dataList = response.data
  156 +
  157 + })
  158 + },
  159 + callPhone(telNum) {
  160 + var u = navigator.userAgent,
  161 + app = navigator.appVersion;
  162 + var isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1;
  163 + var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
  164 + if (isAndroid) {
  165 + // alert("我是安卓");
  166 + window.JSInterface.callAppPhone(telNum);
  167 + }
  168 + if (isIOS) {
  169 + // alert("我是苹果");
  170 + window.webkit.messageHandlers.callAppPhone.postMessage({ "phoneNumber": telNum})
  171 + }
  172 + },
  173 + toLinkApp(lon,lat,name){
  174 + var u = navigator.userAgent,
  175 + app = navigator.appVersion;
  176 + var isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1;
  177 + var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
  178 + if (isAndroid) {
  179 + // alert("我是安卓");
  180 + window.JSInterface.toApp(lon,lat,name);
  181 + }
  182 + if (isIOS) {
  183 + // alert("我是苹果");
  184 + window.webkit.messageHandlers.toApp.postMessage({ "lon": lon, "lat": lat, "name":name})
  185 + }
  186 +
  187 + },
  188 + toInsureDetail(_id){
  189 + this.$router.push(
  190 + {
  191 + path:'insureDetail',
  192 + query: {
  193 + id: _id
  194 + }
  195 + })
  196 + },
  197 + onChange (val) {
  198 + console.log('val change', val)
  199 + },
  200 + changeList10 () {
  201 + this.list1 = [['小米1', 'iPhone1', '华为1', '情怀1', '三星1', '其他1', '不告诉你1']]
  202 + },
  203 + changeList11 () {
  204 + this.list1[0].push('我是push条目')
  205 + },
  206 + changeList20 () {
  207 +
  208 + },
  209 +
  210 + onShow () {
  211 + console.log('on show')
  212 + },
  213 + onHide (type) {
  214 + console.log('on hide', type)
  215 + }
  216 + },
  217 +}
  218 +</script>
  219 +
  220 +<style scoped lang="scss">
  221 + .serviceDetailWrap {
  222 + padding: 10px 10px;
  223 + > li {
  224 + /*height: 160px;*/
  225 + padding-bottom: 10px;
  226 + margin-bottom: 10px;
  227 + border-bottom: 1px solid #eee;
  228 + /*display: flex;*/
  229 + }
  230 + }
  231 +
  232 + .serviceDetailTop {
  233 + padding-left: 130px;
  234 +
  235 + margin-bottom: 5px;
  236 + background-repeat: no-repeat;
  237 + background-size: 120px 83px;
  238 + }
  239 +
  240 + .serviceStar{
  241 + padding-left: 20px;
  242 + background: url("../../assets/images/service/serviceStar.png") no-repeat 0 center;
  243 + background-size: 16px 16px;
  244 + color: #ff4949;
  245 + }
  246 + .fontSize12{
  247 + font-size: 13px;
  248 + }
  249 +</style>
src/views/service/insure.vue
@@ -12,45 +12,45 @@ @@ -12,45 +12,45 @@
12 <popup-picker :title="title1" :data="list1" v-model="value1" @on-show="onShow" @on-hide="onHide" @on-change="onChange" placeholder="请选择"></popup-picker> 12 <popup-picker :title="title1" :data="list1" v-model="value1" @on-show="onShow" @on-hide="onHide" @on-change="onChange" placeholder="请选择"></popup-picker>
13 <popup-picker :title="title2" :data="list2" v-model="value2" @on-show="onShow" @on-hide="onHide" @on-change="onChange" placeholder="请选择"></popup-picker> 13 <popup-picker :title="title2" :data="list2" v-model="value2" @on-show="onShow" @on-hide="onHide" @on-change="onChange" placeholder="请选择"></popup-picker>
14 </group> 14 </group>
15 - <ul class="serviceDetailWrap">  
16 - <li>  
17 - <div class="serviceDetailTop serviceDetailTop1"> 15 + <ul class="serviceDetailWrap" v-if="dataList.length>0">
  16 + <li v-for="(i, index) in dataList" :key="i.id">
  17 + <div class="serviceDetailTop serviceDetailTop1" :style="{'background-image':'url('+i.logoUrl+')'}">
18 <p> 18 <p>
19 - <span style="color: #ffbe00;font-weight: 600;font-size: 16px;">大家财险黄石中心支公司</span> 19 + <span style="color: #ffbe00;font-weight: 600;font-size: 16px;">{{i.companyName}}</span>
20 </p> 20 </p>
21 - <p>  
22 - <span style="color: #ff4949">营业时间:08:00-18:00</span> 21 + <p style="padding: 8px 0">
  22 + <span style="color: #ff4949">营业时间:{{i.workTime}}</span>
23 </p> 23 </p>
24 <!--<p>--> 24 <!--<p>-->
25 <!--<span>联系人:余红艳</span>--> 25 <!--<span>联系人:余红艳</span>-->
26 <!--</p>--> 26 <!--</p>-->
27 <p> 27 <p>
28 28
29 - <span>热线电话:95569</span> 29 + <span>热线电话:{{i.reportTel}}</span>
30 30
31 </p> 31 </p>
32 </div> 32 </div>
33 <p style="display: flex;justify-content: space-between;"> 33 <p style="display: flex;justify-content: space-between;">
34 - <span class="fontSize12">位置: 黄石港区杭州路19号儿童公园加油站旁</span>  
35 - <span @click="toLinkApp('115.086987','30.217836','大家财险黄石中心支公司')">  
36 - <img src="../../assets/images/service/serviceNav.png" height="18" width="18"/>  
37 - </span> 34 + <span class="fontSize12">位置:{{i.companyAddress}}</span>
  35 + <!--<span @click="toLinkApp(i.lonId,i.latId,i.companyName)">-->
  36 + <!--<img src="../../assets/images/service/serviceNav.png" height="18" width="18"/>-->
  37 + <!--</span>-->
38 </p> 38 </p>
39 39
40 - <p>  
41 - <span class="fontSize12">服务范围:车险,意外险</span>  
42 - </p> 40 + <!--<p>-->
  41 + <!--<span class="fontSize12">服务范围:{{i.mainBusines}}</span>-->
  42 + <!--</p>-->
43 <!--<p>--> 43 <!--<p>-->
44 <!--<span></span>--> 44 <!--<span></span>-->
45 <!--</p>--> 45 <!--</p>-->
46 <p style="display: flex;justify-content: space-between;padding-top: 5px;"> 46 <p style="display: flex;justify-content: space-between;padding-top: 5px;">
47 - <span class="serviceStar fontSize12">专业贴膜</span>  
48 - <span @click="callPhone('13971750760')"> 47 + <span class="serviceStar fontSize12">{{i.mainBusines}}</span>
  48 + <span @click="callPhone(i.reportTel)">
49 <img src="../../assets/images/service/serviceIphone.png" height="18" width="18"/> 49 <img src="../../assets/images/service/serviceIphone.png" height="18" width="18"/>
50 </span> 50 </span>
51 </p> 51 </p>
52 52
53 - <p style="display: flex;justify-content: space-between;padding-top: 5px;" @click="toInsureDetail"> 53 + <p style="display: flex;justify-content: space-between;padding-top: 5px;" @click="toInsureDetail(i.id)">
54 <span class=" fontSize12">查看详情</span> 54 <span class=" fontSize12">查看详情</span>
55 <span> 55 <span>
56 <img src="../../assets/images/service/rightArrow.png" height="16" width="16"/> 56 <img src="../../assets/images/service/rightArrow.png" height="16" width="16"/>
@@ -98,16 +98,15 @@ @@ -98,16 +98,15 @@
98 <!--</li>--> 98 <!--</li>-->
99 99
100 100
101 -  
102 -  
103 -  
104 -  
105 -  
106 </ul> 101 </ul>
  102 + <p v-else style="padding-top: 20px">暂无数据</p>
107 </div> 103 </div>
108 </template> 104 </template>
109 105
110 <script> 106 <script>
  107 +
  108 +import { queryInsuranceCompanyList } from '@/api/service/service.js'
  109 +
111 export default { 110 export default {
112 name: "insure", 111 name: "insure",
113 data () { 112 data () {
@@ -119,12 +118,44 @@ export default { @@ -119,12 +118,44 @@ export default {
119 title2: '附近', 118 title2: '附近',
120 value2: ['3KM'], 119 value2: ['3KM'],
121 list2: [['3KM', '10KM', '20KM']], 120 list2: [['3KM', '10KM', '20KM']],
  121 + dataList:[],
122 } 122 }
123 }, 123 },
124 mounted() { 124 mounted() {
125 window.toLinkApp = this.toLinkApp; 125 window.toLinkApp = this.toLinkApp;
  126 + window.callPhone = this.callPhone;
  127 +
  128 + },
  129 + created() {
  130 + this.queryInsuranceCompanyList(this.carNumber)
126 }, 131 },
127 methods: { 132 methods: {
  133 + queryInsuranceCompanyList(){ // 获取停车记录数据
  134 + var salt = this.$utils.myCommonSalt(32);
  135 + var jsondata = {
  136 + app_id: this.$utils.myVarAppid,
  137 + deviceInfo: this.$utils.myDeviceInfo,
  138 + salt: salt,
  139 + sign_type: "md5",
  140 + orgId: this.$utils.myOrgId,
  141 + companyName: "",
  142 + companyNo: "",
  143 + id: "",
  144 + latId: "",
  145 + lonId: "",
  146 + raidus: "",
  147 + servicesType: "",
  148 +
  149 + }
  150 + jsondata.sign = this.$utils.signObject(jsondata)
  151 +
  152 + // jsondata.sign = md5sign
  153 + queryInsuranceCompanyList(jsondata).then(response => {
  154 + console.log(response)
  155 + this.dataList = response.data
  156 +
  157 + })
  158 + },
128 callPhone(telNum) { 159 callPhone(telNum) {
129 var u = navigator.userAgent, 160 var u = navigator.userAgent,
130 app = navigator.appVersion; 161 app = navigator.appVersion;
@@ -154,8 +185,14 @@ export default { @@ -154,8 +185,14 @@ export default {
154 } 185 }
155 186
156 }, 187 },
157 - toInsureDetail(){  
158 - this.$router.push({path:'insureDetail'}) 188 + toInsureDetail(_id){
  189 + this.$router.push(
  190 + {
  191 + path:'insureDetail',
  192 + query: {
  193 + id: _id
  194 + }
  195 + })
159 }, 196 },
160 onChange (val) { 197 onChange (val) {
161 console.log('val change', val) 198 console.log('val change', val)
@@ -196,37 +233,10 @@ export default { @@ -196,37 +233,10 @@ export default {
196 padding-left: 130px; 233 padding-left: 130px;
197 234
198 margin-bottom: 5px; 235 margin-bottom: 5px;
199 - }  
200 - .serviceDetailTop1{  
201 - background-image: url("../../assets/images/service/serviceDetailTop1.jpg");  
202 - background-repeat: no-repeat;  
203 - background-size: 120px 100px;  
204 - }  
205 - .serviceDetailTop2{  
206 - background-image: url("../../assets/images/service/serviceDetailTop2.jpg");  
207 - background-repeat: no-repeat;  
208 - background-size: 120px 100px;  
209 - }  
210 - .serviceDetailTop3{  
211 - background-image: url("../../assets/images/service/serviceDetailTop3.jpg");  
212 - background-repeat: no-repeat;  
213 - background-size: 120px 100px;  
214 - }  
215 - .serviceDetailTop4{  
216 - background-image: url("../../assets/images/service/serviceDetailTop4.jpg");  
217 - background-repeat: no-repeat;  
218 - background-size: 120px 100px;  
219 - }  
220 - .serviceDetailTop5{  
221 - background-image: url("../../assets/images/service/serviceDetailTop5.jpg");  
222 - background-repeat: no-repeat;  
223 - background-size: 120px 100px;  
224 - }  
225 - .serviceDetailTop6{  
226 - background-image: url("../../assets/images/service/serviceDetailTop6.jpg");  
227 background-repeat: no-repeat; 236 background-repeat: no-repeat;
228 - background-size: 120px 100px; 237 + background-size: 120px 83px;
229 } 238 }
  239 +
230 .serviceStar{ 240 .serviceStar{
231 padding-left: 20px; 241 padding-left: 20px;
232 background: url("../../assets/images/service/serviceStar.png") no-repeat 0 center; 242 background: url("../../assets/images/service/serviceStar.png") no-repeat 0 center;
src/views/service/insureDetail.vue
1 <template> 1 <template>
2 - <div style="padding: 0 10px">  
3 - <flexbox>  
4 - <flexbox-item><div class="flex-demo">  
5 - <img src="../../assets/images/service/insure1.png" alt="">  
6 - </div></flexbox-item>  
7 - <flexbox-item><div class="flex-demo">  
8 - <img src="../../assets/images/service/insure2.png" alt="">  
9 - </div></flexbox-item>  
10 - <flexbox-item><div class="flex-demo">  
11 - <img src="../../assets/images/service/insure3.png" alt="">  
12 - </div></flexbox-item>  
13 - </flexbox>  
14 -  
15 - <p >  
16 - 人保财险黄石市分公司黄石港支公司  
17 - 1.全国统一热线电话(95518)24小时全天候服务。2.全国范围内车辆故障免费救援(50公里内),提供拖车、送油、充电、更换轮胎、轮胎充气等救援服务。3.网点机构遍布全国,异地出险、就地理赔。  
18 - </p>  
19 -  
20 - <p style="margin: 40px 0 20px;color: red;text-align: center">  
21 - 若有业务咨询,请预留电话,客服人员会尽快联系到您  
22 - </p>  
23 -  
24 - <!--<x-input title="手机号码格式化" mask="999 9999 9999" v-model="maskValue" :max="13" is-type="china-mobile"></x-input>-->  
25 -  
26 - <group title=" ">  
27 - <x-input title="手机号码" name="mobile" placeholder="请输入手机号码" keyboard="number" is-type="china-mobile"></x-input>  
28 - </group>  
29 -  
30 - <x-button type="primary" style="margin-top: 20px">确定</x-button> 2 + <div style="padding: 0 10px">
  3 +
  4 + <div class="first-header-class">
  5 + <swiper height="150px" dots-position="center" :loop="true" :auto="true" :show-dots="false">
  6 + <swiper-item v-for="(item,index) in companyData.imgList" :key="index" >
  7 + <img :src="item" class="img-class-all" />
  8 + </swiper-item>
  9 + </swiper>
31 </div> 10 </div>
  11 +
  12 +
  13 + <!--<flexbox>-->
  14 + <!--<flexbox-item v-for="i in companyData.imgList">-->
  15 + <!--<div class="flex-demo">-->
  16 + <!--<img :src="i" alt="">-->
  17 + <!--</div>-->
  18 + <!--</flexbox-item>-->
  19 + <!--&lt;!&ndash;<flexbox-item>&ndash;&gt;-->
  20 + <!--&lt;!&ndash;<div class="flex-demo">&ndash;&gt;-->
  21 + <!--&lt;!&ndash;<img src="../../assets/images/service/insure2.png" alt="">&ndash;&gt;-->
  22 + <!--&lt;!&ndash;</div>&ndash;&gt;-->
  23 + <!--&lt;!&ndash;</flexbox-item>&ndash;&gt;-->
  24 + <!--&lt;!&ndash;<flexbox-item>&ndash;&gt;-->
  25 + <!--&lt;!&ndash;<div class="flex-demo">&ndash;&gt;-->
  26 + <!--&lt;!&ndash;<img src="../../assets/images/service/insure3.png" alt="">&ndash;&gt;-->
  27 + <!--&lt;!&ndash;</div>&ndash;&gt;-->
  28 + <!--&lt;!&ndash;</flexbox-item>&ndash;&gt;-->
  29 + <!--</flexbox>-->
  30 +
  31 +
  32 + <p style="margin-top: 15px;">{{companyData.companyName}}</p>
  33 + <p>{{companyData.serviceCommitment}}</p>
  34 + <p>公司地址:{{companyData.companyAddress}}</p>
  35 + <p>电话:{{companyData.contactTel}}</p>
  36 +
  37 +
  38 + <p style="margin: 40px 0 20px;color: red;text-align: center">
  39 + 若有业务咨询,请预留电话,客服人员会尽快联系到您
  40 + </p>
  41 +
  42 + <!--<x-input title="手机号码格式化" mask="999 9999 9999" v-model="maskValue" :max="13" is-type="china-mobile"></x-input>-->
  43 +
  44 + <group title=" ">
  45 + <x-input v-model="phoneValue" title="手机号码" name="mobile" placeholder="请输入手机号码" keyboard="number"
  46 + is-type="china-mobile"></x-input>
  47 + </group>
  48 +
  49 + <x-button type="primary" style="margin-top: 20px" @click.native="submitPhone">确定</x-button>
  50 + </div>
32 </template> 51 </template>
33 52
34 <script> 53 <script>
  54 +import { queryInsuranceCompanyInfo, saveInsuranceCompanyInfo } from "@/api/service/service.js";
  55 +import { Toast } from "mint-ui";
35 export default { 56 export default {
36 name: "insureDetail", 57 name: "insureDetail",
37 - data(){  
38 - return{  
39 - maskValue:'' 58 + data() {
  59 + return {
  60 + phoneValue: "",
  61 + companyData: {}
  62 + };
  63 + },
  64 + created() {
  65 + let id = this.$route.query.id;
  66 + console.log(id);
  67 + this.queryInsuranceCompanyInfo(id);
  68 + },
  69 + methods: {
  70 + queryInsuranceCompanyInfo: function(_id) {
  71 + let salt = this.$utils.myCommonSalt(32);
  72 + let jsondata = {
  73 + app_id: this.$utils.myVarAppid,
  74 + deviceInfo: this.$utils.myDeviceInfo,
  75 + salt: salt,
  76 + sign_type: "md5",
  77 + orgId: this.$utils.myOrgId,
  78 + id: _id
  79 + };
  80 + jsondata.sign = this.$utils.signObject(jsondata);
  81 + queryInsuranceCompanyInfo(jsondata).then(response => {
  82 + console.log(response);
  83 + this.companyData = response.data;
  84 + });
  85 + },
  86 + submitPhone: function() {
  87 + console.log(this.phoneValue);
  88 + // console.log(this.$utils.testPhone(this.phoneValue))
  89 + let reg = /^1[0-9]{10}$/;
  90 + if (this.phoneValue == "" || this.phoneValue.length <= 10 || !reg.test(this.phoneValue)) {
  91 + Toast("请输入正确的手机号");
  92 + return false;
  93 + }
  94 + let salt = this.$utils.myCommonSalt(32);
  95 + let jsondata = {
  96 + app_id: this.$utils.myVarAppid,
  97 + deviceInfo: this.$utils.myDeviceInfo,
  98 + salt: salt,
  99 + sign_type: "md5",
  100 + orgId: this.$utils.myOrgId,
  101 + companyNo: this.companyData.companyNo,
  102 + companyName: this.companyData.companyName,
  103 + userTel: this.phoneValue
  104 + };
  105 + jsondata.sign = this.$utils.signObject(jsondata);
  106 + saveInsuranceCompanyInfo(jsondata).then(response => {
  107 + console.log(response);
  108 + if(response.code == 0){
  109 + Toast("联系方式提交成功");
  110 + }
  111 +
  112 + });
40 } 113 }
41 } 114 }
42 }; 115 };
43 </script> 116 </script>
44 117
45 <style scoped lang="scss"> 118 <style scoped lang="scss">
  119 + .first-header-class{
  120 + img{
  121 + img {
  122 + width: 100%;
  123 + height: 100%;
  124 + }
  125 + }
  126 + }
46 .flex-demo { 127 .flex-demo {
47 text-align: center; 128 text-align: center;
48 color: #fff; 129 color: #fff;
@@ -50,7 +131,7 @@ export default { @@ -50,7 +131,7 @@ export default {
50 border-radius: 4px; 131 border-radius: 4px;
51 background-clip: padding-box; 132 background-clip: padding-box;
52 height: 100px; 133 height: 100px;
53 - img{ 134 + img {
54 width: 100%; 135 width: 100%;
55 height: 100%; 136 height: 100%;
56 } 137 }
src/views/service/service.vue
@@ -24,10 +24,10 @@ @@ -24,10 +24,10 @@
24 </flexbox-item> 24 </flexbox-item>
25 25
26 <flexbox-item class="nav-warp"> 26 <flexbox-item class="nav-warp">
27 - <div @click="$router.push({path:'development'})">  
28 - <img src="../../assets/images/service/tripservice.png" height="32" width="32"/> 27 + <div @click="$router.push({path:'foodService'})">
  28 + <img src="../../assets/images/service/foodIcon.png" height="32" width="32"/>
29 </div> 29 </div>
30 - <p>出行服务</p> 30 + <p>美食服务</p>
31 </flexbox-item> 31 </flexbox-item>
32 32
33 </flexbox> 33 </flexbox>