<!--pages/component/service/index.wxml--> | <!--pages/component/service/index.wxml--> | ||||
<view> | <view> | ||||
<image class="serviceIcon" bindtap="maskShow" src="{{imgUrl+'/images/service.png'}}"></image> | |||||
<image class="serviceIcon" style="height:82rpx;" bindtap="maskShow" src="{{imgUrl+'/newImages/38.png'}}"></image> | |||||
<image class="serviceIcon" bindtap="openYuyue" style="top:577rpx;" src="{{imgUrl+'/btns/appointmentIcon.png'}}"></image> | <image class="serviceIcon" bindtap="openYuyue" style="top:577rpx;" src="{{imgUrl+'/btns/appointmentIcon.png'}}"></image> | ||||
<view wx:if="{{maskState}}" class="maskGroup" catchtouchmove="ture"> | <view wx:if="{{maskState}}" class="maskGroup" catchtouchmove="ture"> | ||||
<view class="contentGroup"> | <view class="contentGroup"> |
<!--pages/component/tabBar/index.wxml--> | <!--pages/component/tabBar/index.wxml--> | ||||
<view class="tabBarFrame"> | <view class="tabBarFrame"> | ||||
<view class="tabBarOption" bindtap="cutPage" data-page="1"> | <view class="tabBarOption" bindtap="cutPage" data-page="1"> | ||||
<image class="tabBar1" src="{{imgUrl+'/tabBar/1_'+(nowPage==1?2:1)+'.png?v=002'}}"></image> | |||||
<image class="tabBar1" src="{{imgUrl+'/tabBar/1_'+(nowPage==1?2:1)+'.jpg?v=002'}}"></image> | |||||
<view class="tabBarText {{nowPage==1?'tabBarText2':''}}">启辰星</view> | <view class="tabBarText {{nowPage==1?'tabBarText2':''}}">启辰星</view> | ||||
</view> | </view> | ||||
<view class="tabBarOption" bindtap="cutPage" data-page="2"> | <view class="tabBarOption" bindtap="cutPage" data-page="2"> |
siteSelect: false,//是否显示位置选择框 | siteSelect: false,//是否显示位置选择框 | ||||
provinceArr: [],//省 | provinceArr: [],//省 | ||||
provinceValue: 0,//选中的省下标 | provinceValue: 0,//选中的省下标 | ||||
cityArr: [],//省 | |||||
cityValue: 0,//选中的省下标 | |||||
storeArr: [],//店铺 | storeArr: [],//店铺 | ||||
storeValue: 0,//选中的店铺下标 | storeValue: 0,//选中的店铺下标 | ||||
verificationCode: '获取验证码',//验证码文案 | verificationCode: '获取验证码',//验证码文案 | ||||
mobile: "",//手机号 | mobile: "",//手机号 | ||||
captcha: "",//验证码 | captcha: "",//验证码 | ||||
province: "",//省份 | province: "",//省份 | ||||
city:"",//城市 | |||||
agent_code: "",//经销商编码 | agent_code: "",//经销商编码 | ||||
agentDetail: "",//经销商详细信息 | agentDetail: "",//经销商详细信息 | ||||
parentOpenid: app.globalData.friendOpenid,//好友openid | parentOpenid: app.globalData.friendOpenid,//好友openid | ||||
provinceChane: function (e) {//选中省 | provinceChane: function (e) {//选中省 | ||||
this.setData({ | this.setData({ | ||||
provinceValue: e.detail.value, | provinceValue: e.detail.value, | ||||
storeArr: this.data.provinceArr[e.detail.value].children, | |||||
cityArr: this.data.provinceArr[e.detail.value].children, | |||||
cityValue: 0, | |||||
storeArr: this.data.provinceArr[e.detail.value].children[0].children, | |||||
storeValue: 0 | storeValue: 0 | ||||
}) | }) | ||||
this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province; | this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province; | ||||
this.data.subscribeData.city = this.data.cityArr[this.data.cityValue].city; | |||||
this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | |||||
this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | |||||
}, | |||||
cityChane: function (e) {//选中城市 | |||||
this.setData({ | |||||
cityValue: e.detail.value, | |||||
storeArr: this.data.provinceArr[this.data.provinceValue].children[e.detail.value].children, | |||||
storeValue: 0 | |||||
}) | |||||
this.data.subscribeData.city = this.data.cityArr[this.data.cityValue].city; | |||||
this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | ||||
this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | ||||
}, | }, | ||||
getDistributorList: function (longitude, latitude) {//获取经销商列表 | getDistributorList: function (longitude, latitude) {//获取经销商列表 | ||||
app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude }, res => { | app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude }, res => { | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
app.globalData.myCenterData = {}; | |||||
this.setData({ | this.setData({ | ||||
provinceArr: res.data.list, | provinceArr: res.data.list, | ||||
storeArr: res.data.list[res.data.nearData.provinceIndex].children, | |||||
cityArr: res.data.list[res.data.nearData.provinceIndex].children, | |||||
storeArr: res.data.list[res.data.nearData.provinceIndex].children[res.data.nearData.cityIndex].children, | |||||
provinceValue: res.data.nearData.provinceIndex, | provinceValue: res.data.nearData.provinceIndex, | ||||
storeValue: res.data.nearData.cityIndex | |||||
cityValue: res.data.nearData.cityIndex, | |||||
storeValue: res.data.nearData.agentIndex | |||||
}) | }) | ||||
this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province; | this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province; | ||||
this.data.subscribeData.city = this.data.cityArr[this.data.cityValue].city; | |||||
this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | ||||
this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | ||||
app.globalData.indexData.provinceArr = res.data.list; | |||||
app.globalData.indexData.storeArr = res.data.list[res.data.nearData.provinceIndex].children; | |||||
app.globalData.indexData.provinceValue = res.data.nearData.provinceIndex; | |||||
app.globalData.indexData.storeValue = res.data.nearData.cityIndex; | |||||
app.globalData.myCenterData.provinceArr = res.data.list; | |||||
app.globalData.myCenterData.cityArr = res.data.list[res.data.nearData.provinceIndex].children; | |||||
app.globalData.myCenterData.storeArr = res.data.list[res.data.nearData.provinceIndex].children[res.data.nearData.cityIndex].children; | |||||
app.globalData.myCenterData.provinceValue = res.data.nearData.provinceIndex; | |||||
app.globalData.myCenterData.cityValue = res.data.nearData.cityValue; | |||||
app.globalData.myCenterData.storeValue = res.data.nearData.agentIndex; | |||||
} else { | } else { | ||||
wx.showToast({ | wx.showToast({ | ||||
title: res.msg, | title: res.msg, |
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | <image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | ||||
</view> | </view> | ||||
</picker> | </picker> | ||||
<picker mode='selector' range="{{cityArr}}" range-key="city" value="{{cityValue}}" bindchange="cityChane"> | |||||
<view class="selectGroup"> | |||||
<text class="selectName">{{cityArr[cityValue].city}}</text> | |||||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||||
</view> | |||||
</picker> | |||||
<picker mode='selector' range="{{storeArr}}" range-key="agent_detail" value="{{storeValue}}" bindchange="storeChane"> | <picker mode='selector' range="{{storeArr}}" range-key="agent_detail" value="{{storeValue}}" bindchange="storeChane"> | ||||
<view class="selectGroup"> | <view class="selectGroup"> | ||||
<text class="selectName">{{storeArr[storeValue].agent_detail}}</text> | <text class="selectName">{{storeArr[storeValue].agent_detail}}</text> |
signData:null, | signData:null, | ||||
totalSignDay:0, | totalSignDay:0, | ||||
addressShow: false, | addressShow: false, | ||||
ani1: null, | |||||
ani2: null, | |||||
ani3: null, | |||||
ani4: null, | |||||
}, | }, | ||||
/** | /** | ||||
* 关闭任务窗 | * 关闭任务窗 | ||||
loadFun: function () { | loadFun: function () { | ||||
this.getTaskProgress(); | this.getTaskProgress(); | ||||
this.getAddress(); | this.getAddress(); | ||||
if (this.data.isFriendShare) { | |||||
this.useShareId(); | |||||
}else{ | |||||
this.getSignInfo(); | |||||
} | |||||
// if (this.data.isFriendShare) { | |||||
// this.useShareId(); | |||||
// }else{ | |||||
// } | |||||
}, | }, | ||||
/** | /** | ||||
* 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
}, | }, | ||||
getTaskProgress: function () {//获取任务完成度 | getTaskProgress: function () {//获取任务完成度 | ||||
app.wxRequest(app.globalData.urlRoot + "task/getTaskProgress", { taskType: 1 }, res => { | app.wxRequest(app.globalData.urlRoot + "task/getTaskProgress", { taskType: 1 }, res => { | ||||
this.getSignInfo(); | |||||
if (res.code == 200) { | if (res.code == 200) { | ||||
this.setData({ | this.setData({ | ||||
picturlList: res.data.taskData, | picturlList: res.data.taskData, | ||||
totalSignDay: res.data.totalSignDay, | |||||
picturlCurrent: res.data.taskData.length-1 | |||||
totalSignDay: res.data.totalSignDay | |||||
}) | }) | ||||
} else { | } else { | ||||
wx.showToast({ | wx.showToast({ | ||||
getSignInfo: function () {//查看当日是否签到 | getSignInfo: function () {//查看当日是否签到 | ||||
app.wxRequest(app.globalData.urlRoot + "task/getSignInfo", {}, res => { | app.wxRequest(app.globalData.urlRoot + "task/getSignInfo", {}, res => { | ||||
if(res.code==200){ | if(res.code==200){ | ||||
if (res.data.state==0) {//已签到 | |||||
this.setData({ | |||||
signState: false, | |||||
signData: res.data.popData | |||||
}) | |||||
// this.setData({ | |||||
// showClose: false, | |||||
// maskShow: true, | |||||
// taskShow: true, | |||||
// isSign: true | |||||
// }) | |||||
if (res.data.state==0) {//未签到 | |||||
this.aniFun(500, 0, res.data.popData.childId); | |||||
setTimeout(()=>{ | |||||
this.aniFun(500, 1, res.data.popData.childId); | |||||
setTimeout(() => { | |||||
this.aniFun(500, 0, res.data.popData.childId); | |||||
setTimeout(() => { | |||||
this.aniFun(500, 1, res.data.popData.childId); | |||||
setTimeout(() => { | |||||
this.setData({ | |||||
signState: false, | |||||
signData: res.data.popData, | |||||
picturlCurrent: res.data.popData.parentId - 1 | |||||
}) | |||||
}, 500) | |||||
}, 500) | |||||
}, 500) | |||||
}, 500) | |||||
} | } | ||||
// else{ | |||||
// this.getShareId(); | |||||
// } | |||||
} | } | ||||
},this) | },this) | ||||
}, | }, | ||||
maskShow: false | maskShow: false | ||||
}) | }) | ||||
} else { | } else { | ||||
this.getSignInfo(); | |||||
// this.getSignInfo(); | |||||
// wx.showToast({ | // wx.showToast({ | ||||
// title: res.msg, | // title: res.msg, | ||||
// icon:"none" | // icon:"none" | ||||
// }) | // }) | ||||
}, | }, | ||||
hiddenFriendTip: function () { | hiddenFriendTip: function () { | ||||
this.getSignInfo(); | |||||
// this.getSignInfo(); | |||||
this.setData({ | this.setData({ | ||||
hiddenFriendFrame:false | hiddenFriendFrame:false | ||||
}) | }) | ||||
if (this.data.isAddress == false && this.data.addressShow==false) { | if (this.data.isAddress == false && this.data.addressShow==false) { | ||||
this.getAddress(); | this.getAddress(); | ||||
} | } | ||||
}, | |||||
aniFun(duration, opacity,nums,type) { | |||||
var animation = wx.createAnimation({ | |||||
duration: duration | |||||
}); | |||||
if (type) { | |||||
animation.scale(type).step(); | |||||
} else { | |||||
animation.opacity(opacity).step(); | |||||
} | |||||
if (nums == 1) { | |||||
this.setData({ | |||||
ani1: animation.export() | |||||
}) | |||||
} else if (nums == 2) { | |||||
this.setData({ | |||||
ani2: animation.export() | |||||
}) | |||||
} else if (nums == 3) { | |||||
this.setData({ | |||||
ani3: animation.export() | |||||
}) | |||||
} else if (nums == 4) { | |||||
this.setData({ | |||||
ani4: animation.export() | |||||
}) | |||||
} | |||||
} | } | ||||
}) | }) |
<swiper-item> | <swiper-item> | ||||
<view class="fragmentBox"> | <view class="fragmentBox"> | ||||
<image class="fragmentComplete" src="{{item.fullPicUrl}}"></image> | <image class="fragmentComplete" src="{{item.fullPicUrl}}"></image> | ||||
<image class="fragmentComplete1" wx:if="{{!item.childIdArr[0]}}" src="{{imgUrl+'/newImages/maskIcon1.png'}}"></image> | |||||
<image class="fragmentComplete2" wx:if="{{!item.childIdArr[1]}}" src="{{imgUrl+'/newImages/maskIcon2.png'}}"></image> | |||||
<image class="fragmentComplete3" wx:if="{{!item.childIdArr[2]}}" src="{{imgUrl+'/newImages/maskIcon3.png'}}"></image> | |||||
<image class="fragmentComplete4" wx:if="{{!item.childIdArr[3]}}" src="{{imgUrl+'/newImages/maskIcon4.png'}}"></image> | |||||
<image class="fragmentComplete1" animation="{{ani1}}" wx:if="{{!item.childIdArr[0]}}" src="{{imgUrl+'/newImages/maskIcon1.png'}}"></image> | |||||
<image class="fragmentComplete2" animation="{{ani2}}" wx:if="{{!item.childIdArr[1]}}" src="{{imgUrl+'/newImages/maskIcon2.png'}}"></image> | |||||
<image class="fragmentComplete3" animation="{{ani3}}" wx:if="{{!item.childIdArr[2]}}" src="{{imgUrl+'/newImages/maskIcon3.png'}}"></image> | |||||
<image class="fragmentComplete4" animation="{{ani4}}" wx:if="{{!item.childIdArr[3]}}" src="{{imgUrl+'/newImages/maskIcon4.png'}}"></image> | |||||
<view class="lockSty lock1" wx:if="{{picturlList[picturlCurrent]['awardState']==0}}"> | <view class="lockSty lock1" wx:if="{{picturlList[picturlCurrent]['awardState']==0}}"> | ||||
<image wx:if="{{item.childIdArr[0]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon2.png'}}"></image> | <image wx:if="{{item.childIdArr[0]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon2.png'}}"></image> | ||||
<image wx:if="{{!item.childIdArr[0]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon1.png'}}"></image> | <image wx:if="{{!item.childIdArr[0]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon1.png'}}"></image> |
<image class="indexBottom" src="{{imgUrl+'/images/indexBottom2.png?v=002'}}"></image> | <image class="indexBottom" src="{{imgUrl+'/images/indexBottom2.png?v=002'}}"></image> | ||||
<view class="lookMore" bindtap="lookMore"></view> | <view class="lookMore" bindtap="lookMore"></view> | ||||
</view> | </view> | ||||
<!-- <view class="indexBottom2"></view> --> | |||||
<view class="indexBottom2"></view> | |||||
</view> | </view> | ||||
<!-- <view class="msgFrame" wx:if="{{!isRegister}}"> --> | <!-- <view class="msgFrame" wx:if="{{!isRegister}}"> --> | ||||
<view class="msgFrame" wx:if="{{false}}"> | <view class="msgFrame" wx:if="{{false}}"> |
} | } | ||||
.indexBottom2{ | .indexBottom2{ | ||||
width:750rpx; | width:750rpx; | ||||
height:502rpx; | |||||
height:140rpx; | |||||
background-color: #ececec; | background-color: #ececec; | ||||
} | } | ||||
.indexOrderIcon{ | .indexOrderIcon{ |
this.setData({ | this.setData({ | ||||
startDown: 3 | startDown: 3 | ||||
}) | }) | ||||
this.setData({ | |||||
gameState: true | |||||
}) | |||||
var setInt2 = setInterval(() => { | var setInt2 = setInterval(() => { | ||||
if (this.data.startDown > -1) { | if (this.data.startDown > -1) { | ||||
this.data.startDown -= 1; | this.data.startDown -= 1; | ||||
},800) | },800) | ||||
}, | }, | ||||
downTimeFun: function () {//游戏倒计时 | downTimeFun: function () {//游戏倒计时 | ||||
this.setData({ | |||||
gameState:true | |||||
}) | |||||
this.data.setInt = setInterval(()=>{ | this.data.setInt = setInterval(()=>{ | ||||
this.data.downNum -= 1; | this.data.downNum -= 1; | ||||
if (this.data.downNum<10){ | if (this.data.downNum<10){ |
<view> | <view> | ||||
<view class="main"> | <view class="main"> | ||||
<view class="msgGroup" wx:if="{{!isLogin}}"> | <view class="msgGroup" wx:if="{{!isLogin}}"> | ||||
<view class="pageTitle">个人中心</view> | |||||
<!-- <view class="pageTitle">个人中心</view> --> | |||||
<view class="headGroup"> | <view class="headGroup"> | ||||
<image class="defaultHead" src="{{imgUrl+'/images/defaultHead.png'}}"></image> | <image class="defaultHead" src="{{imgUrl+'/images/defaultHead.png'}}"></image> | ||||
</view> | </view> | ||||
<view class="loginBtn"><image style="width:307rpx;height:48rpx;" src="{{imgUrl+'/btns/wxLoginIcon.jpg'}}"></image><button bindgetuserinfo="getUserWxMsg" style="width:100%;height:100%;min-height:0;padding:0;margin:0;" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN"></button></view> | <view class="loginBtn"><image style="width:307rpx;height:48rpx;" src="{{imgUrl+'/btns/wxLoginIcon.jpg'}}"></image><button bindgetuserinfo="getUserWxMsg" style="width:100%;height:100%;min-height:0;padding:0;margin:0;" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN"></button></view> | ||||
</view> | </view> | ||||
<view class="userMsg" wx:if="{{isLogin}}"> | <view class="userMsg" wx:if="{{isLogin}}"> | ||||
<image class="userMsgBg" src="{{imgUrl+'/images/userMsgBg.png'}}"></image> | |||||
<view class="pageTitle">个人中心</view> | |||||
<image class="userMsgBg" src="{{imgUrl+'/newImages/39.png'}}"></image> | |||||
<!-- <view class="pageTitle">个人中心</view> --> | |||||
<view class="headGroup" style="margin-bottom:11rpx;"> | <view class="headGroup" style="margin-bottom:11rpx;"> | ||||
<image class="defaultHead" src="{{userData.avatarUrl}}"></image> | <image class="defaultHead" src="{{userData.avatarUrl}}"></image> | ||||
</view> | </view> |
left: 0; | left: 0; | ||||
top: 0; | top: 0; | ||||
width: 750rpx; | width: 750rpx; | ||||
height: 421rpx; | |||||
height: 365rpx; | |||||
z-index: -1; | z-index: -1; | ||||
} | } | ||||
.userLevel{ | .userLevel{ |
isAgreement: true,//是否同意协议 | isAgreement: true,//是否同意协议 | ||||
siteSelect: false,//是否显示位置选择框 | siteSelect: false,//是否显示位置选择框 | ||||
phoneInputShow: false,//是否显示电话输入框 | phoneInputShow: false,//是否显示电话输入框 | ||||
provinceArr: [],//省 | |||||
provinceValue: 0,//选中的省下标 | |||||
storeArr: [],//店铺 | |||||
storeValue: 0,//选中的店铺下标 | |||||
provinceDataAll:null,//地区所有数据 | |||||
provinceDataArr:[[""],[""]],//省市数据 | |||||
provinceDataValue:[0,0],//选中的省市下标 | |||||
nowProvince:"",//选中的省市文字 | |||||
storeArr:[],//专营店数据 | |||||
storeValue:0,//选中的专营店下标 | |||||
verificationCode: '获取验证码',//验证码文案 | verificationCode: '获取验证码',//验证码文案 | ||||
sendCode: true, | sendCode: true, | ||||
appointment: true, | appointment: true, | ||||
mobile: "",//手机号 | mobile: "",//手机号 | ||||
captcha: "",//验证码 | captcha: "",//验证码 | ||||
province: "",//省份 | province: "",//省份 | ||||
city:"",//市区 | |||||
agent_code: "",//经销商编码 | agent_code: "",//经销商编码 | ||||
agentDetail: "",//经销商详细信息 | agentDetail: "",//经销商详细信息 | ||||
parentOpenid: app.globalData.friendOpenid,//好友openid | parentOpenid: app.globalData.friendOpenid,//好友openid | ||||
} | } | ||||
}, | }, | ||||
loadFun: function () { | loadFun: function () { | ||||
if (app.globalData.myCenterData) { | |||||
this.setData({ | |||||
provinceArr: app.globalData.myCenterData.provinceArr, | |||||
storeArr: app.globalData.myCenterData.storeArr, | |||||
provinceValue: app.globalData.myCenterData.provinceValue, | |||||
storeValue: app.globalData.myCenterData.storeValue, | |||||
}) | |||||
this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province; | |||||
this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | |||||
this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | |||||
} | |||||
if (app.globalData.userMobile) { | if (app.globalData.userMobile) { | ||||
this.data.subscribeData.mobile = app.globalData.userMobile; | this.data.subscribeData.mobile = app.globalData.userMobile; | ||||
this.setData({ | this.setData({ | ||||
getDistributorList: function (longitude, latitude) {//获取经销商列表 | getDistributorList: function (longitude, latitude) {//获取经销商列表 | ||||
app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude }, res => { | app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude }, res => { | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
app.globalData.myCenterData = {}; | |||||
//整理数据 | |||||
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[0].children.length; j++) { | |||||
city.push(res.data.list[0].children[j].city) | |||||
} | |||||
//将数据赋值给变量 | |||||
this.setData({ | this.setData({ | ||||
provinceArr: res.data.list, | |||||
storeArr: res.data.list[res.data.nearData.provinceIndex].children, | |||||
provinceValue: res.data.nearData.provinceIndex, | |||||
storeValue: res.data.nearData.cityIndex | |||||
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 | |||||
}) | }) | ||||
this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province; | |||||
this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | |||||
this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | |||||
app.globalData.myCenterData.provinceArr = res.data.list; | |||||
app.globalData.myCenterData.storeArr = res.data.list[res.data.nearData.provinceIndex].children; | |||||
app.globalData.myCenterData.provinceValue = res.data.nearData.provinceIndex; | |||||
app.globalData.myCenterData.storeValue = res.data.nearData.cityIndex; | |||||
} else { | } else { | ||||
wx.showToast({ | wx.showToast({ | ||||
title: res.msg, | title: res.msg, | ||||
} | } | ||||
}, this); | }, this); | ||||
}, | }, | ||||
provinceChane: function (e) {//选中省 | |||||
this.setData({ | |||||
provinceValue: e.detail.value, | |||||
storeArr: this.data.provinceArr[e.detail.value].children, | |||||
storeValue: 0 | |||||
}) | |||||
this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province; | |||||
this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | |||||
this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | |||||
}, | |||||
storeChane: function (e) {//选中店铺 | |||||
this.setData({ | |||||
storeValue: e.detail.value, | |||||
}) | |||||
this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | |||||
this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | |||||
}, | |||||
getCode: function (e) {//获取验证码 | getCode: function (e) {//获取验证码 | ||||
if (!app.mobileVerify(this.data.subscribeData.mobile)) { | if (!app.mobileVerify(this.data.subscribeData.mobile)) { | ||||
if (this.data.subscribeData.mobile) { | if (this.data.subscribeData.mobile) { | ||||
}, | }, | ||||
showSite: function () {//显示地址选择框 | showSite: function () {//显示地址选择框 | ||||
if (!this.data.siteSelect) { | if (!this.data.siteSelect) { | ||||
if (!app.globalData.myCenterData) { | |||||
this.getUserLocation();//获取用户当前位置 | |||||
} else { | |||||
this.setData({ | |||||
siteSelect: true | |||||
}) | |||||
} | |||||
this.getUserLocation();//获取用户当前位置 | |||||
} | } | ||||
}, | }, | ||||
agreementState: function () {//协议 | agreementState: function () {//协议 | ||||
}) | }) | ||||
return; | return; | ||||
} | } | ||||
this.data.appointment = false; | |||||
this.data.subscribeData.province = this.data.provinceDataArr[0][this.data.provinceDataValue[0]]; | |||||
this.data.subscribeData.city = this.data.provinceDataArr[1][this.data.provinceDataValue[1]]; | |||||
this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | |||||
this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | |||||
if (!this.data.appointment) { | if (!this.data.appointment) { | ||||
return; | return; | ||||
} | } | ||||
this.data.appointment = false; | |||||
app.wxRequest(app.globalData.urlRoot + "wxPay/preBuy", this.data.subscribeData, res => { | app.wxRequest(app.globalData.urlRoot + "wxPay/preBuy", this.data.subscribeData, res => { | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
wx.requestPayment({ | wx.requestPayment({ | ||||
}, | }, | ||||
closePage:function(){ | closePage:function(){ | ||||
this.closeXieyi(); | this.closeXieyi(); | ||||
}, | |||||
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 | |||||
}) | |||||
} | } | ||||
} | } | ||||
}) | }) |
<view wx:if="{{siteSelect}}" class="pickerGroup"> | <view wx:if="{{siteSelect}}" class="pickerGroup"> | ||||
<view class="inputGroup"> | <view class="inputGroup"> | ||||
<view class="userTitle">当前城市</view> | <view class="userTitle">当前城市</view> | ||||
<picker mode='selector' range="{{provinceArr}}" range-key="province" value="{{provinceValue}}" bindchange="provinceChane"> | |||||
<picker mode='multiSelector' range="{{provinceDataArr}}" value="{{provinceDataValue}}" bindcolumnchange="provinceDataChange" bindchange="provinceDataChane"> | |||||
<view class="userInput selectSiteGroup"> | <view class="userInput selectSiteGroup"> | ||||
<text>{{provinceArr[provinceValue].province}}</text> | |||||
<text>{{nowProvince}}</text> | |||||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | <image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | ||||
</view> | </view> | ||||
</picker> | </picker> |
} | } | ||||
.NoVehicle{ | .NoVehicle{ | ||||
position: relative; | position: relative; | ||||
padding-bottom: 30rpx; | |||||
} | } | ||||
.NoVehicle>.getCode{ | .NoVehicle>.getCode{ | ||||
position: absolute; | position: absolute; |
authenticationShow:false | authenticationShow:false | ||||
}) | }) | ||||
} | } | ||||
app.globalData.certificationState=2; | |||||
// app.globalData.certificationState=2; | |||||
this.setData({maskid: app.globalData.certificationState}) | this.setData({maskid: app.globalData.certificationState}) | ||||
if(app.globalData.certificationState==1){ | if(app.globalData.certificationState==1){ | ||||
this.setData({titleContent:'尊敬的启辰车主您好'}) | this.setData({titleContent:'尊敬的启辰车主您好'}) |
<!--pages/scout/scout.wxml--> | <!--pages/scout/scout.wxml--> | ||||
<view class="showView"> | <view class="showView"> | ||||
<view class="content"> | <view class="content"> | ||||
<image class="bg" src="{{imgUrl+'/star/scout/bg.jpg?v=004'}}"></image> | |||||
<image class="bg" src="{{imgUrl+'/newImages/scoutbg.jpg?v=004'}}"></image> | |||||
<image class="reward" wx:if="{{maskid<4}}" src="{{imgUrl+'/star/scout/reward.png?v=002'}}"></image> | <image class="reward" wx:if="{{maskid<4}}" src="{{imgUrl+'/star/scout/reward.png?v=002'}}"></image> | ||||
<image class="reward" wx:if="{{maskid>3}}" src="{{imgUrl+'/star/tu1.png?v=002'}}"></image> | <image class="reward" wx:if="{{maskid>3}}" src="{{imgUrl+'/star/tu1.png?v=002'}}"></image> | ||||
<image class="scoutbtn1" wx:if="{{maskid>3}}" bindtap="getPoster" src="{{imgUrl+'/star/scout/scoutbtn2.png'}}"></image> | <image class="scoutbtn1" wx:if="{{maskid>3}}" bindtap="getPoster" src="{{imgUrl+'/star/scout/scoutbtn2.png'}}"></image> |
isAgreement: true,//是否同意协议 | isAgreement: true,//是否同意协议 | ||||
jobList:[], | jobList:[], | ||||
jobValue:0, | jobValue:0, | ||||
provinceArr: [],//省 | |||||
provinceValue: 0,//选中的省下标 | |||||
storeArr: [],//店铺 | |||||
storeValue: 0,//选中的店铺下标 | |||||
provinceDataAll: null,//地区所有数据 | |||||
provinceDataArr: [[""], [""]],//省市数据 | |||||
provinceDataValue: [0, 0],//选中的省市下标 | |||||
nowProvince: "",//选中的省市文字 | |||||
storeArr: [],//专营店数据 | |||||
storeValue: 0,//选中的专营店下标 | |||||
realname:"", | realname:"", | ||||
jobDetail:"" | |||||
}, | }, | ||||
/** | /** | ||||
} | } | ||||
}, | }, | ||||
loadFun:function(){ | loadFun:function(){ | ||||
this.getJobList(); | |||||
// this.getJobList(); | |||||
this.getUserLocation(); | this.getUserLocation(); | ||||
var authenticationStatus = app.globalData.authenticationStatus; | var authenticationStatus = app.globalData.authenticationStatus; | ||||
if (authenticationStatus.realName){ | |||||
if (authenticationStatus && authenticationStatus.realName){ | |||||
this.setData({ | this.setData({ | ||||
realname: authenticationStatus.realName | realname: authenticationStatus.realName | ||||
}) | }) | ||||
jobList:res.data | jobList:res.data | ||||
}) | }) | ||||
var authenticationStatus = app.globalData.authenticationStatus; | var authenticationStatus = app.globalData.authenticationStatus; | ||||
if (authenticationStatus.jobId) { | |||||
if (authenticationStatus && authenticationStatus.jobId) { | |||||
for(let i=0;i<res.data.length;i++){ | for(let i=0;i<res.data.length;i++){ | ||||
if (res.data[i].jobId == authenticationStatus.jobId){ | if (res.data[i].jobId == authenticationStatus.jobId){ | ||||
this.setData({ | this.setData({ | ||||
getDistributorList: function (longitude, latitude) {//获取经销商列表 | getDistributorList: function (longitude, latitude) {//获取经销商列表 | ||||
app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude}, res => { | app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude}, res => { | ||||
if (res.code == 200) { | 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[0].children.length; j++) { | |||||
city.push(res.data.list[0].children[j].city) | |||||
} | |||||
//将数据赋值给变量 | |||||
this.setData({ | this.setData({ | ||||
provinceArr: res.data.list, | |||||
storeArr: res.data.list[res.data.nearData.provinceIndex].children, | |||||
provinceValue: res.data.nearData.provinceIndex, | |||||
storeValue: res.data.nearData.cityIndex | |||||
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 | |||||
}) | }) | ||||
var authenticationStatus = app.globalData.authenticationStatus; | |||||
if (authenticationStatus.city) { | |||||
for (let i = 0; i < res.data.list.length; i++) { | |||||
if (res.data.list[i].province == authenticationStatus.city){ | |||||
this.setData({ | |||||
provinceValue: i, | |||||
storeArr: this.data.provinceArr[i].children, | |||||
storeValue: 0 | |||||
}) | |||||
break; | |||||
} | |||||
} | |||||
} | |||||
} else { | } else { | ||||
wx.showToast({ | wx.showToast({ | ||||
title: res.msg, | title: res.msg, | ||||
} | } | ||||
}, this); | }, this); | ||||
}, | }, | ||||
provinceChane: function (e) {//选中省 | |||||
this.setData({ | |||||
provinceValue: e.detail.value, | |||||
storeArr: this.data.provinceArr[e.detail.value].children, | |||||
storeValue: 0 | |||||
}) | |||||
}, | |||||
storeChane: function (e) {//选中店铺 | |||||
this.setData({ | |||||
storeValue: e.detail.value, | |||||
}) | |||||
}, | |||||
getRealname: function (e) {//获取用户输入的姓名 | getRealname: function (e) {//获取用户输入的姓名 | ||||
this.data.realname = e.detail.value; | this.data.realname = e.detail.value; | ||||
}, | |||||
}, | |||||
getJobDetail: function (e) {//获取用户输入的姓名 | |||||
this.data.jobDetail = e.detail.value; | |||||
}, | |||||
submitMsg: function () { | submitMsg: function () { | ||||
if(!this.data.realname){ | if(!this.data.realname){ | ||||
wx.showToast({ | wx.showToast({ | ||||
}) | }) | ||||
return; | return; | ||||
} | } | ||||
if (!this.data.jobDetail) { | |||||
wx.showToast({ | |||||
title: '请输入职业', | |||||
icon: 'none' | |||||
}) | |||||
return; | |||||
} | |||||
if (!this.data.isAgreement) { | if (!this.data.isAgreement) { | ||||
wx.showToast({ | wx.showToast({ | ||||
title: '请同意协议', | title: '请同意协议', | ||||
} | } | ||||
var data = { | var data = { | ||||
realName:this.data.realname, | realName:this.data.realname, | ||||
jobId: this.data.jobList[this.data.jobValue].jobId, | |||||
jobDetail: this.data.jobList[this.data.jobValue].jobDetail, | |||||
// jobId: this.data.jobList[this.data.jobValue].jobId, | |||||
jobDetail: this.data.jobDetail, | |||||
agentDetail: this.data.storeArr[this.data.storeValue]['agent_detail'], | agentDetail: this.data.storeArr[this.data.storeValue]['agent_detail'], | ||||
agentCode: this.data.storeArr[this.data.storeValue]['agent_code'], | agentCode: this.data.storeArr[this.data.storeValue]['agent_code'], | ||||
city: this.data.provinceArr[this.data.provinceValue]['province'] | |||||
city: this.data.provinceDataArr[1][this.data.provinceDataValue[1]], | |||||
province: this.data.provinceDataArr[0][this.data.provinceDataValue[0]] | |||||
} | } | ||||
app.wxRequest(app.globalData.urlRoot + "certificationInfo/submitCertificationInfoData", data,res=>{ | app.wxRequest(app.globalData.urlRoot + "certificationInfo/submitCertificationInfoData", data,res=>{ | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
if (!app.globalData.authenticationStatus) { | |||||
app.globalData.authenticationStatus = {}; | |||||
} | |||||
app.globalData.authenticationStatus.realName = this.data.realname | app.globalData.authenticationStatus.realName = this.data.realname | ||||
app.globalData.authenticationStatus.jobId = this.data.jobList[this.data.jobValue].jobId | |||||
app.globalData.authenticationStatus.jobDetail = this.data.storeArr[this.data.storeValue]['agent_detail'] | app.globalData.authenticationStatus.jobDetail = this.data.storeArr[this.data.storeValue]['agent_detail'] | ||||
app.globalData.authenticationStatus.city = this.data.provinceArr[this.data.provinceValue]['province'] | |||||
app.globalData.authenticationStatus.agentDetail = this.data.storeArr[this.data.storeValue]['agent_detail'] | |||||
app.globalData.authenticationStatus.city = data.city | |||||
app.globalData.authenticationStatus.agentDetail = data.agentDetail | |||||
wx.navigateBack({ | wx.navigateBack({ | ||||
delta: 1, | delta: 1, | ||||
}) | }) | ||||
}) | }) | ||||
} | } | ||||
},this,"POST"); | },this,"POST"); | ||||
}, | |||||
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, | |||||
}) | |||||
} | } | ||||
}) | }) |
</view> | </view> | ||||
<view class="inputGroup"> | <view class="inputGroup"> | ||||
<view class="inputTitle">当前城市</view> | <view class="inputTitle">当前城市</view> | ||||
<picker mode='selector' range="{{provinceArr}}" range-key="province" value="{{provinceValue}}" bindchange="provinceChane"> | |||||
<picker mode='multiSelector' range="{{provinceDataArr}}" value="{{provinceDataValue}}" bindcolumnchange="provinceDataChange" bindchange="provinceDataChane"> | |||||
<view class="inputSty" style="display:flex;align-items: center;justify-content: space-between;"> | <view class="inputSty" style="display:flex;align-items: center;justify-content: space-between;"> | ||||
<view>{{provinceArr[provinceValue]['province']}}</view> | |||||
<view>{{nowProvince}}</view> | |||||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | <image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | ||||
</view> | </view> | ||||
</picker> | </picker> | ||||
</view> | </view> | ||||
<view class="inputGroup"> | <view class="inputGroup"> | ||||
<view class="inputTitle">职业</view> | <view class="inputTitle">职业</view> | ||||
<input class="inputSty" bindinput="getJobDetail" maxlength='20' value="{{jobDetail}}" placeholder="请输入职业"></input> | |||||
</view> | |||||
<!-- <view class="inputGroup"> | |||||
<view class="inputTitle">职业</view> | |||||
<picker mode='selector' range="{{jobList}}" range-key="jobDetail" bindchange="jobChange" value="{{jobValue}}"> | <picker mode='selector' range="{{jobList}}" range-key="jobDetail" bindchange="jobChange" value="{{jobValue}}"> | ||||
<view class="inputSty" style="display:flex;align-items: center;justify-content: space-between;"> | <view class="inputSty" style="display:flex;align-items: center;justify-content: space-between;"> | ||||
<view>职业:{{jobList[jobValue].jobDetail}}</view> | <view>职业:{{jobList[jobValue].jobDetail}}</view> | ||||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | <image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | ||||
</view> | </view> | ||||
</picker> | </picker> | ||||
</view> | |||||
</view> --> | |||||
<view class="agreementGroup"> | <view class="agreementGroup"> | ||||
<image class="agreeIcon" bindtap="agreementState" src="{{imgUrl+(isAgreement?'/images/agreeIcon.png?v=003':'/images/disagreeIcon.png?v=002')}}"></image> | <image class="agreeIcon" bindtap="agreementState" src="{{imgUrl+(isAgreement?'/images/agreeIcon.png?v=003':'/images/disagreeIcon.png?v=002')}}"></image> | ||||
<view class="agreementText"> | <view class="agreementText"> |
siteSelect: false,//是否显示位置选择框 | siteSelect: false,//是否显示位置选择框 | ||||
provinceArr: [],//省 | provinceArr: [],//省 | ||||
provinceValue: 0,//选中的省下标 | provinceValue: 0,//选中的省下标 | ||||
cityArr:[],//市 | |||||
cityValue:0,//选中的市下标 | |||||
storeArr: [],//店铺 | storeArr: [],//店铺 | ||||
storeValue: 0,//选中的店铺下标 | storeValue: 0,//选中的店铺下标 | ||||
verificationCode: '获取验证码',//验证码文案 | verificationCode: '获取验证码',//验证码文案 | ||||
mobile: "",//手机号 | mobile: "",//手机号 | ||||
captcha: "",//验证码 | captcha: "",//验证码 | ||||
province: "",//省份 | province: "",//省份 | ||||
city:"",//城市 | |||||
agent_code: "",//经销商编码 | agent_code: "",//经销商编码 | ||||
agentDetail: "",//经销商详细信息 | agentDetail: "",//经销商详细信息 | ||||
parentOpenid: app.globalData.friendOpenid,//好友openid | parentOpenid: app.globalData.friendOpenid,//好友openid | ||||
if (app.globalData.myCenterData) { | if (app.globalData.myCenterData) { | ||||
this.setData({ | this.setData({ | ||||
provinceArr: app.globalData.myCenterData.provinceArr, | provinceArr: app.globalData.myCenterData.provinceArr, | ||||
cityArr: app.globalData.myCenterData.cityArr, | |||||
storeArr: app.globalData.myCenterData.storeArr, | storeArr: app.globalData.myCenterData.storeArr, | ||||
provinceValue: app.globalData.myCenterData.provinceValue, | provinceValue: app.globalData.myCenterData.provinceValue, | ||||
cityValue: app.globalData.myCenterData.cityValue, | |||||
storeValue: app.globalData.myCenterData.storeValue, | storeValue: app.globalData.myCenterData.storeValue, | ||||
}) | }) | ||||
this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province; | this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province; | ||||
this.data.subscribeData.city = this.data.cityArr[this.data.cityValue].city; | |||||
this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | ||||
this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | ||||
} | } | ||||
subscribeData: this.data.subscribeData | subscribeData: this.data.subscribeData | ||||
}) | }) | ||||
} | } | ||||
this.getUserLocation();//获取用户当前位置 | |||||
}, | }, | ||||
getDistributorList: function (longitude, latitude) {//获取经销商列表 | getDistributorList: function (longitude, latitude) {//获取经销商列表 | ||||
app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude }, res => { | app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude }, res => { | ||||
app.globalData.myCenterData = {}; | app.globalData.myCenterData = {}; | ||||
this.setData({ | this.setData({ | ||||
provinceArr: res.data.list, | provinceArr: res.data.list, | ||||
storeArr: res.data.list[res.data.nearData.provinceIndex].children, | |||||
cityArr: res.data.list[res.data.nearData.provinceIndex].children, | |||||
storeArr: res.data.list[res.data.nearData.provinceIndex].children[res.data.nearData.cityIndex].children, | |||||
provinceValue: res.data.nearData.provinceIndex, | provinceValue: res.data.nearData.provinceIndex, | ||||
storeValue: res.data.nearData.cityIndex | |||||
cityValue: res.data.nearData.cityIndex, | |||||
storeValue: res.data.nearData.agentIndex | |||||
}) | }) | ||||
this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province; | this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province; | ||||
this.data.subscribeData.city = this.data.cityArr[this.data.cityValue].city; | |||||
this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | ||||
this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | ||||
app.globalData.myCenterData.provinceArr = res.data.list; | app.globalData.myCenterData.provinceArr = res.data.list; | ||||
app.globalData.myCenterData.storeArr = res.data.list[res.data.nearData.provinceIndex].children; | |||||
app.globalData.myCenterData.cityArr = res.data.list[res.data.nearData.provinceIndex].children; | |||||
app.globalData.myCenterData.storeArr = res.data.list[res.data.nearData.provinceIndex].children[res.data.nearData.cityIndex].children; | |||||
app.globalData.myCenterData.provinceValue = res.data.nearData.provinceIndex; | app.globalData.myCenterData.provinceValue = res.data.nearData.provinceIndex; | ||||
app.globalData.myCenterData.storeValue = res.data.nearData.cityIndex; | |||||
app.globalData.myCenterData.cityValue = res.data.nearData.cityValue; | |||||
app.globalData.myCenterData.storeValue = res.data.nearData.agentIndex; | |||||
} else { | } else { | ||||
wx.showToast({ | wx.showToast({ | ||||
title: res.msg, | title: res.msg, | ||||
provinceChane: function (e) {//选中省 | provinceChane: function (e) {//选中省 | ||||
this.setData({ | this.setData({ | ||||
provinceValue: e.detail.value, | provinceValue: e.detail.value, | ||||
storeArr: this.data.provinceArr[e.detail.value].children, | |||||
cityArr: this.data.provinceArr[e.detail.value].children, | |||||
cityValue: 0, | |||||
storeArr: this.data.provinceArr[e.detail.value].children[0].children, | |||||
storeValue: 0 | storeValue: 0 | ||||
}) | }) | ||||
this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province; | this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province; | ||||
this.data.subscribeData.city = this.data.cityArr[this.data.cityValue].city; | |||||
this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | |||||
this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | |||||
}, | |||||
cityChane:function(e){//选中城市 | |||||
this.setData({ | |||||
cityValue: e.detail.value, | |||||
storeArr: this.data.provinceArr[this.data.provinceValue].children[e.detail.value].children, | |||||
storeValue: 0 | |||||
}) | |||||
this.data.subscribeData.city = this.data.cityArr[this.data.cityValue].city; | |||||
this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | ||||
this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | ||||
}, | }, | ||||
showSite: function () {//显示地址选择框 | showSite: function () {//显示地址选择框 | ||||
if (!this.data.siteSelect) { | if (!this.data.siteSelect) { | ||||
if (!app.globalData.myCenterData) { | if (!app.globalData.myCenterData) { | ||||
this.getUserLocation();//获取用户当前位置 | |||||
} else { | } else { | ||||
this.setData({ | this.setData({ | ||||
siteSelect: true | siteSelect: true |
</view> | </view> | ||||
</view> | </view> | ||||
<view class="inputGroup"> | <view class="inputGroup"> | ||||
<input class="inputCode" bindfocus="showSite" style="width:450rpx;" value="{{subscribeData.captcha}}" bindinput="getCaptcha" placeholder="请输入验证码"></input> | |||||
<input class="inputCode" style="width:450rpx;" value="{{subscribeData.captcha}}" bindinput="getCaptcha" placeholder="请输入验证码"></input> | |||||
<view class="codeTime" bindtap="getCode">{{verificationCode}}</view> | <view class="codeTime" bindtap="getCode">{{verificationCode}}</view> | ||||
</view> | </view> | ||||
<view wx:if="{{siteSelect}}"> | |||||
<!-- <view wx:if="{{siteSelect}}"> --> | |||||
<picker mode='selector' range="{{provinceArr}}" range-key="province" value="{{provinceValue}}" bindchange="provinceChane"> | <picker mode='selector' range="{{provinceArr}}" range-key="province" value="{{provinceValue}}" bindchange="provinceChane"> | ||||
<view class="selectSiteGroup"> | <view class="selectSiteGroup"> | ||||
<text class="selectName">{{provinceArr[provinceValue].province}}</text> | <text class="selectName">{{provinceArr[provinceValue].province}}</text> | ||||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | <image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | ||||
</view> | </view> | ||||
</picker> | </picker> | ||||
<picker mode='selector' range="{{cityArr}}" range-key="city" value="{{cityValue}}" bindchange="cityChane"> | |||||
<view class="selectSiteGroup"> | |||||
<text class="selectName">{{cityArr[cityValue].city}}</text> | |||||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||||
</view> | |||||
</picker> | |||||
<picker mode='selector' range="{{storeArr}}" range-key="agent_detail" value="{{storeValue}}" bindchange="storeChane"> | <picker mode='selector' range="{{storeArr}}" range-key="agent_detail" value="{{storeValue}}" bindchange="storeChane"> | ||||
<view class="selectSiteGroup"> | <view class="selectSiteGroup"> | ||||
<text class="selectName">{{storeArr[storeValue].agent_detail}}</text> | <text class="selectName">{{storeArr[storeValue].agent_detail}}</text> | ||||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | <image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | ||||
</view> | </view> | ||||
</picker> | </picker> | ||||
</view> | |||||
<!-- </view> --> | |||||
<view class="agreementGroup"> | <view class="agreementGroup"> | ||||
<image class="agreeIcon" bindtap="agreementState" src="{{imgUrl+(isAgreement?'/images/agreeIcon.png?v=003':'/images/disagreeIcon.png?v=002')}}"></image> | <image class="agreeIcon" bindtap="agreementState" src="{{imgUrl+(isAgreement?'/images/agreeIcon.png?v=003':'/images/disagreeIcon.png?v=002')}}"></image> | ||||
<view class="agreementText"> | <view class="agreementText"> |
"name": "奖品详情", | "name": "奖品详情", | ||||
"pathName": "pages/prizeDetail/prizeDetail", | "pathName": "pages/prizeDetail/prizeDetail", | ||||
"query": "" | "query": "" | ||||
}, | |||||
{ | |||||
"id": -1, | |||||
"name": "认证", | |||||
"pathName": "pages/scout/register/register", | |||||
"query": "" | |||||
} | } | ||||
] | ] | ||||
} | } |