Commit 1ad9b5ddb4de9a6cee11d8861fdfd40e9e598805

Authored by taiyuan
1 parent cd4fb867

幸运大转盘未中奖送积分或成长值

app.wxss
... ... @@ -703,9 +703,9 @@ background: #ffe3e2;
703 703 /* 图标字体(ty) */
704 704 @font-face {
705 705 font-family: 'iconfont'; /* Project id 2054717 */
706   - src: url('//at.alicdn.com/t/font_2054717_v0znypg14xq.woff2?t=1627541682562') format('woff2'),
707   - url('//at.alicdn.com/t/font_2054717_v0znypg14xq.woff?t=1627541682562') format('woff'),
708   - url('//at.alicdn.com/t/font_2054717_v0znypg14xq.ttf?t=1627541682562') format('truetype');
  706 + src: url('//at.alicdn.com/t/font_2054717_3fwbtkdbxhl.woff2?t=1627893975776') format('woff2'),
  707 + url('//at.alicdn.com/t/font_2054717_3fwbtkdbxhl.woff?t=1627893975776') format('woff'),
  708 + url('//at.alicdn.com/t/font_2054717_3fwbtkdbxhl.ttf?t=1627893975776') format('truetype');
709 709 }
710 710  
711 711 .iconfont {
... ... @@ -716,6 +716,10 @@ background: #ffe3e2;
716 716 -moz-osx-font-smoothing: grayscale;
717 717 }
718 718  
  719 +.icon-zhuanfa1:before {
  720 + content: "\e614";
  721 +}
  722 +
719 723  
720 724 .icon-zhiwen:before {
721 725 content: "\e6aa";
... ...
packageB/pages/luckactivity/index/index.wxml
... ... @@ -20,7 +20,7 @@
20 20 <block wx:for="{{list.pageData}}">
21 21 <view class="tab-item" bindtap="goto" data-id="{{item.id}}" data-title="{{item.act_name}}">
22 22 <view class="img-container">
23   - <image wx:if="{{item.imageurl}}" src="{{imghost + item.imageurl}}" class="img"></image>
  23 + <image wx:if="{{item.imageurl}}" src="{{imghost + item.imageurl}}" class="img" mode="aspectFit"></image>
24 24 <text class="iconfont icon-zhuanpan" wx:else></text>
25 25 </view>
26 26 <view class="desc-container">
... ...
packageB/pages/luckactivity/luckinfo/luckinfo.js
... ... @@ -118,9 +118,9 @@ Page({
118 118 // console.log('prizes//////', res.data.data);
119 119 self.setData({
120 120 template: res.data.data,
121   - bannerUrl: imghost + ((res.data.data&&res.data.data.bannerUrl) ? res.data.data.bannerUrl:'miniapp/images/luckDraw/bg.png'), //背景图
122   - 'blocks[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelBaseUrl) ? res.data.data.wheelBaseUrl:'miniapp/images/luckDraw/weel.png'), //转盘
123   - 'buttons[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelPointerUrl) ? res.data.data.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png'), //指针
  121 + bannerUrl: imghost + ((res.data.data&&res.data.data.bannerUrl) ? res.data.data.bannerUrl:'miniapp/images/luckDraw/bg.png?v=2'), //背景图
  122 + 'blocks[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelBaseUrl) ? res.data.data.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=2'), //转盘
  123 + 'buttons[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelPointerUrl) ? res.data.data.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=2'), //指针
124 124 });
125 125 },
126 126 });
... ... @@ -575,6 +575,8 @@ Page({
575 575 }, 3000);
576 576  
577 577  
  578 +
  579 +
578 580 if(res.data.code == -1) {
579 581 wx.showToast({
580 582 title: res.data.msg,
... ... @@ -585,13 +587,15 @@ Page({
585 587 // self.data.start = true;
586 588 };
587 589 // console.log('请求出错');
588   - if(self.data.luckInfo.vip_act_num != 0) {
  590 + if(res.data.code == -2 && self.data.luckInfo.vip_act_num != 0) {
589 591 self.setData({
590 592 'luckInfo.user_LuckNumDay': self.data.luckInfo.user_LuckNumDay - 1,
591 593 });
592 594 };
593 595  
594 596  
  597 +
  598 +
595 599 };
596 600 },
597 601  
... ... @@ -640,13 +644,14 @@ Page({
640 644 showResult: true,
641 645 showMask: true,
642 646 resultTitle,
  647 + showPopup: false,
643 648 currentLbtype: lbtype,
644 649 });
645 650  
646 651  
647 652  
648 653  
649   - if(no_luck_urltype == 1 && (resultTitle == '谢谢参与')) {
  654 + if(no_luck_urltype == 1 && resultTitle == '谢谢参与') {
650 655 if(this.data.luckInfo.no_luck_weappurl) {
651 656 let num = this.data.num;
652 657 let url = this.data.luckInfo.no_luck_weappurl;
... ... @@ -662,8 +667,47 @@ Page({
662 667 }, 1000);
663 668  
664 669 };
  670 +
665 671 };
666 672  
  673 +
  674 + if(self.data.luckInfo.give_user) {
  675 + if(resultTitle == '谢谢参与') {
  676 + if(self.data.luckInfo.give_type == 1) {
  677 + if(self.data.luckInfo.give_integral > 0) {
  678 + wx.showToast({
  679 + title: `获得游戏奖励积分${self.data.luckInfo.give_integral}`,
  680 + icon: 'none',
  681 + });
  682 + };
  683 + } else if((self.data.luckInfo.give_type == 2)) {
  684 + if(self.data.luckInfo.give_integral > 0) {
  685 + wx.showToast({
  686 + title: `获得游戏奖励成长值${self.data.luckInfo.give_growth}`,
  687 + icon: 'none',
  688 + });
  689 + };
  690 + };
  691 + };
  692 + } else {
  693 + if(self.data.luckInfo.give_type == 1) {
  694 + if(self.data.luckInfo.give_integral > 0) {
  695 + wx.showToast({
  696 + title: `获得游戏奖励积分${self.data.luckInfo.give_integral}`,
  697 + icon: 'none',
  698 + });
  699 + };
  700 + } else if((self.data.luckInfo.give_type == 2)) {
  701 + if(self.data.luckInfo.give_integral > 0) {
  702 + wx.showToast({
  703 + title: `获得游戏奖励成长值${self.data.luckInfo.give_growth}`,
  704 + icon: 'none',
  705 + });
  706 + };
  707 + };
  708 + };
  709 +
  710 +
667 711 },
668 712  
669 713 showPopup() {
... ... @@ -817,7 +861,7 @@ Page({
817 861 break;
818 862 };
819 863 case 6: {
820   - url = '/packageA/pages/myGift/myGift';
  864 + url = '/packageA/pages/myGift/myGift?index=1';
821 865 break;
822 866 };
823 867 };
... ...
packageB/pages/luckactivity/luckinfo/luckinfo.wxml
1 1 <wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
2 2 <wxs module="tool" src="./tool.wxs"></wxs>
3   -<view class="luck-container" style="background: {{template.colorCode ? template.colorCode:'#8102FD'}} url({{bannerUrl ? bannerUrl:(imghost + 'miniapp/images/luckDraw/bg.png')}}) no-repeat;">
4   -<!-- <view class="luck-container" style="background: url({{ bannerUrl}}) no-repeat;"> -->
  3 +<view class="luck-container" style="background: {{template.colorCode ? template.colorCode:'#da104b'}} url({{bannerUrl ? bannerUrl:(imghost + 'miniapp/images/luckDraw/bg.png?v=2')}}) no-repeat;">
5 4 <!-- 中奖人员 -->
6 5 <view class="swiper-container" wx:if="{{nameList && nameList.length != 0}}">
7 6 <swiper class="swiper" autoplay="true" circular="true" vertical="true" interval="3000">
... ... @@ -127,8 +126,11 @@
127 126 </view>
128 127 </view>
129 128  
  129 +<!-- 分享按钮 -->
  130 +<!-- <view class="circle-container zhuanfa" bindtap=""><text class="iconfont icon-zhuanfa1"></text></view> -->
  131 +
130 132 <!-- 悬浮按钮 -->
131   -<view class="gift-container {{((record && record.length != 0) || isActive) ? 'active':''}}" bindtap="showPopup"><text class="iconfont icon-liwu"></text></view>
  133 +<view class="circle-container gift {{((record && record.length != 0) || isActive) ? 'active':''}}" bindtap="showPopup"><text class="iconfont icon-liwu"></text></view>
132 134  
133 135 <!-- 弹窗 -->
134 136 <view class="popup-container" wx:if="{{showPopup}}">
... ... @@ -179,7 +181,7 @@
179 181 </view>
180 182  
181 183 <view class="pdt40" wx:if="{{currentLbtype == 5}}">
182   - <view class="btn btn2" bindtap="clickReceive">立即领取</view>
  184 + <view class="btn btn2" bindtap="clickReceive">立即兑换</view>
183 185 </view>
184 186  
185 187  
... ...
packageB/pages/luckactivity/luckinfo/luckinfo.wxss
... ... @@ -68,7 +68,7 @@ page,
68 68 width: 140rpx;
69 69 height: 140rpx;
70 70 margin-right: 20rpx;
71   - background-color: #f5f5f5;
  71 + /* background-color: #f5f5f5; */
72 72 }
73 73  
74 74 .img {
... ... @@ -118,7 +118,7 @@ page,
118 118 margin-right: 10rpx;
119 119 }
120 120  
121   -.gift-container {
  121 +.circle-container {
122 122 background-color: rgba(44, 44, 44, 0.2);
123 123 width: 100rpx;
124 124 height: 100rpx;
... ... @@ -126,14 +126,21 @@ page,
126 126 color: white;
127 127 position: fixed;
128 128 right: 20rpx;
129   - bottom: 20rpx;
130 129 display: flex;
131 130 justify-content: center;
132 131 align-items: center;
133 132 z-index: 1;
134 133 }
135 134  
136   -.gift-container.active::after {
  135 +.circle-container.gift {
  136 + bottom: 20rpx;
  137 +}
  138 +
  139 +.circle-container.zhuanfa {
  140 + bottom: 160rpx;
  141 +}
  142 +
  143 +.circle-container.active::after {
137 144 content: '';
138 145 position: absolute;
139 146 width: 14rpx;
... ... @@ -145,7 +152,8 @@ page,
145 152 right: 10rpx;
146 153 }
147 154  
148   -.icon-liwu {
  155 +.icon-liwu,
  156 +.icon-zhuanfa1 {
149 157 font-size: 40rpx;
150 158 }
151 159  
... ... @@ -161,7 +169,7 @@ page,
161 169 width: 6rem;
162 170 z-index: 2;
163 171 -webkit-transform: translate(0, -50%); */
164   - transform: translate(0, -50%);
  172 + /* transform: translate(0, -50%); */
165 173 /* color: #fff;
166 174 font: normal 400 20px/1 'Josefin Sans', sans-serif;
167 175 letter-spacing: .1em;
... ... @@ -175,9 +183,10 @@ page,
175 183 left: 50%;
176 184 width: 1rem;
177 185 height: 1rem;
178   - margin-left: -12px;
179   - border-left: 1px solid #fff;
180   - border-bottom: 1px solid #fff;
  186 + /* transform: translateX(-50%); */
  187 + margin-left: -13rpx;
  188 + border-left: 2rpx solid #fff;
  189 + border-bottom: 2rpx solid #fff;
181 190 -webkit-transform: rotate(-45deg);
182 191 transform: rotate(-45deg);
183 192 -webkit-animation: sdb07 2s infinite;
... ... @@ -190,7 +199,7 @@ page,
190 199 animation-delay: 0s;
191 200 }
192 201 .tip-to-down text:nth-of-type(2) {
193   - top: 16px;
  202 + top: 32rpx;
194 203 -webkit-animation-delay: .15s;
195 204 animation-delay: .15s;
196 205 }
... ...