parent
330917a76f
commit
81dec0fb22
@ -1,8 +1,33 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function login () {
|
||||
export function login (params) {
|
||||
return request({
|
||||
url: '/api/mobile/user/login',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function userInfo (params) {
|
||||
return request({
|
||||
url: '/api/mobile/user/userinfo',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function sendSms (params) {
|
||||
return request({
|
||||
url: '/api/mobile/user/send_sms',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function updateLog (params) {
|
||||
return request({
|
||||
url: '/api/mobile/user/update_log',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@ -1,18 +1,18 @@
|
||||
import Cookies from 'js-cookie'
|
||||
import router from '@/router'
|
||||
const TokenKey = 'difficult_employee_query_token'
|
||||
const TokenKsy_h5 = 'difficult_employee_query_token_h5'
|
||||
const TokenKey = 'difficult_employee_token'
|
||||
const TokenKsy_h5 = 'difficult_employee_token_h5'
|
||||
export function getToken() {
|
||||
let flag = /^\/h5.*/.test(router.currentRoute.path)
|
||||
let flag = /\/h5.*/.test(window.location.href)
|
||||
return Cookies.get(flag ? TokenKsy_h5 : TokenKey)
|
||||
}
|
||||
|
||||
export function setToken(token) {
|
||||
let flag = /^\/h5.*/.test(router.currentRoute.path)
|
||||
let flag = /\/h5.*/.test(window.location.href)
|
||||
return Cookies.set(flag ? TokenKsy_h5 : TokenKey, token)
|
||||
}
|
||||
|
||||
export function removeToken() {
|
||||
let flag = /^\/h5.*/.test(router.currentRoute.path)
|
||||
let flag = /\/h5.*/.test(window.location.href)
|
||||
return Cookies.remove(flag ? TokenKsy_h5 : TokenKey)
|
||||
}
|
||||
|
||||
@ -1,17 +1,151 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="page">
|
||||
<div class="content-section">
|
||||
<div class="content-section-title">个人信息</div>
|
||||
<ul>
|
||||
<li>
|
||||
<div class="products">
|
||||
<!-- <svg viewBox="0 0 52 52" style="border:1px solid #3291b8">-->
|
||||
<!-- <g xmlns="http://www.w3.org/2000/svg">-->
|
||||
<!-- <path d="M40.824 52H11.176C5.003 52 0 46.997 0 40.824V11.176C0 5.003 5.003 0 11.176 0h29.649C46.997 0 52 5.003 52 11.176v29.649C52 46.997 46.997 52 40.824 52z" fill="#061e26" data-original="#393687" />-->
|
||||
<!-- <path d="M12.16 39H9.28V11h9.64c2.613 0 4.553.813 5.82 2.44 1.266 1.626 1.9 3.76 1.9 6.399 0 .934-.027 1.74-.08 2.42-.054.681-.22 1.534-.5 2.561-.28 1.026-.66 1.866-1.14 2.52-.48.654-1.213 1.227-2.2 1.72-.987.494-2.16.74-3.52.74h-7.04V39zm0-12h6.68c.96 0 1.773-.187 2.44-.56.666-.374 1.153-.773 1.46-1.2.306-.427.546-1.04.72-1.84.173-.801.267-1.4.28-1.801.013-.399.02-.973.02-1.72 0-4.053-1.694-6.08-5.08-6.08h-6.52V27zM29.48 33.92l2.8-.12c.106.987.6 1.754 1.48 2.3.88.547 1.893.82 3.04.82s2.14-.26 2.98-.78c.84-.52 1.26-1.266 1.26-2.239s-.36-1.747-1.08-2.32c-.72-.573-1.6-1.026-2.64-1.36-1.04-.333-2.086-.686-3.14-1.06a7.36 7.36 0 01-2.78-1.76c-.987-.934-1.48-2.073-1.48-3.42s.54-2.601 1.62-3.761 2.833-1.739 5.26-1.739c.854 0 1.653.1 2.4.3.746.2 1.28.394 1.6.58l.48.279-.92 2.521c-.854-.666-1.974-1-3.36-1-1.387 0-2.42.26-3.1.78-.68.52-1.02 1.18-1.02 1.979 0 .88.426 1.574 1.28 2.08.853.507 1.813.934 2.88 1.28 1.066.347 2.126.733 3.18 1.16 1.053.427 1.946 1.094 2.68 2s1.1 2.106 1.1 3.6c0 1.494-.6 2.794-1.8 3.9-1.2 1.106-2.954 1.66-5.26 1.66-2.307 0-4.114-.547-5.42-1.64-1.307-1.093-1.987-2.44-2.04-4.04z" fill="#c1dbe6" data-original="#89d3ff" />-->
|
||||
<!-- </g>-->
|
||||
<!-- </svg>-->
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="M1000.342857 877.371429H24.228571c-13.257143 0-24-10.742857-24-24V170.285714c0-13.257143 10.742857-24 24-24h976.114286c13.257143 0 24 10.742857 24 24v49.142857h-45.714286v-27.428571H45.942857v639.771429h932.685714V292.571429h45.714286v560.8c0 13.257143-10.742857 24-24 24z" p-id="4081"></path><path d="M324.8 534.971429c-66.514286 0-120.571429-54.057143-120.571429-120.571429S258.285714 293.714286 324.8 293.714286s120.571429 54.057143 120.571429 120.571428-54.057143 120.685714-120.571429 120.685715z m0-195.542858c-41.257143 0-74.857143 33.6-74.857143 74.857143s33.6 74.857143 74.857143 74.857143 74.857143-33.6 74.857143-74.857143-33.6-74.857143-74.857143-74.857143z" p-id="4082"></path><path d="M480.114286 730.285714h-310.857143c-12.8 0-23.2-10.4-23.2-23.2 0-52.914286 15.314286-106.057143 42.171428-145.828571 31.542857-46.742857 76.914286-72.457143 127.885715-72.457143 12.571429 0 22.857143 10.285714 22.857143 22.857143s-10.285714 22.857143-22.857143 22.857143c-45.142857 0-73.828571 28.457143-89.942857 52.342857-18.057143 26.857143-29.828571 61.485714-33.257143 97.714286h263.542857c-5.142857-50.857143-27.085714-98.4-58.857143-125.257143-9.6-8.114286-10.857143-22.514286-2.742857-32.228572 8.114286-9.6 22.514286-10.857143 32.228571-2.742857 47.085714 39.657143 76.228571 109.714286 76.228572 182.742857 0 12.8-10.4 23.2-23.2 23.2zM585.257143 342.628571h292.571428v45.714286h-292.571428zM585.257143 488.228571h292.571428v45.714286h-292.571428zM585.257143 635.657143h201.142857v45.714286h-201.142857z"></path></svg>
|
||||
|
||||
<p>姓名</p>
|
||||
|
||||
<p>{{ info.user.name }}</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="products">
|
||||
<svg viewBox="0 0 52 52" style="border:1px solid #b65a0b">
|
||||
<g xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M40.824 52H11.176C5.003 52 0 46.997 0 40.824V11.176C0 5.003 5.003 0 11.176 0h29.649C46.997 0 52 5.003 52 11.176v29.649C52 46.997 46.997 52 40.824 52z" fill="#261400" data-original="#6d4c13" />
|
||||
<path d="M30.68 39h-3.24l-2.76-9.04h-8.32L13.72 39H10.6l8.24-28h3.32l8.52 28zm-6.72-12l-3.48-11.36L17.12 27h6.84zM37.479 12.24c0 .453-.16.84-.48 1.16-.32.319-.7.479-1.14.479-.44 0-.827-.166-1.16-.5-.334-.333-.5-.713-.5-1.14s.166-.807.5-1.141c.333-.333.72-.5 1.16-.5.44 0 .82.16 1.14.48.321.322.48.709.48 1.162zM37.24 39h-2.88V18.96h2.88V39z" fill="#e6d2c0" data-original="#ffbd2e" />
|
||||
</g>
|
||||
</svg>
|
||||
Illustrator
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="products">
|
||||
<svg viewBox="0 0 52 52" style="border: 1px solid #C75DEB">
|
||||
<g xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M40.824 52H11.176C5.003 52 0 46.997 0 40.824V11.176C0 5.003 5.003 0 11.176 0h29.649C46.997 0 52 5.003 52 11.176v29.649C52 46.997 46.997 52 40.824 52z" fill="#3a3375" data-original="#3a3375" />
|
||||
<path d="M27.44 39H24.2l-2.76-9.04h-8.32L10.48 39H7.36l8.24-28h3.32l8.52 28zm-6.72-12l-3.48-11.36L13.88 27h6.84zM31.48 33.48c0 2.267 1.333 3.399 4 3.399 1.653 0 3.466-.546 5.44-1.64L42 37.6c-2.054 1.254-4.2 1.881-6.44 1.881-4.64 0-6.96-1.946-6.96-5.841v-8.2c0-2.16.673-3.841 2.02-5.04 1.346-1.2 3.126-1.801 5.34-1.801s3.94.594 5.18 1.78c1.24 1.187 1.86 2.834 1.86 4.94V30.8l-11.52.6v2.08zm8.6-5.24v-3.08c0-1.413-.44-2.42-1.32-3.021-.88-.6-1.907-.899-3.08-.899-1.174 0-2.167.359-2.98 1.08-.814.72-1.22 1.773-1.22 3.16v3.199l8.6-.439z" fill="#e4d1eb" data-original="#e7adfb" />
|
||||
</g>
|
||||
</svg>
|
||||
After Effects
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- <Card shadow :bordered="false">-->
|
||||
<!-- <template>-->
|
||||
|
||||
<!-- </template>-->
|
||||
<!-- </Card>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { userInfo } from "@/api/h5";
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
return {
|
||||
info: {
|
||||
user: {},
|
||||
logs: [],
|
||||
childrens: []
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getUserInfo () {
|
||||
const res = await userInfo({
|
||||
bianma: getToken()
|
||||
})
|
||||
this.info = res;
|
||||
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
computed: {},
|
||||
created() {
|
||||
this.getUserInfo();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.content-section {
|
||||
margin-top: 30px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
&-title {
|
||||
color: #999ba5;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
ul {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
justify-content: space-around;
|
||||
background-color: rgb(146 151 179 / 13%);
|
||||
padding-left: 0;
|
||||
margin: 0;
|
||||
border-radius: 14px;
|
||||
border: 1px solid rgb(255 255 255 / 31%);
|
||||
cursor: pointer;
|
||||
li {
|
||||
list-style: none;
|
||||
padding: 10px 18px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 16px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
white-space: nowrap;
|
||||
transition: 0.3s;
|
||||
&:hover {
|
||||
background-color: rgb(255 255 255 / 31%);
|
||||
&:first-child {
|
||||
border-radius: 13px 13px 0 0;
|
||||
}
|
||||
&:last-child {
|
||||
border-radius: 0 0 13px 13px;
|
||||
}
|
||||
}
|
||||
& + li {
|
||||
border-top: 1px solid rgb(255 255 255 / 35%);
|
||||
}
|
||||
}
|
||||
svg {
|
||||
width: 28px;
|
||||
border-radius: 6px;
|
||||
margin-right: 16px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.page {
|
||||
|
||||
padding: 40px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.page {
|
||||
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in new issue