123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349 |
- <template>
- <div class="mainBox">
- <div class="mainContent">
- <!-- <h1 class="title">我的</h1>
- <div class="information">
- <div class="blueBorder"></div>
- <div class="name">
- <router-link to="/EditPersonal">
- <div class="item">
- <div class="tx">
- <img :src="myinfo.avatar" alt v-if="myinfo.avatar != ''" />
- <img :src="avatar" alt v-if="myinfo.avatar == ''" />
- </div>
- <span class="iconfont"></span>
- </div>
- </router-link>
- </div>
- <div class="name">
- <router-link to="/ElectronicSignature">
- <div class="item">
- <div class="tx">
- <img :src="electronicsignature" alt v-if="electronicsignature" />
- <h2>电子签名</h2>
- </div>
- <span class="iconfont"></span>
- </div>
- </router-link>
- </div>
- <div class="set" v-show="false">
- <div class="item">
- <div class="tx">
- <img src="@/assets/my/12.png" alt />
- <h2>消息通知</h2>
- </div>
- <span class="iconfont"></span>
- </div>
- <div class="item">
- <div class="tx">
- <img src="@/assets/my/13.png" alt />
- <h2>系统设置</h2>
- </div>
- <span class="iconfont"></span>
- </div>
- <div class="item">
- <div class="tx">
- <img src="@/assets/my/14.png" alt />
- <h2>软件更新</h2>
- </div>
- <span class="iconfont"></span>
- </div>
- <div class="item">
- <div class="tx">
- <img src="@/assets/my/15.png" alt />
- <h2>使用帮助</h2>
- </div>
- <span class="iconfont"></span>
- </div>
- <div class="item">
- <div class="tx">
- <img src="@/assets/my/16.png" alt />
- <h2>关于我们</h2>
- </div>
- <span class="iconfont"></span>
- </div>
- </div>
- <div class="set">
- <span class="out" @click="logout">退出登录</span>
- </div>
- </div>-->
- <!-- <div class="myTitle">我的</div> -->
- <div class="mybanner">
- <img class="bannerOne" src="../../assets/my/myBanner.png" alt />
- <div class="avatar">
- <img src="../../assets/my/avatar.png" alt />
- <p>{{ user_name }}</p>
- </div>
- </div>
- <div class="list">
- <router-link to="/ElectronicSignature">
- <div class="name">
- <div class="left">
- <img src="../../assets/my/name.png" alt />
- <span>电子签名</span>
- </div>
- <span class="iconfont jiantou"></span>
- </div>
- </router-link>
- <!-- <router-link to="/ChangePassword"> -->
- <div class="name" @click="okk">
- <div class="left">
- <img src="../../assets/my/modification.png" alt />
- <span>修改密码</span>
- </div>
- <span class="iconfont jiantou"></span>
- </div>
- <!-- </router-link> -->
- <div class="name" @click="logout">
- <div class="left">
- <img src="../../assets/my/exit.png" alt />
- <span>退出登录</span>
- </div>
- <span class="iconfont jiantou"></span>
- </div>
- </div>
- </div>
- <side-bar :active_index="3"></side-bar>
- </div>
- </template>
-
- <script>
- import SideBar from "@/pages/layout/SideBar";
- import EditPersonal from "./EditPersonal";
- import { GetMyInfo } from "@/api/admin_user";
- import { Toast } from "vant";
-
- export default {
- name: "PersonalIndex",
- components: {
- SideBar,
- EditPersonal
- },
- data() {
- return {
- electronicsignature: "",
- myinfo: {},
- avatar: "@/assets/product/test.jpg",
- user_name: ""
- };
- },
- created() {
- this.GetMyInfo();
- },
- methods: {
- GetMyInfo() {
- GetMyInfo().then(response => {
- if (response.data.state == 1) {
- var roleInfo = response.data.data.roleInfo;
- this.user_name = roleInfo.user_name;
- console.log("hhhhhhhhhhhhh", response.data.data.roleInfo);
- this.electronicsignature =
- response.data.data.electronic_signature === null
- ? ""
- : response.data.data.electronic_signature.url;
- this.myinfo =
- response.data.data.roleInfo === null
- ? {}
- : response.data.data.roleInfo;
- }
- });
- },
- logout: function() {
- // TODO 请求退出登录接口
- this.$router.push("/");
- },
- okk() {
- Toast.success("程序员还在开发中");
- }
- }
- };
- </script>
-
- <style style="stylesheet/scss" lang="scss" scoped>
- .mainContent {
- .title {
- font-size: 0.36rem;
- padding: 0.3rem 0;
- // color: $title-color;
- text-align: center;
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- z-index: 1000;
- background: #fff;
- }
- .information {
- width: 100%;
- margin: 0 auto;
- padding-top: 63px;
- min-height: calc(100vh - 2px);
- .name {
- background: #fff;
- width: 70%;
- margin: 0 auto;
- border-bottom: 1px #e5e5e5 solid;
- .item {
- padding: 0.37rem 0.4rem;
- @include align-items-center;
- @include display-flex;
- @include justify-content-between;
- @include text-align;
- .tx {
- @include display-flex;
- @include align-items-center;
- @include text-align;
- width: 1.24rem;
- height: 1.24rem;
- border-radius: 50%;
- margin-right: 0.26rem;
- overflow: hidden;
- box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
- img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
- h2 {
- color: #34495e;
- font-size: 0.34rem;
- }
- }
- .iconfont {
- font-size: 0.4rem;
- }
- }
- &:last-child {
- border: none;
- }
- }
-
- .set {
- background: #fff;
- width: 70%;
- margin: 0 auto;
- border-radius: 4px;
- margin-top: 0.3rem;
- .item {
- padding: 0.3rem;
- @include align-items-center;
- @include display-flex;
- @include justify-content-between;
- @include text-align;
- border-bottom: 1px #e5e5e5 solid;
- &:last-child {
- border: none;
- }
- .tx {
- @include display-flex;
- @include align-items-center;
- @include text-align;
- img {
- width: 0.42rem;
- height: 0.42rem;
- border-radius: 50%;
- display: inline-block;
- margin-right: 0.3rem;
- }
- h2 {
- color: #34495e;
- font-size: 0.3rem;
- }
- }
- }
- .out {
- text-align: center;
- height: 0.9rem;
- line-height: 0.9rem;
- display: block;
- color: #f18f68;
- font-size: 0.34rem;
- }
- }
- }
- }
- .el-collapse-item__header {
- font-size: 0.3rem !important;
- }
- .mainBox {
- height: 100%;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- > :first-child {
- flex: 1;
- overflow: auto;
- }
- .myTitle {
- height: 1.4rem;
- line-height: 1.4rem;
- width: 100%;
- background: #3275fd;
- text-align: center;
- color: #fff;
- font-size: 0.6rem;
- }
- .mybanner {
- height: 30%;
- position: relative;
- .bannerOne {
- position: absolute;
- }
- img {
- width: 100%;
- height: 100%;
- }
- .avatar {
- position: absolute;
- width: 4rem;
- top: 1.3rem;
- left: 0;
- right: 0;
- bottom: 0;
- margin: auto;
- text-align: center;
- img {
- width: 2.5rem;
- height: 2.5rem;
- }
- p {
- font-size: 0.5rem;
- color: #fff;
- margin-top: 0.2rem;
- }
- }
- }
- .name {
- display: flex;
- height: 1.8rem;
- line-height: 1.8rem;
- background: #fff;
- margin: 0 0.4rem;
- padding: 0 0.4rem;
- display: flex;
- justify-content: space-between;
- border-radius: 5px;
- margin-top: 0.5rem;
- .left {
- height: 100%;
- line-height: 1.8rem;
- display: flex;
- align-items: center;
- span {
- color: #34495e;
- font-size: 0.5rem;
- margin-left: 0.4rem;
- }
- }
- img {
- width: 1rem;
- height: 1rem;
- display: inline-block;
- }
- .jiantou {
- font-size: 0.6rem;
- }
- }
- }
- </style>
|