feat: 电子药箱小程序 - 4Tab药品管理
- 电子药箱: 药品库存管理 + 手动录入 + 今日用药打卡 - 药品百科: 搜索 + 分类筛选 + 20种药品静态数据 - 惠教中心: 4条药品使用指南课程 - 我的: 家庭成员信息管理 - 自定义TabBar + navigation-bar组件 - SVG药品分类插图
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"backgroundTextStyle": "light",
|
||||
"backgroundColor": "#ffffff",
|
||||
"navigationBarShareAppMessage": false,
|
||||
"navigationBarShareTimeline": false,
|
||||
"usingComponents": {
|
||||
"liveroom": "/components/liveroom/liveroom"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/* pages/live/room/room.wxss */
|
||||
@import "../../../variables";
|
||||
page {
|
||||
background: #f9f9f9;
|
||||
height: 100%;
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
// pages/live/room/room.ts
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
joinedGroupId: "", // 已加入的消息组id
|
||||
windowHeight: "100%",
|
||||
windowWidth: "100%",
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
async onLoad(options) {
|
||||
const app = getApp<IAppOption>();
|
||||
wx.setStorageSync("joinedGroupId", options.groupId);
|
||||
|
||||
|
||||
const bool = await app.login("room");
|
||||
if (!bool) return;
|
||||
this.setData({
|
||||
joinedGroupId: options.groupId,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
const groupId = this.data.joinedGroupId || wx.getStorageSync("joinedGroupId");
|
||||
const path = groupId
|
||||
? `/pages/live/room/room?groupId=${groupId}`
|
||||
: "/pages/live/room/room";
|
||||
|
||||
return {
|
||||
/*
|
||||
title: "邀请你进入直播间",
|
||||
*/
|
||||
title: "邀请你进入直播间",
|
||||
path,
|
||||
imageUrl: "/assets/img/600.jpg",
|
||||
};
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
<!--pages/live/room/room.wxml-->
|
||||
<view style="width: {{windowWidth}}; height: {{windowHeight}};">
|
||||
<liveroom joined-group-id="{{joinedGroupId}}" />
|
||||
</view>
|
||||
Reference in New Issue
Block a user