feat: 电子药箱小程序 - 4Tab药品管理
- 电子药箱: 药品库存管理 + 手动录入 + 今日用药打卡 - 药品百科: 搜索 + 分类筛选 + 20种药品静态数据 - 惠教中心: 4条药品使用指南课程 - 我的: 家庭成员信息管理 - 自定义TabBar + navigation-bar组件 - SVG药品分类插图
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
@import "variables";
|
||||
|
||||
.good-container {
|
||||
// 宽:(750rpx - 左右边距 24*2rpx - 中间边距 24rpx)/ 2
|
||||
width: 339rpx;
|
||||
//高 为宽的1.5倍 (3比2)
|
||||
height: 509rpx;
|
||||
overflow: hidden;
|
||||
border-radius: $primary-border-radius;
|
||||
background: white;
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
height: 339rpx;
|
||||
border-radius: $primary-border-radius;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0rpx 12rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.title {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
width: 100%;
|
||||
line-height: 55rpx;
|
||||
height: 55rpx;
|
||||
font-size: $large-font-size;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.desc {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
text-overflow: ellipsis;
|
||||
width: 100%;
|
||||
color: $primary-color;
|
||||
line-height: 45rpx;
|
||||
height: 45rpx;
|
||||
}
|
||||
|
||||
.count {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 45rpx;
|
||||
height: 45rpx;
|
||||
color: $primary-color;
|
||||
|
||||
.price {
|
||||
|
||||
.money {
|
||||
font-size: $large-font-size;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.quantity {
|
||||
color: black;
|
||||
margin-right: $primary-gap / 2;
|
||||
// font-size: $small-font-size;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
const app = getApp<IAppOption>()
|
||||
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
item: {
|
||||
type: Object,
|
||||
value: {}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
handleClick(e: any) {
|
||||
wx.navigateTo({
|
||||
url: `/pages/common/good-detail/good-detail?spuId=${e.currentTarget.dataset.id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
lifetimes: {
|
||||
created: () => {
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,12 @@
|
||||
<!--components/good-item/good-item.wxml-->
|
||||
<view class="good-container" bindtap="handleClick" data-id="{{item.spuId}}">
|
||||
<image class="image" src="{{item.picUrl}}" mode="aspectFill"></image>
|
||||
<view class="content">
|
||||
<view class="title">{{item.name}}</view>
|
||||
<view class="desc">{{item.introduction}}</view>
|
||||
<view class="count">
|
||||
<view class="price"><span class="money">{{item.price?'¥'+item.price/100:'暂无报价'}}</span></view>
|
||||
<view class="quantity">已售 {{item.salesCount}} +</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user