|
|
@@ -70,6 +70,8 @@ Page({
|
|
|
|
|
|
statusList: [] as AnyArray,
|
|
|
|
|
|
+ switchType: "",
|
|
|
+
|
|
|
carouselLoading: {} as Record<string | number, boolean>, // 用于跟踪每个轮播图的加载状态
|
|
|
|
|
|
// 轮播媒体列表
|
|
|
@@ -190,19 +192,29 @@ Page({
|
|
|
const query = useRouteQuery(options.scene!);
|
|
|
if (query.ys) wx.setStorageSync("doctorId", query.ys);
|
|
|
this.initFabAnimated();
|
|
|
+ if (options.switchType) {
|
|
|
+ this.setData({
|
|
|
+ switchType: options.switchType,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async onShow() {
|
|
|
+ wx.showShareMenu({ withShareTicket: true, menus }).then();
|
|
|
+ await this.load();
|
|
|
+ console.log(
|
|
|
+ this.data.switchType,
|
|
|
+ "home.ts中的switchType",
|
|
|
+ this.data.patient
|
|
|
+ );
|
|
|
// 如果是从一体机扫码进来的 有switchType值就直接跳转到注册页面
|
|
|
if (
|
|
|
- options.switchType &&
|
|
|
+ this.data.switchType &&
|
|
|
((this.data.patient as any)?.isPerfectInfo ?? true)
|
|
|
) {
|
|
|
wx.navigateTo({
|
|
|
url: "/module/user/pages/user-certification/user-certification?type=home",
|
|
|
});
|
|
|
}
|
|
|
- },
|
|
|
- async onShow() {
|
|
|
- wx.showShareMenu({ withShareTicket: true, menus }).then();
|
|
|
- await this.load();
|
|
|
// 如果用户没有手机号每次进入页面都提示 点击跳到注册页补充
|
|
|
// todo 要先判断用户有没有手机号 isPerfectInfo是true 就出来弹窗提示用户
|
|
|
// if ((this.data.patient as any)?.isPerfectInfo ?? true) {
|