优化代码
This commit is contained in:
1
unpackage/dist/dev/mp-weixin/app.js
vendored
1
unpackage/dist/dev/mp-weixin/app.js
vendored
@@ -6,6 +6,7 @@ if (!Math) {
|
||||
"./pages/Mine/Mine.js";
|
||||
"./pages/Mine/minecomponents/pkRecord.js";
|
||||
"./pages/Mine/minecomponents/contact.js";
|
||||
"./pages/loginWithEmailOrAccount/loginWithEmailOrAccount.js";
|
||||
"./pages/Mine/minecomponents/points.js";
|
||||
"./pages/Mine/minecomponents/anchorLibrary.js";
|
||||
"./pages/Mine/minecomponents/pkInformation.js";
|
||||
|
||||
1
unpackage/dist/dev/mp-weixin/app.json
vendored
1
unpackage/dist/dev/mp-weixin/app.json
vendored
@@ -4,6 +4,7 @@
|
||||
"pages/Mine/Mine",
|
||||
"pages/Mine/minecomponents/pkRecord",
|
||||
"pages/Mine/minecomponents/contact",
|
||||
"pages/loginWithEmailOrAccount/loginWithEmailOrAccount",
|
||||
"pages/Mine/minecomponents/points",
|
||||
"pages/Mine/minecomponents/anchorLibrary",
|
||||
"pages/Mine/minecomponents/pkInformation",
|
||||
|
||||
14
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
14
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
@@ -6467,9 +6467,9 @@ function populateParameters(fromRes, toRes) {
|
||||
appVersion: "1.0.0",
|
||||
appVersionCode: "100",
|
||||
appLanguage: getAppLanguage(hostLanguage),
|
||||
uniCompileVersion: "4.75",
|
||||
uniCompilerVersion: "4.75",
|
||||
uniRuntimeVersion: "4.75",
|
||||
uniCompileVersion: "4.76",
|
||||
uniCompilerVersion: "4.76",
|
||||
uniRuntimeVersion: "4.76",
|
||||
uniPlatform: "mp-weixin",
|
||||
deviceBrand,
|
||||
deviceModel: model,
|
||||
@@ -6618,9 +6618,9 @@ const getAppBaseInfo = {
|
||||
appLanguage: getAppLanguage(hostLanguage),
|
||||
isUniAppX: false,
|
||||
uniPlatform: "mp-weixin",
|
||||
uniCompileVersion: "4.75",
|
||||
uniCompilerVersion: "4.75",
|
||||
uniRuntimeVersion: "4.75"
|
||||
uniCompileVersion: "4.76",
|
||||
uniCompilerVersion: "4.76",
|
||||
uniRuntimeVersion: "4.76"
|
||||
};
|
||||
extend(toRes, parameters);
|
||||
}
|
||||
@@ -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_oaDwei";
|
||||
const id = "mp-weixin_hMa31s";
|
||||
const lazy = typeof swan !== "undefined";
|
||||
let restoreError = lazy ? () => {
|
||||
} : initOnError();
|
||||
|
||||
@@ -25,6 +25,9 @@ function request(urldata) {
|
||||
},
|
||||
success: function(res3) {
|
||||
common_vendor.index.__f__("log", "at components/request.js:28", "请求成功", res3);
|
||||
if (res3.data.code === 40400) {
|
||||
common_vendor.index.navigateTo({ url: "/pages/login/login" });
|
||||
}
|
||||
resolve(components_addPrefixToHeaderIcon.addPrefixToHeaderIcon(res3.data));
|
||||
},
|
||||
fail: function(res3) {
|
||||
@@ -56,7 +59,7 @@ function request(urldata) {
|
||||
common_vendor.index.getStorage({
|
||||
key: "token",
|
||||
success: (res) => {
|
||||
common_vendor.index.__f__("log", "at components/request.js:59", "token", res.data);
|
||||
common_vendor.index.__f__("log", "at components/request.js:62", "token", res.data);
|
||||
common_vendor.index.request({
|
||||
url: baseUrl,
|
||||
data,
|
||||
@@ -66,7 +69,7 @@ function request(urldata) {
|
||||
...header
|
||||
},
|
||||
success: function(res2) {
|
||||
common_vendor.index.__f__("log", "at components/request.js:69", "请求成功", res2);
|
||||
common_vendor.index.__f__("log", "at components/request.js:72", "请求成功", res2);
|
||||
resolve(components_addPrefixToHeaderIcon.addPrefixToHeaderIcon(res2.data));
|
||||
},
|
||||
fail: function(res2) {
|
||||
@@ -83,7 +86,10 @@ function request(urldata) {
|
||||
...header
|
||||
},
|
||||
success: function(res2) {
|
||||
common_vendor.index.__f__("log", "at components/request.js:86", "请求成功", res2);
|
||||
common_vendor.index.__f__("log", "at components/request.js:89", "请求成功", res2);
|
||||
if (res2.data.code === 40400) {
|
||||
common_vendor.index.navigateTo({ url: "/pages/login/login" });
|
||||
}
|
||||
resolve(components_addPrefixToHeaderIcon.addPrefixToHeaderIcon(res2.data));
|
||||
},
|
||||
fail: function(res2) {
|
||||
|
||||
13
unpackage/dist/dev/mp-weixin/pages/Home/Home.js
vendored
13
unpackage/dist/dev/mp-weixin/pages/Home/Home.js
vendored
@@ -94,8 +94,17 @@ const _sfc_main = {
|
||||
const now = Date.now();
|
||||
if (now - lastCleanTime < 7 * 24 * 3600 * 1e3)
|
||||
return;
|
||||
common_vendor.index.clearStorage();
|
||||
common_vendor.index.setStorageSync("last_clean_time", now);
|
||||
components_request.request({
|
||||
url: "user/logout",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.info.id
|
||||
},
|
||||
userInfo: false
|
||||
}).then((res) => {
|
||||
common_vendor.index.clearStorage();
|
||||
common_vendor.index.setStorageSync("last_clean_time", now);
|
||||
});
|
||||
},
|
||||
//关闭弹窗(取消)
|
||||
closePopup() {
|
||||
|
||||
@@ -76,7 +76,7 @@ const _sfc_main = {
|
||||
if (res.code == 200) {
|
||||
this.AnchorList = res.data;
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/anchorLibrary.vue:172", res.msg);
|
||||
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/anchorLibrary.vue:180", res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
color: transparent;
|
||||
display: none;
|
||||
}
|
||||
.empty.data-v-daea6b33{
|
||||
.empty.data-v-daea6b33 {
|
||||
position: absolute;
|
||||
top: 200rpx;
|
||||
left: 0;
|
||||
|
||||
@@ -51,7 +51,7 @@ const _sfc_main = {
|
||||
});
|
||||
}, 300);
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/Setting/Setting.vue:142", res.msg);
|
||||
common_vendor.index.__f__("log", "at pages/Setting/Setting.vue:144", res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -84,21 +84,36 @@ const _sfc_main = {
|
||||
method: "POST",
|
||||
data: {
|
||||
uuid: data.uuid,
|
||||
userId: this.id
|
||||
id: this.id
|
||||
},
|
||||
userInfo: true
|
||||
}).then((res2) => {
|
||||
if (res2.code === 200) {
|
||||
components_request.request({
|
||||
url: "user/confirm",
|
||||
method: "POST",
|
||||
data: {
|
||||
uuid: data.uuid,
|
||||
id: this.id
|
||||
},
|
||||
userInfo: true
|
||||
}).then((res3) => {
|
||||
if (res3.code === 200) {
|
||||
common_vendor.index.showToast({
|
||||
title: "登录成功",
|
||||
icon: "success"
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
title: res3,
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}).catch((err) => {
|
||||
common_vendor.index.showToast({
|
||||
title: "登录成功",
|
||||
icon: "success"
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
title: res2,
|
||||
title: "登录失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
}).catch((err) => {
|
||||
common_vendor.index.showToast({
|
||||
title: "登录失败",
|
||||
@@ -141,7 +156,7 @@ const _sfc_main = {
|
||||
},
|
||||
userInfo: true
|
||||
}).then((ress) => {
|
||||
common_vendor.index.__f__("log", "at pages/Setting/Setting.vue:243", "修改调用返回", ress);
|
||||
common_vendor.index.__f__("log", "at pages/Setting/Setting.vue:262", "修改调用返回", ress);
|
||||
if (ress.code === 200) {
|
||||
common_vendor.index.showToast({
|
||||
title: "修改成功",
|
||||
|
||||
@@ -16,8 +16,14 @@ const _sfc_main = {
|
||||
//邮箱错误
|
||||
VerificationcodeSent: false,
|
||||
//验证码是否已发送
|
||||
turnsoutemail: ""
|
||||
turnsoutemail: "",
|
||||
//修改前的邮箱
|
||||
countdown: 0,
|
||||
//验证码倒计时
|
||||
isCounting: false,
|
||||
//是否正在倒计时
|
||||
timer: null
|
||||
//倒计时定时器
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -25,6 +31,17 @@ const _sfc_main = {
|
||||
this.id = options.id;
|
||||
},
|
||||
methods: {
|
||||
// 倒计时
|
||||
startCountdown() {
|
||||
this.countdown = 60;
|
||||
this.isCounting = true;
|
||||
this.timer = setInterval(() => {
|
||||
this.countdown--;
|
||||
if (this.countdown <= 0) {
|
||||
this.isCounting = false;
|
||||
}
|
||||
}, 1e3);
|
||||
},
|
||||
//提交验证
|
||||
onSubmit() {
|
||||
if (this.turnsoutemail == "") {
|
||||
@@ -52,7 +69,7 @@ const _sfc_main = {
|
||||
},
|
||||
userInfo: true
|
||||
}).then((ress) => {
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changeEmail.vue:98", "修改调用返回", ress);
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changeEmail.vue:120", "修改调用返回", ress);
|
||||
if (ress.code === 200) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
@@ -73,7 +90,7 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
}).catch((err) => {
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changeEmail.vue:122", "修改调用失败", err);
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changeEmail.vue:144", "修改调用失败", err);
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: "修改失败",
|
||||
@@ -83,6 +100,9 @@ const _sfc_main = {
|
||||
},
|
||||
//发送验证码
|
||||
sendVerificationCode() {
|
||||
if (this.isCounting) {
|
||||
return;
|
||||
}
|
||||
components_request.request({
|
||||
url: "user/sendUpdateMailConfirmMail",
|
||||
method: "POST",
|
||||
@@ -92,6 +112,7 @@ const _sfc_main = {
|
||||
userInfo: true
|
||||
}).then((ress) => {
|
||||
this.VerificationcodeSent = true;
|
||||
this.startCountdown();
|
||||
});
|
||||
},
|
||||
//第一次提交
|
||||
@@ -114,7 +135,7 @@ const _sfc_main = {
|
||||
},
|
||||
userInfo: true
|
||||
}).then((ress) => {
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changeEmail.vue:164", "修改调用返回", ress);
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changeEmail.vue:190", "修改调用返回", ress);
|
||||
if (ress.code === 200) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
@@ -142,7 +163,7 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
}).catch((err) => {
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changeEmail.vue:195", "修改调用失败", err);
|
||||
common_vendor.index.__f__("log", "at pages/Setting/settingmod/changeEmail.vue:221", "修改调用失败", err);
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: "修改失败",
|
||||
@@ -182,14 +203,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
}, $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))
|
||||
i: common_vendor.t($data.isCounting ? `${$data.countdown}秒后重发` : "获取验证码"),
|
||||
j: common_vendor.o((...args) => $options.sendVerificationCode && $options.sendVerificationCode(...args)),
|
||||
k: common_vendor.s($data.isCounting ? "background-image: linear-gradient(0deg, #cccccc, #dddddd); cursor: not-allowed;" : "")
|
||||
} : {}, {
|
||||
j: $data.VerificationcodeSent && $data.turnsoutemail != ""
|
||||
l: $data.VerificationcodeSent && $data.turnsoutemail != ""
|
||||
}, $data.VerificationcodeSent && $data.turnsoutemail != "" ? {
|
||||
k: common_vendor.t($data.turnsoutemail)
|
||||
m: 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))
|
||||
n: common_vendor.o((...args) => $options.onSubmit && $options.onSubmit(...args)),
|
||||
o: 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"]]);
|
||||
|
||||
@@ -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"><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>
|
||||
<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="{{j}}" style="{{k}}">{{i}}</view></view><text wx:if="{{l}}" class="VerificationcodeSent data-v-87d0cc44">验证码已发送至{{m}}邮箱,请注意查收</text><view class="btn data-v-87d0cc44" bindtap="{{n}}">确认</view><text class="forget data-v-87d0cc44" bindtap="{{o}}">忘记邮箱?请联系客服</text></view></view></view>
|
||||
@@ -73,7 +73,7 @@
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
.VerificationcodeSent.data-v-87d0cc44{
|
||||
.VerificationcodeSent.data-v-87d0cc44 {
|
||||
color: #00afb2;
|
||||
font-size: 24rpx;
|
||||
margin-top: 40rpx;
|
||||
@@ -95,7 +95,7 @@
|
||||
color: red;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
.forget.data-v-87d0cc44{
|
||||
.forget.data-v-87d0cc44 {
|
||||
font-size: 24rpx;
|
||||
color: #00afb2;
|
||||
margin-top: 50rpx;
|
||||
|
||||
@@ -193,6 +193,7 @@ const _sfc_main = {
|
||||
im.on(common_vendor.jo.IM_EVENT.PRIVATE_MESSAGE_RECEIVED, this.onPrivateMessageReceived);
|
||||
im.on(common_vendor.jo.IM_EVENT.MESSAGE_READ, this.onMessageRead);
|
||||
this.getscrollviewheight();
|
||||
this.checkRecordPermission();
|
||||
},
|
||||
methods: {
|
||||
//暂停所有播放
|
||||
@@ -211,7 +212,7 @@ const _sfc_main = {
|
||||
data: { avatar: this.avatar, nickname: this.nickname }
|
||||
},
|
||||
onProgress: function(event) {
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:494", "file uploading:", event);
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:496", "file uploading:", event);
|
||||
}
|
||||
//获取上传进度
|
||||
});
|
||||
@@ -224,7 +225,7 @@ const _sfc_main = {
|
||||
},
|
||||
//长按语音
|
||||
voiceTouchstart() {
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:506", "长按语音");
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:508", "长按语音");
|
||||
this.voicepopUpstart = true;
|
||||
this.recorderManager.start();
|
||||
this.notplayVoice(false);
|
||||
@@ -234,7 +235,7 @@ const _sfc_main = {
|
||||
setTimeout(() => {
|
||||
this.recorderManager.stop();
|
||||
}, 100);
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:516", "松开语音");
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:518", "松开语音");
|
||||
this.voicepopUpstart = false;
|
||||
},
|
||||
//移动语音
|
||||
@@ -251,13 +252,12 @@ const _sfc_main = {
|
||||
},
|
||||
//中断语音
|
||||
voiceTouchcancel() {
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:532", "中断语音");
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:534", "中断语音");
|
||||
this.voicepopUpstart = false;
|
||||
this.voiceCancelOrSend = false;
|
||||
},
|
||||
//语音切换
|
||||
onVoice(status) {
|
||||
this.checkRecordPermission();
|
||||
if (status) {
|
||||
this.inputfocus = false;
|
||||
this.MoreStatus = false;
|
||||
@@ -410,14 +410,14 @@ const _sfc_main = {
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.chatList = [...this.MoreMessageList, ...this.chatList];
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:698", "获取更多聊天记录", this.chatList);
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:699", "获取更多聊天记录", this.chatList);
|
||||
this.LastTime = this.chatList[0].timestamp;
|
||||
this.ElementPositioning = this.Record;
|
||||
}, 300);
|
||||
},
|
||||
//监听已读消息
|
||||
onMessageRead(message) {
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:705", "1已读消息", message);
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:706", "1已读消息", message);
|
||||
},
|
||||
//监听接受消息
|
||||
onPrivateMessageReceived(message) {
|
||||
@@ -432,7 +432,7 @@ const _sfc_main = {
|
||||
this.chatList.push(message);
|
||||
if (this.onPage) {
|
||||
components_goEasyTool_tool.messageRead(this.$goeasy, this.userId).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:720", "已读对方的消息");
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:721", "已读对方的消息");
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -446,7 +446,7 @@ const _sfc_main = {
|
||||
this.avatar,
|
||||
this.nickname
|
||||
).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:734", "发送成功", res);
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:735", "发送成功", res);
|
||||
this.ElementPositioning = res.id = components_ChatId.generateId();
|
||||
res.timestampStatus = this.checkInterval(res.timestamp);
|
||||
this.chatList.push(res);
|
||||
@@ -469,8 +469,8 @@ const _sfc_main = {
|
||||
getIOSDeviceType() {
|
||||
const systemInfo = common_vendor.index.getSystemInfoSync();
|
||||
const model = systemInfo.model;
|
||||
if (/iPhone X|iPhone11|iPhone12|iPhone13|iPhone14/i.test(model)) {
|
||||
if (/iPhone X|iPhone XS|iPhone 11 Pro/i.test(model)) {
|
||||
if (/iPhone X|iPhone11|iPhone12|iPhone13|iPhone14|iPhone15|iPhone16|iPhone15 Pro|iPhone15 Pro Max|iPhone14 Pro|iPhone14 Pro Max|iPhone13 Pro|iPhone13 Pro Max|iPhone12 Pro|iPhone12 Pro Max|iPhone11 Pro|iPhone11 Pro Max|iPhone13 mini|iPhone12 mini|iPhoneXS|iPhoneXS Max/i.test(model)) {
|
||||
if (/iPhone X|iPhone XS|iPhone 11 Pro|iPhone 11 Pro Max|iPhone 12 Pro|iPhone 12 Pro Max|iPhone 13 Pro|iPhone 13 Pro Max|iPhone 14 Pro|iPhone 14 Pro Max|iPhone 15 Pro|iPhone 15 Pro Max|iPhone 16/i.test(model)) {
|
||||
this.ioshide = 88;
|
||||
} else if (/iPhone 12|iPhone 13|iPhone 14/i.test(model)) {
|
||||
this.ioshide = 94;
|
||||
@@ -524,7 +524,7 @@ const _sfc_main = {
|
||||
data: { avatar: this.avatar, nickname: this.nickname }
|
||||
},
|
||||
onProgress: function(event) {
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:814", "file uploading:", event);
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:815", "file uploading:", event);
|
||||
}
|
||||
//获取上传进度
|
||||
});
|
||||
@@ -558,7 +558,7 @@ const _sfc_main = {
|
||||
data: { avatar: this.avatar, nickname: this.nickname }
|
||||
},
|
||||
onProgress: function(event) {
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:844", "上传进度", event);
|
||||
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:845", "上传进度", event);
|
||||
}
|
||||
//获取上传进度
|
||||
});
|
||||
|
||||
@@ -33,6 +33,12 @@ const _sfc_main = {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 邮箱或者账号登录
|
||||
loginWithEmailOrAccount() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/loginWithEmailOrAccount/loginWithEmailOrAccount"
|
||||
});
|
||||
},
|
||||
// 返回首页
|
||||
Return() {
|
||||
common_vendor.index.reLaunch({
|
||||
@@ -108,7 +114,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
a: common_vendor.o((...args) => $options.Return && $options.Return(...args)),
|
||||
b: $data.userInfo.avatarUrl,
|
||||
c: common_vendor.t($data.userInfo.nickName),
|
||||
d: common_vendor.o((...args) => $options.getPhoneNumber && $options.getPhoneNumber(...args))
|
||||
d: common_vendor.o((...args) => $options.getPhoneNumber && $options.getPhoneNumber(...args)),
|
||||
e: common_vendor.o((...args) => $options.loginWithEmailOrAccount && $options.loginWithEmailOrAccount(...args))
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="return" bindtap="{{a}}"><image style="width:40rpx;height:40rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill"/></view><view class="container"><image class="logo" src="{{b}}"></image><view class="nickname">{{c}}</view><button class="login-btn" open-type="getPhoneNumber" bindgetphonenumber="{{d}}"> 使用手机号快捷登录 </button></view>
|
||||
<view class="return" bindtap="{{a}}"><image style="width:40rpx;height:40rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill"/></view><view class="container"><image class="logo" src="{{b}}"></image><view class="nickname">{{c}}</view><button class="login-btn" open-type="getPhoneNumber" bindgetphonenumber="{{d}}"> 使用手机号快捷登录 </button><button class="login-btns" bindtap="{{e}}"> 使用邮箱或者账号登录 </button></view>
|
||||
@@ -28,6 +28,12 @@
|
||||
border: 1px solid #00ff0000;
|
||||
color: #ffffff;
|
||||
}
|
||||
.login-btns{
|
||||
margin-top: 20rpx;
|
||||
background-color: hsla(0, 0%, 100%, 0);
|
||||
border: 1px solid #00ff0000;
|
||||
color: #ffffff;
|
||||
}
|
||||
.tips {
|
||||
color: #666;
|
||||
font-size: 24rpx;
|
||||
|
||||
93
unpackage/dist/dev/mp-weixin/pages/loginWithEmailOrAccount/loginWithEmailOrAccount.js
vendored
Normal file
93
unpackage/dist/dev/mp-weixin/pages/loginWithEmailOrAccount/loginWithEmailOrAccount.js
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
"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 stores_counter = require("../../stores/counter.js");
|
||||
const counter = stores_counter.useCounterStore();
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
title: "Hello",
|
||||
EmailOrAccount: "",
|
||||
Password: ""
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
methods: {
|
||||
// 登录
|
||||
onLogin() {
|
||||
const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,16}$/;
|
||||
if (!passwordRegex.test(this.Password)) {
|
||||
common_vendor.index.showToast({
|
||||
title: "密码必须包含大小写字母和数字,长度6-16位",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
common_vendor.index.showLoading({
|
||||
title: "登录中...",
|
||||
mask: true
|
||||
});
|
||||
components_request.request({
|
||||
url: "user/loginWithMail",
|
||||
method: "POST",
|
||||
data: {
|
||||
userNameOrEmail: this.EmailOrAccount,
|
||||
password: this.Password
|
||||
},
|
||||
userInfo: false
|
||||
}).then((res) => {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("log", "at pages/loginWithEmailOrAccount/loginWithEmailOrAccount.vue:74", res);
|
||||
this.info = res;
|
||||
const now = Date.now();
|
||||
common_vendor.index.setStorageSync("last_clean_time", now);
|
||||
counter.$patch({ myitem: this.info.data });
|
||||
if (res.code === 200) {
|
||||
common_vendor.index.setStorageSync("userinfo", this.info.data);
|
||||
common_vendor.index.setStorageSync("token", this.info.data.token);
|
||||
components_goEasyTool_tool.goEasylogin(
|
||||
this.$goeasy,
|
||||
String(this.info.data.id),
|
||||
this.info.data.headerIcon,
|
||||
this.info.data.nickName
|
||||
);
|
||||
common_vendor.index.reLaunch({
|
||||
url: this.lastPage || "/pages/Home/Home"
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
title: res.msg,
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}).catch((err) => {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: err.msg,
|
||||
icon: "none"
|
||||
});
|
||||
});
|
||||
},
|
||||
// 返回上一页
|
||||
onBack() {
|
||||
common_vendor.index.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.o((...args) => $options.onBack && $options.onBack(...args)),
|
||||
b: $data.EmailOrAccount,
|
||||
c: common_vendor.o(($event) => $data.EmailOrAccount = $event.detail.value),
|
||||
d: $data.Password,
|
||||
e: common_vendor.o(($event) => $data.Password = $event.detail.value),
|
||||
f: common_vendor.o((...args) => $options.onLogin && $options.onLogin(...args))
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-4471409d"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/loginWithEmailOrAccount/loginWithEmailOrAccount.js.map
|
||||
4
unpackage/dist/dev/mp-weixin/pages/loginWithEmailOrAccount/loginWithEmailOrAccount.json
vendored
Normal file
4
unpackage/dist/dev/mp-weixin/pages/loginWithEmailOrAccount/loginWithEmailOrAccount.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "邮箱或账号登录",
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/loginWithEmailOrAccount/loginWithEmailOrAccount.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/loginWithEmailOrAccount/loginWithEmailOrAccount.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="container data-v-4471409d"><view class="bg data-v-4471409d"></view><view class="Return data-v-4471409d" bindtap="{{a}}"><image class="ReturnImg data-v-4471409d" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill"/></view><view class="title data-v-4471409d">邮箱或账号登录</view><view class="form data-v-4471409d"><view class="form-content data-v-4471409d"><input type="text" class="input data-v-4471409d" placeholder="请输入邮箱或账号" value="{{b}}" bindinput="{{c}}"/><input type="password" class="input data-v-4471409d" placeholder="请输入密码" autocomplete="off" value="{{d}}" bindinput="{{e}}"/><view class="btn data-v-4471409d" bindtap="{{f}}">登录</view></view></view></view>
|
||||
74
unpackage/dist/dev/mp-weixin/pages/loginWithEmailOrAccount/loginWithEmailOrAccount.wxss
vendored
Normal file
74
unpackage/dist/dev/mp-weixin/pages/loginWithEmailOrAccount/loginWithEmailOrAccount.wxss
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
|
||||
.bg.data-v-4471409d {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: -1;
|
||||
background: linear-gradient(to bottom, #11cb2a6e, #2574fc6d);
|
||||
}
|
||||
.bgImg.data-v-4471409d {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.Return.data-v-4471409d {
|
||||
position: absolute;
|
||||
top: 110rpx;
|
||||
left: 35rpx;
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
z-index: 1;
|
||||
}
|
||||
.title.data-v-4471409d {
|
||||
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-4471409d {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.form.data-v-4471409d {
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
left: 0rpx;
|
||||
right: 0rpx;
|
||||
bottom: 0rpx;
|
||||
}
|
||||
.form-content.data-v-4471409d {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.input.data-v-4471409d {
|
||||
width: 80%;
|
||||
height: 80rpx;
|
||||
border: none;
|
||||
border-bottom: #4fcacd solid 1px;
|
||||
margin-bottom: 150rpx;
|
||||
padding-left: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #000000;
|
||||
}
|
||||
.btn.data-v-4471409d {
|
||||
width: 80%;
|
||||
height: 80rpx;
|
||||
background-color: #4fcacd;
|
||||
border-radius: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
margin-top: 100rpx;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"libVersion": "2.25.4",
|
||||
"setting": {
|
||||
"urlCheck": false,
|
||||
"urlCheck": true,
|
||||
"compileHotReLoad": true
|
||||
},
|
||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
|
||||
Reference in New Issue
Block a user