1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

通过微信开发者工具 商城模板 创建新小程序

This commit is contained in:
2023-03-06 23:52:24 +08:00
parent ada464a8cc
commit c21ff901d5
393 changed files with 52952 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
Component({
data: { icon: 'cart' },
properties: {
count: {
type: Number,
},
},
methods: {
goToCart() {
wx.switchTab({
url: '/pages/cart/index',
});
},
},
});

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"t-icon": "tdesign-miniprogram/icon/icon"
}
}

View File

@@ -0,0 +1,14 @@
<view class="floating-button" bind:tap="goToCart">
<view class="floating-inner-container">
<t-icon
prefix="wr"
name="{{icon}}"
size="42rpx"
color="#FFFFFF"
/>
</view>
<view class="floating-right-top">
{{count}}
</view>
</view>

View File

@@ -0,0 +1,30 @@
.floating-button {
position: fixed;
right: 20rpx;
bottom: 108rpx;
}
.floating-button .floating-inner-container {
display: flex;
align-items: center;
justify-content: center;
height: 96rpx;
width: 96rpx;
background-color: rgba(0, 0, 0, 0.8);
opacity: 0.7;
border-radius: 48rpx;
}
.floating-button .floating-right-top {
position: absolute;
right: 0rpx;
top: 0rpx;
height: 28rpx;
background: #fa4126;
border-radius: 64rpx;
font-weight: bold;
font-size: 22rpx;
line-height: 28rpx;
color: #fff;
padding: 0 8rpx;
}