优化代码
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -7362,7 +7362,7 @@ function isConsoleWritable() {
|
||||
function initRuntimeSocketService() {
|
||||
const hosts = "192.168.1.112,127.0.0.1";
|
||||
const port = "8090";
|
||||
const id = "mp-weixin_tvkERO";
|
||||
const id = "mp-weixin_oaDwei";
|
||||
const lazy = typeof swan !== "undefined";
|
||||
let restoreError = lazy ? () => {
|
||||
} : initOnError();
|
||||
|
||||
@@ -3,7 +3,7 @@ const common_vendor = require("../common/vendor.js");
|
||||
const components_addPrefixToHeaderIcon = require("./addPrefixToHeaderIcon.js");
|
||||
function request(urldata) {
|
||||
const { url, data, method, header, userInfo } = urldata;
|
||||
const baseUrl = "http://192.168.1.174:8086/" + url;
|
||||
const baseUrl = "https://pk.zhukeping.com/" + url;
|
||||
if (userInfo) {
|
||||
return new Promise((resolve, reject) => {
|
||||
common_vendor.index.getStorage({
|
||||
|
||||
@@ -211,7 +211,7 @@ const _sfc_main = {
|
||||
// 跳转到设置页面
|
||||
goSetting() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/Setting/Setting"
|
||||
url: "/pages/Setting/Setting?id=" + this.userinfo.id
|
||||
});
|
||||
},
|
||||
// 跳转到服务协议页面
|
||||
|
||||
@@ -18,34 +18,47 @@ const _sfc_main = {
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
common_vendor.index.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.id = res.data.id;
|
||||
this.name = res.data.nickName;
|
||||
this.userinfo = this.useravatar = res.data.headerIcon;
|
||||
this.email = res.data.email;
|
||||
this.havaPassword = res.data.havaPassword;
|
||||
}
|
||||
});
|
||||
this.id = option.id;
|
||||
this.getUserInfo();
|
||||
},
|
||||
onShow() {
|
||||
common_vendor.index.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.id = res.data.id;
|
||||
this.name = res.data.nickName;
|
||||
this.userinfo = this.useravatar = res.data.headerIcon;
|
||||
this.email = res.data.email;
|
||||
this.havaPassword = res.data.havaPassword;
|
||||
}
|
||||
});
|
||||
this.getUserInfo();
|
||||
},
|
||||
methods: {
|
||||
//获取个人信息
|
||||
getUserInfo() {
|
||||
components_request.request({
|
||||
url: "user/getUserInfo",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.id
|
||||
},
|
||||
userInfo: true
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.userinfo = res.data;
|
||||
common_vendor.index.setStorageSync("userinfo", res.data);
|
||||
setTimeout(() => {
|
||||
common_vendor.index.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res2) => {
|
||||
this.id = res2.data.id;
|
||||
this.name = res2.data.nickName;
|
||||
this.userinfo = this.useravatar = res2.data.headerIcon;
|
||||
this.email = res2.data.email;
|
||||
this.havaPassword = res2.data.havaPassword;
|
||||
}
|
||||
});
|
||||
}, 300);
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/Setting/Setting.vue:142", res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
//修改密码
|
||||
modifyPassword() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/Setting/settingmod/changePassword?id=" + this.id
|
||||
url: "/pages/Setting/settingmod/changePassword?id=" + this.id + "&havaPassword=" + this.havaPassword
|
||||
});
|
||||
},
|
||||
// 修改邮箱
|
||||
@@ -128,7 +141,7 @@ const _sfc_main = {
|
||||
},
|
||||
userInfo: true
|
||||
}).then((ress) => {
|
||||
common_vendor.index.__f__("log", "at pages/Setting/Setting.vue:226", "修改调用返回", ress);
|
||||
common_vendor.index.__f__("log", "at pages/Setting/Setting.vue:243", "修改调用返回", ress);
|
||||
if (ress.code === 200) {
|
||||
common_vendor.index.showToast({
|
||||
title: "修改成功",
|
||||
@@ -172,7 +185,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
e: common_vendor.o((...args) => $options.inputNickname && $options.inputNickname(...args)),
|
||||
f: common_vendor.t($data.email == "" || $data.email == null ? "未绑定" : $data.email),
|
||||
g: common_vendor.o((...args) => $options.modifyEmailAddress && $options.modifyEmailAddress(...args)),
|
||||
h: common_vendor.t($data.havaPassword ? "" : "未设置"),
|
||||
h: common_vendor.t($data.havaPassword == true ? "" : "未设置"),
|
||||
i: common_vendor.o((...args) => $options.modifyPassword && $options.modifyPassword(...args)),
|
||||
j: common_vendor.o((...args) => $options.scanCode && $options.scanCode(...args))
|
||||
};
|
||||
|
||||
@@ -1,15 +1,167 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const components_request = require("../../../components/request.js");
|
||||
const components_goEasyTool_tool = require("../../../components/goEasyTool/tool.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
title: "Hello"
|
||||
title: "Hello",
|
||||
email: "",
|
||||
//邮箱
|
||||
Verificationcode: "",
|
||||
//验证码
|
||||
id: "",
|
||||
//用户id
|
||||
error: false,
|
||||
//邮箱错误
|
||||
VerificationcodeSent: false,
|
||||
//验证码是否已发送
|
||||
turnsoutemail: ""
|
||||
//修改前的邮箱
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
this.turnsoutemail = this.email = options.email == "null" ? "" : options.email;
|
||||
this.id = options.id;
|
||||
},
|
||||
methods: {
|
||||
// 返回上一页
|
||||
//提交验证
|
||||
onSubmit() {
|
||||
if (this.turnsoutemail == "") {
|
||||
this.setEmail();
|
||||
} else {
|
||||
this.hasEmail();
|
||||
}
|
||||
},
|
||||
//有邮箱修改
|
||||
hasEmail() {
|
||||
if (!this.validateEmail(this.email)) {
|
||||
this.error = true;
|
||||
return;
|
||||
}
|
||||
common_vendor.index.showLoading({
|
||||
title: "修改中...",
|
||||
mask: true
|
||||
});
|
||||
components_request.request({
|
||||
url: "user/updateUserMail",
|
||||
method: "POST",
|
||||
data: {
|
||||
code: this.Verificationcode,
|
||||
mailAddress: this.email
|
||||
},
|
||||
userInfo: true
|
||||
}).then((ress) => {
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changeEmail.vue:98", "修改调用返回", ress);
|
||||
if (ress.code === 200) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: "修改成功,请到您的邮箱进行验证激活",
|
||||
duration: 5e3,
|
||||
icon: "none"
|
||||
});
|
||||
setTimeout(() => {
|
||||
common_vendor.index.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}, 5e3);
|
||||
} else {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: ress.msg,
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}).catch((err) => {
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changeEmail.vue:122", "修改调用失败", err);
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: "修改失败",
|
||||
icon: "none"
|
||||
});
|
||||
});
|
||||
},
|
||||
//发送验证码
|
||||
sendVerificationCode() {
|
||||
components_request.request({
|
||||
url: "user/sendUpdateMailConfirmMail",
|
||||
method: "POST",
|
||||
data: {
|
||||
mailAddress: this.email
|
||||
},
|
||||
userInfo: true
|
||||
}).then((ress) => {
|
||||
this.VerificationcodeSent = true;
|
||||
});
|
||||
},
|
||||
//第一次提交
|
||||
setEmail() {
|
||||
if (!this.validateEmail(this.email)) {
|
||||
this.error = true;
|
||||
return;
|
||||
}
|
||||
common_vendor.index.showLoading({
|
||||
title: "修改中...",
|
||||
mask: true
|
||||
});
|
||||
components_goEasyTool_tool.goEasylogout(this.$goeasy);
|
||||
components_request.request({
|
||||
url: "user/updateUserInfo",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.id,
|
||||
email: this.email
|
||||
},
|
||||
userInfo: true
|
||||
}).then((ress) => {
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changeEmail.vue:164", "修改调用返回", ress);
|
||||
if (ress.code === 200) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: "修改成功,请到您的邮箱进行验证激活",
|
||||
duration: 5e3,
|
||||
icon: "none"
|
||||
});
|
||||
common_vendor.index.setStorageSync("userinfo", ress.data);
|
||||
components_goEasyTool_tool.goEasylogin(
|
||||
this.$goeasy,
|
||||
String(ress.data.id),
|
||||
ress.data.headerIcon,
|
||||
ress.data.nickName
|
||||
);
|
||||
setTimeout(() => {
|
||||
common_vendor.index.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}, 5e3);
|
||||
} else {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: ress.msg,
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}).catch((err) => {
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changeEmail.vue:195", "修改调用失败", err);
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: "修改失败",
|
||||
icon: "none"
|
||||
});
|
||||
});
|
||||
},
|
||||
//邮箱验证
|
||||
validateEmail(email) {
|
||||
const regex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
||||
return regex.test(email);
|
||||
},
|
||||
//联系客服
|
||||
onCustomerService() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/Mine/minecomponents/contact"
|
||||
});
|
||||
},
|
||||
//返回上一页
|
||||
onBack() {
|
||||
common_vendor.wx$1.navigateBack({
|
||||
delta: 1
|
||||
@@ -18,9 +170,27 @@ const _sfc_main = {
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.o((...args) => $options.onBack && $options.onBack(...args))
|
||||
};
|
||||
return common_vendor.e({
|
||||
a: common_vendor.o((...args) => $options.onBack && $options.onBack(...args)),
|
||||
b: $data.email,
|
||||
c: common_vendor.o(($event) => $data.email = $event.detail.value),
|
||||
d: $data.turnsoutemail == ""
|
||||
}, $data.turnsoutemail == "" ? {} : {}, {
|
||||
e: $data.error
|
||||
}, $data.error ? {} : {}, {
|
||||
f: $data.turnsoutemail != ""
|
||||
}, $data.turnsoutemail != "" ? {
|
||||
g: $data.Verificationcode,
|
||||
h: common_vendor.o(($event) => $data.Verificationcode = $event.detail.value),
|
||||
i: common_vendor.o((...args) => $options.sendVerificationCode && $options.sendVerificationCode(...args))
|
||||
} : {}, {
|
||||
j: $data.VerificationcodeSent && $data.turnsoutemail != ""
|
||||
}, $data.VerificationcodeSent && $data.turnsoutemail != "" ? {
|
||||
k: common_vendor.t($data.turnsoutemail)
|
||||
} : {}, {
|
||||
l: common_vendor.o((...args) => $options.onSubmit && $options.onSubmit(...args)),
|
||||
m: common_vendor.o((...args) => $options.onCustomerService && $options.onCustomerService(...args))
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-87d0cc44"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="changeEmail data-v-87d0cc44"><view class="bg data-v-87d0cc44"><image class="bgImg data-v-87d0cc44" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png" mode="scaleToFill"/></view><view class="Return data-v-87d0cc44" bindtap="{{a}}"><image class="ReturnImg data-v-87d0cc44" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill"/></view><view class="title data-v-87d0cc44">邮箱</view><view class="contentbox data-v-87d0cc44"><view class="content data-v-87d0cc44"></view></view></view>
|
||||
<view class="changeEmail data-v-87d0cc44"><view class="bg data-v-87d0cc44"><image class="bgImg data-v-87d0cc44" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png" mode="scaleToFill"/></view><view class="Return data-v-87d0cc44" bindtap="{{a}}"><image class="ReturnImg data-v-87d0cc44" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill"/></view><view class="title data-v-87d0cc44">邮箱</view><view class="contentbox data-v-87d0cc44"><view class="content data-v-87d0cc44"><input type="email" class="weui-input data-v-87d0cc44" placeholder="请输入邮箱号" value="{{b}}" bindinput="{{c}}"/><text wx:if="{{d}}" class="error data-v-87d0cc44">第一次填写邮箱时请确保填写正确的邮箱地址,填写错误请联系客服</text><text wx:if="{{e}}" class="error data-v-87d0cc44">请输入正确的邮箱地址</text><view wx:if="{{f}}" class="Verificationcodebox data-v-87d0cc44"><input type="text" class="weui-input data-v-87d0cc44" placeholder="验证码" value="{{g}}" bindinput="{{h}}"/><view class="Verificationcodebtn data-v-87d0cc44" bindtap="{{i}}">获取验证码</view></view><text wx:if="{{j}}" class="VerificationcodeSent data-v-87d0cc44">验证码已发送至{{k}}邮箱,请注意查收</text><view class="btn data-v-87d0cc44" bindtap="{{l}}">确认</view><text class="forget data-v-87d0cc44" bindtap="{{m}}">忘记邮箱?请联系客服</text></view></view></view>
|
||||
@@ -48,3 +48,55 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.weui-input.data-v-87d0cc44 {
|
||||
width: 90%;
|
||||
height: 80rpx;
|
||||
margin-top: 40rpx;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
.Verificationcodebox.data-v-87d0cc44 {
|
||||
width: 90%;
|
||||
height: 80rpx;
|
||||
margin-top: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.Verificationcodebtn.data-v-87d0cc44 {
|
||||
width: 30%;
|
||||
height: 100%;
|
||||
margin-bottom: -40rpx;
|
||||
background-color: #e6e6e6;
|
||||
color: #ffffff;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
background-color: #00afb2;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
.VerificationcodeSent.data-v-87d0cc44{
|
||||
color: #00afb2;
|
||||
font-size: 24rpx;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.btn.data-v-87d0cc44 {
|
||||
width: 80%;
|
||||
height: 80rpx;
|
||||
margin-top: 150rpx;
|
||||
background: linear-gradient(135deg, #00afb2, #4fcacd);
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
font-size: 30rpx;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.error.data-v-87d0cc44 {
|
||||
color: red;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
.forget.data-v-87d0cc44{
|
||||
font-size: 24rpx;
|
||||
color: #00afb2;
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
width: 80%;
|
||||
height: 80rpx;
|
||||
margin-top: 50rpx;
|
||||
background-color: #00b4ff;
|
||||
background: linear-gradient(135deg, #00afb2, #4fcacd);
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
|
||||
@@ -1,17 +1,235 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const components_goEasyTool_tool = require("../../../components/goEasyTool/tool.js");
|
||||
const components_request = require("../../../components/request.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
title: "Hello"
|
||||
oldPassword: "",
|
||||
//旧密码
|
||||
newPassword: "",
|
||||
//新密码
|
||||
confirmPassword: "",
|
||||
//确认密码
|
||||
showoldPassword: true,
|
||||
//旧密码是否显示
|
||||
shownewPassword: true,
|
||||
//新密码是否显示
|
||||
showconfirmPassword: true,
|
||||
//确认密码是否显示
|
||||
oldPasswordError: false,
|
||||
//旧密码错误
|
||||
newPasswordErrorone: false,
|
||||
//新密码错误
|
||||
newPasswordErrortwo: false,
|
||||
//新密码错误
|
||||
confirmPasswordError: false,
|
||||
//确认密码错误
|
||||
id: "",
|
||||
//用户id
|
||||
havaPassword: null,
|
||||
//是否有密码/false无密码/true有密码
|
||||
email: ""
|
||||
//邮箱
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
common_vendor.index.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.id = res.data.id;
|
||||
this.havaPassword = res.data.havaPassword;
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changePassword.vue:130", this.id, this.havaPassword);
|
||||
this.email = res.data.email;
|
||||
}
|
||||
});
|
||||
},
|
||||
onShow() {
|
||||
common_vendor.index.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.id = res.data.id;
|
||||
this.havaPassword = res.data.havaPassword;
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changePassword.vue:141", this.id, this.havaPassword);
|
||||
this.email = res.data.email;
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 忘记密码
|
||||
onforgetPassword() {
|
||||
if (this.email === "" || this.email === null) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请先绑定邮箱再进行操作",
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
});
|
||||
return;
|
||||
}
|
||||
components_request.request({
|
||||
url: "user/forgetMail",
|
||||
method: "POST",
|
||||
data: {
|
||||
mailAddress: this.email
|
||||
},
|
||||
userInfo: true
|
||||
}).then((ress) => {
|
||||
if (ress.code === 200) {
|
||||
common_vendor.index.showToast({
|
||||
title: "已向您的" + this.email + "邮箱发送密码重置邮件,请在邮箱中进行密码重置",
|
||||
icon: "success",
|
||||
duration: 5e3
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
title: ress.data,
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
});
|
||||
}
|
||||
}).catch(() => {
|
||||
common_vendor.index.showToast({
|
||||
title: "网络错误",
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
});
|
||||
});
|
||||
},
|
||||
// 验证密码合法性
|
||||
validatePassword(password) {
|
||||
const regex = /^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)[A-Za-z\d]{6,16}$/;
|
||||
return regex.test(password);
|
||||
},
|
||||
// 确认修改
|
||||
onConfirm() {
|
||||
this.oldPasswordError = false;
|
||||
this.newPasswordErrorone = false;
|
||||
this.newPasswordErrortwo = false;
|
||||
this.confirmPasswordError = false;
|
||||
if (this.email === "" || this.email === null) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请先绑定邮箱再进行操作",
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.oldPassword === "" && this.havaPassword == true) {
|
||||
this.oldPasswordError = true;
|
||||
return;
|
||||
}
|
||||
if (this.validatePassword(this.oldPassword) === false && this.havaPassword == true) {
|
||||
this.oldPasswordError = true;
|
||||
return;
|
||||
}
|
||||
if (this.validatePassword(this.newPassword) === false) {
|
||||
this.newPasswordErrorone = true;
|
||||
return;
|
||||
}
|
||||
if (this.newPassword === "") {
|
||||
this.newPasswordErrorone = true;
|
||||
return;
|
||||
}
|
||||
if (this.newPassword === this.oldPassword) {
|
||||
this.newPasswordErrortwo = true;
|
||||
return;
|
||||
}
|
||||
if (this.confirmPassword !== this.newPassword) {
|
||||
this.confirmPasswordError = true;
|
||||
return;
|
||||
}
|
||||
if (this.havaPassword) {
|
||||
common_vendor.index.showLoading({
|
||||
title: "修改中...",
|
||||
mask: true
|
||||
});
|
||||
components_goEasyTool_tool.goEasylogout(this.$goeasy);
|
||||
components_request.request({
|
||||
url: "user/updateUserInfo",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.id,
|
||||
newPassword: this.newPassword,
|
||||
confirmPassword: this.confirmPassword,
|
||||
oldPassword: this.oldPassword
|
||||
},
|
||||
userInfo: true
|
||||
}).then((ress) => {
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changePassword.vue:246", "修改调用返回", ress);
|
||||
if (ress.code === 200) {
|
||||
common_vendor.index.showToast({
|
||||
title: "修改成功",
|
||||
icon: "success"
|
||||
});
|
||||
common_vendor.index.setStorageSync("userinfo", ress.data);
|
||||
components_goEasyTool_tool.goEasylogin(
|
||||
this.$goeasy,
|
||||
String(ress.data.id),
|
||||
ress.data.headerIcon,
|
||||
ress.data.nickName
|
||||
);
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: ress.data,
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.showLoading({
|
||||
title: "修改中...",
|
||||
mask: true
|
||||
});
|
||||
components_request.request({
|
||||
url: "user/setPassword",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.id,
|
||||
password: this.newPassword,
|
||||
confirmPassword: this.confirmPassword
|
||||
},
|
||||
userInfo: true
|
||||
}).then((ress) => {
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changePassword.vue:288", "修改调用返回", ress);
|
||||
if (ress.code === 200) {
|
||||
common_vendor.index.showToast({
|
||||
title: "修改成功",
|
||||
icon: "success"
|
||||
});
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: ress.data,
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
//新密码显示/隐藏
|
||||
changenewPassword() {
|
||||
this.shownewPassword = !this.shownewPassword;
|
||||
},
|
||||
// 确认密码显示/隐藏
|
||||
changeconfirmPassword() {
|
||||
this.showconfirmPassword = !this.showconfirmPassword;
|
||||
},
|
||||
// 旧密码显示/隐藏
|
||||
changeoldPassword() {
|
||||
this.showoldPassword = !this.showoldPassword;
|
||||
},
|
||||
// 返回上一页
|
||||
onBack() {
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changePassword.vue:41", 1);
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changePassword.vue:324", 1);
|
||||
common_vendor.wx$1.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
@@ -19,9 +237,39 @@ const _sfc_main = {
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.o((...args) => $options.onBack && $options.onBack(...args))
|
||||
};
|
||||
return common_vendor.e({
|
||||
a: common_vendor.o((...args) => $options.onBack && $options.onBack(...args)),
|
||||
b: $data.havaPassword
|
||||
}, $data.havaPassword ? {
|
||||
c: $data.showoldPassword,
|
||||
d: $data.oldPassword,
|
||||
e: common_vendor.o(($event) => $data.oldPassword = $event.detail.value),
|
||||
f: common_vendor.o((...args) => $options.changeoldPassword && $options.changeoldPassword(...args)),
|
||||
g: $data.showoldPassword ? "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Displaypassword.png" : "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/notdisplaypassword.png"
|
||||
} : {}, {
|
||||
h: $data.havaPassword
|
||||
}, $data.havaPassword ? {} : {}, {
|
||||
i: $data.oldPasswordError == true && $data.havaPassword == true
|
||||
}, $data.oldPasswordError == true && $data.havaPassword == true ? {} : {}, {
|
||||
j: $data.shownewPassword,
|
||||
k: $data.newPassword,
|
||||
l: common_vendor.o(($event) => $data.newPassword = $event.detail.value),
|
||||
m: common_vendor.o((...args) => $options.changenewPassword && $options.changenewPassword(...args)),
|
||||
n: $data.shownewPassword ? "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Displaypassword.png" : "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/notdisplaypassword.png",
|
||||
o: $data.newPasswordErrorone
|
||||
}, $data.newPasswordErrorone ? {} : {}, {
|
||||
p: $data.newPasswordErrortwo
|
||||
}, $data.newPasswordErrortwo ? {} : {}, {
|
||||
q: $data.showconfirmPassword,
|
||||
r: $data.confirmPassword,
|
||||
s: common_vendor.o(($event) => $data.confirmPassword = $event.detail.value),
|
||||
t: common_vendor.o((...args) => $options.changeconfirmPassword && $options.changeconfirmPassword(...args)),
|
||||
v: $data.showconfirmPassword ? "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Displaypassword.png" : "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/notdisplaypassword.png",
|
||||
w: $data.confirmPasswordError
|
||||
}, $data.confirmPasswordError ? {} : {}, {
|
||||
x: common_vendor.o((...args) => $options.onConfirm && $options.onConfirm(...args)),
|
||||
y: common_vendor.o((...args) => $options.onforgetPassword && $options.onforgetPassword(...args))
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-6e931930"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="change-password data-v-6e931930"><view class="bg data-v-6e931930"><image class="bgImg data-v-6e931930" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png" mode="scaleToFill"/></view><view class="Return data-v-6e931930" bindtap="{{a}}"><image class="ReturnImg data-v-6e931930" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill"/></view><view class="title data-v-6e931930">修改密码</view><view class="contentbox data-v-6e931930"><view class="content data-v-6e931930"></view></view></view>
|
||||
<view class="change-password data-v-6e931930"><view class="bg data-v-6e931930"><image class="bgImg data-v-6e931930" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png" mode="scaleToFill"/></view><view class="Return data-v-6e931930" bindtap="{{a}}"><image class="ReturnImg data-v-6e931930" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill"/></view><view class="title data-v-6e931930">修改密码</view><view class="contentbox data-v-6e931930"><view class="content data-v-6e931930"><view wx:if="{{b}}" class="uni-input-wrapper data-v-6e931930"><input class="uni-input data-v-6e931930" placeholder="请输入旧密码" password="{{c}}" value="{{d}}" bindinput="{{e}}"/><view class="data-v-6e931930"><image class="passwordImg data-v-6e931930" bindtap="{{f}}" src="{{g}}" alt=""/></view></view><text wx:if="{{h}}" class="error data-v-6e931930">您的密码必须包含大小字母和数字,长度在6-16位之间</text><text wx:if="{{i}}" class="error-text data-v-6e931930">请输入正确的旧密码</text><view class="uni-input-wrapper data-v-6e931930"><input class="uni-input data-v-6e931930" placeholder="请输入新密码" password="{{j}}" value="{{k}}" bindinput="{{l}}"/><view class="data-v-6e931930"><image class="passwordImg data-v-6e931930" bindtap="{{m}}" src="{{n}}" alt=""/></view></view><text class="error data-v-6e931930">您的密码必须包含大小字母和数字,长度在6-16位之间</text><text wx:if="{{o}}" class="error-text data-v-6e931930">请输入合法的密码</text><text wx:if="{{p}}" class="error-text data-v-6e931930">新密码和旧密码不能相同</text><view class="uni-input-wrapper data-v-6e931930"><input class="uni-input data-v-6e931930" placeholder="请重复输入新密码" password="{{q}}" value="{{r}}" bindinput="{{s}}"/><view class="data-v-6e931930"><image class="passwordImg data-v-6e931930" bindtap="{{t}}" src="{{v}}" alt=""/></view></view><text wx:if="{{w}}" class="error-text data-v-6e931930">请确认两次输入的密码是否一致</text><view class="confirmBtn data-v-6e931930" bindtap="{{x}}"> 确认修改 </view><view class="forgetPassword data-v-6e931930"><text class="forgetPasswordText data-v-6e931930" bindtap="{{y}}">忘记密码?</text></view></view></view></view>
|
||||
@@ -48,3 +48,52 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.uni-input-wrapper.data-v-6e931930 {
|
||||
width: 70%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 8rpx 13rpx;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
.uni-input.data-v-6e931930 {
|
||||
height: 50rpx;
|
||||
padding: 15rpx 25rpx;
|
||||
line-height: 50rpx;
|
||||
font-size: 28rpx;
|
||||
flex: 1;
|
||||
}
|
||||
.passwordImg.data-v-6e931930 {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
.error-text.data-v-6e931930 {
|
||||
color: red;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
.error.data-v-6e931930 {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.confirmBtn.data-v-6e931930 {
|
||||
width: 90%;
|
||||
height: 90rpx;
|
||||
background: linear-gradient(135deg, #00afb2, #4fcacd);
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
font-size: 36rpx;
|
||||
border-radius: 50rpx;
|
||||
margin-top: 70rpx;
|
||||
}
|
||||
.forgetPassword.data-v-6e931930 {
|
||||
width: 90%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.forgetPasswordText.data-v-6e931930 {
|
||||
color: #00afb2;
|
||||
}
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
uuid: "",
|
||||
userId: ""
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.uuid = options.uuid;
|
||||
this.userId = options.userId;
|
||||
},
|
||||
methods: {
|
||||
onBack() {
|
||||
common_vendor.index.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
// request({
|
||||
// url: "user/scan",
|
||||
// method: "POST",
|
||||
// data: {
|
||||
// userId: this.id,
|
||||
// uuid: res.result,
|
||||
// },
|
||||
// userInfo: true,
|
||||
// }).then((ress) => {
|
||||
// });
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.o((...args) => $options.onBack && $options.onBack(...args))
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-d0939827"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/Setting/settingmod/scanCode.js.map
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "扫码验证",
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<view class="scanCode data-v-d0939827"><view class="bg data-v-d0939827"><image class="bgImg data-v-d0939827" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png" mode="scaleToFill"/></view><view class="Return data-v-d0939827" bindtap="{{a}}"><image class="ReturnImg data-v-d0939827" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill"/></view><view class="title data-v-d0939827">扫码登录</view><view class="content data-v-d0939827"><view class="box data-v-d0939827"></view></view></view>
|
||||
@@ -1,50 +0,0 @@
|
||||
|
||||
.bg.data-v-d0939827 {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
.bgImg.data-v-d0939827 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.Return.data-v-d0939827 {
|
||||
position: fixed;
|
||||
left: 35rpx;
|
||||
top: 120rpx;
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
.title.data-v-d0939827 {
|
||||
position: fixed;
|
||||
top: 120rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
font-size: 34rpx;
|
||||
color: #100e0f;
|
||||
font-weight: bold;
|
||||
z-index: 1;
|
||||
}
|
||||
.ReturnImg.data-v-d0939827 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.content.data-v-d0939827 {
|
||||
position: absolute;
|
||||
top: 200rpx;
|
||||
left: 0rpx;
|
||||
right: 0rpx;
|
||||
bottom: 0rpx;
|
||||
}
|
||||
.box.data-v-d0939827{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -87,13 +87,18 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: "登录失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}).catch((err) => {
|
||||
common_vendor.index.__f__("log", "at pages/login/login.vue:116", err);
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: "登录失败",
|
||||
icon: "none"
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user