my-info.vue 45.2 KB
Newer Older
786817560's avatar
786817560 committed
1 2 3
<!--
 * @Author: your name
 * @Date: 2019-11-07 17:48:53
786817560's avatar
786817560 committed
4
 * @LastEditTime : 2019-12-23 15:30:46
786817560's avatar
786817560 committed
5
 * @LastEditors  : Please set LastEditors
786817560's avatar
786817560 committed
6 7 8
 * @Description: In User Settings Edit
 -->
<!-- -->
李晓兵's avatar
李晓兵 committed
9
<template>
linxin's avatar
linxin committed
10
  <h-view id="my-info">
linxin's avatar
linxin committed
11
    <h-header class="bar-custom">
linxin's avatar
linxin committed
12
      <div slot="center">个人中心</div>
linxin's avatar
linxin committed
13 14
    </h-header>

linxin's avatar
linxin committed
15
    <!-- <div :class="['top',(multipleRole!=='GUTA'&&user_bp_type!=='GUTA')?'has':'antiHas']" style="margin-top:-1px;"> -->
Jennie Shi's avatar
Jennie Shi committed
16
    <div class="top" style="margin-top: -1px">
胡's avatar
committed
17 18 19 20
      <div
        class="card-top"
        :style="{ height: nowBind.bp_type === 'MANAGER' ? '3.4rem' : '2.4rem' }"
      >
胡's avatar
committed
21
        <img :src="upLoadObj" @click="checkType" />
linxin's avatar
linxin committed
22 23
        <div class="sign">
          <span>{{ user_phone }}</span>
24 25
          <div class="now-bind">
            <!-- 电子签
linxin's avatar
linxin committed
26
            <p
Jennie Shi's avatar
Jennie Shi committed
27
              :class="[elecStatus ? 'across' : 'un-across']"
linxin's avatar
linxin committed
28
              @click="certification"
Jennie Shi's avatar
Jennie Shi committed
29 30
            >
              {{ elecStatusDesceibe }}
胡's avatar
committed
31
            </p>-->
32

胡's avatar
committed
33
            <span>{{ nowBind.bp_name ? `${nowBind.bp_name} (当前)` : '未绑定' }}</span>
胡's avatar
committed
34
            <div v-show="nowBind.bp_name && nowBind.bp_type !== 'MANAGER'" @click="changeUser">切换</div>
linxin's avatar
linxin committed
35 36 37
          </div>
        </div>
      </div>
linxin's avatar
linxin committed
38
    </div>
39

胡's avatar
committed
40
    <div class="bind-user" v-if="nowBind.bp_type !== 'MANAGER'">
胡's avatar
committed
41 42 43 44 45 46
      <div class="box">
        <p class="title">我绑定的用户</p>
        <div v-if="!myBindUser.length" class="no-user">
          暂无绑定用户,
          <router-link to="/user-bind">去绑定~</router-link>
        </div>
47

胡's avatar
committed
48 49 50 51 52
        <template v-else>
          <div v-for="item of myBindUser" class="bind-item">
            <p>{{ item.bp_name }}</p>
            <div>{{ item.bp_identity_name }}</div>
          </div>
53

胡's avatar
committed
54 55 56
          <div class="more" @click="$router.push('/myBindUser')">更多操作</div>
        </template>
      </div>
57 58
    </div>

Hello's avatar
Hello committed
59
    <h-content class="my-content has-footer">
linxin's avatar
linxin committed
60 61
      <div class="content-top">
        <list-item :item-height="44" class="list">
14699's avatar
14699 committed
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
<!--          <item @click.native="goContract">-->
<!--            <img slot="left-icon" src="@/assets/myInfo/agreement.png" class="left-icon" />-->
<!--            <div slot="name">我的合同</div>-->
<!--          </item>-->
<!--          <item-->
<!--            v-if="user_bp_type === 'TENANT' || user_bp_type === 'GUTA'"-->
<!--            @click.native="goReimburse"-->
<!--          >-->
<!--            <img slot="left-icon" src="@/assets/myInfo/repay.png" class="left-icon" />-->
<!--            <div slot="name">我的还款</div>-->
<!--          </item>-->
<!--          <item v-if="user_bp_type === 'TENANT'" @click.native="goInvoice">-->
<!--            <img slot="left-icon" src="@/assets/myInfo/invoice.png" class="left-icon" />-->
<!--            <div slot="name">我的发票</div>-->
<!--          </item>-->
linxin's avatar
linxin committed
77
          <item @click.native="goMyProduct">
胡's avatar
committed
78
            <img slot="left-icon" src="@/assets/myInfo/collect.png" class="left-icon" />
linxin's avatar
linxin committed
79
            <div slot="name">我的收藏</div>
80 81
            <div
              v-if="productCount > 0"
linxin's avatar
linxin committed
82
              slot="right-icon"
Jennie Shi's avatar
Jennie Shi committed
83 84 85 86
              :class="{
                'right-icon-width': productCount > 99,
                'right-icon': productCount < 99,
              }"
胡's avatar
committed
87
            >{{ productCount > 99 ? "99+" : productCount }}</div>
linxin's avatar
linxin committed
88 89
          </item>
          <item @click.native="changeHelp">
胡's avatar
committed
90
            <img slot="left-icon" src="@/assets/myInfo/help.png" class="left-icon" />
linxin's avatar
linxin committed
91 92
            <div slot="name">帮助与反馈</div>
          </item>
JingChao's avatar
JingChao committed
93
          <item @click.native="goAbout">
胡's avatar
committed
94
            <img slot="left-icon" src="@/assets/myInfo/about.png" class="left-icon" />
95
            <div slot="name">关于汉得</div>
linxin's avatar
linxin committed
96
          </item>
邹骏's avatar
邹骏 committed
97
          <item @click.native="goSetting">
胡's avatar
committed
98
            <img slot="left-icon" src="@/assets/myInfo/setting.png" class="left-icon" />
邹骏's avatar
邹骏 committed
99 100 101
            <div slot="name">设置</div>
          </item>
          <item @click.native="goContactUs">
胡's avatar
committed
102
            <img slot="left-icon" src="@/assets/myInfo/contact.png" class="left-icon" />
邹骏's avatar
邹骏 committed
103 104
            <div slot="name">联系我们</div>
          </item>
linxin's avatar
linxin committed
105 106 107
          <!-- <item @click.native="updateVersion">
            <img slot="left-icon" src="@/assets/myInfo/refresh.png" class="left-icon" >
            <div slot="name">检查更新</div>
胡's avatar
committed
108
          </item>-->
linxin's avatar
linxin committed
109 110 111 112
          <!-- <item @click.native="openTest">
            <img slot="left-icon" src="@/assets/myInfo/refresh.png" class="left-icon" >
            <div slot="name">当前版本</div>
            <div slot="content">{{ currentVersion }}</div>
胡's avatar
committed
113
          </item>-->
linxin's avatar
linxin committed
114
          <item @click.native="logOut">
胡's avatar
committed
115
            <img slot="left-icon" src="@/assets/myInfo/exit.png" class="left-icon" />
linxin's avatar
linxin committed
116 117 118
            <div slot="name">退出登录</div>
          </item>
        </list-item>
Jennie Shi's avatar
Jennie Shi committed
119
        <div class="version">版本号:{{ currentVersion }}</div>
120
        <!-- <button
121
          v-if="!popSetect" v-show="user_bp_type !== 'MANAGER'"
Jennie Shi's avatar
Jennie Shi committed
122 123 124 125
          @click="approveBtn ? unBind() : changePageHead()"
        >
          {{ description }}
        </button>
126
        <button v-if="popSetect" v-show="user_bp_type !== 'MANAGER'" @click="popSetectBox = true">
Jennie Shi's avatar
Jennie Shi committed
127
          {{ description }}
胡's avatar
committed
128
        </button>-->
linxin's avatar
linxin committed
129
      </div>
李晓兵's avatar
李晓兵 committed
130
    </h-content>
李晓兵's avatar
李晓兵 committed
131
    <role-switch
linxin's avatar
linxin committed
132
      v-show="roleSwitchFlag"
linxin's avatar
linxin committed
133
      ref="roleSwitchRoleList"
胡's avatar
committed
134
      :roleList="multiRoleList"
linxin's avatar
linxin committed
135 136 137
      @roleConfirm="roleConfirm"
      @roleCancle="roleCancle"
    />
胡's avatar
committed
138
    <!-- <role-switch
linxin's avatar
linxin committed
139
      v-show="popSetectBox"
linxin's avatar
linxin committed
140
      ref="roleSwitchType"
linxin's avatar
linxin committed
141 142 143
      :roleList="type"
      @roleConfirm="typeConfirm"
      @roleCancle="typeCancle"
胡's avatar
committed
144
    />-->
linxin's avatar
linxin committed
145
  </h-view>
李晓兵's avatar
李晓兵 committed
146
</template>
胡's avatar
committed
147

李晓兵's avatar
李晓兵 committed
148
<script>
李晓兵's avatar
李晓兵 committed
149
import roleSwitch from './role-switch-component'
linxin's avatar
linxin committed
150
import defaultImg from '../../assets/myInfo/1.png'
李晓兵's avatar
李晓兵 committed
151
export default {
李晓兵's avatar
李晓兵 committed
152 153
  components: {
    roleSwitch,
Jennie Shi's avatar
Jennie Shi committed
154
    defaultImg,
李晓兵's avatar
李晓兵 committed
155
  },
胡's avatar
committed
156
  data() {
linxin's avatar
linxin committed
157
    return {
李晓兵's avatar
李晓兵 committed
158
      currentVersion: process.env.currentVersion,
胡's avatar
committed
159
      // multipleRole: '',
160
      upLoadObj: defaultImg, // 上传的图片
胡's avatar
committed
161
      // flag: true,
胡's avatar
committed
162
      // isAGENT: false,
胡's avatar
committed
163 164 165
      // popSetect: false, // true:待提交或者审核未通过
      // popSetectBox: false, // 弹出选择框
      // elecStatusDesceibe: '',
胡's avatar
committed
166
      user_bp_status: JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')).bp_status,
胡's avatar
committed
167 168
      // user_bp_class: '',
      // bp_id: '',
胡's avatar
committed
169
      user_phone: window.localStorage.getItem('user_phone'),
胡's avatar
committed
170
      // user_bp_name: '',
胡's avatar
committed
171 172 173 174 175 176
      user_bp_type: JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')).bp_type,
      // signCount: '0',
      // carNum: '0',
      // faceSign: '0',
      // prjSubmit: '0',
      // confirmCount: '0',
李晓兵's avatar
李晓兵 committed
177
      productCount: '0',
胡's avatar
committed
178
      // carCount: '9',
胡's avatar
committed
179 180 181 182 183 184
      // description: '',
      // bp_identity: '',
      // bp_type_n: '',
      // approveBtn: false,
      // elecStatus: false,
      // authFlag: false,
李晓兵's avatar
李晓兵 committed
185
      roleSwitchFlag: false, // 选择角色模态框显示标志
linxin's avatar
linxin committed
186
      multiRoleList: [], // 查到的多角色
胡's avatar
committed
187
      app_user_id: window.localStorage.getItem('app_user_id'),
胡's avatar
committed
188 189 190 191 192 193 194 195 196 197
      // type: [
      //   {
      //     bp_type: '0',
      //     bp_type_n: '修改信息',
      //   },
      //   {
      //     bp_type: '1',
      //     bp_type_n: '重新选择用户类型',
      //   },
      // ],
198 199

      //绑定的用户列表
胡's avatar
committed
200
      bindUserList: JSON.parse(window.localStorage.getItem('bind-user-list')),
胡's avatar
committed
201
      nowBind: JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')),
linxin's avatar
linxin committed
202 203
    }
  },
linxin's avatar
linxin committed
204
  computed: {
胡's avatar
committed
205
    myBindUser() {
胡's avatar
committed
206
      if (this.bindUserList.length > 2) return [this.bindUserList[0], this.bindUserList[1]];
胡's avatar
committed
207 208 209

      return this.bindUserList;
    }
linxin's avatar
linxin committed
210
  },
胡's avatar
committed
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268
  // watch: {
  // user_bp_type (newVal, oldVal) {
  //   if (newVal === 'AGENT') {
  //     this.isAGENT = true
  //   } else {
  //     this.isAGENT = false
  //   }
  // },
  // bp_identity(newVal, oldVal) {
  //   switch (newVal) {
  //     case 'NP_NO': {
  //       this.elecStatusDesceibe = '个人待认证'
  //       this.elecStatus = false
  //       break
  //     }
  //     case 'NP_YES': {
  //       this.elecStatusDesceibe = '个人认证通过'
  //       this.elecStatus = true
  //       break
  //     }
  //     case 'ORG_NO': {
  //       this.elecStatusDesceibe = '企业待认证'
  //       this.elecStatus = false
  //       break
  //     }
  //     case 'ORG_YES': {
  //       this.elecStatusDesceibe = '企业认证通过'
  //       this.elecStatus = true
  //       break
  //     }
  //     case 'ORG_L_NO': {
  //       this.elecStatusDesceibe = '法人待认证'
  //       this.elecStatus = false
  //       break
  //     }
  //     case 'ORG_L_YES': {
  //       this.elecStatusDesceibe = '法人认证通过'
  //       this.elecStatus = true
  //       break
  //     }
  //     case 'ORG_AUTH_NO': {
  //       this.elecStatusDesceibe = '授权人待认证'
  //       this.elecStatus = false
  //       break
  //     }
  //     case 'ORG_AUTH_YES': {
  //       this.elecStatusDesceibe = '授权人认证通过'
  //       this.elecStatus = true
  //       break
  //     }
  //     default: {
  //       this.elecStatusDesceibe = '用户未绑定'
  //       this.elecStatus = false
  //       break
  //     }
  //   }
  // },
  // },
胡's avatar
committed
269
  mounted() {
270
    this.getList()
胡's avatar
committed
271
    this.getMultipleRole();
胡's avatar
committed
272
    this.getHead();
胡's avatar
committed
273 274
  },
  beforeRouteEnter(to, from, next) {
Jennie Shi's avatar
Jennie Shi committed
275
    next((vm) => {
胡's avatar
committed
276 277 278 279 280 281 282
      // vm.signCount = '0'
      // vm.carNum = '0'
      // vm.faceSign = '0'
      // vm.prjSubmit = '0'
      // vm.confirmCount = '0'
      // vm.productCount = '0'
      // vm.carCount = '9'
linxin's avatar
linxin committed
283
      vm.multiRoleList = []
胡's avatar
committed
284 285 286 287 288
      // vm.multipleRole = window.localStorage.getItem('multipleRole')
      // if (window.localStorage.getItem('user_phone')) {
      // vm.userQuery()
      // }
      // vm.numQuery()
linxin's avatar
linxin committed
289
    })
linxin's avatar
linxin committed
290
    next()
李晓兵's avatar
李晓兵 committed
291
  },
胡's avatar
committed
292
  methods: {
293 294 295 296 297 298 299 300 301 302 303 304 305 306
    // 获取用户列表,并缓存
    async getList() {
      let url = process.env.basePath + 'user_bp_query';
      let params = { app_user_id: window.localStorage.getItem('app_user_id') };

      try {
        hlsPopup.showLoading('请稍等');
        let query = await this.hlsHttp.post(url, params);

        if (query.result == 'S') {
          this.hlsPopup.hideLoading();

          // 自己添加认证文字
          let register = {
14699's avatar
14699 committed
307 308 309 310 311 312 313 314
            NP_NO: "个人",
            NP_YES: "个人",
            ORG_YES: "企业",
            ORG_NO: "企业",
            ORG_L_NO: "法人",
            ORG_L_YES: "法人",
            ORG_AUTH_NO: "授权人",
            ORG_AUTH_YES: "授权人"
315 316 317 318 319 320 321 322
          }

          query.lists = query.lists.map(item => {
            item.bp_identity_name = register[item.bp_identity];
            return item;
          })

          window.localStorage.setItem('bind-user-list', JSON.stringify(query.lists));
14699's avatar
14699 committed
323
          window.localStorage.setItem('now_user_bp_bind_id', JSON.stringify(query.lists.length ? query.lists[0] : {}));
胡's avatar
committed
324 325 326
          if (!query.lists.length)
            window.localStorage.setItem('now_user_bp_bind_id', JSON.stringify({}));

327 328 329 330 331 332 333 334 335 336 337

          this.bindUserList = query.lists;
        } else {
          this.hlsPopup.hideLoading();
          this.hlsPopup.showLongCenter(res.message);
        }
      } catch (error) {
        this.hlsPopup.hideLoading();
      }
    },

338 339
    changeUser() {
      this.hlsPopup.selectList({
胡's avatar
committed
340
        list: this.bindUserList.map(item => ({ code_name: item.bp_name, code: item.bp_id })),
341 342
        code: 'code',
        object: {},
胡's avatar
committed
343
        returnItem: (index, obj) => {
胡's avatar
committed
344 345
          this.nowBind = this.bindUserList[index];
          window.localStorage.setItem('now_user_bp_bind_id', JSON.stringify(this.nowBind));
胡's avatar
committed
346
          hlsPopup.showLongCenter('用户已切换成功');
胡's avatar
committed
347 348 349

          // 获取角色列表
          this.getMultipleRole();
350 351 352
        },
      })
    },
胡's avatar
committed
353 354 355 356 357 358 359 360 361 362 363
    // openTest () {
    //   // cordova.InAppBrowser.open('http://www.baidu.com', '_blank', 'location=yes')
    //   var date = '2019.11.23'
    //   var times = this.dateFormat(date)
    //   console.log(times)
    // },
    // dateFormat (str) {
    //   // return `${str.substring(0,4)}-${str.substring(4,6)}-${str.substring(6)}`
    //   return str.replace(/\./g, '-')
    // },

364
    // 查询头像
胡's avatar
committed
365
    getHead() {
366 367 368 369 370
      let vm = this
      let url = process.env.basePath + 'app_attment_query'
      let param = {
        master: {
          source_type: 'HLS_APP_USER',
linxin's avatar
linxin committed
371
          pkvalue: vm.app_user_id,
372 373 374 375 376 377 378
        },
      }
      hlsPopup.showLoading('请稍候')
      vm.$post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          if (res.info) {
Jennie Shi's avatar
Jennie Shi committed
379 380
            vm.upLoadObj =
              process.env.filePath +
381 382 383 384
              'attachment_id=' +
              res.info.attachment_id +
              '&access_token=' +
              window.localStorage.access_token
linxin's avatar
linxin committed
385 386
          } else {
            vm.upLoadObj = defaultImg
387 388 389 390 391 392
          }
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
李晓兵's avatar
李晓兵 committed
393
    // 选择角色后确定
胡's avatar
committed
394
    roleConfirm(role) {
李晓兵's avatar
李晓兵 committed
395
      this.roleSwitchFlag = false
胡's avatar
committed
396 397 398 399 400

      this.nowBind = { ...this.nowBind, bp_type: role.bp_type, bp_type_n: role.bp_type_n };
      window.localStorage.setItem('now_user_bp_bind_id', JSON.stringify(this.nowBind));


401
      // window.localStorage.setItem('multipleRole', role.bp_type)
胡's avatar
committed
402 403 404
      // this.multipleRole = role.bp_type  // 当前的角色权限
      // console.log('选择后的角色为:' + role)
      // window.localStorage.setItem('bp_type', role.bp_type)
linxin's avatar
linxin committed
405
    },
胡's avatar
committed
406 407 408 409 410 411 412 413 414
    // typeConfirm (e) {
    //   // 选择操作方式后
    //   this.popSetectBox = false
    //   if (e.bp_type === '0') {  修改信息
    //     this.changePageHead()
    //   } else if (e.bp_type === '1') { 重新选择用户类型
    //     this.unBindSelext()
    //   }
    // },
李晓兵's avatar
李晓兵 committed
415
    // 选择角色后取消
胡's avatar
committed
416
    roleCancle() {
李晓兵's avatar
李晓兵 committed
417 418
      this.roleSwitchFlag = false
    },
胡's avatar
committed
419 420 421 422
    // typeCancle () {
    //   this.popSetectBox = false
    // },
    goContract() {
Jennie Shi's avatar
Jennie Shi committed
423 424 425
      this.$router.push({
        name: 'MyContract',
      })
linxin's avatar
linxin committed
426
    },
胡's avatar
committed
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453
    // // 监听用户状态
    // watchBpStatus () {
    //   if (!this.bp_id && this.user_bp_status === 'NEW') {
    //     this.description = '用户绑定'
    //     this.approveBtn = false
    //     this.popSetect = false
    //   } else if (this.bp_id && this.user_bp_status === 'NEW') {
    //     this.description = '待提交'
    //     this.approveBtn = false
    //     this.popSetect = true // 是否弹出选择框
    //   } else if (this.bp_id && this.user_bp_status === 'APPROVED') {
    //     this.description = '解除绑定'
    //     this.approveBtn = true
    //     this.popSetect = false
    //   } else if (
    //     (this.bp_id && this.user_bp_status === 'RETURN') ||
    //     (this.bp_id && this.user_bp_status === 'REJECT')
    //   ) {
    //     this.description = '审核未通过'
    //     this.approveBtn = false
    //     this.popSetect = true // 是否弹出选择框
    //   } else {
    //     this.description = '审批中'
    //     this.approveBtn = false
    //     this.popSetect = false
    //   }
    // },
李晓兵's avatar
李晓兵 committed
454
    // 我的发票
胡's avatar
committed
455
    goInvoice() {
李晓兵's avatar
李晓兵 committed
456 457 458 459
      this.$router.push({
        name: 'MyInvoice',
      })
    },
786817560's avatar
786817560 committed
460
    // 合同创建
胡's avatar
committed
461 462 463 464 465 466 467 468
    // goCreate () {
    //   this.$router.push({
    //     name: 'ContractCreateList',
    //     params: {
    //       user_bp_type: this.user_bp_type,
    //     },
    //   })
    // },
Jennie Shi's avatar
Jennie Shi committed
469
    // 进入待签约功能,客户类型为经销商则进入经销商功能,非经销商则进入融租方案确认
胡's avatar
committed
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487
    // goSign () {
    //   if (this.bp_id) {
    //     // if (this.user_bp_type === 'AGENT') {
    //     //   this.$router.push({
    //     //     name: 'ContractList',
    //     //   })
    //     // } else {
    //     this.$router.push({
    //       name: 'ContractSigning',
    //       params: {
    //         user_bp_type: this.user_bp_type,
    //       },
    //     })
    //     // }
    //   } else {
    //     hlsPopup.showLongCenter('请先进行用户绑定')
    //   }
    // },
李晓兵's avatar
李晓兵 committed
488
    // 进入待确认,(进件确认)
胡's avatar
committed
489 490 491 492 493 494 495 496
    // goConfirm () {
    //   this.$router.push({
    //     name: 'IntoList',
    //   })
    //   // this.$router.push({
    //   //   name: 'IframTest',
    //   // })
    // },
李晓兵's avatar
李晓兵 committed
497
    // 进入我的还款
胡's avatar
committed
498
    goReimburse() {
胡's avatar
committed
499
      if (this.nowBind.bp_id) {
李晓兵's avatar
李晓兵 committed
500 501 502 503 504 505
        this.$router.push({
          name: 'ReimburseMyselfList',
        })
      } else {
        hlsPopup.showLongCenter('请先进行用户绑定')
      }
李晓兵's avatar
李晓兵 committed
506
    },
李晓兵's avatar
李晓兵 committed
507
    // 进入我的收藏
胡's avatar
committed
508
    goMyProduct() {
李晓兵's avatar
李晓兵 committed
509 510 511 512
      this.$router.push({
        name: 'MyProductList',
      })
    },
linxin's avatar
linxin committed
513
    // 进入
胡's avatar
committed
514 515 516 517 518 519 520 521
    // changeContract (e) {
    //   this.$router.push({
    //     name: 'ContractRecords',
    //     params: {
    //       bp_type: e,
    //     },
    //   })
    // },
Jennie Shi's avatar
Jennie Shi committed
522
    // 进入融租合同创建
胡's avatar
committed
523 524 525 526 527 528 529 530 531
    // goStart () {
    //   if (this.bp_id) {
    //     this.$router.push({
    //       name: 'StartList',
    //     })
    //   } else {
    //     hlsPopup.showLongCenter('请先进行用户绑定')
    //   }
    // },
Jennie Shi's avatar
Jennie Shi committed
532
    // 进入合同签订
胡's avatar
committed
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551
    // goCarConfirm () {
    //   if (this.bp_id) {
    //     this.$router.push({
    //       name: 'ConfirmList',
    //     })
    //   } else {
    //     hlsPopup.showLongCenter('请先进行用户绑定')
    //   }
    // },
    // goVideoSign () {
    //   if (this.bp_id) {
    //     this.$router.push({
    //       name: 'VideoSign',
    //     })
    //   } else {
    //     hlsPopup.showLongCenter('请先进行用户绑定')
    //   }
    // },
    changeHelp() {
linxin's avatar
linxin committed
552 553 554 555
      this.$router.push({
        name: 'HelpList',
      })
    },
胡's avatar
committed
556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592
    // changeDrawbackList () {
    //   if (this.bp_id) {
    //     this.$router.push({
    //       name: 'DrawbackList',
    //     })
    //   } else {
    //     hlsPopup.showLongCenter('请先进行用户绑定')
    //   }
    // },
    // changePay () {
    //   if (window.localStorage.getItem('bp_id') !== 'undefined') {
    //     this.$router.push({
    //       name: 'FirstPay',
    //     })
    //   } else {
    //     hlsPopup.showLongCenter('请先进行用户绑定')
    //   }
    // },
    // changeRent () {
    //   if (window.localStorage.getItem('bp_id') !== 'undefined') {
    //     this.$router.push({
    //       name: 'NewList',
    //     })
    //   } else {
    //     hlsPopup.showLongCenter('请先进行用户绑定')
    //   }
    // },
    // changeCash () {
    //   if (window.localStorage.getItem('bp_id') !== 'undefined') {
    //     this.$router.push({
    //       name: 'MarginFirstPay',
    //     })
    //   } else {
    //     hlsPopup.showLongCenter('请先进行用户绑定')
    //   }
    // },
    updateVersion() {
李晓兵's avatar
李晓兵 committed
593
      if (vum.Platform.isAndroid()) {
linxin's avatar
linxin committed
594 595
        this.hote_update_version(
          '发现新版本是否更新',
李晓兵's avatar
李晓兵 committed
596
          'http://hlsapp.hand-china.com/file/XCMG/www_myself/dev/android/www.zip'
linxin's avatar
linxin committed
597
        )
李晓兵's avatar
李晓兵 committed
598
      } else {
linxin's avatar
linxin committed
599 600
        this.hote_update_version(
          '发现新版本是否更新',
李晓兵's avatar
李晓兵 committed
601
          'http://hlsapp.hand-china.com/file/XCMG/www_myself/dev/ios/www.zip'
linxin's avatar
linxin committed
602
        )
李晓兵's avatar
李晓兵 committed
603 604
      }
    },
胡's avatar
committed
605
    hote_update_version(content, url) {
李晓兵's avatar
李晓兵 committed
606 607 608 609 610 611 612 613 614 615
      hlsPopup.showConfirm({
        title: '版本更新',
        content: content,
        onConfirm: function (index) {
          if (index === 1) {
            hotpatch.updateNewVersion(url)
          }
        },
      })
    },
胡's avatar
committed
616
    logOut() {
李晓兵's avatar
李晓兵 committed
617 618 619 620 621 622
      let vm = this
      hlsPopup.showConfirm({
        title: '提示',
        content: '确定退出',
        onConfirm: function (index) {
          if (index === 1) {
李晓兵's avatar
李晓兵 committed
623 624
            let width = window.localStorage.getItem('width')
            let height = window.localStorage.getItem('height')
linxin's avatar
linxin committed
625 626 627 628 629 630 631 632
            if (window.localStorage.isReadPolicy === 'false') {
              window.localStorage.clear()
            } else if (window.localStorage.isReadPolicy === 'true') {
              window.localStorage.clear()
              window.localStorage.setItem('isReadPolicy', true)
            } else {
              window.localStorage.clear()
            }
李晓兵's avatar
李晓兵 committed
633 634
            window.localStorage.setItem('width', width)
            window.localStorage.setItem('height', height)
李晓兵's avatar
李晓兵 committed
635
            vm.$router.push('/login')
linxin's avatar
linxin committed
636
            // location.reload()
李晓兵's avatar
李晓兵 committed
637 638 639 640
          }
        },
      })
    },
胡's avatar
committed
641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716
    // unBindSelext () {
    //   let vm = this
    //   vm.popSetectBox = true
    //   hlsPopup.showConfirm({
    //     title: '提示',
    //     content: '确定解除绑定?',
    //     onConfirm: function (index) {
    //       if (index === 1) {
    //         let myPhone = window.localStorage.getItem('user_phone')
    //         let myPassword = window.localStorage.getItem('password')
    //         let url = process.env.basePath + 'bp_unbind'
    //         let param = {
    //           master: {
    //             phone: myPhone,
    //             password: myPassword,
    //           },
    //         }
    //         vm.hlsPopup.showLoading('请稍候')
    //         vm.hlsHttp.post(url, param).then(function (res) {
    //           vm.hlsPopup.hideLoading()
    //           if (res.result === 'S') {
    //             vm.hlsPopup.showLongCenter('解绑成功')
    //             if (window.localStorage.getItem('user_phone')) {
    //               vm.userQuery()
    //             }
    //             vm.approveBtn = false
    //             vm.$router.push({
    //               name: 'UserBind',
    //             })
    //           } else {
    //             vm.hlsPopup.showLongCenter(res.message)
    //           }
    //         })
    //       }
    //     },
    //   })
    // },

    // 解绑
    // unBind () {
    //   let vm = this
    //   hlsPopup.showConfirm({
    //     title: '提示',
    //     content: '确定解除绑定?',
    //     onConfirm: function (index) {
    //       if (index === 1) {
    //         // window.localStorage.clear()
    //         // vm.$router.push('/login')
    //         let myPhone = window.localStorage.getItem('user_phone')
    //         let myPassword = window.localStorage.getItem('password')
    //         let url = process.env.basePath + 'bp_unbind'
    //         let param = {
    //           master: {
    //             phone: myPhone,
    //             password: myPassword,
    //           },
    //         }
    //         vm.hlsPopup.showLoading('请稍候')
    //         vm.hlsHttp.post(url, param).then(function (res) {
    //           vm.hlsPopup.hideLoading()
    //           if (res.result === 'S') {
    //             vm.hlsPopup.showLongCenter('解绑成功')
    //             if (window.localStorage.getItem('user_phone')) {
    //               vm.userQuery()
    //             }
    //             // vm.flag = truet
    //             vm.approveBtn = false
    //           } else {
    //             vm.hlsPopup.showLongCenter(res.message)
    //           }
    //         })
    //       }
    //     },
    //   })
    // },
    checkType() {
717
      let vm = this
linxin's avatar
linxin committed
718
      this.hlsPopup.showActionSheet({
linxin's avatar
linxin committed
719
        buttonArray:
胡's avatar
committed
720 721
          vm.user_bp_type === 'MANAGER' ? ['修改头像'] : ['修改头像', '角色切换'],
        // '角色切换'
Jennie Shi's avatar
Jennie Shi committed
722
        callback: (index) => {
linxin's avatar
linxin committed
723
          if (index === 0) {
linxin's avatar
linxin committed
724
            this.imgUploadShow(vm.app_user_id)
胡's avatar
committed
725 726 727
          }
          //  else if (index === 2) {
          // this.changePageHead(this.nowBind);
728
          // }
胡's avatar
committed
729 730 731
          else if (index === 1) {
            // console.log(vm.user_bp_type);
            // console.log(vm.user_bp_status);
Jennie Shi's avatar
Jennie Shi committed
732 733 734 735 736 737
            if (
              (vm.user_bp_type === 'TENANT' ||
                vm.user_bp_type === 'GUTA' ||
                vm.user_bp_type === 'AGENT') &&
              vm.user_bp_status === 'APPROVED'
            ) {
linxin's avatar
linxin committed
738
              vm.$refs.roleSwitchRoleList.show()
linxin's avatar
linxin committed
739 740 741
            } else {
              hlsPopup.showLongCenter('您当前尚无可用角色')
            }
linxin's avatar
linxin committed
742 743 744 745
          }
        },
      })
    },
胡's avatar
committed
746 747 748

    // 角色列表 有用
    getMultipleRole() {
linxin's avatar
linxin committed
749 750
      let vm = this
      let url = process.env.basePath + 'bp_role_query'
胡's avatar
committed
751

linxin's avatar
linxin committed
752 753
      let param = {
        master: {
胡's avatar
committed
754 755
          bp_id: JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')).bp_id,
          bp_type: JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')).bp_type,
linxin's avatar
linxin committed
756 757 758 759
        },
      }
      vm.hlsHttp.post(url, param).then(function (res) {
        if (res.result === 'S') {
胡's avatar
committed
760 761 762 763 764
          let obj = {
            bp_type: JSON.parse(window.localStorage.getItem("now_user_bp_bind_id")).bp_type,
            bp_type_n: JSON.parse(window.localStorage.getItem("now_user_bp_bind_id")).bp_type_n,
          }
          vm.multiRoleList = [...res.lists, obj]
linxin's avatar
linxin committed
765 766 767
        }
      })
    },
linxin's avatar
linxin committed
768
    // 图片上传入口
胡's avatar
committed
769
    imgUploadShow(check_id) {
linxin's avatar
linxin committed
770 771 772 773 774
      let vm = this
      // vm.upload_list = []
      hlsPopup.showActionSheet({
        titleText: '请选择照片',
        buttonArray: ['拍照', '从相册取'],
Jennie Shi's avatar
Jennie Shi committed
775
        callback: (index) => {
linxin's avatar
linxin committed
776 777 778 779 780 781 782 783
          if (index === 0) {
            vm.imgUploadOpenCamera(check_id)
          } else {
            vm.imgUploadTakePicture(check_id)
          }
        },
      })
    },
胡's avatar
committed
784
    imgUploadOpenCamera(check_id) {
linxin's avatar
linxin committed
785 786 787
      let vm = this
      let obj = {
        pkvalue: check_id,
788
        source_type: 'HLS_APP_USER',
linxin's avatar
linxin committed
789 790 791 792 793 794 795 796 797 798 799
        picture: '',
        check_id: check_id,
        filePath: '',
        attachment_id: '',
        user_id: 1,
        fileName: '',
      }
      let cameraoptions = {
        quality: 100,
      }
      let success = function (imgdata) {
linxin's avatar
linxin committed
800
        obj.picture = hlsUtil.convertImageUrl(imgdata)
linxin's avatar
linxin committed
801
        obj.filePath = imgdata
802
        vm.upLoadObj = obj.picture
linxin's avatar
linxin committed
803 804 805 806 807 808 809
        vm.save_picture(obj)
      }
      let error = function () {
        hlsPopup.showLongCenter('请拍照')
      }
      hlsUtil.openCamera(cameraoptions, success, error)
    },
胡's avatar
committed
810
    imgUploadTakePicture(check_id) {
linxin's avatar
linxin committed
811
      let vm = this
linxin's avatar
linxin committed
812 813 814 815 816 817 818 819 820 821
      let obj = {
        pkvalue: check_id,
        source_type: 'HLS_APP_USER',
        picture: '',
        check_id: check_id,
        filePath: '',
        attachment_id: '',
        user_id: 1,
        fileName: '',
      }
linxin's avatar
linxin committed
822 823 824 825
      let cameraoptions = {
        quality: 100,
      }
      let success = function (imgUrl) {
linxin's avatar
linxin committed
826
        obj.picture = hlsUtil.convertImageUrl(imgUrl[0])
linxin's avatar
linxin committed
827
        obj.filePath = imgUrl[0]
828
        vm.upLoadObj = obj.picture
linxin's avatar
linxin committed
829
        console.log('$$$$$$$$$$$$$$$1' + imgUrl[0])
linxin's avatar
linxin committed
830 831 832
        // 拍完一张立马执行保存图片逻辑
        vm.save_picture(obj)
      }
linxin's avatar
linxin committed
833 834 835
      let error = function () {
        hlsPopup.showLongCenter('请选择图片')
      }
linxin's avatar
linxin committed
836 837
      vm.hlsUtil.takePicture(cameraoptions, success, error)
    },
胡's avatar
committed
838
    openCamera(ocrType, type) {
linxin's avatar
linxin committed
839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854
      let vm = this
      let cameraoptions = {
        quality: 60,
        width: 1843,
        height: 1382,
      }
      let success = function (imgdata) {
        if (!imgdata) {
          hlsPopup.showLongCenter('请拍照')
        }
      }
      let error = function () {
        hlsPopup.showLongCenter('请拍照')
      }
      hlsUtil.openCamera(cameraoptions, success, error)
    },
胡's avatar
committed
855
    takePicture(ocrType, type) {
linxin's avatar
linxin committed
856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872
      let vm = this
      var cameraoptions = {
        quality: 70,
        width: 1843,
        height: 1382,
        maxCount: 1,
      }
      let success = function (imgUrl) {
        if (imgUrl.length === 0) {
          hlsPopup.showLongCenter('请选择一张图片')
        }
      }
      let error = function () {
        hlsPopup.showLongCenter(error)
      }
      vm.hlsUtil.takePicture(cameraoptions, success, error)
    },
胡's avatar
committed
873
    save_picture(obj) {
linxin's avatar
linxin committed
874
      if (obj) {
875 876 877 878
        let success = function () {
          hlsPopup.showLongCenter('头像上传成功')
        }
        hlsUtil.fileUploadSvc(obj, success)
linxin's avatar
linxin committed
879 880 881 882
      } else {
        hlsPopup.hideLoading()
      }
    },
Hello's avatar
Hello committed
883

胡's avatar
committed
884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988
    // 修改信息逻辑
    changePageHead(item) {

      if (!Object.keys(item).length) return;

      if (item.bp_status === 'APPROVING') {
        this.hlsPopup.showLongCenter('您的绑定申请还在流程中');
        return;
      };

      let params = {
        bp_id: item.bp_id,
        user_bp_name: item.bp_name,
        bp_class: item.bp_class,
        status: item.bp_status,
        isAGENT: item.bp_type === 'AGENT', //是否为经销商
        isMultiRole: ["GUTA", "TENANT", "AGENT"].includes(item.bp_type) // 是否为 担保人/承租人 能否为多角色
      };

      let name = item.bp_class === "NP" ? "NPBaseInfo" : "EnterpriseNew";

      this.$router.push({ name, params });

      // let vm = this
      // if (vm.bp_id) {
      //   if (vm.user_bp_status === 'NEW' || vm.user_bp_status === 'RETURN') {
      //     vm.flag = true
      //     if (vm.user_bp_class === 'NP') {
      //       vm.$router.push({
      //         name: 'NPBaseInfo',
      //         params: {
      //           bp_id: this.bp_id,
      //           user_bp_name: this.user_bp_name,
      //         },
      //       })
      //     } else {
      //       this.$router.push({
      //         name: 'EnterpriseNew',
      //         params: {
      //           bp_id: this.bp_id,
      //           user_bp_name: this.user_bp_name,
      //           bp_class: vm.user_bp_class,
      //         },
      //       })
      //     }
      //   } else if (vm.user_bp_status === 'APPROVED') {
      //     vm.flag = false
      //     if (vm.user_bp_class === 'NP') {
      //       vm.$router.push({
      //         name: 'NPBaseInfo',
      //         params: {
      //           bp_id: this.bp_id,
      //           user_bp_name: this.user_bp_name,
      //           isAGENT: this.isAGENT,
      //           status: 'APPROVED',
      //           isMultiRole: this.isMultiRole,
      //         },
      //       })
      //     } else {
      //       this.$router.push({
      //         name: 'EnterpriseNew',
      //         params: {
      //           bp_id: this.bp_id,
      //           user_bp_name: this.user_bp_name,
      //           isAGENT: this.isAGENT,
      //           status: 'APPROVED',
      //           isMultiRole: this.isMultiRole,
      //           bp_class: vm.user_bp_class,
      //         },
      //       })
      //     }
      //   } else if (vm.user_bp_status === 'REJECT') {
      //     vm.flag = true
      //     if (vm.user_bp_class === 'NP') {
      //       vm.$router.push({
      //         name: 'NPBaseInfo',
      //         params: {
      //           bp_id: this.bp_id,
      //           isMultiRole: this.isMultiRole,
      //           user_bp_name: this.user_bp_name,
      //           status: 'APPROVED',
      //         },
      //       })
      //     } else {
      //       this.$router.push({
      //         name: 'EnterpriseNew',
      //         params: {
      //           bp_id: this.bp_id,
      //           isMultiRole: this.isMultiRole,
      //           user_bp_name: this.user_bp_name,
      //           bp_class: vm.user_bp_class,
      //           status: 'APPROVED',
      //         },
      //       })
      //     }
      //   } else if (vm.user_bp_status === 'APPROVING') {
      //     vm.flag = true
      //     this.hlsPopup.showLongCenter('您的绑定申请还在流程中')
      //   }
      // } else {
      //   vm.flag = true
      //   this.$router.push({
      //     name: 'UserBind',
      //   })
      // }
linxin's avatar
linxin committed
989
    },
胡's avatar
committed
990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070

    // userQuery () {
    // let vm = this
    // let url = $config.basePath + 'user_query'
    // let param = {
    //   // phone: window.localStorage.getItem('user_phone'),
    //   bp_id: vm.nowBind.bp_id
    // }
    // vm.hlsPopup.showLoading('请稍候')
    // vm.$post(url, param).then(function (res) {
    //   if (res.result === 'S') {
    //     if (res.info.user_bp_status === 'APPROVED') {
    //       vm.flag = false
    //     }
    //     window.localStorage.setItem('user_phone', res.info.user_phone)
    //     vm.user_bp_status = res.info.user_bp_status
    //     vm.user_bp_class = res.info.user_bp_class
    //     vm.bp_id = res.info.user_bp_id
    //     vm.bp_identity = res.info.bp_identity
    //     vm.app_user_id = res.info.app_user_id
    //     window.localStorage.removeItem('bp_id')
    //     window.localStorage.setItem('bp_id', res.info.user_bp_id)
    //     window.localStorage.setItem('user_bp_status', res.info.user_bp_status)
    //     window.localStorage.setItem('bp_name', res.info.user_bp_name)
    //     window.localStorage.setItem('bp_identity', res.info.bp_identity)
    //     window.localStorage.setItem('bp_class', res.info.user_bp_class)
    //     if (localStorage.bp_type || localStorage.multipleRole) {

    //     } else {
    //       window.localStorage.setItem('bp_type', res.info.user_bp_type)
    //       window.localStorage.setItem('multipleRole', res.info.user_bp_type)
    //     }
    //     vm.user_bp_name = res.info.user_bp_name
    //     vm.user_bp_type = res.info.user_bp_type
    //     vm.user_phone = res.info.user_phone
    //     vm.bp_type_n = res.info.user_bp_type_n
    //     vm.watchBpStatus()
    //     vm.getHead()
    //     vm.getMultipleRole()
    //     if (vm.user_bp_type === 'AGENT') {
    //       vm.isAGENT = true
    //     } else {
    //       vm.isAGENT = false
    //     }
    //     if (
    //       vm.user_bp_type === 'GUTA' ||
    //       vm.user_bp_type === 'TENANT' ||
    //       vm.user_bp_type === 'AGENT'
    //     ) {
    //       vm.isMultiRole = true
    //     } else {
    //       vm.isMultiRole = false
    //     }
    //   } else {
    //     this.hlsPopup.showLongCenter(res.message)
    //   }
    // })
    // },

    // 各种角标的数量
    // numQuery () {
    //   let vm = this
    //   let url = $config.basePath + 'number_display_query'
    //   let param = {
    //     user_phone: window.localStorage.getItem('user_phone'),
    //   }
    //   vm.$post(url, param).then(function (res) {
    //     if (res.result === 'S') {
    //       if ('info' in res) {
    //         vm.signCount = res.info.con_confirm_num || 0
    //         // vm.confirmCount = res.info.con_confirm_num
    //         vm.productCount = res.info.collect_num || 0
    //         vm.carCount = res.info.car_confirm_num || 0
    //         vm.faceSign = res.info.face_sign_num || 0
    //         vm.prjSubmit = res.info.prj_submit_num || 0
    //       }
    //     } else {
    //       this.hlsPopup.showLongCenter(res.message)
    //     }
    //   })
    // },
李晓兵's avatar
李晓兵 committed
1071
    // 认证入口
胡's avatar
committed
1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145
    // async certification () {
    //   let vm = this
    //   let authFlag = await vm.getNpCertificationUrl()
    //   if (authFlag === true) {
    //     if (vm.bp_id) {
    //       if (vm.bp_identity === 'NP_NO' || vm.bp_identity === 'ORG_L_NO' || vm.bp_identity === 'ORG_AUTH_NO') {
    //         let url = process.env.basePath + 'bp_query'
    //         let param = {
    //           bp_id: window.localStorage.bp_id,
    //         }
    //         hlsPopup.showLoading('请稍候')
    //         vm.hlsHttp.post(url, param).then((result) => {
    //           hlsPopup.hideLoading()
    //           if (result.result === 'S') {
    //             let data = result.lists[0]
    //             cordova.plugins.IdCardPlugin.idCardIdentify(
    //               {
    //                 idNum: data.id_card_no,
    //                 idName: data.bp_name,
    //                 phoneNum: window.localStorage.user_phone,
    //               },
    //               function (suc) {
    //                 let success = JSON.parse(suc)
    //                 if (success.code === 1) {
    //                   if (window.localStorage.getItem('user_phone')) {
    //                     // vm.userQuery()
    //                   }
    //                 }
    //               },
    //               function (reason) {
    //                 let error = JSON.parse(reason)
    //                 vm.hlsPopup.showLongCenter('认证失败: ' + error.message)
    //               }
    //             )
    //           } else {
    //             vm.hlsPopup.showLongCenter(result.message)
    //           }
    //         })
    //       } else if (vm.bp_identity === 'ORG_NO') {
    //         hlsPopup.showLongCenter('APP端不支持认证企业账号,请移步PC端操作')
    //       } else {
    //         hlsPopup.showLongCenter('您已认证通过')
    //       }
    //     } else {
    //       hlsPopup.showLongCenter('请先进行用户绑定!')
    //     }
    //   } else if (authFlag === false) {
    //     hlsPopup.showLongCenter('用户已绑定!')
    //     if (window.localStorage.getItem('user_phone')) {
    //       // vm.userQuery()
    //     }
    //   }
    // },
    // async getNpCertificationUrl () {
    //   let vm = this
    //   let url = $config.basePath + 'auth_user_sign'
    //   let param = {
    //     phone: vm.user_phone,
    //   }
    //   hlsPopup.showLoading('请稍候')
    //   let res = await vm.$post(url, param)
    //   hlsPopup.hideLoading()
    //   if (res.info.code === 0 && res.info.data.authUrl) {
    //     // hlsPopup.showLongCenter('绑定失败!')
    //     return true
    //   } else if (res.info.code === 0 && res.info.data.openId) {
    //     // hlsPopup.showLongCenter('绑定成功!')
    //     // vm.userQuery()
    //     return false
    //   } else {
    //     hlsPopup.showLongCenter(res.info.msg)
    //     return ''
    //   }
    // },
Jennie Shi's avatar
Jennie Shi committed
1146
    // 获取企业认证url
胡's avatar
committed
1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166
    // async getOrgCertificationUrl () {
    //   let vm = this
    //   let url = $config.basePath + 'auth_company_sign'
    //   let param = {
    //     phone: vm.user_phone,
    //   }
    //   hlsPopup.showLoading('请稍候')
    //   let res = await vm.$post(url, param)
    //   hlsPopup.hideLoading()
    //   if ((res.info.code === 0) && (res.info.data.authUrl)) {
    //     hlsPopup.showLongCenter('绑定失败!')
    //   } else if ((res.info.code === 0) && (res.info.data.openId)) {
    //     hlsPopup.showLongCenter('绑定成功!')
    //     if (window.localStorage.getItem('user_phone')) {
    //       // vm.userQuery()
    //     }
    //   } else {
    //     hlsPopup.showError(res.info.msg)
    //   }
    // },
Jennie Shi's avatar
Jennie Shi committed
1167

胡's avatar
committed
1168
    goAbout() {
JingChao's avatar
JingChao committed
1169 1170 1171 1172
      this.$router.push({
        name: 'About',
      })
    },
胡's avatar
committed
1173
    goSetting() {
邹骏's avatar
邹骏 committed
1174 1175 1176 1177
      this.$router.push({
        name: 'Setting',
      })
    },
胡's avatar
committed
1178
    goContactUs() {
邹骏's avatar
邹骏 committed
1179 1180 1181
      this.$router.push({
        name: 'ContactUs',
      })
Jennie Shi's avatar
Jennie Shi committed
1182
    },
李晓兵's avatar
李晓兵 committed
1183 1184 1185 1186
  },
}
</script>

linxin's avatar
linxin committed
1187
<style lang="less" scoped>
linxin's avatar
linxin committed
1188
#my-info {
Jennie Shi's avatar
Jennie Shi committed
1189
  /* .content-wrap{
linxin's avatar
linxin committed
1190 1191 1192 1193
    margin-left:40px;
  }
  .content-wrap:not(:nth-of-type(1)){
    margin-left:70px;
李晓兵's avatar
李晓兵 committed
1194
  }*/
linxin's avatar
linxin committed
1195 1196 1197
  .card-top {
    width: 330px;
    margin: 0 auto;
1198
    height: 2.4rem;
linxin's avatar
linxin committed
1199 1200 1201 1202
    display: flex;
    align-items: center;
    .sign {
      margin-left: 24px;
linxin's avatar
linxin committed
1203
      height: 55px;
linxin's avatar
linxin committed
1204 1205 1206 1207 1208 1209 1210 1211 1212
      span {
        font-family: PingFangSC-Semibold;
        font-size: 18px;
        color: #fff;
        margin-top: 10px;
      }
      div {
        display: flex;
        align-items: center;
1213
        margin-top: 10px;
linxin's avatar
linxin committed
1214 1215 1216 1217 1218 1219 1220 1221
        font-family: PingFangSC-Regular;
        font-size: 12px;
        color: #ffffff;
        letter-spacing: 0;
        p {
          display: flex;
          align-items: center;
          justify-content: center;
linxin's avatar
linxin committed
1222
          padding: 0 5px;
linxin's avatar
linxin committed
1223 1224 1225 1226 1227 1228 1229 1230 1231
          height: 20px;
          margin-left: 10px;
          border: 1px solid #fff;
          border-radius: 4px;
          font-family: PingFangSC-Regular;
          font-size: 12px;
          color: #ffffff;
          letter-spacing: 0;
        }
linxin's avatar
linxin committed
1232 1233
        .across {
          background-color: #1d3fff;
linxin's avatar
linxin committed
1234
        }
linxin's avatar
linxin committed
1235
        .un-across {
linxin's avatar
linxin committed
1236 1237 1238
          background: #0523ce;
        }
      }
1239 1240

      .now-bind {
胡's avatar
committed
1241 1242 1243 1244
        display: flex;
        min-width: 220px;
        justify-content: space-between;
        align-items: center;
1245

胡's avatar
committed
1246
        span {
胡's avatar
committed
1247
          font-size: 15px;
胡's avatar
committed
1248 1249
          color: orange;
          margin: 0;
胡's avatar
committed
1250 1251 1252 1253
          max-width: 180px;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
胡's avatar
committed
1254
        }
1255

胡's avatar
committed
1256 1257 1258 1259 1260 1261 1262 1263
        div {
          color: orange;
          border: 1px solid orange;
          padding: 2px 5px;
          border-radius: 2px;
          cursor: pointer;
          margin: 0;
        }
1264
      }
linxin's avatar
linxin committed
1265 1266 1267 1268 1269 1270 1271 1272
    }
    img {
      width: 59px;
      height: 59px;
      border-radius: 50%;
      border: 1px solid #00469c;
    }
  }
1273

胡's avatar
committed
1274 1275
  .bind-user {
    background-color: #efefef;
1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292
    .box {
      box-sizing: border-box;
      width: 90%;
      background-color: #fff;
      margin: 0 auto;
      transform: translateY(-12px);
      min-height: 70px;
      border-radius: 10px;
      padding: 10px 10px 0 10px;
    }
    .title {
      color: rgb(252, 205, 46);
      font-size: 90%;
      font-weight: 600;
      margin-bottom: 10px;
    }

胡's avatar
committed
1293
    .no-user {
1294 1295 1296
      line-height: 50px;
      text-align: center;
      color: rgb(205, 209, 213);
胡's avatar
committed
1297
      font-size: 90%;
1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311

      a {
        text-decoration: underline;
      }
    }

    .bind-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: 30px;
      font-size: 85%;
      border-bottom: 1px solid rgb(242, 242, 242);
      color: #333;
胡's avatar
committed
1312 1313
      p {
      }
1314 1315 1316 1317 1318 1319

      div {
        font-size: 75%;
        border-radius: 3px;
        border: 1px solid blue;
        padding: 2px 3px;
胡's avatar
committed
1320
        color: blue;
1321 1322 1323 1324 1325
      }
    }

    .more {
      height: 31px;
胡's avatar
committed
1326 1327 1328
      display: flex;
      justify-content: center;
      align-items: center;
1329 1330
      color: rgb(213, 217, 224);
      font-size: 85%;
胡's avatar
committed
1331 1332
      // text-align: center;
      // line-height: 31px;
1333 1334 1335 1336
      font-weight: 600;
    }
  }

Jennie Shi's avatar
Jennie Shi committed
1337 1338 1339 1340 1341
  .has {
    height: 206px;
  }
  .antiHas {
    height: 3.12rem;
linxin's avatar
linxin committed
1342
  }
linxin's avatar
linxin committed
1343 1344
  .top {
    width: 100%;
linxin's avatar
linxin committed
1345
    // height: 206px;
linxin's avatar
linxin committed
1346
    background: url("../../assets/myInfo/back.png") no-repeat;
linxin's avatar
linxin committed
1347
    background-size: 100% 156px;
linxin's avatar
linxin committed
1348
    background-color: #efefef;
linxin's avatar
linxin committed
1349 1350 1351 1352 1353 1354 1355 1356 1357 1358
    .header {
      background-color: rgba(0, 0, 0, 0);
      .top-word {
        font-family: PingFangSC-Semibold;
        font-size: 17px;
        letter-spacing: 0.61px;
        color: #fff;
      }
    }
    .card {
linxin's avatar
linxin committed
1359 1360
      width: 359px;
      height: 108px;
linxin's avatar
linxin committed
1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375
      margin: 0 auto;
      z-index: 10;
      position: relative;
      top: 0px;
      left: 0px;
      background-color: #fff;
      border-radius: 4px;
      .card-info {
        width: 295px;
        margin: 0 auto;
        .card-bottom {
          height: 100px;
          width: 285px;
          margin: 0 auto;
          display: flex;
1376
          justify-content: flex-start;
linxin's avatar
linxin committed
1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388
          align-items: center;
          text-align: center;
          p {
            font-family: PingFangSC-Regular;
            font-size: 13px;
            color: #3c3d48;
            margin-top: 5px;
          }
          img {
            width: 48px;
            height: 48px;
          }
1389 1390
          div:not(:first-child) {
            margin-left: 60px;
1391
          }
linxin's avatar
linxin committed
1392 1393 1394 1395
        }
      }
    }
  }
1396
  .my-content {
胡's avatar
committed
1397
    overflow: hidden;
linxin's avatar
linxin committed
1398
    background-color: #efefef;
linxin's avatar
linxin committed
1399 1400
    display: flex;
    justify-content: center;
1401 1402
    flex-wrap: wrap;
    .content-top {
胡's avatar
committed
1403
       overflow-y: scroll;
邹骏's avatar
邹骏 committed
1404
      width: 339px;
胡's avatar
committed
1405 1406 1407
      height: 96%;
      // height: 121px;
      background-color: #efefef;
linxin's avatar
linxin committed
1408
      border-radius: 4px;
linxin's avatar
linxin committed
1409
      margin-top: 8px;
邹骏's avatar
邹骏 committed
1410
      .version {
胡's avatar
committed
1411
        background-color: #efefef;
邹骏's avatar
邹骏 committed
1412 1413 1414 1415
        padding: 10px 0;
        text-align: center;
        font-family: PingFangSC-Regular;
        font-size: 14px;
Jennie Shi's avatar
Jennie Shi committed
1416
        color: #656464;
邹骏's avatar
邹骏 committed
1417
      }
linxin's avatar
linxin committed
1418
    }
linxin's avatar
linxin committed
1419 1420 1421
    .userInfo {
      height: 45px;
      line-height: 45px;
linxin's avatar
linxin committed
1422
      color: @headerColor;
linxin's avatar
linxin committed
1423 1424 1425 1426 1427 1428 1429 1430 1431
      font-size: 15px;
      margin-left: 16px;
      position: relative;
    }
    .userInfo::before {
      content: "";
      display: block;
      width: 4px;
      height: 20px;
linxin's avatar
linxin committed
1432
      background-color: @headerColor;
linxin's avatar
linxin committed
1433 1434 1435 1436 1437
      position: absolute;
      left: -15px;
      top: 12px;
    }
    .my-contract {
Jennie Shi's avatar
Jennie Shi committed
1438
      // width: 295px;
linxin's avatar
linxin committed
1439 1440
      margin: 0 auto;
      display: flex;
linxin's avatar
linxin committed
1441 1442
      // justify-content: space-around;
      // align-items: center;
Jennie Shi's avatar
Jennie Shi committed
1443
      // flex:1;
linxin's avatar
linxin committed
1444
      text-align: center;
李晓兵's avatar
李晓兵 committed
1445 1446
      padding: 0 6%;
      justify-content: flex-start;
linxin's avatar
linxin committed
1447
      .content-wrap {
李晓兵's avatar
李晓兵 committed
1448
        position: relative;
邹骏's avatar
邹骏 committed
1449
        width: 50%;
李晓兵's avatar
李晓兵 committed
1450 1451 1452 1453
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
linxin's avatar
linxin committed
1454
        .content-wrap-class {
李晓兵's avatar
李晓兵 committed
1455 1456
          position: absolute;
          top: -10px;
李晓兵's avatar
李晓兵 committed
1457
          left: 56px;
李晓兵's avatar
李晓兵 committed
1458
          font-size: 10px;
1459 1460
          width: 18px;
          height: 18px;
李晓兵's avatar
李晓兵 committed
1461
          text-align: center;
1462
          line-height: 18px;
李晓兵's avatar
李晓兵 committed
1463 1464 1465 1466
          background-color: red;
          color: #fff;
          border-radius: 50%;
        }
linxin's avatar
linxin committed
1467
        .content-wrap-class-width {
李晓兵's avatar
李晓兵 committed
1468 1469 1470 1471
          position: absolute;
          top: -10px;
          left: 25px;
          font-size: 10px;
1472 1473
          width: 24px;
          height: 18px;
李晓兵's avatar
李晓兵 committed
1474
          text-align: center;
1475
          line-height: 18px;
李晓兵's avatar
李晓兵 committed
1476 1477 1478 1479 1480
          background-color: red;
          color: #fff;
          border-radius: 50%;
        }
      }
linxin's avatar
linxin committed
1481 1482 1483 1484 1485 1486 1487 1488 1489 1490
      img {
        width: 38px;
        height: 38px;
      }
      p {
        font-family: PingFangSC-Regular;
        font-size: 12px;
        color: #383f45;
        margin-top: 5px;
      }
Jennie Shi's avatar
Jennie Shi committed
1491
      /* div:not(:first-child) {
1492
        margin-left: 85px;
李晓兵's avatar
李晓兵 committed
1493
      }*/
linxin's avatar
linxin committed
1494 1495
    }
    .list {
邹骏's avatar
邹骏 committed
1496
      width: 339px;
linxin's avatar
linxin committed
1497 1498
      margin: 0 auto;
      background-color: #fff;
linxin's avatar
linxin committed
1499 1500 1501 1502 1503 1504 1505 1506
      font-family: PingFangSC-Regular;
      font-size: 14px;
      color: #656464;
      letter-spacing: 0;
      line-height: 18px;
    }
  }
  button {
邹骏's avatar
邹骏 committed
1507
    width: 339px;
linxin's avatar
linxin committed
1508
    height: 40px;
linxin's avatar
linxin committed
1509
    background: @headerColor;
linxin's avatar
linxin committed
1510 1511
    border-radius: 4px;
    color: #fff;
linxin's avatar
linxin committed
1512
    margin: 0 auto;
李晓兵's avatar
李晓兵 committed
1513
    margin-bottom: 68px;
linxin's avatar
linxin committed
1514
    margin-top: 10px;
linxin's avatar
linxin committed
1515 1516 1517
  }
}
.content {
Jennie Shi's avatar
Jennie Shi committed
1518
  position: relative;
linxin's avatar
linxin committed
1519
  background-color: #fff;
linxin's avatar
linxin committed
1520
}
linxin's avatar
linxin committed
1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540
.right-icon {
  width: 18px;
  height: 18px;
  font-size: 10px;
  text-align: center;
  line-height: 18px;
  background-color: red;
  color: #fff;
  border-radius: 50%;
}
.right-icon-width {
  width: 24px;
  height: 18px;
  font-size: 10px;
  text-align: center;
  line-height: 18px;
  background-color: red;
  color: #fff;
  border-radius: 50%;
}
1541 1542 1543 1544
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
  .platform-ios {
    #my-info {
      button {
linxin's avatar
linxin committed
1545
        margin-bottom: 98px;
1546 1547 1548 1549 1550 1551 1552 1553 1554
      }
    }
  }
}
// iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) {
  .platform-ios {
    #my-info {
      button {
linxin's avatar
linxin committed
1555
        margin-bottom: 98px;
1556 1557 1558 1559
      }
    }
  }
}
李晓兵's avatar
李晓兵 committed
1560
</style>