add plain-text for QR Code scan
parent
8a60d4c48f
commit
59ee57827b
|
|
@ -374,10 +374,10 @@ Request
|
|||
```json
|
||||
{
|
||||
"token": "token_test",
|
||||
"stuid": "3220101984",
|
||||
"passwd": "sonvidiafuckyou"
|
||||
"code": "code_test",
|
||||
}
|
||||
```
|
||||
这里的 code 是来源于小程序扫描统一身份认证生成的二维码
|
||||
|
||||
### 检查 token 是否登陆 `GET /member/checklogin?token={token}` OK
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,14 @@ export default class UserMemberPage extends Component {
|
|||
return !wechatUser.getAccess() ? (
|
||||
<View style={{ marginTop: '30rpx', width: '94%', marginLeft: '3%' }}>
|
||||
<AtMessage />
|
||||
<View className='page-title' style={{ marginBottom: '40rpx' }}>
|
||||
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||
{pt.get().memberPage.loginMainTitleLine}
|
||||
</View>
|
||||
<View className='at-article__h2'>
|
||||
{pt.get().memberPage.loginSubTitleLine}
|
||||
</View>
|
||||
</View>
|
||||
<AtButton
|
||||
loading={this.state.isLoading}
|
||||
type='primary'
|
||||
|
|
@ -59,6 +67,15 @@ export default class UserMemberPage extends Component {
|
|||
</View>
|
||||
) : (
|
||||
<View style={{ marginTop: '30rpx', width: '94%', marginLeft: '3%' }}>
|
||||
<AtMessage />
|
||||
<View className='page-title' style={{ marginBottom: '40rpx' }}>
|
||||
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||
{pt.get().memberPage.logoutMainTitleLine}
|
||||
</View>
|
||||
<View className='at-article__h2'>
|
||||
{pt.get().memberPage.logoutSubTitleLine}
|
||||
</View>
|
||||
</View>
|
||||
<AtButton type='primary' onClick={this.onLogout.bind(this)}>
|
||||
{pt.get().button.buttonText.logout}
|
||||
</AtButton>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
export interface MemberPageText {
|
||||
mainTitleLine: string;
|
||||
subTitleLine: string;
|
||||
loginMainTitleLine: string;
|
||||
loginSubTitleLine: string;
|
||||
logoutMainTitleLine: string;
|
||||
logoutSubTitleLine: string;
|
||||
cardTitle: {
|
||||
dutyInfo: string;
|
||||
stepInfo: string;
|
||||
|
|
@ -55,6 +59,10 @@ export interface MemberPageText {
|
|||
export const memberPageZhCn: MemberPageText = {
|
||||
mainTitleLine: '您好,',
|
||||
subTitleLine: '祝你满绩每一天',
|
||||
loginMainTitleLine: '协会成员登录入口',
|
||||
loginSubTitleLine: '请打开 auth.zjueva.net,登录后点击下方按钮以扫描二维码',
|
||||
logoutMainTitleLine: '协会成员登出',
|
||||
logoutSubTitleLine: '登出后须扫码重新登录!',
|
||||
cardTitle: {
|
||||
dutyInfo: '值班情况',
|
||||
stepInfo: '维修步骤',
|
||||
|
|
@ -132,6 +140,10 @@ export const memberPageZhCn: MemberPageText = {
|
|||
export const memberPageEnUs: MemberPageText = {
|
||||
mainTitleLine: 'Hi! ',
|
||||
subTitleLine: 'Have a great day!',
|
||||
loginMainTitleLine: '协会成员登录入口',
|
||||
loginSubTitleLine: '请打开 auth.zjueva.net,登录后点击下方按钮以扫描二维码',
|
||||
logoutMainTitleLine: '协会成员登出',
|
||||
logoutSubTitleLine: '登出后须扫码重新登录!',
|
||||
cardTitle: {
|
||||
dutyInfo: 'Duty Situation',
|
||||
stepInfo: 'Maintenance Steps',
|
||||
|
|
|
|||
|
|
@ -10,12 +10,13 @@ export function memberLogin(that: UserMemberPage) {
|
|||
});
|
||||
Taro.scanCode({
|
||||
onlyFromCamera: true,
|
||||
success: () => {
|
||||
success: (re) => {
|
||||
Taro.request({
|
||||
url: getUrl('/member/login'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
token: wechatUser.getToken(),
|
||||
code: re.result,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
|
|
@ -46,7 +47,7 @@ export function memberLogin(that: UserMemberPage) {
|
|||
isLoading: false,
|
||||
});
|
||||
Taro.atMessage({
|
||||
message: pt.get().button.loginText.error + err.toString(),
|
||||
message: pt.get().button.loginText.error + err.errMsg.toString(),
|
||||
type: 'error',
|
||||
});
|
||||
});
|
||||
|
|
@ -56,7 +57,7 @@ export function memberLogin(that: UserMemberPage) {
|
|||
isLoading: false,
|
||||
});
|
||||
Taro.atMessage({
|
||||
message: pt.get().button.loginText.error + err.toString(),
|
||||
message: pt.get().button.loginText.error + err.errMsg.toString(),
|
||||
type: 'error',
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue