info.vue 14.3 KB
Newer Older
M
maguohua 已提交
1
 <template>
M
update  
maguohua 已提交
2
    <div class="rating_page">
M
update  
maguohua 已提交
3 4 5 6 7 8
        <head-top head-title="账户信息" go-back='true'></head-top>
        <section class="profile-info">
            <section class="headportrait">
                <input type="file" class="profileinfopanel-upload">
                <h2>头像</h2>
                <div class="headportrait-div">
M
update  
maguohua 已提交
9 10
                    <img :src="imgPath" class="headportrait-div-top" v-if="this.avatarinfo">
                    <span class="headportrait-div-top" v-else>
M
update  
maguohua 已提交
11 12 13 14 15 16 17 18 19 20 21
                        <svg class="">
                            <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#avatar-default"></use>
                        </svg>
                    </span>
                    <span class="headportrait-div-bottom">
                        <svg fill="#d8d8d8">
                            <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#arrow-right"></use>
                        </svg>
                    </span>
                </div>
            </section>
M
update  
maguohua 已提交
22
            <router-link to="/profile/setusername" class="info-router">
M
update  
maguohua 已提交
23
                <section class="headportrait headportraitwo">
M
update  
maguohua 已提交
24 25 26 27 28 29 30 31 32
                    <h2>用户名</h2>
                    <div class="headportrait-div">
                        <p>{{username}}</p>
                        <span class="headportrait-div-bottom">
                            <svg fill="#d8d8d8">
                                <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#arrow-right"></use>
                            </svg>
                        </span>
                    </div>
M
update  
maguohua 已提交
33 34
                </section>
            </router-link>
M
update  
maguohua 已提交
35
            <router-link to="/profile/info/address" class="info-router">
M
update  
maguohua 已提交
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
                <section class="headportrait headportraitwo headportraithree">
                        <h2>收货地址</h2>
                        <div class="headportrait-div">
                            <span class="headportrait-div-bottom">
                                <svg fill="#d8d8d8">
                                    <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#arrow-right"></use>
                                </svg>
                            </span>
                        </div>
                </section>
            </router-link>
            <section class="bind-phone">
                账号绑定
            </section>
            <router-link to="" class="info-router">
                <section class="headportrait headportraitwo headportraithree">
                        <h2><img src="../../../images/bindphone.png" style="display:inline-block;margin-right:.4rem;" alt="">手机</h2>
                        <div class="headportrait-div">
M
update  
maguohua 已提交
54
                            <p>{{infotel}}</p>
M
update  
maguohua 已提交
55 56 57 58 59 60 61 62 63 64 65
                            <span class="headportrait-div-bottom">
                                <svg fill="#d8d8d8">
                                    <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#arrow-right"></use>
                                </svg>
                            </span>
                        </div>
                </section>
            </router-link>
            <section class="bind-phone">
                安全设置
            </section>
M
update  
maguohua 已提交
66
            <router-link to="/forget" class="info-router">
M
update  
maguohua 已提交
67 68 69 70 71 72 73 74 75 76 77 78
                <section class="headportrait headportraitwo headportraithree">
                        <h2>登录密码</h2>
                        <div class="headportrait-div">
                            <p>修改</p>
                            <span class="headportrait-div-bottom">
                                <svg fill="#d8d8d8">
                                    <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#arrow-right"></use>
                                </svg>
                            </span>
                        </div>
                </section>
            </router-link>
M
update  
maguohua 已提交
79
            <section class="exitlogin" @click="exitlogin">退出登录</section>
M
update  
maguohua 已提交
80 81
        </section>

M
update  
maguohua 已提交
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
        <section class="coverpart" v-if="show">
            <section class="cover-background"></section>
            <section class="cover-content " :class="{'cover-animate' : isEnter, 'cover-animate-leave' : isLeave}">
                <div class="sa-icon">
                    <span class="sa-body"></span>
                    <span class="sa-dot"></span>
                </div>
                <h2>是否退出登录</h2>
                <div class="sa-botton">
                    <button class="waiting" @click="waitingThing">再等等</button>
                    <div style="display:inline-block;">
                        <button class="quitlogin"  @click="outLogin">退出登录</button>
                    </div>
                </div>
            </section>
        </section>
M
update  
maguohua 已提交
98 99 100
        <transition name="router-slid">
            <router-view></router-view>
        </transition>
M
maguohua 已提交
101 102 103 104
    </div>
</template>

<script>
M
update  
maguohua 已提交
105
    import {mapMutations, mapState} from 'vuex'
M
maguohua 已提交
106
    import headTop from '../../../components/header/head'
M
update  
maguohua 已提交
107 108
    import {imgBaseUrl} from '../../../config/env'
    //import {getImgPath} from '../../../components/common/mixin'
M
maguohua 已提交
109 110

    export default {
M
update  
maguohua 已提交
111
        data(){
M
maguohua 已提交
112
            return{
M
update  
maguohua 已提交
113 114
                username:'',    //用户名
                resetname:'',
M
update  
maguohua 已提交
115
                infotel:'',     //用户手机
M
update  
maguohua 已提交
116 117
                getUsermes:{},  //用户信息
                avatarinfo:'',      //用户头像
M
update  
maguohua 已提交
118 119 120
                show:false,
                isEnter:true,
                isLeave:false,
M
update  
maguohua 已提交
121
                imgBaseUrl,
M
maguohua 已提交
122 123 124
            }
        },
        created(){
M
update  
maguohua 已提交
125 126 127 128 129 130 131 132 133 134
            this.getUsermes=this.userInfo;
            if(this.userInfo){ 
                this.username=this.getUsermes.username;
                this.infotel=this.getUsermes.mobile;
                this.avatarinfo=this.getUsermes.avatar;
            }
        },
        mounted(){
            
            
M
update  
maguohua 已提交
135 136 137
        },
        beforeDestroy(){
            clearTimeout(this.timer)
M
maguohua 已提交
138
        },
M
update  
maguohua 已提交
139
        //mixins: [getImgPath],
M
maguohua 已提交
140
        components: {
M
update  
maguohua 已提交
141
            headTop, 
M
maguohua 已提交
142 143 144

        },
        props:[],
M
update  
maguohua 已提交
145 146 147 148 149 150
        computed:{
             ...mapState([
                'userInfo', 'imgPath'
            ]),

        },
M
maguohua 已提交
151
        methods: {
M
update  
maguohua 已提交
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
            ...mapMutations([
                'OUT_LOGIN'
            ]),
            exitlogin(){
                this.show=true;
                this.isEnter=true;
                this.isLeave=false;
            },
            waitingThing(){
                clearTimeout(this.timer)
                this.isEnter=false;
                this.isLeave=true;
                this.timer = setTimeout(() =>{
                    clearTimeout(this.timer)
                    this.show=false;
                },200)
            },
            outLogin(){
                this.OUT_LOGIN();
                this.waitingThing();
                this.$router.go(-1);
            },
M
maguohua 已提交
174
        }
M
update  
maguohua 已提交
175

M
maguohua 已提交
176 177 178 179
    }
</script>
  
<style lang="scss" scoped>
M
update  
maguohua 已提交
180
    @import '../../../style/mixin.scss';
M
maguohua 已提交
181
  
M
update  
maguohua 已提交
182
    .rating_page{
M
maguohua 已提交
183 184 185 186 187
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
M
update  
maguohua 已提交
188
        background-color: #f2f2f2;
M
maguohua 已提交
189 190 191 192 193 194
        z-index: 202;
        padding-top: 1.95rem;
        p, span{
            font-family: Helvetica Neue,Tahoma,Arial;
        }
    }
M
update  
maguohua 已提交
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228
    .profile-info{
        @include wh(100%,3.1rem);
        .profileinfopanel-upload{
            display: block;
            position: absolute;
            opacity: 0;
            top: 2.35rem;
            left: 0;
            @include wh(100%,3.1rem);
        }
        .headportrait{
            margin-top:.4rem;
            padding:.5rem .4rem;
            @include fj(space-between);
            align-items:center;
            border-top:1px solid #ddd;
            background:#fff;

            h2{
                @include sc(.6rem,#333);
                font-weight:500;
                display:flex;
                align-items:center;
            }
            .headportrait-div{
                span{
                    display:inline-block;
                    
                    svg{
                        @include wh(100%,100%);
                    }
                }
                .headportrait-div-top{
                    @include wh(2rem,2rem);
M
update  
maguohua 已提交
229
                    @include borderRadius(50%);
M
update  
maguohua 已提交
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
                    vertical-align:middle;
                }
                .headportrait-div-bottom{
                    @include wh(.66667rem,1.4rem);
                    position:relative;
                    top:0.44rem;
                }
            }
        }
        .headportraitwo{
            margin-top:0;
            padding:.3rem .4rem;
            .headportrait-div{
                @include fj(left) 
                p{
                    text-align:left;
                    line-height:1.39rem;
                    @include sc(.7rem,#999);
                    margin-right:.2rem;
                    font-weight:100;
                    font-family:Arial;
                }
                .headportrait-div-bottom{
                    top:0;
                }
            }
        }
        .headportraithree{
            border-bottom:1px solid #ddd;
        }
        .bind-phone{
            padding:.4rem .4rem;
            @include sc(.5rem,#666);
        }
        .exitlogin{
            width:96%;
            margin:1.3rem auto 0;
            line-height:1.5rem;
M
update  
maguohua 已提交
268
            @include borderRadius(5px);
M
update  
maguohua 已提交
269 270 271 272 273 274 275
            text-align:center;
            background:#d8584a;
            @include sc(.6rem,#fff);

        }
        .exitlogin:active{
            opacity:.8;
M
update  
maguohua 已提交
276
            background:#C1C1C1;
M
update  
maguohua 已提交
277 278 279 280 281
        }
    }
    .info-router{
        display:block;
    }
M
update  
maguohua 已提交
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 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 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468
    .coverpart{
        @include wh(100%,100%);
        @include allcover;
        .cover-background{
            @include wh(100%,100%);
            @include allcover;
            background:#000;
            z-index:100;
            opacity:.2;
        }
        .cover-content{
            width:94%;
            background:$fc;
            padding:17px;
            position:absolute;
            top:20%;
            left:3%;
            z-index:1000;
            @include borderRadius(5px);
            .sa-icon{
                @include wh(90px,90px);
                border:4px solid #f8bb86;
                @include borderRadius(50%);
                margin:20px auto;
                position:relative;
                .sa-body{
                    @include wh(5px,47px);
                    @include borderRadius(2px);
                    background:#f8bb86;
                    @include cl;
                    top:10px;
                }
                .sa-dot{
                    @include wh(7px,7px);
                    @include borderRadius(50%);
                    background:#f8bb86;
                    @include cl;
                    bottom:10px;
                }
            }
            h2{
                width:100%;
                text-align:center;
                @include sc(30px,#575757);
                font-weight:500;
                margin:25px 0;
            }
            .sa-botton{
                width:100%;
                text-align:center;

                button{
                    display:inline-block;
                    padding:.4rem 1rem;
                    @include borderRadius(5px);
                    @include sc(.6rem,$fc);
                    letter-spacing:1px;
                    margin-top:26px;
                }
                .waiting{
                    background:#C1C1C1;
                    margin-right:.4rem;
                }
                .quitlogin{
                    background:rgb(221, 107, 85);
                }
            }

        }
    }
    @-webkit-keyframes bounceIn {
  from, 20%, 40%, 60%, 80%, 100% {
    -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  }

  0% {
    opacity: 0;
    -webkit-transform: scale3d(.3, .3, .3);
    transform: scale3d(.3, .3, .3);
  }

  20% {
    -webkit-transform: scale3d(1.1, 1.1, 1.1);
    transform: scale3d(1.1, 1.1, 1.1);
  }

  40% {
    -webkit-transform: scale3d(.9, .9, .9);
    transform: scale3d(.9, .9, .9);
  }

  60% {
    opacity: 1;
    -webkit-transform: scale3d(1.03, 1.03, 1.03);
    transform: scale3d(1.03, 1.03, 1.03);
  }

  80% {
    -webkit-transform: scale3d(.97, .97, .97);
    transform: scale3d(.97, .97, .97);
  }

  100% {
    opacity: 1;
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
  }
}

@keyframes bounceIn {
  from, 20%, 40%, 60%, 80%, 100% {
    -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  }

  0% {
    opacity: 0;
    -webkit-transform: scale3d(.3, .3, .3);
    transform: scale3d(.3, .3, .3);
  }

  20% {
    -webkit-transform: scale3d(1.1, 1.1, 1.1);
    transform: scale3d(1.1, 1.1, 1.1);
  }

  40% {
    -webkit-transform: scale3d(.9, .9, .9);
    transform: scale3d(.9, .9, .9);
  }

  60% {
    opacity: 1;
    -webkit-transform: scale3d(1.03, 1.03, 1.03);
    transform: scale3d(1.03, 1.03, 1.03);
  }

  80% {
    -webkit-transform: scale3d(.97, .97, .97);
    transform: scale3d(.97, .97, .97);
  }

  100% {
    opacity: 1;
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
  }
}
@-webkit-keyframes zoomOut {
  from {
    opacity: 1;
  }

  50% {
    opacity: 0;
    -webkit-transform: scale3d(.3, .3, .3);
    transform: scale3d(.3, .3, .3);
  }

  100% {
    opacity: 0;
  }
}

@keyframes zoomOut {
  from {
    opacity: 1;
  }

  50% {
    opacity: 0;
    -webkit-transform: scale3d(.3, .3, .3);
    transform: scale3d(.3, .3, .3);
  }

  100% {
    opacity: 0;
  }
}
body .coverpart .cover-animate{
    transition:all 1s;
    animation:bounceIn .6s;
}
body .coverpart .cover-animate-leave{
    animation:zoomOut .4s;
}
M
update  
maguohua 已提交
469 470 471 472 473 474
.router-slid-enter-active, .router-slid-leave-active {
    transition: all .4s;
}
.router-slid-enter, .router-slid-leave-active {
    transform: translateX(100%);
}
M
maguohua 已提交
475
</style>