@@ -1,6 +1,6 @@ | |||
<!--pages/component/service/index.wxml--> | |||
<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> | |||
<view wx:if="{{maskState}}" class="maskGroup" catchtouchmove="ture"> | |||
<view class="contentGroup"> |
@@ -1,7 +1,7 @@ | |||
<!--pages/component/tabBar/index.wxml--> | |||
<view class="tabBarFrame"> | |||
<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> | |||
<view class="tabBarOption" bindtap="cutPage" data-page="2"> |
@@ -15,6 +15,8 @@ Page({ | |||
siteSelect: false,//是否显示位置选择框 | |||
provinceArr: [],//省 | |||
provinceValue: 0,//选中的省下标 | |||
cityArr: [],//省 | |||
cityValue: 0,//选中的省下标 | |||
storeArr: [],//店铺 | |||
storeValue: 0,//选中的店铺下标 | |||
verificationCode: '获取验证码',//验证码文案 | |||
@@ -25,6 +27,7 @@ Page({ | |||
mobile: "",//手机号 | |||
captcha: "",//验证码 | |||
province: "",//省份 | |||
city:"",//城市 | |||
agent_code: "",//经销商编码 | |||
agentDetail: "",//经销商详细信息 | |||
parentOpenid: app.globalData.friendOpenid,//好友openid | |||
@@ -131,10 +134,23 @@ Page({ | |||
provinceChane: function (e) {//选中省 | |||
this.setData({ | |||
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 | |||
}) | |||
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.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | |||
}, | |||
@@ -186,19 +202,25 @@ Page({ | |||
getDistributorList: function (longitude, latitude) {//获取经销商列表 | |||
app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude }, res => { | |||
if (res.code == 200) { | |||
app.globalData.myCenterData = {}; | |||
this.setData({ | |||
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, | |||
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.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; | |||
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 { | |||
wx.showToast({ | |||
title: res.msg, |
@@ -25,6 +25,12 @@ | |||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||
</view> | |||
</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"> | |||
<view class="selectGroup"> | |||
<text class="selectName">{{storeArr[storeValue].agent_detail}}</text> |
@@ -29,6 +29,10 @@ Page({ | |||
signData:null, | |||
totalSignDay:0, | |||
addressShow: false, | |||
ani1: null, | |||
ani2: null, | |||
ani3: null, | |||
ani4: null, | |||
}, | |||
/** | |||
* 关闭任务窗 | |||
@@ -127,11 +131,11 @@ Page({ | |||
loadFun: function () { | |||
this.getTaskProgress(); | |||
this.getAddress(); | |||
if (this.data.isFriendShare) { | |||
this.useShareId(); | |||
}else{ | |||
this.getSignInfo(); | |||
} | |||
// if (this.data.isFriendShare) { | |||
// this.useShareId(); | |||
// }else{ | |||
// } | |||
}, | |||
/** | |||
* 生命周期函数--监听页面初次渲染完成 | |||
@@ -192,11 +196,11 @@ Page({ | |||
}, | |||
getTaskProgress: function () {//获取任务完成度 | |||
app.wxRequest(app.globalData.urlRoot + "task/getTaskProgress", { taskType: 1 }, res => { | |||
this.getSignInfo(); | |||
if (res.code == 200) { | |||
this.setData({ | |||
picturlList: res.data.taskData, | |||
totalSignDay: res.data.totalSignDay, | |||
picturlCurrent: res.data.taskData.length-1 | |||
totalSignDay: res.data.totalSignDay | |||
}) | |||
} else { | |||
wx.showToast({ | |||
@@ -262,21 +266,25 @@ Page({ | |||
getSignInfo: function () {//查看当日是否签到 | |||
app.wxRequest(app.globalData.urlRoot + "task/getSignInfo", {}, res => { | |||
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) | |||
}, | |||
@@ -309,7 +317,7 @@ Page({ | |||
maskShow: false | |||
}) | |||
} else { | |||
this.getSignInfo(); | |||
// this.getSignInfo(); | |||
// wx.showToast({ | |||
// title: res.msg, | |||
// icon:"none" | |||
@@ -333,7 +341,7 @@ Page({ | |||
// }) | |||
}, | |||
hiddenFriendTip: function () { | |||
this.getSignInfo(); | |||
// this.getSignInfo(); | |||
this.setData({ | |||
hiddenFriendFrame:false | |||
}) | |||
@@ -369,5 +377,32 @@ Page({ | |||
if (this.data.isAddress == false && this.data.addressShow==false) { | |||
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() | |||
}) | |||
} | |||
} | |||
}) |
@@ -15,10 +15,10 @@ | |||
<swiper-item> | |||
<view class="fragmentBox"> | |||
<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}}"> | |||
<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> |
@@ -29,7 +29,7 @@ | |||
<image class="indexBottom" src="{{imgUrl+'/images/indexBottom2.png?v=002'}}"></image> | |||
<view class="lookMore" bindtap="lookMore"></view> | |||
</view> | |||
<!-- <view class="indexBottom2"></view> --> | |||
<view class="indexBottom2"></view> | |||
</view> | |||
<!-- <view class="msgFrame" wx:if="{{!isRegister}}"> --> | |||
<view class="msgFrame" wx:if="{{false}}"> |
@@ -224,7 +224,7 @@ view{ | |||
} | |||
.indexBottom2{ | |||
width:750rpx; | |||
height:502rpx; | |||
height:140rpx; | |||
background-color: #ececec; | |||
} | |||
.indexOrderIcon{ |
@@ -154,6 +154,9 @@ Page({ | |||
this.setData({ | |||
startDown: 3 | |||
}) | |||
this.setData({ | |||
gameState: true | |||
}) | |||
var setInt2 = setInterval(() => { | |||
if (this.data.startDown > -1) { | |||
this.data.startDown -= 1; | |||
@@ -320,9 +323,6 @@ Page({ | |||
},800) | |||
}, | |||
downTimeFun: function () {//游戏倒计时 | |||
this.setData({ | |||
gameState:true | |||
}) | |||
this.data.setInt = setInterval(()=>{ | |||
this.data.downNum -= 1; | |||
if (this.data.downNum<10){ |
@@ -2,15 +2,15 @@ | |||
<view> | |||
<view class="main"> | |||
<view class="msgGroup" wx:if="{{!isLogin}}"> | |||
<view class="pageTitle">个人中心</view> | |||
<!-- <view class="pageTitle">个人中心</view> --> | |||
<view class="headGroup"> | |||
<image class="defaultHead" src="{{imgUrl+'/images/defaultHead.png'}}"></image> | |||
</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 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;"> | |||
<image class="defaultHead" src="{{userData.avatarUrl}}"></image> | |||
</view> |
@@ -355,7 +355,7 @@ view{ | |||
left: 0; | |||
top: 0; | |||
width: 750rpx; | |||
height: 421rpx; | |||
height: 365rpx; | |||
z-index: -1; | |||
} | |||
.userLevel{ |
@@ -17,10 +17,12 @@ Component({ | |||
isAgreement: true,//是否同意协议 | |||
siteSelect: false,//是否显示位置选择框 | |||
phoneInputShow: false,//是否显示电话输入框 | |||
provinceArr: [],//省 | |||
provinceValue: 0,//选中的省下标 | |||
storeArr: [],//店铺 | |||
storeValue: 0,//选中的店铺下标 | |||
provinceDataAll:null,//地区所有数据 | |||
provinceDataArr:[[""],[""]],//省市数据 | |||
provinceDataValue:[0,0],//选中的省市下标 | |||
nowProvince:"",//选中的省市文字 | |||
storeArr:[],//专营店数据 | |||
storeValue:0,//选中的专营店下标 | |||
verificationCode: '获取验证码',//验证码文案 | |||
sendCode: true, | |||
appointment: true, | |||
@@ -29,6 +31,7 @@ Component({ | |||
mobile: "",//手机号 | |||
captcha: "",//验证码 | |||
province: "",//省份 | |||
city:"",//市区 | |||
agent_code: "",//经销商编码 | |||
agentDetail: "",//经销商详细信息 | |||
parentOpenid: app.globalData.friendOpenid,//好友openid | |||
@@ -73,17 +76,6 @@ Component({ | |||
} | |||
}, | |||
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) { | |||
this.data.subscribeData.mobile = app.globalData.userMobile; | |||
this.setData({ | |||
@@ -104,20 +96,25 @@ Component({ | |||
getDistributorList: function (longitude, latitude) {//获取经销商列表 | |||
app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude }, res => { | |||
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({ | |||
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 { | |||
wx.showToast({ | |||
title: res.msg, | |||
@@ -126,23 +123,6 @@ Component({ | |||
} | |||
}, 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) {//获取验证码 | |||
if (!app.mobileVerify(this.data.subscribeData.mobile)) { | |||
if (this.data.subscribeData.mobile) { | |||
@@ -214,13 +194,7 @@ Component({ | |||
}, | |||
showSite: function () {//显示地址选择框 | |||
if (!this.data.siteSelect) { | |||
if (!app.globalData.myCenterData) { | |||
this.getUserLocation();//获取用户当前位置 | |||
} else { | |||
this.setData({ | |||
siteSelect: true | |||
}) | |||
} | |||
this.getUserLocation();//获取用户当前位置 | |||
} | |||
}, | |||
agreementState: function () {//协议 | |||
@@ -262,10 +236,15 @@ Component({ | |||
}) | |||
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) { | |||
return; | |||
} | |||
this.data.appointment = false; | |||
app.wxRequest(app.globalData.urlRoot + "wxPay/preBuy", this.data.subscribeData, res => { | |||
if (res.code == 200) { | |||
wx.requestPayment({ | |||
@@ -322,6 +301,31 @@ Component({ | |||
}, | |||
closePage:function(){ | |||
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 | |||
}) | |||
} | |||
} | |||
}) |
@@ -24,9 +24,9 @@ | |||
<view wx:if="{{siteSelect}}" class="pickerGroup"> | |||
<view class="inputGroup"> | |||
<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"> | |||
<text>{{provinceArr[provinceValue].province}}</text> | |||
<text>{{nowProvince}}</text> | |||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||
</view> | |||
</picker> |
@@ -78,6 +78,7 @@ | |||
} | |||
.NoVehicle{ | |||
position: relative; | |||
padding-bottom: 30rpx; | |||
} | |||
.NoVehicle>.getCode{ | |||
position: absolute; |
@@ -124,7 +124,7 @@ Page({ | |||
authenticationShow:false | |||
}) | |||
} | |||
app.globalData.certificationState=2; | |||
// app.globalData.certificationState=2; | |||
this.setData({maskid: app.globalData.certificationState}) | |||
if(app.globalData.certificationState==1){ | |||
this.setData({titleContent:'尊敬的启辰车主您好'}) |
@@ -1,7 +1,7 @@ | |||
<!--pages/scout/scout.wxml--> | |||
<view class="showView"> | |||
<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>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> |
@@ -10,11 +10,14 @@ Page({ | |||
isAgreement: true,//是否同意协议 | |||
jobList:[], | |||
jobValue:0, | |||
provinceArr: [],//省 | |||
provinceValue: 0,//选中的省下标 | |||
storeArr: [],//店铺 | |||
storeValue: 0,//选中的店铺下标 | |||
provinceDataAll: null,//地区所有数据 | |||
provinceDataArr: [[""], [""]],//省市数据 | |||
provinceDataValue: [0, 0],//选中的省市下标 | |||
nowProvince: "",//选中的省市文字 | |||
storeArr: [],//专营店数据 | |||
storeValue: 0,//选中的专营店下标 | |||
realname:"", | |||
jobDetail:"" | |||
}, | |||
/** | |||
@@ -29,10 +32,10 @@ Page({ | |||
} | |||
}, | |||
loadFun:function(){ | |||
this.getJobList(); | |||
// this.getJobList(); | |||
this.getUserLocation(); | |||
var authenticationStatus = app.globalData.authenticationStatus; | |||
if (authenticationStatus.realName){ | |||
if (authenticationStatus && authenticationStatus.realName){ | |||
this.setData({ | |||
realname: authenticationStatus.realName | |||
}) | |||
@@ -103,7 +106,7 @@ Page({ | |||
jobList:res.data | |||
}) | |||
var authenticationStatus = app.globalData.authenticationStatus; | |||
if (authenticationStatus.jobId) { | |||
if (authenticationStatus && authenticationStatus.jobId) { | |||
for(let i=0;i<res.data.length;i++){ | |||
if (res.data[i].jobId == authenticationStatus.jobId){ | |||
this.setData({ | |||
@@ -136,25 +139,25 @@ Page({ | |||
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[0].children.length; j++) { | |||
city.push(res.data.list[0].children[j].city) | |||
} | |||
//将数据赋值给变量 | |||
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 { | |||
wx.showToast({ | |||
title: res.msg, | |||
@@ -163,21 +166,12 @@ Page({ | |||
} | |||
}, 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) {//获取用户输入的姓名 | |||
this.data.realname = e.detail.value; | |||
}, | |||
}, | |||
getJobDetail: function (e) {//获取用户输入的姓名 | |||
this.data.jobDetail = e.detail.value; | |||
}, | |||
submitMsg: function () { | |||
if(!this.data.realname){ | |||
wx.showToast({ | |||
@@ -186,6 +180,13 @@ Page({ | |||
}) | |||
return; | |||
} | |||
if (!this.data.jobDetail) { | |||
wx.showToast({ | |||
title: '请输入职业', | |||
icon: 'none' | |||
}) | |||
return; | |||
} | |||
if (!this.data.isAgreement) { | |||
wx.showToast({ | |||
title: '请同意协议', | |||
@@ -195,20 +196,22 @@ Page({ | |||
} | |||
var data = { | |||
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'], | |||
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=>{ | |||
if (res.code == 200) { | |||
if (!app.globalData.authenticationStatus) { | |||
app.globalData.authenticationStatus = {}; | |||
} | |||
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.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({ | |||
delta: 1, | |||
}) | |||
@@ -219,5 +222,30 @@ Page({ | |||
}) | |||
} | |||
},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, | |||
}) | |||
} | |||
}) |
@@ -9,9 +9,9 @@ | |||
</view> | |||
<view class="inputGroup"> | |||
<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>{{provinceArr[provinceValue]['province']}}</view> | |||
<view>{{nowProvince}}</view> | |||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||
</view> | |||
</picker> | |||
@@ -27,13 +27,17 @@ | |||
</view> | |||
<view class="inputGroup"> | |||
<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}}"> | |||
<view class="inputSty" style="display:flex;align-items: center;justify-content: space-between;"> | |||
<view>职业:{{jobList[jobValue].jobDetail}}</view> | |||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||
</view> | |||
</picker> | |||
</view> | |||
</view> --> | |||
<view class="agreementGroup"> | |||
<image class="agreeIcon" bindtap="agreementState" src="{{imgUrl+(isAgreement?'/images/agreeIcon.png?v=003':'/images/disagreeIcon.png?v=002')}}"></image> | |||
<view class="agreementText"> |
@@ -19,6 +19,8 @@ Component({ | |||
siteSelect: false,//是否显示位置选择框 | |||
provinceArr: [],//省 | |||
provinceValue: 0,//选中的省下标 | |||
cityArr:[],//市 | |||
cityValue:0,//选中的市下标 | |||
storeArr: [],//店铺 | |||
storeValue: 0,//选中的店铺下标 | |||
verificationCode: '获取验证码',//验证码文案 | |||
@@ -29,6 +31,7 @@ Component({ | |||
mobile: "",//手机号 | |||
captcha: "",//验证码 | |||
province: "",//省份 | |||
city:"",//城市 | |||
agent_code: "",//经销商编码 | |||
agentDetail: "",//经销商详细信息 | |||
parentOpenid: app.globalData.friendOpenid,//好友openid | |||
@@ -61,11 +64,14 @@ Component({ | |||
if (app.globalData.myCenterData) { | |||
this.setData({ | |||
provinceArr: app.globalData.myCenterData.provinceArr, | |||
cityArr: app.globalData.myCenterData.cityArr, | |||
storeArr: app.globalData.myCenterData.storeArr, | |||
provinceValue: app.globalData.myCenterData.provinceValue, | |||
cityValue: app.globalData.myCenterData.cityValue, | |||
storeValue: app.globalData.myCenterData.storeValue, | |||
}) | |||
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; | |||
} | |||
@@ -76,6 +82,7 @@ Component({ | |||
subscribeData: this.data.subscribeData | |||
}) | |||
} | |||
this.getUserLocation();//获取用户当前位置 | |||
}, | |||
getDistributorList: function (longitude, latitude) {//获取经销商列表 | |||
app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude }, res => { | |||
@@ -83,17 +90,22 @@ Component({ | |||
app.globalData.myCenterData = {}; | |||
this.setData({ | |||
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, | |||
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.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; | |||
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.storeValue = res.data.nearData.cityIndex; | |||
app.globalData.myCenterData.cityValue = res.data.nearData.cityValue; | |||
app.globalData.myCenterData.storeValue = res.data.nearData.agentIndex; | |||
} else { | |||
wx.showToast({ | |||
title: res.msg, | |||
@@ -105,10 +117,23 @@ Component({ | |||
provinceChane: function (e) {//选中省 | |||
this.setData({ | |||
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 | |||
}) | |||
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.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | |||
}, | |||
@@ -268,7 +293,7 @@ Component({ | |||
showSite: function () {//显示地址选择框 | |||
if (!this.data.siteSelect) { | |||
if (!app.globalData.myCenterData) { | |||
this.getUserLocation();//获取用户当前位置 | |||
} else { | |||
this.setData({ | |||
siteSelect: true |
@@ -15,23 +15,29 @@ | |||
</view> | |||
</view> | |||
<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> | |||
<view wx:if="{{siteSelect}}"> | |||
<!-- <view wx:if="{{siteSelect}}"> --> | |||
<picker mode='selector' range="{{provinceArr}}" range-key="province" value="{{provinceValue}}" bindchange="provinceChane"> | |||
<view class="selectSiteGroup"> | |||
<text class="selectName">{{provinceArr[provinceValue].province}}</text> | |||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||
</view> | |||
</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"> | |||
<view class="selectSiteGroup"> | |||
<text class="selectName">{{storeArr[storeValue].agent_detail}}</text> | |||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||
</view> | |||
</picker> | |||
</view> | |||
<!-- </view> --> | |||
<view class="agreementGroup"> | |||
<image class="agreeIcon" bindtap="agreementState" src="{{imgUrl+(isAgreement?'/images/agreeIcon.png?v=003':'/images/disagreeIcon.png?v=002')}}"></image> | |||
<view class="agreementText"> |
@@ -158,6 +158,12 @@ | |||
"name": "奖品详情", | |||
"pathName": "pages/prizeDetail/prizeDetail", | |||
"query": "" | |||
}, | |||
{ | |||
"id": -1, | |||
"name": "认证", | |||
"pathName": "pages/scout/register/register", | |||
"query": "" | |||
} | |||
] | |||
} |