Ver código fonte

优化两清三化

wulanhaote
liuminjian 3 anos atrás
pai
commit
c631b9e778
11 arquivos alterados com 1196 adições e 56 exclusões
  1. +3
    -0
      index.html
  2. +38
    -0
      src/api/homestead/index.js
  3. +13
    -4
      src/api/login/index.js
  4. BIN
      src/assets/images/homestead/cun.jpg
  5. BIN
      src/assets/images/homestead/jia.png
  6. BIN
      src/assets/images/homestead/jian.png
  7. BIN
      src/assets/images/homestead/mark.png
  8. BIN
      src/assets/images/homestead/zhen.jpg
  9. +1042
    -37
      src/views/homestead/index.vue
  10. +91
    -15
      src/views/homestead/login.vue
  11. +9
    -0
      static/js/ol.js

+ 3
- 0
index.html Ver arquivo

@@ -6,6 +6,9 @@
<meta name="viewport"
content="width=device-width,initial-scale=1,user-scalable=0,minimum-scale=1.0,maximum=scale=1.0" />
<link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico">
<script src="/static/js/ol.js"></script>
<script type="text/javascript"
src="http://api.tianditu.gov.cn/api?v=4.0&tk=cc4aba6e967096098249efa069733067"></script>
<title>农燊高科</title>
</head>



+ 38
- 0
src/api/homestead/index.js Ver arquivo

@@ -0,0 +1,38 @@
import request from '@/utils/request'

// 获取区下拉
export function bigDataHcAreaInfo(query) {
return request({
url: '/bigData/hc/hcAreaInfo',
method: 'get',
params: query
})
}


// 获取乡镇下拉
export function bigDataHcCountyInfo(query) {
return request({
url: '/bigData/hc/hcCountyInfo',
method: 'get',
params: query
})
}

//获取村级下拉
export function bigDataHcVillageInfo(query) {
return request({
url: '/bigData/hc/hcVillageInfo',
method: 'get',
params: query
})
}

//右侧详情农房农地列表
export function hcBottomSearch(query) {
return request({
url: '/bigData/hc/hcBottomSearch',
method: 'get',
params: query
})
}

+ 13
- 4
src/api/login/index.js Ver arquivo

@@ -11,7 +11,10 @@ export function login(username, password, code, uuid) {
return request({
url: '/login',
method: 'post',
data: data
data: data,
headers: {
isToken: false
}
})
}

@@ -25,7 +28,10 @@ export function smsLogin(mobile, smsCode, uuid) {
return request({
url: '/sms/login',
method: 'post',
data: data
data: data,
headers: {
isToken: false
}
})
}

@@ -49,7 +55,10 @@ export function logout() {
export function getCodeImg() {
return request({
url: '/captchaImage',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}

@@ -63,7 +72,7 @@ export function getSmsCode(mobile) {
return request({
url: '/sms/code',
method: 'post',
data:data
data: data
})
}


BIN
src/assets/images/homestead/cun.jpg Ver arquivo

Antes Depois
Largura: 100  |  Altura: 100  |  Tamanho: 4.1 KiB

BIN
src/assets/images/homestead/jia.png Ver arquivo

Antes Depois
Largura: 15  |  Altura: 15  |  Tamanho: 1.0 KiB

BIN
src/assets/images/homestead/jian.png Ver arquivo

Antes Depois
Largura: 15  |  Altura: 15  |  Tamanho: 985 B

BIN
src/assets/images/homestead/mark.png Ver arquivo

Antes Depois
Largura: 19  |  Altura: 31  |  Tamanho: 1.7 KiB

BIN
src/assets/images/homestead/zhen.jpg Ver arquivo

Antes Depois
Largura: 100  |  Altura: 100  |  Tamanho: 5.2 KiB

+ 1042
- 37
src/views/homestead/index.vue
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 91
- 15
src/views/homestead/login.vue Ver arquivo

@@ -11,56 +11,128 @@
<div class="signIn_container">
<div class="signIn_input_wrap">
<van-field
v-model="message"
autosize
placeholder="请输入手机号"
v-model="formData.username"
placeholder="请输入用户名"
/>
</div>
</div>
<div class="signIn_container">
<div class="signIn_input_wrap">
<van-field v-model="message" autosize placeholder="请输入密码" />
<van-field
autosize
placeholder="请输入密码"
v-model="formData.password"
/>
</div>
</div>
<div class="signIn_container">
<div class="signIn_input_wrap">
<div class="verification_code">
<van-field
v-model="message"
autosize
placeholder="请输入验证码"
v-model="formData.code"
/>
</div>
<div class="verification_images"></div>
<div class="verification_images">
<img class="code-img" :src="codeUrl" @click="getCode" />
</div>
</div>
</div>
<div class="signIn_container">
<div class="remember_num">
<van-radio-group v-model="radio">
<van-radio name="1" icon-size="16px" checked-color="#3CBF5B"
>记住密码</van-radio
>
</van-radio-group>
<van-checkbox
v-model="rememberPassword"
icon-size="16px"
checked-color="#3CBF5B"
>记住密码</van-checkbox
>
</div>
</div>
</div>
<div class="from_btn">登录</div>
<div class="from_btn" @click="handleLogin">登录</div>
</div>
</div>
</div>
</template>

<script>
import { getCodeImg } from "@/api/login";
import Cookies from "js-cookie";
export default {
name: "homesteadLogin",
data() {
return {
message: "",
radio: "2",
formData: {
username: "", //账号
password: "", //密码
code: null, //图片验证码
uuid: null, //识别uuid
},
codeUrl: "", //图片验证码
rememberPassword: false, //记住密码 1记住 2不记住
};
},
mounted() {},
methods: {},
created() {
this.getCode();
let userName = Cookies.get("homesteadUserName"); // => 'value'
let password = Cookies.get("homesteadPassword"); // => undefined
if (userName != undefined) {
this.formData.username = userName;
this.rememberPassword = true;
}
if (password != undefined) {
this.formData.password = password;
}
},
methods: {
getCode() {
getCodeImg().then((res) => {
this.formData.uuid = res.uuid;
this.codeUrl = "data:image/gif;base64," + res.img;
});
},
handleLogin() {
//账号密码登录
if (this.formData.username == "") {
this.$dialog.alert({
message: "账号不能为空",
});
return false;
} else if (this.formData.password == "") {
this.$dialog.alert({
message: "密码不能为空",
});
return false;
} else if (this.formData.code == "") {
this.$dialog.alert({
message: "图片验证码不能为空",
});
return false;
}

this.$store
.dispatch("Login", this.formData)
.then(() => {
if (this.rememberPassword == true) {
Cookies.set("homesteadUserName", this.formData.username, {
expires: 30,
});
Cookies.set("homesteadPassword", this.formData.password, {
expires: 30,
});
}
this.$router
.push({ path: this.redirect || "/homestead/index" })
.catch(() => {});
})
.catch(() => {
this.loading = false;
this.getCode();
});
},
},
};
</script>

@@ -123,6 +195,10 @@ export default {
.verification_images {
flex: 0 0 220px;
margin-left: 20px;
img {
width: 100%;
height: 100%;
}
}
.van-cell {
border: 2px solid #f1f0f5;


+ 9
- 0
static/js/ol.js
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


Carregando…
Cancelar
Salvar