Showing
6 changed files
with
315 additions
and
1 deletions
| @@ -34,7 +34,8 @@ | @@ -34,7 +34,8 @@ | ||
| 34 | "pages/me/history", | 34 | "pages/me/history", |
| 35 | "pages/reserve/remark", | 35 | "pages/reserve/remark", |
| 36 | "pages/reserve/findSeller", | 36 | "pages/reserve/findSeller", |
| 37 | - "pages/customer/cancel" | 37 | + "pages/customer/cancel", |
| 38 | + "pack-activity/pages/index" | ||
| 38 | ], | 39 | ], |
| 39 | "subpackages": [ | 40 | "subpackages": [ |
| 40 | { | 41 | { |
pack-activity/pages/index.js
0 → 100644
| 1 | +// pack-activity/pages/index.js | ||
| 2 | +Page({ | ||
| 3 | + | ||
| 4 | + /** | ||
| 5 | + * 页面的初始数据 | ||
| 6 | + */ | ||
| 7 | + data: { | ||
| 8 | + activity:{ | ||
| 9 | + id:1, | ||
| 10 | + background:'#F04866', | ||
| 11 | + banner:'http://qn.colorcun.com/activity/images/banner.png', | ||
| 12 | + list:[ | ||
| 13 | + { | ||
| 14 | + id:1, | ||
| 15 | + name:'开工专享红包', | ||
| 16 | + desc:'开工福利,胡吃海喝', | ||
| 17 | + money:'18.8', | ||
| 18 | + icon:'http://qn.colorcun.com/activity/images/icon.png', | ||
| 19 | + status:0, | ||
| 20 | + }, | ||
| 21 | + { | ||
| 22 | + id:2, | ||
| 23 | + name:'开工专享红包', | ||
| 24 | + desc:'开工福利,胡吃海喝', | ||
| 25 | + money:'18.8', | ||
| 26 | + icon:'http://qn.colorcun.com/activity/images/icon.png', | ||
| 27 | + status:1, | ||
| 28 | + }, | ||
| 29 | + { | ||
| 30 | + id:3, | ||
| 31 | + name:'开工专享红包', | ||
| 32 | + desc:'开工福利,胡吃海喝', | ||
| 33 | + money:'18.8', | ||
| 34 | + icon:'http://qn.colorcun.com/activity/images/icon.png', | ||
| 35 | + status:2, | ||
| 36 | + }, | ||
| 37 | + { | ||
| 38 | + id:4, | ||
| 39 | + name:'开工专享红包', | ||
| 40 | + desc:'开工福利,胡吃海喝', | ||
| 41 | + money:'18.8', | ||
| 42 | + icon:'http://qn.colorcun.com/activity/images/icon.png', | ||
| 43 | + status:0, | ||
| 44 | + }, | ||
| 45 | + ], | ||
| 46 | + }, | ||
| 47 | + count:999.99.toFixed(2), | ||
| 48 | + }, | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * 生命周期函数--监听页面加载 | ||
| 52 | + */ | ||
| 53 | + onLoad: function (options) { | ||
| 54 | + | ||
| 55 | + }, | ||
| 56 | + | ||
| 57 | + /** | ||
| 58 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 59 | + */ | ||
| 60 | + onReady: function () { | ||
| 61 | + | ||
| 62 | + }, | ||
| 63 | + | ||
| 64 | + /** | ||
| 65 | + * 生命周期函数--监听页面显示 | ||
| 66 | + */ | ||
| 67 | + onShow: function () { | ||
| 68 | + | ||
| 69 | + }, | ||
| 70 | + | ||
| 71 | + /** | ||
| 72 | + * 生命周期函数--监听页面隐藏 | ||
| 73 | + */ | ||
| 74 | + onHide: function () { | ||
| 75 | + | ||
| 76 | + }, | ||
| 77 | + | ||
| 78 | + /** | ||
| 79 | + * 生命周期函数--监听页面卸载 | ||
| 80 | + */ | ||
| 81 | + onUnload: function () { | ||
| 82 | + | ||
| 83 | + }, | ||
| 84 | + | ||
| 85 | + /** | ||
| 86 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
| 87 | + */ | ||
| 88 | + onPullDownRefresh: function () { | ||
| 89 | + | ||
| 90 | + }, | ||
| 91 | + | ||
| 92 | + /** | ||
| 93 | + * 页面上拉触底事件的处理函数 | ||
| 94 | + */ | ||
| 95 | + onReachBottom: function () { | ||
| 96 | + | ||
| 97 | + }, | ||
| 98 | + | ||
| 99 | + /** | ||
| 100 | + * 用户点击右上角分享 | ||
| 101 | + */ | ||
| 102 | + onShareAppMessage: function () { | ||
| 103 | + | ||
| 104 | + } | ||
| 105 | +}) |
pack-activity/pages/index.json
0 → 100644
pack-activity/pages/index.wxml
0 → 100644
| 1 | +<!--pack-activity/pages/index.wxml--> | ||
| 2 | +<nav hasHome>activity</nav> | ||
| 3 | +<view class="pages" style="background-color: {{activity.background}}"> | ||
| 4 | + <view class="banner"> | ||
| 5 | + <image mode="widthFix" src="{{activity.banner}}" style="width: 100%"></image> | ||
| 6 | + <view class="guize">活动 规则</view> | ||
| 7 | + </view> | ||
| 8 | + <view class="content"> | ||
| 9 | + <view class="tips flex-lr"> | ||
| 10 | + <view>活动累计收入:{{count}}元</view> | ||
| 11 | + <view class="flex-rr"> | ||
| 12 | + 查看余额 | ||
| 13 | + <view class="more"></view> | ||
| 14 | + </view> | ||
| 15 | + </view> | ||
| 16 | + <view class="list"> | ||
| 17 | + <view class="header flex-cc"> | ||
| 18 | + <view class="header-img lt"></view> | ||
| 19 | + <view class="header-txt">完成任务得红包</view> | ||
| 20 | + <view class="header-img gt"></view> | ||
| 21 | + </view> | ||
| 22 | + <view class="item flex-lr" wx:for="{{activity.list}}" wx:key="list"> | ||
| 23 | + <image class="icon" src="{{item.icon}}" mode="aspectFit"></image> | ||
| 24 | + <view class="item-content"> | ||
| 25 | + <view class="item-title">{{item.name}}</view> | ||
| 26 | + <view class="item-desc">{{item.desc}}</view> | ||
| 27 | + </view> | ||
| 28 | + <view class="opt"> | ||
| 29 | + <view class="opt-button status{{item.status}}">{{['领取奖励','去完成','去查看'][item.status]}}</view> | ||
| 30 | + <view class="opt-money">{{item.money}}元红包</view> | ||
| 31 | + </view> | ||
| 32 | + </view> | ||
| 33 | + </view> | ||
| 34 | + <view class="share-but">分享活动</view> | ||
| 35 | + </view> | ||
| 36 | +</view> |
pack-activity/pages/index.wxss
0 → 100644
| 1 | +/* pack-activity/pages/index.wxss */ | ||
| 2 | +.pages{ | ||
| 3 | +} | ||
| 4 | +.banner{ | ||
| 5 | + width:100%; | ||
| 6 | + background:linear-gradient(202deg,rgba(213,45,182,1) 0%,rgba(240,72,102,1) 100%); | ||
| 7 | + position: relative; | ||
| 8 | +} | ||
| 9 | +.content{ | ||
| 10 | + height: 1020rpx; | ||
| 11 | + width: calc(100% - 40rpx); | ||
| 12 | + margin: 0 20rpx 0; | ||
| 13 | +} | ||
| 14 | +.tips{ | ||
| 15 | + width:100%; | ||
| 16 | + height:50rpx; | ||
| 17 | + background:rgba(53,53,53,0.3); | ||
| 18 | + border-radius:30rpx; | ||
| 19 | + box-sizing: border-box; | ||
| 20 | + padding: 0 28rpx 0 40rpx; | ||
| 21 | + | ||
| 22 | + font-size:24rpx; | ||
| 23 | + font-weight:500; | ||
| 24 | + color:rgba(255,255,255,1); | ||
| 25 | + line-height:50rpx; | ||
| 26 | +} | ||
| 27 | +.more{ | ||
| 28 | + background-image: url("http://qn.colorcun.com/activity/images/more.png"); | ||
| 29 | + margin-left: 22rpx; | ||
| 30 | +} | ||
| 31 | +.guize{ | ||
| 32 | + width:40rpx; | ||
| 33 | + height:120rpx; | ||
| 34 | + background:rgba(53,53,53,0.29); | ||
| 35 | + border-radius:10rpx 0rpx 0rpx 10rpx; | ||
| 36 | + padding: 2rpx 10rpx 0; | ||
| 37 | + box-sizing: border-box; | ||
| 38 | + | ||
| 39 | + font-size:20rpx; | ||
| 40 | + font-weight:500; | ||
| 41 | + color:rgba(255,255,255,1); | ||
| 42 | + line-height:28rpx; | ||
| 43 | + position: absolute; | ||
| 44 | + top:20rpx; | ||
| 45 | + right:0; | ||
| 46 | +} | ||
| 47 | +.list{ | ||
| 48 | + background:rgba(255,255,255,1); | ||
| 49 | + box-shadow:4rpx 4rpx 6rpx 4rpx rgba(218,61,69,1); | ||
| 50 | + border-radius:20rpx; | ||
| 51 | + margin-top: 20rpx; | ||
| 52 | + box-sizing: border-box; | ||
| 53 | + padding-top: 60rpx; | ||
| 54 | + padding-bottom: 60rpx; | ||
| 55 | +} | ||
| 56 | + | ||
| 57 | +.header{ | ||
| 58 | + margin-bottom: 60rpx; | ||
| 59 | +} | ||
| 60 | +.header .header-txt{ | ||
| 61 | + width:236rpx; | ||
| 62 | + height:44rpx; | ||
| 63 | + font-size:32rpx; | ||
| 64 | + font-weight:600; | ||
| 65 | + color:rgba(204,17,39,1); | ||
| 66 | + line-height:44rpx; | ||
| 67 | + margin: 0 20rpx; | ||
| 68 | +} | ||
| 69 | +.header-img{ | ||
| 70 | + background-size: 100% 100%; | ||
| 71 | + width: 70rpx; | ||
| 72 | + height: 16rpx; | ||
| 73 | +} | ||
| 74 | +.header-img.gt{ | ||
| 75 | + background-image: url("http://qn.colorcun.com/activity/images/lt.png"); | ||
| 76 | +} | ||
| 77 | +.header-img.lt{ | ||
| 78 | + background-image: url("http://qn.colorcun.com/activity/images/gt.png"); | ||
| 79 | +} | ||
| 80 | +.list .item{ | ||
| 81 | + margin-bottom: 60rpx; | ||
| 82 | + height: 94rpx; | ||
| 83 | + padding: 0 20rpx; | ||
| 84 | + box-sizing: border-box; | ||
| 85 | +} | ||
| 86 | +.list .item:last-child{ | ||
| 87 | + margin-bottom: 0; | ||
| 88 | +} | ||
| 89 | +.item .icon{ | ||
| 90 | + width: 94rpx; | ||
| 91 | + height: 94rpx; | ||
| 92 | + min-width: 94rpx; | ||
| 93 | +} | ||
| 94 | +.item-content{ | ||
| 95 | + margin-left: 10rpx; | ||
| 96 | + width: 100%; | ||
| 97 | +} | ||
| 98 | +.opt{ | ||
| 99 | + width: 130rpx; | ||
| 100 | + min-width: 130rpx; | ||
| 101 | +} | ||
| 102 | +.item-title{ | ||
| 103 | + height:44rpx; | ||
| 104 | + font-size:32rpx; | ||
| 105 | + font-weight:600; | ||
| 106 | + color:rgba(53,53,53,1); | ||
| 107 | + line-height:44rpx; | ||
| 108 | +} | ||
| 109 | +.item-desc{ | ||
| 110 | + height:34rpx; | ||
| 111 | + font-size:24rpx; | ||
| 112 | + font-weight:500; | ||
| 113 | + color:rgba(153,153,153,1); | ||
| 114 | + line-height:34rpx; | ||
| 115 | + margin-top: 10rpx; | ||
| 116 | +} | ||
| 117 | +.opt-money{ | ||
| 118 | + height:28rpx; | ||
| 119 | + font-size:20rpx; | ||
| 120 | + font-weight:600; | ||
| 121 | + color:rgba(230,34,57,1); | ||
| 122 | + line-height:28rpx; | ||
| 123 | + margin-top: 10rpx; | ||
| 124 | +} | ||
| 125 | +.opt-button{ | ||
| 126 | + box-sizing: border-box; | ||
| 127 | + width:130rpx; | ||
| 128 | + height:50rpx; | ||
| 129 | + border-radius:25rpx; | ||
| 130 | + border:2rpx solid rgba(235,41,65,1); | ||
| 131 | + | ||
| 132 | + font-size:24rpx; | ||
| 133 | + font-weight:600; | ||
| 134 | + color:rgba(230,34,57,1); | ||
| 135 | + line-height:50rpx; | ||
| 136 | + text-align: center; | ||
| 137 | +} | ||
| 138 | +.opt-button.status0,.opt-button.status1{ | ||
| 139 | + background:linear-gradient(180deg,rgba(225,27,49,1) 0%,rgba(243,53,78,1) 100%); | ||
| 140 | + box-shadow:0rpx 2rpx 4rpx 0rpx rgba(232,37,60,1),2rpx 0rpx 6rpx 0rpx rgba(255,172,171,1); | ||
| 141 | + color:rgba(255,227,192,1); | ||
| 142 | +} | ||
| 143 | +.share-but{ | ||
| 144 | + width:400rpx; | ||
| 145 | + height:80rpx; | ||
| 146 | + background:linear-gradient(180deg,rgba(252,190,38,1) 0%,rgba(255,233,128,1) 100%); | ||
| 147 | + box-shadow:0rpx 4rpx 8rpx 0rpx rgba(182,43,68,1); | ||
| 148 | + border-radius:40rpx; | ||
| 149 | + margin-top: 40rpx; | ||
| 150 | + | ||
| 151 | + font-size:32rpx; | ||
| 152 | + font-weight:600; | ||
| 153 | + color:rgba(230,34,57,1); | ||
| 154 | + line-height:80rpx; | ||
| 155 | + text-align: center; | ||
| 156 | + margin-left: calc(50% - 200rpx); | ||
| 157 | +} |
| @@ -595,6 +595,13 @@ | @@ -595,6 +595,13 @@ | ||
| 595 | "pathName": "pages/customer/cancel", | 595 | "pathName": "pages/customer/cancel", |
| 596 | "query": "id=58241", | 596 | "query": "id=58241", |
| 597 | "scene": null | 597 | "scene": null |
| 598 | + }, | ||
| 599 | + { | ||
| 600 | + "id": -1, | ||
| 601 | + "name": "pack-activity/pages/index", | ||
| 602 | + "pathName": "pack-activity/pages/index", | ||
| 603 | + "query": "id=1", | ||
| 604 | + "scene": null | ||
| 598 | } | 605 | } |
| 599 | ] | 606 | ] |
| 600 | } | 607 | } |
-
Please register or login to post a comment