<template>
|
|
<view class="se-p-30">
|
|
<uv-form labelPosition="top" :model="form" :rules="rules" ref="form">
|
|
<uv-form-item label="账号" prop="name" >
|
|
<uv-input v-model="form.name" type="text" placeholder="请输入账号" customStyle="border-radius: 30px;margin-top:5px;background-color: #ffffff;padding:5px 20px;" border="none"></uv-input>
|
|
</uv-form-item>
|
|
<uv-form-item label="密码" prop="password">
|
|
<uv-input v-model="form.password" type="password" placeholder="请输入密码" customStyle="border-radius: 30px;margin-top:5px;background-color: #ffffff;padding:5px 20px;" border="none"></uv-input>
|
|
</uv-form-item>
|
|
<uv-form-item>
|
|
<uv-button type="primary" text="登录" customStyle="margin-top: 30px;background-color: #1EC7B6;border-radius: 30px;" @click="submit"></uv-button>
|
|
</uv-form-item>
|
|
</uv-form>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import { commonIndexLogin,commonIndexLoginByInviteCode } from "@/common/api.js"
|
|
export default{
|
|
data(){
|
|
return{
|
|
form:{
|
|
name:"",
|
|
password:""
|
|
},
|
|
rules:{
|
|
name:[
|
|
{
|
|
type: 'string',
|
|
required: true,
|
|
message: '请输入账号',
|
|
trigger: ['blur', 'change']
|
|
}
|
|
],
|
|
password:[
|
|
{
|
|
type: 'string',
|
|
required: true,
|
|
message: '请输入密码',
|
|
trigger: ['blur', 'change']
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
methods:{
|
|
submit() {
|
|
this.$refs.form.validate().then(res => {
|
|
commonIndexLogin({username:this.form.name,password:this.form.password}).then(response=>{
|
|
uni.navigateTo({
|
|
url:"/pages_subpack/success/index?type=broker"
|
|
})
|
|
}).catch(error=>{
|
|
|
|
})
|
|
}).catch(errors => {
|
|
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
page{
|
|
background-color: #f5f5f5;
|
|
|
|
}
|
|
</style>
|