微信小程序源码,微信小程序学习用demo:一元夺宝:仅有主页设计

微信小程序学习用demo:一元夺宝:仅有主页设计 点评:只设计了主页,但是设计方面还是值得学习的; 微信小程序学习用demo:一元夺宝:仅有主页设计  实例代码:

[HTML] 纯文本查看 复制代码
?
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!–index.wxml–>
<view class="container">
  <scroll-view class="scroll-container" upper-threshold="{{sortPanelDist}}" bindscroll="onToTop" scroll-y="true" style="height:calc(100% – 1px)">
    <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
        <block wx:for="{{imgUrls}}">
            <swiper-item>
                <image src="{{item}}" class="slide-image" style="height:{{windowWidth * 0.375}}px !important"/>
            </swiper-item>
        </block>
    </swiper>
    <view class="category-panel">
        <view class="category-item">
            <image class="category-item-image" src="../../resources/images/ic_index_tab_kind.png" />
            <text class="category-item-text">分类</text>
        </view>
        <view class="category-item">
            <image class="category-item-image" src="../../resources/images/ic_index_tab_ten.png" />
            <text class="category-item-text">优选</text>
        </view>
        <view class="category-item">
            <image class="category-item-image" src="../../resources/images/ic_index_tab_share.png" />
            <text class="category-item-text">晒单</text>
        </view>
        <view class="category-item">
            <image class="category-item-image" src="../../resources/images/ic_index_tab_qa.png" />
            <text class="category-item-text">常见问题</text>
        </view>
    </view>
    <block wx:if="{{notices.length>0}}">
        <view class="notice-panel">
            <image class="notice-image" src="../../resources/images/ic_notice.png" />
            <view class="notice-message" animation="{{animationNotice}}" style="opacity:{{noticeIdx>=0}};">
                <span style="color:#999999">恭喜</span><span style="color:#3273c3">{{notices[noticeIdx].name}}</span><span style="color:#999999">{{notices[noticeIdx].time}}</span>{{notices[noticeIdx].goods}}
            </view>
        </view>
    </block>
    <view class="sort-panel" style="position:{{sortPanelPos}};top:{{sortPanelTop}}px">
        <view class="sort-item">人气</view>
        <view class="sort-item">最新</view>
        <view class="sort-item">进度</view>
        <view class="sort-item comb on">
            <view class="comb-text">总需人次</view>
            <view class="comb-arrs down">
                <image class="comb-arr-up" src=""></image>
                <image class="comb-arr-down" src=""></image>
            </view>
        </view>
    </view>
    <view class="goods-panel">
        <import src="tpl/goodsList.wxml"/>
        <template is="goodsList" data="{{goodsList:goodsList}}"/>
    </view>
  </scroll-view>
  <view class="tabbar-border"></view>
</view>

[CSS] 纯文本查看 复制代码
?
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
.container {
    width: 100%;
    padding:0;
    margin: 0;
    background-color: #fff;
}
.scroll-container{
    width:100%;
}
.tabbar-border{
    width:100%;
    height:1px;
    position: fixed;
    bottom: 0;
    background-color: #ccc;
}
.slide-image{
    width:100%;
}
.category-panel{
    height:90px;
    width:100%;
    display:flex;
    color:#666666;
    flex-direction:row;
    font-size:11px;
    justify-content: space-around;
    border-bottom: 1px solid #f1eeec;
}
.category-item{
    display:flex;
    width:60px;
    text-align: center;
    flex-direction:column;
}
.category-item-image{
    width:36px;
    height:36px;
    overflow:unset;
    padding:15px 12px 0 12px
}
.category-item-text{
    padding:10px 0;
}
.notice-panel{
    width:100%;
    height:50px;
    display:flex;
    flex:none;
    flex-direction:row;
    border-bottom: 10px solid #e8e8e8;
}
.notice-image{
    height: 20px;
    min-width:20px;
    max-width:20px;
    padding: 10px 10px 10px 20px;
}
.notice-message{
    font-size: 12px;
    color: #666666;
    word-break:normal;
    overflow : hidden;
    word-wrap: normal;
    line-height: 40px;
    padding-right:20px;
}
.sort-panel{
    width:100%;
    height: 45px;
    display:flex;
    z-index: 1000;
    flex-direction: row;
    justify-content: space-around;
    border-bottom: 1px solid #e8e8e8;
    background-color: rgba(255, 255, 255, 0.96);
}
.sort-item{
    width:68px;
    height: 45px;
    color: #545454;
    font-size:13px;
    text-align: center;
    padding-top:13px;
}
.sort-item.on{
    color: #db3652;
    border-bottom: 2px solid #db3652;
}
 
.sort-item.comb{
    display:flex;
    flex-direction: row;
}
 
.comb-arrs {
    display:flex;
    padding: 3px 0 0 3px;
    flex-direction: column;
}
.comb-arr-up, .comb-arr-down{
    width: 11px;
    height: 6px;
    background-size:cover;
}
 
.comb-arr-up{
    background-image:url(../../resources/images/ic_arr_up.png);
}
 
.comb-arr-down{
    margin-top:1px;
    background-image:url(../../resources/images/ic_arr_down.png);
}
 
.comb-arrs.up .comb-arr-up{
    background-image:url(../../resources/images/ic_arr_up_selected.png);
}
 
.comb-arrs.up .comb-arr-down{
    background-image:url(../../resources/images/ic_arr_down.png);
}
 
.comb-arrs.down .comb-arr-up{
    background-image:url(../../resources/images/ic_arr_up.png);
}
 
.comb-arrs.down .comb-arr-down{
    background-image:url(../../resources/images/ic_arr_down_selected.png);
}
.goods-panel{
    display: flex;
    flex-wrap:wrap;
}
.goods-panel .goods-item{
    width: 50%;
    height: 220px;
    border-bottom:1px solid #e8e8e8;
}
 
.goods-item.odd{
    border-right:1px solid #e8e8e8;
}
.goods-item .goods{
    position: relative;
}
.goods {
    font-size: 14px;
    color: #262626;
    height: 180px;
    text-align: center;
}
.goods .goods-tag{
    position: absolute;
}
.goods .goods-image{
    width:140px;
    height: 140px;
}
.goods .desc-wrapper{
    height: 2.5em;
    display: table;
}
.desc-wrapper .goods-desc{
    height: 2.5em;
    overflow: hidden;
    text-align: left;
    display: inline-block;
    vertical-align: middle;
    line-height: 1.25em;
    padding: 0 5px 0 10px;
}
.goods-item .operating{
    position: relative;
    display: flex;
    flex-direction: row;
    font-size: 11px;
    color: #e6324a;
    height: 40px;
    padding: 10px 10px 4px;
}
.operating .btn {
    width: 56px;
    height: 26px;
    right: 5px;
    border-radius: 4px;
    position: absolute;
    line-height: 26px;
    text-align: center;
    border:1px solid #e6324a;
}
.operating .progress{
    height: 5px;
    margin-top:20px;
    margin-right:5px;
    border-radius: 5px;
    position: absolute;
    background-color: #e8e8e8;
}
.operating .progress-take{
    height: 5px;
    margin-top:20px;
    margin-right:5px;
    border-radius: 5px;
    position: absolute;
    background-color: #ffc63c;
}
.operating .tips{
    height:12px;
    color: #686868;
    font-size: 11px;
    line-height: 12px;
    position: absolute;
}
.tips span{
    color: #007aff;
    padding-left: 2px;
}

【小程序源码网资源版权风险说明】:
本站为避免不必要的纷争,分享的所有资源中一切可能有版权风险的资源将全部转载自第三方网站或平台,站长只为大家提供相关资源的介绍和跳转引导。 因可能有疏忽大意,所以如有遗漏资源侵犯了您的合法权利,请联系站长删除。
【小程序源码网资源下载使用说明】:
本站所分享的一切QQ小程序源码,thinkphp整站源码,微信小程序源码,图文教程等资源仅供用户学习参考使用,任何人不得作其他用途,违者自行承担所有责任。
【小程序源码网毫无人看的介绍】:
本站又称Z站,原名贼娘网,开站于2018年,换过三任站长,目前站长是第四任站长,本站是一个主要分享免费开源小程序源码/网站源码/免费素材/教程资源的网站,主要小程序资源有用于学习的小程序源码,也有正版原创可商用的小程序源码,是一个公益博客型网站。
【小程序源码网原创源码版权申明】:
未经小程序源码网许可,任何人不得擅自使用本站原创首发源码进行商业行为(除本站VIP用户在期限内,版权无使用限制),否则将依法承担相应赔偿责任。
【小程序源码网转载文章版权申明】:
本站所转载的QQ小程序或微信小程序源码与其他资源仅供学习,任何人不得作其他用途,违者自行承担所有责任。
【小程序源码网站长最后的屁话】:
如有您认为本站有任何侵犯您合法权益的文章,或者您有什么疑问需求,欢迎联系站长QQ,站长24小时在线,备注公司名称和源码版权问题或者需要小程序定制开发等站长业务类型可急速处理,如果您只是交流小程序的一些开发问题或源码问题可以加入QQ群讨论,就不用加站长啦,对于白嫖党,QQ群才是处理问题的天堂,当然站长也欢迎大家骚扰~
小程序源码网 » 微信小程序源码,微信小程序学习用demo:一元夺宝:仅有主页设计

发表评论

嘿,投喂下嘛!