Commit da465b75 authored by hanfeng zhang's avatar hanfeng zhang

321

parent 25a9e3ab
...@@ -8,6 +8,9 @@ import './style.less' ...@@ -8,6 +8,9 @@ import './style.less'
import Util from './util' import Util from './util'
import service from './service' import service from './service'
import { Plugin } from 'vue-fragment' import { Plugin } from 'vue-fragment'
import { Dialog } from 'vant';
Vue.use(Dialog);
Vue.use(Util) Vue.use(Util)
Vue.use(Plugin) Vue.use(Plugin)
Vue.use(service) Vue.use(service)
......
...@@ -80,6 +80,11 @@ const routes: Array<RouteConfig> = [ ...@@ -80,6 +80,11 @@ const routes: Array<RouteConfig> = [
}, },
component: () => import('@/view/User/index.vue') component: () => import('@/view/User/index.vue')
}, },
{
path:'/User/edit/:type',
name:'Edit',
meta:{}
},
{ {
path: '/auth', path: '/auth',
component: () => import("@/view/Auth/index.vue"), component: () => import("@/view/Auth/index.vue"),
......
<template> <template>
<Layout-Child> <Layout-Child>
<div class=" w-11/12 mx-auto py-6 text-font-white"> <div class=" w-11/12 mx-auto py-6 text-font-white">
<app-cell text='头像' boxType='border' icon='icon-xiayibu'></app-cell> <app-cell text='头像' boxType='border' :value='userInfo.avatar?userInfo.avatar:""' icon='icon-xiayibu'></app-cell>
<app-cell text='昵称' boxType='border' icon='icon-xiayibu'></app-cell> <app-cell text='昵称' boxType='border' :value='userInfo.nickname?userInfo.nickname:"无昵称"' icon='icon-xiayibu'></app-cell>
<app-cell text='手机号' boxType='border' icon='icon-xiayibu'></app-cell> <app-cell text='手机号' boxType='border' :value='userInfo.telephone?userInfo.telephone:""' icon='icon-xiayibu'></app-cell>
<app-cell text='个性签名' boxType='border' icon='icon-xiayibu'></app-cell> <app-cell text='个性签名' boxType='border' icon='icon-xiayibu'></app-cell>
</div> </div>
<div class="fixed bottom-0 w-full left-0 z-30"> <div class="fixed bottom-0 w-full left-0 z-30">
<app-btn text="退出登录" class="w-11/12 mx-auto text-font-white rounded-2xl bg-font-red" border='none'></app-btn> <app-btn text="退出登录" class="w-11/12 mx-auto text-font-white rounded-2xl bg-font-red" border='none' @btnClicked='toggleDialog' ></app-btn>
</div> </div>
</Layout-Child> </Layout-Child>
</template> </template>
...@@ -16,10 +16,24 @@ ...@@ -16,10 +16,24 @@
import Vue from 'vue'; import Vue from 'vue';
export default Vue.extend({ export default Vue.extend({
data(){
return{
userInfo:this.$util.userMsg.getUserMsg()
}
},
components:{ components:{
'Layout-Child':()=>import('@/layout/Child.vue'), 'Layout-Child':()=>import('@/layout/Child.vue'),
'app-cell':()=>import('@/components/common/Cell.vue'), 'app-cell':()=>import('@/components/common/Cell.vue'),
'app-btn':()=>import('@/components/common/Btn.vue') 'app-btn':()=>import('@/components/common/Btn.vue')
}, },
methods:{
toggleDialog(){
console.log(111);
this.$dialog.alert({
message: 'Content',
});
}
}
}); });
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment