租房小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.7 KiB

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
  1. <template>
  2. <view class="se-p-30">
  3. <uv-form labelPosition="top" :model="form" :rules="rules" ref="form">
  4. <uv-form-item label="账号" prop="name" >
  5. <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>
  6. </uv-form-item>
  7. <uv-form-item label="密码" prop="password">
  8. <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>
  9. </uv-form-item>
  10. <uv-form-item>
  11. <uv-button type="primary" text="登录" customStyle="margin-top: 30px;background-color: #1EC7B6;border-radius: 30px;" @click="submit"></uv-button>
  12. </uv-form-item>
  13. </uv-form>
  14. </view>
  15. </template>
  16. <script>
  17. export default{
  18. data(){
  19. return{
  20. form:{
  21. name:"",
  22. password:""
  23. },
  24. rules:{
  25. name:[
  26. {
  27. type: 'string',
  28. required: true,
  29. message: '请输入账号',
  30. trigger: ['blur', 'change']
  31. }
  32. ],
  33. password:[
  34. {
  35. type: 'string',
  36. required: true,
  37. message: '请输入密码',
  38. trigger: ['blur', 'change']
  39. }
  40. ]
  41. }
  42. }
  43. },
  44. methods:{
  45. submit() {
  46. uni.navigateTo({
  47. url:"/pages_subpack/success/index?type=broker"
  48. })
  49. this.$refs.form.validate().then(res => {
  50. uni.showToast({
  51. icon: 'none',
  52. title: '校验通过'
  53. })
  54. }).catch(errors => {
  55. uni.showToast({
  56. icon: 'none',
  57. title: '校验失败'
  58. })
  59. })
  60. }
  61. }
  62. }
  63. </script>
  64. <style>
  65. page{
  66. background-color: #f5f5f5;
  67. }
  68. </style>