提交 c97af508 编写于 作者: “grape”'s avatar “grape”

2022/8/16

上级 babaf030
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
"better-scroll": "^2.4.2", "better-scroll": "^2.4.2",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"echarts": "^5.3.0", "echarts": "^5.3.0",
"element-ui": "^2.4.6",
"express": "^4.17.1", "express": "^4.17.1",
"mathjs": "^9.4.4", "mathjs": "^9.4.4",
"sm-crypto": "^0.3.7", "sm-crypto": "^0.3.7",
...@@ -28,27 +29,26 @@ ...@@ -28,27 +29,26 @@
"vant": "^2.12.29", "vant": "^2.12.29",
"vconsole": "^3.12.0", "vconsole": "^3.12.0",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-awesome-swiper": "^4.1.1", "vue-awesome-swiper": "^5.0.1",
"vue-axios": "^3.2.5", "vue-axios": "^3.2.5",
"vue-baidu-map": "^0.21.22", "vue-baidu-map": "^0.18.7",
"vue-class-component": "^7.2.3", "vue-class-component": "^7.2.3",
"vue-esign": "^1.0.5", "vue-esign": "^1.0.5",
"vue-jsonp": "^2.0.0", "vue-jsonp": "^2.0.0",
"vue-property-decorator": "^9.1.2", "vue-property-decorator": "^9.1.2",
"vue-qr": "^3.2.4", "vue-qr": "^3.2.4",
"vue-router": "^3.2.0", "vue-router": "^3.2.0",
"vuex": "^3.5.1", "vuex": "^3.5.1"
"element-ui": "^2.4.6"
}, },
"devDependencies": { "devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.18.0", "@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0", "@typescript-eslint/parser": "^4.18.0",
"@vue/cli-plugin-babel": "~4.5.0", "@vue/cli-plugin-babel": "^5.0.8",
"@vue/cli-plugin-eslint": "~4.5.0", "@vue/cli-plugin-eslint": "^5.0.8",
"@vue/cli-plugin-router": "~4.5.0", "@vue/cli-plugin-router": "^5.0.8",
"@vue/cli-plugin-typescript": "~4.5.0", "@vue/cli-plugin-typescript": "^5.0.8",
"@vue/cli-plugin-vuex": "~4.3.0", "@vue/cli-plugin-vuex": "^5.0.8",
"@vue/cli-service": "~4.5.0", "@vue/cli-service": "^5.0.8",
"@vue/eslint-config-prettier": "^6.0.0", "@vue/eslint-config-prettier": "^6.0.0",
"@vue/eslint-config-typescript": "^7.0.0", "@vue/eslint-config-typescript": "^7.0.0",
"babel-plugin-import": "^1.13.3", "babel-plugin-import": "^1.13.3",
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
*/ */
import { MethodType } from "@/constants/enum/general/method-type.enum"; import { MethodType } from "@/constants/enum/general/method-type.enum";
import { HeaderType } from "@/constants/enum/general/header-type.enum"; import { HeaderType } from "@/constants/enum/general/header-type.enum";
// http://10.0.1.9:9130
const prefix = "http://10.0.0.118:9130/ms-system/api/v1/sysCustInfo/permit_endpoint" const prefix = "http://localhost:9135//ms-system/api/v1/sysCustInfo/permit_endpoint"
const loginApi = { const loginApi = {
updatePicCode: { updatePicCode: {
......
...@@ -11,7 +11,6 @@ export default { ...@@ -11,7 +11,6 @@ export default {
* @return {Object} jsonstr 返回加密后的json数据 * @return {Object} jsonstr 返回加密后的json数据
*/ */
encryptData(jsonstr: any) { encryptData(jsonstr: any) {
debugger
let encryData = {}; let encryData = {};
try { try {
// SM2 加密秘钥 // SM2 加密秘钥
...@@ -57,11 +56,10 @@ export default { ...@@ -57,11 +56,10 @@ export default {
jsonData = JSON.parse(jsonData); jsonData = JSON.parse(jsonData);
} }
try { try {
debugger
let sm2 = require('sm-crypto').sm2, let sm2 = require('sm-crypto').sm2,
sm3 = require('sm-crypto').sm3, sm3 = require('sm-crypto').sm3,
sm4 = require('sm-crypto').sm4, sm4 = require('sm-crypto').sm4,
privateKey = '0494FEF4897CF4E9C9CB994B66B29E9B3EAF2C5C59EBEDB703B0F980199CEA7BDBF177AB3E65A17F3E96227977C55423929975CE535B715AC21E0AB23B9858AB4F', //SM2公钥 privateKey = '7666A8CA12A27CF6C440A1CFECB4B1BB7055F2FB3435E957EB35142FAB881EFB', //SM2公钥
sm4Key = '', sm4Key = '',
orSm4Key = jsonData.sm4key; orSm4Key = jsonData.sm4key;
orSm4Key = orSm4Key.substr(2, orSm4Key.length - 2); orSm4Key = orSm4Key.substr(2, orSm4Key.length - 2);
......
...@@ -32,7 +32,8 @@ class ApiService { ...@@ -32,7 +32,8 @@ class ApiService {
Vue.axios.interceptors.request.use( Vue.axios.interceptors.request.use(
config => { config => {
config.headers['Access-Control-Allow-Origin'] = '*'; config.headers['Access-Control-Allow-Origin'] = '*';
config.headers['MCEP'] = 'MCEP'; //开启
// config.headers['MCEP'] = 'MCEP';
if(!config.headers['Content-Type']){ if(!config.headers['Content-Type']){
config.headers['Content-Type'] = 'application/json; charset=utf-8'; config.headers['Content-Type'] = 'application/json; charset=utf-8';
} }
...@@ -175,7 +176,12 @@ class ApiService { ...@@ -175,7 +176,12 @@ class ApiService {
path = query != null ? this.urlQueryConvert(path, query) : path; path = query != null ? this.urlQueryConvert(path, query) : path;
console.log("服务调用--" + path); console.log("服务调用--" + path);
return Vue.axios.post(`${path}`, params, requestConfig).then(this.createBusCodeHandler(query)).catch(this.createErrorHandler()) return Vue.axios.post(`${path}`, params, requestConfig).then(res=>{
//TODO
console.log(res);
return res.data
});
} }
/** /**
* POST请求 文件上传 * POST请求 文件上传
......
...@@ -105,7 +105,6 @@ export default class LoginView extends Vue { ...@@ -105,7 +105,6 @@ export default class LoginView extends Vue {
//获取图形验证码 //获取图形验证码
_updatePicCode() { _updatePicCode() {
//请求图形验证码 //请求图形验证码
debugger
apiService.general(loginApi.updatePicCode, undefined, undefined, undefined).then((response: RestfulResponse) => { apiService.general(loginApi.updatePicCode, undefined, undefined, undefined).then((response: RestfulResponse) => {
//console.log(response); //console.log(response);
...@@ -153,7 +152,7 @@ export default class LoginView extends Vue { ...@@ -153,7 +152,7 @@ export default class LoginView extends Vue {
//图形验证码 //图形验证码
imageVerifyKey: this.imageSrcValue, imageVerifyKey: this.imageSrcValue,
//渠道 //渠道
loginType: "3", loginType: "2",
//手机验证码 //手机验证码
messCode: this.sms, messCode: this.sms,
//密码 //密码
......
...@@ -13,46 +13,99 @@ ...@@ -13,46 +13,99 @@
</div> </div>
<div class="login"> <div class="login">
<van-row style="padding: 10% 0%;"> <van-row style="padding: 10% 0%">
<van-col span="24"> <van-col span="24">
<p class="polog"><span class="font-size-18-dhc" style="padding: 2% 0%;font-weight: 600;">密码重置</span> </p> <p class="polog">
<span
class="font-size-18-dhc"
style="padding: 2% 0%; font-weight: 600"
>密码重置</span
>
</p>
</van-col> </van-col>
<van-col span="24"><span class="font-size-12-dhc" style="font-weight: 400; font-family: 'Arial Normal', 'Arial'; <van-col span="24"
}">请使用注册手机号进行密码重置</span></van-col> ><span
class="font-size-12-dhc"
style="font-weight: 400; font-family: 'Arial Normal', 'Arial';
}"
>请使用注册手机号进行密码重置</span
></van-col
>
</van-row> </van-row>
<van-form @submit="onSubmit"> <van-form @submit="onSubmit">
<div class="logindiv"> <div class="logindiv">
<span class="sopan">手机号码</span> <span class="sopan">手机号码</span>
<van-field v-model="phone" label="+86 |" :border="true" placeholder="请输入手机号" /> <van-field
v-model="phone"
label="+86 |"
:border="true"
placeholder="请输入手机号"
/>
<van-divider /> <van-divider />
</div> </div>
<div class="logindiv"> <div class="logindiv">
<span class="sopan">新密码</span> <span class="sopan">新密码</span>
<van-field v-model="newpassword" type="password" center clearable placeholder="请填写新密码" /> <van-field
v-model="newpassword"
:type="passwordType"
clickable
center
clearable
placeholder="请填写新密码"
>
<template slot="right-icon">
<span class="solts" @click="switchPasswordType">
<van-icon name="eye" v-if="passwordType === 'password'" />
<van-icon name="closed-eye" v-else />
</span>
</template>
</van-field>
<!-- <van-divider /> --> <!-- <van-divider /> -->
</div> </div>
<div class="logindiv"> <div class="logindiv">
<span class="sopan">新密码</span> <span class="sopan">新密码</span>
<van-field v-model="restpassword" type="password" center clearable placeholder="请确认新密码" /> <van-field
v-model="restpassword"
:type="password"
clickable
center
clearable
placeholder="请确认新密码"
>
<template slot="right-icon">
<span class="solts" @click="switchPasswordType">
<van-icon name="eye" v-if="passwordType === 'password'" />
<van-icon name="closed-eye" v-else />
</span>
</template>
</van-field>
<!-- <van-divider /> --> <!-- <van-divider /> -->
</div> </div>
<span class="sopan">短信验证码</span> <span class="sopan">短信验证码</span>
<div> <div>
<van-row>
<van-row >
<van-col span="16"> <van-col span="16">
<van-field v-model="sms" center clearable placeholder="请输入短信验证码"> <van-field
v-model="sms"
center
clearable
placeholder="请输入短信验证码"
>
<!-- <van-divider /> --> <!-- <van-divider /> -->
</van-field> </van-field>
</van-col> </van-col>
<van-col span="8"><a href="#" @click="getPhonePost()">获取短信验证码</a></van-col> <van-col span="8"
><a href="#" @click="getPhonePost()">获取短信验证码</a></van-col
>
</van-row> </van-row>
</div> </div>
<div style="margin: 16px;"> <div style="margin: 16px">
<van-button square block type="info" native-type="submit">登录</van-button> <van-button square block type="info" native-type="submit"
>登录</van-button
>
</div> </div>
</van-form> </van-form>
</div> </div>
...@@ -60,34 +113,39 @@ ...@@ -60,34 +113,39 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component, Vue } from "vue-property-decorator"; import { Component, Vue } from "vue-property-decorator";
import { Image as VanImage, Toast } from 'vant'; import { Image as VanImage, Toast } from "vant";
import apiService from "@/services/api.service"; import apiService from "@/services/api.service";
import { Code } from "@/constants/enum/general/code.enum"; import { Code } from "@/constants/enum/general/code.enum";
import { RestfulResponse } from "@/model/domain/RestfulResponse"; import { RestfulResponse } from "@/model/domain/RestfulResponse";
import commonApi from "@/constants/api/login/common.api"; import commonApi from "@/constants/api/login/common.api";
@Component({ @Component({
name: "ForgetPassView", name: "ForgetPassView",
[VanImage.name]: VanImage, [VanImage.name]: VanImage,
}) })
export default class ForgetPassView extends Vue { export default class ForgetPassView extends Vue {
password = "password";
passwordType="password"
getCmstotal = "获取短信验证码"; getCmstotal = "获取短信验证码";
tatleName = "密码重置" tatleName = "密码重置";
phone: string = "" //电话 phone: string = ""; //电话
newpassword: string = ""//密码 newpassword: string = ""; //密码
restpassword:string = ""//密码 restpassword: string = ""; //密码
imageSrc: string = ""//图形 imageSrc: string = ""; //图形
sms: string = ""//短信 sms: string = ""; //短信
timer: any = "";//定时器 timer: any = ""; //定时器
time: number = 60;//计数 time: number = 60; //计数
radio: string = "0" radio: string = "0";
//获取图形验证码 //获取图形验证码
_updatePicCode() { _updatePicCode() {
//请求图形验证码 //请求图形验证码
this.imageSrc = 'http://localhost:8080/users/sendPicCode?=' + Math.random(); this.imageSrc = "http://localhost:8080/users/sendPicCode?=" + Math.random();
//this.imageSrc = 'D:\GitClone\H5\mcep-h5\src\assets\images\ZYXTimg.png' + Math.random() //this.imageSrc = 'D:\GitClone\H5\mcep-h5\src\assets\images\ZYXTimg.png' + Math.random()
} }
//方法
switchPasswordType() {
this.passwordType = this.passwordType === 'password' ? 'text' : 'password'
}
//计时器 //计时器
changeCmstotal() { changeCmstotal() {
this.getCmstotal = this.time + "s重发验证码"; this.getCmstotal = this.time + "s重发验证码";
...@@ -95,31 +153,31 @@ export default class ForgetPassView extends Vue { ...@@ -95,31 +153,31 @@ export default class ForgetPassView extends Vue {
this.time--; this.time--;
this.getCmstotal = this.time + "s重发验证码"; this.getCmstotal = this.time + "s重发验证码";
if (this.time < 0) { if (this.time < 0) {
clearInterval(this.time) clearInterval(this.time);
this.getCmstotal = "获取短信验证码"; this.getCmstotal = "获取短信验证码";
} }
}, 1000) }, 1000);
}
getPhonePost(){
let param={
phoneCode:this.phone
} }
apiService.general(commonApi.getPicCode,param,undefined,undefined).then((response: RestfulResponse) => { getPhonePost() {
let param = {
phoneCode: this.phone,
};
apiService
.general(commonApi.getPicCode, param, undefined, undefined)
.then((response: RestfulResponse) => {
if (response.code == Code.SUCCESS.code) { if (response.code == Code.SUCCESS.code) {
Toast('短信发送成功,5分钟有效'); Toast("短信发送成功,5分钟有效");
this.changeCmstotal() this.changeCmstotal();
}else{ } else {
Toast('短信发送失败,请重试'); Toast("短信发送失败,请重试");
}
});
} }
})
}
onSubmit(values: any) { onSubmit(values: any) {
console.log('submit', values); console.log("submit", values);
} }
created() { created() {
this.$nextTick(() => this._updatePicCode()) this.$nextTick(() => this._updatePicCode());
} }
} }
</script> </script>
...@@ -147,8 +205,6 @@ getPhonePost(){ ...@@ -147,8 +205,6 @@ getPhonePost(){
font-kerning: normal; font-kerning: normal;
} }
.van-col--15 { .van-col--15 {
margin-top: 2%; margin-top: 2%;
} }
...@@ -157,10 +213,10 @@ getPhonePost(){ ...@@ -157,10 +213,10 @@ getPhonePost(){
margin-left: 6%; margin-left: 6%;
} }
.forget {} .forget {
}
.sopan { .sopan {
margin-top: 5px; margin-top: 5px;
margin-left: 6%; margin-left: 6%;
} }
......
...@@ -24,37 +24,46 @@ ...@@ -24,37 +24,46 @@
<div class="logindiv"> <div class="logindiv">
<span class="sopan">手机号码</span> <span class="sopan">手机号码</span>
<van-field v-model="phone" label="+86 |" :border="true" placeholder="请输入手机号" /> <van-field v-model="phone" label="+86 |" :border="true" placeholder="请输入手机号" />
<van-divider /> <van-divider :style="{margin :0 }"></van-divider>
</div>
<div class="logindiv">
<span class="sopan">身份证号</span> <span class="sopan">身份证号</span>
<van-field v-model="idCard" :border="true" placeholder="请输入身份证号" /> <van-field v-model="idCard" :border="true" placeholder="请输入身份证号" />
<van-divider /> <!-- <van-divider /> -->
<van-divider :style="{margin :0 }"></van-divider>
</div> </div>
<span class="sopan">短信验证码</span>
<div>
<div class="logindiv"><span class="sopan">短信验证码</span>
<van-row > <van-row >
<van-col span="16"> <van-col span="16">
<van-field v-model="sms" center clearable placeholder="请输入短信验证码"> <van-field v-model="sms" center clearable placeholder="请输入短信验证码">
<!-- <van-divider /> --> <!-- <van-divider /> -->
</van-field> </van-field>
</van-col> </van-col>
<van-col span="8"><a @click="getPhonePost()">{{getCmstotal}}</a></van-col> <van-col span="8"><span style="color:blue" @click="getPhonePost()">{{getCmstotal}}</span></van-col>
</van-row> </van-row>
<van-divider :style="{margin :0 }"></van-divider>
</div>
<div class="logindiv"> <div class="logindiv">
<span class="sopan">设置密码</span> <span class="sopan">设置密码</span>
<van-field v-model="password" type="password" center clearable placeholder="请填写新密码" /> <van-field v-model="password" type="password" center clearable placeholder="请填写新密码" />
<!-- <van-divider /> --> <!-- <van-divider /> -->
<van-divider :style="{margin :0 }"></van-divider>
</div> </div>
<div class="logindiv"> <div class="logindiv">
<span class="sopan">确认密码</span> <span class="sopan">确认密码</span>
<van-field v-model="restpassword" type="password" center clearable placeholder="请确认新密码" /> <van-field v-model="restpassword" type="password" center clearable placeholder="请确认新密码" />
<!-- <van-divider /> --> <!-- <van-divider /> -->
<van-divider :style="{margin :0 }"></van-divider>
</div> </div>
</div>
<div style="margin: 16px;"> <div style="margin: 16px;">
<van-button square block type="info" native-type="submit" @click="registSystem()">注册</van-button> <van-button square block type="info" native-type="submit" @click="registSystem()">注册</van-button>
</div> </div>
...@@ -168,6 +177,7 @@ getPhonePost(){ ...@@ -168,6 +177,7 @@ getPhonePost(){
.logindiv { .logindiv {
line-height: 20px; line-height: 20px;
margin-bottom: 10px;
} }
.van-button { .van-button {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册