- 电子药箱: 药品库存管理 + 手动录入 + 今日用药打卡 - 药品百科: 搜索 + 分类筛选 + 20种药品静态数据 - 惠教中心: 4条药品使用指南课程 - 我的: 家庭成员信息管理 - 自定义TabBar + navigation-bar组件 - SVG药品分类插图
27 lines
645 B
TypeScript
27 lines
645 B
TypeScript
// pages/live/wxroom/index.ts
|
|
Page({
|
|
onLoad(options: Record<string, string | undefined>) {
|
|
const query = Object.entries(options || {})
|
|
.filter(([, value]) => value !== undefined && value !== "")
|
|
.map(
|
|
([key, value]) =>
|
|
`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`,
|
|
)
|
|
.join("&");
|
|
|
|
const target = query
|
|
? `/package-live/wxroom/index?${query}`
|
|
: "/package-live/wxroom/index";
|
|
|
|
wx.redirectTo({
|
|
url: target,
|
|
fail: () => {
|
|
wx.showToast({
|
|
title: "进入直播间失败",
|
|
icon: "none",
|
|
});
|
|
},
|
|
});
|
|
},
|
|
});
|