}) | }) | ||||
}, | }, | ||||
enterGuess:function(){//去竞猜 | enterGuess:function(){//去竞猜 | ||||
console.log("去竞猜"); | |||||
wx.navigateTo({ | |||||
url: '/pages/guessSecondPrize/guessSecondPrize', | |||||
}) | |||||
}, | }, | ||||
startDraw:function(){//抽奖 | startDraw:function(){//抽奖 | ||||
this.setData({ | this.setData({ | ||||
drawResult:3 | |||||
drawResult:1 | |||||
}) | }) | ||||
}, | }, | ||||
prizeWindowControl:function(){//关闭抽奖弹窗 | prizeWindowControl:function(){//关闭抽奖弹窗 | ||||
}) | }) | ||||
}, | }, | ||||
enterPerfectMsg:function(){//马上领取 | enterPerfectMsg:function(){//马上领取 | ||||
wx.navigateTo({ | |||||
url: '/pages/perfectMsg/perfectMsg', | |||||
}) | |||||
} | } | ||||
}) | }) |
<image class="newImages5-2" src="{{imgUrl+'/newImages5/2.png'}}"></image> | <image class="newImages5-2" src="{{imgUrl+'/newImages5/2.png'}}"></image> | ||||
<image class="newImages5-1" src="{{imgUrl+'/newImages5/1.png'}}"></image> | <image class="newImages5-1" src="{{imgUrl+'/newImages5/1.png'}}"></image> | ||||
</view> | </view> | ||||
<image class="newImages5-3" src="{{imgUrl+'/newImages5/'+(guessResult?'6':'3')+'.png'}}"></image> | |||||
<image class="newImages5-3" src="{{imgUrl+'/newImages5/'+(guessResult?'38':'37')+'.png'}}"></image> | |||||
<image class="newImages5-4" src="{{imgUrl+'/newImages5/4.png'}}"></image> | <image class="newImages5-4" src="{{imgUrl+'/newImages5/4.png'}}"></image> | ||||
<view class="selectFream"> | <view class="selectFream"> | ||||
<image class="versions-19" src="{{imgUrl+'/versions/19.png'}}"></image> | <image class="versions-19" src="{{imgUrl+'/versions/19.png'}}"></image> |
height: 35rpx; | height: 35rpx; | ||||
} | } | ||||
.newImages5-3{ | .newImages5-3{ | ||||
width: 635rpx; | |||||
height: 181rpx; | |||||
width: 634rpx; | |||||
height: 170rpx; | |||||
margin: 0 auto; | margin: 0 auto; | ||||
margin-top: 60rpx; | margin-top: 60rpx; | ||||
} | } |
imgUrl: app.globalData.urlStatic,//图片路径 | imgUrl: app.globalData.urlStatic,//图片路径 | ||||
ruleShow:false,//是否显示竞猜规则 | ruleShow:false,//是否显示竞猜规则 | ||||
inputValue:"",//输入的价格 | inputValue:"",//输入的价格 | ||||
stringValue:"", | |||||
focusState:false, | |||||
tipImgShow:true, | |||||
stringValue:"",//输入的竞猜价格 | |||||
focusState:false,//输入框聚焦状态 | |||||
tipImgShow:true,//是否显示输入框提示 | |||||
isGuess:true,//是否竞猜过价格 | |||||
guessPriceArr:[1,2,3,4,5,6], | |||||
slideDay:['0','0'],//距离上市时间 | |||||
randomNum:44,//随机数 | |||||
cartogramShow:false,//是否显示统计图 | |||||
}, | }, | ||||
/** | /** | ||||
*/ | */ | ||||
onLoad: function (options) { | onLoad: function (options) { | ||||
app.globalData.nowPage = 3; | app.globalData.nowPage = 3; | ||||
this.distanceDay(); | |||||
if (app.globalData.openid) { | if (app.globalData.openid) { | ||||
this.loadFun(); | this.loadFun(); | ||||
} else { | } else { | ||||
* 用户点击右上角分享 | * 用户点击右上角分享 | ||||
*/ | */ | ||||
onShareAppMessage: function () { | onShareAppMessage: function () { | ||||
return { | |||||
title: '召唤预言帝!快来和我一起猜启辰星售价,赢升舱大奖!', | |||||
imageUrl: this.data.imgUrl + "/versions/guessShareImg.jpg", | |||||
path: "/pages/guess/guess" | |||||
} | |||||
}, | }, | ||||
enterLucky:function(){//每日抽奖 | enterLucky:function(){//每日抽奖 | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
this.setData({ | this.setData({ | ||||
tipWindow2:!this.data.tipWindow2 | 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:randomNum, | |||||
cartogramShow:!this.data.cartogramShow | |||||
}) | |||||
} | } | ||||
}) | }) |
<image class="newImages5-2" src="{{imgUrl+'/newImages5/2.png'}}"></image> | <image class="newImages5-2" src="{{imgUrl+'/newImages5/2.png'}}"></image> | ||||
<image class="newImages5-1" src="{{imgUrl+'/newImages5/1.png'}}"></image> | <image class="newImages5-1" src="{{imgUrl+'/newImages5/1.png'}}"></image> | ||||
</view> | </view> | ||||
<image class="newImages5-28" src="{{imgUrl+'/newImages5/28.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/31.png'}}"></image> | |||||
<input class="inputPrice" value="{{stringValue}}" bindfocus="focusControl" bindblur="focusControl2" type="number" maxlength="6" bindinput="getValue"></input> | |||||
<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/40.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+'/newImages4/24.png'}}"></image> | |||||
</view> | </view> | ||||
<image class="newImages4-24" bindtap="submitPrice2" src="{{imgUrl+'/newImages4/24.png'}}"></image> | |||||
</view> | </view> | ||||
<image class="newImages5-30" src="{{imgUrl+'/newImages5/30.png'}}"></image> | |||||
<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" src="{{imgUrl+'/newImages5/42.png'}}"></image> | |||||
<button open-type="share" style="min-height:0;width: 100%;" class="shareBtn"></button> | |||||
</view> | |||||
<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="drawBtn" bindtap="ruleControl" src="{{imgUrl+'/versions/7.png'}}"></image> | ||||
<image class="yuyue" bindtap="enterLucky" src="{{imgUrl+'/versions/1.png'}}"></image> | <image class="yuyue" bindtap="enterLucky" src="{{imgUrl+'/versions/1.png'}}"></image> | ||||
<view class="ruleFrame" wx:if="{{ruleShow}}"> | <view class="ruleFrame" wx:if="{{ruleShow}}"> | ||||
<image class="tipWindowBtn" bindtap="tipWindowControl3" src="{{imgUrl+'/newImages4/30.png'}}"></image> | <image class="tipWindowBtn" bindtap="tipWindowControl3" src="{{imgUrl+'/newImages4/30.png'}}"></image> | ||||
</view> | </view> | ||||
</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> | </view> | ||||
<tabBar></tabBar> | <tabBar></tabBar> |
} | } | ||||
} | } | ||||
.tipImg{ | .tipImg{ | ||||
width: 443rpx; | |||||
height: 35rpx; | |||||
width: 333rpx; | |||||
height: 83rpx; | |||||
position: absolute; | position: absolute; | ||||
left: 46%; | |||||
left: 38%; | |||||
top: 50%; | top: 50%; | ||||
transform: translate(-50%,-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: 388rpx; | |||||
height: 60rpx; | |||||
position: relative; | |||||
margin: 0 auto; | |||||
margin-top: 20rpx; | |||||
margin-bottom: 37rpx; | |||||
} | |||||
.newImages5-42{ | |||||
width: 388rpx; | |||||
height: 60rpx; | |||||
} | |||||
.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: 501rpx; | |||||
height: 620rpx; | |||||
} | |||||
.cartogramImg{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
.shareBtn{ | |||||
position: absolute; | |||||
left: 0; | |||||
top: 0; | |||||
width: 100%; | |||||
height: 100%; | |||||
margin: 0; | |||||
padding: 0; | |||||
opacity: 0; | |||||
} | } |
} else if (e.currentTarget.dataset.value == 2) { | } else if (e.currentTarget.dataset.value == 2) { | ||||
this.data.parames2.page = 1; | this.data.parames2.page = 1; | ||||
this.data.noData2 = false; | this.data.noData2 = false; | ||||
this.setData({ | |||||
recordList:[] | |||||
}) | |||||
this.getMyAwardList(); | this.getMyAwardList(); | ||||
} else if (e.currentTarget.dataset.value == 3){ | } else if (e.currentTarget.dataset.value == 3){ | ||||
this.data.parames.page = 1; | this.data.parames.page = 1; | ||||
if(this.data.selectNow==2 && this.data.recordNow == 1 && !this.data.addressShow){ | if(this.data.selectNow==2 && this.data.recordNow == 1 && !this.data.addressShow){ | ||||
this.data.parames2.page = 1; | this.data.parames2.page = 1; | ||||
this.data.noData2 = false; | this.data.noData2 = false; | ||||
this.setData({ | |||||
recordList:[] | |||||
}) | |||||
this.getMyAwardList(); | this.getMyAwardList(); | ||||
} | } | ||||
}, | }, | ||||
}) | }) | ||||
}, | }, | ||||
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; |
data: { | data: { | ||||
imgUrl: app.globalData.urlStatic,//图片路径 | imgUrl: app.globalData.urlStatic,//图片路径 | ||||
selectType:2,//选中的手机号类型 | selectType:2,//选中的手机号类型 | ||||
marginT: 0, | |||||
verificationCode:"获取验证码", | |||||
sendCode:true, | |||||
mobile2:"", | |||||
submitData:{ | |||||
realName:"",//姓名 | |||||
mobile:"",//手机号 | |||||
province:"",//经销商省份 | |||||
city:"",//经销商城市 | |||||
agent_code:"",//经销商编码 | |||||
agentDetail:"",//经销商详情 | |||||
addressDetail:"",//地址详情 | |||||
scene:"",//场景值名称 | |||||
captcha:"",//验证码(若非微信绑定手机号需要传入) | |||||
}, | |||||
provinceDataAll: null,//地区所有数据 | |||||
provinceDataArr: [[""], [""]],//省市数据 | |||||
provinceDataValue: [0, 0],//选中的省市下标 | |||||
nowProvince: "",//选中的省市文字 | |||||
storeArr: [],//专营店数据 | |||||
storeValue: 0,//选中的专营店下标 | |||||
}, | }, | ||||
/** | /** | ||||
} else { | } else { | ||||
app.globalData.openidSuccessFuc = this.loadFun; | app.globalData.openidSuccessFuc = this.loadFun; | ||||
} | } | ||||
if (app.globalData.userPhoneType == "ios") { | |||||
this.setData({ | |||||
marginT: -20 | |||||
}) | |||||
} | |||||
}, | }, | ||||
loadFun:function(){ | loadFun:function(){ | ||||
if (app.globalData.userMobile) { | |||||
this.data.submitData.mobile = app.globalData.userMobile; | |||||
this.setData({ | |||||
submitData: this.data.submitData | |||||
}) | |||||
} | |||||
this.getAddress(); | |||||
}, | }, | ||||
/** | /** | ||||
this.setData({ | this.setData({ | ||||
selectType:e.currentTarget.dataset.type | selectType:e.currentTarget.dataset.type | ||||
}) | }) | ||||
}, | |||||
getAddressDetail: function (e) {//获取详细地址 | |||||
this.data.submitData.addressDetail = e.detail.value; | |||||
}, | |||||
getRealName:function(e){//获取用户输入的姓名 | |||||
this.data.submitData.realName = e.detail.value; | |||||
}, | |||||
getMobile:function(e){//获取用户输入的电话 | |||||
this.data.mobile2 = e.detail.value; | |||||
}, | |||||
getCaptcha: function (e) {//获取用户输入的验证码 | |||||
this.data.submitData.captcha = e.detail.value; | |||||
}, | |||||
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); | |||||
}, | |||||
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 | |||||
}) | |||||
if(!res.data.agentDetail){ | |||||
this.getUserLocation();//获取用户当前位置 | |||||
} | |||||
} | |||||
} 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); | |||||
} | |||||
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) | |||||
} | |||||
//将数据赋值给变量 | |||||
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 | |||||
}) | |||||
} | } | ||||
}) | }) |
<!--pages/perfectMsg/perfectMsg.wxml--> | <!--pages/perfectMsg/perfectMsg.wxml--> | ||||
<view class="main"> | <view class="main"> | ||||
<image class="pageBg" src="{{imgUrl+'/versions/20.png?v=002'}}"></image> | |||||
<view class="pageTitle">完善个人信息</view> | |||||
<view class="selectGroup"> | |||||
<view class="selectType {{selectType==1?'selectType2':''}}" bindtap="chooseType" data-type="1" style="margin-bottom:20rpx;">使用微信绑定手机号</view> | |||||
<view class="selectType {{selectType==2?'selectType2':''}}" bindtap="chooseType" data-type="2">使用手机号码</view> | |||||
</view> | |||||
<view class="userMsgFrame"> | |||||
<input class="userMsgGroup" placeholder="请输入您的姓名" placeholder-style="color:#B3B3B3;"></input> | |||||
<input class="userMsgGroup" placeholder="请输入您的联系电话" type="number" placeholder-style="color:#B3B3B3;"></input> | |||||
<view class="userMsgGroup userMsgGroup2"> | |||||
<input style="width:300rpx;" placeholder="请输入验证码" placeholder-style="color:#B3B3B3;"></input> | |||||
<view class="getCode">获取验证码</view> | |||||
<view class="mainGroup"> | |||||
<image class="pageBg" src="{{imgUrl+'/versions/20.png?v=002'}}"></image> | |||||
<view class="pageTitle">完善个人信息</view> | |||||
<view class="selectGroup"> | |||||
<view class="selectType {{selectType==1?'selectType2':''}}" bindtap="chooseType" data-type="1" style="margin-bottom:20rpx;">使用微信绑定手机号</view> | |||||
<view class="selectType {{selectType==2?'selectType2':''}}" bindtap="chooseType" data-type="2">使用手机号码</view> | |||||
</view> | </view> | ||||
<picker> | |||||
<view class="userMsgGroup userMsgGroup2"> | |||||
<view>北京 北京</view> | |||||
<image class="selectIcon" src="{{imgUrl+'/newImages5/17.png'}}"></image> | |||||
<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" 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> | ||||
</picker> | |||||
<picker> | |||||
<view class="userMsgGroup userMsgGroup2" style="margin-bottom:0;"> | |||||
<view>北京 北京</view> | |||||
<image class="selectIcon" src="{{imgUrl+'/newImages5/17.png'}}"></image> | |||||
<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> | ||||
</picker> | |||||
<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" style="margin-top:{{marginT}}rpx;width:490rpx;" bindinput="getAddressDetail" value=""></textarea> | |||||
</view> | |||||
</view> | |||||
<image class="submitBtn" src="{{imgUrl+'/newImages5/18.png'}}"></image> | |||||
</view> | </view> | ||||
<!-- <view class="protocolGroup"> | |||||
<image class="protocolIcon" src=""></image> | |||||
<image class="protocolText"></image> | |||||
<image class="protocolBtn"></image> | |||||
</view> --> | |||||
<image class="submitBtn" src="{{imgUrl+'/newImages5/18.png'}}"></image> | |||||
<image class="drawBtn" bindtap="ruleControl" src="{{imgUrl+'/versions/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> | <image class="yuyue" bindtap="enterLucky" src="{{imgUrl+'/versions/1.png'}}"></image> | ||||
<view class="ruleFrame" wx:if="{{ruleShow}}"> | <view class="ruleFrame" wx:if="{{ruleShow}}"> |
width: 650rpx; | width: 650rpx; | ||||
} | } | ||||
.userMsgGroup{ | .userMsgGroup{ | ||||
border:2rpx solid #73788d; | |||||
border-radius: 20rpx; | |||||
width: 100%; | width: 100%; | ||||
height: 65rpx; | height: 65rpx; | ||||
line-height: 61rpx; | |||||
font-size:24rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:400; | |||||
color:rgba(255,255,255,1); | |||||
padding: 0 35rpx; | |||||
box-sizing: border-box; | |||||
margin-bottom: 15rpx; | margin-bottom: 15rpx; | ||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-between; | |||||
} | } | ||||
.userMsgGroup2{ | .userMsgGroup2{ | ||||
width: 540rpx; | |||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
justify-content: space-between; | 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{ | .getCode{ | ||||
width: 130rpx; | |||||
width:162rpx; | |||||
height:50rpx; | |||||
text-align: center; | 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{ | .selectIcon{ | ||||
width: 23rpx; | width: 23rpx; | ||||
width: 711rpx; | width: 711rpx; | ||||
height: 70rpx; | height: 70rpx; | ||||
margin: 0 auto; | 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: 50rpx; | |||||
} | |||||
.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; | |||||
} | } |
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, | selectType:2, | ||||
avatarUrlShow:"", | avatarUrlShow:"", | ||||
userData:{ | userData:{ | ||||
}, | }, | ||||
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.userMobile) { | |||||
this.data.submitData.mobile = app.globalData.userMobile; | |||||
this.setData({ | |||||
phoneInputShow: true, | |||||
submitData: this.data.submitData | |||||
}) | |||||
} | |||||
if (app.globalData.userInfoData) { | if (app.globalData.userInfoData) { | ||||
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.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.addressDetail = res.data.addressDetail; | this.data.submitData.addressDetail = res.data.addressDetail; | ||||
this.setData({ | this.setData({ | ||||
submitData: this.data.submitData | submitData: this.data.submitData | ||||
}) | }) | ||||
if(!res.data.agentDetail){ | |||||
this.getUserLocation();//获取用户当前位置 | |||||
} | |||||
} | } | ||||
} else { | } else { | ||||
wx.showToast({ | wx.showToast({ | ||||
} | } | ||||
}, 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.data.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({ | ||||
}) | }) | ||||
}, | }, | ||||
changeSelectType:function(e){ | 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; | |||||
}, | |||||
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); | |||||
} | |||||
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) | |||||
} | |||||
//将数据赋值给变量 | |||||
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({ | this.setData({ | ||||
selectType:e.currentTarget.dataset.type | |||||
storeValue: e.detail.value | |||||
}) | }) | ||||
} | } | ||||
} | } |
</view> | </view> | ||||
</view> | </view> | ||||
<view class="selectTypeGroup"> | <view class="selectTypeGroup"> | ||||
<image class="selectTypeImg" bindtap="changeSelectType" data-type="1" style="margin-bottom:24rpx;" src="{{imgUrl+'/newImages5/'+(selectType==1?32:34)+'.png'}}"></image> | |||||
<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> | <image class="selectTypeImg" bindtap="changeSelectType" data-type="2" src="{{imgUrl+'/newImages5/'+(selectType==2?35:33)+'.png'}}"></image> | ||||
</view> | </view> | ||||
<view class="userMsgGroup"> | <view class="userMsgGroup"> | ||||
<view class="userMsgtitle">姓名</view> | <view class="userMsgtitle">姓名</view> | ||||
<input class="userMsgInput" placeholder="请输入姓名"></input> | |||||
<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> | </view> | ||||
<image class="saveAddress" bindtap="saveUserMsg" src="{{imgUrl+'/newImages2/96.png'}}"></image> | |||||
<!-- <view class="msgGroup"> | <!-- <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> | ||||
<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; | ||||
} | } | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
margin-bottom: 15rpx; | |||||
} | } | ||||
.userMsgtitle{ | .userMsgtitle{ | ||||
line-height: 24rpx; | line-height: 24rpx; | ||||
height: 65rpx; | height: 65rpx; | ||||
border: 2rpx solid #aaaaaa; | border: 2rpx solid #aaaaaa; | ||||
border-radius: 20rpx; | 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; | |||||
} | } |