From 2b506494d7c73a3978004bd0b32a5d0783b25efa Mon Sep 17 00:00:00 2001
From: wang-hao-jie <1550036656@qq.com>
Date: 星期四, 25 八月 2022 18:00:28 +0800
Subject: [PATCH] 默认更改列表
---
src/views/main-components/header.vue | 13 +-
src/views/change-pass/change-pass.vue | 11 +
src/views/login.vue | 82 +++++++++-------
src/views/your/area-manage/areaManage.vue | 3
vue.config.js | 62 ++++++-----
public/index.html | 11 --
src/views/home/home.vue | 28 ++++
src/views/main-components/user.vue | 36 +++++++
src/views/Main.vue | 3
src/views/my-components/xboot/set-password.vue | 4
10 files changed, 162 insertions(+), 91 deletions(-)
diff --git a/public/index.html b/public/index.html
index 1e6e811..c2aa172 100644
--- a/public/index.html
+++ b/public/index.html
@@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> -->
<!--<link rel="icon" href="<%= BASE_URL %>logo.png">-->
- <title>鍞愬北鐑熻崏閰嶉�佺鐞嗗悗鍙�</title>
+ <title>瀹夊叏閰嶉�佺鐞嗗悗鍙�</title>
<meta name="keywords"
content="">
<meta name="description"
@@ -62,15 +62,6 @@
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/mapbox-gl@2.3.0/dist/mapbox-gl.css">-->
<!--<link rel="stylesheet"-->
<!--href="https://cdn.jsdelivr.net/npm/@mapbox/mapbox-gl-geocoder@4.7.1/dist/mapbox-gl-geocoder.css">-->
-
- <script>
- (function () {
- var hm = document.createElement("script");
- hm.src = "https://hm.baidu.com/hm.js?64e52d9ed8f5acc3eb7d60058e2fb7ab";
- var s = document.getElementsByTagName("script")[0];
- s.parentNode.insertBefore(hm, s);
- })();
- </script>
<style>
.page-loading-wrap {
padding: 120px;
diff --git a/src/views/Main.vue b/src/views/Main.vue
index 0adb7f8..883d514 100644
--- a/src/views/Main.vue
+++ b/src/views/Main.vue
@@ -30,7 +30,8 @@
<!--v-show="!shrink && menuTheme == 'light' && mainTheme != 'darkMode'"-->
<!--src="@/assets/yancao.png"-->
<!--/>-->
- <img src="@/assets/yancao.png"/>
+ <!--<img src="@/assets/yancao.png"/>-->
+ 鑿滃崟鏍�
</div>
</shrinkable-menu>
</div>
diff --git a/src/views/change-pass/change-pass.vue b/src/views/change-pass/change-pass.vue
index 98f1cde..f7cb535 100644
--- a/src/views/change-pass/change-pass.vue
+++ b/src/views/change-pass/change-pass.vue
@@ -28,7 +28,7 @@
</FormItem>
<FormItem label="鏂板瘑鐮�" prop="newPass">
<SetPassword
- placeholder="璇疯緭鍏ユ柊瀵嗙爜锛岄暱搴︿负6-20涓瓧绗�"
+ placeholder="璇疯緭鍏ユ柊瀵嗙爜锛岄暱搴︿负8-20涓瓧绗�"
v-model="form.newPass"
@on-change="changeInputPass"
/>
@@ -54,6 +54,7 @@
</template>
<script>
+ import { getOtherSet } from "@/api/index";
import SetPassword from "@/views/my-components/xboot/set-password";
import { changePass } from "@/api/index";
export default {
@@ -100,7 +101,7 @@
trigger: "change",
},
{
- min: 6,
+ min: 8,
message: "璇疯嚦灏戣緭鍏�6涓瓧绗�",
trigger: "blur",
},
@@ -129,6 +130,10 @@
this.strength = strength;
},
submit() {
+ if(this.strength!='寮�'){
+ this.$Message.error("璇蜂娇鐢ㄥ己瀵嗙爜鍖呭惈鏁板瓧锛屽ぇ灏忓啓瀛楁瘝锛岀壒娈婂瓧绗︼紝涓斾笉灏戜簬8浣�");
+ return;
+ }
let params = {
password: this.form.oldPass,
newPass: this.form.newPass,
@@ -143,7 +148,7 @@
this.visible = false;
this.$Modal.success({
title: "淇敼瀵嗙爜鎴愬姛",
- content: "淇敼瀵嗙爜鎴愬姛锛岃淇濈濂芥偍鐨勬柊璐﹀彿瀵嗙爜",
+ content: "涓轰簡璐﹀彿瀹夊叏锛岀郴缁熺◢鍚庡皢寮哄埗閫�鍑猴紝璇风敤鏂板瘑鐮侀噸鏂扮櫥闄嗐��",
});
}
});
diff --git a/src/views/home/home.vue b/src/views/home/home.vue
index 5a5bcea..12dbdab 100644
--- a/src/views/home/home.vue
+++ b/src/views/home/home.vue
@@ -5,7 +5,7 @@
<template>
<div>
<div v-show="currNav == 'xboot'" class="home">
- <a :href="this.token" target="_blank">鍞愬北鐑熻崏澶у睆鍦板潃</a>
+ <a :href="this.token" target="_blank">澶у睆鍦板潃</a>
<!--<Row :gutter="10">-->
<!--<!– 宸︿笂渚� 鐢ㄦ埛淇℃伅鍙奼ithub閾炬帴 –>-->
<!--<Col :xs="24" :sm="24" :lg="24" :xl="8">-->
@@ -455,6 +455,7 @@
</template>
<script>
+ import { getStore } from '../../libs/storage';
import { ipInfo, getNotice } from "@/api/index";
import visitVolume from "./components/visitVolume.vue";
import visitSeparation from "./components/visitSeparation.vue";
@@ -467,6 +468,7 @@
import Cookies from "js-cookie";
// import "gitalk/dist/gitalk.css";
import Gitalk from "gitalk";
+
export default {
name: "home",
@@ -545,11 +547,29 @@
}
});
},
+ toCode(str) { //鍔犲瘑瀛楃涓�
+ //瀹氫箟瀵嗛挜锛�36涓瓧姣嶅拰鏁板瓧
+ var key = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ var st = key.length; //鑾峰彇瀵嗛挜鐨勯暱搴�
+ var a = key.split(""); //鎶婂瘑閽ュ瓧绗︿覆杞崲涓哄瓧绗︽暟缁�
+ var s = "",b, b1, b2, b3; //瀹氫箟涓存椂鍙橀噺
+ for (var i = 0; i <str.length; i ++) { //閬嶅巻瀛楃涓�
+ b = str.charCodeAt(i); //閫愪釜鎻愬彇姣忎釜瀛楃锛屽苟鑾峰彇Unicode缂栫爜鍊�
+ b1 = b % st; //姹俇nicode缂栫爜鍊煎緱浣欐暟
+ b = (b - b1) / st; //姹傛渶澶у�嶆暟
+ b2 = b % st; //姹傛渶澶у�嶆暟鐨勪簬鏄�
+ b = (b - b2) / st; //姹傛渶澶у�嶆暟
+ b3 = b % st; //姹傛渶澶у�嶆暟鐨勪綑鏁�
+ s += a[b3] + a[b2] + a[b1]; //鏍规嵁浣欐暟鍊兼槧灏勫埌瀵嗛挜涓搴斾笅鏍囦綅缃殑瀛楃
+ }
+ return s; //杩斿洖杩欎簺鏄犲皠鐨勫瓧绗�
+ }
},
mounted() {
- //this.token = 'http://111.63.178.115:9093?token='+new Date().getTime();
- this.token = 'http://localhost:8080?token='+new Date().getTime();
- //this.token = 'http://localhost:8080'
+ this.token = 'http://111.63.178.115:9093?token=$vj$xCShfaQRUQlF8lqL1lwWi2auOrkLfkoecRuDWiJXlTnSg1mh6BODfjieo3ncsosjiocew';
+ //alert(this.toCode('绠$悊鍛�'))
+ //this.token = 'http://localhost:8080?token='+this.toCode('绠$悊鍛�');
+ //this.token = 'http://localhost:8080?token=$vj$xCShfaQRUQlF8lqL1lwWi2auOrkLfkoecRuDWiJXlTnSg1mh6BODfjieo3ncsosjiocew';
// this.init();
// // 閫氱煡
// let noticeFlag = "noticeShowed";
diff --git a/src/views/login.vue b/src/views/login.vue
index bc0cce4..1041cd8 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -10,7 +10,7 @@
<Col class="content">
<div>
<Header />
- <div v-if="!socialLogining">
+ <div v-if="!socialLogining" style="margin-top: 150px">
<Form
ref="usernameLoginForm"
:model="form"
@@ -18,6 +18,9 @@
class="form"
v-if="tabName == 'username'"
>
+ <FormItem>
+ <h1 style="margin-left: 40%;">鐧� 闄�</h1>
+ </FormItem>
<FormItem prop="username">
<Input
v-model="form.username"
@@ -39,34 +42,34 @@
autocomplete="off"
/>
</FormItem>
- <!--<FormItem prop="imgCode">-->
- <!--<Row-->
- <!--type="flex"-->
- <!--justify="space-between"-->
- <!--style="align-items: center; overflow: hidden"-->
- <!-->-->
- <!--<Input-->
- <!--v-model="form.imgCode"-->
- <!--size="large"-->
- <!--clearable-->
- <!--placeholder="璇疯緭鍏ュ浘鐗囬獙璇佺爜"-->
- <!--:maxlength="10"-->
- <!--class="input-verify"-->
- <!--/>-->
- <!--<div-->
- <!--class="code-image"-->
- <!--style="position: relative; font-size: 12px"-->
- <!-->-->
- <!--<Spin v-if="loadingCaptcha" fix></Spin>-->
- <!--<img-->
- <!--:src="captchaImg"-->
- <!--@click="getCaptchaImg"-->
- <!--alt="鍔犺浇楠岃瘉鐮佸け璐�"-->
- <!--style="width: 110px; cursor: pointer; display: block"-->
- <!--/>-->
- <!--</div>-->
- <!--</Row>-->
- <!--</FormItem>-->
+ <FormItem prop="imgCode">
+ <Row
+ type="flex"
+ justify="space-between"
+ style="align-items: center; overflow: hidden"
+ >
+ <Input
+ v-model="form.imgCode"
+ size="large"
+ clearable
+ placeholder="璇疯緭鍏ュ浘鐗囬獙璇佺爜"
+ :maxlength="10"
+ class="input-verify"
+ />
+ <div
+ class="code-image"
+ style="position: relative; font-size: 12px"
+ >
+ <Spin v-if="loadingCaptcha" fix></Spin>
+ <img
+ :src="captchaImg"
+ @click="getCaptchaImg"
+ alt="鍔犺浇楠岃瘉鐮佸け璐�"
+ style="width: 110px; cursor: pointer; display: block"
+ />
+ </div>
+ </Row>
+ </FormItem>
</Form>
<!--<Row justify="space-between" align="middle">-->
@@ -121,6 +124,7 @@
<!--</VueFurcateTree>-->
<!--</div>-->
+
</template>
@@ -191,6 +195,7 @@
}
],
showMore: false,
+ code:"",
captchaId: "",
captchaImg: "",
loadingCaptcha: true,
@@ -207,6 +212,7 @@
password: "",
code: "",
},
+ showChangePass: false,
};
},
methods: {
@@ -215,7 +221,8 @@
initCaptcha().then((res) => {
this.loadingCaptcha = false;
if (res.success) {
- this.captchaId = res.result;
+ this.code = res.result.code;
+ this.captchaId = res.result.captchaId;
this.captchaImg = drawCodeImage + this.captchaId;
}
});
@@ -284,6 +291,11 @@
},
submitLogin() {
if (this.tabName == "username") {
+ if(this.code.toUpperCase()!=this.form.imgCode.toUpperCase()){
+ this.$Message.error("楠岃瘉鐮侀敊璇�");
+ this.getCaptchaImg();
+ return
+ }
this.loading = true;
login({
username: this.form.username,
@@ -478,16 +490,16 @@
});
},
test() {
- this.$Notice.info({
- title: "娴嬭瘯浣撻獙璐﹀彿",
- desc: "璐﹀彿锛歵est鎴杢est2<br>瀵嗙爜锛�123456",
- });
+ // this.$Notice.info({
+ // title: "娴嬭瘯浣撻獙璐﹀彿",
+ // desc: "璐﹀彿锛歵est鎴杢est2<br>瀵嗙爜锛�123456",
+ // });
},
},
mounted() {
//this.showNotice();
this.relatedLogin();
- //this.getCaptchaImg();
+ this.getCaptchaImg();
},
};
</script>
diff --git a/src/views/main-components/header.vue b/src/views/main-components/header.vue
index fb4571f..2b19efa 100644
--- a/src/views/main-components/header.vue
+++ b/src/views/main-components/header.vue
@@ -1,13 +1,12 @@
<template>
<div>
<div class="header">
- <img
- src="@/assets/yancao.png"
- width="220px"
- v-if="mainTheme == 'darkMode'"
- />
- <img src="@/assets/yancao.png" width="320px" v-else />
- <!--<div class="description">{{ 鍞愬北鐑熻崏 }}</div>-->
+ <!--<img-->
+ <!--src="@/assets/keji.jpeg"-->
+ <!--width="320px"-->
+ <!--v-if="mainTheme == 'darkMode'"-->
+ <!--/>-->
+ <!--<img src="@/assets/keji.jpeg" width="420px" v-else />-->
</div>
</div>
</template>
diff --git a/src/views/main-components/user.vue b/src/views/main-components/user.vue
index 2d18402..2565a19 100644
--- a/src/views/main-components/user.vue
+++ b/src/views/main-components/user.vue
@@ -53,10 +53,44 @@
data() {
return {
showChangePass: false,
+ flag:0,
};
},
methods: {
- init() {},
+ init() {
+ let psw = this.getStore("userInfo");
+ psw = JSON.parse(psw).description;
+ this.checkStrengthValue(psw);
+ },
+ checkStrengthValue(v) {
+ // 璇勭骇鍒跺垽鏂瘑鐮佸己搴� 鏈�楂�5
+ let grade = 0;
+ if (/\d/.test(v)) {
+ grade++; //鏁板瓧
+ }
+ if (/[a-z]/.test(v)) {
+ grade++; //灏忓啓
+ }
+ if (/[A-Z]/.test(v)) {
+ grade++; //澶у啓
+ }
+ if (/\W/.test(v)) {
+ grade++; //鐗规畩瀛楃
+ }
+ if (v.length >= 8) {
+ grade++;
+ }
+ if(grade<5){
+ this.showChangePass = true;
+ this.flag++;
+ if(this.flag>1){
+ this.handleClickUserDropdown("loginout");
+ }
+ setInterval(() => {
+ this.init();
+ }, 1000*60)
+ }
+ },
handleClickUserDropdown(name) {
if (name == "ownSpace") {
util.openNewPage(this, "ownspace_index");
diff --git a/src/views/my-components/xboot/set-password.vue b/src/views/my-components/xboot/set-password.vue
index 8abbd27..10c6612 100644
--- a/src/views/my-components/xboot/set-password.vue
+++ b/src/views/my-components/xboot/set-password.vue
@@ -20,7 +20,7 @@
hide-info
style="margin: 13px 0;"
/>
- <br />璇疯嚦灏戣緭鍏� 6 涓瓧绗︺�傝涓嶈浣�
+ <br />璇疯嚦灏戣緭鍏� 8 涓瓧绗︺�傝涓嶈浣�
<br />鐢ㄥ鏄撹鐚滃埌鐨勫瘑鐮併��
</div>
</Poptip>
@@ -76,7 +76,7 @@
if (/\W/.test(v)) {
grade++; //鐗规畩瀛楃
}
- if (v.length >= 10) {
+ if (v.length >= 8) {
grade++;
}
this.grade = grade;
diff --git a/src/views/your/area-manage/areaManage.vue b/src/views/your/area-manage/areaManage.vue
index 8d7e2b2..a67657b 100644
--- a/src/views/your/area-manage/areaManage.vue
+++ b/src/views/your/area-manage/areaManage.vue
@@ -781,6 +781,9 @@
if(this.areaForm.description==undefined){
this.areaForm.description="";
}
+ if(this.areaForm.carId==undefined){
+ this.areaForm.carId="";
+ }
this.$refs.areaForm.validate((valid) => {
if (valid) {
if (this.modalType == 0) {
diff --git a/vue.config.js b/vue.config.js
index f7124b6..c2d642c 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -6,44 +6,50 @@
port: 9999,
proxy: {
'/xboot': {
- target: 'http://127.0.0.1:8888', // 璇锋眰鏈湴 闇�瑕亁boot鍚庣椤圭洰
- ws: true
+ target: 'http://127.0.0.1:9091', // 璇锋眰鏈湴 闇�瑕亁boot鍚庣椤圭洰
+ //target: 'http://192.168.0.162:8888', // 璇锋眰鏈湴 闇�瑕亁boot鍚庣椤圭洰
+ //target: 'http://111.63.178.115:9091',
+ ws: true,
+ changeOrigin:true,
+ pathRewrite:{
+ '/api':''
+ }
},
'/foo': {
target: '<other_url>'
}
- }
+ },
},
// 鎵撳寘鏃朵笉鐢熸垚.map鏂囦欢 閬垮厤鐪嬪埌婧愮爜
productionSourceMap: false,
// 閮ㄧ讲浼樺寲
configureWebpack: {
// 浣跨敤CDN
- externals: {
- vue: 'Vue',
- 'vue-i18n': 'VueI18n',
- axios: 'axios',
- 'vue-router': 'VueRouter',
- vuex: 'Vuex',
- 'view-design': 'iview',
- echarts: 'echarts',
- apexcharts: 'ApexCharts',
- 'vue-apexcharts': 'VueApexCharts',
- xlsx: 'XLSX',
- dplayer: 'DPlayer',
- 'print-js': 'printJS',
- html2canvas: 'html2canvas',
- 'vue-json-pretty': 'VueJsonPretty',
- 'vue-lazyload': 'VueLazyload',
- gitalk: 'Gitalk',
- 'js-cookie': 'Cookies',
- wangEditor: 'wangEditor',
- quill: 'Quill',
- stompjs: 'Stomp',
- 'sockjs-client': 'SockJS',
- vuedraggable: 'vuedraggable',
- viewerjs: 'Viewer'
- },
+ // externals: {
+ // vue: 'Vue',
+ // 'vue-i18n': 'VueI18n',
+ // axios: 'axios',
+ // 'vue-router': 'VueRouter',
+ // vuex: 'Vuex',
+ // 'view-design': 'iview',
+ // echarts: 'echarts',
+ // apexcharts: 'ApexCharts',
+ // 'vue-apexcharts': 'VueApexCharts',
+ // xlsx: 'XLSX',
+ // dplayer: 'DPlayer',
+ // 'print-js': 'printJS',
+ // html2canvas: 'html2canvas',
+ // 'vue-json-pretty': 'VueJsonPretty',
+ // 'vue-lazyload': 'VueLazyload',
+ // gitalk: 'Gitalk',
+ // 'js-cookie': 'Cookies',
+ // wangEditor: 'wangEditor',
+ // quill: 'Quill',
+ // stompjs: 'Stomp',
+ // 'sockjs-client': 'SockJS',
+ // vuedraggable: 'vuedraggable',
+ // viewerjs: 'Viewer'
+ // },
plugins: [
// GZIP鍘嬬缉
new CompressionPlugin({
--
Gitblit v1.9.1