Skip to content

Commit

Permalink
Add test account
Browse files Browse the repository at this point in the history
  • Loading branch information
lampo1024 committed May 30, 2019
1 parent eee392e commit b065e4c
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions DncZeus.App/src/components/login-form/login-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
</span>
</Input>
</FormItem>
<FormItem label="测试账户">
<RadioGroup v-model="form.userType" type="button" @on-change="handleUserTypeChange">
<Radio label="超级管理员"></Radio>
<Radio label="普通用户"></Radio>
</RadioGroup>
</FormItem>
<FormItem>
<Button
:disabled="processing"
Expand All @@ -27,8 +33,6 @@
</Form>
</template>
<script>
const userName = process.env.NODE_ENV === "development" ? "admin" : "";
const password = process.env.NODE_ENV === "development" ? "111111" : "";
export default {
name: "LoginForm",
props: {
Expand Down Expand Up @@ -56,8 +60,9 @@ export default {
data() {
return {
form: {
userName: userName,
password: password
userName: '',
password: '',
userType: 1
}
};
},
Expand All @@ -82,6 +87,17 @@ export default {
});
}
});
},
handleUserTypeChange(val){
switch(val){
case "超级管理员":
this.form.userName = "administrator";
break;
case "普通用户":
this.form.userName = "admin";
break;
}
this.form.password = "111111";
}
}
};
Expand Down

0 comments on commit b065e4c

Please sign in to comment.