Commit 136c6bae197d3ca499b5e7c7d23ca645e1fbe295
1 parent
87ca01df
直播列表分享
Showing
4 changed files
with
606 additions
and
0 deletions
packageA/pages/live_share/live_share.js
0 → 100644
| 1 | +// packageA//pages/goods_share/goods_share.js | |
| 2 | +Page({ | |
| 3 | + | |
| 4 | + /** | |
| 5 | + * 页面的初始数据 | |
| 6 | + */ | |
| 7 | + data: { | |
| 8 | + // tab | |
| 9 | + tab: ['秒杀','拼单','促销','专享礼包'], | |
| 10 | + currentIndex: 0, | |
| 11 | + //促销页tab | |
| 12 | + tab2: ['正在直播','即将开始','精彩回放'], | |
| 13 | + currentIndex2: 0, | |
| 14 | + //秒杀和拼单底部tab | |
| 15 | + currentIndex3: 0, | |
| 16 | + // 控制价格 | |
| 17 | + active1: false, | |
| 18 | + // 控制佣金 | |
| 19 | + active2: false, | |
| 20 | + //popup | |
| 21 | + hiddenPopup: true, | |
| 22 | + }, | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 生命周期函数--监听页面加载 | |
| 26 | + */ | |
| 27 | + onLoad: function (options) { | |
| 28 | + | |
| 29 | + }, | |
| 30 | + | |
| 31 | + /** | |
| 32 | + * 生命周期函数--监听页面初次渲染完成 | |
| 33 | + */ | |
| 34 | + onReady: function () { | |
| 35 | + | |
| 36 | + }, | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * 生命周期函数--监听页面显示 | |
| 40 | + */ | |
| 41 | + onShow: function () { | |
| 42 | + | |
| 43 | + }, | |
| 44 | + | |
| 45 | + /** | |
| 46 | + * 生命周期函数--监听页面隐藏 | |
| 47 | + */ | |
| 48 | + onHide: function () { | |
| 49 | + | |
| 50 | + }, | |
| 51 | + | |
| 52 | + /** | |
| 53 | + * 生命周期函数--监听页面卸载 | |
| 54 | + */ | |
| 55 | + onUnload: function () { | |
| 56 | + | |
| 57 | + }, | |
| 58 | + | |
| 59 | + /** | |
| 60 | + * 页面相关事件处理函数--监听用户下拉动作 | |
| 61 | + */ | |
| 62 | + // onPullDownRefresh: function () { | |
| 63 | + | |
| 64 | + // }, | |
| 65 | + | |
| 66 | + /** | |
| 67 | + * 页面上拉触底事件的处理函数 | |
| 68 | + */ | |
| 69 | + onReachBottom: function () { | |
| 70 | + | |
| 71 | + }, | |
| 72 | + | |
| 73 | + /** | |
| 74 | + * 用户点击右上角分享 | |
| 75 | + */ | |
| 76 | + onShareAppMessage: function () { | |
| 77 | + | |
| 78 | + }, | |
| 79 | + | |
| 80 | + // 点击价格排序 | |
| 81 | + sort1() { | |
| 82 | + if(this.data.active2) { | |
| 83 | + this.setData({ | |
| 84 | + active2: !this.data.active2 | |
| 85 | + }); | |
| 86 | + }; | |
| 87 | + this.setData({ | |
| 88 | + active1: !this.data.active1 | |
| 89 | + }); | |
| 90 | + | |
| 91 | + }, | |
| 92 | + // 点击佣金排序 | |
| 93 | + sort2() { | |
| 94 | + if(this.data.active1) { | |
| 95 | + this.setData({ | |
| 96 | + active1: !this.data.active1 | |
| 97 | + }); | |
| 98 | + }; | |
| 99 | + this.setData({ | |
| 100 | + active2: !this.data.active2 | |
| 101 | + }); | |
| 102 | + }, | |
| 103 | + // 点击tab | |
| 104 | + clickTab(e) { | |
| 105 | + this.setData({ | |
| 106 | + currentIndex: e.target.dataset.index, | |
| 107 | + }); | |
| 108 | + }, | |
| 109 | + // 点击促销页tab | |
| 110 | + clickTab2(e) { | |
| 111 | + this.setData({ | |
| 112 | + currentIndex2: e.target.dataset.index, | |
| 113 | + }); | |
| 114 | + }, | |
| 115 | + // 点击秒杀和拼单底部tab | |
| 116 | + clickTab3(e) { | |
| 117 | + this.setData({ | |
| 118 | + currentIndex3: e.target.dataset.index, | |
| 119 | + }); | |
| 120 | + }, | |
| 121 | + // 关闭弹出层 | |
| 122 | + closePopup() { | |
| 123 | + this.setData({ | |
| 124 | + hiddenPopup: true | |
| 125 | + }); | |
| 126 | + }, | |
| 127 | + // 显示弹出层 | |
| 128 | + showPopup() { | |
| 129 | + this.setData({ | |
| 130 | + hiddenPopup: false | |
| 131 | + }); | |
| 132 | + }, | |
| 133 | +}) | |
| 0 | 134 | \ No newline at end of file | ... | ... |
packageA/pages/live_share/live_share.json
0 → 100644
packageA/pages/live_share/live_share.wxml
0 → 100644
| 1 | +<view class="container"> | |
| 2 | + <!-- 列表 --> | |
| 3 | + <view class="list-container"> | |
| 4 | + <!-- 标题 --> | |
| 5 | + <view class="subTab-title flex"> | |
| 6 | + <block wx:for="{{tab2}}"> | |
| 7 | + <view class="subTab-titleItem {{currentIndex2 == index ? 'active':''}}" data-index="{{index}}" bindtap="clickTab2">{{item}}</view> | |
| 8 | + </block> | |
| 9 | + </view> | |
| 10 | + <!-- 列表项 --> | |
| 11 | + <scroll-view | |
| 12 | + class="list" | |
| 13 | + scroll-y="true" | |
| 14 | + scroll-anchoring | |
| 15 | + refresher-enabled> | |
| 16 | + | |
| 17 | + <!-- 暂无数据 --> | |
| 18 | + <nodata nodataContainer="nodata">暂无数据</nodata> | |
| 19 | + | |
| 20 | + <!-- 专享礼包 --> | |
| 21 | + <block> | |
| 22 | + <view class class="list-item"> | |
| 23 | + <view class="img-container {{currentIndex2 == 0?'live':currentIndex2 == 1?'coming':'playback'}}"></view> | |
| 24 | + <view class="details"> | |
| 25 | + <view class="ellipsis-2 fs28 name">商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称</view> | |
| 26 | + <view class="pdt20 fs26 red">直播时间:2020-12-31 18:00</view> | |
| 27 | + <view class="fs26 red pdv10">主播:何大大</view> | |
| 28 | + <view class="t-r fs28 pdt10"><view class="btn-share">分享</view></view> | |
| 29 | + </view> | |
| 30 | + </view> | |
| 31 | + </block> | |
| 32 | + | |
| 33 | + <view class="no-more t-c">- 已全部加载 -</view> | |
| 34 | + </scroll-view> | |
| 35 | + </view> | |
| 36 | +</view> | |
| 37 | + | ... | ... |
packageA/pages/live_share/live_share.wxss
0 → 100644
| 1 | +/* packageA//pages/goods_share/goods_share.wxss */ | |
| 2 | +.red { | |
| 3 | + color: #FE6867; | |
| 4 | +} | |
| 5 | +.gray { | |
| 6 | + color: #7b7b7b; | |
| 7 | +} | |
| 8 | +.w25 { | |
| 9 | + width: 25%; | |
| 10 | +} | |
| 11 | +.w50 { | |
| 12 | + width: 50%; | |
| 13 | +} | |
| 14 | +.w164 { | |
| 15 | + width: 164rpx; | |
| 16 | +} | |
| 17 | +.bold { | |
| 18 | + font-weight: bold; | |
| 19 | +} | |
| 20 | +page { | |
| 21 | + background-color: #f2f2f2; | |
| 22 | + height: 100%; | |
| 23 | +} | |
| 24 | +.container { | |
| 25 | + background-color: white; | |
| 26 | + height: 100%; | |
| 27 | +} | |
| 28 | +.search-container { | |
| 29 | + display: flex; | |
| 30 | + padding: 26rpx 20rpx; | |
| 31 | + border-bottom: 2rpx solid #f8f8f8; | |
| 32 | +} | |
| 33 | +.input-container { | |
| 34 | + flex: 1; | |
| 35 | + border-radius: 6rpx 0 0 6rpx; | |
| 36 | + overflow: hidden; | |
| 37 | +} | |
| 38 | +.search { | |
| 39 | + background-color: #f0f0f0; | |
| 40 | + padding: 10rpx 20rpx; | |
| 41 | + font-size: 28rpx; | |
| 42 | +} | |
| 43 | +.btn-search { | |
| 44 | + background-color: #FE6867; | |
| 45 | + color: white; | |
| 46 | + padding: 0 30rpx; | |
| 47 | + display: flex; | |
| 48 | + align-items: center; | |
| 49 | + border-radius: 0 6rpx 6rpx 0; | |
| 50 | +} | |
| 51 | +.title { | |
| 52 | + display: flex; | |
| 53 | + font-size: 30rpx; | |
| 54 | + border-bottom: 2rpx solid #f8f8f8; | |
| 55 | +} | |
| 56 | +.title .iconfont { | |
| 57 | + color: #ccc; | |
| 58 | + font-size: 16rpx; | |
| 59 | + margin-left: 8rpx; | |
| 60 | +} | |
| 61 | +.title-item { | |
| 62 | + width: 25%; | |
| 63 | + box-sizing: border-box; | |
| 64 | + text-align: center; | |
| 65 | + padding: 20rpx; | |
| 66 | + position: relative; | |
| 67 | +} | |
| 68 | +.title-item.active { | |
| 69 | + color: #FE6867; | |
| 70 | + font-weight: bold; | |
| 71 | +} | |
| 72 | +.title-item.active:after { | |
| 73 | + content:''; | |
| 74 | + position: absolute; | |
| 75 | + width: 50%; | |
| 76 | + height: 4rpx; | |
| 77 | + background-color: #FE6867; | |
| 78 | + left: 0; | |
| 79 | + right: 0; | |
| 80 | + bottom: 0; | |
| 81 | + margin: 0 auto; | |
| 82 | +} | |
| 83 | +.list-container { | |
| 84 | + height: calc(100% - 118rpx); | |
| 85 | +} | |
| 86 | +.list { | |
| 87 | + box-sizing: border-box; | |
| 88 | + height: calc(100% - 82rpx); | |
| 89 | + background-color: #f2f2f2; | |
| 90 | + /* padding-bottom: 102rpx; */ | |
| 91 | +} | |
| 92 | +.list.active1 { | |
| 93 | + height: calc(100% - 82rpx - 78rpx); | |
| 94 | + padding-bottom: 0; | |
| 95 | +} | |
| 96 | +.list.active2 { | |
| 97 | + padding-bottom: 0; | |
| 98 | +} | |
| 99 | +.list-item { | |
| 100 | + display: flex; | |
| 101 | + padding: 20rpx; | |
| 102 | + border-bottom: 2rpx solid #f8f8f8; | |
| 103 | + background-color: white; | |
| 104 | +} | |
| 105 | +.img-container { | |
| 106 | + background-color: #f0f0f0; | |
| 107 | + width: 280rpx; | |
| 108 | + height: 248rpx; | |
| 109 | + display: flex; | |
| 110 | + align-items: center; | |
| 111 | + justify-content: center; | |
| 112 | + position: relative; | |
| 113 | +} | |
| 114 | +.img-container:after { | |
| 115 | + font-family: iconfont; | |
| 116 | + content: '\e8c1'; | |
| 117 | + color: #bbb; | |
| 118 | + font-size: 80rpx; | |
| 119 | +} | |
| 120 | + | |
| 121 | + | |
| 122 | +.img-container.live:before { | |
| 123 | + content: '\e664'; | |
| 124 | +} | |
| 125 | +.img-container.coming:before { | |
| 126 | + content: '\e608'; | |
| 127 | +} | |
| 128 | +.img-container.playback:before { | |
| 129 | + content: '\e603'; | |
| 130 | +} | |
| 131 | +.img-container.live:before, | |
| 132 | +.img-container.coming:before, | |
| 133 | +.img-container.playback:before { | |
| 134 | + font-family: iconfont; | |
| 135 | + background-color: #FE6867; | |
| 136 | + color: white; | |
| 137 | + width: 50rpx; | |
| 138 | + height: 50rpx; | |
| 139 | + line-height: 50rpx; | |
| 140 | + text-align: center; | |
| 141 | + border-radius: 50%; | |
| 142 | + position: absolute; | |
| 143 | + left: 10rpx; | |
| 144 | + top: 10rpx; | |
| 145 | +} | |
| 146 | +.details { | |
| 147 | + flex: 1; | |
| 148 | + padding-left: 20rpx; | |
| 149 | +} | |
| 150 | +.btn-share { | |
| 151 | + box-sizing: border-box; | |
| 152 | + display: inline-block; | |
| 153 | + background-color: #FE6867; | |
| 154 | + color: white; | |
| 155 | + padding: 8rpx 30rpx; | |
| 156 | + border-radius: 6rpx; | |
| 157 | + text-align: center; | |
| 158 | +} | |
| 159 | +.pdt10 { | |
| 160 | + padding-top: 10rpx; | |
| 161 | +} | |
| 162 | +.pdt14 { | |
| 163 | + padding-top: 14rpx; | |
| 164 | +} | |
| 165 | +.pdtb6 { | |
| 166 | + padding-top: 6rpx; | |
| 167 | + padding-bottom: 6rpx; | |
| 168 | +} | |
| 169 | +.pdtb8 { | |
| 170 | + padding-top: 8rpx; | |
| 171 | + padding-bottom: 8rpx; | |
| 172 | +} | |
| 173 | +.pdl20 { | |
| 174 | + padding-left: 104rpx; | |
| 175 | +} | |
| 176 | + | |
| 177 | + | |
| 178 | +.no-more { | |
| 179 | + line-height: 3; | |
| 180 | + color: #ccc; | |
| 181 | + /* background-color: #f2f2f2; */ | |
| 182 | +} | |
| 183 | +.nodata { | |
| 184 | + text-align: center; | |
| 185 | + background-color: #f2f2f2; | |
| 186 | +} | |
| 187 | +.progress-container { | |
| 188 | + width: 55%; | |
| 189 | + padding-right: 10rpx; | |
| 190 | + position: relative; | |
| 191 | + text-align: center; | |
| 192 | +} | |
| 193 | +.retail { | |
| 194 | + color: #7b7b7b; | |
| 195 | + text-decoration: line-through; | |
| 196 | + font-size: 22rpx; | |
| 197 | + padding-left: 20rpx; | |
| 198 | +} | |
| 199 | +.name { | |
| 200 | + height: 76rpx; | |
| 201 | + overflow: hidden; | |
| 202 | +} | |
| 203 | + | |
| 204 | +.percent { | |
| 205 | + position: absolute; | |
| 206 | + top: 0; | |
| 207 | + bottom: 0; | |
| 208 | + left: 0; | |
| 209 | + right: 0; | |
| 210 | + margin: auto; | |
| 211 | + color: white; | |
| 212 | +} | |
| 213 | +.tabbar { | |
| 214 | + position: fixed; | |
| 215 | + width: 100%; | |
| 216 | + bottom: 0; | |
| 217 | + background-color: white; | |
| 218 | +} | |
| 219 | +.tabbar:after { | |
| 220 | + position: absolute; | |
| 221 | + content: ''; | |
| 222 | + width: 2rpx; | |
| 223 | + height: 50%; | |
| 224 | + top: 0; | |
| 225 | + bottom: 0; | |
| 226 | + left: 0; | |
| 227 | + right: 0; | |
| 228 | + margin: auto; | |
| 229 | + background-color: #f0f0f0; | |
| 230 | +} | |
| 231 | +.tabbar-item { | |
| 232 | + width: 50%; | |
| 233 | + text-align: center; | |
| 234 | + padding-top: 30rpx; | |
| 235 | + padding-bottom: 30rpx; | |
| 236 | +} | |
| 237 | +.tabbar-item .iconfont { | |
| 238 | + margin-right: 10rpx; | |
| 239 | +} | |
| 240 | +.tabbar-item.active { | |
| 241 | + color: #FE6867; | |
| 242 | +} | |
| 243 | + | |
| 244 | + | |
| 245 | +.group-type, | |
| 246 | +.group-num { | |
| 247 | + position: relative; | |
| 248 | + font-size: 22rpx; | |
| 249 | +} | |
| 250 | +.group-type:before, | |
| 251 | +.group-num:before { | |
| 252 | + font-family: iconfont; | |
| 253 | +} | |
| 254 | +.group-type:before { | |
| 255 | + content: '\e66a'; | |
| 256 | + color: white; | |
| 257 | + background-color: #FE6867; | |
| 258 | + position: absolute; | |
| 259 | + left: 0; | |
| 260 | + top: 0; | |
| 261 | + bottom: 0; | |
| 262 | + padding-left: 6rpx; | |
| 263 | + padding-right: 10rpx; | |
| 264 | + line-height: 30rpx; | |
| 265 | +} | |
| 266 | +.group-num:before { | |
| 267 | + padding-right: 6rpx; | |
| 268 | +} | |
| 269 | +.group-num:before { | |
| 270 | + content: '\e694'; | |
| 271 | + position: relative; | |
| 272 | +} | |
| 273 | +.group-num { | |
| 274 | + color: white; | |
| 275 | + background-color: #FE6867; | |
| 276 | + border-radius: 34rpx; | |
| 277 | + padding-left: 10rpx; | |
| 278 | + padding-right: 10rpx; | |
| 279 | + margin-right: 14rpx; | |
| 280 | +} | |
| 281 | +.group-type { | |
| 282 | + color: #FE6867; | |
| 283 | + border: 2rpx solid #FE6867; | |
| 284 | + padding-left: 42rpx; | |
| 285 | + padding-right: 4rpx; | |
| 286 | + border-radius: 6rpx; | |
| 287 | +} | |
| 288 | + | |
| 289 | +.badge { | |
| 290 | + color: white; | |
| 291 | + padding: 0 20rpx; | |
| 292 | + border-radius: 6rpx; | |
| 293 | + background-color: #FE6867; | |
| 294 | + margin-right: 10rpx; | |
| 295 | +} | |
| 296 | + | |
| 297 | +.subTab-title { | |
| 298 | + text-align: center; | |
| 299 | + justify-content: center; | |
| 300 | + align-items: center; | |
| 301 | + font-size: 28rpx; | |
| 302 | +} | |
| 303 | +.subTab-list { | |
| 304 | + padding: 20rpx; | |
| 305 | +} | |
| 306 | +.subTab-titleItem { | |
| 307 | + box-sizing: border-box; | |
| 308 | + width: calc(100% / 3); | |
| 309 | + padding: 20rpx 40rpx; | |
| 310 | + background-color: white; | |
| 311 | + border-right: 2rpx solid #f8f8f8; | |
| 312 | +} | |
| 313 | +.subTab-titleItem:last-child { | |
| 314 | + border-right: none; | |
| 315 | +} | |
| 316 | +.subTab-titleItem.active { | |
| 317 | + background-color: #FE6867; | |
| 318 | + color: white; | |
| 319 | +} | |
| 320 | +.subTab-item { | |
| 321 | + padding: 20rpx; | |
| 322 | + border-bottom: 2rpx solid #f8f8f8; | |
| 323 | + background-color: white; | |
| 324 | + border-radius: 8rpx; | |
| 325 | + box-shadow: 0 8px 12px #e7e9eb; | |
| 326 | +} | |
| 327 | +.subTab-item ~ .subTab-item { | |
| 328 | + margin-top: 20rpx; | |
| 329 | +} | |
| 330 | +.pdv10 { | |
| 331 | + padding-top: 10rpx; | |
| 332 | + padding-bottom: 10rpx; | |
| 333 | +} | |
| 334 | +.pdv20 { | |
| 335 | + padding-top: 20rpx; | |
| 336 | + padding-bottom: 20rpx; | |
| 337 | +} | |
| 338 | +.pdb10 { | |
| 339 | + padding-bottom: 10rpx; | |
| 340 | +} | |
| 341 | +.pdb20 { | |
| 342 | + padding-bottom: 20rpx; | |
| 343 | +} | |
| 344 | +.bdr-b { | |
| 345 | + border-bottom: 2rpx solid #f8f8f8; | |
| 346 | +} | |
| 347 | +.dash-b { | |
| 348 | + border-bottom: 2rpx dashed #ddd; | |
| 349 | +} | |
| 350 | +.btn-container { | |
| 351 | + display: flex; | |
| 352 | + align-items: flex-end; | |
| 353 | + font-size: 26rpx; | |
| 354 | +} | |
| 355 | + | |
| 356 | + | |
| 357 | +/* .popup-container { | |
| 358 | + content:''; | |
| 359 | + position: fixed; | |
| 360 | + top: 0; | |
| 361 | + bottom: 0; | |
| 362 | + left: 0; | |
| 363 | + right: 0; | |
| 364 | + z-index: 3; | |
| 365 | + background-color: rgba(0,0,0,.6); | |
| 366 | + display: flex; | |
| 367 | + align-items: center; | |
| 368 | + justify-content: center; | |
| 369 | +} | |
| 370 | +.popup { | |
| 371 | + width: 90%; | |
| 372 | +} | |
| 373 | +.popup-content { | |
| 374 | + box-sizing: border-box; | |
| 375 | + width: 100%; | |
| 376 | + background-color: white; | |
| 377 | + padding: 0 20rpx; | |
| 378 | + border-radius: 10rpx; | |
| 379 | + max-height: 1038rpx; | |
| 380 | +} | |
| 381 | +.icon-close { | |
| 382 | + font-size: 60rpx; | |
| 383 | + color: white; | |
| 384 | +} | |
| 385 | +.popup-btn { | |
| 386 | + padding-top: 30rpx; | |
| 387 | +} | |
| 388 | + | |
| 389 | +.popup-title { | |
| 390 | + /* font-size: 28rpx; */ | |
| 391 | + /* font-weight: bold; | |
| 392 | + padding: 20rpx 0; | |
| 393 | +} | |
| 394 | +.popup-title2 { */ | |
| 395 | + /* padding: 10rpx 0; */ | |
| 396 | + /* padding-bottom: 8rpx; | |
| 397 | +} | |
| 398 | +.popup-title3 { | |
| 399 | + padding-left: 34rpx; | |
| 400 | + font-size: 30rpx; | |
| 401 | +} | |
| 402 | +.popup-list { | |
| 403 | + max-height: 602rpx; | |
| 404 | + overflow-y: auto; | |
| 405 | +} | |
| 406 | + | |
| 407 | + | |
| 408 | +radio .wx-radio-input { | |
| 409 | + width: 28rpx; | |
| 410 | + height: 28rpx; | |
| 411 | +} | |
| 412 | + | |
| 413 | + | |
| 414 | +radio .wx-radio-input.wx-radio-input-checked { | |
| 415 | + background-color: #FE6867; | |
| 416 | + border-color: #FE6867; | |
| 417 | +} | |
| 418 | +radio .wx-radio-input.wx-radio-input-checked::before{ | |
| 419 | + color: white; | |
| 420 | +} | |
| 421 | + | |
| 422 | +.popup-content.active { | |
| 423 | + max-height: 982rpx; | |
| 424 | + overflow: auto; | |
| 425 | +} */ | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | ... | ... |