时间:2023-05-19 23:54:02 | 来源:网站运营
时间:2023-05-19 23:54:02 来源:网站运营
1000个微信小程序源码模板:微信小程序<view class="wrapper"> <view class="header"> <text class="header-title"> 大转盘抽奖 </text> <text class="header-subtitle"> 感恩节活动大抽奖,反馈广大客户 </text> </view> <view class="main"> <view class="canvas-container"> <view animation="{{animationData}}" class="canvas-content" > <canvas style="width: 300px; height: 300px;" class="canvas-element" canvas-id="lotteryCanvas"></canvas> <view class="canvas-line"> <view class="canvas-litem" wx:for="{{awardsList}}" wx:key="unique" style="-webkit-transform: rotate({{item.lineTurn}});transform: rotate({{item.lineTurn}})"></view> </view> <view class="canvas-list"> <view class="canvas-item" wx:for="{{awardsList}}" wx:key="unique"> <view class="canvas-item-text" style="-webkit-transform: rotate({{item.turn}});transform: rotate({{item.turn}})">{{item.award}}</view> </view> </view> </view> <view bindtap="getLottery" class="canvas-btn {{btnDisabled}}">抽奖</view> </view> <view class="main-container"> <view class="main-container-btn"> <button bindtap="gotoList" type="primary">查看中奖</button> </view> <view class="main-container-rule"> <text class="main-rule-title">活动规则:</text> <text class="main-rule-item">1. xxxxxxxxxxx</text> <text class="main-rule-item">2. xxxxxxxxxxx</text> <text class="main-rule-item">3. xxxxxxxxxxx</text> <text class="main-rule-item">4. xxxxxxxxxxx</text> <text class="main-rule-item">5. xxxxxxxxxxx</text> </view> </view> </view> </view>
下面这个是一个类似于外卖购物平台的首页代码<!--pages/index/index.wxml--><view class="container"> <!-- 首页导航 --> <view class="myswiper"> <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"> <block wx:for="{{imgUrls}}" wx:key="index"> <swiper-item> <image src="{{item}}" class="slide-image" /> </swiper-item> </block> </swiper> </view> <!-- 分类导航信息 --> <view class="components"> <block wx:for="{{components}}" wx:key="index"> <view class="functions" bindtap="changeTo" data-where="{{item.where}}"> <view class="functionImage"> <image src="{{item.image}}" /> </view> <text>{{item.function}}</text> </view> </block> </view> <!-- scroll-view嵌套swiper实现上下栏轮播 --> <scroll-view scroll-y-="true" > <view class="headlines"> <image src="{{headlinesImg}}" class="headlines-img" /> <view class="headlines-text"> <swiper autoplay="{{autoplay}}" interval="{{interval1}}" duration="{{duration}}" vertical="true"> <block wx:for="{{headLines}}" wx:key="index"> <swiper-item class="headLines-items"> <view class="headlines-text-items"> <view class="headlines-text-hd"> <text>{{item.head}}</text> </view> <view class="headlines-text-bd"> <text class="">{{item.body}}</text> </view> <image class="headlines-text-ft" src="{{item.img}}"></image> </view> </swiper-item> </block> </swiper> </view> </view> </scroll-view> <view class="todayTrump"> <image src="../../assets/icons/wangpai.png"/> <text>今日王牌大赏</text> <navigator class="todayTrump-right" url= "../class/myFruits/myFruits"> <text>更多</text> <image src="../../assets/icons/right.png"/> </navigator> </view> <!-- // <view class="content"> --> <!-- 王牌产品列表 --> <view class="myTrump"> <scroll-view scroll-x-="true" class="content"> <block wx:for="{{classifyList}}" wx:key="index"> <view class="someTrumps"> <view class="trumps"> <image src="{{item.url}}" /> <view class="mes"> <text class="foodName">{{item.name}}</text> <text class="foodIntroduce">{{item.introduce}}</text> <view class="special">特价</view> <p>¥{{item.price}}</p> <view class="btn" bindtap="ordinInCart" data-id="{{item.id}}" data-stock="{{item.stock}}"> <icon type="{{item.selected ? 'success' : 'circle'}}" color="#23a3ff" size="30"></icon> </view> </view> </view> </view> </block> </scroll-view> </view> <!-- </view> --> <view class="GoodsLabel"> 新品上架 </view> <!-- 新产品列表 --> <view class="newGoods"> <block wx:for="{{newGoods}}" wx:key="index"> <navigator class="goods" url= "../class/myFruits/myFruits"> <view class="goodsImage"> <image src="{{item.image}}" /> </view> <text class="goods-price">¥{{item.price}}</text> <text class="goods-introduce">{{item.introduce}}</text> </navigator> </block> </view> <view class="GoodsLabel"> 经典系列 </view> <!-- 经典产品列表 --> <view class="newGoods"> <block wx:for="{{classicGoods}}" wx:key="index"> <navigator class="goods" url= "../class/myMeat/myMeat"> <view class="goodsImage"> <image src="{{item.image}}" /> </view> <text class="goods-price">¥{{item.price}}</text> <text class="goods-introduce">{{item.introduce}}</text> </navigator> </block> </view></view>
关键词:模板,程序