|
@@ -35,9 +35,7 @@ Page({
|
|
|
wx.setStorage({ key: "token", data: res.data })// 存用户信息到storage,以便之后判断用户是否登录
|
|
|
wx.showToast({ title: `账号登录成功`, icon: 'success', duration: 2000 }) //登录成功提示
|
|
|
wx.redirectTo({ url: '/pagesHome/home/index' })
|
|
|
- } else {
|
|
|
- wx.showToast({ title: res.errmsg, icon: 'none', duration: 2000 })
|
|
|
- }
|
|
|
+ } else wx.showToast({ title: res.errmsg, icon: 'none', duration: 2000 })
|
|
|
}
|
|
|
},
|
|
|
// 提交注册
|
|
@@ -58,9 +56,7 @@ Page({
|
|
|
if (res.errcode === 0) {
|
|
|
wx.showToast({ title: `账号注册成功`, icon: 'success', duration: 2000 }) //登录成功提示
|
|
|
that.setData({ current: 1 })
|
|
|
- } else {
|
|
|
- wx.showToast({ title: res.errmsg, icon: 'none', duration: 2000 })
|
|
|
- }
|
|
|
+ } else wx.showToast({ title: res.errmsg, icon: 'none', duration: 2000 })
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -92,9 +88,7 @@ Page({
|
|
|
let res;
|
|
|
// 类别
|
|
|
res = await app.$api('dictData', 'GET', { type: 'type', is_use: '0' })
|
|
|
- if (res.errcode == '0') {
|
|
|
- that.setData({ typeList: res.data })
|
|
|
- }
|
|
|
+ if (res.errcode == '0') that.setData({ typeList: res.data })
|
|
|
},
|
|
|
// 查询通知
|
|
|
async search() {
|