提交 8c6f14d8 authored 作者: zs's avatar zs

edit

上级 875f181b
......@@ -27,7 +27,7 @@ export default {
account,
pwd
} = data
const sql = `select * from ${table.userName} where user = '${account}'`
const sql = `select * from ${table.userName} where user = '${account}' AND passWord ='${pwd}'`
let res = await sqllitedb.selectSQL(sql);
const user = res[0]
......@@ -77,7 +77,8 @@ export default {
const current = await sqllitedb.selectSQL(
`select * from ${table.userName} where userId = '${userId}' and user = '${userName}'`
);
if (current.passWord !== oldPwd) {
console.log(current,`select * from ${table.userName} where userId = '${userId}' and user = '${userName}'`,'=-===========>')
if (current[0].passWord !== oldPwd) {
return {
data: false,
msg: '原密码错误'
......
......@@ -124,14 +124,13 @@
// 输入密码与该账号密码一致
userApi.changePwd({
userId: this.user.userId,
userName: this.user.userName,
userName: this.user.user,
oldPwd: this.formData.oldPd,
newPwd: this.formData.newPd
}).then((res) => {
if(res.data){
uni.showToast({
title: "恭喜您,密码更新成功!",
icon: "success",
duration: 3000,
});
this.logOut();
......
......@@ -245,13 +245,18 @@ export default {
border: 0;
}
.fixed-words {
.fixed-words {
display: flex;
flex-wrap: wrap;
.word {
font-size: 11.2px;
margin-right: 4px;
margin: 0 4px 4px 0;
padding: 4px 6px;
border: 1px solid #c7c7c7;
border-radius: 4px;
line-height: 1.5;
box-sizing: border-box; /* 避免 padding 和 border 撑开元素 */
white-space: nowrap; /* 可选:禁止换行 */
}
}
.form-label {
......
......@@ -22,9 +22,9 @@ import { Base64 } from "js-base64";
//日志类型
export const LOG_TYPE_ENUM = {
login: "登录",
add: "新增成功",
add: "新增",
photo: "拍照",
edit: "编辑成功",
edit: "编辑",
sign: "签字",
darf: "草稿",
delete: "删除",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论