瀏覽代碼

618部分更新5

master
suizhijia 5 年之前
父節點
當前提交
8c002f6037
共有 19 個檔案被更改,包括 345 行新增84 行删除
  1. +15
    -11
      496_dongfengqichen/app.js
  2. +6
    -4
      496_dongfengqichen/pages/component/service/index.js
  3. +21
    -4
      496_dongfengqichen/pages/index/index.js
  4. +10
    -9
      496_dongfengqichen/pages/index/index.wxml
  5. +5
    -4
      496_dongfengqichen/pages/lookPrizeDetail/lookPrizeDetail.wxml
  6. +3
    -2
      496_dongfengqichen/pages/luckyStar/luckyStar.js
  7. +24
    -12
      496_dongfengqichen/pages/myCenter/myCenter.js
  8. +29
    -0
      496_dongfengqichen/pages/myCenter/myCenter.wxml
  9. +8
    -8
      496_dongfengqichen/pages/orderActivity/orderActivity.js
  10. +1
    -1
      496_dongfengqichen/pages/orderActivity/orderActivity.wxml
  11. +1
    -1
      496_dongfengqichen/pages/orderActivity/orderActivity.wxss
  12. +107
    -17
      496_dongfengqichen/pages/rotaryDraw/rotaryDraw.js
  13. +1
    -0
      496_dongfengqichen/pages/rotaryDraw/rotaryDraw.json
  14. +17
    -1
      496_dongfengqichen/pages/rotaryDraw/rotaryDraw.wxml
  15. +50
    -1
      496_dongfengqichen/pages/rotaryDraw/rotaryDraw.wxss
  16. +32
    -3
      496_dongfengqichen/pages/yuyue/yuyue.js
  17. +1
    -0
      496_dongfengqichen/pages/yuyue/yuyue.json
  18. +11
    -3
      496_dongfengqichen/pages/yuyue/yuyue.wxml
  19. +3
    -3
      496_dongfengqichen/pages/yuyue/yuyue.wxss

+ 15
- 11
496_dongfengqichen/app.js 查看文件

@@ -129,6 +129,7 @@ App({
getSecondGuessInfoV2:null,//第二轮价格竞猜结果
phonebolb:false,
isStar:null,//是否为星探
luckyTokenList:[],//可用抽奖token列表
},
// 获取openId
getOpenid: function (code) {
@@ -321,17 +322,20 @@ App({
},this)
},
getBuyState: function () {//查询是否已下订
// this.wxRequest(this.globalData.urlRoot + "wxPay/getBuyState", {source:2}, res => {
// if (res.code == 200) {
// if (res.data) {
// res.data.cdate = res.data.cdate ? res.data.cdate : "";
// this.globalData.getBuyState = res.data;
// if (this.globalData.buyStateSuccessFuc){
// this.globalData.buyStateSuccessFuc();
// }
// }
// }
// }, this);
this.wxRequest(this.globalData.urlRoot + "wxPay/v3/getLuckyTokenList", {source:2}, res => {
if (res.code == 200) {
if (res.data) {
res.data.cdate = res.data.cdate ? res.data.cdate : "";
this.globalData.getBuyState = res.data;
if (this.globalData.buyStateSuccessFuc){
this.globalData.buyStateSuccessFuc();
}
if(res.data.luckyTokenList){
this.globalData.luckyTokenList = res.data.luckyTokenList;
}
}
}
}, this);
},
addAppEnter: function () {//小程序整体pv统计
this.wxRequest(this.globalData.urlRoot + "statistics/addAppEnter", { scene:this.globalData.sceneSource}, res => {

+ 6
- 4
496_dongfengqichen/pages/component/service/index.js 查看文件

@@ -20,10 +20,12 @@ Component({
yuyueShow: false,
},
attached:function(){
this.setData({
nowPage:app.globalData.nowPage,
buyState: app.globalData.getBuyState?app.globalData.getBuyState.success:false
})
setTimeout(()=>{
this.setData({
nowPage:app.globalData.nowPage,
buyState: app.globalData.getBuyState?app.globalData.getBuyState.success:false
})
},50)
},
/**
* 组件的方法列表

+ 21
- 4
496_dongfengqichen/pages/index/index.js 查看文件

@@ -63,6 +63,7 @@ Page({
showMaskNum:0,//要显示的弹窗
addressShow:false,
isAddress:false,//是否有地址
drawNum:0,//可用抽奖次数
},
onLoad: function (options) {
if (app.globalData.isFirstLogin) {
@@ -83,6 +84,11 @@ Page({
}
},
loadFun: function () {
if(app.globalData.luckyTokenList && app.globalData.luckyTokenList.length){
this.setData({
drawNum:app.globalData.luckyTokenList.length
})
}
if (!app.globalData.addPageEnterState.index) {
app.addPageEnter("2AF7D5B88BBFF4159C8079E963E72C9B");
app.globalData.addPageEnterState.index = true;
@@ -121,7 +127,12 @@ Page({
})
this.getFirstMsg();
},
onShow: function () {
onShow:function () {
if(app.globalData.luckyTokenList && app.globalData.luckyTokenList.length){
this.setData({
drawNum:app.globalData.luckyTokenList.length
})
}
if (app.globalData.getBuyState) {
this.getBuyStates();
} else {
@@ -513,9 +524,15 @@ Page({
// buyState: app.globalData.getBuyState.success
// })
// }
this.setData({
placing: !this.data.placing
})
if(this.data.buyState){
wx.navigateTo({
url: '/pages/rotaryDraw/rotaryDraw',
})
}else{
this.setData({
placing: !this.data.placing
})
}
},
swiperChange:function(e){
var num = e.currentTarget.dataset.num;

+ 10
- 9
496_dongfengqichen/pages/index/index.wxml 查看文件

@@ -3,15 +3,16 @@
<view class="main" wx:if="{{isStartAdvertising==0 || !isStartAdvertisingShow}}">
<view class="contentFrame">
<view class="newImages2-76">
<image style="width:750rpx;height:11693rpx;" src="{{imgUrl+'/newImages8/newHome/newHomeBg.png'}}"></image>
<!-- <image style="width:750rpx;height:11693rpx;" src="{{imgUrl+'/newImages8/newHome/newHomeBg.png'}}"></image> -->
<!-- <image style="width:750rpx;height:10368rpx;" src="{{imgUrl+'/newImages4/16.png'}}"></image> -->
<!-- <image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages6/images/newImg_01.png?v=002'}}"></image>
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages6/images/newImg_02.png?v=004'}}"></image>
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages6/images/newImg_03.png'}}"></image>
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages6/images/newImg_04.png'}}"></image>
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages6/images/newImg_05.png'}}"></image>
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages6/images/newImg_06.png'}}"></image>
<image style="width:750rpx;height:768rpx;" src="{{imgUrl+'/newImages6/images/newImg_07.png'}}"></image> -->
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages8/newHome/newHome_01.png'}}"></image>
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages8/newHome/newHome_02.png'}}"></image>
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages8/newHome/newHome_03.png'}}"></image>
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages8/newHome/newHome_04.png'}}"></image>
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages8/newHome/newHome_05.png'}}"></image>
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages8/newHome/newHome_06.png'}}"></image>
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages8/newHome/newHome_07.png'}}"></image>
<image style="width:750rpx;height:493rpx;" src="{{imgUrl+'/newImages8/newHome/newHome_08.png'}}"></image>
</view>
<view class="videoGroup" bindtap="playVideo">
<image class="newImages2-108" animation="{{playBtnDeg}}" src="{{imgUrl+'/newImages8/10.png'}}"></image>
@@ -20,7 +21,7 @@
</view>
<image class="computeBtn" bindtap="compute" src="{{imgUrl+'/newImages7/19.png'}}"></image>
<!-- <image class="newImages2-11" bindtap="placingControl" wx:if="{{!buyState}}" src="{{imgUrl+'/newImages8/5.png'}}"></image> -->
<image class="newImages2-11" bindtap="placingControl" src="{{imgUrl+'/newImages8/5.png'}}"></image>
<image class="newImages2-11" bindtap="placingControl" wx:if="{{!buyState || drawNum}}" src="{{imgUrl+'/newImages8/5.png'}}"></image>
<image class="newImages2-12" bindtap="lookConfigure" src="{{imgUrl+'/newImages2/98.png'}}"></image>
<image class="newImages2-13" bindtap="vrLookCar" src="{{imgUrl+'/newImages2/99.png'}}"></image>
<swiper class="swiper1" bindchange="swiperChange" data-num="1" current="{{swiperGroup.one.current}}">

+ 5
- 4
496_dongfengqichen/pages/lookPrizeDetail/lookPrizeDetail.wxml 查看文件

@@ -2,11 +2,12 @@
<view class="all">
<view class="main">
<view class="titleText">兑换详情</view>
<view class="lineSty"></view>
<view class="lineSty" wx:if="{{lookIndex.awardId!=19 && lookIndex.awardId!=20 && lookIndex.awardId!=23}}"></view>
<image class="closeXieyi" bindtap="closeXieyi" src="{{imgUrl+'/images/closeXieyi.png'}}"></image>
<view wx:if="{{lookIndex.awardId<6}}" style="position: relative;">
<image src="{{imgUrl+'/newImages3/prizeDetail2/'+lookIndex.awardId+'.png'}}" style="width:750rpx;" mode="widthFix"></image>
<image class="confirm" bindtap="closeXieyi" src="{{imgUrl+'/newImages3/35.png'}}"></image>
<view wx:if="{{lookIndex.awardId<6 || lookIndex.awardId==19 || lookIndex.awardId==20 || lookIndex.awardId==23}}" style="position: relative;">
<image wx:if="{{lookIndex.awardId==19 || lookIndex.awardId==20 || lookIndex.awardId==23}}" src="{{imgUrl+'/newImages3/prizeDetail2/'+lookIndex.awardId+'.jpg'}}" style="width:750rpx;" mode="widthFix"></image>
<image wx:if="{{lookIndex.awardId<6}}" src="{{imgUrl+'/newImages3/prizeDetail2/'+lookIndex.awardId+'.png'}}" style="width:750rpx;" mode="widthFix"></image>
<image class="confirm" wx:if="{{lookIndex.awardId!=19 && lookIndex.awardId!=20 && lookIndex.awardId!=23}}" bindtap="closeXieyi" src="{{imgUrl+'/newImages3/35.png'}}"></image>
</view>
<view wx:if="{{lookIndex.awardId == 6 || lookIndex.awardId == 7 || lookIndex.awardId == 8 || lookIndex.awardId == 18}}">
<image src="{{imgUrl+'/newImages3/prizeDetail2/'+lookIndex.awardId+'_1.png'}}" style="width:750rpx;" mode="widthFix"></image>

+ 3
- 2
496_dongfengqichen/pages/luckyStar/luckyStar.js 查看文件

@@ -39,7 +39,8 @@ Page({
isAddress:false,//是否有地址
configure:{
page:1,
count:10
count:10,
awardSource:1
},
gameAwardList:"",
gameAwardListArr:"",
@@ -573,7 +574,7 @@ Page({
})
},
getBuyState: function () {//查询是否已下订
app.wxRequest(app.globalData.urlRoot + "wxPay/getBuyState", {source:2}, res => {
app.wxRequest(app.globalData.urlRoot + "wxPay/v3/getLuckyTokenList", {source:2}, res => {
if (res.code == 200) {
if (res.data) {
this.setData({

+ 24
- 12
496_dongfengqichen/pages/myCenter/myCenter.js 查看文件

@@ -79,6 +79,7 @@ Page({
starMoveShow:false,
cash1Show:false,
cash2Show:false,
fanShow:false,
lookPrizeDetail:false,
lookIndex:null,
buyStateCouponCode:"",
@@ -416,6 +417,8 @@ Page({
app.wxRequest(app.globalData.urlRoot +"/bag/getMyCouponList",this.data.parames3,res=>{
wx.hideLoading();
if(res.code==200){
// res.data.list[3].couponId = "186618";
// res.data.list[3].couponCode = "186618";
if(res.data){
for(let i=0;i<res.data.list.length;i++){
this.data.couponList.push(res.data.list[i]);
@@ -825,23 +828,25 @@ Page({
wx.showLoading({
title: '获取数据中'
})
this.data.parames2.awardSource = this.data.recordNow;
this.data.parames2.awardSource = this.data.recordNow==2?4:this.data.recordNow;
app.wxRequest(app.globalData.urlRoot + "award/getMyAwardList", this.data.parames2, res => {
wx.hideLoading();
if(res.code == 200){
// res.data[0].awardState = 0;
// res.data = this.data.testData;
// res.data = [{
// awardDetailPicContentHeight: 0,
// awardName: "500元现金", //奖品名称
// awardPicurl: "https://xingb.venucia.com/award/10_1.png",//奖品小图
// couponCode: "我是卡号",//卡号
// couponSecret:"我是卡密",//卡密
// dead_date:"我是有效期",//有效期
// awardState: 1,
// cdate: "2020-03-23",
// awardId: 16
// }]
// res.data = [
// {
// awardDetailPicContentHeight: 0,
// awardName: "九阳破壁机", //奖品名称
// awardPicurl: "https://xingb.venucia.com/award/10_1.png",//奖品小图
// couponCode: "我是卡号",//卡号
// couponSecret:"我是卡密",//卡密
// dead_date:"我是有效期",//有效期
// awardState: 1,
// cdate: "2020-03-23",
// awardId: 15
// }
// ]
// if(this.data.parames2.page<3){
// for(let i=0;i<20;i++){
// res.data.push(res.data[0])
@@ -1037,6 +1042,8 @@ Page({
this.cashHide1();
}else if(this.data.couponList[index].couponId=="185382"){
this.cashHide2();
}else if(this.data.couponList[index].couponId=="186618"){
this.fanHide();
}
},
vipDetailHide:function(){
@@ -1069,6 +1076,11 @@ Page({
cash2Show:!this.data.cash2Show
})
},
fanHide:function(){
this.setData({
fanShow:!this.data.fanShow
})
},
cardCodeCopy:function(){
this.contentCopy(this.data.couponListCode);
},

+ 29
- 0
496_dongfengqichen/pages/myCenter/myCenter.wxml 查看文件

@@ -229,6 +229,26 @@
</view>
<image class="orderCard" data-index="{{index}}" bindtap="vipDetailControl" src="{{imgUrl+'/newImages3/48.png'}}"></image>
</view>
<view class="placingOrder" wx:if="{{item.couponId=='185382'}}">
<view style="display:flex;align-items:center;">
<image class="orderHead" src="https://xingb.venucia.com/award/17_1.png" mode="aspectFit"></image>
<view style="margin-left:15rpx;margin-right:101rpx;">
<view class="cardTitle">1000元现金卡</view>
<view class="cardCtime">{{item.cdate}}</view>
</view>
</view>
<image class="orderCard" data-index="{{index}}" bindtap="vipDetailControl" src="{{imgUrl+'/newImages3/48.png'}}"></image>
</view>
<view class="placingOrder" wx:if="{{item.couponId=='186618'}}">
<view style="display:flex;align-items:center;">
<image class="orderHead" src="{{imgUrl+'/newImages8/19.png'}}" mode="aspectFit"></image>
<view style="margin-left:15rpx;margin-right:101rpx;">
<view class="cardTitle">SOLOVE素乐 超静音小风扇</view>
<view class="cardCtime">{{item.cdate}}</view>
</view>
</view>
<image class="orderCard" data-index="{{index}}" bindtap="vipDetailControl" src="{{imgUrl+'/newImages3/48.png'}}"></image>
</view>
</view>
</view>
</scroll-view>
@@ -343,6 +363,15 @@
</view>
<view class="cardCode" style="left:170rpx;top:400rpx;color:white;" wx:if="{{couponListCode}}">{{couponListCode}}<view bindtap="cardCodeCopy" class="cardCodeCopy">复制</view></view>
</view>
<view class="prizeDesc" style="background-color:white;display:block;overflow:auto;" wx:if="{{fanShow}}">
<view class="titleText">查看详情</view>
<view class="lineSty"></view>
<image class="closeXieyi" bindtap="fanHide" src="{{imgUrl+'/images/closeXieyi.png'}}"></image>
<view style="position:relative;">
<image style="width:750rpx;height:4926rpx;" src="{{imgUrl+'/newImages8/20.png'}}"></image>
</view>
<view class="cardCode" style="left:auto;right:20rpx;top:785rpx;color:white;font-size:24rpx;" wx:if="{{couponListCode}}">{{couponListCode}}<view bindtap="cardCodeCopy" class="cardCodeCopy">复制</view></view>
</view>
</view>
<view class="ruleFrame ruleFrame2" wx:if="{{tipWindow2}}">
<view class="tipWindowRule">

+ 8
- 8
496_dongfengqichen/pages/orderActivity/orderActivity.js 查看文件

@@ -276,7 +276,7 @@ Component({
package: res.data.jsSubmit.package,
paySign: res.data.jsSubmit.paySign,
success:(option)=>{
this.paySuccess(res.data.trade_id);
this.paySuccess();
},
fail: (option) => {
this.data.appointment = true;
@@ -296,16 +296,16 @@ Component({
}, this, "POST")
},
paySuccess: function (e) {//支付成功
// app.wxRequest(app.globalData.urlRoot + "wxPay/paySuccess", { source:2,trade_id:e},res=>{
// app.wxRequest(app.globalData.urlRoot + "wxPay/buyStateTime", { source:2,trade_id:e},res=>{
// if(res.code==200){
wx.showToast({
title: '下订成功',
mask:true
})
// wx.showToast({
// title: '下订成功',
// mask:true
// })
app.globalData.getBuyState = {};
app.globalData.getBuyState.success = true;
app.globalData.getBuyState.cdate = "2020-06-05";
app.globalData.getBuyState.coupon_code = "123456";
// app.globalData.getBuyState.cdate = "2020-06-05";
// app.globalData.getBuyState.coupon_code = "123456";
// app.globalData.getBuyState.cdate = res.data.cdate;
// app.globalData.getBuyState.coupon_code = res.data.coupon_code;
setTimeout(()=>{

+ 1
- 1
496_dongfengqichen/pages/orderActivity/orderActivity.wxml 查看文件

@@ -82,7 +82,7 @@
<image class="closeTip" bindtap="tipShowControl" src="{{imgUrl+'/newImages4/15.png'}}"></image>
<image class="tipGroupBg" src="{{imgUrl+'/newImages8/7.png'}}"></image>
<view class="tipGroupContent">
<image class="tipGroupContentImg" src="{{imgUrl+'/newImages8/8.png'}}"></image>
<image class="tipGroupContentImg" src="{{imgUrl+'/newImages8/8.png?v=002'}}"></image>
<!-- <image class="tipGroupContentBtn" bindtap="tipShowControl2" src="{{imgUrl+'/newImages4/14.png'}}"></image> -->
</view>
</view>

+ 1
- 1
496_dongfengqichen/pages/orderActivity/orderActivity.wxss 查看文件

@@ -244,7 +244,7 @@
}
.tipGroupContentImg{
width: 601rpx;
height: 1949rpx;
height: 2061rpx;
margin: 0 auto;
}
.tipGroupContentBtn{

+ 107
- 17
496_dongfengqichen/pages/rotaryDraw/rotaryDraw.js 查看文件

@@ -1,12 +1,14 @@
// pages/rotaryDraw/rotaryDraw.js
const app = getApp()
let timekeeping = true;
let dataList = [
{prizeName:"华为P40",nickName:"啦啦啦"},
{prizeName:"小米扫拖机器人",nickName:"啦啦啦"},
{prizeName:"小米空调",nickName:"啦啦啦"},
{prizeName:"九阳破壁机",nickName:"啦啦啦"},
{prizeName:"USMILE电动牙刷",nickName:"啦啦啦"},
{awardName:"华为P40",nickName:"啦啦啦"},
{awardName:"小米扫拖机器人",nickName:"啦啦啦"},
{awardName:"小米空调",nickName:"啦啦啦"},
{awardName:"九阳破壁机",nickName:"啦啦啦"},
{awardName:"USMILE电动牙刷",nickName:"啦啦啦"},
]
let btnOpen = false;//是否正在抽奖
Page({

/**
@@ -24,8 +26,12 @@ Page({
ani4:null
},
page:1,
count:5,
drawAni:null
count:20,
drawAni:null,
prizeShow2:false,//是否显示未中奖
awardId:0,//中奖id
addressShow:false,
isAddress:false,//是否有地址
},

/**
@@ -39,7 +45,8 @@ Page({
}
},
loadFun() {
// this.getRecordData();
this.getRecordData();
this.getAddress();
},

/**
@@ -67,7 +74,7 @@ Page({
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
timekeeping = false;
},

/**
@@ -91,14 +98,14 @@ Page({
return app.sharePack();
},
getRecordData(){//获取中将记录数据
return;
app.wxRequest(app.globalData.urlRoot + "", {}, res => {
app.wxRequest(app.globalData.urlRoot + "award/getGameAwardList", {page:this.data.page,count:this.data.count,awardSource:4}, res => {
if (res.code == 200 && res.data) {
this.data.totalNum = res.total;
for(let i=0;i<res.data.length;i++){
this.data.recordDataAll.push(res.data[i]);
}
if(this.data.page==1){
timekeeping = true;
for(let i=1;i<=4;i++){
setTimeout(()=>{
this.aniFun(4000,"-40rpx","ani"+i);
@@ -109,6 +116,7 @@ Page({
}, this)
},
aniFun(duration,top,that,loop = true){
if(!timekeeping) return;
var animation = wx.createAnimation({
duration: duration
});
@@ -119,7 +127,7 @@ Page({
this.data.page++;
this.getRecordData();
}
this.data.ani[that].recordText = "恭喜"+this.data.recordDataAll[this.data.recordNowNum].nickName+"获得"+this.data.recordDataAll[this.data.recordNowNum].prizeName;
this.data.ani[that].recordText = "恭喜"+this.data.recordDataAll[this.data.recordNowNum].nickName+"获得"+this.data.recordDataAll[this.data.recordNowNum].awardName;
if(this.data.recordNowNum+1<this.data.recordDataAll.length){
this.data.recordNowNum++;
}else{
@@ -139,7 +147,20 @@ Page({
}
},
startDraw(){//开始抽奖
this.drawAniFun(2000,360);
// this.drawAniFun(5500,660);
// return;
if(!app.globalData.luckyTokenList.length){
wx.showToast({
title: '抽奖次数不足',
icon:"none"
})
return;
}
if(btnOpen){
return;
}
btnOpen=true;
this.getLucky();
},
drawAniFun(duration,rotate,loop=true){
var animation = wx.createAnimation({
@@ -149,10 +170,79 @@ Page({
this.setData({
drawAni:animation.export()
})
if(loop){
setTimeout(()=>{
this.drawAniFun(2000,rotate+360);
},duration)
},
getLucky(){
app.wxRequest(app.globalData.urlRoot + "wxPay/v3/getLucky", {token:app.globalData.luckyTokenList[0].token}, res => {
console.log(res);
if (res.code == 200) {
app.globalData.luckyTokenList.splice(0,1);
// res.data.lucky = true;
// res.data.awardData = {};
// res.data.awardData.awardId = 19
if(res.data.lucky){
let timeNum = 0;
let timeRotate = 0;
if(res.data.awardData.awardId==19){
timeNum = 3500;
timeRotate = 420;
}else if(res.data.awardData.awardId==20){
timeNum = 4000;
timeRotate = 480;
}else if(res.data.awardData.awardId==23){
timeNum = 5000;
timeRotate = 600;
}
this.drawAniFun(timeNum,timeRotate);
setTimeout(() => {
this.setData({
awardId:res.data.awardData.awardId
})
}, timeNum+400);
}else{
//1 0.12
this.drawAniFun(5500,660);
setTimeout(() => {
btnOpen = false;
this.prizeControl2();
}, 6600+400);
}
console.log(app.globalData.luckyTokenList);
}else{
btnOpen = false;
wx.showToast({
title: res.msg,
icon:"none"
})
}
}, this)
},
prizeControl2(){//控制获奖弹窗显示状态
this.setData({
prizeShow2:!this.data.prizeShow2
})
},
backPage(){
wx.navigateBack({
delta:1
})
},
addressControl(){//立即领取
this.setData({
addressShow: !this.data.addressShow
})
if (this.data.addressShow) {
app.globalData.skipType = 'mycenter';
}
},
getAddress: function () {//获取地址
app.wxRequest(app.globalData.urlRoot + "address/getAddressV2", {}, res => {
if (res.code == 200) {
if (res.data) {
this.setData({
isAddress:true
})
}
}
}, this)
}
})

+ 1
- 0
496_dongfengqichen/pages/rotaryDraw/rotaryDraw.json 查看文件

@@ -1,6 +1,7 @@
{
"navigationBarTitleText": "幸运大转盘",
"usingComponents": {
"userMsg": "/pages/userMsg/userMsg",
"tabBar": "../component/tabBar/index"
}
}

+ 17
- 1
496_dongfengqichen/pages/rotaryDraw/rotaryDraw.wxml 查看文件

@@ -5,7 +5,8 @@
<view class="gameFrame">
<view class="gameGroup">
<image class="gameDial" animation="{{drawAni}}" src="{{imgUrl+'/newImages8/14.png'}}"></image>
<image class="gamePointer" bindtap="startDraw" src="{{imgUrl+'/newImages8/13.png'}}"></image>
<!-- <image class="gamePointer" bindtap="startDraw" src="{{imgUrl+'/newImages8/13.png'}}"></image> -->
<image class="gamePointer2" bindtap="startDraw" src="{{imgUrl+'/newImages8/13_2.png'}}"></image>
</view>
</view>
<view class="recordFrame">
@@ -21,6 +22,21 @@
</view>
</view>
</view>
<view class="ruleMask" wx:if="{{prizeShow2}}">
<view class="ruleGroup" style="width:570rpx;height:556rpx;">
<image style="width:100%;height:100%;" src="{{imgUrl+'/newImages8/18.png?v=002'}}"></image>
<image class="closeRule" style="top:-30rpx;right:-30rpx;" src="{{imgUrl+'/newImages8/3.png'}}" bindtap="backPage"></image>
<view class="getNow" bindtap="backPage"></view>
</view>
</view>
<view class="ruleMask" wx:if="{{awardId}}">
<view class="ruleGroup" style="width:570rpx;height:557rpx;">
<image style="width:100%;height:100%;" src="{{imgUrl+'/newImages8/award/'+awardId+'.png'}}"></image>
<image class="closeRule" style="top:-30rpx;right:-30rpx;" src="{{imgUrl+'/newImages8/3.png'}}" bindtap="backPage"></image>
<image class="getNow" wx:if="{{!isAddress}}" bindtap="addressControl" src="{{imgUrl+'/newImages8/award/btns.png'}}"></image>
</view>
</view>
</view>
<userMsg bindaddress="addressControl" wx:if="{{addressShow}}"></userMsg>
<tabBar></tabBar>
</view>

+ 50
- 1
496_dongfengqichen/pages/rotaryDraw/rotaryDraw.wxss 查看文件

@@ -8,6 +8,7 @@ view{
.main{
height: calc(100vh - 120rpx);
overflow: auto;
overflow-x: hidden;
position: relative;
}
.pageBg{
@@ -34,12 +35,19 @@ view{
}
.gamePointer{
position: absolute;
top: 207rpx;
top: 200rpx;
left: 50%;
transform: translateX(-50%);
width: 119rpx;
height: 181rpx;
}
.gamePointer2{
position: absolute;
top: 270rpx;
left: 270rpx;
width: 119rpx;
height: 120rpx;
}
.recordFrame{
position: absolute;
top: 0;
@@ -66,4 +74,45 @@ view{
height: 40rpx;
line-height: 40rpx;
color: white;
}
.ruleMask{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: calc(100vh - 120rpx);
background-color: rgba( 000, 000, 000, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 99;
}
.ruleGroup{
position: relative;
width: 641rpx;
height: 995rpx;
}
.closeRule{
position: absolute;
top: -27rpx;
right: -28rpx;
width: 38rpx;
height: 37rpx;
}
.getNow{
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 435rpx;
width: 366rpx;
height: 56rpx;
}
.gameDialAni{
animation:rotateAni 3s linear infinite;
}
@keyframes rotateAni
{
0% {rotate:0;}
100% {rotate:360deg;}
100% {rotate:0;}
}

+ 32
- 3
496_dongfengqichen/pages/yuyue/yuyue.js 查看文件

@@ -16,6 +16,7 @@ Component({
*/
data: {
prizeShow:false,//是否显示获奖弹窗
prizeShow2:false,//是否显示未获奖弹窗
ruleShow:true,//是否显示规则
imgUrl: app.globalData.urlStatic,//图片路径
agreement:false,
@@ -44,6 +45,8 @@ Component({
scene: app.globalData.sceneSource
},
mobileType:2,
addressShow:false,
isAddress:false,//是否有地址
userData:null
},
ready:function(){
@@ -87,6 +90,7 @@ Component({
})
}
this.getUserLocation();//获取用户当前位置
this.getAddress();
},
getDistributorList: function (longitude, latitude) {//获取经销商列表
app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude }, res => {
@@ -225,7 +229,11 @@ Component({
})
return;
}
this.prizeControl();
if(res.data.awardResult){
this.prizeControl();
}else{
this.prizeControl2();
}
// wx.showToast({
// title: '预约成功',
// mask:true
@@ -367,8 +375,29 @@ Component({
prizeShow:!this.data.prizeShow
})
},
getNow(){//立即领取

prizeControl2(){//控制获奖弹窗显示状态
this.setData({
prizeShow2:!this.data.prizeShow2
})
},
addressControl(){//立即领取
this.setData({
addressShow: !this.data.addressShow
})
if (this.data.addressShow) {
app.globalData.skipType = 'mycenter';
}
},
getAddress: function () {//获取地址
app.wxRequest(app.globalData.urlRoot + "address/getAddressV2", {}, res => {
if (res.code == 200) {
if (res.data) {
this.setData({
isAddress:true
})
}
}
}, this)
}
}
})

+ 1
- 0
496_dongfengqichen/pages/yuyue/yuyue.json 查看文件

@@ -1,6 +1,7 @@
{
"component": true,
"usingComponents": {
"userMsg": "/pages/userMsg/userMsg",
"agreement": "/pages/agreement/agreement"
}
}

+ 11
- 3
496_dongfengqichen/pages/yuyue/yuyue.wxml 查看文件

@@ -65,11 +65,19 @@
</view>
</view>
<view class="ruleMask" wx:if="{{prizeShow}}">
<view class="ruleGroup" style="width:570rpx;height:558rpx;">
<image style="width:100%;height:100%;" src="{{imgUrl+'/newImages8/9.png'}}"></image>
<view class="ruleGroup" style="width:570rpx;height:556rpx;">
<image style="width:100%;height:100%;" src="{{imgUrl+'/newImages8/17.png'}}"></image>
<image class="closeRule" style="top:-30rpx;right:-30rpx;" src="{{imgUrl+'/newImages8/3.png'}}" bindtap="closeXieyi"></image>
<view class="getNow" bindtap="getNow"></view>
<image class="getNow" wx:if="{{!isAddress}}" bindtap="addressControl" src="{{imgUrl+'/newImages8/16.png'}}"></image>
</view>
</view>
<view class="ruleMask" wx:if="{{prizeShow2}}">
<view class="ruleGroup" style="width:570rpx;height:556rpx;">
<image style="width:100%;height:100%;" src="{{imgUrl+'/newImages8/18.png'}}"></image>
<image class="closeRule" style="top:-30rpx;right:-30rpx;" src="{{imgUrl+'/newImages8/3.png'}}" bindtap="closeXieyi"></image>
<view class="getNow" bindtap="closeXieyi"></view>
</view>
</view>
<userMsg bindaddress="addressControl" wx:if="{{addressShow}}"></userMsg>
<agreement bindmyevent="agreementControl" wx:if="{{agreement}}"></agreement>
</view>

+ 3
- 3
496_dongfengqichen/pages/yuyue/yuyue.wxss 查看文件

@@ -170,7 +170,7 @@
.ruleGroup{
position: relative;
width: 641rpx;
height: 995rpx;
height: 1028rpx;
}
.closeRule{
position: absolute;
@@ -184,6 +184,6 @@
left: 50%;
transform: translateX(-50%);
top: 435rpx;
width: 368rpx;
height: 60rpx;
width: 366rpx;
height: 56rpx;
}

Loading…
取消
儲存