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