//app.js | //app.js | ||||
App({ | App({ | ||||
onLaunch: function (options) { | onLaunch: function (options) { | ||||
console.log(options); | |||||
this.globalData.sceneSource = options.scene; | this.globalData.sceneSource = options.scene; | ||||
if (options.referrerInfo && options.referrerInfo.extraData && options.referrerInfo.extraData.source) { | if (options.referrerInfo && options.referrerInfo.extraData && options.referrerInfo.extraData.source) { | ||||
this.globalData.sceneSource = options.referrerInfo.extraData.source; | this.globalData.sceneSource = options.referrerInfo.extraData.source; | ||||
myCenter:false, | myCenter:false, | ||||
guessPrize:false, | guessPrize:false, | ||||
everyday:false | everyday:false | ||||
}, | |||||
getSecondGuessInfo:{//第二轮价格竞猜信息 | |||||
secondData:null, | |||||
firstData:null | |||||
} | } | ||||
}, | }, | ||||
// 获取openId | // 获取openId |
"pages/vrLookCar/vrLookCar", | "pages/vrLookCar/vrLookCar", | ||||
"pages/configure/configure", | "pages/configure/configure", | ||||
"pages/guess/guess", | "pages/guess/guess", | ||||
"pages/guessPrize/guessPrize" | |||||
"pages/guessPrize/guessPrize", | |||||
"pages/guessSecond/guessSecond", | |||||
"pages/perfectMsg/perfectMsg", | |||||
"pages/guessPoster/guessPoster", | |||||
"pages/guessSecondPrize/guessSecondPrize" | |||||
], | ], | ||||
"window": { | "window": { | ||||
"backgroundTextStyle": "light", | "backgroundTextStyle": "light", |
data: { | data: { | ||||
imgUrl: app.globalData.urlStatic,//图片路径 | imgUrl: app.globalData.urlStatic,//图片路径 | ||||
yuyueShow:false, | yuyueShow:false, | ||||
userType:1, | |||||
isShowFun:false, | |||||
tipWindow2:false | |||||
}, | }, | ||||
/** | /** | ||||
if (!app.globalData.addPageEnterState.guessPrize) { | if (!app.globalData.addPageEnterState.guessPrize) { | ||||
app.addPageEnter("7C8AAA38F8D85EFC48C2995FB6EBAC19"); | app.addPageEnter("7C8AAA38F8D85EFC48C2995FB6EBAC19"); | ||||
app.globalData.addPageEnterState.guessPrize = true; | app.globalData.addPageEnterState.guessPrize = true; | ||||
this.tipWindowControl2(); | |||||
} | } | ||||
this.getSecondGuessInfo(); | |||||
}, | }, | ||||
/** | /** | ||||
* 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
* 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
*/ | */ | ||||
onShow: function () { | onShow: function () { | ||||
// if(app.globalData.getSecondGuessInfo.firstData){ | |||||
// this.data.userType = 1; | |||||
// } | |||||
if(this.data.isShowFun){ | |||||
var getSecondGuessInfo = app.globalData.getSecondGuessInfo; | |||||
var userType = 1; | |||||
if(getSecondGuessInfo.secondData){ | |||||
userType = 1; | |||||
// console.log("查看第二轮价格") | |||||
}else if(!getSecondGuessInfo.firstData && !getSecondGuessInfo.secondData){ | |||||
userType = 2; | |||||
// console.log("开始竞猜"); | |||||
}else if(getSecondGuessInfo.firstData.lucky_result==-1){ | |||||
userType = 3; | |||||
// console.log("调整价格"); | |||||
}else{ | |||||
userType = 4; | |||||
// console.log("去抽大奖"); | |||||
} | |||||
this.setData({ | |||||
userType:userType | |||||
}) | |||||
} | |||||
}, | }, | ||||
/** | /** | ||||
* 用户点击右上角分享 | * 用户点击右上角分享 | ||||
*/ | */ | ||||
onShareAppMessage: function () { | onShareAppMessage: function () { | ||||
return { | |||||
title: '召唤预言帝!快来和我一起猜启辰星售价,赢升舱大奖!', | |||||
imageUrl:this.data.imgUrl+'/newImages5/56.jpg', | |||||
path: "/pages/guess/guess" | |||||
} | |||||
}, | }, | ||||
enterLucky:function(){//每日抽奖 | enterLucky:function(){//每日抽奖 | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
}) | }) | ||||
}, | }, | ||||
enterGuessPrize:function(){//开始竞猜 | enterGuessPrize:function(){//开始竞猜 | ||||
wx.navigateTo({ | |||||
url: '/pages/guessPrize/guessPrize' | |||||
if(this.data.userType == 1 || this.data.userType == 2){ | |||||
wx.navigateTo({ | |||||
url: '/pages/guessSecondPrize/guessSecondPrize' | |||||
}) | |||||
}else if(this.data.userType == 3){ | |||||
wx.navigateTo({ | |||||
url: '/pages/guessSecond/guessSecond?type=1' | |||||
}) | |||||
}else{ | |||||
wx.navigateTo({ | |||||
url: '/pages/guessSecond/guessSecond?type=2' | |||||
}) | |||||
} | |||||
}, | |||||
getSecondGuessInfo:function(){ | |||||
app.wxRequest(app.globalData.urlRoot + "guessPrice/getSecondGuessInfo", {}, res => { | |||||
if (res.code == 200) { | |||||
app.globalData.getSecondGuessInfo = res.data; | |||||
// if(res.data.secondData || !res.data.firstData){ | |||||
// this.data.userType = 1; | |||||
// }else if(res.data.firstData.lucky_result==-1){ | |||||
// this.data.userType = 2; | |||||
// }else{ | |||||
// this.data.userType = 3; | |||||
// } | |||||
var userType = 1; | |||||
if(res.data.secondData){ | |||||
userType = 1; | |||||
// console.log("查看第二轮价格") | |||||
}else if(!res.data.firstData && !res.data.secondData){ | |||||
userType = 2; | |||||
// console.log("开始竞猜"); | |||||
}else if(res.data.firstData.lucky_result==-1){ | |||||
userType = 3; | |||||
// console.log("调整价格"); | |||||
}else{ | |||||
userType = 4; | |||||
// console.log("去抽大奖"); | |||||
} | |||||
this.setData({ | |||||
userType:userType, | |||||
isShowFun:true | |||||
}) | |||||
} | |||||
}, this); | |||||
}, | |||||
tipWindowControl2:function(){ | |||||
this.setData({ | |||||
tipWindow2:!this.data.tipWindow2 | |||||
}) | }) | ||||
} | } | ||||
}) | }) |
{ | { | ||||
"navigationBarTitleText": "猜出惊喜", | |||||
"navigationBarTitleText": "东风启辰“猜出惊喜”", | |||||
"usingComponents": { | "usingComponents": { | ||||
"tabBar": "../component/tabBar/index", | "tabBar": "../component/tabBar/index", | ||||
"yuyue": "/pages/yuyue/yuyue" | "yuyue": "/pages/yuyue/yuyue" |
<view class="all"> | <view class="all"> | ||||
<view class="main"> | <view class="main"> | ||||
<image class="pageBg" src="{{imgUrl+'/newImages4/20.png'}}"></image> | <image class="pageBg" src="{{imgUrl+'/newImages4/20.png'}}"></image> | ||||
<image class="gameRule" src="{{imgUrl+'/newImages4/17.png'}}"></image> | |||||
<image class="startBtn" bindtap="enterGuessPrize" src="{{imgUrl+'/versions/2.png?v=002'}}"></image> | |||||
<image class="gameRule" src="{{imgUrl+'/newImages5/76.png'}}"></image> | |||||
<image class="startBtn" bindtap="enterGuessPrize" wx:if="{{userType==1}}" src="{{imgUrl+'/newImages5/60.png'}}"></image> | |||||
<image class="startBtn" bindtap="enterGuessPrize" wx:if="{{userType==4}}" src="{{imgUrl+'/newImages5/61.png'}}"></image> | |||||
<image class="startBtn" bindtap="enterGuessPrize" wx:if="{{userType==3}}" src="{{imgUrl+'/newImages5/62.png'}}"></image> | |||||
<image class="startBtn" bindtap="enterGuessPrize" wx:if="{{userType==2}}" src="{{imgUrl+'/newImages5/63.png'}}"></image> | |||||
<image class="drawBtn" bindtap="enterLucky" src="{{imgUrl+'/versions/1.png'}}"></image> | <image class="drawBtn" bindtap="enterLucky" src="{{imgUrl+'/versions/1.png'}}"></image> | ||||
<image class="yuyue" bindtap="yuyueControl" src="{{imgUrl+'/newIcon/4.png'}}"></image> | <image class="yuyue" bindtap="yuyueControl" src="{{imgUrl+'/newIcon/4.png'}}"></image> | ||||
</view> | </view> | ||||
<view class="ruleFrame ruleFrame2" wx:if="{{tipWindow2}}"> | |||||
<view class="tipWindow"> | |||||
<image class="tipWindowBg" src="{{imgUrl+'/newImages5/77.png'}}"></image> | |||||
<image class="tipWindowClose" bindtap="tipWindowControl2" src="{{imgUrl+'/newImages4/27.png'}}"></image> | |||||
</view> | |||||
</view> | |||||
<yuyue bindyuyue="yuyueControl" wx:if="{{yuyueShow}}"></yuyue> | <yuyue bindyuyue="yuyueControl" wx:if="{{yuyueShow}}"></yuyue> | ||||
<tabBar></tabBar> | <tabBar></tabBar> | ||||
</view> | </view> |
} | } | ||||
.gameRule{ | .gameRule{ | ||||
width: 750rpx; | width: 750rpx; | ||||
height: 2362rpx; | |||||
height: 2513rpx; | |||||
margin-top: -1rpx; | margin-top: -1rpx; | ||||
} | } | ||||
.startBtn{ | .startBtn{ | ||||
position: fixed; | position: fixed; | ||||
right: 35rpx; | right: 35rpx; | ||||
top: 334rpx; | top: 334rpx; | ||||
} | |||||
.ruleFrame{ | |||||
position: fixed; | |||||
top:0; | |||||
left: 0; | |||||
height: calc(100vh - 120rpx); | |||||
overflow: auto; | |||||
} | |||||
.ruleFrame2{ | |||||
width: 100%; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
background-color: rgba(0,0,0,0.5); | |||||
z-index: 9; | |||||
} | |||||
.tipWindow{ | |||||
position: relative; | |||||
width: 501rpx; | |||||
height: 395rpx; | |||||
} | |||||
.tipWindowBg{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
.tipWindowClose{ | |||||
position: absolute; | |||||
top: -32rpx; | |||||
right: -32rpx; | |||||
width: 42rpx; | |||||
height: 42rpx; | |||||
} | } |
// pages/guessPoster/guessPoster.js | |||||
const app = getApp() | |||||
let _savePostBg = "";//用于绘制海报的背景 | |||||
let _totalDownloadTask = 2;//绘制需要下载的图片总数 | |||||
let _currentSuccessDownloadTask = 0;//已完成下载的图片数 | |||||
let windowScale = 0;//屏幕缩放比 | |||||
let canvasContron = null;//canvas | |||||
let posterUrl = "";//合成后的海报路径 | |||||
let _saveImg = false; | |||||
Page({ | |||||
/** | |||||
* 页面的初始数据 | |||||
*/ | |||||
data: { | |||||
imgUrl: app.globalData.urlStatic,//图片路径 | |||||
selectType:1,//选中的分享类型 | |||||
userPrice:0,//用户竞猜价格 | |||||
userName:"",//用户昵称 | |||||
qrCodeUrl:"",//用户二维码 | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面加载 | |||||
*/ | |||||
onLoad: function (options) { | |||||
app.globalData.nowPage = 3; | |||||
this.setData({ | |||||
userName:app.globalData.userInfoData.nickName, | |||||
userPrice:app.globalData.getSecondGuessInfo.secondData.guess_price | |||||
}) | |||||
}, | |||||
loadFun:function(){ | |||||
this.getGuessPriceQrCode(); | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面初次渲染完成 | |||||
*/ | |||||
onReady: function () { | |||||
canvasContron = wx.createCanvasContext('myCanvas'); | |||||
if (app.globalData.openid) { | |||||
this.loadFun(); | |||||
} else { | |||||
app.globalData.openidSuccessFuc = this.loadFun; | |||||
} | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面显示 | |||||
*/ | |||||
onShow: function () { | |||||
_totalDownloadTask = 2; | |||||
_currentSuccessDownloadTask = 0; | |||||
_saveImg = false; | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面隐藏 | |||||
*/ | |||||
onHide: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面卸载 | |||||
*/ | |||||
onUnload: function () { | |||||
}, | |||||
/** | |||||
* 页面相关事件处理函数--监听用户下拉动作 | |||||
*/ | |||||
onPullDownRefresh: function () { | |||||
}, | |||||
/** | |||||
* 页面上拉触底事件的处理函数 | |||||
*/ | |||||
onReachBottom: function () { | |||||
}, | |||||
/** | |||||
* 用户点击右上角分享 | |||||
*/ | |||||
onShareAppMessage: function () { | |||||
return { | |||||
title: '召唤预言帝!快来和我一起猜启辰星售价,赢升舱大奖!', | |||||
imageUrl:this.data.imgUrl+'/newImages5/56.jpg', | |||||
path: "/pages/guess/guess" | |||||
} | |||||
}, | |||||
changeType:function(){//切换分享类型 | |||||
this.setData({ | |||||
selectType:this.data.selectType==1?2:1 | |||||
}) | |||||
}, | |||||
getGuessPriceQrCode:function(){//获取竞猜分享小程序码 | |||||
app.wxRequest(app.globalData.urlRoot + "guessPrice/getGuessPriceQrCode", {}, res => { | |||||
if (res.code == 200) { | |||||
this.setData({ | |||||
qrCodeUrl:res.data.qrcodeUrl | |||||
}) | |||||
this.cacheFun(); | |||||
} | |||||
}, this); | |||||
}, | |||||
cacheFun:function(){ | |||||
wx.getSystemInfo({ | |||||
success: option => { | |||||
windowScale = option.windowWidth / 750; | |||||
wx.getImageInfo({//缓存海报背景 | |||||
src: this.data.imgUrl + '/newImages5/66.png', | |||||
success: res => { | |||||
_savePostBg = res.path; | |||||
_currentSuccessDownloadTask ++; | |||||
this.posterDrawing(); | |||||
} | |||||
}) | |||||
wx.getImageInfo({//缓存二维码 | |||||
src: this.data.qrCodeUrl, | |||||
success: res => { | |||||
this.data.qrCodeUrl = res.path; | |||||
_currentSuccessDownloadTask++; | |||||
this.posterDrawing(); | |||||
} | |||||
}) | |||||
} | |||||
}) | |||||
}, | |||||
posterDrawing: function (e) {//海报绘制 | |||||
//图片尚未下载完成,禁止绘制 | |||||
if(_currentSuccessDownloadTask < _totalDownloadTask){ | |||||
return; | |||||
} | |||||
var ctx = canvasContron;//canvas对象 | |||||
var scale = windowScale;//屏幕缩放比 | |||||
//背景 | |||||
ctx.drawImage(_savePostBg, 0, 0, scale * 750, scale * 1380); | |||||
//绘制文字 | |||||
ctx.setFontSize(scale * 33); | |||||
ctx.setFillStyle('#FFFFFF'); | |||||
ctx.setTextAlign('left'); | |||||
ctx.fillText(this.data.userName?'@'+this.data.userName:"@", scale * 128, scale *952); | |||||
ctx.setFontSize(scale * 27); | |||||
ctx.fillText("启辰星", scale * 128, scale *1006); | |||||
ctx.fillText("260T48V", scale * 218, scale *1006); | |||||
ctx.fillText("轻混增压星享版", scale * 336, scale *1006); | |||||
ctx.fillText("我的预测上市价为:", scale * 128, scale *1045); | |||||
ctx.fillText(this.data.userPrice, scale * 128, scale *1085); | |||||
ctx.fillText("元", scale * 228, scale *1085); | |||||
ctx.fillText("来和我一起竞猜吧!", scale * 128, scale *1125); | |||||
//二维码 | |||||
ctx.drawImage(this.data.qrCodeUrl, scale * 574, scale * 1223, scale * 130, scale * 130); | |||||
//绘制 | |||||
ctx.draw(false, setTimeout(() => { | |||||
wx.canvasToTempFilePath({ | |||||
width:scale*750, | |||||
height: scale * 1380, | |||||
canvasId: 'myCanvas', | |||||
success: res => { | |||||
posterUrl = res.tempFilePath; | |||||
if(_saveImg){ | |||||
this.savePic(); | |||||
} | |||||
} | |||||
}) | |||||
}, 300)); | |||||
}, | |||||
saveImg: function () {//保存到手机 | |||||
if (!posterUrl){ | |||||
wx.showLoading({ | |||||
title: '海报合成中', | |||||
mask:true | |||||
}) | |||||
_saveImg = true; | |||||
}else{ | |||||
this.savePic(); | |||||
} | |||||
}, | |||||
savePic: function () { | |||||
wx.hideLoading(); | |||||
wx.saveImageToPhotosAlbum({ | |||||
filePath: posterUrl, | |||||
success(res) { | |||||
wx.showToast({ | |||||
title: '保存成功' | |||||
}) | |||||
}, | |||||
fail: res => { | |||||
wx.getSetting({ | |||||
success: res => { | |||||
if (res.authSetting['scope.writePhotosAlbum']) { | |||||
wx.showToast({ | |||||
title: '保存失败', | |||||
icon: "none" | |||||
}) | |||||
} else { | |||||
wx.showModal({ | |||||
title: '授权设置', | |||||
content: '请授权“保存到相册”', | |||||
success: (opt) => { | |||||
if (opt.confirm) { | |||||
wx.openSetting({ | |||||
success: e => { | |||||
if (e.authSetting['scope.writePhotosAlbum']) { | |||||
wx.saveImageToPhotosAlbum({ | |||||
filePath: posterUrl, | |||||
success(res) { | |||||
wx.showToast({ | |||||
title: '保存成功' | |||||
}) | |||||
} | |||||
}) | |||||
} else { | |||||
wx.showToast({ | |||||
title: '授权失败', | |||||
icon: "none" | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
} | |||||
}) | |||||
} | |||||
}) |
{ | |||||
"navigationBarTitleText": "东风启辰“猜出惊喜”", | |||||
"usingComponents": { | |||||
"tabBar": "../component/tabBar/index" | |||||
} | |||||
} |
<!--pages/guessPoster/guessPoster.wxml--> | |||||
<view class="all"> | |||||
<view class="main"> | |||||
<view class="selectGroup"> | |||||
<image class="selectImg" wx:if="{{selectType==1}}" bindtap="changeType" src="{{imgUrl+'/newImages5/22.png'}}"></image> | |||||
<image class="selectImg" wx:if="{{selectType==2}}" bindtap="changeType" src="{{imgUrl+'/newImages5/23.png'}}"></image> | |||||
<view class="selectMask" style="left:{{selectType==1?0:'50%'}};"></view> | |||||
</view> | |||||
<view wx:if="{{selectType==1}}"> | |||||
<view class="posterGroup"> | |||||
<image class="posterImg" src="{{imgUrl+'/newImages5/52.png'}}"></image> | |||||
<view class="posterText" style="font-size:17rpx;">@{{userName}}</view> | |||||
<view class="posterText" style="display:flex;align-items:center;top:547rpx;"> | |||||
<view>启辰星</view> | |||||
<view style="font-weight:bold;"> 260T</view> | |||||
<view style="font-weight:bold;"> 48V</view> | |||||
<view>轻混增压星享版</view> | |||||
</view> | |||||
<view class="posterText" style="top:567rpx;">我的预测上市价为:</view> | |||||
<view class="posterText" style="display:flex;align-items:center;top:587rpx;"> | |||||
<view style="font-weight:bold;">{{userPrice}}</view> | |||||
<view>元</view> | |||||
</view> | |||||
<view class="posterText" style="top:607rpx;">来和我一起竞猜吧!</view> | |||||
<image class="posterCode" src="{{qrCodeUrl}}"></image> | |||||
</view> | |||||
<view class="bottomGroup"> | |||||
<image class="bottomImg" src="{{imgUrl+'/newImages5/64.png'}}"></image> | |||||
<view class="saveGroup"> | |||||
<image class="saveIcon" bindtap="saveImg" src="{{imgUrl+'/newImages5/26.png'}}"></image> | |||||
<image class="saveBtn" bindtap="saveImg" src="{{imgUrl+'/newImages5/27.png'}}"></image> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<view wx:if="{{selectType==2}}"> | |||||
<image class="linkShareImg" src="{{imgUrl+'/newImages5/53.png'}}"></image> | |||||
<view class="linkShareGroup"> | |||||
<image class="linkShareBg" src="{{imgUrl+'/newImages5/65.png'}}"></image> | |||||
<image class="linkShareBtn" src="{{imgUrl+'/newImages5/55.png'}}"></image> | |||||
<button open-type="share" style="width:268rpx;height:168rpx;min-height:0;" class="shareBtn"></button> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<canvas class="canvasDraw" canvas-id="myCanvas"></canvas> | |||||
<tabBar></tabBar> | |||||
</view> |
/* pages/guessPoster/guessPoster.wxss */ | |||||
image{ | |||||
display: block; | |||||
} | |||||
view{ | |||||
-webkit-overflow-scrolling: touch; | |||||
} | |||||
.main{ | |||||
height: calc(100vh - 120rpx); | |||||
overflow: auto; | |||||
position: relative; | |||||
} | |||||
.selectGroup{ | |||||
position: relative; | |||||
margin: 50rpx auto 70rpx; | |||||
width: 611rpx; | |||||
height: 71rpx; | |||||
} | |||||
.selectImg{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
.selectMask{ | |||||
position: absolute; | |||||
left: 0; | |||||
top: 0; | |||||
width: 50%; | |||||
height: 100%; | |||||
opacity: 0; | |||||
} | |||||
.posterGroup{ | |||||
position: relative; | |||||
width: 395rpx; | |||||
height: 750rpx; | |||||
margin: 0 auto; | |||||
} | |||||
.posterImg{ | |||||
width: 100%; | |||||
height:100%; | |||||
} | |||||
.bottomGroup{ | |||||
position: relative; | |||||
margin-top: 35rpx; | |||||
width: 750rpx; | |||||
height: 200rpx; | |||||
} | |||||
.bottomImg{ | |||||
position: absolute; | |||||
left: 0; | |||||
top: 0; | |||||
width: 750rpx; | |||||
height: 370rpx; | |||||
} | |||||
.saveGroup{ | |||||
position: absolute; | |||||
left: 0; | |||||
top: 0; | |||||
width: 100%; | |||||
height: 100%; | |||||
display: flex; | |||||
align-items: center; | |||||
flex-direction: column; | |||||
} | |||||
.saveIcon{ | |||||
width: 95rpx; | |||||
height: 96rpx; | |||||
margin-top: 30rpx; | |||||
margin-bottom: 15rpx; | |||||
} | |||||
.saveBtn{ | |||||
width: 267rpx; | |||||
height: 54rpx; | |||||
} | |||||
.linkShareImg{ | |||||
width: 462rpx; | |||||
height: 640rpx; | |||||
margin: 0 auto; | |||||
} | |||||
.linkShareGroup{ | |||||
position: relative; | |||||
width: 750rpx; | |||||
height: 464rpx; | |||||
margin-top: 44rpx; | |||||
} | |||||
.linkShareBg{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
.linkShareBtn{ | |||||
position: absolute; | |||||
left: 50%; | |||||
transform: translateX(-50%); | |||||
top: 123rpx; | |||||
width: 268rpx; | |||||
height: 168rpx; | |||||
} | |||||
.shareBtn{ | |||||
position: absolute; | |||||
left: 50%; | |||||
transform: translateX(-50%); | |||||
top: 123rpx; | |||||
margin: 0; | |||||
padding: 0; | |||||
opacity: 0; | |||||
width: 268rpx; | |||||
height: 168rpx; | |||||
} | |||||
.posterText{ | |||||
position: absolute; | |||||
left: 71rpx; | |||||
top: 520rpx; | |||||
line-height: 14rpx; | |||||
font-size:14rpx; | |||||
font-family:MHeiPRC; | |||||
font-weight:500; | |||||
color:rgba(255,255,255,1); | |||||
} | |||||
.posterCode{ | |||||
position: absolute; | |||||
right: 30rpx; | |||||
bottom: 21rpx; | |||||
width: 68rpx; | |||||
height: 68rpx; | |||||
} | |||||
.canvasDraw{ | |||||
width:1776rpx; | |||||
height:3268rpx; | |||||
position: fixed; | |||||
top: 0; | |||||
left: -1776rpx; | |||||
background-color: black; | |||||
} |
{ | { | ||||
"navigationBarTitleText": "猜出惊喜", | |||||
"navigationBarTitleText": "东风启辰“猜出惊喜”", | |||||
"disableScroll":true, | "disableScroll":true, | ||||
"usingComponents": { | "usingComponents": { | ||||
"tabBar": "../component/tabBar/index", | "tabBar": "../component/tabBar/index", |
<image class="versions-5" bindtap="enterLucky" style="margin-top:20rpx;" src="{{imgUrl+'/versions/6.png'}}"></image> | <image class="versions-5" bindtap="enterLucky" style="margin-top:20rpx;" src="{{imgUrl+'/versions/6.png'}}"></image> | ||||
</view> --> | </view> --> | ||||
<view class="ruleFrame" wx:if="{{ruleShow}}"> | <view class="ruleFrame" wx:if="{{ruleShow}}"> | ||||
<image class="gameRule" src="{{imgUrl+'/newImages4/17.png'}}"></image> | |||||
<image class="gameRule" src="{{imgUrl+'/newImages5/76.png'}}"></image> | |||||
<image class="closeRule" bindtap="ruleControl" src="{{imgUrl+'/versions/21.png'}}"></image> | <image class="closeRule" bindtap="ruleControl" src="{{imgUrl+'/versions/21.png'}}"></image> | ||||
</view> | </view> | ||||
<view class="shareWindow" wx:if="{{shareShow}}"> | <view class="shareWindow" wx:if="{{shareShow}}"> |
} | } | ||||
.gameRule{ | .gameRule{ | ||||
width: 750rpx; | width: 750rpx; | ||||
height: 2362rpx; | |||||
height: 2513rpx; | |||||
margin-top: -1rpx; | margin-top: -1rpx; | ||||
} | } | ||||
.closeRule{ | .closeRule{ |
// pages/guessSecond/guessSecond.js | |||||
const app = getApp(); | |||||
Page({ | |||||
/** | |||||
* 页面的初始数据 | |||||
*/ | |||||
data: { | |||||
imgUrl: app.globalData.urlStatic,//图片路径 | |||||
guessResult:true,//第一轮竞猜是否猜中 | |||||
drawResult:0,//1:京东卡,2:升舱卡,3:未抽中 | |||||
drawState:false,//是否抽过奖 | |||||
guessPriceArr:[1,2,3,4,5,6], | |||||
ruleShow:false,//是否显示竞猜规则 | |||||
isUserAddress:false,//用户是否有地址 | |||||
httpState:false,//是否正在进行http请求 | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面加载 | |||||
*/ | |||||
onLoad: function (options) { | |||||
app.globalData.nowPage = 3; | |||||
var getSecondGuessInfo = app.globalData.getSecondGuessInfo; | |||||
this.data.guessPriceArr = getSecondGuessInfo.firstData.guess_price.toString().split(""); | |||||
for(let i=0;i<this.data.guessPriceArr.length;i++){ | |||||
this.data.guessPriceArr[i] = parseInt(this.data.guessPriceArr[i]); | |||||
} | |||||
this.setData({ | |||||
guessPriceArr:this.data.guessPriceArr | |||||
}) | |||||
if(options.type==1){ | |||||
this.setData({ | |||||
guessResult:false | |||||
}) | |||||
}else if(options.type==2){ | |||||
this.setData({ | |||||
guessResult:true | |||||
}) | |||||
} | |||||
if(this.data.guessResult && app.globalData.getSecondGuessInfo.firstData.lucky_result!=0){ | |||||
this.setData({ | |||||
drawState:true | |||||
}) | |||||
} | |||||
}, | |||||
loadFun:function(){ | |||||
this.getAddress(); | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面初次渲染完成 | |||||
*/ | |||||
onReady: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面显示 | |||||
*/ | |||||
onShow: function () { | |||||
if (app.globalData.openid) { | |||||
this.loadFun(); | |||||
} else { | |||||
app.globalData.openidSuccessFuc = this.loadFun; | |||||
} | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面隐藏 | |||||
*/ | |||||
onHide: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面卸载 | |||||
*/ | |||||
onUnload: function () { | |||||
}, | |||||
/** | |||||
* 页面相关事件处理函数--监听用户下拉动作 | |||||
*/ | |||||
onPullDownRefresh: function () { | |||||
}, | |||||
/** | |||||
* 页面上拉触底事件的处理函数 | |||||
*/ | |||||
onReachBottom: function () { | |||||
}, | |||||
/** | |||||
* 用户点击右上角分享 | |||||
*/ | |||||
onShareAppMessage: function () { | |||||
return { | |||||
title: '召唤预言帝!快来和我一起猜启辰星售价,赢升舱大奖!', | |||||
imageUrl: this.data.imgUrl+'/newImages5/56.jpg', | |||||
path: "/pages/guess/guess" | |||||
} | |||||
}, | |||||
enterLucky:function(){//每日抽奖 | |||||
wx.navigateTo({ | |||||
url: '/pages/luckyStar/luckyStar' | |||||
}) | |||||
}, | |||||
ruleControl:function(){//规则显示控制 | |||||
this.setData({ | |||||
ruleShow:!this.data.ruleShow | |||||
}) | |||||
}, | |||||
enterGuess:function(){//去竞猜 | |||||
wx.navigateTo({ | |||||
url: '/pages/guessSecondPrize/guessSecondPrize', | |||||
}) | |||||
}, | |||||
startDraw:function(){//抽奖 | |||||
if(this.data.httpState){ | |||||
return; | |||||
} | |||||
this.data.httpState = true; | |||||
app.wxRequest(app.globalData.urlRoot+"guessPrice/getFirstGuessLucky",{},res =>{ | |||||
this.data.httpState = false; | |||||
if(res.code==200){ | |||||
app.globalData.getSecondGuessInfo.firstData.lucky_result = 1; | |||||
// res.data.lucky_result = 1; | |||||
if(res.data.lucky_result==1){ | |||||
this.setData({ | |||||
drawResult:2 | |||||
}) | |||||
}else if(res.data.lucky_result==2){ | |||||
this.setData({ | |||||
drawResult:1 | |||||
}) | |||||
}else if(res.data.lucky_result==-2){ | |||||
app.globalData.getSecondGuessInfo.firstData.lucky_result = -2; | |||||
this.setData({ | |||||
drawResult:3 | |||||
}) | |||||
} | |||||
}else{ | |||||
wx.showToast({ | |||||
title: res.msg, | |||||
icon:'none' | |||||
}) | |||||
} | |||||
},this); | |||||
}, | |||||
prizeWindowControl:function(){//关闭抽奖弹窗 | |||||
this.setData({ | |||||
drawResult:0 | |||||
}) | |||||
}, | |||||
enterPerfectMsg:function(){//马上领取 | |||||
if(this.data.isUserAddress){ | |||||
// this.enterGuess(); | |||||
wx.reLaunch({ | |||||
url: '/pages/myCenter/myCenter' | |||||
}) | |||||
}else{ | |||||
wx.navigateTo({ | |||||
url: '/pages/perfectMsg/perfectMsg', | |||||
}) | |||||
} | |||||
}, | |||||
getAddress: function () {//获取地址 | |||||
app.wxRequest(app.globalData.urlRoot + "address/getAddressV2", {}, res => { | |||||
if (res.code == 200) { | |||||
if (res.data && res.data.agentDetail) { | |||||
this.data.isUserAddress = true; | |||||
} | |||||
} | |||||
}, this); | |||||
}, | |||||
lookConfigure: function () { | |||||
wx.navigateTo({ | |||||
url: '/pages/configure/configure', | |||||
}) | |||||
}, | |||||
closePeiceWindow:function(){ | |||||
this.setData({ | |||||
drawResult:0, | |||||
drawState:true | |||||
}) | |||||
} | |||||
}) |
{ | |||||
"navigationBarTitleText": "东风启辰“猜出惊喜”", | |||||
"disableScroll":true, | |||||
"usingComponents": { | |||||
"tabBar": "../component/tabBar/index" | |||||
} | |||||
} |
<!--pages/guessSecond/guessSecond.wxml--> | |||||
<view class="main"> | |||||
<image class="pageBg" src="{{imgUrl+'/versions/20.png?v=002'}}"></image> | |||||
<view class="topGroup"> | |||||
<view style="position: relative;width:100%;height:100%;"> | |||||
<image class="newImages5-2" src="{{imgUrl+'/newImages5/78.png'}}"></image> | |||||
<view class="lookDetail" bindtap="lookConfigure"></view> | |||||
</view> | |||||
<!-- <image class="newImages5-1" src="{{imgUrl+'/newImages5/1.png'}}"></image> --> | |||||
</view> | |||||
<image class="newImages5-3" src="{{imgUrl+'/newImages5/'+(guessResult?drawState?'36':'38':'37')+'.png'}}"></image> | |||||
<image class="newImages5-4" src="{{imgUrl+'/newImages5/4.png'}}"></image> | |||||
<view class="selectFream"> | |||||
<image class="versions-19" src="{{imgUrl+'/versions/19.png'}}"></image> | |||||
<view class="priceGroup" wx:for="{{guessPriceArr}}" wx:key="index" data-index="{{index}}" style="left:{{154+index*77}}rpx"> | |||||
<image class="priceImg priceImg2" src="{{imgUrl+'/newImages4/newNum/'+(item-1<0?9:item-1)+'.png?v=002'}}"></image> | |||||
<image class="priceImg" src="{{imgUrl+'/newImages4/newNum/'+item+'.png?v=002'}}"></image> | |||||
<image class="priceImg priceImg3" src="{{imgUrl+'/newImages4/newNum/'+(item+1>9?1:item+1)+'.png?v=002'}}"></image> | |||||
</view> | |||||
<view class="slideMask"></view> | |||||
</view> | |||||
<image class="newImages5-5" wx:if="{{!guessResult || drawState}}" bindtap="enterGuess" src="{{imgUrl+'/newImages5/5.png'}}"></image> | |||||
<image class="newImages5-5" wx:if="{{guessResult && !drawState}}" bindtap="startDraw" src="{{imgUrl+'/newImages5/7.png'}}"></image> | |||||
<image class="drawBtn" bindtap="ruleControl" src="{{imgUrl+'/versions/7.png'}}"></image> | |||||
<image class="yuyue" bindtap="enterLucky" src="{{imgUrl+'/versions/1.png'}}"></image> | |||||
<view class="ruleFrame" wx:if="{{ruleShow}}"> | |||||
<image class="gameRule" src="{{imgUrl+'/newImages5/76.png'}}"></image> | |||||
<image class="closeRule" bindtap="ruleControl" src="{{imgUrl+'/versions/21.png'}}"></image> | |||||
</view> | |||||
<view class="ruleFrame ruleFrame2" wx:if="{{drawResult==1 || drawResult==2}}"> | |||||
<view class="prizeWindow"> | |||||
<image class="prizeWindowBg" src="{{imgUrl+'/newImages5/11.png'}}"></image> | |||||
<view class="prizeGroup"> | |||||
<image class="prizeImg" wx:if="{{drawResult==1}}" src="{{imgUrl+'/newImages5/8.png'}}"></image> | |||||
<image class="prizeImg2" wx:if="{{drawResult==2}}" src="{{imgUrl+'/newImages5/13.png'}}"></image> | |||||
<image class="prizeTip" src="{{imgUrl+'/newImages5/9.png'}}"></image> | |||||
<image class="prizeBtn" bindtap="enterPerfectMsg" src="{{imgUrl+'/newImages5/10.png'}}"></image> | |||||
</view> | |||||
<image class="prizeWindowClose" bindtap="closePeiceWindow" src="{{imgUrl+'/newImages5/12.png'}}"></image> | |||||
</view> | |||||
</view> | |||||
<view class="ruleFrame ruleFrame2" wx:if="{{drawResult==3}}"> | |||||
<view class="prizeWindow" style="height:470rpx;"> | |||||
<image class="prizeWindowBg" src="{{imgUrl+'/newImages5/16.png'}}"></image> | |||||
<view class="prizeGroup"> | |||||
<image class="prizeImg3" src="{{imgUrl+'/newImages5/14.png'}}"></image> | |||||
<image class="prizeTip" src="{{imgUrl+'/newImages5/9.png'}}"></image> | |||||
<image class="prizeBtn" bindtap="enterGuess" src="{{imgUrl+'/newImages5/15.png'}}"></image> | |||||
</view> | |||||
<image class="prizeWindowClose" bindtap="prizeWindowControl" src="{{imgUrl+'/newImages5/12.png'}}"></image> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<tabBar></tabBar> |
/* pages/guessSecond/guessSecond.wxss */ | |||||
image{ | |||||
display: block; | |||||
} | |||||
view{ | |||||
-webkit-overflow-scrolling: touch; | |||||
} | |||||
.main{ | |||||
height: calc(100vh - 120rpx); | |||||
overflow: auto; | |||||
position: relative; | |||||
} | |||||
.pageBg{ | |||||
position: absolute; | |||||
left: 0; | |||||
bottom: 0; | |||||
width: 750rpx; | |||||
height: 1506rpx; | |||||
z-index: -1; | |||||
} | |||||
.drawBtn{ | |||||
width: 81rpx; | |||||
height: 81rpx; | |||||
position: fixed; | |||||
right: 35rpx; | |||||
top: 107rpx; | |||||
} | |||||
.yuyue{ | |||||
width: 81rpx; | |||||
height: 81rpx; | |||||
position: fixed; | |||||
right: 35rpx; | |||||
top: 214rpx; | |||||
} | |||||
.topGroup{ | |||||
position: relative; | |||||
width: 711rpx; | |||||
height: 440rpx; | |||||
margin-left: auto; | |||||
margin-right: 0; | |||||
margin-top: 100rpx; | |||||
} | |||||
.lookDetail{ | |||||
position: absolute; | |||||
left: 52rpx; | |||||
bottom: 60rpx; | |||||
width: 230rpx; | |||||
height: 30rpx; | |||||
/* background-color: rgba(0,0,0,0.5); */ | |||||
} | |||||
.newImages5-2{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
.newImages5-1{ | |||||
position: absolute; | |||||
left: 60rpx; | |||||
bottom: 55rpx; | |||||
width: 221rpx; | |||||
height: 35rpx; | |||||
} | |||||
.newImages5-3{ | |||||
width: 634rpx; | |||||
height: 170rpx; | |||||
margin: 0 auto; | |||||
margin-top: 40rpx; | |||||
} | |||||
.newImages5-4{ | |||||
width: 150rpx; | |||||
height: 30rpx; | |||||
margin: 0 auto; | |||||
margin-top: 25rpx; | |||||
} | |||||
.selectFream{ | |||||
position: relative; | |||||
margin-top: 10rpx; | |||||
} | |||||
.slideMask{ | |||||
position: absolute; | |||||
left: 0; | |||||
top: 0; | |||||
width: 100%; | |||||
height: 100%; | |||||
opacity: 0; | |||||
} | |||||
.versions-19{ | |||||
width: 535rpx; | |||||
height: 137rpx; | |||||
margin: 0 auto; | |||||
margin-left: 124rpx; | |||||
} | |||||
.priceGroup{ | |||||
position: absolute; | |||||
top: 18rpx; | |||||
left: 154rpx; | |||||
width: 60rpx; | |||||
height: 100rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
overflow: hidden; | |||||
} | |||||
.priceImg{ | |||||
width: 36rpx; | |||||
height: 43rpx; | |||||
} | |||||
.priceImg2,.priceImg3{ | |||||
position: absolute; | |||||
left: 50%; | |||||
transform: translateX(-50%); | |||||
top: -23rpx; | |||||
} | |||||
.priceImg3{ | |||||
top: auto; | |||||
bottom: -23rpx; | |||||
} | |||||
.newImages5-5{ | |||||
position: absolute; | |||||
left: 50%; | |||||
transform: translateX(-50%); | |||||
bottom: 30rpx; | |||||
width: 711rpx; | |||||
height: 70rpx; | |||||
} | |||||
.ruleFrame{ | |||||
position: fixed; | |||||
top:0; | |||||
left: 0; | |||||
height: calc(100vh - 120rpx); | |||||
overflow: auto; | |||||
} | |||||
.ruleFrame2{ | |||||
width: 100%; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
background-color: rgba(0,0,0,0.5); | |||||
z-index: 9; | |||||
} | |||||
.gameRule{ | |||||
width: 750rpx; | |||||
height: 2513rpx; | |||||
margin-top: -1rpx; | |||||
} | |||||
.closeRule{ | |||||
position: fixed; | |||||
right: 70rpx; | |||||
top: 102rpx; | |||||
width: 56rpx; | |||||
height: 57rpx; | |||||
} | |||||
.prizeWindow{ | |||||
position: relative; | |||||
width: 501rpx; | |||||
height: 620rpx; | |||||
} | |||||
.prizeWindowBg{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
.prizeGroup{ | |||||
position: absolute; | |||||
left: 0; | |||||
top: 0; | |||||
width: 100%; | |||||
height: 100%; | |||||
display: flex; | |||||
flex-direction: column; | |||||
align-items: center; | |||||
} | |||||
.prizeWindowClose{ | |||||
position: absolute; | |||||
top: -32rpx; | |||||
right: -32rpx; | |||||
width: 42rpx; | |||||
height: 42rpx; | |||||
} | |||||
.prizeImg{ | |||||
margin-top: 85rpx; | |||||
width:347rpx; | |||||
height: 256rpx; | |||||
} | |||||
.prizeTip{ | |||||
margin-top: 44rpx; | |||||
width: 362rpx; | |||||
height: 66rpx; | |||||
} | |||||
.prizeBtn{ | |||||
margin-top: 43rpx; | |||||
width: 388rpx; | |||||
height: 60rpx; | |||||
} | |||||
.prizeImg2{ | |||||
width: 416rpx; | |||||
height: 282rpx; | |||||
margin-top: 85rpx; | |||||
} | |||||
.prizeImg3{ | |||||
width: 294rpx; | |||||
height: 100rpx; | |||||
margin-top: 85rpx; | |||||
margin-bottom: 6rpx; | |||||
} |
// pages/guessSecondPrize/guessSecondPrize.js | |||||
const app = getApp(); | |||||
Page({ | |||||
/** | |||||
* 页面的初始数据 | |||||
*/ | |||||
data: { | |||||
imgUrl: app.globalData.urlStatic,//图片路径 | |||||
ruleShow:false,//是否显示竞猜规则 | |||||
inputValue:"",//输入的价格 | |||||
stringValue:"",//输入的竞猜价格 | |||||
focusState:false,//输入框聚焦状态 | |||||
tipImgShow:true,//是否显示输入框提示 | |||||
isGuess:false,//是否竞猜过价格 | |||||
guessPrice:"", | |||||
guessPriceArr:[1,2,3,4,5,6], | |||||
slideDay:['0','0'],//距离上市时间 | |||||
randomNum:44,//随机数 | |||||
cartogramShow:false,//是否显示统计图 | |||||
getSecondGuessInfo:null, | |||||
httpState:false,//是否正在进行http请求 | |||||
isUserInfo:false,//是否有个人信息 | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面加载 | |||||
*/ | |||||
onLoad: function (options) { | |||||
app.globalData.nowPage = 3; | |||||
// this.distanceDay(); | |||||
if (app.globalData.openid) { | |||||
this.loadFun(); | |||||
} else { | |||||
app.globalData.openidSuccessFuc = this.loadFun; | |||||
} | |||||
this.setData({ | |||||
getSecondGuessInfo:app.globalData.getSecondGuessInfo | |||||
}) | |||||
var getSecondGuessInfo = app.globalData.getSecondGuessInfo; | |||||
if(getSecondGuessInfo.secondData){ | |||||
this.data.guessPriceArr = getSecondGuessInfo.secondData.guess_price.toString().split(""); | |||||
for(let i=0;i<this.data.guessPriceArr.length;i++){ | |||||
this.data.guessPriceArr[i] = parseInt(this.data.guessPriceArr[i]); | |||||
} | |||||
console.log(getSecondGuessInfo.secondData); | |||||
this.setData({ | |||||
isGuess:true, | |||||
guessPriceArr:this.data.guessPriceArr | |||||
}) | |||||
} | |||||
if(app.globalData.userInfoData && app.globalData.userInfoData.nickName){ | |||||
this.setData({ | |||||
isUserInfo:true | |||||
}) | |||||
} | |||||
}, | |||||
loadFun:function(){ | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面初次渲染完成 | |||||
*/ | |||||
onReady: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面显示 | |||||
*/ | |||||
onShow: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面隐藏 | |||||
*/ | |||||
onHide: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面卸载 | |||||
*/ | |||||
onUnload: function () { | |||||
}, | |||||
/** | |||||
* 页面相关事件处理函数--监听用户下拉动作 | |||||
*/ | |||||
onPullDownRefresh: function () { | |||||
}, | |||||
/** | |||||
* 页面上拉触底事件的处理函数 | |||||
*/ | |||||
onReachBottom: function () { | |||||
}, | |||||
/** | |||||
* 用户点击右上角分享 | |||||
*/ | |||||
onShareAppMessage: function () { | |||||
return { | |||||
title: '召唤预言帝!快来和我一起猜启辰星售价,赢升舱大奖!', | |||||
imageUrl: this.data.imgUrl+'/newImages5/56.jpg', | |||||
path: "/pages/guess/guess" | |||||
} | |||||
}, | |||||
enterLucky:function(){//每日抽奖 | |||||
wx.navigateTo({ | |||||
url: '/pages/luckyStar/luckyStar' | |||||
}) | |||||
}, | |||||
ruleControl:function(){//规则显示控制 | |||||
this.setData({ | |||||
ruleShow:!this.data.ruleShow | |||||
}) | |||||
}, | |||||
focusControl:function(){ | |||||
this.setData({ | |||||
focusState:true | |||||
}) | |||||
}, | |||||
focusControl2:function(){ | |||||
this.setData({ | |||||
focusState:false | |||||
}) | |||||
}, | |||||
getValue:function(e){ | |||||
this.data.inputValue = e.detail.value; | |||||
if(e.detail.value){ | |||||
this.setData({ | |||||
tipImgShow:false | |||||
}) | |||||
}else{ | |||||
this.setData({ | |||||
tipImgShow:true | |||||
}) | |||||
} | |||||
this.setData({ | |||||
stringValue:e.detail.value | |||||
}) | |||||
}, | |||||
submitPrice2:function(){ | |||||
if(this.data.inputValue>150000 || this.data.inputValue<110000){ | |||||
this.tipWindowControl(); | |||||
}else{ | |||||
this.data.guessPrice = this.data.inputValue; | |||||
this.data.guessPriceArr = this.data.guessPrice.toString().split(""); | |||||
for(let i=0;i<this.data.guessPriceArr.length;i++){ | |||||
this.data.guessPriceArr[i] = parseInt(this.data.guessPriceArr[i]); | |||||
} | |||||
this.setData({ | |||||
guessPriceArr:this.data.guessPriceArr | |||||
}) | |||||
console.log(this.data.guessPrice); | |||||
console.log(this.data.guessPriceArr); | |||||
this.tipWindowControl2(); | |||||
} | |||||
}, | |||||
tipWindowControl:function(){ | |||||
this.setData({ | |||||
tipWindow:!this.data.tipWindow | |||||
}) | |||||
if(!this.data.tipWindow){ | |||||
this.setData({ | |||||
stringValue:"", | |||||
tipImgShow:true | |||||
}) | |||||
} | |||||
}, | |||||
tipWindowControl2:function(){ | |||||
this.setData({ | |||||
tipWindow2:!this.data.tipWindow2 | |||||
}) | |||||
}, | |||||
tipWindowControl3:function(){ | |||||
this.setData({ | |||||
stringValue:"", | |||||
tipImgShow:true | |||||
}) | |||||
this.setData({ | |||||
tipWindow2:!this.data.tipWindow2 | |||||
}) | |||||
}, | |||||
distanceDay:function(){//距离4月23日上市还有XX天 | |||||
var timestamp = Date.parse(new Date()); //今天的时间戳 | |||||
var timestamp2 = Date.parse(new Date('2020-04-23')); //上市时间时间戳 | |||||
if(timestamp2>timestamp){ | |||||
var slideNum = Math.ceil((timestamp2-timestamp)/60/60/24/1000).toString().split(""); | |||||
this.setData({ | |||||
slideDay:slideNum//距离上市时间 | |||||
}) | |||||
} | |||||
}, | |||||
cartogramControl:function(){ | |||||
// var randomNum = Math.floor(Math.random()*4+44); | |||||
this.setData({ | |||||
randomNum:56, | |||||
cartogramShow:!this.data.cartogramShow | |||||
}) | |||||
}, | |||||
submitFirstGuessInfo:function(){//提交竞猜价格 | |||||
if(this.data.httpState){ | |||||
return; | |||||
} | |||||
this.data.httpState = true; | |||||
app.wxRequest(app.globalData.urlRoot + "guessPrice/submitSecondGuessInfo", {guess_price:this.data.guessPrice,statistics_scene:app.globalData.sceneSource}, res => { | |||||
this.data.httpState = false; | |||||
if (res.code == 200) { | |||||
app.globalData.getSecondGuessInfo.secondData = {}; | |||||
app.globalData.getSecondGuessInfo.secondData.guess_price = this.data.guessPrice; | |||||
app.globalData.getSecondGuessInfo.secondData.firstData = null; | |||||
this.setData({ | |||||
isGuess:true | |||||
}) | |||||
this.tipWindowControl2(); | |||||
this.shareWindowControl(); | |||||
}else{ | |||||
wx.showToast({ | |||||
title: res.msg, | |||||
icon:"none" | |||||
}) | |||||
} | |||||
}, this,"POST"); | |||||
}, | |||||
shareWindowControl:function(){//邀请好友弹窗显示控制 | |||||
this.setData({ | |||||
shareShow:!this.data.shareShow | |||||
}) | |||||
}, | |||||
getUserWxMsg:function(e){//通过微信获取用户信息 | |||||
if (e.detail.errMsg == "getUserInfo:ok") { | |||||
this.setData({ | |||||
isUserInfo:true | |||||
}) | |||||
app.submitUserMsg(e.detail.userInfo.avatarUrl, e.detail.userInfo.nickName); | |||||
this.enterPoster(); | |||||
} | |||||
}, | |||||
enterPoster:function(){ | |||||
wx.navigateTo({ | |||||
url: '/pages/guessPoster/guessPoster', | |||||
}) | |||||
}, | |||||
lookConfigure: function () { | |||||
wx.navigateTo({ | |||||
url: '/pages/configure/configure', | |||||
}) | |||||
} | |||||
}) |
{ | |||||
"navigationBarTitleText": "东风启辰“猜出惊喜”", | |||||
"disableScroll":true, | |||||
"usingComponents": { | |||||
"tabBar": "../component/tabBar/index" | |||||
} | |||||
} |
<!--pages/guessSecondPrize/guessSecondPrize.wxml--> | |||||
<view class="main"> | |||||
<image class="pageBg" src="{{imgUrl+'/versions/20.png?v=002'}}"></image> | |||||
<view class="topGroup"> | |||||
<view style="position: relative;width:100%;height:100%;"> | |||||
<image class="newImages5-2" src="{{imgUrl+'/newImages5/78.png'}}"></image> | |||||
<view class="lookDetail" bindtap="lookConfigure"></view> | |||||
</view> | |||||
<!-- <image class="newImages5-1" src="{{imgUrl+'/newImages5/1.png'}}"></image> --> | |||||
</view> | |||||
<view wx:if="{{!isGuess}}"> | |||||
<image class="newImages5-28" src="{{imgUrl+'/newImages5/39.png'}}"></image> | |||||
<view> | |||||
<view class="newImages4-23"> | |||||
<image class="newImages4-bg" src="{{imgUrl+'/newImages4/23.png'}}"></image> | |||||
<view class="inputFrame">{{stringValue}}</view> | |||||
<view wx:if="{{focusState}}" class="inputFrame2" style="left:{{34+stringValue.length*77}}rpx;"></view> | |||||
<image class="tipImg" wx:if="{{tipImgShow}}" src="{{imgUrl+'/newImages5/81.png'}}"></image> | |||||
<input class="inputPrice" value="{{stringValue}}" bindfocus="focusControl" bindblur="focusControl2" type="number" maxlength="6" bindinput="getValue"></input> | |||||
</view> | |||||
<image class="newImages4-24" bindtap="submitPrice2" src="{{imgUrl+'/newImages5/79.png'}}"></image> | |||||
</view> | |||||
</view> | |||||
<view wx:if="{{isGuess}}"> | |||||
<image class="newImages5-41" src="{{imgUrl+'/newImages5/41.png'}}"></image> | |||||
<view class="selectFream"> | |||||
<image class="versions-19" src="{{imgUrl+'/versions/19.png'}}"></image> | |||||
<view class="priceGroup" wx:for="{{guessPriceArr}}" wx:key="index" data-index="{{index}}" style="left:{{154+index*77}}rpx"> | |||||
<image class="priceImg priceImg2" src="{{imgUrl+'/newImages4/newNum/'+(item-1<0?9:item-1)+'.png?v=002'}}"></image> | |||||
<image class="priceImg" src="{{imgUrl+'/newImages4/newNum/'+item+'.png?v=002'}}"></image> | |||||
<image class="priceImg priceImg3" src="{{imgUrl+'/newImages4/newNum/'+(item+1>9?1:item+1)+'.png?v=002'}}"></image> | |||||
</view> | |||||
<view class="slideMask"></view> | |||||
</view> | |||||
<view class="shareGroup"> | |||||
<image class="newImages5-42" bindtap="enterPoster" src="{{imgUrl+'/newImages5/80.png'}}"></image> | |||||
<button open-type="getUserInfo" wx:if="{{!isUserInfo}}" bindgetuserinfo="getUserWxMsg" style="min-height:0;width: 100%;" class="shareBtn"></button> | |||||
</view> | |||||
<image class="newImages5-82" src="{{imgUrl+'/newImages5/83.png'}}"></image> | |||||
<!-- <view class="dayGroup"> | |||||
<image class="newImages5-43" src="{{imgUrl+'/newImages5/43.png'}}"></image> | |||||
<view class="dayNum">{{slideDay[0]+slideDay[1]}}</view> | |||||
</view> --> | |||||
</view> | |||||
<!-- <image class="newImages5-30" bindtap="cartogramControl" src="{{imgUrl+'/newImages5/30.png'}}"></image> --> | |||||
<image class="drawBtn" bindtap="ruleControl" src="{{imgUrl+'/versions/7.png'}}"></image> | |||||
<image class="yuyue" bindtap="enterLucky" src="{{imgUrl+'/versions/1.png'}}"></image> | |||||
<view class="ruleFrame" wx:if="{{ruleShow}}"> | |||||
<image class="gameRule" src="{{imgUrl+'/newImages5/76.png'}}"></image> | |||||
<image class="closeRule" bindtap="ruleControl" src="{{imgUrl+'/versions/21.png'}}"></image> | |||||
</view> | |||||
<view class="ruleFrame ruleFrame2" wx:if="{{tipWindow}}"> | |||||
<view class="tipWindow"> | |||||
<image class="tipWindowBg" src="{{imgUrl+'/newImages4/36.png'}}"></image> | |||||
<image class="tipWindowClose" bindtap="tipWindowControl" src="{{imgUrl+'/newImages4/27.png'}}"></image> | |||||
<image class="tipWindowBtn" bindtap="tipWindowControl" src="{{imgUrl+'/newImages4/26.png'}}"></image> | |||||
</view> | |||||
</view> | |||||
<view class="ruleFrame ruleFrame2" wx:if="{{tipWindow2}}"> | |||||
<view class="tipWindow"> | |||||
<image class="tipWindowBg" src="{{imgUrl+'/newImages4/37.png'}}"></image> | |||||
<image class="tipWindowClose" bindtap="tipWindowControl2" src="{{imgUrl+'/newImages4/27.png'}}"></image> | |||||
<image class="tipWindowBtn" style="bottom:150rpx;" bindtap="submitFirstGuessInfo" src="{{imgUrl+'/newImages4/29.png'}}"></image> | |||||
<image class="tipWindowBtn" bindtap="tipWindowControl3" src="{{imgUrl+'/newImages4/30.png'}}"></image> | |||||
</view> | |||||
</view> | |||||
<view class="ruleFrame ruleFrame2" wx:if="{{cartogramShow}}"> | |||||
<view class="cartogramGroup"> | |||||
<image class="cartogramImg" src="{{imgUrl+'/newImages5/'+randomNum+'.png'}}"></image> | |||||
<image class="tipWindowClose" bindtap="cartogramControl" src="{{imgUrl+'/newImages4/27.png'}}"></image> | |||||
</view> | |||||
</view> | |||||
<view class="shareWindow" wx:if="{{shareShow}}"> | |||||
<view class="shareWindowGroup"> | |||||
<image class="versions-23" src="{{imgUrl+'/newImages5/74.png'}}"></image> | |||||
<image class="versions-22" src="{{imgUrl+'/newImages5/75.png'}}"></image> | |||||
<button open-type="share" style="min-height:0;width: 388rpx;" class="shareBtn2"></button> | |||||
<image class="versions-24" bindtap="shareWindowControl" src="{{imgUrl+'/versions/24.png'}}"></image> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<tabBar></tabBar> |
/* pages/guessSecondPrize/guessSecondPrize.wxss */ | |||||
image{ | |||||
display: block; | |||||
} | |||||
view{ | |||||
-webkit-overflow-scrolling: touch; | |||||
} | |||||
.main{ | |||||
height: calc(100vh - 120rpx); | |||||
overflow: auto; | |||||
position: relative; | |||||
} | |||||
.pageBg{ | |||||
position: absolute; | |||||
left: 0; | |||||
bottom: 0; | |||||
width: 750rpx; | |||||
height: 1506rpx; | |||||
z-index: -1; | |||||
} | |||||
.drawBtn{ | |||||
width: 81rpx; | |||||
height: 81rpx; | |||||
position: fixed; | |||||
right: 35rpx; | |||||
top: 107rpx; | |||||
} | |||||
.yuyue{ | |||||
width: 81rpx; | |||||
height: 81rpx; | |||||
position: fixed; | |||||
right: 35rpx; | |||||
top: 214rpx; | |||||
} | |||||
.ruleFrame{ | |||||
position: fixed; | |||||
top:0; | |||||
left: 0; | |||||
height: calc(100vh - 120rpx); | |||||
overflow: auto; | |||||
} | |||||
.ruleFrame2{ | |||||
width: 100%; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
background-color: rgba(0,0,0,0.5); | |||||
z-index: 9; | |||||
} | |||||
.tipWindow{ | |||||
position: relative; | |||||
width: 501rpx; | |||||
height: 470rpx; | |||||
} | |||||
.tipWindowBg{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
.tipWindowClose{ | |||||
position: absolute; | |||||
top: -32rpx; | |||||
right: -32rpx; | |||||
width: 42rpx; | |||||
height: 42rpx; | |||||
} | |||||
.tipWindowBtn{ | |||||
position: absolute; | |||||
left: 50%; | |||||
transform: translateX(-50%); | |||||
bottom: 60rpx; | |||||
width: 390rpx; | |||||
height: 60rpx; | |||||
} | |||||
.gameRule{ | |||||
width: 750rpx; | |||||
height: 2513rpx; | |||||
margin-top: -1rpx; | |||||
} | |||||
.closeRule{ | |||||
position: fixed; | |||||
right: 70rpx; | |||||
top: 102rpx; | |||||
width: 56rpx; | |||||
height: 57rpx; | |||||
} | |||||
.topGroup{ | |||||
position: relative; | |||||
width: 711rpx; | |||||
height: 440rpx; | |||||
margin-left: auto; | |||||
margin-right: 0; | |||||
margin-top: 100rpx; | |||||
} | |||||
.lookDetail{ | |||||
position: absolute; | |||||
left: 52rpx; | |||||
bottom: 60rpx; | |||||
width: 230rpx; | |||||
height: 30rpx; | |||||
/* background-color: rgba(0,0,0,0.5); */ | |||||
} | |||||
.newImages5-2{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
.newImages5-1{ | |||||
position: absolute; | |||||
left: 60rpx; | |||||
bottom: 55rpx; | |||||
width: 221rpx; | |||||
height: 35rpx; | |||||
} | |||||
.newImages5-28{ | |||||
width: 504rpx; | |||||
height: 90rpx; | |||||
margin:65rpx auto 25rpx; | |||||
} | |||||
.newImages5-30{ | |||||
position: absolute; | |||||
left: 50%; | |||||
transform: translateX(-50%); | |||||
bottom: 50rpx; | |||||
width: 711rpx; | |||||
height: 70rpx; | |||||
} | |||||
.newImages4-22{ | |||||
width: 504rpx; | |||||
height: 90rpx; | |||||
margin: 0 auto; | |||||
margin-top: 84rpx; | |||||
} | |||||
.newImages4-23{ | |||||
width: 567rpx; | |||||
height: 145rpx; | |||||
margin-left: 108rpx; | |||||
margin-top: 24rpx; | |||||
position: relative; | |||||
overflow: hidden; | |||||
} | |||||
.newImages4-bg{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
.inputPrice{ | |||||
position: absolute; | |||||
left: -100%; | |||||
top: 0; | |||||
width: 5320rpx; | |||||
height: 100%; | |||||
line-height: 145rpx; | |||||
font-size:24rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:600; | |||||
color:rgba(0,0,0,1); | |||||
padding: 0 34rpx; | |||||
box-sizing: border-box; | |||||
} | |||||
.newImages4-24{ | |||||
width: 506rpx; | |||||
height: 70rpx; | |||||
margin:0 auto; | |||||
margin-top: 25rpx; | |||||
} | |||||
.inputFrame{ | |||||
position: absolute; | |||||
left: 0; | |||||
top: 0; | |||||
width: 532rpx; | |||||
height: 100%; | |||||
line-height: 145rpx; | |||||
font-size:77rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:bold; | |||||
color:rgba(0,0,0,1); | |||||
padding: 0 34rpx; | |||||
box-sizing: border-box; | |||||
letter-spacing:36rpx; | |||||
} | |||||
.inputFrame2{ | |||||
position: absolute; | |||||
top: 50%; | |||||
transform: translateY(-50%); | |||||
height: 77rpx; | |||||
left: 34rpx; | |||||
width: 1rpx; | |||||
background-color: #000; | |||||
animation: focus 0.9s linear infinite; | |||||
} | |||||
@keyframes focus { | |||||
from { | |||||
opacity: 1; | |||||
} | |||||
to { | |||||
opacity: 0; | |||||
} | |||||
} | |||||
.tipImg{ | |||||
width: 333rpx; | |||||
height: 83rpx; | |||||
position: absolute; | |||||
left: 38%; | |||||
top: 50%; | |||||
transform: translate(-50%,-50%); | |||||
} | |||||
.newImages5-41{ | |||||
width: 480rpx; | |||||
height: 41rpx; | |||||
margin: 0 auto; | |||||
margin-top: 63rpx; | |||||
} | |||||
.selectFream{ | |||||
position: relative; | |||||
margin-top: 20rpx; | |||||
} | |||||
.versions-19{ | |||||
width: 535rpx; | |||||
height: 137rpx; | |||||
margin: 0 auto; | |||||
margin-left: 124rpx; | |||||
} | |||||
.priceGroup{ | |||||
position: absolute; | |||||
top: 18rpx; | |||||
left: 154rpx; | |||||
width: 60rpx; | |||||
height: 100rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
overflow: hidden; | |||||
} | |||||
.priceImg{ | |||||
width: 36rpx; | |||||
height: 43rpx; | |||||
} | |||||
.priceImg2,.priceImg3{ | |||||
position: absolute; | |||||
left: 50%; | |||||
transform: translateX(-50%); | |||||
top: -23rpx; | |||||
} | |||||
.priceImg3{ | |||||
top: auto; | |||||
bottom: -23rpx; | |||||
} | |||||
.slideMask{ | |||||
position: absolute; | |||||
left: 0; | |||||
top: 0; | |||||
width: 100%; | |||||
height: 100%; | |||||
opacity: 0; | |||||
} | |||||
.shareGroup{ | |||||
width: 505rpx; | |||||
height: 70rpx; | |||||
position: relative; | |||||
margin: 0 auto; | |||||
margin-top: 20rpx; | |||||
margin-bottom: 37rpx; | |||||
} | |||||
.newImages5-42{ | |||||
width: 505rpx; | |||||
height: 70rpx; | |||||
} | |||||
.dayGroup{ | |||||
position: relative; | |||||
width: 553rpx; | |||||
height: 53rpx; | |||||
margin: 0 auto; | |||||
} | |||||
.newImages5-43{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
.dayNum{ | |||||
position: absolute; | |||||
left: 286rpx; | |||||
top: 0; | |||||
width: 84rpx; | |||||
height: 53rpx; | |||||
letter-spacing: 22rpx; | |||||
font-size: 36rpx; | |||||
line-height: 53rpx; | |||||
color: white; | |||||
text-align: center; | |||||
} | |||||
.cartogramGroup{ | |||||
position: relative; | |||||
width: 500rpx; | |||||
height: 619rpx; | |||||
} | |||||
.cartogramImg{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
.shareBtn{ | |||||
position: absolute; | |||||
left: 0; | |||||
top: 0; | |||||
width: 100%; | |||||
height: 100%; | |||||
margin: 0; | |||||
padding: 0; | |||||
opacity: 0; | |||||
}.shareWindow{ | |||||
position: fixed; | |||||
top:0; | |||||
left: 0; | |||||
width: 100%; | |||||
height: calc(100vh - 120rpx); | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
background-color: rgba(000, 000, 000, 0.5); | |||||
} | |||||
.shareWindowGroup{ | |||||
position: relative; | |||||
width: 501rpx; | |||||
height: 410rpx; | |||||
} | |||||
.versions-23{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
.versions-22{ | |||||
position: absolute; | |||||
left: 50%; | |||||
transform: translateX(-50%); | |||||
bottom: 60rpx; | |||||
width: 388rpx; | |||||
height: 59rpx; | |||||
} | |||||
.shareBtn2{ | |||||
position: absolute; | |||||
left: 50%; | |||||
transform: translateX(-50%); | |||||
bottom: 60rpx; | |||||
height: 54rpx; | |||||
margin: 0; | |||||
padding: 0; | |||||
opacity: 0; | |||||
} | |||||
.versions-24{ | |||||
position: absolute; | |||||
top: -42rpx; | |||||
right: -42rpx; | |||||
width: 42rpx; | |||||
height: 42rpx; | |||||
} | |||||
.newImages5-82{ | |||||
width: 752rpx; | |||||
height: 44rpx; | |||||
margin: 0 auto; | |||||
margin-top: 45rpx; | |||||
} |
<view class="contentFrame"> | <view class="contentFrame"> | ||||
<view class="newImages2-76"> | <view class="newImages2-76"> | ||||
<!-- <image style="width:750rpx;height:10368rpx;" src="{{imgUrl+'/newImages4/16.png'}}"></image> --> | <!-- <image style="width:750rpx;height:10368rpx;" src="{{imgUrl+'/newImages4/16.png'}}"></image> --> | ||||
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages4/indeximages/new_01.png?v=002'}}"></image> | |||||
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages4/indeximages/new_02.png'}}"></image> | |||||
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages4/indeximages/new_03.png'}}"></image> | |||||
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages4/indeximages/new_04.png'}}"></image> | |||||
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages4/indeximages/new_05.png'}}"></image> | |||||
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages4/indeximages/new_06.png'}}"></image> | |||||
<image style="width:750rpx;height:768rpx;" src="{{imgUrl+'/newImages4/indeximages/new_07.png'}}"></image> | |||||
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages5/images/newImg_01.png?v=002'}}"></image> | |||||
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages5/images/newImg_02.png'}}"></image> | |||||
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages5/images/newImg_03.png'}}"></image> | |||||
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages5/images/newImg_04.png'}}"></image> | |||||
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages5/images/newImg_05.png'}}"></image> | |||||
<image style="width:750rpx;height:1600rpx;" src="{{imgUrl+'/newImages5/images/newImg_06.png'}}"></image> | |||||
<image style="width:750rpx;height:768rpx;" src="{{imgUrl+'/newImages5/images/newImg_07.png'}}"></image> | |||||
</view> | </view> | ||||
<view class="videoGroup" bindtap="playVideo"> | <view class="videoGroup" bindtap="playVideo"> | ||||
<image class="newImages2-108" animation="{{playBtnDeg}}" src="{{imgUrl+'/newImages3/32.png'}}"></image> | <image class="newImages2-108" animation="{{playBtnDeg}}" src="{{imgUrl+'/newImages3/32.png'}}"></image> |
<image class="gameRuleClose" wx:if="{{ruleCloseShow}}" bindtap="closeRule" src="{{imgUrl+'/star/closebtn.png'}}"></image> | <image class="gameRuleClose" wx:if="{{ruleCloseShow}}" bindtap="closeRule" src="{{imgUrl+'/star/closebtn.png'}}"></image> | ||||
<view class="gameRuleGroup"> | <view class="gameRuleGroup"> | ||||
<view style="width: 452rpx;height: 1661rpx;"> | <view style="width: 452rpx;height: 1661rpx;"> | ||||
<image class="newImages48" style="width: 100%;height: 100%;" src="{{imgUrl+'/newImages3/30.png'}}"></image> | |||||
<image class="newImages48" style="width: 100%;height: 100%;" src="{{imgUrl+'/newImages5/51.png'}}"></image> | |||||
</view> | </view> | ||||
<view class="gameStrat" bindtap="closeRule"> | <view class="gameStrat" bindtap="closeRule"> | ||||
<image style="width:100%;height:100%;" src="{{imgUrl+'/btns/gameStart.png'}}"></image> | <image style="width:100%;height:100%;" src="{{imgUrl+'/btns/gameStart.png'}}"></image> |
recordNow: 1,//现在的记录类型 | recordNow: 1,//现在的记录类型 | ||||
taskList: [],//任务列表 | taskList: [],//任务列表 | ||||
shareFriendList:[],//星探小分队列表 | shareFriendList:[],//星探小分队列表 | ||||
couponList:[],//卡券列表 | |||||
recordList:[],//获奖记录列表 | recordList:[],//获奖记录列表 | ||||
provinceArr: [],//省 | provinceArr: [],//省 | ||||
provinceValue: 0,//选中的省下标 | provinceValue: 0,//选中的省下标 | ||||
sendCode: true, | sendCode: true, | ||||
appointment: true, | appointment: true, | ||||
getFriendListState:false, | getFriendListState:false, | ||||
couponListState:false, | |||||
couponListCode:"", | |||||
subscribeData: { | subscribeData: { | ||||
realname: "",//姓名 | realname: "",//姓名 | ||||
mobile: "",//手机号 | mobile: "",//手机号 | ||||
page:1, | page:1, | ||||
count:20 | count:20 | ||||
}, | }, | ||||
parames3:{ | |||||
page:1, | |||||
count:5 | |||||
}, | |||||
noData:false, | noData:false, | ||||
noData2:false, | noData2:false, | ||||
noData3:false, | |||||
optionsData:null, | optionsData:null, | ||||
lookDescId: null, | lookDescId: null, | ||||
agreement: false,//是否显示协议 | agreement: false,//是否显示协议 | ||||
getState:true, | getState:true, | ||||
scoutRule:false, | scoutRule:false, | ||||
vipDetailShow:false, | vipDetailShow:false, | ||||
machineShow:false, | |||||
lookPrizeDetail:false, | lookPrizeDetail:false, | ||||
lookIndex:null, | lookIndex:null, | ||||
buyStateCouponCode:"", | buyStateCouponCode:"", | ||||
// if (!app.globalData.isRegister) { | // if (!app.globalData.isRegister) { | ||||
// this.getOrderInfo(); | // this.getOrderInfo(); | ||||
// } | // } | ||||
console.log(app.globalData.userInfoData); | |||||
if (app.globalData.userInfoData) { | if (app.globalData.userInfoData) { | ||||
if (app.globalData.userInfoData.avatarUrl){ | if (app.globalData.userInfoData.avatarUrl){ | ||||
this.data.userData.avatarUrl = app.globalData.userInfoData.avatarUrl; | this.data.userData.avatarUrl = app.globalData.userInfoData.avatarUrl; | ||||
return app.sharePack(); | return app.sharePack(); | ||||
}, | }, | ||||
selectChange:function(e){ | selectChange:function(e){ | ||||
this.setData({ | |||||
selectNow: e.currentTarget.dataset.value | |||||
}) | |||||
this.setData({ | |||||
selectNow: e.currentTarget.dataset.value | |||||
}) | |||||
if (e.currentTarget.dataset.value == 1) { | if (e.currentTarget.dataset.value == 1) { | ||||
this.getFriendBuCarNum(); | this.getFriendBuCarNum(); | ||||
} else if (e.currentTarget.dataset.value == 2) { | } else if (e.currentTarget.dataset.value == 2) { | ||||
shareFriendList:[] | shareFriendList:[] | ||||
}) | }) | ||||
this.getShareList(); | this.getShareList(); | ||||
}else if(e.currentTarget.dataset.value == 4){ | |||||
this.data.parames3.page = 1; | |||||
this.data.noData3 = false; | |||||
this.setData({ | |||||
couponList:[] | |||||
}) | |||||
this.getMyCouponList(); | |||||
} | } | ||||
}, | }, | ||||
getMyCouponList:function(){//获取我的卡包 | |||||
this.setData({ | |||||
couponListState: true | |||||
}) | |||||
wx.showLoading({ | |||||
title: '获取数据中' | |||||
}) | |||||
app.wxRequest(app.globalData.urlRoot +"/bag/getMyCouponList",this.data.parames3,res=>{ | |||||
wx.hideLoading(); | |||||
if(res.code==200){ | |||||
if(res.data){ | |||||
for(let i=0;i<res.data.list.length;i++){ | |||||
this.data.couponList.push(res.data.list[i]); | |||||
} | |||||
this.setData({ | |||||
couponList: this.data.couponList | |||||
}) | |||||
if (res.data.list.length<this.data.parames3.count){ | |||||
this.setData({ | |||||
noData3: true | |||||
}) | |||||
} | |||||
} | |||||
} | |||||
this.setData({ | |||||
couponListState: false | |||||
}) | |||||
},this); | |||||
}, | |||||
selectTask: function (e) { | selectTask: function (e) { | ||||
this.setData({ | this.setData({ | ||||
taskNow: e.currentTarget.dataset.type | taskNow: e.currentTarget.dataset.type | ||||
app.wxRequest(app.globalData.urlRoot + 'userInfo/getUserInfo', {}, res => { | app.wxRequest(app.globalData.urlRoot + 'userInfo/getUserInfo', {}, res => { | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
if (res.data && res.data.avatarUrl) { | if (res.data && res.data.avatarUrl) { | ||||
if (!app.globalData.userInfoData) { | |||||
if (!app.globalData.userInfoData.nickName) { | |||||
this.data.userData.avatarUrl = res.data.avatarUrl; | this.data.userData.avatarUrl = res.data.avatarUrl; | ||||
this.data.userData.nickName = res.data.nickName; | this.data.userData.nickName = res.data.nickName; | ||||
this.data.userData.userLevel = res.data.userLevel; | this.data.userData.userLevel = res.data.userLevel; | ||||
nickName: res.data.nickName, | nickName: res.data.nickName, | ||||
userLevel: res.data.userLevel, | userLevel: res.data.userLevel, | ||||
}) | }) | ||||
} else if (app.globalData.userInfoData){ | |||||
} else if (app.globalData.userInfoData.nickName){ | |||||
if (app.globalData.userInfoData.userLevel != res.data.userLevel) { | if (app.globalData.userInfoData.userLevel != res.data.userLevel) { | ||||
this.data.userData.userLevel = res.data.userLevel; | this.data.userData.userLevel = res.data.userLevel; | ||||
app.globalData.userInfoData.userLevel = res.data.userLevel; | app.globalData.userInfoData.userLevel = res.data.userLevel; | ||||
this.setData({ | this.setData({ | ||||
userData: this.data.userData | userData: this.data.userData | ||||
}) | }) | ||||
if (!app.globalData.userInfoData){ | |||||
if (app.globalData.userInfoData.nickName){ | |||||
this.setData({ | this.setData({ | ||||
isLogin: true | isLogin: true | ||||
}) | }) | ||||
} | } | ||||
}, | }, | ||||
scrolltolower2:function(){ | scrolltolower2:function(){ | ||||
console.log(this.data.noData2); | |||||
if(!this.data.noData2){ | if(!this.data.noData2){ | ||||
this.data.parames2.page+=1; | this.data.parames2.page+=1; | ||||
this.getMyAwardList(); | this.getMyAwardList(); | ||||
} | } | ||||
}, | }, | ||||
scrolltolower3:function(){ | |||||
if(!this.data.noData3){ | |||||
this.data.parames3.page+=1; | |||||
this.getMyCouponList(); | |||||
} | |||||
}, | |||||
getMyAwardList: function () {//获取获奖记录 | getMyAwardList: function () {//获取获奖记录 | ||||
this.setData({ | this.setData({ | ||||
getState:true | getState:true | ||||
} | } | ||||
}, | }, | ||||
addressControl: function () {//跳转到地址管理 | addressControl: function () {//跳转到地址管理 | ||||
if (app.globalData.userInfoData) { | |||||
if (app.globalData.userInfoData.nickName) { | |||||
this.data.userData.avatarUrl = app.globalData.userInfoData.avatarUrl; | this.data.userData.avatarUrl = app.globalData.userInfoData.avatarUrl; | ||||
this.data.userData.nickName = app.globalData.userInfoData.nickName; | this.data.userData.nickName = app.globalData.userInfoData.nickName; | ||||
this.setData({ | this.setData({ | ||||
}) | }) | ||||
} | } | ||||
this.setData({ | this.setData({ | ||||
addressShow:!this.data.addressShow | |||||
addressShow:!this.data.addressShow, | |||||
mycenterTipWindow:0 | |||||
}) | }) | ||||
if (!this.data.isAddress){ | if (!this.data.isAddress){ | ||||
this.getAddress(); | this.getAddress(); | ||||
}) | }) | ||||
this.getMyAwardList(); | this.getMyAwardList(); | ||||
} | } | ||||
if(this.data.selectNow==4 && this.data.couponList.length && !this.data.addressShow){ | |||||
this.data.parames3.page = 1; | |||||
this.data.noData3 = false; | |||||
this.setData({ | |||||
couponList:[] | |||||
}) | |||||
this.getMyCouponList(); | |||||
} | |||||
}, | }, | ||||
agreementState: function () {//协议 | agreementState: function () {//协议 | ||||
this.setData({ | this.setData({ | ||||
}) | }) | ||||
}, | }, | ||||
getAddress: function () {//获取地址 | getAddress: function () {//获取地址 | ||||
app.wxRequest(app.globalData.urlRoot + "address/getAddress", {}, res => { | |||||
app.wxRequest(app.globalData.urlRoot + "address/getAddressV2", {}, res => { | |||||
if (res.code == 200) { | if (res.code == 200) { | ||||
if (res.data) { | if (res.data) { | ||||
this.data.isAddress = true; | this.data.isAddress = true; | ||||
url: '/pages/everyday/everyday', | url: '/pages/everyday/everyday', | ||||
}) | }) | ||||
}, | }, | ||||
vipDetailControl:function(){ | |||||
vipDetailControl:function(e){ | |||||
var index = e.currentTarget.dataset.index; | |||||
if (!this.data.couponList[index].addressState){ | |||||
this.setData({ | |||||
mycenterTipWindow:1, | |||||
}) | |||||
return; | |||||
} | |||||
this.setData({ | |||||
couponListCode:this.data.couponList[index].couponCode?this.data.couponList[index].couponCode:"" | |||||
}) | |||||
if(this.data.couponList[index].couponId=="175978"){ | |||||
this.vipDetailHide(); | |||||
}else if(this.data.couponList[index].couponId=="171748"){ | |||||
this.machineHide(); | |||||
}else if(this.data.couponList[index].couponId=="177275"){ | |||||
this.upgradeHide(); | |||||
} | |||||
}, | |||||
vipDetailHide:function(){ | |||||
this.setData({ | this.setData({ | ||||
vipDetailShow:!this.data.vipDetailShow | vipDetailShow:!this.data.vipDetailShow | ||||
}) | }) | ||||
}, | }, | ||||
machineHide:function(){ | |||||
this.setData({ | |||||
machineShow:!this.data.machineShow | |||||
}) | |||||
}, | |||||
upgradeHide:function(){ | |||||
this.setData({ | |||||
upgradeShow:!this.data.upgradeShow | |||||
}) | |||||
}, | |||||
cardCodeCopy:function(){ | cardCodeCopy:function(){ | ||||
this.contentCopy(this.data.buyStateCouponCode); | this.contentCopy(this.data.buyStateCouponCode); | ||||
} | } |
</view> | </view> | ||||
</scroll-view> | </scroll-view> | ||||
</view> | </view> | ||||
<!-- <view class="subscribeGroup" wx:if="{{selectNow==4}}"> | |||||
<view class="inputGroup"> | |||||
<input class="inputCode" bindinput="getRealname" value="{{subscribeData.realname}}" placeholder="请输入您的姓名"></input> | |||||
<scroll-view class="placingOrderGroup" wx:if="{{selectNow==4}}" scroll-y bindscrolltolower="scrolltolower3"> | |||||
<view class="orderDescGroup" wx:if="{{!couponList.length && !couponListState}}"> | |||||
<image class="orderDesc" src="{{imgUrl+'/newImages5/59.png'}}"></image> | |||||
<image class="indexOrderIcon" bindtap="placingControl" src="{{imgUrl+'/images/indexOrderIcon.png'}}"></image> | |||||
</view> | </view> | ||||
<view class="inputGroup"> | |||||
<input class="inputCode" bindinput="getMobile" type="number" value="{{subscribeData.mobile}}" maxlength='11' placeholder="请输入您的联系电话"></input> | |||||
<view class="getPhoneFrame" wx:if="{{!phoneInputShow}}"> | |||||
<button class="getPhoneBtn" style="width: 652rpx;height: 65rpx;margin: 0;padding: 0;min-height: 0;" open-type="getPhoneNumber" bindgetphonenumber="getUserPhone"></button> | |||||
</view> | |||||
</view> | |||||
<view class="inputGroup"> | |||||
<input class="inputCode" bindfocus="showSite" style="width:450rpx;" value="{{subscribeData.captcha}}" bindinput="getCaptcha" placeholder="请输入验证码"></input> | |||||
<view class="codeTime" bindtap="getCode">{{verificationCode}}</view> | |||||
</view> | |||||
<view wx:if="{{siteSelect}}"> | |||||
<picker mode='selector' range="{{provinceArr}}" range-key="province" value="{{provinceValue}}" bindchange="provinceChane"> | |||||
<view class="selectSiteGroup"> | |||||
<text class="selectName">{{provinceArr[provinceValue].province}}</text> | |||||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||||
<view class="placingOrderGroupList" wx:if="{{couponList.length}}"> | |||||
<view wx:for="{{couponList}}" wx:key="index"> | |||||
<view class="placingOrder" wx:if="{{item.couponId=='175978'}}"> | |||||
<view style="display:flex;align-items:center;"> | |||||
<image class="orderHead" src="{{imgUrl+'/newImages3/52.png'}}"></image> | |||||
<view style="margin-left:15rpx;margin-right:101rpx;"> | |||||
<view class="cardTitle">启辰星预售豪礼卡</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> | ||||
</picker> | |||||
<picker mode='selector' range="{{storeArr}}" range-key="agent_detail" value="{{storeValue}}" bindchange="storeChane"> | |||||
<view class="selectSiteGroup"> | |||||
<text class="selectName">{{storeArr[storeValue].agent_detail}}</text> | |||||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||||
<view class="placingOrder" wx:if="{{item.couponId=='171748'}}"> | |||||
<view style="display:flex;align-items:center;"> | |||||
<image class="orderHead" src="{{imgUrl+'/newImages5/70.png'}}" mode="aspectFit"></image> | |||||
<view style="margin-left:15rpx;margin-right:101rpx;"> | |||||
<view class="cardTitle">100元机油券</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> | ||||
</picker> | |||||
</view> | |||||
<view class="agreementGroup"> | |||||
<image class="agreeIcon" bindtap="agreementState" src="{{imgUrl+(isAgreement?'/images/agreeIcon.png?v=003':'/images/disagreeIcon.png?v=002')}}"></image> | |||||
<view class="agreementText"> | |||||
<image style="width:261rpx;height:23rpx;" src="{{imgUrl+'/images/myCenterAgreenTip.png'}}"></image> | |||||
<view bindtap="agreementControl"> | |||||
<image style="width:240rpx;height:23rpx;margin-left:3rpx;" src="{{imgUrl+'/images/myCenterAgreen.png'}}"></image> | |||||
<view class="placingOrder" wx:if="{{item.couponId=='177275'}}"> | |||||
<view style="display:flex;align-items:center;"> | |||||
<image class="orderHead" src="{{imgUrl+'/newImages5/71.png'}}" mode="aspectFit"></image> | |||||
<view style="margin-left:15rpx;margin-right:101rpx;"> | |||||
<view class="cardTitle">启辰星免费升舱卡</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> | </view> | ||||
</view> | </view> | ||||
<view class="subscribeBtn" bindtap="subscribeFun"> | |||||
<image style="width:100%;height:100%;" src="{{imgUrl+'/btns/myCenterBtn1.png'}}"></image> | |||||
<button wx:if="{{userData}}" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="getUserWxMsg" style="width:100%;height:100%;min-height:0;padding:0;margin:0;"></button> | |||||
</view> | |||||
<view class="subscribeBtn" bindtap="lookMore"> | |||||
<image style="width:100%;height:100%;" src="{{imgUrl+'/btns/myCenterBtn2.png'}}"></image></view> | |||||
</view> --> | |||||
<view class="orderDescGroup" wx:if="{{selectNow==4 && !buyState}}"> | |||||
<image class="orderDesc" src="{{imgUrl+'/newImages4/10.png'}}"></image> | |||||
<image class="indexOrderIcon" bindtap="placingControl" src="{{imgUrl+'/images/indexOrderIcon.png'}}"></image> | |||||
</view> | |||||
<view class="placingOrder" wx:if="{{selectNow==4 && buyState}}"> | |||||
<view style="display:flex;align-items:center;"> | |||||
<image class="orderHead" src="{{imgUrl+'/newImages3/52.png'}}"></image> | |||||
<view style="margin-left:15rpx;margin-right:101rpx;"> | |||||
<view class="cardTitle">启辰星预售豪礼卡</view> | |||||
<view class="cardCtime">{{buyStateTime}}</view> | |||||
</view> | |||||
</view> | |||||
<image class="orderCard" bindtap="vipDetailControl" src="{{imgUrl+'/newImages3/48.png'}}"></image> | |||||
<!-- <view style="display:flex;align-items:center;"> | |||||
<image class="recordTip" bindtap="vipDetailControl" style="margin-right:25rpx;" src="{{imgUrl+'/images/recordTip.png'}}"></image> | |||||
<image class="orderCard" src="{{imgUrl+'/newImages2/67.png'}}"></image> | |||||
</view> --> | |||||
</view> | |||||
</scroll-view> | |||||
<service></service> | <service></service> | ||||
<view class="prizeDesc" catchtouchmove="ture" wx:if="{{mycenterTipWindow==1}}"> | <view class="prizeDesc" catchtouchmove="ture" wx:if="{{mycenterTipWindow==1}}"> | ||||
<view class="mycenterTipWindowGroup"> | <view class="mycenterTipWindowGroup"> | ||||
<view class="prizeDesc" style="background-color:white;display:block;overflow:auto;" wx:if="{{vipDetailShow}}"> | <view class="prizeDesc" style="background-color:white;display:block;overflow:auto;" wx:if="{{vipDetailShow}}"> | ||||
<view class="titleText">查看详情</view> | <view class="titleText">查看详情</view> | ||||
<view class="lineSty"></view> | <view class="lineSty"></view> | ||||
<image class="closeXieyi" bindtap="vipDetailControl" src="{{imgUrl+'/images/closeXieyi.png'}}"></image> | |||||
<image class="closeXieyi" bindtap="vipDetailHide" src="{{imgUrl+'/images/closeXieyi.png'}}"></image> | |||||
<view style="position:relative;"> | |||||
<image style="width:750rpx;height:1810rpx;" src="{{imgUrl+'/newImages5/58.png?v=003'}}"></image> | |||||
<image class="newImages3-45" bindtap="vipDetailHide" src="{{imgUrl+'/newImages3/45.png'}}"></image> | |||||
</view> | |||||
<view class="cardCode" 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="{{machineShow}}"> | |||||
<view class="titleText">查看详情</view> | |||||
<view class="lineSty"></view> | |||||
<image class="closeXieyi" bindtap="machineHide" src="{{imgUrl+'/images/closeXieyi.png'}}"></image> | |||||
<view style="position:relative;"> | |||||
<image style="width:750rpx;height:1206rpx;" src="{{imgUrl+'/newImages5/73.png?v=003'}}"></image> | |||||
</view> | |||||
<view class="cardCode" wx:if="{{couponListCode}}" style="left:220rpx;top:415rpx;font-size:24rpx;color:#a99247;">{{couponListCode}}<view bindtap="cardCodeCopy" class="cardCodeCopy">复制</view></view> | |||||
</view> | |||||
<view class="prizeDesc" style="background-color:white;display:block;overflow:auto;" wx:if="{{upgradeShow}}"> | |||||
<view class="titleText">查看详情</view> | |||||
<view class="lineSty"></view> | |||||
<image class="closeXieyi" bindtap="upgradeHide" src="{{imgUrl+'/images/closeXieyi.png'}}"></image> | |||||
<view style="position:relative;"> | <view style="position:relative;"> | ||||
<image style="width:750rpx;height:1700rpx;" src="{{imgUrl+'/newImages4/11.png?v=002'}}"></image> | |||||
<image class="newImages3-45" bindtap="vipDetailControl" src="{{imgUrl+'/newImages3/45.png'}}"></image> | |||||
<image style="width:750rpx;height:1410rpx;" src="{{imgUrl+'/newImages5/72.png?v=003'}}"></image> | |||||
</view> | </view> | ||||
<view class="cardCode">{{buyStateCouponCode}}<view bindtap="cardCodeCopy" class="cardCodeCopy">复制</view></view> | |||||
<!-- <view class="vipDetail"> | |||||
<image style="width:100%;height:100%;" src="{{imgUrl+'/newImages2/46.png?v=001'}}"></image> | |||||
<image class="vipDetailY" bindtap="vipDetailControl" src="{{imgUrl+'/newImages2/45.png'}}"></image> | |||||
</view> --> | |||||
<view class="cardCode" wx:if="{{couponListCode}}" style="left:168rpx;top:480rpx;font-size:20rpx;color:white;">{{couponListCode}}<view bindtap="cardCodeCopy" class="cardCodeCopy2">复制</view></view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<agreement bindmyevent="agreementControl" wx:if="{{agreement}}"></agreement> | <agreement bindmyevent="agreementControl" wx:if="{{agreement}}"></agreement> |
} | } | ||||
.orderDesc{ | .orderDesc{ | ||||
width: 634rpx; | width: 634rpx; | ||||
height: 1145rpx; | |||||
height: 1193rpx; | |||||
margin-bottom: 81rpx; | margin-bottom: 81rpx; | ||||
} | } | ||||
/* .ranksList{ | /* .ranksList{ | ||||
} | } | ||||
.placingOrder{ | .placingOrder{ | ||||
width: 610rpx; | width: 610rpx; | ||||
margin: 0 auto; | |||||
margin-top: 37rpx; | |||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
box-sizing: border-box; | box-sizing: border-box; | ||||
margin-bottom: 154rpx; | |||||
border-bottom: 2rpx solid #DBD9DC; | border-bottom: 2rpx solid #DBD9DC; | ||||
padding-bottom: 11rpx; | padding-bottom: 11rpx; | ||||
margin-bottom: 20rpx; | |||||
} | } | ||||
.orderHead{ | .orderHead{ | ||||
width: 163rpx; | width: 163rpx; | ||||
margin-left: 20rpx; | margin-left: 20rpx; | ||||
border-radius: 15rpx; | border-radius: 15rpx; | ||||
} | } | ||||
.cardCodeCopy2{ | |||||
margin-left: 15rpx; | |||||
width:66rpx; | |||||
height:20rpx; | |||||
border:2rpx solid rgba(231,228,230,1); | |||||
border-radius:10rpx; | |||||
text-align: center; | |||||
font-size:16rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:400; | |||||
color:rgba(250,246,246,1); | |||||
line-height:20rpx; | |||||
} | |||||
.newImages3-58{ | .newImages3-58{ | ||||
width: 660rpx; | width: 660rpx; | ||||
height: 96rpx; | height: 96rpx; | ||||
margin: 0 auto; | margin: 0 auto; | ||||
} | |||||
.placingOrderGroup{ | |||||
height: 589rpx; | |||||
} | |||||
.placingOrderGroupList{ | |||||
padding: 20rpx 0; | |||||
display: flex; | |||||
align-items: center; | |||||
flex-direction: column; | |||||
} | } |
// pages/perfectMsg/perfectMsg.js | |||||
const app = getApp(); | |||||
Page({ | |||||
/** | |||||
* 页面的初始数据 | |||||
*/ | |||||
data: { | |||||
imgUrl: app.globalData.urlStatic,//图片路径 | |||||
selectType:2,//选中的手机号类型 | |||||
marginT: 0, | |||||
verificationCode:"获取验证码", | |||||
sendCode:true, | |||||
mobile2:"", | |||||
phoneInputShow: false, | |||||
isUserAddress:true,//用户是否有地址 | |||||
submitData:{ | |||||
realName:"",//姓名 | |||||
mobile:"",//手机号 | |||||
province:"",//经销商省份 | |||||
city:"",//经销商城市 | |||||
agent_code:"",//经销商编码 | |||||
agentDetail:"",//经销商详情 | |||||
addressDetail:"",//地址详情 | |||||
scene:"",//场景值名称 | |||||
captcha:"",//验证码(若非微信绑定手机号需要传入) | |||||
}, | |||||
provinceDataAll: null,//地区所有数据 | |||||
provinceDataArr: [[""], [""]],//省市数据 | |||||
provinceDataValue: [0, 0],//选中的省市下标 | |||||
nowProvince: "",//选中的省市文字 | |||||
storeArr: [],//专营店数据 | |||||
storeValue: 0,//选中的专营店下标 | |||||
httpState:false,//是否正在进行http请求 | |||||
windowTipShow:false,//是否显示完善信息后的弹窗 | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面加载 | |||||
*/ | |||||
onLoad: function (options) { | |||||
app.globalData.nowPage = 3; | |||||
if (app.globalData.openid) { | |||||
this.loadFun(); | |||||
} else { | |||||
app.globalData.openidSuccessFuc = this.loadFun; | |||||
} | |||||
if (app.globalData.userPhoneType == "ios") { | |||||
this.setData({ | |||||
marginT: -20 | |||||
}) | |||||
} | |||||
}, | |||||
loadFun:function(){ | |||||
if (app.globalData.userMobile) { | |||||
this.data.submitData.mobile = app.globalData.userMobile; | |||||
this.setData({ | |||||
phoneInputShow: true, | |||||
submitData: this.data.submitData | |||||
}) | |||||
} | |||||
this.getAddress(); | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面初次渲染完成 | |||||
*/ | |||||
onReady: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面显示 | |||||
*/ | |||||
onShow: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面隐藏 | |||||
*/ | |||||
onHide: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面卸载 | |||||
*/ | |||||
onUnload: function () { | |||||
}, | |||||
/** | |||||
* 页面相关事件处理函数--监听用户下拉动作 | |||||
*/ | |||||
onPullDownRefresh: function () { | |||||
}, | |||||
/** | |||||
* 页面上拉触底事件的处理函数 | |||||
*/ | |||||
onReachBottom: function () { | |||||
}, | |||||
/** | |||||
* 用户点击右上角分享 | |||||
*/ | |||||
onShareAppMessage: function () { | |||||
}, | |||||
enterLucky:function(){//每日抽奖 | |||||
wx.navigateTo({ | |||||
url: '/pages/luckyStar/luckyStar' | |||||
}) | |||||
}, | |||||
ruleControl:function(){//规则显示控制 | |||||
this.setData({ | |||||
ruleShow:!this.data.ruleShow | |||||
}) | |||||
}, | |||||
chooseType:function(e){//选中的手机号类型 | |||||
if(e){ | |||||
this.setData({ | |||||
selectType:e.currentTarget.dataset.type | |||||
}) | |||||
}else{ | |||||
this.setData({ | |||||
selectType:1 | |||||
}) | |||||
} | |||||
}, | |||||
getAddressDetail: function (e) {//获取详细地址 | |||||
this.data.submitData.addressDetail = e.detail.value; | |||||
this.setData({ | |||||
submitData:this.data.submitData | |||||
}) | |||||
}, | |||||
getRealName:function(e){//获取用户输入的姓名 | |||||
this.data.submitData.realName = e.detail.value; | |||||
this.setData({ | |||||
submitData:this.data.submitData | |||||
}) | |||||
}, | |||||
getMobile:function(e){//获取用户输入的电话 | |||||
this.setData({ | |||||
mobile2:e.detail.value | |||||
}) | |||||
}, | |||||
getCaptcha: function (e) {//获取用户输入的验证码 | |||||
this.data.submitData.captcha = e.detail.value; | |||||
this.setData({ | |||||
submitData:this.data.submitData | |||||
}) | |||||
}, | |||||
getCode: function (e) {//获取验证码 | |||||
if (!app.mobileVerify(this.data.mobile2)) { | |||||
if (this.data.mobile2) { | |||||
wx.showToast({ | |||||
title: '请输入正确的电话', | |||||
icon: 'none' | |||||
}) | |||||
} else { | |||||
wx.showToast({ | |||||
title: '请输入电话', | |||||
icon: 'none' | |||||
}) | |||||
} | |||||
return; | |||||
} | |||||
if (!this.data.sendCode) { | |||||
return; | |||||
} | |||||
this.data.sendCode = false; | |||||
app.wxRequest(app.globalData.urlRoot + "captcha/sendCaptcha", { mobile: this.data.mobile2 }, res => { | |||||
if (res.code == 200) { | |||||
this.countDown(); | |||||
wx.showToast({ | |||||
title: '验证码获取成功', | |||||
icon: "none" | |||||
}) | |||||
this.setData({ | |||||
verificationCode: 60 | |||||
}) | |||||
} else { | |||||
this.data.sendCode = true; | |||||
wx.showToast({ | |||||
title: res.msg, | |||||
icon: "none" | |||||
}) | |||||
} | |||||
}, this) | |||||
}, | |||||
countDown: function () {//倒计时 | |||||
setTimeout(() => { | |||||
this.setData({ | |||||
verificationCode: this.data.verificationCode - 1 | |||||
}) | |||||
if (this.data.verificationCode > 0) { | |||||
this.countDown(); | |||||
} else { | |||||
this.setData({ | |||||
verificationCode: "获取验证码" | |||||
}) | |||||
this.data.sendCode = true; | |||||
} | |||||
}, 1000); | |||||
}, | |||||
getUserPhone: function (e) {//获取用户手机号 | |||||
if (e.detail.errMsg == 'getPhoneNumber:ok') { | |||||
app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | |||||
if (res.code == 200) { | |||||
this.setData({ | |||||
phoneInputShow: true | |||||
}) | |||||
this.chooseType(); | |||||
if (res.data && res.data.decodeData) { | |||||
this.data.submitData.mobile = res.data.decodeData.phoneNumber; | |||||
this.setData({ | |||||
submitData: this.data.submitData | |||||
}) | |||||
} | |||||
} else { | |||||
wx.showToast({ | |||||
title: res.msg, | |||||
icon: "none" | |||||
}) | |||||
} | |||||
}, this); | |||||
} | |||||
}, | |||||
getAddress: function () {//获取地址 | |||||
app.wxRequest(app.globalData.urlRoot + "address/getAddressV2", {}, res => { | |||||
console.log(res); | |||||
if (res.code == 200) { | |||||
if (res.data) { | |||||
this.data.submitData.realName = res.data.realName; | |||||
this.data.submitData.mobile = res.data.mobile; | |||||
this.data.submitData.province = res.data.province; | |||||
this.data.submitData.city = res.data.city; | |||||
this.data.submitData.addressDetail = res.data.addressDetail; | |||||
this.setData({ | |||||
submitData: this.data.submitData, | |||||
mobile2:res.data.mobile | |||||
}) | |||||
// if(!res.data.agentDetail){ | |||||
this.getDistributorList("",""); | |||||
// this.getUserLocation();//获取用户当前位置 | |||||
// } | |||||
}else{ | |||||
this.getUserLocation();//获取用户当前位置 | |||||
this.setData({ | |||||
isUserAddress:false | |||||
}) | |||||
} | |||||
} else { | |||||
wx.showToast({ | |||||
title: res.msg, | |||||
icon: "none" | |||||
}) | |||||
} | |||||
}, this); | |||||
}, | |||||
getUserLocation: function (e) {//获取用户地理位置 | |||||
wx.getLocation({ | |||||
type: 'wgs84', //wgs84 gcj02 | |||||
success: (res) => { | |||||
this.getDistributorList(res.longitude, res.latitude); | |||||
}, | |||||
fail: (res) => { | |||||
this.getDistributorList("", ""); | |||||
} | |||||
}) | |||||
}, | |||||
getDistributorList: function (longitude, latitude) {//获取经销商列表 | |||||
app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude }, res => { | |||||
if (res.code == 200) { | |||||
//整理数据 | |||||
var datas = res.data; | |||||
var province = []; | |||||
var city = []; | |||||
for (let i = 0; i < res.data.list.length; i++) { | |||||
province.push(res.data.list[i].province); | |||||
} | |||||
if(this.data.submitData.province){ | |||||
for(let i=0;i<province.length;i++){ | |||||
if(province[i]==this.data.submitData.province){ | |||||
res.data.nearData.provinceIndex = i; | |||||
} | |||||
} | |||||
} | |||||
for (let j = 0; j < res.data.list[res.data.nearData.provinceIndex].children.length; j++) { | |||||
city.push(res.data.list[res.data.nearData.provinceIndex].children[j].city) | |||||
} | |||||
if(this.data.submitData.city){ | |||||
for(let i=0;i<city.length;i++){ | |||||
if(city[i]==this.data.submitData.city){ | |||||
res.data.nearData.cityIndex = i; | |||||
} | |||||
} | |||||
} | |||||
if(this.data.submitData.agentDetail){ | |||||
for(let i=0;i<res.data.list[res.data.nearData.provinceIndex].children[res.data.nearData.cityIndex].children.length;i++){ | |||||
if(res.data.list[res.data.nearData.provinceIndex].children[res.data.nearData.cityIndex].children[i]==this.data.submitData.agentDetail){ | |||||
res.data.nearData.agentIndex = i; | |||||
} | |||||
} | |||||
}else{ | |||||
res.data.nearData.agentIndex = 0; | |||||
} | |||||
//将数据赋值给变量 | |||||
var storeArr = res.data.list[res.data.nearData.provinceIndex].children[res.data.nearData.cityIndex].children; | |||||
var storeValue = res.data.nearData.agentIndex; | |||||
this.data.submitData.agentDetail = storeArr[storeValue].agent_detail; | |||||
this.data.submitData.agent_code = storeArr[storeValue].agent_code; | |||||
this.data.submitData.province = province[res.data.nearData.provinceIndex]; | |||||
this.data.submitData.city = city[res.data.nearData.cityIndex]; | |||||
this.setData({ | |||||
provinceDataAll: res.data.list, | |||||
provinceDataArr: [province, city], | |||||
provinceDataValue: [res.data.nearData.provinceIndex, res.data.nearData.cityIndex], | |||||
nowProvince: province[res.data.nearData.provinceIndex] + " " + city[res.data.nearData.cityIndex], | |||||
storeArr: storeArr, | |||||
storeValue: storeValue | |||||
}) | |||||
} else { | |||||
wx.showToast({ | |||||
title: res.msg, | |||||
icon: "none" | |||||
}) | |||||
} | |||||
}, this); | |||||
}, | |||||
provinceDataChange: function (e) { | |||||
if (e.detail.column == 0) { | |||||
var city = []; | |||||
for (let i = 0; i < this.data.provinceDataAll[e.detail.value].children.length; i++) { | |||||
city.push(this.data.provinceDataAll[e.detail.value].children[i].city); | |||||
} | |||||
this.data.provinceDataArr[1] = city; | |||||
this.setData({ | |||||
provinceDataArr: this.data.provinceDataArr | |||||
}) | |||||
} | |||||
}, | |||||
provinceDataChane: function (e) { | |||||
this.setData({ | |||||
provinceDataValue: e.detail.value, | |||||
nowProvince: this.data.provinceDataArr[0][e.detail.value[0]] + " " + this.data.provinceDataArr[1][e.detail.value[1]], | |||||
storeArr: this.data.provinceDataAll[e.detail.value[0]].children[e.detail.value[1]].children, | |||||
storeValue: 0 | |||||
}) | |||||
}, | |||||
storeChane: function (e) { | |||||
this.setData({ | |||||
storeValue: e.detail.value | |||||
}) | |||||
}, | |||||
submitUserMsg:function(){//数据提交 | |||||
if (!this.data.submitData.realName) { | |||||
wx.showToast({ | |||||
title: '请输入姓名', | |||||
icon: "none" | |||||
}) | |||||
return; | |||||
} | |||||
if (!this.data.mobile2 && this.data.selectType==2) { | |||||
wx.showToast({ | |||||
title: '请输入电话', | |||||
icon: "none" | |||||
}) | |||||
return; | |||||
} | |||||
if (this.data.selectType == 2) { | |||||
if (!this.data.submitData.captcha) { | |||||
wx.showToast({ | |||||
title: '请输入验证码', | |||||
icon: "none" | |||||
}) | |||||
return; | |||||
} | |||||
} | |||||
if(this.data.httpState){ | |||||
return; | |||||
} | |||||
this.data.httpState = true; | |||||
this.data.submitData.province = this.data.provinceDataArr[0][this.data.provinceDataValue[0]]; | |||||
this.data.submitData.city = this.data.provinceDataArr[1][this.data.provinceDataValue[1]]; | |||||
this.data.submitData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | |||||
this.data.submitData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | |||||
this.data.submitData.scene = app.globalData.sceneSource; | |||||
if(this.data.isUserAddress){ | |||||
this.updateAddress(); | |||||
}else{ | |||||
this.addAddress(); | |||||
} | |||||
}, | |||||
addAddress: function () {//添加地址 | |||||
var mobile = this.data.submitData.mobile; | |||||
if(this.data.selectType==2){ | |||||
this.data.submitData.mobile = this.data.mobile2; | |||||
} | |||||
app.wxRequest(app.globalData.urlRoot + "address/addAddressV2", this.data.submitData, res => { | |||||
this.data.httpState = false; | |||||
if (res.code == 200) { | |||||
this.windowTipControl(); | |||||
}else{ | |||||
this.data.submitData.mobile = mobile; | |||||
wx.showToast({ | |||||
title: res.msg, | |||||
}) | |||||
} | |||||
}, this, "POST") | |||||
}, | |||||
updateAddress: function () {//更新地址 | |||||
var mobile = this.data.submitData.mobile; | |||||
if(this.data.selectType==2){ | |||||
this.data.submitData.mobile = this.data.mobile2; | |||||
} | |||||
app.wxRequest(app.globalData.urlRoot + "address/updateAddressV2", this.data.submitData, res => { | |||||
this.data.httpState = false; | |||||
if (res.code == 200) { | |||||
this.windowTipControl(); | |||||
}else{ | |||||
this.data.submitData.mobile = mobile; | |||||
wx.showToast({ | |||||
title: res.msg, | |||||
}) | |||||
} | |||||
}, this, "POST"); | |||||
}, | |||||
windowTipControl:function(){ | |||||
this.setData({ | |||||
windowTipShow:!this.data.windowTipShow | |||||
}) | |||||
}, | |||||
enterGuess:function(){//去竞猜 | |||||
wx.redirectTo({ | |||||
url: '/pages/guessSecondPrize/guessSecondPrize', | |||||
}) | |||||
} | |||||
}) |
{ | |||||
"navigationBarTitleText": "东风启辰“猜出惊喜”", | |||||
"usingComponents": { | |||||
"tabBar": "../component/tabBar/index" | |||||
} | |||||
} |
<!--pages/perfectMsg/perfectMsg.wxml--> | |||||
<view class="main"> | |||||
<view class="mainGroup"> | |||||
<image class="pageBg" src="{{imgUrl+'/versions/20.png?v=002'}}"></image> | |||||
<view class="pageTitle">完善个人信息</view> | |||||
<view class="selectGroup"> | |||||
<view style="position: relative;"> | |||||
<view class="selectType {{selectType==1?'selectType2':''}}" bindtap="chooseType" data-type="1" style="margin-bottom:20rpx;">使用微信绑定手机号</view> | |||||
<view class="getPhoneFrame" wx:if="{{!phoneInputShow}}"> | |||||
<button class="getPhoneBtn" style="width: 100%;height: 100%;margin: 0;padding: 0;min-height: 0;" open-type="getPhoneNumber" bindgetphonenumber="getUserPhone"></button> | |||||
</view> | |||||
</view> | |||||
<view class="selectType {{selectType==2?'selectType2':''}}" bindtap="chooseType" data-type="2">使用手机号码</view> | |||||
</view> | |||||
<view class="userMsgFrame"> | |||||
<view class="userMsgGroup"> | |||||
<view class="userMsgTitle">姓名</view> | |||||
<input class="userMsgInput" placeholder="请输入您的姓名" bindinput="getRealName" value="{{submitData.realName}}" placeholder-style="color:#99999A;"></input> | |||||
</view> | |||||
<view class="userMsgGroup" wx:if="{{selectType==1}}"> | |||||
<view class="userMsgTitle">电话</view> | |||||
<view class="userMsgInput">{{submitData.mobile}}</view> | |||||
</view> | |||||
<view class="userMsgGroup" wx:if="{{selectType==2}}"> | |||||
<view class="userMsgTitle">电话</view> | |||||
<input class="userMsgInput" type="number" maxlength="11" bindinput="getMobile" value="{{mobile2}}" placeholder="请输入您的联系电话" placeholder-style="color:#99999A;"></input> | |||||
</view> | |||||
<view class="userMsgGroup" wx:if="{{selectType==2}}" style="justify-content: flex-end;"> | |||||
<view class="userMsgGroup2"> | |||||
<input class="userMsgInput" style="width:350rpx;" bindinput="getCaptcha" placeholder="请输入验证码" placeholder-style="color:#99999A;"></input> | |||||
<view class="getCode" bindtap="getCode">{{verificationCode}}</view> | |||||
</view> | |||||
</view> | |||||
<view class="userMsgGroup"> | |||||
<view class="userMsgTitle">当前城市</view> | |||||
<picker mode="multiSelector" range="{{provinceDataArr}}" value="{{provinceDataValue}}" bindcolumnchange="provinceDataChange" bindchange="provinceDataChane"> | |||||
<view class="userMsgInput">{{nowProvince}}</view> | |||||
</picker> | |||||
</view> | |||||
<view class="userMsgGroup"> | |||||
<view class="userMsgTitle">专营店</view> | |||||
<picker mode="selector" range="{{storeArr}}" range-key="agent_detail" value="{{storeValue}}" bindchange="storeChane"> | |||||
<view class="userMsgInput">{{storeArr[storeValue].agent_detail}}</view> | |||||
</picker> | |||||
</view> | |||||
</view> | |||||
<view class="userMsgDetailGroup"> | |||||
<view class="userMsgDetail"> | |||||
<view class="detailTitle">收货地址:</view> | |||||
<textarea class="addressTextarea" maxlength="-1" value="{{submitData.addressDetail}}" style="margin-top:{{marginT}}rpx;width:490rpx;" bindinput="getAddressDetail"></textarea> | |||||
</view> | |||||
</view> | |||||
<image class="submitBtn" bindtap="submitUserMsg" src="{{imgUrl+'/newImages5/18.png'}}"></image> | |||||
</view> | |||||
<image class="drawBtn" bindtap="ruleControl" src="{{imgUrl+'/versions/7.png'}}"></image> | |||||
<image class="yuyue" bindtap="enterLucky" src="{{imgUrl+'/versions/1.png'}}"></image> | |||||
<view class="ruleFrame" wx:if="{{ruleShow}}"> | |||||
<image class="gameRule" src="{{imgUrl+'/newImages4/17.png'}}"></image> | |||||
<image class="closeRule" bindtap="ruleControl" src="{{imgUrl+'/versions/21.png'}}"></image> | |||||
</view> | |||||
<view class="ruleFrame ruleFrame2" wx:if="{{windowTipShow}}"> | |||||
<view class="windowTipGroup"> | |||||
<image class="windowTipImg" src="{{imgUrl+'/newImages5/49.png'}}"></image> | |||||
<image class="windowTipBtn" bindtap="enterGuess" src="{{imgUrl+'/newImages5/48.png'}}"></image> | |||||
<image class="windowTipClose" bindtap="enterGuess" src="{{imgUrl+'/newImages5/50.png'}}"></image> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<tabBar></tabBar> |
/* pages/perfectMsg/perfectMsg.wxss */ | |||||
image{ | |||||
display: block; | |||||
} | |||||
view{ | |||||
-webkit-overflow-scrolling: touch; | |||||
} | |||||
.main{ | |||||
height: calc(100vh - 120rpx); | |||||
overflow: auto; | |||||
position: relative; | |||||
} | |||||
.pageBg{ | |||||
position: absolute; | |||||
left: 0; | |||||
bottom: 0; | |||||
width: 750rpx; | |||||
height: 1506rpx; | |||||
z-index: -1; | |||||
} | |||||
.drawBtn{ | |||||
width: 81rpx; | |||||
height: 81rpx; | |||||
position: fixed; | |||||
right: 35rpx; | |||||
top: 107rpx; | |||||
} | |||||
.yuyue{ | |||||
width: 81rpx; | |||||
height: 81rpx; | |||||
position: fixed; | |||||
right: 35rpx; | |||||
top: 214rpx; | |||||
} | |||||
.ruleFrame{ | |||||
position: fixed; | |||||
top:0; | |||||
left: 0; | |||||
height: calc(100vh - 120rpx); | |||||
overflow: auto; | |||||
} | |||||
.gameRule{ | |||||
width: 750rpx; | |||||
height: 2362rpx; | |||||
margin-top: -1rpx; | |||||
} | |||||
.closeRule{ | |||||
position: fixed; | |||||
right: 70rpx; | |||||
top: 102rpx; | |||||
width: 56rpx; | |||||
height: 57rpx; | |||||
} | |||||
.pageTitle{ | |||||
margin: 0 auto; | |||||
width: 650rpx; | |||||
line-height: 40rpx; | |||||
font-size:40rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:400; | |||||
color:rgba(255,255,255,1); | |||||
padding-top: 200rpx; | |||||
padding-bottom: 30rpx; | |||||
border-bottom: 2rpx solid #73788d; | |||||
} | |||||
.selectGroup{ | |||||
margin: 0 auto; | |||||
width: 650rpx; | |||||
margin-top: 85rpx; | |||||
margin-bottom: 45rpx; | |||||
} | |||||
.selectType{ | |||||
border:2rpx solid #73788d; | |||||
border-radius: 20rpx; | |||||
width: 100%; | |||||
height: 70rpx; | |||||
line-height: 70rpx; | |||||
font-size:30rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:300; | |||||
color:rgba(255,255,255,1); | |||||
text-align: center; | |||||
} | |||||
.selectType2{ | |||||
background-color: white; | |||||
color: #182a72; | |||||
} | |||||
.userMsgFrame{ | |||||
margin: 0 auto; | |||||
width: 650rpx; | |||||
} | |||||
.userMsgGroup{ | |||||
width: 100%; | |||||
height: 65rpx; | |||||
margin-bottom: 15rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-between; | |||||
} | |||||
.userMsgGroup2{ | |||||
width: 540rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-between; | |||||
} | |||||
.userMsgTitle{ | |||||
line-height: 24rpx; | |||||
font-size:24rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:400; | |||||
color:rgba(255,255,255,1); | |||||
} | |||||
.userMsgInput{ | |||||
width: 540rpx; | |||||
height:65rpx; | |||||
padding: 0 30rpx; | |||||
border:2rpx solid #73788d; | |||||
border-radius: 20rpx; | |||||
line-height: 65rpx; | |||||
font-size:24rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:300; | |||||
color:white; | |||||
box-sizing: border-box; | |||||
} | |||||
.getCode{ | |||||
width:162rpx; | |||||
height:50rpx; | |||||
text-align: center; | |||||
background-color: white; | |||||
line-height:50rpx; | |||||
font-size:24rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:400; | |||||
color:rgba(24,42,114,1); | |||||
border-radius: 20rpx; | |||||
} | |||||
.selectIcon{ | |||||
width: 23rpx; | |||||
height: 13rpx; | |||||
} | |||||
.submitBtn{ | |||||
width: 711rpx; | |||||
height: 70rpx; | |||||
margin: 0 auto; | |||||
} | |||||
.userMsgDetailGroup{ | |||||
padding-top: 25rpx; | |||||
padding-bottom: 90rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
} | |||||
.userMsgDetail{ | |||||
width:700rpx; | |||||
height:100rpx; | |||||
padding: 20rpx 30rpx; | |||||
border:2rpx solid #73788d; | |||||
border-radius: 20rpx; | |||||
box-sizing: border-box; | |||||
display: flex; | |||||
} | |||||
.mainGroup{ | |||||
position: relative; | |||||
padding-bottom: 87rpx; | |||||
} | |||||
.detailTitle{ | |||||
line-height: 24rpx; | |||||
font-size:24rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:400; | |||||
color:rgba(255,255,255,1); | |||||
} | |||||
.addressTextarea{ | |||||
width: 500rpx; | |||||
height: 60rpx; | |||||
line-height: 30rpx; | |||||
font-size:24rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:300; | |||||
color:white; | |||||
} | |||||
.getPhoneFrame{ | |||||
position: absolute; | |||||
left: 0; | |||||
top: 0; | |||||
width:100%; | |||||
height: 70rpx; | |||||
z-index: 2; | |||||
} | |||||
.getPhoneBtn{ | |||||
opacity: 0; | |||||
} | |||||
.ruleFrame2{ | |||||
width: 100%; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
background-color: rgba(0,0,0,0.5); | |||||
z-index: 9; | |||||
} | |||||
.windowTipGroup{ | |||||
position: relative; | |||||
width: 501rpx; | |||||
height: 550rpx; | |||||
} | |||||
.windowTipImg{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
.windowTipBtn{ | |||||
position: absolute; | |||||
left: 50%; | |||||
transform: translateX(-50%); | |||||
bottom: 66rpx; | |||||
width: 389rpx; | |||||
height: 60rpx; | |||||
} | |||||
.windowTipClose{ | |||||
position: absolute; | |||||
width: 42rpx; | |||||
height: 42rpx; | |||||
top: -32rpx; | |||||
right: -32rpx; | |||||
} |
<image class="closeTip" bindtap="tipShowControl" src="{{imgUrl+'/newImages4/15.png'}}"></image> | <image class="closeTip" bindtap="tipShowControl" src="{{imgUrl+'/newImages4/15.png'}}"></image> | ||||
<image class="tipGroupBg" src="{{imgUrl+'/newImages4/12.png'}}"></image> | <image class="tipGroupBg" src="{{imgUrl+'/newImages4/12.png'}}"></image> | ||||
<view class="tipGroupContent"> | <view class="tipGroupContent"> | ||||
<image class="tipGroupContentImg" src="{{imgUrl+'/newImages4/13.png'}}"></image> | |||||
<image class="tipGroupContentImg" src="{{imgUrl+'/newImages5/57.png'}}"></image> | |||||
<image class="tipGroupContentBtn" bindtap="tipShowControl2" src="{{imgUrl+'/newImages4/14.png'}}"></image> | <image class="tipGroupContentBtn" bindtap="tipShowControl2" src="{{imgUrl+'/newImages4/14.png'}}"></image> | ||||
</view> | </view> | ||||
</view> | </view> |
overflow: auto; | overflow: auto; | ||||
} | } | ||||
.tipGroupContentImg{ | .tipGroupContentImg{ | ||||
width: 634rpx; | |||||
height: 1862rpx; | |||||
width: 633rpx; | |||||
height: 1910rpx; | |||||
} | } | ||||
.tipGroupContentBtn{ | .tipGroupContentBtn{ | ||||
width: 429rpx; | width: 429rpx; |
data: { | data: { | ||||
imgUrl: app.globalData.urlStatic,//图片路径 | imgUrl: app.globalData.urlStatic,//图片路径 | ||||
submitData: { | submitData: { | ||||
realName: "", | |||||
realName: "",//姓名 | |||||
mobile: "",//电话 | mobile: "",//电话 | ||||
province: "",//省份 | |||||
city: "",//城市 | |||||
district: "",//地区 | |||||
addressDetail: ""//详细 | |||||
province: "",//经销商省份 | |||||
city: "",//经销商城市 | |||||
agent_code:"",//经销商编码 | |||||
agentDetail:"",//经销商详情 | |||||
addressDetail: "",//地址详情 | |||||
captcha:"", | |||||
scene:"",//场景值名称 | |||||
}, | }, | ||||
mobile2:"", | |||||
selectType:2, | |||||
avatarUrlShow:"", | avatarUrlShow:"", | ||||
userData:{ | userData:{ | ||||
avatarUrl:"", | avatarUrl:"", | ||||
}, | }, | ||||
isAddress: false,//是否有地址 | isAddress: false,//是否有地址 | ||||
marginT: 0, | marginT: 0, | ||||
submitDataState:false | |||||
submitDataState:false, | |||||
verificationCode:"获取验证码", | |||||
sendCode:true, | |||||
phoneInputShow: false,//是否显示电话输入框 | |||||
provinceDataAll: null,//地区所有数据 | |||||
provinceDataArr: [[""], [""]],//省市数据 | |||||
provinceDataValue: [0, 0],//选中的省市下标 | |||||
nowProvince: "",//选中的省市文字 | |||||
storeArr: [],//专营店数据 | |||||
storeValue: 0,//选中的专营店下标 | |||||
}, | }, | ||||
attached:function(){ | attached:function(){ | ||||
if (app.globalData.userPhoneType == "ios") { | if (app.globalData.userPhoneType == "ios") { | ||||
*/ | */ | ||||
methods: { | methods: { | ||||
loadFun: function () { | loadFun: function () { | ||||
if (app.globalData.userInfoData) { | |||||
if (app.globalData.userMobile) { | |||||
this.data.submitData.mobile = app.globalData.userMobile; | |||||
this.setData({ | |||||
phoneInputShow: true, | |||||
submitData: this.data.submitData | |||||
}) | |||||
} | |||||
if (app.globalData.userInfoData.nickName) { | |||||
this.data.userData.avatarUrl = app.globalData.userInfoData.avatarUrl; | this.data.userData.avatarUrl = app.globalData.userInfoData.avatarUrl; | ||||
this.data.userData.nickName = app.globalData.userInfoData.nickName; | this.data.userData.nickName = app.globalData.userInfoData.nickName; | ||||
this.setData({ | this.setData({ | ||||
this.getAddress(); | this.getAddress(); | ||||
}, | }, | ||||
getAddress: function () {//获取地址 | getAddress: function () {//获取地址 | ||||
app.wxRequest(app.globalData.urlRoot + "address/getAddress", {}, res => { | |||||
app.wxRequest(app.globalData.urlRoot + "address/getAddressV2", {}, res => { | |||||
console.log(res); | |||||
if (res.code == 200) { | if (res.code == 200) { | ||||
if (res.data) { | if (res.data) { | ||||
this.data.isAddress = true; | this.data.isAddress = true; | ||||
this.data.submitData.mobile = res.data.mobile; | this.data.submitData.mobile = res.data.mobile; | ||||
this.data.submitData.province = res.data.province; | this.data.submitData.province = res.data.province; | ||||
this.data.submitData.city = res.data.city; | this.data.submitData.city = res.data.city; | ||||
this.data.submitData.district = res.data.district; | |||||
this.data.submitData.agentDetail = res.data.agentDetail; | |||||
this.data.submitData.agent_code = res.data.agent_code; | |||||
this.data.submitData.addressDetail = res.data.addressDetail; | this.data.submitData.addressDetail = res.data.addressDetail; | ||||
this.setData({ | this.setData({ | ||||
submitData: this.data.submitData | |||||
submitData: this.data.submitData, | |||||
mobile2:res.data.mobile | |||||
}) | }) | ||||
// if(!res.data.agentDetail){ | |||||
this.getDistributorList("",""); | |||||
// this.getUserLocation();//获取用户当前位置 | |||||
// } | |||||
}else{ | |||||
this.getUserLocation();//获取用户当前位置 | |||||
} | } | ||||
} else { | } else { | ||||
wx.showToast({ | wx.showToast({ | ||||
}, this); | }, this); | ||||
}, | }, | ||||
addAddress: function () {//添加地址 | addAddress: function () {//添加地址 | ||||
app.wxRequest(app.globalData.urlRoot + "address/addAddress", this.data.submitData, res => { | |||||
var mobile = this.data.submitData.mobile; | |||||
if(this.data.selectType==2){ | |||||
this.data.submitData.mobile = this.data.mobile2; | |||||
} | |||||
app.wxRequest(app.globalData.urlRoot + "address/addAddressV2", this.data.submitData, res => { | |||||
wx.showToast({ | wx.showToast({ | ||||
title: res.msg, | title: res.msg, | ||||
}) | }) | ||||
}, this, "POST") | }, this, "POST") | ||||
}, | }, | ||||
updateAddress: function () {//更新地址 | updateAddress: function () {//更新地址 | ||||
app.wxRequest(app.globalData.urlRoot + "address/updateAddress", this.data.submitData, res => { | |||||
var mobile = this.data.submitData.mobile; | |||||
if(this.data.selectType==2){ | |||||
this.data.submitData.mobile = this.data.mobile2; | |||||
} | |||||
app.wxRequest(app.globalData.urlRoot + "address/updateAddressV2", this.data.submitData, res => { | |||||
wx.showToast({ | wx.showToast({ | ||||
title: res.msg, | title: res.msg, | ||||
}) | }) | ||||
} | } | ||||
}, this, "POST"); | }, this, "POST"); | ||||
}, | }, | ||||
addressChange: function (e) {//所在地区发生改变 | |||||
this.data.submitData.province = e.detail.value[0]; | |||||
this.data.submitData.city = e.detail.value[1]; | |||||
this.data.submitData.district = e.detail.value[2]; | |||||
this.setData({ | |||||
submitData: this.data.submitData | |||||
}) | |||||
}, | |||||
getNickName: function(e) {//获取昵称 | getNickName: function(e) {//获取昵称 | ||||
this.data.userData.nickName = e.detail.value; | this.data.userData.nickName = e.detail.value; | ||||
this.setData({ | this.setData({ | ||||
submitData: this.data.submitData | submitData: this.data.submitData | ||||
}) | }) | ||||
}, | }, | ||||
getMobile2: function (e) {//获取用户输入的电话---无验证码 | |||||
this.setData({ | |||||
mobile2:e.detail.value | |||||
}) | |||||
}, | |||||
getAddressDetail: function (e) {//获取详细地址 | getAddressDetail: function (e) {//获取详细地址 | ||||
this.data.submitData.addressDetail = e.detail.value; | this.data.submitData.addressDetail = e.detail.value; | ||||
this.setData({ | this.setData({ | ||||
saveUserMsg:function(){ | saveUserMsg:function(){ | ||||
if (!this.data.submitData.realName) { | if (!this.data.submitData.realName) { | ||||
wx.showToast({ | wx.showToast({ | ||||
title: '请输入收货人', | |||||
title: '请输入姓名', | |||||
icon: "none" | icon: "none" | ||||
}) | }) | ||||
return; | return; | ||||
} | } | ||||
if (!app.mobileVerify(this.data.submitData.mobile)) { | |||||
if (this.data.submitData.mobile) { | |||||
wx.showToast({ | |||||
title: '请输入正确的电话', | |||||
icon: 'none' | |||||
}) | |||||
} else { | |||||
wx.showToast({ | |||||
title: '请输入电话', | |||||
icon: 'none' | |||||
}) | |||||
} | |||||
return; | |||||
} | |||||
if (!this.data.submitData.province) { | |||||
if (!this.data.mobile2 && this.data.selectType==2) { | |||||
wx.showToast({ | wx.showToast({ | ||||
title: '请选择所在地区', | |||||
icon: 'none' | |||||
title: '请输入电话', | |||||
icon: "none" | |||||
}) | }) | ||||
return; | return; | ||||
} | } | ||||
if (this.data.selectType == 2) { | |||||
if (!this.data.submitData.captcha) { | |||||
wx.showToast({ | |||||
title: '请输入验证码', | |||||
icon: "none" | |||||
}) | |||||
return; | |||||
} | |||||
} | |||||
if (!this.data.submitData.addressDetail) { | if (!this.data.submitData.addressDetail) { | ||||
wx.showToast({ | wx.showToast({ | ||||
title: '请输入详细地址', | title: '请输入详细地址', | ||||
}) | }) | ||||
return; | return; | ||||
} | } | ||||
this.data.submitData.province = this.data.provinceDataArr[0][this.data.provinceDataValue[0]]; | |||||
this.data.submitData.city = this.data.provinceDataArr[1][this.data.provinceDataValue[1]]; | |||||
this.data.submitData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | |||||
this.data.submitData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | |||||
this.data.submitData.scene = app.globalData.sceneSource; | |||||
// console.log(this.data.submitData); | |||||
// return; | |||||
wx.showLoading({ | wx.showLoading({ | ||||
title: '保存中', | title: '保存中', | ||||
mask: true | mask: true | ||||
}) | }) | ||||
} | } | ||||
}) | }) | ||||
}, | |||||
changeSelectType:function(e){ | |||||
if(e){ | |||||
this.setData({ | |||||
selectType:e.currentTarget.dataset.type | |||||
}) | |||||
}else{ | |||||
this.setData({ | |||||
selectType:1 | |||||
}) | |||||
} | |||||
}, | |||||
getCaptcha: function (e) {//获取用户输入的验证码 | |||||
this.data.submitData.captcha = e.detail.value; | |||||
this.setData({ | |||||
submitData:this.data.submitData | |||||
}) | |||||
}, | |||||
getCode: function (e) {//获取验证码 | |||||
if (!app.mobileVerify(this.data.mobile2)) { | |||||
if (this.data.mobile2) { | |||||
wx.showToast({ | |||||
title: '请输入正确的电话', | |||||
icon: 'none' | |||||
}) | |||||
} else { | |||||
wx.showToast({ | |||||
title: '请输入电话', | |||||
icon: 'none' | |||||
}) | |||||
} | |||||
return; | |||||
} | |||||
if (!this.data.sendCode) { | |||||
return; | |||||
} | |||||
this.data.sendCode = false; | |||||
app.wxRequest(app.globalData.urlRoot + "captcha/sendCaptcha", { mobile: this.data.mobile2 }, res => { | |||||
if (res.code == 200) { | |||||
this.countDown(); | |||||
wx.showToast({ | |||||
title: '验证码获取成功', | |||||
icon: "none" | |||||
}) | |||||
this.setData({ | |||||
verificationCode: 60 | |||||
}) | |||||
} else { | |||||
this.data.sendCode = true; | |||||
wx.showToast({ | |||||
title: res.msg, | |||||
icon: "none" | |||||
}) | |||||
} | |||||
}, this) | |||||
}, | |||||
countDown: function () {//倒计时 | |||||
setTimeout(() => { | |||||
this.setData({ | |||||
verificationCode: this.data.verificationCode - 1 | |||||
}) | |||||
if (this.data.verificationCode > 0) { | |||||
this.countDown(); | |||||
} else { | |||||
this.setData({ | |||||
verificationCode: "获取验证码" | |||||
}) | |||||
this.data.sendCode = true; | |||||
} | |||||
}, 1000); | |||||
}, | |||||
getUserPhone: function (e) {//获取用户手机号 | |||||
if (e.detail.errMsg == 'getPhoneNumber:ok') { | |||||
app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | |||||
if (res.code == 200) { | |||||
this.setData({ | |||||
phoneInputShow: true | |||||
}) | |||||
this.changeSelectType(); | |||||
if (res.data && res.data.decodeData) { | |||||
this.data.submitData.mobile = res.data.decodeData.phoneNumber; | |||||
this.setData({ | |||||
submitData: this.data.submitData | |||||
}) | |||||
} | |||||
} else { | |||||
wx.showToast({ | |||||
title: res.msg, | |||||
icon: "none" | |||||
}) | |||||
} | |||||
}, this); | |||||
} | |||||
}, | |||||
getUserLocation: function (e) { | |||||
wx.getLocation({ | |||||
type: 'wgs84', //wgs84 gcj02 | |||||
success: (res) => { | |||||
this.getDistributorList(res.longitude, res.latitude); | |||||
}, | |||||
fail: (res) => { | |||||
this.getDistributorList("", ""); | |||||
} | |||||
}) | |||||
}, | |||||
getDistributorList: function (longitude, latitude) {//获取经销商列表 | |||||
app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude }, res => { | |||||
if (res.code == 200) { | |||||
//整理数据 | |||||
var datas = res.data; | |||||
var province = []; | |||||
var city = []; | |||||
for (let i = 0; i < res.data.list.length; i++) { | |||||
province.push(res.data.list[i].province); | |||||
} | |||||
if(this.data.submitData.province){ | |||||
for(let i=0;i<province.length;i++){ | |||||
if(province[i]==this.data.submitData.province){ | |||||
res.data.nearData.provinceIndex = i; | |||||
} | |||||
} | |||||
} | |||||
for (let j = 0; j < res.data.list[res.data.nearData.provinceIndex].children.length; j++) { | |||||
city.push(res.data.list[res.data.nearData.provinceIndex].children[j].city) | |||||
} | |||||
if(this.data.submitData.city){ | |||||
for(let i=0;i<city.length;i++){ | |||||
if(city[i]==this.data.submitData.city){ | |||||
res.data.nearData.cityIndex = i; | |||||
} | |||||
} | |||||
} | |||||
if(this.data.submitData.agentDetail){ | |||||
for(let i=0;i<res.data.list[res.data.nearData.provinceIndex].children[res.data.nearData.cityIndex].children.length;i++){ | |||||
if(res.data.list[res.data.nearData.provinceIndex].children[res.data.nearData.cityIndex].children[i]==this.data.submitData.agentDetail){ | |||||
res.data.nearData.agentIndex = i; | |||||
} | |||||
} | |||||
}else{ | |||||
res.data.nearData.agentIndex = 0; | |||||
} | |||||
//将数据赋值给变量 | |||||
this.setData({ | |||||
provinceDataAll: res.data.list, | |||||
provinceDataArr: [province, city], | |||||
provinceDataValue: [res.data.nearData.provinceIndex, res.data.nearData.cityIndex], | |||||
nowProvince: province[res.data.nearData.provinceIndex] + " " + city[res.data.nearData.cityIndex], | |||||
storeArr: res.data.list[res.data.nearData.provinceIndex].children[res.data.nearData.cityIndex].children, | |||||
storeValue: res.data.nearData.agentIndex | |||||
}) | |||||
} else { | |||||
wx.showToast({ | |||||
title: res.msg, | |||||
icon: "none" | |||||
}) | |||||
} | |||||
}, this); | |||||
}, | |||||
provinceDataChange: function (e) { | |||||
if (e.detail.column == 0) { | |||||
var city = []; | |||||
for (let i = 0; i < this.data.provinceDataAll[e.detail.value].children.length; i++) { | |||||
city.push(this.data.provinceDataAll[e.detail.value].children[i].city); | |||||
} | |||||
this.data.provinceDataArr[1] = city; | |||||
this.setData({ | |||||
provinceDataArr: this.data.provinceDataArr | |||||
}) | |||||
} | |||||
}, | |||||
provinceDataChane: function (e) { | |||||
this.setData({ | |||||
provinceDataValue: e.detail.value, | |||||
nowProvince: this.data.provinceDataArr[0][e.detail.value[0]] + " " + this.data.provinceDataArr[1][e.detail.value[1]], | |||||
storeArr: this.data.provinceDataAll[e.detail.value[0]].children[e.detail.value[1]].children, | |||||
storeValue: 0 | |||||
}) | |||||
}, | |||||
storeChane: function (e) { | |||||
this.setData({ | |||||
storeValue: e.detail.value | |||||
}) | |||||
} | } | ||||
} | } | ||||
}) | }) |
<!-- <image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> --> | <!-- <image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> --> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="headGroup nickGroup"> | |||||
<view class="headGroup nickGroup" style="margin-bottom:0;"> | |||||
<view class="headTitle">昵称</view> | <view class="headTitle">昵称</view> | ||||
<view class="selectGroup"> | <view class="selectGroup"> | ||||
<input class="nickName" bindinput="getNickName" value="{{userData.nickName}}"></input> | <input class="nickName" bindinput="getNickName" value="{{userData.nickName}}"></input> | ||||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | <image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="msgGroup"> | |||||
<view class="selectTypeGroup"> | |||||
<view style="position: relative;"> | |||||
<image class="selectTypeImg" bindtap="changeSelectType" data-type="1" style="margin-bottom:24rpx;" src="{{imgUrl+'/newImages5/'+(selectType==1?32:34)+'.png'}}"></image> | |||||
<view class="getPhoneFrame" wx:if="{{!phoneInputShow}}"> | |||||
<button class="getPhoneBtn" style="width: 100%;height: 100%;margin: 0;padding: 0;min-height: 0;" open-type="getPhoneNumber" bindgetphonenumber="getUserPhone"></button> | |||||
</view> | |||||
</view> | |||||
<image class="selectTypeImg" bindtap="changeSelectType" data-type="2" src="{{imgUrl+'/newImages5/'+(selectType==2?35:33)+'.png'}}"></image> | |||||
</view> | |||||
<view class="userMsgGroup"> | |||||
<view class="userMsgtitle">姓名</view> | |||||
<input class="userMsgInput" bindinput="getRealName" value="{{submitData.realName}}" placeholder="请输入姓名"></input> | |||||
</view> | |||||
<view class="userMsgGroup" wx:if="{{selectType==1}}"> | |||||
<view class="userMsgtitle">电话</view> | |||||
<input class="userMsgInput" maxlength='11' disabled="true" type="number" bindinput="getMobile" value="{{submitData.mobile}}" placeholder="请输入您的联系电话"></input> | |||||
</view> | |||||
<view class="userMsgGroup" wx:if="{{selectType==2}}"> | |||||
<view class="userMsgtitle">电话</view> | |||||
<input class="userMsgInput" maxlength='11' type="number" bindinput="getMobile2" value="{{mobile2}}" placeholder="请输入您的联系电话"></input> | |||||
</view> | |||||
<view class="codeFrame" wx:if="{{selectType==2}}"> | |||||
<view class="codeGroup"> | |||||
<input class="codeInput" bindinput="getCaptcha" value="{{submitData.captcha}}" placeholder="请输入您的验证码"></input> | |||||
<view class="getCodeBtn" bindtap="getCode">{{verificationCode}}</view> | |||||
</view> | |||||
</view> | |||||
<view class="userMsgGroup"> | |||||
<view class="userMsgtitle">当前城市</view> | |||||
<picker mode="multiSelector" range="{{provinceDataArr}}" value="{{provinceDataValue}}" bindcolumnchange="provinceDataChange" bindchange="provinceDataChane"> | |||||
<view class="userMsgInput">{{nowProvince}}</view> | |||||
</picker> | |||||
</view> | |||||
<view class="userMsgGroup"> | |||||
<view class="userMsgtitle">专营店</view> | |||||
<picker mode="selector" range="{{storeArr}}" range-key="agent_detail" value="{{storeValue}}" bindchange="storeChane"> | |||||
<view class="userMsgInput">{{storeArr[storeValue].agent_detail}}</view> | |||||
</picker> | |||||
</view> | |||||
<view class="msgGroup addressDetail"> | |||||
<view class="msgTitle">收货地址:</view> | |||||
<textarea class="msgInput addressTextarea" maxlength="-1" style="margin-top:{{marginT}}rpx;width:490rpx;" bindinput="getAddressDetail" value="{{submitData.addressDetail}}"></textarea> | |||||
</view> | |||||
<image class="saveAddress" bindtap="saveUserMsg" src="{{imgUrl+'/newImages2/96.png'}}"></image> | |||||
<!-- <view class="msgGroup"> | |||||
<view class="msgTitle">收货人:</view> | <view class="msgTitle">收货人:</view> | ||||
<input class="msgInput" bindinput="getRealName" value="{{submitData.realName}}"></input> | <input class="msgInput" bindinput="getRealName" value="{{submitData.realName}}"></input> | ||||
</view> | </view> | ||||
<view class="msgGroup"> | <view class="msgGroup"> | ||||
<view class="msgTitle">手机号码:</view> | <view class="msgTitle">手机号码:</view> | ||||
<input class="msgInput" maxlength='11' type="number" bindinput="getMobile" value="{{submitData.mobile}}"></input> | <input class="msgInput" maxlength='11' type="number" bindinput="getMobile" value="{{submitData.mobile}}"></input> | ||||
<!-- <button wx:if="{{!phoneInputShow}}" class="msgInput buttonSty" style="width:530rpx;height: 62rpx;margin: 0;padding: 0;min-height: 0;opacity:0;" open-type="getPhoneNumber" bindgetphonenumber="getUserPhone"></button> --> | |||||
</view> | </view> | ||||
<view class="msgGroup"> | <view class="msgGroup"> | ||||
<view class="msgTitle">所在地区:</view> | <view class="msgTitle">所在地区:</view> | ||||
<picker class="pickerSty" mode="region" bindchange="addressChange" value="{{[submitData.province,submitData.city,submitData.district]}}"> | <picker class="pickerSty" mode="region" bindchange="addressChange" value="{{[submitData.province,submitData.city,submitData.district]}}"> | ||||
<!-- <picker class="pickerSty" mode="region" bindchange="addressChange"> --> | |||||
<view class="msgInput">{{submitData.province+" "+submitData.city+" "+submitData.district}}</view> | <view class="msgInput">{{submitData.province+" "+submitData.city+" "+submitData.district}}</view> | ||||
</picker> | </picker> | ||||
</view> | </view> | ||||
<view class="msgGroup addressDetail"> | <view class="msgGroup addressDetail"> | ||||
<view class="msgTitle">详细地址:</view> | |||||
<view class="msgTitle">收货地址:</view> | |||||
<textarea class="msgInput addressTextarea" maxlength="-1" style="margin-top:{{marginT}}rpx;" bindinput="getAddressDetail" value="{{submitData.addressDetail}}"></textarea> | <textarea class="msgInput addressTextarea" maxlength="-1" style="margin-top:{{marginT}}rpx;" bindinput="getAddressDetail" value="{{submitData.addressDetail}}"></textarea> | ||||
</view> | |||||
</view> --> | |||||
</view> | </view> | ||||
<image class="saveAddress" bindtap="saveUserMsg" src="{{imgUrl+'/newImages2/96.png'}}"></image> | |||||
</view> | </view> | ||||
</view> | </view> |
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
flex-direction: column; | flex-direction: column; | ||||
overflow: auto; | |||||
padding-bottom: 30rpx; | |||||
} | } | ||||
.msgGroup{ | .msgGroup{ | ||||
position: relative; | position: relative; | ||||
margin-bottom: 40rpx; | margin-bottom: 40rpx; | ||||
} | } | ||||
.msgTitle,.msgInput{ | .msgTitle,.msgInput{ | ||||
min-height: 23rpx; | |||||
line-height: 23rpx; | |||||
font-size:23rpx; | |||||
min-height: 24rpx; | |||||
line-height: 24rpx; | |||||
font-size:24rpx; | |||||
font-family:PingFangSC; | font-family:PingFangSC; | ||||
font-weight:600; | |||||
font-weight:400; | |||||
color:rgba(35,33,34,1); | color:rgba(35,33,34,1); | ||||
} | } | ||||
.msgInput{ | .msgInput{ | ||||
align-items: center; | align-items: center; | ||||
} | } | ||||
.addressDetail{ | .addressDetail{ | ||||
padding: 21rpx 26rpx; | |||||
height:102rpx; | |||||
width: 650rpx; | |||||
padding: 20rpx 25rpx; | |||||
height:100rpx; | |||||
align-items: flex-start; | align-items: flex-start; | ||||
margin-bottom: 0; | |||||
margin-bottom: 30rpx; | |||||
margin-top: 25rpx; | |||||
} | } | ||||
.addressTextarea{ | .addressTextarea{ | ||||
height: 100%; | height: 100%; | ||||
margin-left: 5rpx; | |||||
} | } | ||||
.saveAddress{ | .saveAddress{ | ||||
position: absolute; | |||||
/* position: absolute; | |||||
left: 50%; | left: 50%; | ||||
bottom: 45rpx; | bottom: 45rpx; | ||||
transform: translateX(-50%); | |||||
transform: translateX(-50%); */ | |||||
width:652rpx; | width:652rpx; | ||||
height:70rpx; | height:70rpx; | ||||
} | } | ||||
.selectGroup{ | .selectGroup{ | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
} | |||||
.selectTypeGroup{ | |||||
margin:0 auto; | |||||
width: 653rpx; | |||||
padding: 45rpx 0; | |||||
} | |||||
.selectTypeImg{ | |||||
width: 653rpx; | |||||
height: 70rpx; | |||||
} | |||||
.userMsgGroup{ | |||||
width: 650rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-between; | |||||
margin-bottom: 15rpx; | |||||
} | |||||
.userMsgtitle{ | |||||
line-height: 24rpx; | |||||
font-size:24rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:400; | |||||
color:rgba(35,24,21,1); | |||||
} | |||||
.userMsgInput{ | |||||
width:540rpx; | |||||
height: 65rpx; | |||||
border: 2rpx solid #aaaaaa; | |||||
border-radius: 20rpx; | |||||
line-height: 65rpx; | |||||
font-size:24rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:300; | |||||
padding: 0 30rpx; | |||||
box-sizing: border-box; | |||||
color: black; | |||||
} | |||||
.codeFrame{ | |||||
width: 650rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: flex-end; | |||||
margin-bottom: 15rpx; | |||||
} | |||||
.codeGroup{ | |||||
width: 540rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-between; | |||||
} | |||||
.getCodeBtn{ | |||||
width: 160rpx; | |||||
height: 50rpx; | |||||
background-color: #2b558a; | |||||
line-height: 50rpx; | |||||
font-size:26rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:300; | |||||
color:rgba(255,255,255,1); | |||||
border-radius: 20rpx; | |||||
text-align: center; | |||||
} | |||||
.codeInput{ | |||||
width:350rpx; | |||||
height: 65rpx; | |||||
border: 2rpx solid #aaaaaa; | |||||
border-radius: 20rpx; | |||||
line-height: 65rpx; | |||||
font-size:24rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:300; | |||||
padding: 0 30rpx; | |||||
box-sizing: border-box; | |||||
color: black; | |||||
} | |||||
.getPhoneFrame{ | |||||
position: absolute; | |||||
left: 0; | |||||
top: 0; | |||||
width:100%; | |||||
height: 70rpx; | |||||
z-index: 2; | |||||
} | |||||
.getPhoneBtn{ | |||||
opacity: 0; | |||||
} | } |
"name": "预测价格", | "name": "预测价格", | ||||
"pathName": "pages/guessPrize/guessPrize", | "pathName": "pages/guessPrize/guessPrize", | ||||
"query": "" | "query": "" | ||||
}, | |||||
{ | |||||
"id": -1, | |||||
"name": "二轮竞猜", | |||||
"pathName": "pages/guessSecond/guessSecond", | |||||
"query": "" | |||||
}, | |||||
{ | |||||
"id": -1, | |||||
"name": "竞猜完善资料", | |||||
"pathName": "pages/perfectMsg/perfectMsg", | |||||
"query": "" | |||||
}, | |||||
{ | |||||
"id": -1, | |||||
"name": "竞猜海报", | |||||
"pathName": "pages/guessPoster/guessPoster", | |||||
"query": "" | |||||
}, | |||||
{ | |||||
"id": -1, | |||||
"name": "二次竞猜价格", | |||||
"pathName": "pages/guessSecondPrize/guessSecondPrize", | |||||
"query": "" | |||||
} | } | ||||
] | ] | ||||
} | } |