forked from MuxiKeStack/muxiK-StackFrontend2.0
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
634 additions
and
804 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ babel.config.js | |
ec-canvas | ||
|
||
*.js | ||
src/pages/notification/index.tsx | ||
VirtualList.tsx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { VirtualListProps as TaroVirtualListProps } from '@tarojs/components-advanced/dist/components/virtual-list'; | ||
import TaroVirtualList from '@tarojs/components-advanced/dist/components/virtual-list'; | ||
import { memo } from 'react'; | ||
|
||
interface VirtualListProps extends TaroVirtualListProps {} | ||
|
||
const VirtualList: React.FC<VirtualListProps> = memo( | ||
({ height, width, item, itemData, itemCount, itemSize, onScroll }) => ( | ||
<TaroVirtualList | ||
height={height} | ||
width={width} | ||
item={item} | ||
itemData={itemData} | ||
itemCount={itemCount} | ||
itemSize={itemSize} | ||
onScroll={onScroll} | ||
/> | ||
) | ||
); | ||
|
||
export default VirtualList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export { default as CollectionCourse } from './CollectionCourse/CollectionCourse'; | ||
export { default as FloatingWindow } from './FloatingWindow/FloatingWindow'; | ||
export { default as VirtualList } from './VirtualList'; |
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
export type UserInfo = { | ||
avatarUrl: string; // 用户头像的URL | ||
nickName: string; // 用户昵称 | ||
}; | ||
|
||
export type ResponseLevel = { | ||
code?: number; | ||
data: WebPointInfoVo; | ||
msg?: string; | ||
}; | ||
|
||
export type WebPointInfoVo = { | ||
level: number; | ||
next_level_points: number; | ||
points: number; | ||
}; | ||
|
||
export type ResponseUser = { | ||
code?: number; | ||
data: WebUserProfileVo; | ||
msg?: string; | ||
}; | ||
|
||
export type WebUserProfileVo = { | ||
avatar: string; | ||
ctime: number; | ||
grade_sharing_is_signed?: boolean; | ||
id: number; | ||
/** | ||
* 是否为新用户,新用户尚未编辑过个人信息 | ||
*/ | ||
new: boolean; | ||
nickname: string; | ||
studentId: string; | ||
title_ownership: { [key: string]: boolean }; | ||
using_title: string; | ||
utime?: number; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
import Taro from '@tarojs/taro'; | ||
|
||
function checkToken() { | ||
const checkToken = () => { | ||
const token: string = Taro.getStorageSync('shortToken'); | ||
|
||
if (token) { | ||
// eslint-disable-next-line no-console | ||
console.log('Token 有'); | ||
void Taro.switchTab({ url: '/pages/main/index' }); | ||
} else { | ||
// eslint-disable-next-line no-console | ||
console.log('无token先登陆'); | ||
void Taro.redirectTo({ url: '/pages/login/index' }); | ||
} | ||
} | ||
}; | ||
|
||
export default checkToken; |
Oops, something went wrong.