Compare commits
5 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
b4b221c7b2 | 2 weeks ago |
|
|
6169b4614e | 3 weeks ago |
|
|
947802ba57 | 1 month ago |
|
|
54d59bd34e | 1 month ago |
|
|
ef81e069ee | 1 month ago |
27 changed files with 1614 additions and 1564 deletions
@ -0,0 +1,28 @@ |
|||||||
|
import antfu from '@antfu/eslint-config' |
||||||
|
|
||||||
|
export default antfu({ |
||||||
|
env: { |
||||||
|
es6: true, |
||||||
|
}, |
||||||
|
parserOptions: { project: ['./tsconfig.json'] }, |
||||||
|
globals: { |
||||||
|
wx: true, |
||||||
|
App: true, |
||||||
|
Page: true, |
||||||
|
getCurrentPages: true, |
||||||
|
getApp: true, |
||||||
|
Component: true, |
||||||
|
requirePlugin: true, |
||||||
|
requireMiniProgram: true, |
||||||
|
}, |
||||||
|
rules: { |
||||||
|
'eslint-comments/no-unlimited-disable': 'off', |
||||||
|
'ts/no-require-imports': 'off', |
||||||
|
eqeqeq: 'off', |
||||||
|
}, |
||||||
|
formatters: { |
||||||
|
css: 'prettier', |
||||||
|
html: 'prettier', |
||||||
|
markdown: 'prettier', |
||||||
|
}, |
||||||
|
}) |
||||||
@ -1,28 +0,0 @@ |
|||||||
// eslint.config.mjs
|
|
||||||
import antfu from '@antfu/eslint-config' |
|
||||||
import prettierConfig from 'eslint-config-prettier' |
|
||||||
|
|
||||||
export default antfu( |
|
||||||
{ |
|
||||||
env: { |
|
||||||
es6: true, |
|
||||||
}, |
|
||||||
stylistic: false, |
|
||||||
parserOptions: { project: ['./tsconfig.json'] }, |
|
||||||
globals: { |
|
||||||
wx: true, |
|
||||||
App: true, |
|
||||||
Page: true, |
|
||||||
getCurrentPages: true, |
|
||||||
getApp: true, |
|
||||||
Component: true, |
|
||||||
requirePlugin: true, |
|
||||||
requireMiniProgram: true, |
|
||||||
}, |
|
||||||
rules: { |
|
||||||
'eslint-comments/no-unlimited-disable': 'off', |
|
||||||
'ts/no-require-imports': 'off', |
|
||||||
}, |
|
||||||
}, |
|
||||||
prettierConfig, |
|
||||||
) |
|
||||||
|
After Width: | Height: | Size: 2.8 MiB |
|
After Width: | Height: | Size: 694 B |
|
Before Width: | Height: | Size: 634 KiB After Width: | Height: | Size: 696 KiB |
@ -1,47 +1,54 @@ |
|||||||
const app = getApp<IAppOption>(); |
const app = getApp<IAppOption>() |
||||||
|
|
||||||
Page({ |
Page({ |
||||||
data: {}, |
data: {}, |
||||||
onLoad() { |
onLoad() { |
||||||
app.waitLogin().then(() => { |
app.waitLogin().then(() => { |
||||||
const { isLogin, isNewReg, loginType } = app.globalData; |
const { isLogin, isNewReg, loginType, scene } = app.globalData |
||||||
if (isLogin === 0) { |
if (isLogin === 0) { |
||||||
|
// 未登录用户,扫医生邀请码,重定向到患者登录页
|
||||||
|
if (scene?.doctorId) { |
||||||
|
wx.reLaunch({ |
||||||
|
url: '/patient/pages/login/index', |
||||||
|
}) |
||||||
|
return |
||||||
|
} |
||||||
wx.reLaunch({ |
wx.reLaunch({ |
||||||
url: '/patient/pages/index/index', |
url: '/patient/pages/index/index', |
||||||
}); |
}) |
||||||
return; |
return |
||||||
} |
} |
||||||
if (loginType === 0) { |
if (loginType === 0) { |
||||||
wx.reLaunch({ |
wx.reLaunch({ |
||||||
url: '/patient/pages/index/index', |
url: '/patient/pages/index/index', |
||||||
}); |
}) |
||||||
return; |
return |
||||||
} |
} |
||||||
if (loginType === 1) { |
if (loginType === 1) { |
||||||
if (isNewReg === 1) { |
if (isNewReg === 1) { |
||||||
wx.reLaunch({ |
wx.reLaunch({ |
||||||
url: '/patient/pages/index/index', |
url: '/patient/pages/index/index', |
||||||
}); |
}) |
||||||
return; |
return |
||||||
} |
} |
||||||
wx.reLaunch({ |
wx.reLaunch({ |
||||||
url: '/patient/pages/enterInfo/index', |
url: '/patient/pages/enterInfo/index', |
||||||
}); |
}) |
||||||
return; |
return |
||||||
} |
} |
||||||
if (loginType === 2) { |
if (loginType === 2) { |
||||||
if (isNewReg === 1) { |
if (isNewReg === 1) { |
||||||
wx.reLaunch({ |
wx.reLaunch({ |
||||||
url: '/pages/home/index', |
url: '/pages/home/index', |
||||||
}); |
}) |
||||||
return; |
return |
||||||
} |
} |
||||||
wx.reLaunch({ |
wx.reLaunch({ |
||||||
url: '/pages/login/index', |
url: '/pages/login/index', |
||||||
}); |
}) |
||||||
} |
} |
||||||
}); |
}) |
||||||
}, |
}, |
||||||
}); |
}) |
||||||
|
|
||||||
export {}; |
export {} |
||||||
|
|||||||
Loading…
Reference in new issue