5 Commits
Author SHA1 Message Date
Dawn1Ocean f592d87e17 optimize assets/icon structure 2024-03-29 23:08:45 +08:00
Dawn1Ocean ec3acd74e2 complete locale; optimize layout 2024-03-29 22:48:07 +08:00
Dawn1Ocean 2cd401409e add 404 page 2024-03-29 22:09:53 +08:00
Dawn1Ocean aad95000a8 add ping service 2024-03-29 21:33:30 +08:00
Dawn1Ocean 4ab1d5c89a feat: about page 2024-03-29 21:14:40 +08:00
40 changed files with 167 additions and 68 deletions
+6
View File
@@ -5,6 +5,12 @@ import ticketsList from './ticketsList.json';
import ticketsSearch from './ticketSearch.json';
export default {
'GET /ping': {
success: true,
data: {
msg: 'pong',
},
},
'GET /duty/info': {
success: true,
data: {
+1
View File
@@ -10,6 +10,7 @@ export default defineAppConfig({
'pages/user/member/member',
'pages/TicketDetail/TicketDetail',
'pages/TicketList/TicketList',
'pages/404/404',
],
window: {
backgroundTextStyle: 'light',
+2 -19
View File
@@ -2,30 +2,13 @@ import { PropsWithChildren } from 'react';
import { useLaunch } from '@tarojs/taro';
import 'taro-ui/dist/style/index.scss';
import './app.scss';
import { checkLogin, checkToken } from './service/checkLogin';
import wechatUser from './wechat';
import { loginAte } from './service/login';
import { getInfo } from './service/getInfo';
import { pingAte } from './service/pingAte';
function App({ children }: PropsWithChildren<any>) {
useLaunch(() => {
console.log('App launched.');
// if (checkLogin()) {
// wechatUser.setToken(checkToken());
// if(getMemberInfo());
// } else {
// loginAte();
// }
checkLogin((success) => {
if (success) {
wechatUser.setToken(checkToken());
getInfo();
} else {
loginAte();
}
});
pingAte();
});
// children 是将要会渲染的页面
return children;
}

Before

Width:  |  Height:  |  Size: 746 B

After

Width:  |  Height:  |  Size: 746 B

-1
View File
@@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1710604932901" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4288" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24"><path d="M512 121.6c217.6 0 390.4 172.8 390.4 390.4S729.6 902.4 512 902.4 121.6 729.6 121.6 512 294.4 121.6 512 121.6m0-89.6C246.4 32 32 249.6 32 512s217.6 480 480 480 480-217.6 480-480S774.4 32 512 32z" p-id="4289"></path><path d="M675.2 512H508.8V284.8c0-25.6-19.2-41.6-41.6-41.6H464c-25.6 0-41.6 19.2-41.6 41.6v272c0 25.6 19.2 41.6 41.6 41.6h214.4c25.6 0 44.8-22.4 44.8-44.8s-22.4-41.6-48-41.6z" p-id="4290"></path></svg>

Before

Width:  |  Height:  |  Size: 746 B

-1
View File
@@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1709907392895" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9700" width="48" height="48" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M512 32C246.4 32 32 246.4 32 512s214.4 480 480 480 480-214.4 480-480S777.6 32 512 32z m160 566.4c19.2 19.2 19.2 51.2 0 73.6-19.2 19.2-51.2 19.2-73.6 0L512 585.6 425.6 672c-19.2 19.2-51.2 19.2-73.6 0-19.2-19.2-19.2-51.2 0-73.6l86.4-86.4-86.4-86.4c-19.2-19.2-19.2-51.2 0-73.6 19.2-19.2 51.2-19.2 73.6 0l86.4 86.4 86.4-86.4c19.2-19.2 51.2-19.2 73.6 0 19.2 19.2 19.2 51.2 0 73.6L585.6 512l86.4 86.4z" p-id="9701" fill="#d4237a"></path></svg>

Before

Width:  |  Height:  |  Size: 768 B

-1
View File
@@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1709907148592" class="icon" viewBox="0 0 1410 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4262" width="66.09375" height="48" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M385.420696 906.172765L1004.039509 20.583293a47.214703 47.214703 0 0 1 44.414648-20.276253c18.634842 1.448304 31.766129 10.524341 39.297309 27.035004a49.049221 49.049221 0 0 1-3.76559 49.145774L435.242346 1001.278045a49.531989 49.531989 0 0 1-31.669576 20.276253 44.800863 44.800863 0 0 1-36.207594-8.207055L18.806738 752.362906a48.469899 48.469899 0 0 1-18.05552-31.669576 47.311256 47.311256 0 0 1 9.076037-36.207594 44.028434 44.028434 0 0 1 31.669575-18.924502 49.918203 49.918203 0 0 1 36.207594 9.848465l307.716272 230.763066z m686.495982-461.622685a47.021595 47.021595 0 0 1-34.75929-13.517502 47.021595 47.021595 0 0 1-13.517502-34.75929c0-14.096823 4.441465-25.683253 13.517502-34.75929a47.021595 47.021595 0 0 1 34.75929-13.517502h289.660752c14.096823 0 25.5867 4.441465 34.75929 13.517502 8.979483 9.076037 13.517502 20.662467 13.517502 34.75929a47.021595 47.021595 0 0 1-13.517502 34.75929 47.021595 47.021595 0 0 1-34.75929 13.517502h-289.660752z m-193.107168 289.660752a47.021595 47.021595 0 0 1-34.75929-13.517502 47.021595 47.021595 0 0 1-13.517502-34.75929c0-14.096823 4.441465-25.683253 13.517502-34.75929a47.021595 47.021595 0 0 1 34.75929-13.517502h482.76792c14.096823 0 25.5867 4.441465 34.75929 13.517502 8.979483 9.076037 13.517502 20.662467 13.517502 34.75929a47.021595 47.021595 0 0 1-13.517502 34.75929 47.021595 47.021595 0 0 1-34.75929 13.517502h-482.76792z m-193.107168 289.660752a47.021595 47.021595 0 0 1-34.75929-13.517502 47.021595 47.021595 0 0 1-13.517502-34.75929c0-14.096823 4.441465-25.683253 13.517502-34.75929a47.021595 47.021595 0 0 1 34.75929-13.517502h675.875088c14.096823 0 25.5867 4.441465 34.75929 13.517502 8.979483 9.076037 13.517502 20.662467 13.517502 34.75929a47.021595 47.021595 0 0 1-13.517502 34.75929 47.021595 47.021595 0 0 1-34.75929 13.517502h-675.875088z" p-id="4263" fill="#8a8a8a"></path></svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

-1
View File
@@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1709907302076" class="icon" viewBox="0 0 1026 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7483" width="48.09375" height="48" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M123.252 739.482L406.85 455.885l-60.34-60.34-287.64 287.64c-30.893 30.894-31.708 80.946-0.814 111.84l177.279 177.278c30.863 30.864 80.945 30.08 111.84-0.814l287.609-287.61-60.34-60.34-283.597 283.597-167.654-167.654z" p-id="7484" fill="#8a8a8a"></path><path d="M717.75 223.245l65.107-65.348 122.58 121.374-62.331 62.572-109.064 44.56a81.444 81.444 0 0 0-27.274 18.404L562.013 553.183l61.064 59.616 144.122-147.742 109.034-44.531a80.337 80.337 0 0 0 26.67-17.8l123.364-123.848-243.863-241.45L656.686 163.69c-7.452 7.452-13.365 16.382-17.408 26.097l-44.56 107.616-136.972 137.574 60.46 60.22 137.605-138.209c7.482-7.482 13.366-16.382 17.438-26.127l44.47-107.646z" p-id="7485" fill="#8a8a8a"></path><path d="M351.156 295.623L746.713 691.18q30.17 30.17 0 60.34t-60.34 0L290.816 355.962q-30.17-30.17 0-60.34t60.34 0zM222.24 728.35a42.667 42.667 0 0 1 60.31 1.055l24.739 25.584a42.667 42.667 0 0 1-61.366 59.254l-24.74-25.644a42.624 42.624 0 0 1 1.027-60.28z" p-id="7486" fill="#8a8a8a"></path></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

-1
View File
@@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1709907338992" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8608" width="48" height="48" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M832 0H192C85.952 0 0 86.016 0 192v640a192 192 0 0 0 192 192h640a192 192 0 0 0 192-192V192c0-105.984-85.952-192-192-192z m64 832c0 35.392-28.608 64-64 64H192a64 64 0 0 1-64-64V192c0-35.328 28.672-64 64-64h640a64 64 0 0 1 64 64v640zM669.376 330.88L443.136 557.12l-90.56-90.496c-24.96-25.024-65.472-25.024-90.496 0s-25.024 65.536 0 90.496l135.808 135.744a63.936 63.936 0 0 0 90.496 0l271.488-271.488c25.024-25.024 25.024-65.472 0-90.496s-65.472-25.024-90.496 0z" p-id="8609" fill="#12c53d"></path></svg>

Before

Width:  |  Height:  |  Size: 832 B

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711724022815" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7442" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 85.333333c235.648 0 426.666667 191.061333 426.666667 426.666667s-191.018667 426.666667-426.666667 426.666667S85.333333 747.605333 85.333333 512 276.352 85.333333 512 85.333333z m0 71.125334c-196.053333 0-355.541333 159.488-355.541333 355.541333 0 196.053333 159.488 355.541333 355.541333 355.541333 196.053333 0 355.541333-159.488 355.541333-355.541333 0-196.053333-159.488-355.541333-355.541333-355.541333zM480 256a32 32 0 0 1 31.701333 27.648L512 288V512h138.666667a32 32 0 0 1 4.352 63.701333l-4.352 0.298667h-170.666667a32 32 0 0 1-31.701333-27.648l-0.298667-4.352v-256a32 32 0 0 1 32-32z" fill="#bfbfbf" p-id="7443"></path></svg>

After

Width:  |  Height:  |  Size: 972 B

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711724082044" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8459" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M572.341333 512l268.490667-268.501333a42.666667 42.666667 0 0 0-59.274667-61.376c-0.362667 0.341333-0.704 0.693333-1.056 1.045333L512 451.658667 243.509333 183.168a42.666667 42.666667 0 0 0-60.341333 60.330667L451.669333 512 183.168 780.501333a42.666667 42.666667 0 0 0 59.669333 61.002667l0.672-0.672L512 572.341333l268.501333 268.490667C788.832 849.162667 799.754667 853.333333 810.666667 853.333333s21.845333-4.170667 30.165333-12.501333a42.666667 42.666667 0 0 0 0-60.330667L572.341333 512z" p-id="8460" fill="#d81e06"></path></svg>

After

Width:  |  Height:  |  Size: 869 B

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711724278042" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11057" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M756.821333 256C691.541333 203.264 601.472 170.666667 512 170.666667a341.333333 341.333333 0 1 0 341.333333 341.333333 42.666667 42.666667 0 0 1 85.333334 0c0 235.648-191.018667 426.666667-426.666667 426.666667S85.333333 747.648 85.333333 512 276.352 85.333333 512 85.333333c108.757333 0 217.898667 39.082667 298.666667 104.490667V128a42.666667 42.666667 0 0 1 85.333333 0v170.666667a42.666667 42.666667 0 0 1-42.666667 42.666666h-170.666666a42.666667 42.666667 0 0 1 0-85.333333h74.154666z" p-id="11058" fill="#f0d323"></path></svg>

After

Width:  |  Height:  |  Size: 867 B

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711724571236" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="15667" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M223.579432 955.45963a24.234651 24.234651 0 0 1-3.071998-1.979732 508.995927 508.995927 0 0 1-184.319877-185.616943 34.133311 34.133311 0 0 1 12.561058-46.557836 33.655444 33.655444 0 0 1 46.694369 12.561058 440.25144 440.25144 0 0 0 159.880427 160.767893 15.223457 15.223457 0 0 1 2.525865 1.365333c12.424525 6.826662 24.917317 13.653324 37.751441 19.455987A443.733038 443.733038 0 0 0 701.582313 127.726848l-4.64213-2.662398-4.369064-2.389332H692.16152a444.347437 444.347437 0 0 0-423.867451 0l-1.365333 0.682666-3.618131 1.979732-5.188263 2.935465A440.114907 440.114907 0 0 0 95.852584 290.406206a33.723711 33.723711 0 0 1-46.694369 12.561059 34.133311 34.133311 0 0 1-12.561058-46.694369A512.477525 512.477525 0 0 1 695.233517 47.854901a0.682666 0.682666 0 0 0 0.546133 0c1.365332 0.682666 2.525865 1.365332 3.891198 1.843199a511.658326 511.658326 0 0 1-1.365333 925.35405l-1.228799 0.682666-3.618131 1.570132a505.71913 505.71913 0 0 1-176.947082 45.329037 492.065805 492.065805 0 0 1-37.614908 1.433599 507.835395 507.835395 0 0 1-255.317163-68.607954z" fill="#bfbfbf" p-id="15668"></path><path d="M539.176022 288.358208a231.492112 231.492112 0 0 1 163.498557 283.169944 34.133311 34.133311 0 0 1-41.847439 24.098118 34.133311 34.133311 0 0 1-24.098117-41.779173A162.952425 162.952425 0 1 0 437.117423 669.012887a34.133311 34.133311 0 0 1 24.098117 41.847439 34.133311 34.133311 0 0 1-41.779172 24.098117 231.219046 231.219046 0 1 1 119.739654-446.600235z" fill="#bfbfbf" p-id="15669"></path></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711723813811" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4236" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M800 288a47.84 47.84 0 0 0-33.936 14.064L432 636.112 257.936 462.064a48 48 0 1 0-67.872 67.872l208 208c8.688 8.688 20.688 14.064 33.936 14.064s25.248-5.376 33.936-14.064l368-368A48 48 0 0 0 800 288z" fill="#bfbfbf" p-id="4237"></path></svg>

After

Width:  |  Height:  |  Size: 573 B

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711724195931" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9893" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M800 288a47.84 47.84 0 0 0-33.936 14.064L432 636.112 257.936 462.064a48 48 0 1 0-67.872 67.872l208 208c8.688 8.688 20.688 14.064 33.936 14.064s25.248-5.376 33.936-14.064l368-368A48 48 0 0 0 800 288z" fill="#14ca20" p-id="9894"></path></svg>

After

Width:  |  Height:  |  Size: 573 B

+6 -2
View File
@@ -44,8 +44,12 @@ export default class NoteCard extends Component<NoteCardProps, {}> {
/>
</View>
<View
className='at-col'
style={{ marginTop: '40rpx', marginBottom: '40rpx' }}
className='at-col at-col--wrap'
style={{
marginTop: '40rpx',
marginBottom: '40rpx',
wordBreak: 'normal',
}}
>
<View className='at-article__p'>{note.op}</View>
<View className='at-article__info'>
@@ -1,9 +1,10 @@
import { AtListItem } from 'taro-ui';
import repair from '@/assets/icons/MyTickets/repair.svg';
import finished from '@/assets/icons/MyTickets/finished.svg';
import tick from '@/assets/icons/MyTickets/tick.svg';
import fail from '@/assets/icons/MyTickets/fail.svg';
import clock from '@/assets/icons/MyTickets/clock.svg';
import create from '@/assets/icons/TicketState/create.svg';
import repair from '@/assets/icons/TicketState/repair.svg';
import success from '@/assets/icons/TicketState/success.svg';
import fail from '@/assets/icons/TicketState/fail.svg';
import refuse from '@/assets/icons/TicketState/refuse.svg';
import retrieve from '@/assets/icons/TicketState/retrieve.svg';
import pt from '@/plain-text';
import Taro from '@tarojs/taro';
import { FixStatus } from '@/common';
@@ -29,14 +30,14 @@ export class TicketListItem {
this.status = status;
this.createAt = createAt;
this.iconMap = new Map<FixStatus, string>([
[0, repair],
[0, create],
[1, repair],
[2, clock],
[3, finished],
[4, clock],
[5, tick],
[6, clock],
[7, fail],
[2, refuse],
[3, retrieve],
[4, success],
[5, retrieve],
[6, fail],
[7, retrieve],
]);
}
+3
View File
@@ -0,0 +1,3 @@
export default definePageConfig({
usingComponents: {},
});
View File
+35
View File
@@ -0,0 +1,35 @@
import { Component, ReactNode } from 'react';
import { View } from '@tarojs/components';
import Taro from '@tarojs/taro';
import pt from '@/plain-text';
import PageFooter from '@/components/PageFooter/PageFooter';
import './404.scss';
export default class NotFoundPage extends Component {
componentDidMount(): void {
Taro.setNavigationBarTitle({
title: pt.get().navBar.notFound,
});
}
render(): ReactNode {
return (
<View>
<View
className='page-title'
style={{ marginTop: '150rpx', marginBottom: '240rpx' }}
>
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
{pt.get().notFound.titleZhCn}
</View>
<View className='at-article__h2'>{pt.get().notFound.descZhCn}</View>
<View style={{ height: '150rpx' }}></View>
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
{pt.get().notFound.titleEnUs}
</View>
<View className='at-article__h2'>{pt.get().notFound.descEnUs}</View>
</View>
<PageFooter />
</View>
);
}
}
+1 -1
View File
@@ -4,7 +4,7 @@ import { AtTimeline } from 'taro-ui';
import pt from '@/plain-text';
import tick from '@/assets/icons/MainPage/tick.svg';
import cross from '@/assets/icons/MainPage/cross.svg';
import clock from '@/assets/icons/MemberPage/clock.svg';
import clock from '@/assets/icons/MainPage/offduty.svg';
import wechatUser from '@/wechat';
export class DutyData {
+17 -5
View File
@@ -2,6 +2,7 @@ import { Component, ReactNode } from 'react';
import { Image, View } from '@tarojs/components';
import Taro from '@tarojs/taro';
import pt from '@/plain-text';
import PageFooter from '@/components/PageFooter/PageFooter';
import './about.scss';
export default class AboutPage extends Component {
@@ -14,7 +15,10 @@ export default class AboutPage extends Component {
return (
<View>
<View
style={{ marginTop: '60rpx', marginBottom: '60rpx' }}
style={{
marginTop: '200rpx',
marginBottom: '60rpx',
}}
className='at-row at-row__align--start'
>
<View className='at-col at-col-1 at-col--auto'>
@@ -24,7 +28,10 @@ export default class AboutPage extends Component {
mode='aspectFit'
/>
</View>
<View className='at-article at-col'>
<View
className='at-article at-col at-col--wrap'
style={{ wordBreak: 'normal' }}
>
<View className='at-article__h1'>
{pt.get().aboutPage.dean.nickname}
</View>
@@ -40,17 +47,20 @@ export default class AboutPage extends Component {
</View>
</View>
<View
style={{ marginTop: '60rpx', marginBottom: '60rpx' }}
style={{ marginTop: '100rpx', marginBottom: '60rpx' }}
className='at-row at-row__align--start'
>
<View className='at-col at-col-1 at-col--auto'>
<Image
style='width: 240rpx; height: 240rpx; margin-left: 60rpx; margin-right: 30rpx; margin-top: 30rpx; border-radius: 120rpx'
src='https://wiki.zjueva.net/images/1/10/%E5%A4%B4%E5%83%8F.jpg?20240319171222'
src='https://static.fracher21.top/head.jpg'
mode='aspectFit'
/>
</View>
<View className='at-article at-col'>
<View
className='at-article at-col at-col--wrap'
style={{ wordBreak: 'normal' }}
>
<View className='at-article__h1'>
{pt.get().aboutPage.fracher.nickname}
</View>
@@ -65,6 +75,8 @@ export default class AboutPage extends Component {
</View>
</View>
</View>
<View style={{ height: '200rpx' }}></View>
<PageFooter />
</View>
);
}
+14
View File
@@ -0,0 +1,14 @@
export interface NotFoundText {
titleZhCn: string;
titleEnUs: string;
descZhCn: string;
descEnUs: string;
}
export const notFound: NotFoundText = {
titleZhCn: '啊哦...请求出错了...',
descZhCn: '请确保处于校网环境后,点击右上角 "...-重新进入小程序"!',
titleEnUs: 'Oops...Network Error...',
descEnUs:
'Please make sure you\'re in ZJU\'s school network environment and then click on the top right corner "... - re-enter the applet"!',
};
+4 -4
View File
@@ -23,8 +23,8 @@ export const aboutPageZhCn: AboutPageText = {
fracher: {
nickname: '宇航员',
username: '@ FrozenArcher',
status: 'Ate 总设计, Eta 合作贡献者',
note: '6~',
status: 'Ate 总设计, 项目合作贡献者',
note: 'React 真是太有意思了',
},
};
@@ -38,7 +38,7 @@ export const aboutPageEnUs: AboutPageText = {
fracher: {
nickname: 'Fracher',
username: '@ FrozenArcher',
status: "Ate's General Designer, Eta's Contributor",
note: '6~',
status: "Ate's General Designer, Project's Contributor",
note: 'React is so fun',
},
};
+2 -2
View File
@@ -142,8 +142,8 @@ export const mainPageEnUs: MainPageText = {
{ title: 'We are volunteers and do not take any gifts.' },
],
ticketList: {
title: '预填写工单列表',
note: '在这里查看所有的预填写工单!',
title: 'Pre-filling ticket list',
note: 'Browse for all pre-filling tickets here!',
},
dutyCard: {
offDuty: {
+6 -5
View File
@@ -60,7 +60,7 @@ export const memberPageZhCn: MemberPageText = {
mainTitleLine: '您好,',
subTitleLine: '祝你满绩每一天',
loginMainTitleLine: '协会成员登录入口',
loginSubTitleLine: '请打开 auth.zjueva.net,登录后点击下方按钮以扫描二维码',
loginSubTitleLine: '请使用 EVA 统一身份认证,登录后点击下方按钮以扫描二维码',
logoutMainTitleLine: '协会成员登出',
logoutSubTitleLine: '登出后须扫码重新登录!',
cardTitle: {
@@ -140,10 +140,11 @@ export const memberPageZhCn: MemberPageText = {
export const memberPageEnUs: MemberPageText = {
mainTitleLine: 'Hi! ',
subTitleLine: 'Have a great day!',
loginMainTitleLine: '协会成员登录入口',
loginSubTitleLine: '请打开 auth.zjueva.net,登录后点击下方按钮以扫描二维码',
logoutMainTitleLine: '协会成员登出',
logoutSubTitleLine: '登出后须扫码重新登录!',
loginMainTitleLine: 'EVA Member Entry',
loginSubTitleLine:
'Please use EVA Auth, log in and click the button below to scan the QR code',
logoutMainTitleLine: 'EVA Member Logout',
logoutSubTitleLine: 'After logging out, scan the code again to log back in!',
cardTitle: {
dutyInfo: 'Duty Situation',
stepInfo: 'Maintenance Steps',
+3
View File
@@ -1,4 +1,5 @@
export interface NavBarTitle {
notFound: string;
ticketDetail: string;
ticketList: string;
user: {
@@ -12,6 +13,7 @@ export interface NavBarTitle {
}
export const navBarTitleZhCn: NavBarTitle = {
notFound: '连接失败',
ticketDetail: '工单详情',
ticketList: '所有工单',
user: {
@@ -25,6 +27,7 @@ export const navBarTitleZhCn: NavBarTitle = {
};
export const navBarTitleEnUs: NavBarTitle = {
notFound: 'Failed',
ticketDetail: 'Ticket Detail',
ticketList: 'All Tickets',
user: {
+4
View File
@@ -24,6 +24,7 @@ import {
actIndicatorEnUs,
actIndicatorZhCn,
} from './ActIndicator';
import { NotFoundText, notFound } from './404';
interface TextRecord {
common: CommonText;
@@ -44,6 +45,7 @@ interface TextRecord {
modal: ModalText;
toast: ToastText;
actIndicator: ActIndicatorText;
notFound: NotFoundText;
}
const textZhCn: TextRecord = {
@@ -65,6 +67,7 @@ const textZhCn: TextRecord = {
modal: modalZhCn,
toast: toastZhCn,
actIndicator: actIndicatorZhCn,
notFound: notFound,
};
const textEnUs: TextRecord = {
@@ -86,6 +89,7 @@ const textEnUs: TextRecord = {
modal: modalEnUs,
toast: toastEnUs,
actIndicator: actIndicatorEnUs,
notFound: notFound,
};
// type Lang = 'zh_CN' | 'en_US' | ...;
+1 -1
View File
@@ -32,7 +32,7 @@ export function addToOreo(that: TicketDetail) {
isOreoLoading: false,
});
Taro.atMessage({
message: pt.get().button.submitText.error + err.errMsg.toString(),
message: pt.get().button.submitText.error + err.errMsg,
type: 'error',
});
});
+1 -1
View File
@@ -39,7 +39,7 @@ export function changeDutyCnt(that: MainPage) {
isLoading: false,
});
Taro.atMessage({
message: pt.get().button.submitText.error + err.errMsg.toString(),
message: pt.get().button.submitText.error + err.errMsg,
type: 'error',
});
});
+1 -1
View File
@@ -40,7 +40,7 @@ export function changeStatus(that: TicketDetail, status: number) {
isStatusLoading: false,
});
Taro.atMessage({
message: pt.get().button.submitText.error + err.errMsg.toString(),
message: pt.get().button.submitText.error + err.errMsg,
type: 'error',
});
});
+1 -1
View File
@@ -36,7 +36,7 @@ export function getCurrentTicket(that: RepairPage) {
.catch((err) => {
console.log(err);
Taro.atMessage({
message: pt.get().button.submitText.error + err.errMsg.toString(),
message: pt.get().button.submitText.error + err.errMsg,
type: 'error',
});
});
+3 -3
View File
@@ -47,7 +47,7 @@ export function memberLogin(that: UserMemberPage) {
isLoading: false,
});
Taro.atMessage({
message: pt.get().button.loginText.error + err.errMsg.toString(),
message: pt.get().button.loginText.error + err.errMsg,
type: 'error',
});
});
@@ -57,7 +57,7 @@ export function memberLogin(that: UserMemberPage) {
isLoading: false,
});
Taro.atMessage({
message: pt.get().button.loginText.error + err.errMsg.toString(),
message: pt.get().button.loginText.error + err.errMsg,
type: 'error',
});
},
@@ -95,7 +95,7 @@ export function memberLogout(that: UserMemberPage) {
isLoading: false,
});
Taro.atMessage({
message: pt.get().button.logoutText.error + err.errMsg.toString(),
message: pt.get().button.logoutText.error + err.errMsg,
type: 'error',
});
});
+1 -1
View File
@@ -39,7 +39,7 @@ export function pickTicket(that: TicketDetail) {
isPickLoading: false,
});
Taro.atMessage({
message: pt.get().button.submitText.error + err.errMsg.toString(),
message: pt.get().button.submitText.error + err.errMsg,
type: 'error',
});
});
+31
View File
@@ -0,0 +1,31 @@
import Taro from '@tarojs/taro';
import wechatUser from '@/wechat';
import { getUrl } from '.';
import { checkLogin, checkToken } from './checkLogin';
import { loginAte } from './login';
import { getInfo } from './getInfo';
export function pingAte() {
Taro.request({
url: getUrl('/ping'),
method: 'GET',
data: {},
})
.then((res) => {
console.log(res.data);
checkLogin((success) => {
if (success) {
wechatUser.setToken(checkToken());
getInfo();
} else {
loginAte();
}
});
})
.catch((err) => {
console.log(err.errMsg);
Taro.reLaunch({
url: '/pages/404/404',
});
});
}
+1 -1
View File
@@ -32,7 +32,7 @@ export function reportMessage(that: ReportPage) {
isLoading: false,
});
Taro.atMessage({
message: pt.get().button.submitText.error + err.errMsg.toString(),
message: pt.get().button.submitText.error + err.errMsg,
type: 'error',
});
});
+1 -1
View File
@@ -39,7 +39,7 @@ export function retrieve(that: TicketDetail) {
isRetrieveLoading: false,
});
Taro.atMessage({
message: pt.get().button.submitText.error + err.errMsg.toString(),
message: pt.get().button.submitText.error + err.errMsg,
type: 'error',
});
});
+1 -1
View File
@@ -39,7 +39,7 @@ export function submitComment(that: TicketDetail) {
isCommentLoading: false,
});
Taro.atMessage({
message: pt.get().button.submitText.error + err.errMsg.toString(),
message: pt.get().button.submitText.error + err.errMsg,
type: 'error',
});
});
+1 -1
View File
@@ -87,7 +87,7 @@ export function submitTicket(that: RepairPage) {
isLoading: false,
});
Taro.atMessage({
message: pt.get().button.submitText.error + err.errMsg.toString(),
message: pt.get().button.submitText.error + err.errMsg,
type: 'error',
});
});
+1 -1
View File
@@ -33,7 +33,7 @@ export function updateUserInfo(that: InformPage) {
isLoading: false,
});
Taro.atMessage({
message: pt.get().button.submitText.error + err.errMsg.toString(),
message: pt.get().button.submitText.error + err.errMsg,
type: 'error',
});
});