提交
This commit is contained in:
parent
9cdee03753
commit
cc9b56c5b4
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,13 @@
|
|||||||
<view class="mt-12 text-base text-dark">生命全周期健康管理伙伴</view>
|
<view class="mt-12 text-base text-dark">生命全周期健康管理伙伴</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="login-btn-wrap">
|
<view class="login-btn-wrap">
|
||||||
<button v-if="checked" class="login-btn" type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
|
<button
|
||||||
|
v-if="checked"
|
||||||
|
class="login-btn"
|
||||||
|
type="primary"
|
||||||
|
open-type="getPhoneNumber"
|
||||||
|
@getphonenumber="getPhoneNumber"
|
||||||
|
>
|
||||||
手机号快捷登录
|
手机号快捷登录
|
||||||
</button>
|
</button>
|
||||||
<!-- <button v-if="checked" class="login-btn" type="primary" @click="getPhoneNumber()">
|
<!-- <button v-if="checked" class="login-btn" type="primary" @click="getPhoneNumber()">
|
||||||
@ -15,7 +21,10 @@
|
|||||||
手机号快捷登录
|
手机号快捷登录
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex items-center justify-center mt-12 px-15" @click="checked = !checked">
|
<view
|
||||||
|
class="flex items-center justify-center mt-12 px-15"
|
||||||
|
@click="checked = !checked"
|
||||||
|
>
|
||||||
<checkbox :checked="checked" style="transform: scale(0.7)" />
|
<checkbox :checked="checked" style="transform: scale(0.7)" />
|
||||||
<view class="text-sm text-gray">我已阅读并同意</view>
|
<view class="text-sm text-gray">我已阅读并同意</view>
|
||||||
<view class="text-sm text-primary">《用户协议》、</view>
|
<view class="text-sm text-primary">《用户协议》、</view>
|
||||||
@ -76,8 +85,8 @@ async function getPhoneNumber(e) {
|
|||||||
await attempToPage(redirectUrl.value);
|
await attempToPage(redirectUrl.value);
|
||||||
} else if (res && !(doctorInfo.value && doctorInfo.value.anotherName)) {
|
} else if (res && !(doctorInfo.value && doctorInfo.value.anotherName)) {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/work/profile'
|
url: "/pages/work/profile",
|
||||||
})
|
});
|
||||||
} else if (res) {
|
} else if (res) {
|
||||||
toHome();
|
toHome();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// SCSS 变量定义
|
// SCSS 变量定义
|
||||||
$font-size-text: 28rpx;
|
$font-size-text: 30rpx;
|
||||||
$font-size-tip: 24rpx;
|
$font-size-tip: 28rpx;
|
||||||
$font-size-title: 32rpx;
|
$font-size-title: 32rpx;
|
||||||
$text-color-sub: #999;
|
$text-color-sub: #999;
|
||||||
$primary-color: #0877F1;
|
$primary-color: #0877F1;
|
||||||
@ -331,7 +331,7 @@ $primary-color: #0877F1;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.message-text {
|
.message-text {
|
||||||
font-size: $font-size-text;
|
font-size: 30rpx;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
|
|||||||
@ -393,13 +393,13 @@ const checkLoginAndInitTIM = async () => {
|
|||||||
});
|
});
|
||||||
const success = await initIMAfterLogin();
|
const success = await initIMAfterLogin();
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
if (!success) {
|
// if (!success) {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: "IM连接失败,请重试",
|
// title: "IM连接失败,请重试",
|
||||||
icon: "none",
|
// icon: "none",
|
||||||
});
|
// });
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
} else if (!timChatManager.isLoggedIn) {
|
} else if (!timChatManager.isLoggedIn) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: "重连中...",
|
title: "重连中...",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -41,6 +41,7 @@ export default defineStore("accountStore", () => {
|
|||||||
|
|
||||||
async function loginByCode(phoneCode = '') {
|
async function loginByCode(phoneCode = '') {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
const { code } = await uni.login({
|
const { code } = await uni.login({
|
||||||
appid,
|
appid,
|
||||||
provider: "weixin",
|
provider: "weixin",
|
||||||
@ -61,13 +62,12 @@ export default defineStore("accountStore", () => {
|
|||||||
}
|
}
|
||||||
account.value = res.data;
|
account.value = res.data;
|
||||||
openid.value = res.data.openid;
|
openid.value = res.data.openid;
|
||||||
|
|
||||||
// 持久化账户信息
|
// 持久化账户信息
|
||||||
cache.set(CACHE_KEYS.ACCOUNT, res.data);
|
cache.set(CACHE_KEYS.ACCOUNT, res.data);
|
||||||
cache.set(CACHE_KEYS.OPENID, res.data.openid);
|
cache.set(CACHE_KEYS.OPENID, res.data.openid);
|
||||||
|
|
||||||
// 登录成功后初始化腾讯IM
|
// 登录成功后初始化腾讯IM
|
||||||
await getDoctorInfo(openid.value);
|
await getDoctorInfo({ openid: openid.value });
|
||||||
await initIMAfterLogin();
|
await initIMAfterLogin();
|
||||||
return res.data
|
return res.data
|
||||||
}
|
}
|
||||||
@ -120,13 +120,13 @@ export default defineStore("accountStore", () => {
|
|||||||
throw new Error('无法获取用户ID');
|
throw new Error('无法获取用户ID');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const success = await initGlobalTIM(userID);
|
const success = await initGlobalTIM(userID);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
console.error('initGlobalTIM 返回失败');
|
console.error('initGlobalTIM 返回失败');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
isIMInitialized.value = true;
|
isIMInitialized.value = true;
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@ -283,7 +283,6 @@ function generateSendLink(survey, answerId, customerId, customerName, sendSurvey
|
|||||||
const { corpId, userId } = context;
|
const { corpId, userId } = context;
|
||||||
const isSystem = survey.createBy === 'system';
|
const isSystem = survey.createBy === 'system';
|
||||||
let url = '';
|
let url = '';
|
||||||
debugger
|
|
||||||
if (isSystem) {
|
if (isSystem) {
|
||||||
// 系统问卷:使用 VITE_SURVEY_URL
|
// 系统问卷:使用 VITE_SURVEY_URL
|
||||||
url = `${env?.MP_SURVEY_URL}?corpId=${corpId}&surveryId=${survey.surveryId}&memberId=${customerId}&sendSurveyId=${sendSurveyId}&userId=${userId}`;
|
url = `${env?.MP_SURVEY_URL}?corpId=${corpId}&surveryId=${survey.surveryId}&memberId=${customerId}&sendSurveyId=${sendSurveyId}&userId=${userId}`;
|
||||||
|
|||||||
@ -1030,6 +1030,11 @@ class TimChatManager {
|
|||||||
// 获取群聊列表
|
// 获取群聊列表
|
||||||
getGroupList() {
|
getGroupList() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
// 检查userId是否存在,不存在则不需要初始化
|
||||||
|
if (!this.currentUserID) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// 如果 TIM 实例不存在,等待初始化
|
// 如果 TIM 实例不存在,等待初始化
|
||||||
if (!this.tim) {
|
if (!this.tim) {
|
||||||
console.log('TIM实例不存在,等待初始化...')
|
console.log('TIM实例不存在,等待初始化...')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user