微信小程序旅游票价日历

该博客介绍了如何利用微信小程序的wxml、wxss和js文件,开发一个展示旅游票价日历的应用。内容涵盖了前端界面布局、样式设计以及交互逻辑的实现。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

wxml

      <view style="position:fixed;bottom:540rpx;background:#F5F5F5;font-size: 30rpx; padding-top: 10rpx;padding-bottom: 10rpx;">
            <view class="layout-flex row" style="background-color: #F5F5F5;">
              <text class="date-week" style="width:{
  {systemInfo.windowWidth/7-15}}px;height:20px" wx:for="{
  {weekStr}}" wx:key="{                       {index}}">
                 <text wx:if="{
  {item !=='日' && item !=='六'}}">{
  {item}}</text>
              <text wx:if="{
  {item ==='日' || item ==='六'}}" class="week">{
  {item}}</text>
              </text>
            </view>
          </view>
          <view style="margin-top:50px"></view>
          <view wx:for="{
  {dateList}}" wx:key="{
  {index}}" wx:for-item="dateItem" style="padding-top:26rpx 0">
            <view class="date-year-month" style="text-align: center;font-size:35rpx;">{
  {dateItem.year}}年{
  {dateItem.month}}月</view>
            <view class="layout-flex row" style="flex-wrap: wrap;margin-top:30rpx;">
              <view class="date-day {
  {item.day<=0?'bgwhite':item.class}}" style="width:{
  {systemInfo.windowWidth/7-8}}px;height:{                      {systemInfo.windowWidth/7}}px;" data-year="{
  {dateItem.year}}" data-month="{
  {dateItem.month}}" data-day="{
  {item.day}}                    "
                bindtap="onPressDate" wx:for="{
  {dateItem.days}}" data-date="{
  {tictor1}}" wx:key="{
  {index}}">
                <view class='item-days'>
                  <text style='font-size:28rpx;'>{
  {item.day>0?(item.daytext?item.daytext:item.day):''}}</text>
                  <text style='font-size:30rpx;' wx:if="{
  {item.inday}}">
       
                   <!-- <text wx:if="{
  {mon==9&&day1==10}}">{
  {etcPrice}}</text> -->
                  <text >¥{
  {tictor1}}</text>
                  </text>

                </view>
              </view>
            </view>

          </view>

wxss

.spaceAroundCenter {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: space-around;
}

.box {
  margin: 30rpx;
}
 
.flex-item {
  /* flex-flow: nowrap;
  flex-grow: 1;
  flex-shrink: 1; */
  width: 14.2%;
}
 
.item-content {
  padding: 25rpx 0;
  text-align: center;
}
.item-content>text{
  display: block;
  font-size: 24rpx;
}
 /* 当前日期 */
.bk-col
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值