Compare commits
No commits in common. 'master' and 'lightspot' have entirely different histories.
27 changed files with 1564 additions and 1614 deletions
@ -1,28 +0,0 @@ |
|||||||
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', |
|
||||||
}, |
|
||||||
}) |
|
||||||
@ -0,0 +1,28 @@ |
|||||||
|
// 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, |
||||||
|
) |
||||||
|
Before Width: | Height: | Size: 2.8 MiB |
|
Before Width: | Height: | Size: 694 B |
|
Before Width: | Height: | Size: 696 KiB After Width: | Height: | Size: 634 KiB |
@ -1,54 +1,47 @@ |
|||||||
const app = getApp<IAppOption>() |
const app = getApp<IAppOption>(); |
||||||
|
|
||||||
Page({ |
Page({ |
||||||
data: {}, |
data: {}, |
||||||
onLoad() { |
onLoad() { |
||||||
app.waitLogin().then(() => { |
app.waitLogin().then(() => { |
||||||
const { isLogin, isNewReg, loginType, scene } = app.globalData |
const { isLogin, isNewReg, loginType } = 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