安全设置添加md5加密
This commit is contained in:
parent
f8fbe4fe83
commit
78a51f3b81
|
|
@ -36,6 +36,7 @@
|
|||
"fuse.js": "3.4.4",
|
||||
"js-beautify": "^1.10.2",
|
||||
"js-cookie": "2.2.0",
|
||||
"js-md5": "^0.8.3",
|
||||
"jsencrypt": "^3.0.0-rc.1",
|
||||
"jszip": "^3.7.1",
|
||||
"material-components-vue": "^1.2.0",
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
<div>
|
||||
<el-form ref="form" :model="form" label-width="120px" label-position="left">
|
||||
<el-form-item label="操作密码">
|
||||
<el-input v-model="form.password" :disabled="disabled" placeholder="请输入操作密码"
|
||||
style="width: 200px;"></el-input>
|
||||
<el-input v-model="form.password" type="number" @input="jiantingshuru" :disabled="disabled"
|
||||
:placeholder="disabled ? '******' : '请输入操作密码'" style="width: 200px;"></el-input>
|
||||
<el-button type="primary" @click="resetting">重置</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="安全手机号">
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import md5 from 'js-md5';
|
||||
import { tbShopInfo } from "@/api/user";
|
||||
import { sendMsg, modfiyUserInfo } from "@/api/securitySetting"
|
||||
export default {
|
||||
|
|
@ -33,17 +34,20 @@ export default {
|
|||
this.getinfo()
|
||||
},
|
||||
methods: {
|
||||
jiantingshuru(e) {
|
||||
this.form.password = e.substr(0, 6)
|
||||
},
|
||||
// 获取用户信息
|
||||
async getinfo() {
|
||||
const shopId = localStorage.getItem("shopId");
|
||||
const res = await tbShopInfo(shopId);
|
||||
this.form = res
|
||||
this.form.password = '******'
|
||||
// this.form.password = '******'
|
||||
},
|
||||
async submitHandle() {
|
||||
let data = {
|
||||
code: this.form.prepareAmount,
|
||||
pwd: this.form.password,
|
||||
pwd: md5(this.form.password),
|
||||
}
|
||||
const res = await modfiyUserInfo(data);
|
||||
this.$message({
|
||||
|
|
|
|||
Loading…
Reference in New Issue