Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-btn
variant="text"
@click="agreement = false, dialog = false"
>
No
</v-btn>
<v-spacer></v-spacer>
<v-btn
color="deep-purple"
variant="tonal"
@click="agreement = true, dialog = false"
>
Yes
</v-btn>
</v-card-actions>
</v-card>
</v-dialog> -->
</v-card-text>
</v-card>
</v-dialog>
</template>
<scriptsetup>
import{ref}from'vue';
import{reactive}from'vue';
</template>
<scriptsetup>
import{ref}from'vue';
import{reactive}from'vue';
importaxiosfrom'axios';
constform=ref(null)
construles=reactive({
email:v=>!!(v||'').match(/@/)||'Please enter a valid email',
length:len=>v=>(v||'').length>=len||`Invalid character length, required ${len}`,
usrname:v=>!!v||'用户名不能为空',
password:v=>!!v||'密码不能为空',
// password: v => !!(v || '').match(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*(_|[^\w])).+$/) ||
// 'Password must contain an upper case letter, a numeric character, and a special character',
required:v=>!!v||'This field is required',
});
constusrname=ref(null);
constpassword=ref(null);
constisValid=ref(false);
constisLoading=ref(false);
constloading=ref(false);
constform=ref(null);
construles=reactive({
email:v=>!!(v||'').match(/@/)||'Please enter a valid email',
length:len=>v=>(v||'').length>=len||`Invalid character length, required ${len}`,
usrname:v=>!!v||'用户名不能为空',
password:v=>!!v||'密码不能为空',
// password: v => !!(v || '').match(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*(_|[^\w])).+$/) ||
// 'Password must contain an upper case letter, a numeric character, and a special character',
required:v=>!!v||'This field is required',
realname:v=>!!v||'姓名不能为空',
});
constusrname=ref(null);
constpassword=ref(null);
constrealname=ref(null);
constisValid=ref(false);
constrealname1=ref(false);
constloading=ref(false);
functionlogin(){
loading.value=true;
axios.post('/api/login',{
usrname:usrname.value,
psword:password.value
})
.then(function(response){
constdata=response.data;
// console.log(data.is_member);
// console.log(data.is_member == 0);
// export default {
// data: () => ({
// agreement: false,
// bio: 'Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts',
// dialog: false,
// email: undefined,
// isValid: false,
// isLoading: false,
// password: undefined,
// phone: undefined,
// rules: {
// email: v => !!(v || '').match(/@/) || 'Please enter a valid email',
// length: len => v => (v || '').length >= len || `Invalid character length, required ${len}`,
// password: v => !!(v || '').match(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*(_|[^\w])).+$/) ||
// 'Password must contain an upper case letter, a numeric character, and a special character',
// required: v => !!v || 'This field is required',