开通云函数,变更appId

This commit is contained in:
砂糖
2025-07-10 15:49:39 +08:00
parent 967b2d9a0b
commit 5f861c58ee
14 changed files with 427 additions and 9 deletions

View File

@@ -190,7 +190,6 @@ export default {
this.loading = true;
this.saveLoginInfo();
let data = {};
data = await businessLogin({
phoneNumber: this.loginInfo.phoneNumber,
email: this.loginInfo.email,
@@ -221,7 +220,38 @@ export default {
url: "/pages/conversation/conversationList/index",
});
await getSMSCodeFromOa(this.loginInfo.phoneNumber);
await loginOaByPhone(this.loginInfo.phoneNumber)
const info = await loginOaByPhone(this.loginInfo.phoneNumber)
console.log('用户信息', info)
const oaUserId = info.userInfo.userId;
// 获取设备cid调用云函数
const cid = uni.getStorageSync('cid');
uniCloud.callFunction({
name: 'binding',
data: {
oaId: oaUserId,
deviceId: cid
},
success: (res) => {
if (res.result.code === 200) {
uni.showToast({
title: res.result.msg,
icon: 'success'
});
} else {
uni.showToast({
title: res.result.msg,
icon: 'none'
});
}
},
fail: (err) => {
uni.showToast({
title: '云函数调用失败',
icon: 'none'
});
console.error(err);
}
});
this.loginInfo.password = "";
this.loading = false;

View File

@@ -67,6 +67,11 @@ export default {
title: "关于我们",
icon: require("static/images/profile_menu_about.png"),
},
{
idx: 5,
title: '测试推送',
icon: require("static/images/profile_menu_about.png")
},
{
idx: 4,
title: "退出登录",
@@ -130,6 +135,18 @@ export default {
url: "/pages/profile/about/index",
});
break;
case 5:
uni.createPushMessage({
content: '今天还没有报工哦',
title: "报工提醒",
success() {
console.log('推送成功')
},
fail() {
console.log("推送失败")
}
});
break;
case 4:
uni.showModal({
title: "提示",