update Page obj
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
// index.ts
|
||||
|
||||
import config from "../../config/index"
|
||||
import { JournalPage, JournalPageType } from "../../types/Journal";
|
||||
|
||||
interface IndexData {
|
||||
key: string;
|
||||
@ -25,9 +26,10 @@ Page({
|
||||
header: {
|
||||
Key: this.data.key
|
||||
},
|
||||
data: {
|
||||
data: <JournalPage> {
|
||||
index: 0,
|
||||
size: 1
|
||||
size: 1,
|
||||
type: JournalPageType.PREVIEW
|
||||
},
|
||||
success: (resp) => {
|
||||
const data = resp.data as any;
|
||||
@ -36,8 +38,10 @@ Page({
|
||||
wx.switchTab({
|
||||
url: "/pages/main/journal/index",
|
||||
})
|
||||
} else {
|
||||
} else if (data.code === 40100) {
|
||||
wx.showToast({ title: "密码错误", icon: "error" });
|
||||
} else {
|
||||
wx.showToast({ title: "服务异常", icon: "error" });
|
||||
}
|
||||
},
|
||||
fail: () => wx.showToast({ title: "验证失败", icon: "error" })
|
||||
|
||||
Reference in New Issue
Block a user