zhaoxiaoqiang
2022-08-05 61775d570c47ece618c897281202018ddd1e7483
我的
3 files modified
14 ■■■■ changed files
src/views/personal/personal-center.vue 10 ●●●● patch | view | raw | blame | history
src/views/user/front-login.vue 2 ●●● patch | view | raw | blame | history
src/views/user/login.vue 2 ●●● patch | view | raw | blame | history
src/views/personal/personal-center.vue
@@ -2,17 +2,17 @@
 * @Author: 小明丶
 * @Date: 2020-05-21 16:03:42
 * @LastEditors: zxq
 * @LastEditTime: 2022-06-15 09:41:41
 * @LastEditTime: 2022-08-05 11:41:55
 * @Description: 
--> 
<template>
  <div class="personal-center-page">
    <div class="top-box">
      <div class="top-img-box">
        <img :src="mation.headimgurl" alt="头像" />
        <img src="../../../static/img/touxiang.png" alt="头像" />
      </div>
      <div class="top-info-box">
        <p>{{mation.nickname}}</p>
        <!-- <p>{{mation.nickname}}</p> -->
        <p>{{userinfo.mblNo}}</p>
      </div>
      <div :class="{'fn-box':true,'fn_box1':!userinfo.hasBankCard,'fn_box':userinfo.hasBankCard}">
@@ -54,8 +54,8 @@
  computed:{
    ...mapState(['userinfo']),
    mation(){
      if(localStorage.edu_ins_client_userMation){
        return JSON.parse(localStorage.edu_ins_client_userMation)
      if(localStorage.axx_ins_client_userMation){
        return JSON.parse(localStorage.axx_ins_client_userMation)
      }
    }
  },
src/views/user/front-login.vue
@@ -27,7 +27,7 @@
  created() {
    var _this = this;
    // localStorage.axx_ins_client_openId = 'oJbj21YwUatdNaYf3iEPwwGtWuUg'
    // localStorage.edu_ins_client_userMation = '{"openid":"oGGPLs2yZ5tiBnB9iYcZrV60DoqM","nickname":"乌卡拉卡","sex":"1","province":"四川","city":"成都","country":"中国","headimgurl":"http://thirdwx.qlogo.cn/mmopen/vi_32/sYsBGsncFia9ql7K5stRibY61BSjDkPkNQFiasqdHiczTwbnX7JeZhcrp49RZD9icFTDLd2JqUjIrHHVw0f52kE4Uibw/132"}'
    // localStorage.axx_ins_client_userMation = '{"openid":"oGGPLs2yZ5tiBnB9iYcZrV60DoqM","nickname":"乌卡拉卡","sex":"1","province":"四川","city":"成都","country":"中国","headimgurl":"http://thirdwx.qlogo.cn/mmopen/vi_32/sYsBGsncFia9ql7K5stRibY61BSjDkPkNQFiasqdHiczTwbnX7JeZhcrp49RZD9icFTDLd2JqUjIrHHVw0f52kE4Uibw/132"}'
    // this.$router.push("/login");
    //本地是否存储有openId,有就调用openId登录
    if (localStorage.axx_ins_client_openId && localStorage.axx_ins_client_openId != undefined) {
src/views/user/login.vue
@@ -116,7 +116,7 @@
      this.$api.wechatUserInfo({ code: this.code}).then(res => {
          console.log('res.body.openid:',res.body.openid)
          localStorage.axx_ins_client_openId = res.body.openid;
          localStorage.edu_ins_client_userMation = JSON.stringify(res.body);
          localStorage.axx_ins_client_userMation = JSON.stringify(res.body);
      });
    }
  },