getVcodeTime:0,//获取验证码倒计时 | getVcodeTime:0,//获取验证码倒计时 | ||||
getCodeTimeKey:null, | getCodeTimeKey:null, | ||||
photoList:[],//图片列表 | photoList:[],//图片列表 | ||||
photoListShow:[], | |||||
agree:false,//是否同意本协议 | agree:false,//是否同意本协议 | ||||
getphone:"",//手机号 | getphone:"",//手机号 | ||||
maskShow: false, | maskShow: false, | ||||
* 上传照片 | * 上传照片 | ||||
*/ | */ | ||||
chooseImage(e){ | chooseImage(e){ | ||||
var list=this.data.photoList; | |||||
var list = this.data.photoList; | |||||
wx.chooseImage({ | wx.chooseImage({ | ||||
count: 3-this.data.photoList.length, | |||||
count: 3 - this.data.photoListShow.length, | |||||
sizeType: ['original'], //可选择原图 | sizeType: ['original'], //可选择原图 | ||||
sourceType: ['album', 'camera'], //可选择性开放访问相册、相机 | sourceType: ['album', 'camera'], //可选择性开放访问相册、相机 | ||||
success: res => { | success: res => { | ||||
for (let i = 0; i < res.tempFilePaths.length; i++) { | for (let i = 0; i < res.tempFilePaths.length; i++) { | ||||
this.data.photoListShow.push(res.tempFilePaths[i]); | |||||
this.setData({ | |||||
photoListShow: this.data.photoListShow | |||||
}) | |||||
wx.uploadFile({ | wx.uploadFile({ | ||||
url: app.globalData.urlRoot + "upload/uploadImage", | url: app.globalData.urlRoot + "upload/uploadImage", | ||||
header: { | header: { | ||||
}, | }, | ||||
deleteImg:function(e){ | deleteImg:function(e){ | ||||
var index = e.currentTarget.dataset.index; | var index = e.currentTarget.dataset.index; | ||||
this.data.photoList.splice(index,1); | |||||
this.data.photoList.splice(index, 1); | |||||
this.data.photoListShow.splice(index, 1); | |||||
this.setData({ | this.setData({ | ||||
photoList: this.data.photoList | |||||
photoList: this.data.photoList, | |||||
photoListShow: this.data.photoListShow | |||||
}) | }) | ||||
} | } | ||||
}) | }) |
</picker> | </picker> | ||||
<image class="registerMainPic" src="{{imgUrl+'/images/registerMainPic.png?v=002'}}"></image> | <image class="registerMainPic" src="{{imgUrl+'/images/registerMainPic.png?v=002'}}"></image> | ||||
<view class="upPhonoBox"> | <view class="upPhonoBox"> | ||||
<view class="phontBox" wx:for="{{photoList}}" wx:key="*this" wx:if="{{photoList.length>0}}" data-value="{{index}}"> | |||||
<view class="phontBox" wx:for="{{photoListShow}}" wx:key="*this" wx:if="{{photoListShow.length>0}}" data-value="{{index}}"> | |||||
<image src="{{item}}" mode="aspectFill" ></image> | <image src="{{item}}" mode="aspectFill" ></image> | ||||
<image bindtap="deleteImg" data-index="{{index}}" class="gameRuleClose" src="{{imgUrl+'/images/gameRuleClose.png'}}"></image> | <image bindtap="deleteImg" data-index="{{index}}" class="gameRuleClose" src="{{imgUrl+'/images/gameRuleClose.png'}}"></image> | ||||
</view> | </view> | ||||
<image class="upPhontBtn" wx:if="{{photoList.length<3}}" src="{{imgUrl+'/star/scout/register/upBtn.png'}}" bindtap="chooseImage"></image> | |||||
<image class="upPhontBtn" wx:if="{{photoListShow.length<3}}" src="{{imgUrl+'/star/scout/register/upBtn.png'}}" bindtap="chooseImage"></image> | |||||
</view> | </view> | ||||
<image class="photoNotes" src="{{imgUrl+'/images/registerTip2.png'}}" ></image> | <image class="photoNotes" src="{{imgUrl+'/images/registerTip2.png'}}" ></image> | ||||
<button class="submitBtn" style="padding:0;margin:20rpx auto 0;min-height:0;" formType="submit"> | <button class="submitBtn" style="padding:0;margin:20rpx auto 0;min-height:0;" formType="submit"> |
district: "",//地区 | district: "",//地区 | ||||
addressDetail: ""//详细 | addressDetail: ""//详细 | ||||
}, | }, | ||||
avatarUrlShow:"", | |||||
userData:{ | userData:{ | ||||
avatarUrl:"", | avatarUrl:"", | ||||
nickName:"" | 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({ | ||||
userData: this.data.userData | |||||
userData: this.data.userData, | |||||
avatarUrlShow: app.globalData.userInfoData.avatarUrl | |||||
}) | }) | ||||
} | } | ||||
this.getAddress(); | this.getAddress(); | ||||
wx.chooseImage({ | wx.chooseImage({ | ||||
count:1, | count:1, | ||||
success:(res)=>{ | success:(res)=>{ | ||||
wx.showLoading({ | |||||
title: '上传中', | |||||
mask: true | |||||
this.setData({ | |||||
avatarUrlShow: res.tempFilePaths[0] | |||||
}) | }) | ||||
wx.uploadFile({ | wx.uploadFile({ | ||||
url: app.globalData.urlRoot + "upload/uploadImage", | url: app.globalData.urlRoot + "upload/uploadImage", | ||||
filePath:"avatar" | filePath:"avatar" | ||||
}, | }, | ||||
success: option => { | success: option => { | ||||
wx.hideLoading(); | |||||
var json = JSON.parse(option.data); | var json = JSON.parse(option.data); | ||||
if (json.code==200){ | if (json.code==200){ | ||||
this.data.userData.avatarUrl = json.data[0].url; | this.data.userData.avatarUrl = json.data[0].url; |
<view class="headGroup"> | <view class="headGroup"> | ||||
<view class="headTitle">头像</view> | <view class="headTitle">头像</view> | ||||
<view class="selectGroup"> | <view class="selectGroup"> | ||||
<image class="avatarUrl" bindtap="changeHeadImg" src="{{userData.avatarUrl}}"></image> | |||||
<image class="avatarUrl" bindtap="changeHeadImg" src="{{avatarUrlShow}}"></image> | |||||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | <image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | ||||
</view> | </view> | ||||
</view> | </view> |
"pathName": "pages/placingOrder/placingOrder", | "pathName": "pages/placingOrder/placingOrder", | ||||
"query": "" | "query": "" | ||||
}, | }, | ||||
{ | |||||
"id": -1, | |||||
"name": "补充资料", | |||||
"pathName": "pages/supplement/supplement", | |||||
"query": "" | |||||
}, | |||||
{ | |||||
"id": -1, | |||||
"name": "奖品详情", | |||||
"pathName": "pages/prizeDetail/prizeDetail", | |||||
"query": "" | |||||
}, | |||||
{ | |||||
"id": -1, | |||||
"name": "认证", | |||||
"pathName": "pages/scout/register/register", | |||||
"query": "" | |||||
}, | |||||
{ | |||||
"id": -1, | |||||
"name": "星探规则", | |||||
"pathName": "pages/scoutRule/scoutRule", | |||||
"query": "" | |||||
} | |||||
{ | |||||
"id": -1, | |||||
"name": "补充资料", | |||||
"pathName": "pages/supplement/supplement", | |||||
"query": "" | |||||
}, | |||||
{ | |||||
"id": -1, | |||||
"name": "奖品详情", | |||||
"pathName": "pages/prizeDetail/prizeDetail", | |||||
"query": "" | |||||
}, | |||||
{ | |||||
"id": -1, | |||||
"name": "认证", | |||||
"pathName": "pages/scout/register/register", | |||||
"query": "" | |||||
}, | |||||
{ | |||||
"id": -1, | |||||
"name": "星探规则", | |||||
"pathName": "pages/scoutRule/scoutRule", | |||||
"query": "" | |||||
} | |||||
] | ] | ||||
} | } | ||||
} | } |