Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-05-11 22:36:40 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a4aebdd88f31263cd76059a563879212bd90b1ed
a4aebdd8
1 parent
677eba60
✨ feat(B端我的): API联调
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
17 deletions
src/views/business/me.vue
src/views/business/me.vue
View file @
a4aebdd
<template>
<div style="background: linear-gradient(310deg, #FDD347 0%, #FFED6D 100%); padding: 1rem; text-align: center;">
<van-image round width="4rem" height="4rem"
src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng52f007e83aa3baa494a5c9947e8c5bf537f267bce528e54b104995300d55c956
" />
<p style="margin-top: 1rem; font-size: 1.05rem; font-weight: bold;">
杨浦民办科技幼稚园
</p>
<van-image round width="4rem" height="4rem"
:src="myKgInfo.logo
" />
<p style="margin-top: 1rem; font-size: 1.05rem; font-weight: bold;">
{{ myKgInfo.name }}
</p>
</div>
<template v-for="(item, key) in itemList" :key="key">
<div class="van-hairline--bottom item-list" @click="goTo(item.to)">
...
...
@@ -24,24 +24,46 @@ import ShortcutFixed from '@/components/ShortcutFixed/index.vue'
import { ref, reactive, onMounted } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import axios from '@/utils/axios';
import $ from 'jquery'
import { Toast } from 'vant';
const $route = useRoute();
const $router = useRouter();
const itemList = [
{
name: '幼儿园上传视频',
sum: '5',
to: '/me/donateList'
},
{
name: '家长上传视频',
sum: '2',
tag: true,
to: '/me/message'
},
]
const myKgInfo = ref({});
let itemList = ref([])
axios.get('/srv/?a=my_kg')
.then(res => {
if (res.data.code === 1) {
myKgInfo.value = res.data.data;
itemList.value = [
{
name: '幼儿园上传视频',
sum: res.data.data.mission_num,
to: '/business/myVideo'
},
{
name: '家长上传视频',
sum: res.data.data.prod_num,
tag: true,
to: '/business/auditVideo'
},
]
} else {
console.warn(res);
Toast({
icon: 'close',
message: res.data.msg
});
}
})
.catch(err => {
console.error(err);
})
const goTo = (path) => { // 跳转作品详情页
$router.push({
path
});
}
// 退出登录
const exitLogin = () => {
...
...
@@ -99,4 +121,4 @@ export default {
text-align: center;
color: white;
}
</style>
\ No newline at end of file
</style>
...
...
Please
register
or
login
to post a comment