@@ -8,6 +8,11 @@ App({ | |||
this.wxLogin(); | |||
} else { | |||
this.globalData.openid = openid; | |||
this.getBuyState(); | |||
} | |||
var entered = wx.getStorageSync('entered'); | |||
if (entered) { | |||
this.globalData.entered = entered; | |||
} | |||
var userMobile = wx.getStorageSync('userMobile'); | |||
if (userMobile){ | |||
@@ -66,6 +71,7 @@ App({ | |||
friendOpenid:"",//推荐人的openid | |||
session_key: "",//session_key | |||
openidSuccessFuc: null,//方法回调 | |||
buyStateSuccessFuc:null, | |||
nowPage:'1',//当前tabBar | |||
isRegister:false,//是否已注册 | |||
userMobile:null,//用户手机号 | |||
@@ -78,7 +84,9 @@ App({ | |||
userPhoneType:null, | |||
kvurl:null, | |||
kvurlH:0, | |||
certificationInfo:false | |||
certificationInfo:false, | |||
getBuyState:null, | |||
entered:false | |||
}, | |||
// 获取openId | |||
getOpenid: function (code) { | |||
@@ -103,6 +111,7 @@ App({ | |||
if (!userInfoData) { | |||
this.getUserInfo(); | |||
} | |||
this.getBuyState(); | |||
} else { | |||
wx.showToast({ | |||
title: res.msg, | |||
@@ -265,5 +274,18 @@ App({ | |||
} | |||
} | |||
},this) | |||
}, | |||
getBuyState: function () {//查询是否已下订 | |||
this.wxRequest(this.globalData.urlRoot + "wxPay/getBuyState", {}, res => { | |||
if (res.code == 200) { | |||
if (res.data) { | |||
res.data.cdate = res.data.cdate ? res.data.cdate : ""; | |||
this.globalData.getBuyState = res.data; | |||
if (this.globalData.buyStateSuccessFuc){ | |||
this.globalData.buyStateSuccessFuc(); | |||
} | |||
} | |||
} | |||
}, this); | |||
} | |||
}) |
@@ -15,7 +15,13 @@ | |||
"pages/address/address", | |||
"pages/mobileVerification/mobileVerification", | |||
"pages/agreement/agreement", | |||
"pages/moreType/moreType" | |||
"pages/moreType/moreType", | |||
"pages/yuyue/yuyue", | |||
"pages/userMsg/userMsg", | |||
"pages/placingOrder/placingOrder", | |||
"pages/fragmentRule/fragmentRule", | |||
"pages/supplement/supplement", | |||
"pages/prizeDetail/prizeDetail" | |||
], | |||
"window": { | |||
"backgroundTextStyle": "light", | |||
@@ -30,7 +36,7 @@ | |||
"desc": "你的位置信息将用于小程序位置接口的效果展示" | |||
} | |||
}, | |||
"navigateToMiniProgramAppIdList":[ | |||
"navigateToMiniProgramAppIdList": [ | |||
"wx1d585c8c2fffe589" | |||
] | |||
} |
@@ -8,5 +8,5 @@ | |||
<image class="xieyi" src="{{imgUrl+'/images/xieyi2.png'}}"></image> | |||
</view> | |||
</view> | |||
<tabBar></tabBar> | |||
<!-- <tabBar></tabBar> --> | |||
</view> |
@@ -14,6 +14,7 @@ Component({ | |||
data: { | |||
imgUrl: app.globalData.urlStatic,//图片路径 | |||
maskState:false,//遮罩显示状态 | |||
yuyueShow:false, | |||
}, | |||
/** | |||
@@ -43,6 +44,11 @@ Component({ | |||
console.log(res); | |||
} | |||
}) | |||
}, | |||
openYuyue:function(){//预约 | |||
this.setData({ | |||
yuyueShow: !this.data.yuyueShow | |||
}) | |||
} | |||
} | |||
}) |
@@ -1,4 +1,6 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": {} | |||
"usingComponents": { | |||
"yuyue": "/pages/yuyue/yuyue" | |||
} | |||
} |
@@ -1,21 +1,14 @@ | |||
<!--pages/component/service/index.wxml--> | |||
<view> | |||
<image class="serviceIcon" bindtap="maskShow" src="{{imgUrl+'/images/service.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"> | |||
<view class="tipGroup"> | |||
<image style="width:254rpx;height:45rpx;" src="{{imgUrl+'/images/selectService.png'}}"></image> | |||
</view> | |||
<view class="btnGroup" bindtap="newCarConsultation"> | |||
<image style="width:100%;height:100%;" src="{{imgUrl+'/images/severBtn1.png'}}"></image> | |||
</view> | |||
<view class="btnGroup" style="margin-top:30rpx;"> | |||
<image style="width:100%;height:100%;" src="{{imgUrl+'/images/severBtn2.png'}}"></image> | |||
<button style="width:100%;" class="serviceBtn" open-type="contact"></button> | |||
</view> | |||
<view style="position:relative;"> | |||
<image class="closeService" bindtap="closeService" src="{{imgUrl+'/images/closeService.png'}}"></image> | |||
</view> | |||
<image style="width:100%;height:100%;" src="{{imgUrl+'/images/serviceBg.png'}}"></image> | |||
<image class="closeService" bindtap="closeService" src="{{imgUrl+'/images/closeService.png'}}"></image> | |||
<view class="btnGroup1" bindtap="newCarConsultation"></view> | |||
<button style="min-height: 0;" class="serviceBtn" open-type="contact"></button> | |||
</view> | |||
</view> | |||
</view> | |||
<yuyue bindyuyue="openYuyue" wx:if="{{yuyueShow}}"></yuyue> | |||
</view> |
@@ -4,7 +4,7 @@ | |||
width: 81rpx; | |||
height: 81rpx; | |||
position: fixed; | |||
top: 385rpx; | |||
top: 471rpx; | |||
right: 30rpx; | |||
} | |||
.maskGroup{ | |||
@@ -21,20 +21,18 @@ | |||
.contentGroup{ | |||
position: absolute; | |||
left: 50%; | |||
top: 50%; | |||
top: 40%; | |||
transform: translate(-50%,-50%); | |||
width:596rpx; | |||
height:425rpx; | |||
background-color: white; | |||
border-radius: 10rpx; | |||
width:480rpx; | |||
height:342rpx; | |||
} | |||
.closeService{ | |||
display: block; | |||
position: absolute; | |||
right: -60rpx; | |||
top: -445rpx; | |||
width: 73rpx; | |||
height: 73rpx; | |||
right: -32rpx; | |||
top: -32rpx; | |||
width: 37rpx; | |||
height: 37rpx; | |||
} | |||
.tipGroup{ | |||
margin-top: 54rpx; | |||
@@ -52,12 +50,13 @@ | |||
font-size:38rpx; | |||
margin-left: 13rpx; | |||
} | |||
.btnGroup{ | |||
position: relative; | |||
height: 101rpx; | |||
width: 529rpx; | |||
margin: 0 auto; | |||
margin-top: 40rpx; | |||
.btnGroup1{ | |||
position: absolute; | |||
top: 122rpx; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
height: 68rpx; | |||
width: 428rpx; | |||
} | |||
.serviceText{ | |||
font-size: 40rpx; | |||
@@ -72,10 +71,11 @@ | |||
} | |||
.serviceBtn{ | |||
position: absolute; | |||
left: 0; | |||
top: 0; | |||
height: 100%; | |||
background-color: black; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
top: 210rpx; | |||
height: 68rpx; | |||
width: 428rpx; | |||
margin: 0; | |||
padding: 0; | |||
opacity: 0; |
@@ -1,19 +1,19 @@ | |||
<!--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'}}"></image> | |||
<image class="tabBar1" src="{{imgUrl+'/tabBar/1_'+(nowPage==1?2:1)+'.png?v=002'}}"></image> | |||
<view class="tabBarText {{nowPage==1?'tabBarText2':''}}">启辰星</view> | |||
</view> | |||
<view class="tabBarOption" bindtap="cutPage" data-page="2"> | |||
<image class="tabBar2" src="{{imgUrl+'/tabBar/2_'+(nowPage==2?2:1)+'.png'}}"></image> | |||
<image class="tabBar2" src="{{imgUrl+'/tabBar/2_'+(nowPage==2?2:1)+'.png?v=002'}}"></image> | |||
<view class="tabBarText {{nowPage==2?'tabBarText2':''}}">星探计划</view> | |||
</view> | |||
<view class="tabBarOption" bindtap="cutPage" data-page="3"> | |||
<image class="tabBar3" src="{{imgUrl+'/tabBar/3_'+(nowPage==3?2:1)+'.png'}}"></image> | |||
<image class="tabBar3" src="{{imgUrl+'/tabBar/3_'+(nowPage==3?2:1)+'.png?v=002'}}"></image> | |||
<view class="tabBarText {{nowPage==3?'tabBarText2':''}}">幸运星抓手</view> | |||
</view> | |||
<view class="tabBarOption" bindtap="cutPage" data-page="4" style="border:none;"> | |||
<image class="tabBar4" src="{{imgUrl+'/tabBar/4_'+(nowPage==4?2:1)+'.png'}}"></image> | |||
<image class="tabBar4" src="{{imgUrl+'/tabBar/4_'+(nowPage==4?2:1)+'.png?v=002'}}"></image> | |||
<view class="tabBarText {{nowPage==4?'tabBarText2':''}}">个人中心</view> | |||
</view> | |||
</view> |
@@ -10,38 +10,40 @@ | |||
border-top: 2rpx solid #B8B6B9; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
justify-content: space-between; | |||
padding: 0 70rpx; | |||
z-index: 99; | |||
} | |||
.tabBarOption{ | |||
display: flex; | |||
flex-direction: column; | |||
align-items: center; | |||
justify-content: center; | |||
width: 175rpx; | |||
border-right: 3rpx solid black; | |||
height: 43rpx; | |||
text-align: center; | |||
} | |||
.tabBarText{ | |||
font-size: 20rpx; | |||
margin-left:10rpx; | |||
color: black; | |||
font-family:PingFangSC; | |||
font-weight:400; | |||
margin-top: 7rpx; | |||
} | |||
.tabBarText2{ | |||
color: #345486; | |||
color:rgba(51,84,128,1); | |||
} | |||
.tabBar1{ | |||
width: 46rpx; | |||
height: 19rpx; | |||
width: 58rpx; | |||
height: 40rpx; | |||
} | |||
.tabBar2{ | |||
width: 32rpx; | |||
height: 25rpx; | |||
width: 46rpx; | |||
height: 40rpx; | |||
} | |||
.tabBar3{ | |||
width: 25rpx; | |||
height: 28rpx; | |||
width: 39rpx; | |||
height: 40rpx; | |||
} | |||
.tabBar4{ | |||
width: 24rpx; | |||
height: 27rpx; | |||
width: 39rpx; | |||
height: 39rpx; | |||
} |
@@ -28,7 +28,8 @@ Page({ | |||
agent_code: "",//经销商编码 | |||
agentDetail: "",//经销商详细信息 | |||
parentOpenid: app.globalData.friendOpenid,//好友openid | |||
} | |||
}, | |||
submitSuccess:false | |||
}, | |||
/** | |||
@@ -298,8 +299,8 @@ Page({ | |||
this.data.appointment = true; | |||
if (res.code == 200) { | |||
app.globalData.userMobile = this.data.subscribeData.mobile; | |||
wx.reLaunch({ | |||
url: '/pages/index/index', | |||
this.setData({ | |||
submitSuccess:true | |||
}) | |||
} else { | |||
wx.showToast({ | |||
@@ -321,5 +322,10 @@ Page({ | |||
if (!this.data.siteSelect) { | |||
this.getUserLocation();//获取用户当前位置 | |||
} | |||
}, | |||
enterMyCenter: function () { | |||
wx.reLaunch({ | |||
url: '/pages/myCenter/myCenter', | |||
}) | |||
} | |||
}) |
@@ -4,7 +4,7 @@ | |||
<image class="couponBg" src="{{imgUrl+'/images/couponBg.png?v=002'}}"></image> | |||
<view class="btnGroup"> | |||
<image wx:if="{{!isAppointmentShow}}" class="couponBtn" bindtap="showAppointment" src="{{imgUrl+'/btns/couponBtn1.png'}}"></image> | |||
<image wx:if="{{!isAppointmentShow}}" class="couponBtn" bindtap="cutPage" src="{{imgUrl+'/btns/couponBtn2.png'}}"></image> | |||
<image wx:if="{{!isAppointmentShow}}" class="couponBtn" bindtap="cutPage" src="{{imgUrl+'/newImages/13.png'}}"></image> | |||
</view> | |||
<view class="msgFrame" wx:if="{{isAppointmentShow}}"> | |||
<view class="inputGroup"> | |||
@@ -38,6 +38,13 @@ | |||
</view> | |||
</view> | |||
</view> | |||
<view class="maskWindow" wx:if="{{submitSuccess}}"> | |||
<view class="newImagesGroup"> | |||
<image class="newImages16" bindtap="enterMyCenter" src="{{imgUrl+'/newImages/16.png'}}"></image> | |||
<image class="newImages14" src="{{imgUrl+'/newImages/14.png'}}"></image> | |||
<image class="newImages15" bindtap="enterMyCenter" src="{{imgUrl+'/newImages/15.png'}}"></image> | |||
</view> | |||
</view> | |||
<tabBar></tabBar> | |||
</view> | |||
@@ -10,7 +10,18 @@ view{ | |||
overflow: auto; | |||
position: relative; | |||
} | |||
.maskWindow{ | |||
width: 750rpx; | |||
height: calc(100vh - 150rpx); | |||
position: fixed; | |||
top: 0; | |||
left: 0; | |||
background-color: rgba(000, 000, 000, 0.5); | |||
z-index: 9; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
} | |||
.couponBg{ | |||
width: 750rpx; | |||
height: 1172rpx; | |||
@@ -172,4 +183,28 @@ view{ | |||
padding: 0; | |||
margin: 0; | |||
opacity: 0; | |||
} | |||
.newImagesGroup{ | |||
width: 627rpx; | |||
height: 511rpx; | |||
position: relative; | |||
} | |||
.newImages14{ | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.newImages15{ | |||
position: absolute; | |||
bottom:62rpx; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
width: 348rpx; | |||
height: 65rpx; | |||
} | |||
.newImages16{ | |||
position: absolute; | |||
top: -20rpx; | |||
right: -30rpx; | |||
width: 38rpx; | |||
height: 37rpx; | |||
} |
@@ -24,6 +24,9 @@ Page({ | |||
tipWindow:0, | |||
hiddenFriendFrame: false, | |||
userData: null, | |||
signState:true, | |||
signData:null, | |||
totalSignDay:0, | |||
}, | |||
/** | |||
* 关闭任务窗 | |||
@@ -41,12 +44,8 @@ Page({ | |||
app.wxRequest(app.globalData.urlRoot +"task/signToday",{},res=>{ | |||
if (res.code == 200) { | |||
this.getTaskProgress(); | |||
this.getShareId(); | |||
this.setData({ | |||
maskShow: false, | |||
isSign: false, | |||
isShare: false, | |||
showClose: true | |||
signState: true | |||
}) | |||
}else{ | |||
wx.showToast({ | |||
@@ -82,6 +81,7 @@ Page({ | |||
*/ | |||
goScout() { | |||
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => { | |||
console.log(res); | |||
if (res.code == 200) { | |||
if (!app.globalData.certificationInfo) { | |||
app.globalData.certificationInfo = true; | |||
@@ -180,7 +180,8 @@ Page({ | |||
if (e.from == "button") { | |||
return { | |||
title: '我正在参与“星探计划”,快来帮我解锁拼图吧,共享大奖!', | |||
imageUrl: this.data.imgUrl + "/shareImgs/" + Math.floor(Math.random() * 8 + 1) + ".jpg", | |||
imageUrl: this.data.taskImgUrl, | |||
// imageUrl: this.data.imgUrl + "/shareImgs/" + Math.floor(Math.random() * 8 + 1) + ".jpg", | |||
path: this.data.shareId ? "/pages/everyday/everyday?shareId=" + this.data.shareId : "/pages/everyday/everyday" | |||
} | |||
}else{ | |||
@@ -191,7 +192,9 @@ Page({ | |||
app.wxRequest(app.globalData.urlRoot + "task/getTaskProgress", { taskType: 1 }, res => { | |||
if (res.code == 200) { | |||
this.setData({ | |||
picturlList: res.data | |||
picturlList: res.data.taskData, | |||
totalSignDay: res.data.totalSignDay, | |||
picturlCurrent: res.data.taskData.length-1 | |||
}) | |||
} else { | |||
wx.showToast({ | |||
@@ -251,16 +254,21 @@ Page({ | |||
getSignInfo: function () {//查看当日是否签到 | |||
app.wxRequest(app.globalData.urlRoot + "task/getSignInfo", {}, res => { | |||
if(res.code==200){ | |||
if (res.data.state==0) {//未签到 | |||
if (res.data.state==0) {//已签到 | |||
this.setData({ | |||
showClose: false, | |||
maskShow: true, | |||
taskShow: true, | |||
isSign: true | |||
signState: false, | |||
signData: res.data.popData | |||
}) | |||
}else{ | |||
this.getShareId(); | |||
// this.setData({ | |||
// showClose: false, | |||
// maskShow: true, | |||
// taskShow: true, | |||
// isSign: true | |||
// }) | |||
} | |||
// else{ | |||
// this.getShareId(); | |||
// } | |||
} | |||
},this) | |||
}, | |||
@@ -309,9 +317,12 @@ Page({ | |||
} | |||
}, | |||
ruleControl:function(e){ | |||
this.setData({ | |||
showRule: e.currentTarget.dataset.state | |||
wx.navigateTo({ | |||
url: '/pages/fragmentRule/fragmentRule' | |||
}) | |||
// this.setData({ | |||
// showRule: e.currentTarget.dataset.state | |||
// }) | |||
}, | |||
hiddenFriendTip: function () { | |||
this.getSignInfo(); |
@@ -1,6 +1,6 @@ | |||
<!--pages/everyday/everyday.wxml--> | |||
<view id="everyday" class="showView"> | |||
<image class="showImg" src="{{imgUrl+'/star/everyday/show.jpg'}}"></image> | |||
<image class="showImg" src="{{imgUrl+'/newImages/30.png'}}"></image> | |||
<image class="ruleBtn" bindtap="ruleControl" data-state="{{true}}" src="{{imgUrl+'/images/everyDayRuleIcon.png'}}"></image> | |||
<view class="title">集碎片,攒红包</view> | |||
<view class="menuBox"> | |||
@@ -13,58 +13,63 @@ | |||
<swiper current="{{picturlCurrent}}" bindchange="swiperChange"> | |||
<block wx:for="{{picturlList}}" wx:key="index"> | |||
<swiper-item> | |||
<view class="fragmentBox" wx:if="{{!item.fullPicUrl}}"> | |||
<image class="fragmentComplete1" src="{{item.childIdArr['picArr'][0]}}"></image> | |||
<image class="fragmentComplete2" src="{{item.childIdArr['picArr'][1]}}"></image> | |||
<image class="fragmentComplete3" src="{{item.childIdArr['picArr'][2]}}"></image> | |||
<image class="fragmentComplete4" src="{{item.childIdArr['picArr'][3]}}"></image> | |||
<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/maskIcon1.png'}}"></image> | |||
<image class="fragmentComplete3" wx:if="{{item.childIdArr[2]}}" src="{{imgUrl+'/newImages/maskIcon1.png'}}"></image> | |||
<image class="fragmentComplete4" wx:if="{{item.childIdArr[3]}}" src="{{imgUrl+'/newImages/maskIcon1.png'}}"></image> | |||
<view class="lockSty lock1"> | |||
<image wx:if="{{item.childIdArr['lockArr'][0]}}" class="lockIcon" src="{{imgUrl+'/images/lockIcon.png'}}"></image> | |||
<image wx:if="{{!item.childIdArr['lockArr'][0]}}" class="nolockIcon" src="{{imgUrl+'/images/nolockIcon.png'}}"></image> | |||
<view class="lockText">{{item.childIdArr['lockArr'][0]?"已解锁":"待解锁"}}</view> | |||
<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/lockIcon2.png'}}"></image> | |||
</view> | |||
<view class="lockSty lock2"> | |||
<image wx:if="{{item.childIdArr['lockArr'][1]}}" class="lockIcon" src="{{imgUrl+'/images/lockIcon.png'}}"></image> | |||
<image wx:if="{{!item.childIdArr['lockArr'][1]}}" class="nolockIcon" src="{{imgUrl+'/images/nolockIcon.png'}}"></image> | |||
<view class="lockText">{{item.childIdArr['lockArr'][1]?"已解锁":"待解锁"}}</view> | |||
<image wx:if="{{item.childIdArr[1]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon1.png'}}"></image> | |||
<image wx:if="{{!item.childIdArr[1]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon2.png'}}"></image> | |||
</view> | |||
<view class="lockSty lock3"> | |||
<image wx:if="{{item.childIdArr['lockArr'][2]}}" class="lockIcon" src="{{imgUrl+'/images/lockIcon.png'}}"></image> | |||
<image wx:if="{{!item.childIdArr['lockArr'][2]}}" class="nolockIcon" src="{{imgUrl+'/images/nolockIcon.png'}}"></image> | |||
<view class="lockText">{{item.childIdArr['lockArr'][2]?"已解锁":"待解锁"}}</view> | |||
<image wx:if="{{item.childIdArr[2]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon3.png'}}"></image> | |||
<image wx:if="{{!item.childIdArr[2]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon4.png'}}"></image> | |||
</view> | |||
<view class="lockSty lock4"> | |||
<image wx:if="{{item.childIdArr['lockArr'][3]}}" class="lockIcon" src="{{imgUrl+'/images/lockIcon.png'}}"></image> | |||
<image wx:if="{{!item.childIdArr['lockArr'][3]}}" class="nolockIcon" src="{{imgUrl+'/images/nolockIcon.png'}}"></image> | |||
<view class="lockText">{{item.childIdArr['lockArr'][3]?"已解锁":"待解锁"}}</view> | |||
<image wx:if="{{item.childIdArr[3]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon3.png'}}"></image> | |||
<image wx:if="{{!item.childIdArr[3]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon4.png'}}"></image> | |||
</view> | |||
</view> | |||
<view class="fragmentBox" wx:if="{{item.fullPicUrl}}"> | |||
<image class="fragmentComplete" src="{{item.fullPicUrl}}"></image> | |||
</view> | |||
</swiper-item> | |||
</block> | |||
</swiper> | |||
<image class="arrowBtn" wx:if="{{picturlCurrent!=0}}" style="left:-30rpx;" src="{{imgUrl+'/star/everyday/arrowLeftBtn.png'}}" bindtap="prevPicturl"></image> | |||
<image class="arrowBtn" wx:if="{{picturlCurrent!=picturlList.length-1}}" style="right:-30rpx;" src="{{imgUrl+'/star/everyday/arrowRightBtn.png'}}" bindtap="nextPicturl"></image> | |||
</view> | |||
<!-- <view class="btnBox" wx:if="{{picturlList[picturlCurrent]['awardState']==0}}"> --> | |||
<view class="btnBox"> | |||
<view class="cumulativeGroup" wx:if="{{picturlList[picturlCurrent]['awardState']==0}}">您已累计登陆 {{totalSignDay}} 天</view> | |||
<view class="btnBox" style="width:483rpx;" wx:if="{{picturlList[picturlCurrent]['awardState']==1}}"> | |||
<view class="receive" bindtap="receive">领取购车红包</view> | |||
</view> | |||
<view class="btnBox" style="width:483rpx;" wx:if="{{picturlList[picturlCurrent]['awardState']==-1}}"> | |||
<view class="receive" style="background-color:gray;">已领取</view> | |||
</view> | |||
<!-- <view class="btnBox"> | |||
<image class="starBtn" bindtap="goScout" src="{{imgUrl+'/btns/starBtn1_2.png'}}"></image> | |||
<image class="starBtn" src="{{imgUrl+'/btns/starBtn2.png'}}"></image> | |||
<!-- <view class="btn" style="margin-right:20rpx;" bindtap="goScout">星探任务</view> | |||
<view class="btn select" style="margin-left:20rpx;">每日任务</view> --> | |||
</view> | |||
<view class="btnBox" style="width:677rpx;" wx:if="{{picturlList[picturlCurrent]['awardState']==1}}"> | |||
<view class="receive" bindtap="receive">领取购车红包</view> | |||
</view> | |||
<view class="btnBox" style="width:677rpx;" wx:if="{{picturlList[picturlCurrent]['awardState']==-1}}"> | |||
<view class="receive" style="background-color:gray;">已领取</view> | |||
</view> --> | |||
<view class="mask" wx:if="{{!signState}}"> | |||
<view class="newImagesGroup"> | |||
<image class="newImages28" src="{{imgUrl+'/newImages/28.png'}}"></image> | |||
<view class="signText">{{signData.shortName}}</view> | |||
<image class="signPic" src="{{signData.popPicUrl}}"></image> | |||
<image class="newImages29" bindtap="signIn" src="{{imgUrl+'/newImages/29.png'}}"></image> | |||
</view> | |||
</view> | |||
<view class="mask" wx:if="{{maskShow}}"> | |||
<!-- <view class="mask" wx:if="{{maskShow}}"> | |||
<view class="taskBox" wx:if="{{taskShow}}"> | |||
<image wx:if="{{!isSign}}" class="gameRuleClose" bindtap="hiddenTask" style="top:-40rpx;right:-40rpx;" src="{{imgUrl+'/star/closebtn.png'}}"></image> | |||
<!-- <view class="title">今日任务</view> --> | |||
<image class="everyDayTitle" src="{{imgUrl+'/images/everyDayTitle.png'}}"></image> | |||
<view class="contentBox"> | |||
<view class="name" wx:if="{{!isSign}}">{{taskName}}</view> | |||
@@ -81,7 +86,7 @@ | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> --> | |||
</view> | |||
<view class="gamaRuleFrame" wx:if="{{showRule}}"> | |||
<view class="gameRuleGroup"> |
@@ -1,5 +1,4 @@ | |||
/* pages/everyday/everyday.wxss */ | |||
.showImg { | |||
position: relative; | |||
width: 750rpx; | |||
@@ -121,14 +120,9 @@ | |||
} | |||
.btnBox{ | |||
position: relative; | |||
width: 710rpx; | |||
height: 65rpx; | |||
padding: 0 20rpx; | |||
padding-top: 22rpx; | |||
padding-bottom: 38rpx; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
margin: 0 auto; | |||
} | |||
.btnBox>.btn{ | |||
display: inline-block; | |||
@@ -226,7 +220,7 @@ | |||
content: "\2716"; | |||
} | |||
.receive{ | |||
width:677rpx; | |||
width:100%; | |||
height:61rpx; | |||
background-color: #28558D; | |||
line-height: 61rpx; | |||
@@ -246,51 +240,28 @@ | |||
} | |||
.lockSty{ | |||
position: absolute; | |||
width:114rpx; | |||
height:31rpx; | |||
background-color: #E8A400; | |||
line-height: 31rpx; | |||
font-size:16rpx; | |||
font-family:PingFang; | |||
font-weight:300; | |||
color:rgba(0,0,0,1); | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
width:64rpx; | |||
height:34rpx; | |||
} | |||
.lockIcon{ | |||
width: 15rpx; | |||
height: 21rpx; | |||
margin-right: 10rpx; | |||
} | |||
.nolockIcon{ | |||
width: 16rpx; | |||
height: 21rpx; | |||
margin-right: 10rpx; | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.lock1{ | |||
top: 3rpx; | |||
left: 110rpx; | |||
border-bottom-left-radius: 10rpx; | |||
border-bottom-right-radius: 10rpx; | |||
} | |||
.lock2{ | |||
top: 3rpx; | |||
right: 90rpx; | |||
border-bottom-left-radius: 10rpx; | |||
border-bottom-right-radius: 10rpx; | |||
} | |||
.lock3{ | |||
bottom: 3rpx; | |||
bottom: 0rpx; | |||
left: 110rpx; | |||
border-top-left-radius: 10rpx; | |||
border-top-right-radius: 10rpx; | |||
} | |||
.lock4{ | |||
bottom: 3rpx; | |||
bottom: 0rpx; | |||
right: 90rpx; | |||
border-top-left-radius: 10rpx; | |||
border-top-right-radius: 10rpx; | |||
} | |||
.signBtnGroup{ | |||
position: absolute; | |||
@@ -488,4 +459,56 @@ | |||
.everyDayTitle{ | |||
width: 567rpx; | |||
height: 79rpx; | |||
} | |||
.newImagesGroup{ | |||
position: relative; | |||
width: 608rpx; | |||
height: 691rpx; | |||
} | |||
.newImages28{ | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.newImages29{ | |||
position: absolute; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
bottom: 67rpx; | |||
width: 347rpx; | |||
height: 62rpx; | |||
} | |||
.signText{ | |||
position: absolute; | |||
left: 0; | |||
top: 128rpx; | |||
line-height: 34rpx; | |||
font-size:34rpx; | |||
font-family:PingFangSC; | |||
font-weight:600; | |||
color:rgba(0,0,0,1); | |||
text-align: center; | |||
width: 100%; | |||
} | |||
.signPic{ | |||
position: absolute; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
top: 190rpx; | |||
width: 491rpx; | |||
height: 337rpx; | |||
} | |||
.cumulativeGroup{ | |||
width:483rpx; | |||
height:86rpx; | |||
line-height:104rpx; | |||
font-size:28rpx; | |||
font-family:PingFangSC; | |||
font-weight:400; | |||
color:rgba(255,255,255,1); | |||
background-color: #375387; | |||
margin: 0 auto; | |||
text-align: center; | |||
border-radius: 20rpx; | |||
margin-top: -20rpx; | |||
margin-bottom: 30rpx; | |||
} |
@@ -0,0 +1,80 @@ | |||
// pages/fragmentRule/fragmentRule.js | |||
const app = getApp() | |||
Page({ | |||
/** | |||
* 页面的初始数据 | |||
*/ | |||
data: { | |||
imgUrl: app.globalData.urlStatic,//图片路径 | |||
}, | |||
/** | |||
* 生命周期函数--监听页面加载 | |||
*/ | |||
onLoad: function (options) { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面初次渲染完成 | |||
*/ | |||
onReady: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面显示 | |||
*/ | |||
onShow: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面隐藏 | |||
*/ | |||
onHide: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面卸载 | |||
*/ | |||
onUnload: function () { | |||
}, | |||
/** | |||
* 页面相关事件处理函数--监听用户下拉动作 | |||
*/ | |||
onPullDownRefresh: function () { | |||
}, | |||
/** | |||
* 页面上拉触底事件的处理函数 | |||
*/ | |||
onReachBottom: function () { | |||
}, | |||
/** | |||
* 用户点击右上角分享 | |||
*/ | |||
onShareAppMessage: function () { | |||
}, | |||
cutPage:function(){ | |||
if (app.globalData.entered){ | |||
wx.navigateBack({ | |||
delta:1 | |||
}) | |||
}else{ | |||
wx.setStorageSync("entered", true); | |||
app.globalData.entered = true; | |||
wx.redirectTo({ | |||
url: '/pages/everyday/everyday', | |||
}) | |||
} | |||
} | |||
}) |
@@ -0,0 +1,6 @@ | |||
{ | |||
"navigationBarTitleText": "东风启辰“星探计划”", | |||
"usingComponents": { | |||
"tabBar": "../component/tabBar/index" | |||
} | |||
} |
@@ -0,0 +1,10 @@ | |||
<!--pages/fragmentRule/fragmentRule.wxml--> | |||
<view class="all"> | |||
<view class="main"> | |||
<view class="contentGroup"> | |||
<image class="newImages26" src="{{imgUrl+'/newImages/26.png'}}"></image> | |||
<image class="newImages27" bindtap="cutPage" src="{{imgUrl+'/newImages/27.png'}}"></image> | |||
</view> | |||
</view> | |||
<tabBar></tabBar> | |||
</view> |
@@ -0,0 +1,28 @@ | |||
/* pages/fragmentRule/fragmentRule.wxss */ | |||
image{ | |||
display: block; | |||
} | |||
view{ | |||
-webkit-overflow-scrolling: touch; | |||
} | |||
.main{ | |||
height: calc(100vh - 150rpx); | |||
overflow: auto; | |||
} | |||
.contentGroup{ | |||
position: relative; | |||
width: 750rpx; | |||
height: 1506rpx; | |||
} | |||
.newImages26{ | |||
width: 750rpx; | |||
height: 1506rpx; | |||
} | |||
.newImages27{ | |||
position: absolute; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
bottom:203rpx; | |||
width: 347rpx; | |||
height: 62rpx; | |||
} |
@@ -35,6 +35,9 @@ Page({ | |||
userData:null, | |||
kvurl: null,//顶部大图 | |||
kvurlH:0, | |||
showAppointment:false, | |||
placing:false, | |||
buyState:false | |||
}, | |||
onLoad: function () { | |||
app.globalData.nowPage = 1; | |||
@@ -104,12 +107,22 @@ Page({ | |||
// isRegister: app.globalData.isRegister | |||
}) | |||
}, | |||
onShow:function(){ | |||
onShow: function () { | |||
if (app.globalData.getBuyState) { | |||
this.getBuyStates(); | |||
} else { | |||
app.globalData.buyStateSuccessFuc = this.getBuyStates; | |||
} | |||
this.setData({ | |||
siteSelect: false | |||
}) | |||
this.data.subscribeData.parentOpenid = app.globalData.friendOpenid; | |||
}, | |||
getBuyStates:function(){ | |||
this.setData({ | |||
buyState: app.globalData.getBuyState.success | |||
}) | |||
}, | |||
provinceChane: function (e) {//选中省 | |||
this.setData({ | |||
provinceValue: e.detail.value, | |||
@@ -452,5 +465,20 @@ Page({ | |||
wx.navigateTo({ | |||
url: '/pages/moreType/moreType', | |||
}) | |||
}, | |||
openAppointment:function(){//预约 | |||
this.setData({ | |||
showAppointment: !this.data.showAppointment | |||
}) | |||
}, | |||
placingControl:function(){ | |||
if (app.globalData.getBuyState.success != this.data.buyState){ | |||
this.setData({ | |||
buyState: app.globalData.getBuyState.success | |||
}) | |||
} | |||
this.setData({ | |||
placing: !this.data.placing | |||
}) | |||
} | |||
}) |
@@ -2,6 +2,7 @@ | |||
"navigationBarTitleText": "启辰星", | |||
"usingComponents": { | |||
"service": "../component/service/index", | |||
"tabBar": "../component/tabBar/index" | |||
"tabBar": "../component/tabBar/index", | |||
"placingOrder": "/pages/placingOrder/placingOrder" | |||
} | |||
} |
@@ -1,6 +1,7 @@ | |||
<!--index.wxml--> | |||
<view class="all" wx:if="{{mainShow}}"> | |||
<view class="main" wx:if="{{isStartAdvertising==0 || !isStartAdvertisingShow}}"> | |||
<image class="indexOrderIcon" wx:if="{{!buyState}}" bindtap="placingControl" src="{{imgUrl+'/images/indexOrderIcon.png'}}"></image> | |||
<view class="contentFrame"> | |||
<image class="kvurlImg" style="width:100%;height:{{kvurlH}}px;" mode="widthFix" src="{{kvurl}}"></image> | |||
<image style="width:750rpx;height:331rpx;" src="{{imgUrl+'/images/indexText.png'}}"></image> | |||
@@ -30,7 +31,7 @@ | |||
<view class="indexBottom2"></view> | |||
</view> | |||
<!-- <view class="msgFrame" wx:if="{{!isRegister}}"> --> | |||
<view class="msgFrame"> | |||
<view class="msgFrame" wx:if="{{false}}"> | |||
<view class="inputGroup"> | |||
<input class="inputSty" placeholder="姓名" value="{{subscribeData.realname}}" bindinput="getRealname"></input> | |||
<input class="inputSty" bindinput="getMobile" type="number" value="{{subscribeData.mobile}}" maxlength='11' placeholder="电话"></input> | |||
@@ -62,6 +63,7 @@ | |||
</view> | |||
</view> | |||
<service></service> | |||
<placingOrder bindplacing="placingControl" wx:if="{{placing}}"></placingOrder> | |||
</view> | |||
<tabBar wx:if="{{isStartAdvertising==0 || !isStartAdvertisingShow}}"></tabBar> | |||
<!-- <view wx:if="{{isStartAdvertisingShow}}" class='imgBg' catchtouchmove="ture"></view> --> |
@@ -8,6 +8,7 @@ view{ | |||
.main{ | |||
height: calc(100vh - 150rpx); | |||
overflow: auto; | |||
position: relative; | |||
} | |||
.imgBg{ | |||
position: fixed; | |||
@@ -225,4 +226,12 @@ view{ | |||
width:750rpx; | |||
height:502rpx; | |||
background-color: #ececec; | |||
} | |||
.indexOrderIcon{ | |||
position: absolute; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
bottom: 38rpx; | |||
width: 710rpx; | |||
height: 71rpx; | |||
} |
@@ -9,6 +9,7 @@ Page({ | |||
*/ | |||
data: { | |||
imgUrl: app.globalData.urlStatic,//图片路径 | |||
buyState:false, | |||
ruleShow: true,//是否显示游戏玩法 | |||
ruleCloseShow: true,//是否显示游戏玩法关闭按钮 | |||
clawTop:-440,//爪子的top值 | |||
@@ -48,6 +49,7 @@ Page({ | |||
gameEnd:true, | |||
ani:null, | |||
certificationInfo:false,//是否车主认证了 | |||
addressShow:false | |||
}, | |||
/** | |||
@@ -77,6 +79,7 @@ Page({ | |||
} | |||
this.getAddress(); | |||
this.getGameAwardList(); | |||
this.getBuyState(); | |||
}, | |||
/** | |||
* 生命周期函数--监听页面初次渲染完成 | |||
@@ -139,10 +142,10 @@ Page({ | |||
} | |||
}, | |||
gameStart: function () {//开始游戏按钮 | |||
this.setData({ | |||
ruleShow: false, | |||
ruleCloseShow: true | |||
}) | |||
// this.setData({ | |||
// ruleShow: false, | |||
// ruleCloseShow: true | |||
// }) | |||
this.beginGame(); | |||
}, | |||
beginGame: function () {//开始游戏 | |||
@@ -298,9 +301,9 @@ Page({ | |||
this.closeSetInt(); | |||
setTimeout(() => { | |||
this.setData({ | |||
clawType: false | |||
clawType: false, | |||
gameState: false | |||
}) | |||
this.data.gameState = false; | |||
if (this.data.endGameData) { | |||
this.setData({ | |||
pizeTip: 1 | |||
@@ -313,7 +316,9 @@ Page({ | |||
},800) | |||
}, | |||
downTimeFun: function () {//游戏倒计时 | |||
this.data.gameState = true; | |||
this.setData({ | |||
gameState:true | |||
}) | |||
this.data.setInt = setInterval(()=>{ | |||
this.data.downNum -= 1; | |||
if (this.data.downNum<10){ | |||
@@ -389,7 +394,7 @@ Page({ | |||
closeWindow:function(){//关闭中奖 | |||
this.setData({ | |||
pizeTip:0, | |||
ruleShow:true | |||
// ruleShow:true | |||
}) | |||
}, | |||
getGameAwardList: function () {//获取游戏中奖数据 | |||
@@ -471,9 +476,11 @@ Page({ | |||
} | |||
}, | |||
cutPage:function(){//500元待领取 | |||
wx.redirectTo({ | |||
url: '/pages/star/star', | |||
}) | |||
if (!this.data.gameState) { | |||
wx.redirectTo({ | |||
url: '/pages/star/star', | |||
}) | |||
} | |||
}, | |||
openClaw:function(){ | |||
if (!this.data.gameState) { | |||
@@ -514,5 +521,21 @@ Page({ | |||
url: '/pages/scout/register/register' | |||
}) | |||
} | |||
}, | |||
getBuyState: function () {//查询是否已下订 | |||
app.wxRequest(app.globalData.urlRoot + "wxPay/getBuyState", {}, res => { | |||
if (res.code == 200) { | |||
if (res.data) { | |||
this.setData({ | |||
buyState: res.data.success | |||
}) | |||
} | |||
} | |||
}, this); | |||
}, | |||
addressControl: function () {//跳转到地址管理 | |||
this.setData({ | |||
addressShow: !this.data.addressShow | |||
}) | |||
} | |||
}) |
@@ -1,6 +1,7 @@ | |||
{ | |||
"navigationBarTitleText": "幸运星抓手", | |||
"usingComponents": { | |||
"tabBar": "../component/tabBar/index" | |||
"tabBar": "../component/tabBar/index", | |||
"userMsg": "/pages/userMsg/userMsg" | |||
} | |||
} |
@@ -2,7 +2,7 @@ | |||
<view class="all"> | |||
<view class="main"> | |||
<view class="gameMain"> | |||
<image class="gameStarBg" src="{{imgUrl+'/images/gameStarBg.png?v=004'}}"></image> | |||
<image class="gameStarBg" src="{{imgUrl+'/newImages/22.png?v=004'}}"></image> | |||
<!-- <view class="gameTitle">幸运星抓手</view> --> | |||
<image class="gameTitle" src="{{imgUrl+'/images/luckyTitle.png'}}"></image> | |||
<view class="downTime">{{'00:'+downNum}}</view> | |||
@@ -39,9 +39,13 @@ | |||
</view> | |||
</view> | |||
</view> | |||
<view class="gameGetBtn" bindtouchstart="openClaw"> | |||
<image class="gameOpen" bindtap="gameStart" wx:if="{{!gameState}}" src="{{imgUrl+'/newImages/23_1.png'}}"></image> | |||
<image class="gameOpen" wx:if="{{gameState}}" src="{{imgUrl+'/newImages/23_2.png'}}"></image> | |||
<image class="newImages24" bindtap="openClaw" wx:if="{{!btnGroup.claw}}" src="{{imgUrl+'/newImages/24_1.png'}}"></image> | |||
<image class="newImages24" wx:if="{{btnGroup.claw}}" src="{{imgUrl+'/newImages/24_2.png'}}"></image> | |||
<!-- <view class="gameGetBtn" bindtouchstart="openClaw"> | |||
<image class="luckyClaw" wx:if="{{btnGroup.claw}}" src="{{imgUrl+'/btns/luckyClaw.png'}}"></image> | |||
</view> | |||
</view> --> | |||
</view> | |||
<image bindtap="openGameRule" wx:if="{{!ruleShow}}" class="gameRuleBtn" src="{{imgUrl+'/images/luckyGameRule.png'}}"></image> | |||
<image bindtap="openGameRule" wx:if="{{ruleShow}}" class="gameRuleBtn" src="{{imgUrl+'/images/luckyGameRule2.png'}}"></image> | |||
@@ -50,7 +54,7 @@ | |||
<view class="ruleGroup"> | |||
<image class="gameRuleIcon" src="{{imgUrl+'/images/gameRuleDesc.png'}}"></image> | |||
<image class="gameRuleClose" wx:if="{{ruleCloseShow}}" bindtap="closeRule" src="{{imgUrl+'/star/closebtn.png'}}"></image> | |||
<view class="gameStrat" bindtap="gameStart"><image style="width:100%;height:100%;" src="{{imgUrl+'/btns/gameStart.png'}}"></image><button wx:if="{{!userData}}" style="min-height:0;width: 277rpx;height: 50rpx;" bindgetuserinfo="getUserWxMsg" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN"></button></view> | |||
<view class="gameStrat" bindtap="closeRule"><image style="width:100%;height:100%;" src="{{imgUrl+'/btns/gameStart.png'}}"></image><button wx:if="{{!userData}}" style="min-height:0;width: 277rpx;height: 50rpx;" bindgetuserinfo="getUserWxMsg" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN"></button></view> | |||
</view> | |||
</view> | |||
<view class="gameRuleDesc" style="background-color:rgba(000,000,000,0)" wx:if="{{false}}"> | |||
@@ -62,22 +66,26 @@ | |||
<view class="prizeContent"> | |||
<image class="prizePic" src="{{endGameData.awardPicUrl}}" mode="aspectFit"></image> | |||
<view class="prizeName">{{endGameData.awardName}}</view> | |||
<image class="startRegister" style="margin:0;" wx:if="{{(!isAddress && endGameData.needAddress!=0)}}" bindtap="userRegister" src="{{imgUrl+'/images/luckyPizeTip1.png'}}"></image> | |||
<image class="startRegister" style="margin:0;" wx:if="{{(!isAddress && endGameData.needAddress!=0)}}" bindtap="addressControl" src="{{imgUrl+'/images/luckyPizeTip1.png'}}"></image> | |||
</view> | |||
</view> | |||
<view class="successGroup" wx:if="{{pizeTip==2}}"> | |||
<image class="luckyPizeType" src="{{imgUrl+'/images/luckyPizeType2.png?v=002'}}"></image> | |||
<image class="gameRuleClose" bindtap="closeWindow" style="top:-5rpx;right:-5rpx;" src="{{imgUrl+'/star/closebtn.png'}}"></image> | |||
<view class="btnsGroup"> | |||
<!-- <image class="luckyBtns" src="{{imgUrl+'/btns/luckyBtns1.png'}}"></image> | |||
<view class="luckyBtnsGap"></view> | |||
<image class="luckyBtns" bindtap="enterStar" wx:if="{{!certificationInfo}}" src="{{imgUrl+'/btns/luckyBtns2.png'}}"></image> --> | |||
<view class="btnsGroup" style="justify-content:{{buyState && certificationInfo?'center':'space-between'}}"> | |||
<image class="luckyBtns" wx:if="{{!buyState}}" src="{{imgUrl+'/btns/luckyBtns1.png'}}"></image> | |||
<view class="startRegister" wx:if="{{buyState || certificationInfo}}"> | |||
<image style="width:100%;height:100%;" src="{{imgUrl+'/images/luckyPizeTip2.png'}}"></image> | |||
<button open-type="share" class="shareBtn" style="width:100%;height:100%;margin:0;padding:0;min-height:0;"></button> | |||
</view> | |||
<image class="luckyBtns" bindtap="enterStar" wx:if="{{!certificationInfo}}" src="{{imgUrl+'/btns/luckyBtns2.png'}}"></image> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="downTimeGroup" wx:if="{{startDown!=-1}}"> | |||
<image class="luckyNum" src="{{imgUrl+'/images/luckyNum'+startDown+'.png'}}"></image> | |||
</view> | |||
<userMsg bindaddress="addressControl" wx:if="{{addressShow}}"></userMsg> | |||
</view> | |||
<tabBar></tabBar> | |||
</view> |
@@ -204,10 +204,9 @@ view{ | |||
border-top-right-radius: 20rpx; | |||
} | |||
.startRegister{ | |||
width:278rpx; | |||
width:296rpx; | |||
height:50rpx; | |||
position: relative; | |||
margin-top: 360rpx; | |||
} | |||
.prizePic{ | |||
width: 310rpx; | |||
@@ -400,11 +399,12 @@ view{ | |||
position:relative; | |||
} | |||
.btnsGroup{ | |||
height: 110rpx; | |||
position: absolute; | |||
top: 301rpx; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
justify-content: space-between; | |||
flex-direction: column; | |||
z-index: 9; | |||
} | |||
@@ -419,4 +419,18 @@ view{ | |||
position: absolute; | |||
top: 200rpx; | |||
z-index: 9; | |||
} | |||
.gameOpen{ | |||
position: absolute; | |||
left: 370rpx; | |||
top: 939rpx; | |||
width: 139rpx; | |||
height: 61rpx; | |||
} | |||
.newImages24{ | |||
position: absolute; | |||
left: 533rpx; | |||
top: 920rpx; | |||
width: 147rpx; | |||
height: 105rpx; | |||
} |
@@ -7,6 +7,10 @@ Page({ | |||
*/ | |||
data: { | |||
imgUrl: app.globalData.urlStatic,//图片路径 | |||
isAddress:false, | |||
placing:false, | |||
buyState:false, | |||
buyStateTime:"", | |||
isAgreement: true,//是否同意协议 | |||
phoneInputShow: false,//是否显示电话输入框 | |||
siteSelect: false,//是否显示位置选择框 | |||
@@ -49,6 +53,9 @@ Page({ | |||
optionsData:null, | |||
lookDescId: null, | |||
agreement: false,//是否显示协议 | |||
addressShow:false, | |||
mycenterTipWindow:0, | |||
barNums:0 | |||
}, | |||
/** | |||
@@ -67,6 +74,7 @@ Page({ | |||
}, | |||
loadFun: function () { | |||
this.getUserInfo(); | |||
this.getAddress(); | |||
if (app.globalData.userMobile) { | |||
this.data.subscribeData.mobile = app.globalData.userMobile; | |||
this.setData({ | |||
@@ -110,12 +118,19 @@ Page({ | |||
* 生命周期函数--监听页面显示 | |||
*/ | |||
onShow: function () { | |||
if (app.globalData.getBuyState) { | |||
this.getBuyStates(); | |||
} else { | |||
app.globalData.buyStateSuccessFuc = this.getBuyStates; | |||
} | |||
this.data.subscribeData.parentOpenid = app.globalData.friendOpenid; | |||
}, | |||
getBuyStates: function () { | |||
this.setData({ | |||
siteSelect:false | |||
buyState: app.globalData.getBuyState.success, | |||
buyStateTime: app.globalData.getBuyState.cdate | |||
}) | |||
this.data.subscribeData.parentOpenid = app.globalData.friendOpenid; | |||
}, | |||
/** | |||
* 生命周期函数--监听页面隐藏 | |||
*/ | |||
@@ -168,12 +183,21 @@ Page({ | |||
} | |||
}, | |||
selectTask: function (e) { | |||
if (e.currentTarget.dataset.type==2){ | |||
return; | |||
} | |||
this.setData({ | |||
taskNow: e.currentTarget.dataset.type | |||
}) | |||
if (this.data.taskNow==2){ | |||
this.getFriendBuCarNum(); | |||
} | |||
}, | |||
getFriendBuCarNum:function(){ | |||
app.wxRequest(app.globalData.urlRoot +"/share/getFriendBuCarNum",{},res=>{ | |||
if(res.code==200){ | |||
this.setData({ | |||
barNums: res.data.total | |||
}) | |||
} | |||
},this); | |||
}, | |||
selectRecord: function (e) { | |||
if (this.data.recordNow == e.currentTarget.dataset.type) { | |||
@@ -381,9 +405,7 @@ Page({ | |||
app.wxRequest(app.globalData.urlRoot + 'userInfo/getUserInfo', {}, res => { | |||
if(res.code==200){ | |||
if (res.data && res.data.avatarUrl) { | |||
this.data.userData.userLevel = res.data.userLevel; | |||
if (!app.globalData.userInfoData) { | |||
console.log(app.globalData.userInfoData); | |||
this.data.userData.avatarUrl = res.data.avatarUrl; | |||
this.data.userData.nickName = res.data.nickName; | |||
this.data.userData.userLevel = res.data.userLevel; | |||
@@ -396,9 +418,22 @@ Page({ | |||
nickName: res.data.nickName, | |||
userLevel: res.data.userLevel, | |||
}) | |||
} else if (app.globalData.userInfoData && app.globalData.userInfoData.userLevel != res.data.userLevel){ | |||
app.globalData.userInfoData.userLevel = res.data.userLevel; | |||
wx.setStorageSync('userInfoData', app.globalData.userInfoData); | |||
} else if (app.globalData.userInfoData){ | |||
if (app.globalData.userInfoData.userLevel != res.data.userLevel) { | |||
this.data.userData.userLevel = res.data.userLevel; | |||
app.globalData.userInfoData.userLevel = res.data.userLevel; | |||
wx.setStorageSync('userInfoData', app.globalData.userInfoData); | |||
} | |||
if (app.globalData.userInfoData.avatarUrl != res.data.avatarUrl) { | |||
this.data.userData.avatarUrl = res.data.avatarUrl; | |||
app.globalData.userInfoData.avatarUrl = res.data.avatarUrl; | |||
wx.setStorageSync('userInfoData', app.globalData.userInfoData); | |||
} | |||
if (app.globalData.userInfoData.nickName != res.data.nickName) { | |||
this.data.userData.nickName = res.data.nickName; | |||
app.globalData.userInfoData.nickName = res.data.nickName; | |||
wx.setStorageSync('userInfoData', app.globalData.userInfoData); | |||
} | |||
} | |||
this.setData({ | |||
userData: this.data.userData | |||
@@ -415,26 +450,39 @@ Page({ | |||
getTaskProgress: function () {//获取任务完成度 1每日任务 | |||
app.wxRequest(app.globalData.urlRoot + "task/getTaskProgress", { taskType: this.data.taskNow},res=>{ | |||
if(res.code==200){ | |||
for (let i = 0; i < res.data.length; i++) { | |||
res.data[i]['unlockNum']=0; | |||
for (let j = 0; j < res.data[i].childIdArr['lockArr'].length; j++) { | |||
if (res.data[i].childIdArr['lockArr'][j]) { | |||
res.data[i]['unlockNum'] += 1; | |||
if(res.data){ | |||
for (let i = 0; i < res.data.taskData.length; i++) { | |||
res.data.taskData[i]['unlockNum'] = 0; | |||
for (let j = 0; j < res.data.taskData[i].childIdArr.length; j++) { | |||
if (res.data.taskData[i].childIdArr[j]) { | |||
res.data.taskData[i]['unlockNum'] += 1; | |||
} | |||
} | |||
} | |||
this.setData({ | |||
taskList: res.data.taskData | |||
}) | |||
} | |||
console.log(res.data); | |||
this.setData({ | |||
taskList:res.data | |||
}) | |||
} | |||
},this) | |||
}, | |||
lookDesc:function(e){//查看奖品详情 | |||
this.setData({ | |||
descFrameShow: !this.data.descFrameShow, | |||
lookDescId: e.currentTarget.dataset.value || e.currentTarget.dataset.value==0 ? e.currentTarget.dataset.value:null | |||
}) | |||
if (this.data.descFrameShow){ | |||
this.setData({ | |||
descFrameShow: !this.data.descFrameShow, | |||
}) | |||
return; | |||
} | |||
if (this.data.recordList[e.currentTarget.dataset.value].awardState == 2){ | |||
this.setData({ | |||
mycenterTipWindow:this.data.isAddress?2:1 | |||
}) | |||
} else { | |||
this.setData({ | |||
descFrameShow: !this.data.descFrameShow, | |||
lookDescId: e.currentTarget.dataset.value || e.currentTarget.dataset.value == 0 ? e.currentTarget.dataset.value : null | |||
}) | |||
} | |||
}, | |||
lookRule: function (e) {//查看奖品详情 | |||
this.setData({ | |||
@@ -488,7 +536,13 @@ Page({ | |||
} | |||
}, | |||
getMyAwardList: function () {//获取获奖记录 | |||
app.wxRequest(app.globalData.urlRoot + "award/getMyAwardList", { awardType: this.data.recordNow},res=>{ | |||
var recordNow = this.data.recordNow; | |||
if (recordNow==1){ | |||
recordNow=3; | |||
} else if (recordNow == 3) { | |||
recordNow = 1; | |||
} | |||
app.wxRequest(app.globalData.urlRoot + "award/getMyAwardList", { awardSource: recordNow},res=>{ | |||
if(res.code == 200){ | |||
this.setData({ | |||
recordList:res.data | |||
@@ -518,10 +572,20 @@ Page({ | |||
}, this); | |||
} | |||
}, | |||
addressControl:function(){//跳转到地址管理 | |||
wx.navigateTo({ | |||
url: '../address/address' | |||
addressControl: function () {//跳转到地址管理 | |||
if (app.globalData.userInfoData) { | |||
this.data.userData.avatarUrl = app.globalData.userInfoData.avatarUrl; | |||
this.data.userData.nickName = app.globalData.userInfoData.nickName; | |||
this.setData({ | |||
userData: this.data.userData | |||
}) | |||
} | |||
this.setData({ | |||
addressShow:!this.data.addressShow | |||
}) | |||
if (this.data.isAddress== false){ | |||
this.getAddress(); | |||
} | |||
}, | |||
agreementState: function () {//协议 | |||
this.setData({ | |||
@@ -548,5 +612,62 @@ Page({ | |||
}) | |||
} | |||
} | |||
}, | |||
placingControl: function () { | |||
if (app.globalData.getBuyState.success != this.data.buyState) { | |||
this.setData({ | |||
buyState: app.globalData.getBuyState.success, | |||
buyStateTime: app.globalData.getBuyState.cdate | |||
}) | |||
} | |||
this.setData({ | |||
placing: !this.data.placing | |||
}) | |||
}, | |||
tipWindow:function(){ | |||
this.setData({ | |||
mycenterTipWindow:0 | |||
}) | |||
}, | |||
lookAddress:function(){ | |||
this.addressControl(); | |||
}, | |||
copyExchangeCode:function(){ | |||
var text = this.data.recordList[this.data.lookDescId].couponCode || this.data.recordList[this.data.lookDescId].productCode || ""; | |||
this.contentCopy(text); | |||
}, | |||
contentCopy:function(text){//内容复制 | |||
wx.setClipboardData({ | |||
data: text | |||
}) | |||
}, | |||
getAddress: function () {//获取地址 | |||
app.wxRequest(app.globalData.urlRoot + "address/getAddress", {}, res => { | |||
if (res.code == 200) { | |||
if (res.data) { | |||
this.data.isAddress = true; | |||
} | |||
} else { | |||
wx.showToast({ | |||
title: res.msg, | |||
icon: "none" | |||
}) | |||
} | |||
}, this); | |||
}, | |||
starGo:function(){//去完成 | |||
wx.reLaunch({ | |||
url: '/pages/star/star', | |||
}) | |||
}, | |||
enterLucky:function(){ | |||
wx.reLaunch({ | |||
url: '/pages/luckyStar/luckyStar', | |||
}) | |||
}, | |||
enterEvery:function(){ | |||
wx.navigateTo({ | |||
url: '/pages/everyday/everyday', | |||
}) | |||
} | |||
}) |
@@ -3,6 +3,8 @@ | |||
"usingComponents": { | |||
"service": "../component/service/index", | |||
"tabBar": "../component/tabBar/index", | |||
"agreement": "../agreement/agreement" | |||
"agreement": "../agreement/agreement", | |||
"userMsg": "/pages/userMsg/userMsg", | |||
"placingOrder": "/pages/placingOrder/placingOrder" | |||
} | |||
} |
@@ -56,18 +56,18 @@ | |||
<view bindtap="selectChange" data-value="4" class="selectGroup" style="border-color:{{selectNow==4?'#667ea3':'#7A797E'}}"> | |||
<view wx:if="{{selectNow==4}}" class="arrowIcon"></view> | |||
<view class="imgFrame"> | |||
<image class="appreciateIcon" src="{{selectNow==4?imgUrl+'/images/appreciateIcon2.png':imgUrl+'/images/appreciateIcon.png'}}"></image> | |||
<image class="appreciateIcon" src="{{selectNow==4?imgUrl+'/images/appreciateIcon2.png?v=002':imgUrl+'/images/appreciateIcon.png?v=002'}}"></image> | |||
</view> | |||
<view class="selectText" style="color:{{selectNow==4?'#667ea3':'black'}}">预约鉴赏</view> | |||
<view class="selectText" style="color:{{selectNow==4?'#667ea3':'black'}}">{{buyState?"我的VIP卡":"我的订单"}}</view> | |||
</view> | |||
</view> | |||
<image wx:if="{{selectNow<1 || selectNow>4}}" class="myCenterBotBg" src="{{imgUrl+'/images/myCenterBotBg.png'}}"></image> | |||
<view class="taskGroup" wx:if="{{selectNow==1}}"> | |||
<view class="taskSelect"> | |||
<view bindtap="selectTask" data-type='1' class="taskText {{taskNow==1?'taskText2':''}}">每日任务</view> | |||
<view bindtap="selectTask" data-type='2' class="taskText {{taskNow==2?'taskText2':''}}">限时任务</view> | |||
<view bindtap="selectTask" data-type='2' class="taskText {{taskNow==2?'taskText2':''}}">星探任务</view> | |||
</view> | |||
<view class="taskDetailFrame"> | |||
<view class="taskDetailFrame" wx:if="{{taskNow==1}}"> | |||
<view class="taskDetailGroup" wx:for="{{taskList}}" wx:key="id"> | |||
<view class="taskName">{{item.fullName}}</view> | |||
<view style="margin-top:12rpx;"> | |||
@@ -85,15 +85,40 @@ | |||
<view wx:if="{{item.unlockNum!=4}}" class="taskWaitBtn">未完成</view> | |||
</view> | |||
</view> | |||
<view class="taskDetailFrame" wx:if="{{taskNow==2}}"> | |||
<image class="scoutTaskDesc" src="{{imgUrl+'/newImages/scoutTaskDesc.png'}}"></image> | |||
<image class="scoutTaskIcon" src="{{imgUrl+'/newImages/scoutTaskIcon'+(barNums>3?'2':barNums>0?'':'3')+'.png?v=002'}}"></image> | |||
<view class="barFrame"> | |||
<view style="position:absolute;top:-5rpx;left:295rpx;"> | |||
<view class="barCarIcon"> | |||
<image class="scoutTaskCar" wx:for="{{0+barNums>5?5:0+barNums}}" wx:key="index" src="{{imgUrl+'/newImages/scoutTaskCarIcon2.png'}}"></image> | |||
<image class="scoutTaskCar" wx:for="{{5-barNums>0?5-barNums:0}}" wx:key="index" src="{{imgUrl+'/newImages/scoutTaskCarIcon1.png'}}"></image> | |||
</view> | |||
<view class="barGroup"> | |||
<view class="barContent" style="width:{{(barNums<=5?barNums:5)*20+'%'}}"></view> | |||
</view> | |||
<view class="barSignIcon"> | |||
<image class="taskSignIcon2" wx:for="{{5}}" wx:key="index" src="{{imgUrl+'/images/taskSignIcon.png'}}"></image> | |||
</view> | |||
</view> | |||
</view> | |||
<image class="scoutTaskGo" bindtap="starGo" src="{{imgUrl+'/newImages/scoutTaskGo.png'}}"></image> | |||
</view> | |||
</view> | |||
<view class="taskGroup" wx:if="{{selectNow==2}}"> | |||
<view class="taskSelect"> | |||
<view bindtap="selectRecord" data-type='1' class="taskText recordText {{recordNow==1?'taskText2':''}}">星探奖励</view> | |||
<view bindtap="selectRecord" data-type='1' class="taskText recordText {{recordNow==1?'taskText2':''}}">玩出惊喜奖品</view> | |||
<view bindtap="selectRecord" data-type='2' class="taskText recordText {{recordNow==2?'taskText2':''}}">每日任务奖品</view> | |||
<view bindtap="selectRecord" data-type='3' class="taskText recordText {{recordNow==3?'taskText2':''}}">幸运星抓手奖品</view> | |||
<view bindtap="selectRecord" data-type='3' class="taskText recordText {{recordNow==3?'taskText2':''}}">星探奖励</view> | |||
</view> | |||
<view class="recordFrame"> | |||
<view class="recordGroup" wx:for="{{recordList}}" wx:key="index"> | |||
<image class="newImages1" wx:if="{{!recordList.length && recordNow==1}}" src="{{imgUrl+'/newImages/1.png'}}"></image> | |||
<image class="newImages2" bindtap="enterLucky" wx:if="{{!recordList.length && recordNow==1}}" src="{{imgUrl+'/newImages/2.png'}}"></image> | |||
<image class="newImages5" wx:if="{{!recordList.length && recordNow==2}}" src="{{imgUrl+'/newImages/5.png'}}"></image> | |||
<image class="newImages6" bindtap="enterEvery" wx:if="{{!recordList.length && recordNow==2}}" src="{{imgUrl+'/newImages/6.png'}}"></image> | |||
<image class="newImages8" wx:if="{{!recordList.length && recordNow==3}}" src="{{imgUrl+'/newImages/8.png'}}"></image> | |||
<image class="newImages6" bindtap="starGo" wx:if="{{!recordList.length && recordNow==3}}" src="{{imgUrl+'/newImages/6.png'}}"></image> | |||
<view class="recordGroup" wx:if="{{recordList.length}}" wx:for="{{recordList}}" wx:key="index"> | |||
<view class="recordGroupLeft"> | |||
<view class="recordHeadGroup"> | |||
<image class="recordUserImg" src="{{userData.avatarUrl?userData.avatarUrl:imgUrl+'/images/defaultHead.png'}}"></image> | |||
@@ -119,7 +144,10 @@ | |||
</view> | |||
</view> | |||
<view class="ranksGroup" wx:if="{{selectNow==3}}"> | |||
<scroll-view class="ranksList" scroll-y bindscrolltolower="scrolltolower"> | |||
<image class="newImages3" wx:if="{{!shareFriendList.length}}" src="{{imgUrl+'/newImages/3.png'}}"></image> | |||
<image class="newImages4" bindtap="starGo" wx:if="{{!shareFriendList.length}}" src="{{imgUrl+'/newImages/4.png'}}"></image> | |||
<image class="newImages7" wx:if="{{shareFriendList.length}}" src="{{imgUrl+'/newImages/7.png'}}"></image> | |||
<scroll-view class="ranksList" wx:if="{{shareFriendList.length}}" scroll-y bindscrolltolower="scrolltolower"> | |||
<view class="detachmentGroup" wx:for="{{shareFriendList}}" wx:key="index"> | |||
<view class="detachmentGroupLeft"> | |||
<view class="recordHeadGroup"> | |||
@@ -135,8 +163,7 @@ | |||
</view> | |||
</scroll-view> | |||
</view> | |||
<!-- <view class="subscribeGroup" wx:if="{{selectNow==4 && !isRegister}}"> --> | |||
<view class="subscribeGroup" wx:if="{{selectNow==4}}"> | |||
<!-- <view class="subscribeGroup" wx:if="{{selectNow==4}}"> | |||
<view class="inputGroup"> | |||
<input class="inputCode" bindinput="getRealname" value="{{subscribeData.realname}}" placeholder="请输入您的姓名"></input> | |||
</view> | |||
@@ -179,15 +206,48 @@ | |||
</view> | |||
<view class="subscribeBtn" bindtap="lookMore"> | |||
<image style="width:100%;height:100%;" src="{{imgUrl+'/btns/myCenterBtn2.png'}}"></image></view> | |||
</view> | |||
<!-- <view class="subscribeGroup" wx:if="{{selectNow==4 && isRegister}}"> | |||
<view>已预约</view> | |||
</view> --> | |||
<view class="orderDescGroup" wx:if="{{selectNow==4 && !buyState}}"> | |||
<image class="orderDesc" src="{{imgUrl+'/images/orderDesc.png'}}"></image> | |||
<image class="indexOrderIcon" bindtap="placingControl" src="{{imgUrl+'/images/indexOrderIcon.png'}}"></image> | |||
</view> | |||
<view class="placingOrder" wx:if="{{selectNow==4 && buyState}}"> | |||
<view style="display:flex;align-items:center;"> | |||
<image class="orderHead" src="{{userData.avatarUrl}}"></image> | |||
<view style="margin-left:15rpx;margin-right:101rpx;"> | |||
<view class="cardTitle">启辰星VIP预定卡</view> | |||
<view class="cardCtime">{{buyStateTime}}</view> | |||
</view> | |||
</view> | |||
<image class="orderCard" src="{{imgUrl+'/images/orderCard.png'}}"></image> | |||
</view> | |||
<service></service> | |||
<view class="prizeDesc" catchtouchmove="ture" wx:if="{{mycenterTipWindow==1}}"> | |||
<view class="mycenterTipWindowGroup"> | |||
<image class="mycenterTipWindow1" src="{{imgUrl+'/images/mycenterTipWindow1.png'}}"></image> | |||
<image bindtap="tipWindow" class="closeDescIcon" style="top:-10rpx;right:-10rpx;" src="{{imgUrl+'/images/closeDescIcon.png'}}"></image> | |||
<view class="mycenterTipBtnGroup"> | |||
<image class="mycenterTipBtn" bindtap="lookAddress" style="margin-bottom:30rpx;" src="{{imgUrl+'/images/mycenterTipBtn2.png'}}"></image> | |||
<image class="mycenterTipBtn" bindtap="tipWindow" src="{{imgUrl+'/images/mycenterTipBtn1.png'}}"></image> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="prizeDesc" catchtouchmove="ture" wx:if="{{mycenterTipWindow==2}}"> | |||
<view class="mycenterTipWindowGroup" style="width:654rpx;height:536rpx;"> | |||
<image class="mycenterTipWindow1" src="{{imgUrl+'/images/mycenterTipWindow2.png'}}"></image> | |||
<image bindtap="tipWindow" class="closeDescIcon" style="top:-10rpx;right:-10rpx;" src="{{imgUrl+'/images/closeDescIcon.png'}}"></image> | |||
<view class="mycenterTipBtnGroup"> | |||
<image class="mycenterTipBtn" bindtap="lookAddress" style="margin-bottom:30rpx;" src="{{imgUrl+'/images/mycenterTipBtn2.png'}}"></image> | |||
<image class="mycenterTipBtn" bindtap="tipWindow" src="{{imgUrl+'/images/mycenterTipBtn1.png'}}"></image> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="prizeDesc" catchtouchmove="ture" wx:if="{{descFrameShow}}"> | |||
<view class="prizeImgGroup" wx:if="{{recordList[lookDescId].awardId!=1}}"> | |||
<image class="prizeImg" src="{{recordList[lookDescId].awardDetailPicurl}}" mode="widthFix"></image> | |||
<image bindtap="lookDesc" data-value="{{false}}" class="closeDescIcon" src="{{imgUrl+'/images/closeDescIcon.png'}}"></image> | |||
<image class="prizeImg" src="{{imgUrl+'/images/prizeDetailtext.png'}}"></image> | |||
<image bindtap="lookDesc" data-value="{{false}}" style="top:-10rpx;right:-10rpx;" class="closeDescIcon" src="{{imgUrl+'/images/closeDescIcon.png'}}"></image> | |||
<view class="exchangeCode">{{recordList[lookDescId].couponCode || recordList[lookDescId].productCode || ''}}<image class="copyBtn" bindtap="copyExchangeCode" src="{{imgUrl+'/images/copyBtn.png'}}"></image></view> | |||
<image class="mycenterConfirmBtn" bindtap="lookDesc" src="{{imgUrl+'/images/mycenterConfirmBtn.png'}}"></image> | |||
</view> | |||
<view class="prizeCustomGroup" wx:if="{{recordList[lookDescId].awardId==1}}"> | |||
<view class="prizeCustom"> | |||
@@ -213,5 +273,7 @@ | |||
</view> | |||
</view> | |||
<agreement bindmyevent="agreementControl" wx:if="{{agreement}}"></agreement> | |||
<userMsg bindaddress="addressControl" wx:if="{{addressShow}}"></userMsg> | |||
<placingOrder bindplacing="placingControl" wx:if="{{placing}}"></placingOrder> | |||
<tabBar></tabBar> | |||
</view> |
@@ -86,8 +86,8 @@ view{ | |||
margin-bottom: 8rpx; | |||
} | |||
.appreciateIcon{ | |||
width: 62rpx; | |||
height: 26rpx; | |||
width: 38rpx; | |||
height: 44rpx; | |||
margin-bottom: 8rpx; | |||
} | |||
.selectText{ | |||
@@ -458,6 +458,18 @@ view{ | |||
justify-content: center; | |||
height: 765rpx; | |||
} | |||
.orderDescGroup{ | |||
display: flex; | |||
flex-direction: column; | |||
align-items: center; | |||
padding-top: 35rpx; | |||
padding-bottom: 64rpx; | |||
} | |||
.orderDesc{ | |||
width: 614rpx; | |||
height: 842rpx; | |||
margin-bottom: 81rpx; | |||
} | |||
/* .ranksList{ | |||
position: absolute; | |||
top: 0; | |||
@@ -468,7 +480,7 @@ view{ | |||
} */ | |||
.ranksList{ | |||
position: absolute; | |||
top: 0; | |||
top: 84rpx; | |||
left: 0; | |||
right:0; | |||
bottom:0; | |||
@@ -510,11 +522,13 @@ view{ | |||
box-sizing: border-box; | |||
} | |||
.prizeImgGroup{ | |||
width: 453rpx; | |||
width: 652rpx; | |||
height: 894rpx; | |||
position: relative; | |||
} | |||
.prizeImg{ | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.closeDescIcon{ | |||
position: absolute; | |||
@@ -616,4 +630,199 @@ view{ | |||
width: 40rpx; | |||
right:-40rpx; | |||
top:-40rpx; | |||
} | |||
.indexOrderIcon{ | |||
width: 710rpx; | |||
height: 71rpx; | |||
} | |||
.placingOrder{ | |||
width: 610rpx; | |||
margin: 0 auto; | |||
margin-top: 37rpx; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
box-sizing: border-box; | |||
margin-bottom: 154rpx; | |||
border-bottom: 2rpx solid #DBD9DC; | |||
padding-bottom: 11rpx; | |||
} | |||
.orderHead{ | |||
width: 90rpx; | |||
height: 90rpx; | |||
border-radius: 50%; | |||
} | |||
.orderCard{ | |||
width: 240rpx; | |||
height: 155rpx; | |||
} | |||
.cardTitle{ | |||
line-height: 18rpx; | |||
font-size:18rpx; | |||
font-family:PingFangSC; | |||
font-weight:600; | |||
color:rgba(89,87,87,1); | |||
} | |||
.cardCtime{ | |||
margin-top: 9rpx; | |||
line-height: 14rpx; | |||
font-size:14rpx; | |||
font-family:NissanBrand; | |||
font-weight:400; | |||
color:rgba(89,87,87,1); | |||
} | |||
.mycenterTipWindow1{ | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.mycenterTipWindowGroup{ | |||
position: relative; | |||
width: 611rpx; | |||
height: 530rpx; | |||
} | |||
.mycenterTipBtnGroup{ | |||
position: absolute; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
top: 320rpx; | |||
} | |||
.mycenterTipBtn{ | |||
width: 346rpx; | |||
height: 62rpx; | |||
} | |||
.mycenterConfirmBtn{ | |||
width: 275rpx; | |||
height: 50rpx; | |||
position: absolute; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
bottom: 70rpx; | |||
} | |||
.copyBtn{ | |||
width: 108rpx; | |||
height: 30rpx; | |||
margin-left: 20rpx; | |||
} | |||
.exchangeCode{ | |||
position: absolute; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
top: 624rpx; | |||
width: 570rpx; | |||
font-size:20rpx; | |||
font-family:NissanBrand; | |||
font-weight:bold; | |||
color:rgba(0,0,0,1); | |||
line-height:48rpx; | |||
display: flex; | |||
align-items: center; | |||
} | |||
.scoutTaskDesc{ | |||
width: 263rpx; | |||
height: 41rpx; | |||
margin: 0 auto; | |||
margin-top: 10rpx; | |||
} | |||
.scoutTaskIcon{ | |||
width: 182rpx; | |||
height: 106rpx; | |||
margin-left: 75rpx; | |||
margin-top: -25rpx; | |||
} | |||
.barFrame{ | |||
position: relative; | |||
} | |||
.barGroup{ | |||
position: relative; | |||
width:380rpx; | |||
height:13rpx; | |||
border: 2rpx solid #C0C0C0; | |||
overflow: hidden; | |||
border-radius: 20rpx; | |||
} | |||
.barContent{ | |||
position: absolute; | |||
top: 0; | |||
height: 13rpx; | |||
border-radius: 20rpx; | |||
width: 0; | |||
background-color: #425683; | |||
} | |||
.barCarIcon{ | |||
position: absolute; | |||
top: -35rpx; | |||
width:380rpx; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
} | |||
.scoutTaskCar{ | |||
width: 51rpx; | |||
height: 22rpx; | |||
} | |||
.barSignIcon{ | |||
position: absolute; | |||
top: 20rpx; | |||
width:380rpx; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
padding: 0 13rpx; | |||
box-sizing: border-box; | |||
} | |||
.taskSignIcon2{ | |||
width: 12rpx; | |||
height: 12rpx; | |||
} | |||
.scoutTaskGo{ | |||
width: 256rpx; | |||
height: 40rpx; | |||
margin: 0 auto; | |||
margin-top: 60rpx; | |||
} | |||
.newImages1{ | |||
width: 108rpx; | |||
height: 170rpx; | |||
margin: 0 auto; | |||
margin-bottom: 17rpx; | |||
} | |||
.newImages2{ | |||
width: 256rpx; | |||
height: 40rpx; | |||
margin: 0 auto; | |||
} | |||
.newImages3{ | |||
width: 567rpx; | |||
height:222rpx; | |||
margin: 0 auto; | |||
margin-bottom: 46rpx; | |||
margin-top: 22rpx; | |||
} | |||
.newImages4{ | |||
width: 256rpx; | |||
height:40rpx; | |||
margin: 0 auto; | |||
} | |||
.newImages5{ | |||
width: 223rpx; | |||
height:144rpx; | |||
margin: 0 auto; | |||
margin-bottom: 26rpx; | |||
} | |||
.newImages6{ | |||
width: 256rpx; | |||
height:39rpx; | |||
margin: 0 auto; | |||
} | |||
.newImages7{ | |||
width: 567rpx; | |||
height:74rpx; | |||
margin: 0 auto; | |||
margin-top: 22rpx; | |||
} | |||
.newImages8{ | |||
width: 146rpx; | |||
height:159rpx; | |||
margin: 0 auto; | |||
margin-bottom: 21rpx; | |||
} |
@@ -0,0 +1,327 @@ | |||
// pages/placingOrder/placingOrder.js | |||
const app = getApp() | |||
Component({ | |||
/** | |||
* 组件的属性列表 | |||
*/ | |||
properties: { | |||
}, | |||
/** | |||
* 组件的初始数据 | |||
*/ | |||
data: { | |||
imgUrl: app.globalData.urlStatic,//图片路径 | |||
agreement:false, | |||
isAgreement: true,//是否同意协议 | |||
siteSelect: false,//是否显示位置选择框 | |||
phoneInputShow: false,//是否显示电话输入框 | |||
provinceArr: [],//省 | |||
provinceValue: 0,//选中的省下标 | |||
storeArr: [],//店铺 | |||
storeValue: 0,//选中的店铺下标 | |||
verificationCode: '获取验证码',//验证码文案 | |||
sendCode: true, | |||
appointment: true, | |||
subscribeData: { | |||
realname: "",//姓名 | |||
mobile: "",//手机号 | |||
captcha: "",//验证码 | |||
province: "",//省份 | |||
agent_code: "",//经销商编码 | |||
agentDetail: "",//经销商详细信息 | |||
parentOpenid: app.globalData.friendOpenid,//好友openid | |||
}, | |||
getBuyState:false | |||
}, | |||
attached: function () { | |||
if (app.globalData.openid) { | |||
this.loadFun(); | |||
} else { | |||
app.globalData.openidSuccessFuc = this.loadFun; | |||
} | |||
}, | |||
/** | |||
* 组件的方法列表 | |||
*/ | |||
methods: { | |||
closeXieyi: function () { | |||
this.triggerEvent('placing') | |||
}, | |||
getUserPhone: function (e) {//获取用户手机号 | |||
this.setData({ | |||
phoneInputShow: true | |||
}) | |||
if (e.detail.errMsg == 'getPhoneNumber:ok') { | |||
app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | |||
if (res.code == 200) { | |||
if (res.data && res.data.decodeData) { | |||
this.data.subscribeData.mobile = res.data.decodeData.phoneNumber; | |||
this.setData({ | |||
subscribeData: this.data.subscribeData | |||
}) | |||
} | |||
} else { | |||
wx.showToast({ | |||
title: res.msg, | |||
icon: "none" | |||
}) | |||
} | |||
}, this); | |||
} | |||
}, | |||
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({ | |||
phoneInputShow: true, | |||
subscribeData: this.data.subscribeData | |||
}) | |||
} | |||
}, | |||
getRealname: function (e) {//获取用户输入的姓名 | |||
this.data.subscribeData.realname = e.detail.value; | |||
}, | |||
getMobile: function (e) {//获取用户输入的电话 | |||
this.data.subscribeData.mobile = e.detail.value; | |||
}, | |||
getCaptcha: function (e) {//获取用户输入的验证码 | |||
this.data.subscribeData.captcha = e.detail.value; | |||
}, | |||
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, | |||
provinceValue: res.data.nearData.provinceIndex, | |||
storeValue: res.data.nearData.cityIndex | |||
}) | |||
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, | |||
icon: "none" | |||
}) | |||
} | |||
}, 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) { | |||
wx.showToast({ | |||
title: '请输入正确的电话', | |||
icon: 'none' | |||
}) | |||
} else { | |||
wx.showToast({ | |||
title: '请输入电话', | |||
icon: 'none' | |||
}) | |||
} | |||
return; | |||
} | |||
if (!this.data.sendCode) { | |||
return; | |||
} | |||
this.data.sendCode = false; | |||
app.wxRequest(app.globalData.urlRoot + "captcha/sendCaptcha", { mobile: this.data.subscribeData.mobile }, res => { | |||
if (res.code == 200) { | |||
this.countDown(); | |||
wx.showToast({ | |||
title: '验证码获取成功', | |||
icon: "none" | |||
}) | |||
this.setData({ | |||
verificationCode: 60 | |||
}) | |||
} else { | |||
this.data.sendCode = true; | |||
wx.showToast({ | |||
title: res.msg, | |||
icon: "none" | |||
}) | |||
} | |||
}, this) | |||
}, | |||
countDown: function () {//倒计时 | |||
setTimeout(() => { | |||
this.setData({ | |||
verificationCode: this.data.verificationCode - 1 | |||
}) | |||
if (this.data.verificationCode > 0) { | |||
this.countDown(); | |||
} else { | |||
this.setData({ | |||
verificationCode: "获取验证码" | |||
}) | |||
this.data.sendCode = true; | |||
} | |||
}, 1000); | |||
}, | |||
getUserLocation: function (e) { | |||
wx.getLocation({ | |||
type: 'gcj02', //wgs84 | |||
success: (res) => { | |||
this.getDistributorList(res.longitude, res.latitude); | |||
}, | |||
fail: (res) => { | |||
this.getDistributorList("", ""); | |||
}, | |||
complete: (res) => { | |||
this.setData({ | |||
siteSelect: true, | |||
}) | |||
} | |||
}) | |||
}, | |||
showSite: function () {//显示地址选择框 | |||
if (!this.data.siteSelect) { | |||
if (!app.globalData.myCenterData) { | |||
this.getUserLocation();//获取用户当前位置 | |||
} else { | |||
this.setData({ | |||
siteSelect: true | |||
}) | |||
} | |||
} | |||
}, | |||
agreementState: function () {//协议 | |||
this.setData({ | |||
isAgreement: !this.data.isAgreement | |||
}) | |||
}, | |||
agreementControl: function () { | |||
this.setData({ | |||
agreement: !this.data.agreement | |||
}) | |||
}, | |||
preBuy: function () {//下订支付 | |||
if (!this.data.subscribeData.realname) { | |||
wx.showToast({ | |||
title: '请输入姓名', | |||
icon: "none" | |||
}) | |||
return; | |||
} | |||
if (!this.data.subscribeData.mobile) { | |||
wx.showToast({ | |||
title: '请输入电话', | |||
icon: "none" | |||
}) | |||
return; | |||
} | |||
if (!this.data.subscribeData.captcha) { | |||
wx.showToast({ | |||
title: '请输入验证码', | |||
icon: "none" | |||
}) | |||
return; | |||
} | |||
if (!this.data.isAgreement) { | |||
wx.showToast({ | |||
title: '请同意协议', | |||
icon: 'none' | |||
}) | |||
return; | |||
} | |||
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({ | |||
timeStamp: res.data.jsSubmit.timeStamp, | |||
nonceStr: res.data.jsSubmit.nonceStr, | |||
signType: res.data.jsSubmit.signType, | |||
package: res.data.jsSubmit.package, | |||
paySign: res.data.jsSubmit.paySign, | |||
success:(option)=>{ | |||
this.paySuccess(res.data.trade_id); | |||
}, | |||
fail: (option) => { | |||
this.data.appointment = true; | |||
wx.showToast({ | |||
title: '支付失败', | |||
icon:"none" | |||
}) | |||
} | |||
}) | |||
} else { | |||
this.data.appointment = true; | |||
wx.showToast({ | |||
title: res.msg, | |||
icon: "none" | |||
}) | |||
} | |||
}, this, "POST") | |||
}, | |||
paySuccess: function (e) {//支付成功 | |||
app.wxRequest(app.globalData.urlRoot + "wxPay/paySuccess", { trade_id:e},res=>{ | |||
if(res.code==200){ | |||
// wx.showToast({ | |||
// title: '下订成功', | |||
// mask:true | |||
// }) | |||
this.setData({ | |||
getBuyState:true | |||
}) | |||
app.globalData.getBuyState = {}; | |||
app.globalData.getBuyState.success = true; | |||
app.globalData.getBuyState.cdate = res.data.cdate; | |||
// setTimeout(()=>{ | |||
// this.closeXieyi(); | |||
// },1500) | |||
} else { | |||
this.data.appointment = true; | |||
wx.showToast({ | |||
title: res.msg, | |||
icon:'none' | |||
}) | |||
} | |||
},this,"POST"); | |||
}, | |||
closePage:function(){ | |||
this.closeXieyi(); | |||
} | |||
} | |||
}) |
@@ -0,0 +1,6 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": { | |||
"agreement": "/pages/agreement/agreement" | |||
} | |||
} |
@@ -0,0 +1,68 @@ | |||
<!--pages/placingOrder/placingOrder.wxml--> | |||
<!--pages/yuyue/yuyue.wxml--> | |||
<view class="main"> | |||
<view class="closeGroup"> | |||
<image class="closeXieyi" bindtap="closeXieyi" src="{{imgUrl+'/images/closeXieyi.png'}}"></image> | |||
</view> | |||
<image class="placingIcon" src="{{imgUrl+'/images/placingIcon.png'}}"></image> | |||
<view class="msgGroup"> | |||
<view class="inputGroup"> | |||
<view class="userTitle">姓名</view> | |||
<input class="userInput" bindinput="getRealname" value="{{subscribeData.realname}}" placeholder="请输入您的姓名"></input> | |||
</view> | |||
<view class="inputGroup"> | |||
<view class="userTitle">电话</view> | |||
<view class="userInput"> | |||
<input style="width:100%;height:100%;" bindinput="getMobile" type="number" maxlength='11' value="{{subscribeData.mobile}}" placeholder="请输入您的联系电话"></input> | |||
<button class="getPhoneBtn" wx:if="{{!phoneInputShow}}" style="width: 100%;height: 100%;margin: 0;padding: 0;min-height: 0;" open-type="getPhoneNumber" bindgetphonenumber="getUserPhone"></button> | |||
</view> | |||
</view> | |||
<view class="codeGroup"> | |||
<input class="userInput" bindfocus="showSite" bindinput="getCaptcha" style="width:350rpx;" placeholder="请输入您的验证码"></input> | |||
<view class="getCode" bindtap="getCode">{{verificationCode}}</view> | |||
</view> | |||
<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"> | |||
<view class="userInput selectSiteGroup"> | |||
<text>{{provinceArr[provinceValue].province}}</text> | |||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||
</view> | |||
</picker> | |||
</view> | |||
<view class="inputGroup"> | |||
<view class="userTitle">专营店</view> | |||
<picker mode='selector' range="{{storeArr}}" range-key="agent_detail" value="{{storeValue}}" bindchange="storeChane"> | |||
<view class="userInput selectSiteGroup"> | |||
<text>{{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"> | |||
<image style="width:261rpx;height:23rpx;" src="{{imgUrl+'/images/myCenterAgreenTip.png'}}"></image> | |||
<view bindtap="agreementControl"> | |||
<image style="width:240rpx;height:23rpx;margin-left:3rpx;" src="{{imgUrl+'/images/myCenterAgreen.png'}}"></image> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="subscribeBtn"> | |||
<image style="width:100%;height:100%;" bindtap="preBuy" src="{{imgUrl+'/btns/placingOrderBtn.png'}}"></image> | |||
</view> | |||
</view> | |||
<agreement bindmyevent="agreementControl" wx:if="{{agreement}}"></agreement> | |||
<view class="receiveFrame" wx:if="{{getBuyState}}"> | |||
<view class="receiveGroup"> | |||
<image class="newImages12" bindtap="closePage" src="{{imgUrl+'/newImages/12.png'}}"></image> | |||
<view class="receiveGroupContent"> | |||
<image class="newImages10" src="{{imgUrl+'/newImages/10.png'}}"></image> | |||
<image class="newImages9" bindtap="closePage" src="{{imgUrl+'/newImages/9.png'}}"></image> | |||
</view> | |||
<image class="newImages11" src="{{imgUrl+'/newImages/11.png'}}"></image> | |||
</view> | |||
</view> | |||
</view> |
@@ -0,0 +1,183 @@ | |||
/* pages/placingOrder/placingOrder.wxss */ | |||
.closeXieyi,.xieyi{ | |||
display: block; | |||
} | |||
.main{ | |||
width: 750rpx; | |||
position: fixed; | |||
left: 0; | |||
top: 0; | |||
height: calc(100vh - 150rpx); | |||
overflow: auto; | |||
background-color: white; | |||
z-index: 99; | |||
} | |||
.closeGroup{ | |||
display: flex; | |||
align-items: center; | |||
justify-content: flex-end; | |||
padding-right: 48rpx; | |||
padding-top: 38rpx; | |||
} | |||
.closeXieyi{ | |||
width: 42rpx; | |||
height: 42rpx; | |||
} | |||
.placingIcon{ | |||
width: 663rpx; | |||
height: 515rpx; | |||
margin:25rpx auto 74rpx; | |||
} | |||
.msgGroup{ | |||
padding: 0 46rpx; | |||
display: flex; | |||
flex-direction: column; | |||
align-items: center; | |||
} | |||
.codeGroup{ | |||
width: 100%; | |||
display: flex; | |||
align-items: center; | |||
justify-content: flex-end; | |||
margin-bottom: 15rpx; | |||
} | |||
.inputGroup{ | |||
width: 100%; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
margin-bottom: 15rpx; | |||
} | |||
.userTitle{ | |||
line-height: 24rpx; | |||
font-size:24rpx; | |||
font-family:PingFangSC; | |||
font-weight:400; | |||
color:rgba(35,24,21,1); | |||
} | |||
.userInput{ | |||
position: relative; | |||
width:539rpx; | |||
height: 65rpx; | |||
line-height: 65rpx; | |||
border: 2rpx solid #bfbfbf; | |||
padding: 0 28rpx; | |||
box-sizing: border-box; | |||
border-radius: 20rpx; | |||
font-size:24rpx; | |||
font-family:PingFangSC; | |||
font-weight:300; | |||
} | |||
.getCode{ | |||
width: 160rpx; | |||
height: 50rpx; | |||
line-height: 50rpx; | |||
font-size:26rpx; | |||
font-family:PingFangSC; | |||
font-weight:400; | |||
color:rgba(255,255,255,1); | |||
background-color: #2a558c; | |||
border-radius: 15rpx; | |||
text-align: center; | |||
margin-left: 30rpx; | |||
} | |||
.selectIcon{ | |||
width: 25rpx; | |||
height: 15rpx; | |||
} | |||
.selectSiteGroup{ | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
} | |||
.agreementGroup{ | |||
width: 658rpx; | |||
margin: 0 auto; | |||
display: flex; | |||
align-items: center; | |||
margin-top: 19rpx; | |||
} | |||
.agreeIcon{ | |||
width: 29rpx; | |||
height: 28rpx; | |||
margin-right: 17rpx; | |||
} | |||
.agreementText{ | |||
line-height: 24rpx; | |||
font-size:24rpx; | |||
font-family:PingFangSC; | |||
font-weight:300; | |||
color:rgba(156,157,157,1); | |||
display: flex; | |||
align-items: center; | |||
} | |||
.subscribeBtn{ | |||
margin: 0 auto; | |||
width:652rpx; | |||
height:70rpx; | |||
margin-top: 39rpx; | |||
margin-bottom: 99rpx; | |||
} | |||
.getPhoneBtn{ | |||
position: absolute; | |||
left: 0; | |||
top: 0; | |||
opacity: 0; | |||
z-index: 9; | |||
} | |||
.pickerGroup{ | |||
width: 100%; | |||
} | |||
.receiveFrame{ | |||
position: fixed; | |||
top: 0; | |||
left: 0; | |||
width: 750rpx; | |||
height: calc(100vh - 150rpx); | |||
background-color: #7F93B3; | |||
z-index: 9; | |||
display: flex; | |||
flex-direction: column; | |||
align-items: center; | |||
} | |||
.receiveGroup{ | |||
width: 100%; | |||
height: 100%; | |||
position: relative; | |||
} | |||
.receiveGroupContent{ | |||
position: relative; | |||
margin: 0 auto; | |||
margin-top: 225rpx; | |||
width: 569rpx; | |||
height: 492rpx; | |||
} | |||
.newImages10{ | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.newImages9{ | |||
position: absolute; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
width: 366rpx; | |||
height: 57rpx; | |||
bottom: 25rpx; | |||
} | |||
.newImages12{ | |||
position: absolute; | |||
top:48rpx; | |||
right: 38rpx; | |||
width: 42rpx; | |||
height: 42rpx; | |||
} | |||
.newImages11{ | |||
position: absolute; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
bottom: 44rpx; | |||
width: 322rpx; | |||
height: 71rpx; | |||
} |
@@ -20,6 +20,8 @@ Page({ | |||
swiperCurrent: 0,//swiper选中的元素下标 | |||
userInfoData: app.globalData.userInfoData, | |||
posterState:false,//海报是否合成完毕 | |||
posterBottom:null, | |||
selectType:1 | |||
}, | |||
/** | |||
@@ -74,6 +76,12 @@ Page({ | |||
this.data.numBg = res.path; | |||
} | |||
}) | |||
wx.getImageInfo({//缓存海报底部图片 | |||
src: this.data.imgUrl + "/newImages/posterBottom.png?v=002", | |||
success: res => { | |||
this.data.posterBottom = res.path; | |||
} | |||
}) | |||
for (let i = 0; i < this.data.rankNum.length; i++) { | |||
wx.getImageInfo({//缓存数字 | |||
src: this.data.imgUrl + '/images/nums/' + this.data.rankNum[i] + '.png', | |||
@@ -126,7 +134,7 @@ Page({ | |||
onShareAppMessage: function () { | |||
return { | |||
title: '您有一份启辰星专属礼品待领取', | |||
imageUrl: this.data.imgUrl + "/images/posterShareImg" + (this.data.swiperCurrent+1)+".jpg?v=003", | |||
imageUrl: this.data.imgUrl + "/images/posterShareImg" + (this.data.swiperCurrent+1)+".jpg?v=004", | |||
path: "/pages/coupon/coupon?friendOpenid=" + app.globalData.openid | |||
} | |||
}, | |||
@@ -218,10 +226,9 @@ Page({ | |||
ctx.drawImage(this.data.rankNum[1], scale * 343, scale * 1012, scale * 52, scale * 70); | |||
ctx.drawImage(this.data.rankNum[2], scale * 401, scale * 1012, scale * 52, scale * 70); | |||
ctx.drawImage(this.data.rankNum[3], scale * 459, scale * 1012, scale * 52, scale * 70); | |||
console.log(this.data.rankNum[3]); | |||
//二维码 | |||
console.log(this.data.qrCodeUrl); | |||
ctx.drawImage(this.data.qrCodeUrl, scale * 476, scale * 1134, scale * 176, scale * 176); | |||
ctx.drawImage(this.data.posterBottom, 0, scale * 1213, scale * 750, scale * 167); | |||
ctx.drawImage(this.data.qrCodeUrl, scale * 566, scale * 1220, scale * 140, scale * 140); | |||
//绘制 | |||
ctx.draw(false, setTimeout(() => { | |||
wx.canvasToTempFilePath({ | |||
@@ -263,18 +270,22 @@ Page({ | |||
} | |||
}, | |||
getCertificationCount: function () {//获取星探计划人数 | |||
app.wxRequest(app.globalData.urlRoot +"userInfo/getUserInfo",{},res=>{ | |||
app.wxRequest(app.globalData.urlRoot +"certificationInfo/getCertificationNum",{},res=>{ | |||
this.createQrcode(); | |||
if(res.code==200){ | |||
if (res.data.certificationNum){ | |||
if (res.data.certificationNum<10){ | |||
this.data.rankNum = ("000" + res.data.certificationNum.toString()).split(""); | |||
} else if (res.data.certificationNum < 100) { | |||
this.data.rankNum = ("00" + res.data.certificationNum.toString()).split(""); | |||
} else if (res.data.certificationNum < 1000) { | |||
this.data.rankNum = ("0" + res.data.certificationNum.toString()).split(""); | |||
} else { | |||
this.data.rankNum = res.data.certificationNum.toString().split(""); | |||
if(res.data){ | |||
if (res.data.certificationNum){ | |||
if (res.data.certificationNum<10){ | |||
this.data.rankNum = ("000" + res.data.certificationNum.toString()).split(""); | |||
} else if (res.data.certificationNum < 100) { | |||
this.data.rankNum = ("00" + res.data.certificationNum.toString()).split(""); | |||
} else if (res.data.certificationNum < 1000) { | |||
this.data.rankNum = ("0" + res.data.certificationNum.toString()).split(""); | |||
} else { | |||
this.data.rankNum = res.data.certificationNum.toString().split(""); | |||
} | |||
}else{ | |||
this.data.rankNum = "0000".split(""); | |||
} | |||
}else{ | |||
this.data.rankNum = "0000".split(""); | |||
@@ -294,5 +305,21 @@ Page({ | |||
} | |||
this.cacheFun(); | |||
}, this) | |||
}, | |||
closeXieyi:function(){ | |||
wx.navigateBack({ | |||
delta: 1 | |||
}) | |||
}, | |||
changeSelect:function(){ | |||
if(this.data.selectType==1){ | |||
this.setData({ | |||
selectType:2 | |||
}) | |||
} else { | |||
this.setData({ | |||
selectType: 1 | |||
}) | |||
} | |||
} | |||
}) |
@@ -1,52 +1,69 @@ | |||
<!--pages/poster/poster.wxml--> | |||
<view class="all"> | |||
<view class="main"> | |||
<view class="titleText">分享类型</view> | |||
<view class="lineSty"></view> | |||
<image class="closeXieyi" bindtap="closeXieyi" src="{{imgUrl+'/images/closeXieyi.png'}}"></image> | |||
<view class="selectFrame"> | |||
<image class="newImages17" bindtap="changeSelect" wx:if="{{selectType==1}}" src="{{imgUrl+'/newImages/17.png'}}"></image> | |||
<image class="newImages17" bindtap="changeSelect" wx:if="{{selectType==2}}" src="{{imgUrl+'/newImages/18.png'}}"></image> | |||
<view style="left:{{selectType==1?'0':'50%'}}" class="maskSelect"></view> | |||
</view> | |||
<!-- <image class="posterBg" src="{{imgUrl+'/images/posterBg.jpg'}}"></image> --> | |||
<view class="swiperFrame"> | |||
<swiper class="swiperSty" current="{{swiperCurrent}}" bindchange="swiperChange" previous-margin="130rpx" next-margin="130rpx"> | |||
<!-- <swiper-item wx:for="{{posterUrl}}" wx:key="index"> --> | |||
<swiper-item wx:for="{{3}}" wx:key="index"> | |||
<view class="selectTempFrame {{index==swiperCurrent?'selectTempFrameBorder':''}}"> | |||
<view class="imgGroup"> | |||
<image style="width:100%;height:100%;" src="{{imgUrl+'/images/tempImg'+(index+1)+'.jpg?v=004'}}"></image> | |||
<view class="userMsg"> | |||
<image class="userHead" src="{{userHead}}"></image> | |||
<!-- <image class="userHead" src="{{imgUrl+'/images/posterChoose.png'}}"></image> --> | |||
<view class="userNickName">{{userInfoData.nickName?userInfoData.nickName:""}}</view> | |||
</view> | |||
<view class="userNumber"> | |||
<image class="posterNum" src="{{imgUrl+'/images/posterNum.png'}}"></image> | |||
<view class="numberGroup"> | |||
<image class="numberNum numberNum1" src="{{imgUrl+'/images/nums/'+rankNum[0]+'.png'}}"></image> | |||
<image class="numberNum numberNum2" src="{{imgUrl+'/images/nums/'+rankNum[1]+'.png'}}"></image> | |||
<image class="numberNum numberNum3" src="{{imgUrl+'/images/nums/'+rankNum[2]+'.png'}}"></image> | |||
<image class="numberNum numberNum4" src="{{imgUrl+'/images/nums/'+rankNum[3]+'.png'}}"></image> | |||
<canvas wx:if="{{canvasShow}}" class="canvasDraw" canvas-id="myCanvas"></canvas> | |||
<view wx:if="{{selectType==1}}"> | |||
<view class="swiperFrame"> | |||
<swiper class="swiperSty" current="{{swiperCurrent}}" bindchange="swiperChange" previous-margin="130rpx" next-margin="130rpx"> | |||
<!-- <swiper-item wx:for="{{posterUrl}}" wx:key="index"> --> | |||
<swiper-item wx:for="{{3}}" wx:key="index"> | |||
<view class="selectTempFrame {{index==swiperCurrent?'selectTempFrameBorder':''}}"> | |||
<view class="imgGroup"> | |||
<image style="width:100%;height:100%;" src="{{imgUrl+'/images/tempImg'+(index+1)+'.jpg?v=004'}}"></image> | |||
<view class="userMsg"> | |||
<image class="userHead" src="{{userHead}}"></image> | |||
<!-- <image class="userHead" src="{{imgUrl+'/images/posterChoose.png'}}"></image> --> | |||
<view class="userNickName">{{userInfoData.nickName?userInfoData.nickName:""}}</view> | |||
</view> | |||
<view class="userNumber"> | |||
<image class="posterNum" src="{{imgUrl+'/images/posterNum.png'}}"></image> | |||
<view class="numberGroup"> | |||
<image class="numberNum numberNum1" src="{{imgUrl+'/images/nums/'+rankNum[0]+'.png'}}"></image> | |||
<image class="numberNum numberNum2" src="{{imgUrl+'/images/nums/'+rankNum[1]+'.png'}}"></image> | |||
<image class="numberNum numberNum3" src="{{imgUrl+'/images/nums/'+rankNum[2]+'.png'}}"></image> | |||
<image class="numberNum numberNum4" src="{{imgUrl+'/images/nums/'+rankNum[3]+'.png'}}"></image> | |||
</view> | |||
</view> | |||
<image class="posterBottom" mode="widthFix" src="{{imgUrl + '/newImages/posterBottom.png?v=002'}}"></image> | |||
<image class="userQrCode" src="{{qrCodeUrl}}"></image> | |||
</view> | |||
<image class="userQrCode" src="{{qrCodeUrl}}"></image> | |||
<image wx:if="{{index==swiperCurrent}}" class="posterChoose" src="{{imgUrl+'/images/posterChoose.png'}}"></image> | |||
</view> | |||
<image wx:if="{{index==swiperCurrent}}" class="posterChoose" src="{{imgUrl+'/images/posterChoose.png'}}"></image> | |||
</view> | |||
</swiper-item> | |||
</swiper> | |||
<image class="leftArrow" wx:if="{{swiperCurrent!=0}}" bindtap="prevImg" src="{{imgUrl+'/images/leftArrow.png'}}"></image> | |||
<image class="rightArrow" wx:if="{{swiperCurrent!=2}}" bindtap="nextImg" src="{{imgUrl+'/images/rightArrow.png'}}"></image> | |||
</swiper-item> | |||
</swiper> | |||
<image class="leftArrow" wx:if="{{swiperCurrent!=0}}" bindtap="prevImg" src="{{imgUrl+'/images/leftArrow.png'}}"></image> | |||
<image class="rightArrow" wx:if="{{swiperCurrent!=2}}" bindtap="nextImg" src="{{imgUrl+'/images/rightArrow.png'}}"></image> | |||
</view> | |||
<view class="operationFrame"> | |||
<view class="operationGroup" style="margin-right:55rpx;" bindtap="saveImg"> | |||
<image class="saveIcon" src="{{imgUrl+'/images/saveIcon.png'}}"></image> | |||
<view class="operationText">保存本地</view> | |||
</view> | |||
<view class="operationGroup"> | |||
<image class="saveIcon" src="{{imgUrl+'/images/shareIcon.png'}}"></image> | |||
<view class="operationText">分享好友</view> | |||
<button class="shareBtn" open-type="share"></button> | |||
</view> | |||
</view> | |||
</view> | |||
<canvas wx:if="{{canvasShow}}" class="canvasDraw" canvas-id="myCanvas"></canvas> | |||
<!-- <view class="lookBigPic" bindtap="savePoster"> | |||
<image class="lookBigIcon" src="{{imgUrl+'/images/lookbigIcon.png'}}"></image> | |||
<view class="lookBigText">查看大图</view> | |||
</view> --> | |||
<image class="selectPosterTip" src="{{imgUrl+'/images/selectPosterTip.png'}}"></image> | |||
<view class="operationFrame"> | |||
<view class="operationGroup" style="margin-right:55rpx;" bindtap="saveImg"> | |||
<image class="saveIcon" src="{{imgUrl+'/images/saveIcon.png'}}"></image> | |||
<view class="operationText">保存到手机</view> | |||
<view wx:if="{{selectType==2}}"> | |||
<view class="shareGroup"> | |||
<image class="newImages19" src="{{imgUrl+'/newImages/19.png'}}"></image> | |||
<image class="posterShareImg" src="{{imgUrl+'/images/posterShareImg' + (swiperCurrent+1)+'.jpg?v=004'}}"></image> | |||
</view> | |||
<view class="operationGroup"> | |||
<image class="saveIcon" src="{{imgUrl+'/images/shareIcon.png'}}"></image> | |||
<view class="operationText">分享给好友</view> | |||
<button class="shareBtn" open-type="share"></button> | |||
<image class="newImages20" src="{{imgUrl+'/newImages/20.png'}}"></image> | |||
<view class="shareSelect"> | |||
<image class="newImages21" src="{{imgUrl+'/newImages/21.png'}}"></image> | |||
<button class="shareBtn2" style="min-height:0;width: 96rpx;height: 100rpx;" open-type="share"></button> | |||
</view> | |||
</view> | |||
</view> |
@@ -9,13 +9,12 @@ view{ | |||
height: calc(100vh - 150rpx); | |||
overflow: auto; | |||
position: relative; | |||
background-image: url('https://www.jiyou-tech.com/2020/496_qichen/static/images/posterBg.jpg?v=002'); | |||
/* background-image: url('https://www.jiyou-tech.com/2020/496_qichen/static/images/posterBg.jpg?v=002'); */ | |||
} | |||
.operationFrame{ | |||
margin-top: 43rpx; | |||
width: 750rpx; | |||
height: 234rpx; | |||
/* background-image: url('https://www.jiyou-tech.com/2020/496_qichen/static/images/posterBg.png?v=002'); */ | |||
height: 285rpx; | |||
background-image: url('https://www.jiyou-tech.com/2020/496_qichen/static/images/posterBg.png?v=002'); | |||
display: flex; | |||
align-items: center; | |||
justify-content:center; | |||
@@ -33,12 +32,12 @@ view{ | |||
height: 96rpx; | |||
} | |||
.operationText{ | |||
margin-top: 12rpx; | |||
line-height: 12rpx; | |||
font-size:12rpx; | |||
font-family:PingFang; | |||
font-weight:bold; | |||
color:rgba(113,112,113,1); | |||
margin-top: 19rpx; | |||
line-height: 24rpx; | |||
font-size:24rpx; | |||
font-family:PingFangSC; | |||
font-weight:300; | |||
color:rgba(51,84,128,1); | |||
} | |||
.shareBtn{ | |||
position: absolute; | |||
@@ -55,7 +54,7 @@ view{ | |||
height:817rpx; | |||
position: relative; | |||
margin: 0 auto; | |||
margin-top: 92rpx; | |||
margin-top: 60rpx; | |||
box-sizing: border-box; | |||
background-color: #00548C; | |||
} | |||
@@ -156,10 +155,10 @@ view{ | |||
} | |||
.userQrCode{ | |||
position: absolute; | |||
right: 57rpx; | |||
bottom: 39rpx; | |||
width: 105rpx; | |||
height: 105rpx; | |||
right: 22rpx; | |||
bottom: 10rpx; | |||
width: 80rpx; | |||
height: 80rpx; | |||
} | |||
.userNumber{ | |||
position: absolute; | |||
@@ -200,4 +199,100 @@ view{ | |||
.numberNum4{ | |||
left: 223rpx; | |||
top: 4rpx; | |||
} | |||
.posterBottom{ | |||
width: 100%; | |||
position: absolute; | |||
left: 0; | |||
bottom: 0; | |||
} | |||
.titleText{ | |||
width: 682rpx; | |||
margin: 0 auto; | |||
margin-top: 78rpx; | |||
margin-bottom: 28rpx; | |||
line-height: 39rpx; | |||
font-size:39rpx; | |||
font-family:PingFangSC; | |||
font-weight:bold; | |||
color:rgba(0,77,149,1); | |||
} | |||
.lineSty{ | |||
width: 682rpx; | |||
height:2rpx; | |||
background-color: #B6B6B6; | |||
margin: 0 auto; | |||
margin-bottom: 30rpx; | |||
} | |||
.closeXieyi{ | |||
position: absolute; | |||
right: 48rpx; | |||
top: 38rpx; | |||
width: 42rpx; | |||
height: 42rpx; | |||
} | |||
.selectFrame{ | |||
position: relative; | |||
width: 611rpx; | |||
height: 81rpx; | |||
margin: 0 auto; | |||
} | |||
.newImages17{ | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.maskSelect{ | |||
position: absolute; | |||
top: 0; | |||
height: 100%; | |||
width: 50%; | |||
} | |||
.shareGroup{ | |||
position: relative; | |||
width: 462rpx; | |||
height: 585rpx; | |||
margin: 0 auto; | |||
margin-top: 65rpx; | |||
} | |||
.newImages19{ | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.posterShareImg{ | |||
position: absolute; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
top: 184rpx; | |||
width: 415rpx; | |||
height: 336rpx; | |||
} | |||
.newImages20{ | |||
width: 687rpx; | |||
height: 83rpx; | |||
margin: 0 auto; | |||
margin-top: 42rpx; | |||
} | |||
.shareSelect{ | |||
width: 96rpx; | |||
height: 138rpx; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
padding-top: 75rpx; | |||
padding-bottom: 85rpx; | |||
position: relative; | |||
margin: 0 auto; | |||
} | |||
.newImages21{ | |||
width: 96rpx; | |||
height: 138rpx; | |||
} | |||
.shareBtn2{ | |||
position: absolute; | |||
left: 0; | |||
top: 42%; | |||
transform: translateY(-50%); | |||
margin: 0; | |||
padding: 0; | |||
opacity: 0; | |||
} |
@@ -0,0 +1,84 @@ | |||
// pages/prizeDetail/prizeDetail.js | |||
const app = getApp() | |||
Page({ | |||
/** | |||
* 页面的初始数据 | |||
*/ | |||
data: { | |||
imgUrl: app.globalData.urlStatic,//图片路径 | |||
nums:1, | |||
heightList:[ | |||
566, | |||
592, | |||
602, | |||
592, | |||
212, | |||
405, | |||
387, | |||
467, | |||
315, | |||
512, | |||
545 | |||
] | |||
}, | |||
/** | |||
* 生命周期函数--监听页面加载 | |||
*/ | |||
onLoad: function (options) { | |||
this.setData({ | |||
nums: options.num ? options.num :1 | |||
}) | |||
app.globalData.nowPage = 3; | |||
}, | |||
/** | |||
* 生命周期函数--监听页面初次渲染完成 | |||
*/ | |||
onReady: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面显示 | |||
*/ | |||
onShow: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面隐藏 | |||
*/ | |||
onHide: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面卸载 | |||
*/ | |||
onUnload: function () { | |||
}, | |||
/** | |||
* 页面相关事件处理函数--监听用户下拉动作 | |||
*/ | |||
onPullDownRefresh: function () { | |||
}, | |||
/** | |||
* 页面上拉触底事件的处理函数 | |||
*/ | |||
onReachBottom: function () { | |||
}, | |||
/** | |||
* 用户点击右上角分享 | |||
*/ | |||
onShareAppMessage: function () { | |||
} | |||
}) |
@@ -0,0 +1,6 @@ | |||
{ | |||
"navigationBarTitleText": "奖品详情", | |||
"usingComponents": { | |||
"tabBar": "../component/tabBar/index" | |||
} | |||
} |
@@ -0,0 +1,7 @@ | |||
<!--pages/prizeDetail/prizeDetail.wxml--> | |||
<view class="all"> | |||
<view class="main"> | |||
<image style="width:750rpx;height:{{heightList[nums-1]}}rpx;" wx:for="{{10}}" wx:key="index" src="{{imgUrl+'/prizeDetail/'+nums+'/'+(index+1)+'.png'}}"></image> | |||
</view> | |||
<tabBar></tabBar> | |||
</view> |
@@ -0,0 +1,5 @@ | |||
/* pages/prizeDetail/prizeDetail.wxss */ | |||
.main{ | |||
height: calc(100vh - 150rpx); | |||
overflow: auto; | |||
} |
@@ -68,5 +68,11 @@ Page({ | |||
wx.navigateBack({ | |||
delta:1 | |||
}) | |||
}, | |||
lookDetail:function(e){ | |||
var num = e.currentTarget.dataset.num; | |||
wx.navigateTo({ | |||
url: '/pages/prizeDetail/prizeDetail?num=' + num, | |||
}) | |||
} | |||
}) |
@@ -6,48 +6,79 @@ | |||
</view> | |||
<view class="thirdAward" style="margin-top:0;">一等奖</view> | |||
<view class="firstPrize"> | |||
<image class="firstPrizePic" src="{{imgUrl+'/newPrize/1.png'}}"></image> | |||
<image class="firstPrizePic" bindtap="lookDetail" data-num="1" src="{{imgUrl+'/newPrize/1.png'}}"></image> | |||
<view class="firstPrizeText">头等舱机票</view> | |||
<view class="priceText">¥4999</view> | |||
</view> | |||
<view class="thirdAward">二等奖</view> | |||
<view class="ticketGroup"> | |||
<image class="prizeTicketPic" src="{{imgUrl+'/newPrize/2.png'}}"></image> | |||
<image class="prizeTicketPic" style="width:147rpx;height:166rpx;" src="{{imgUrl+'/newPrize/3.png'}}"></image> | |||
<image class="prizeTicketPic" style="width:191rpx;height:131rpx;" src="{{imgUrl+'/newPrize/4.png'}}"></image> | |||
<image class="prizeTicketPic" bindtap="lookDetail" data-num="2" src="{{imgUrl+'/newPrize/2.png'}}"></image> | |||
<image class="prizeTicketPic" bindtap="lookDetail" data-num="3" style="width:147rpx;height:166rpx;" src="{{imgUrl+'/newPrize/3.png'}}"></image> | |||
<image class="prizeTicketPic" bindtap="lookDetail" data-num="4" style="width:191rpx;height:131rpx;" src="{{imgUrl+'/newPrize/4.png'}}"></image> | |||
</view> | |||
<view class="prizeTicket"> | |||
<view class="prizeTicketName" style="width:162rpx;">小米扫地机器人</view> | |||
<view class="prizeTicketName" style="width:167rpx;">索尼无线蓝牙耳机</view> | |||
<view class="prizeTicketName" style="width:191rpx;">美的烤箱</view> | |||
<view class="prizeTicketName" style="width:162rpx;"> | |||
米家扫拖一体机器人家用吸尘器 | |||
<view class="priceText">¥1799</view> | |||
</view> | |||
<view class="prizeTicketName" style="width:167rpx;"> | |||
Sony/索尼 WI-H700入耳式无线蓝牙耳机 | |||
<view class="priceText">¥1399</view> | |||
</view> | |||
<view class="prizeTicketName" style="width:191rpx;"> | |||
美的(Midea)电烤箱多功能全自动32升大容量 | |||
<view class="priceText">¥1089</view> | |||
</view> | |||
</view> | |||
<view class="thirdAward">三等奖</view> | |||
<view class="thirdAwardGroup"> | |||
<view class="threeFrame" style="margin-right:40rpx;"> | |||
<image class="three1" src="{{imgUrl+'/newPrize/5.png'}}"></image> | |||
<view class="threeText">200元油卡</view> | |||
<image class="three1" bindtap="lookDetail" data-num="5" src="{{imgUrl+'/newPrize/5.png'}}"></image> | |||
<view class="threeText"> | |||
中国石化加油卡 | |||
<view class="priceText">¥200</view> | |||
</view> | |||
</view> | |||
<view class="threeFrame"> | |||
<image class="three2" src="{{imgUrl+'/newPrize/6.png'}}"></image> | |||
<view class="threeText">100元京东E卡</view> | |||
<image class="three2" bindtap="lookDetail" data-num="6" src="{{imgUrl+'/newPrize/6.png'}}"></image> | |||
<view class="threeText"> | |||
京东E卡经典卡 | |||
<view class="priceText">¥100</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="thirdAward">入门奖</view> | |||
<view class="introductionGroup"> | |||
<view class="introduction" style="padding-right:51rpx;"> | |||
<image class="introductionPic" style="width:168rpx;height:107rpx;" src="{{imgUrl+'/newPrize/7.png'}}"></image> | |||
<view class="introductionText" style="width:168rpx;">50元京东E卡</view> | |||
<image class="introductionPic" bindtap="lookDetail" data-num="7" style="width:168rpx;height:107rpx;" src="{{imgUrl+'/newPrize/7.png'}}"></image> | |||
<view class="introductionText" style="width:168rpx;"> | |||
京东E卡经典卡 | |||
<view class="priceText">¥50</view> | |||
</view> | |||
</view><view class="introduction" style="padding-right:36rpx;"> | |||
<image class="introductionPic" style="width:194rpx;height:106rpx;" src="{{imgUrl+'/newPrize/8.png'}}"></image> | |||
<view class="introductionText" style="width:194rpx;">网易云音乐月卡一张</view> | |||
<image class="introductionPic" bindtap="lookDetail" data-num="8" style="width:194rpx;height:106rpx;" src="{{imgUrl+'/newPrize/8.png'}}"></image> | |||
<view class="introductionText" style="width:194rpx;"> | |||
网易云音乐黑胶VIP会员一个月月卡 | |||
<view class="priceText">¥15</view> | |||
</view> | |||
</view><view class="introduction"> | |||
<image class="introductionPic" style="width:195rpx;height:107rpx;" src="{{imgUrl+'/newPrize/9.png'}}"></image> | |||
<view class="introductionText" style="width:195rpx;">爱奇艺月卡一张</view> | |||
<image class="introductionPic" bindtap="lookDetail" data-num="9" style="width:195rpx;height:107rpx;" src="{{imgUrl+'/newPrize/9.png'}}"></image> | |||
<view class="introductionText" style="width:195rpx;"> | |||
爱奇艺vip会员1个月黄金会员月卡 | |||
<view class="priceText">¥19.8</view> | |||
</view> | |||
</view><view class="introduction" style="padding-right:30rpx;"> | |||
<image class="introductionPic" style="width:189rpx;height:102rpx;" src="{{imgUrl+'/newPrize/10.png'}}"></image> | |||
<view class="introductionText" style="width:189rpx;">瑞幸咖啡免费券三张</view> | |||
<image class="introductionPic" bindtap="lookDetail" data-num="10" style="width:189rpx;height:102rpx;" src="{{imgUrl+'/newPrize/10.png?v=002'}}"></image> | |||
<view class="introductionText" style="width:189rpx;"> | |||
礼券luckincoffee瑞幸咖啡电子兑换券1张 | |||
<view class="priceText">¥66</view> | |||
</view> | |||
</view><view class="introduction"> | |||
<image class="introductionPic" style="width:194rpx;height:106rpx;" src="{{imgUrl+'/newPrize/11.png'}}"></image> | |||
<view class="introductionText" style="width:194rpx;">腾讯视频月卡一张</view> | |||
<image class="introductionPic" bindtap="lookDetail" data-num="11" style="width:194rpx;height:106rpx;" src="{{imgUrl+'/newPrize/11.png'}}"></image> | |||
<view class="introductionText" style="width:194rpx;"> | |||
腾讯视频VIP会员1个月官方激活码月卡 | |||
<view class="priceText">¥20</view> | |||
</view> | |||
</view><view class="introduction"> | |||
</view> | |||
</view> |
@@ -37,7 +37,7 @@ view{ | |||
} | |||
.prizeTicketName{ | |||
font-size:20rpx; | |||
line-height: 20rpx; | |||
line-height: 24rpx; | |||
font-family:PingFang; | |||
font-weight:400; | |||
color:rgba(35,33,34,1); | |||
@@ -113,7 +113,7 @@ view{ | |||
} | |||
.introductionText{ | |||
font-size:20rpx; | |||
line-height: 20rpx; | |||
line-height: 24rpx; | |||
font-family:PingFang; | |||
font-weight:400; | |||
color:rgba(35,33,34,1); | |||
@@ -154,4 +154,13 @@ view{ | |||
padding-bottom:65rpx; | |||
background-color: white; | |||
width: 750rpx; | |||
} | |||
.priceText{ | |||
text-align: center; | |||
line-height: 24rpx; | |||
font-size:24rpx; | |||
font-family:PingFangSC; | |||
font-weight:600; | |||
color:rgba(53,84,128,1); | |||
margin-top: 16rpx; | |||
} |
@@ -18,6 +18,8 @@ Page({ | |||
}, | |||
isbtn:true,//防重复点击 | |||
maskid:0,//现实的弹窗 | |||
authenticationStatus:false, | |||
authenticationShow:false | |||
}, | |||
/** | |||
* 关闭提示弹窗 | |||
@@ -76,17 +78,28 @@ Page({ | |||
* 海报页 | |||
*/ | |||
getPoster:function(){ | |||
wx.navigateTo({ | |||
url:'../poster/poster' | |||
}) | |||
if (this.data.authenticationStatus) { | |||
wx.navigateTo({ | |||
url: '../poster/poster' | |||
}) | |||
}else{ | |||
this.setData({ | |||
authenticationShow:true | |||
}) | |||
} | |||
}, | |||
getCertificationInfo: function () {//查询认证状态 | |||
app.wxRequest(app.globalData.urlRoot + 'userInfo/getCertificationInfo', {}, res => { | |||
if (res.code == 200 && res.data && res.data.agentDetail) { | |||
this.data.authenticationStatus = true; | |||
} | |||
}, this) | |||
}, | |||
/** | |||
* 生命周期函数--监听页面加载 | |||
*/ | |||
onLoad: function (options) { | |||
app.globalData.nowPage = 2; | |||
}, | |||
/** | |||
@@ -100,7 +113,12 @@ Page({ | |||
* 生命周期函数--监听页面显示 | |||
*/ | |||
onShow: function () { | |||
// app.globalData.certificationState=4; | |||
if (app.globalData.openid) { | |||
this.getCertificationInfo(); | |||
} else { | |||
app.globalData.openidSuccessFuc = this.getCertificationInfo; | |||
} | |||
app.globalData.certificationState=2; | |||
this.setData({maskid: app.globalData.certificationState}) | |||
if(app.globalData.certificationState==1){ | |||
this.setData({titleContent:'尊敬的启辰车主您好'}) | |||
@@ -155,5 +173,13 @@ Page({ | |||
*/ | |||
onShareAppMessage: function () { | |||
return app.sharePack(); | |||
}, | |||
changeAuthenticationShow:function(){ | |||
this.setData({ | |||
authenticationShow: !this.data.authenticationShow | |||
}) | |||
}, | |||
enterMsg: function () {//去补充资料 | |||
console.log("去补充资料"); | |||
} | |||
}) |
@@ -19,5 +19,15 @@ | |||
<image class="closeBtn" src="{{imgUrl+'/star/closebtn.png'}}" bindtap="hiddenTip"></image> | |||
</view> | |||
</view> | |||
<view class="mask" wx:if="{{authenticationShow}}"> | |||
<view class="newImagesGroup"> | |||
<image class="newImages" wx:if="{{maskid==1}}" src="{{imgUrl+'/newImages/34_1.png'}}"></image> | |||
<image class="newImages" wx:if="{{maskid==2}}" src="{{imgUrl+'/newImages/34_2.png'}}"></image> | |||
<image class="newImages" wx:if="{{maskid==3}}" src="{{imgUrl+'/newImages/34_3.png'}}"></image> | |||
<image class="newImages" wx:if="{{maskid==4}}" src="{{imgUrl+'/newImages/34_4.png'}}"></image> | |||
<image class="newImages35" bindtap="changeAuthenticationShow" src="{{imgUrl+'/newImages/35.png'}}"></image> | |||
<image class="newImages33" bindtap="enterMsg" src="{{imgUrl+'/newImages/33.png'}}"></image> | |||
</view> | |||
</view> | |||
</view> | |||
<tabBar></tabBar> |
@@ -107,4 +107,28 @@ | |||
.titleImg{ | |||
width: 560rpx; | |||
height: 77rpx; | |||
} | |||
.newImagesGroup{ | |||
position: relative; | |||
width: 603rpx; | |||
height: 501rpx; | |||
} | |||
.newImages{ | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.newImages33{ | |||
position: absolute; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
bottom: 67rpx; | |||
width: 347rpx; | |||
height: 62rpx; | |||
} | |||
.newImages35{ | |||
position: absolute; | |||
top: -10rpx; | |||
right: -10rpx; | |||
width: 37rpx; | |||
height: 37rpx; | |||
} |
@@ -20,10 +20,17 @@ Page({ | |||
* 显示规则页 | |||
*/ | |||
showRule:function(){ | |||
this.setData({ | |||
maskShow:true, | |||
ruleShow:true | |||
}) | |||
// this.setData({ | |||
// maskShow:true, | |||
// ruleShow:true | |||
// }) | |||
if (app.globalData.entered) { | |||
this.everyDay(); | |||
}else{ | |||
wx.navigateTo({ | |||
url: '/pages/fragmentRule/fragmentRule' | |||
}) | |||
} | |||
}, | |||
/** | |||
* 关闭规则页 | |||
@@ -84,7 +91,7 @@ Page({ | |||
* 生命周期函数--监听页面加载 | |||
*/ | |||
onLoad: function (options) { | |||
app.globalData.nowPage = 2; | |||
// app.wxRequest(app.globalData.urlRoot + "/admin/certificationNoCar/getCertificationNoCarList", { | |||
// adminState: 0, page:1,count:10 | |||
// }, res => { | |||
@@ -114,11 +121,11 @@ Page({ | |||
} | |||
}, | |||
gettime(){ | |||
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationCount", {}, res => { | |||
app.wxRequest(app.globalData.urlRoot + "certificationInfo/getCertificationNum", {}, res => { | |||
console.log(res) | |||
if (res.code == 200) { | |||
this.setData({ | |||
stopNumber: res.data.total | |||
stopNumber: res.data ? res.data.certificationNum : '0000' | |||
}) | |||
if(this.data.stopNumber<10000){ | |||
this.setData({ |
@@ -1,10 +1,13 @@ | |||
<!--pages/star/star.wxml--> | |||
<view id="star" class="showView"> | |||
<view class="home"> | |||
<image class="bg" src="{{imgUrl+'/star/bg.png'}}"></image> | |||
<view class="bgGroup"> | |||
<image class="bg" src="{{imgUrl+'/newImages/31.png'}}"></image> | |||
<image class="starBtn" bindtap="scout" src="{{imgUrl+'/newImages/32.png'}}"></image> | |||
</view> | |||
<image class="logo1" src="{{imgUrl+'/star/logo1.png'}}"></image> | |||
<image class="logo2" src="{{imgUrl+'/star/logo2.png'}}"></image> | |||
<image class="starRule" bindtap="showRule" src="{{imgUrl+'/btns/starRule.png'}}"></image> | |||
<image class="starRule" bindtap="showRule" src="{{imgUrl+'/newImages/25.png'}}"></image> | |||
<!-- <view class="ruleBtn" wx:if="{{!maskShow}}" bindtap="showRule">规则说明</view> --> | |||
<!-- <view class="ruleBtn ruleBtnColor" wx:if="{{maskShow}}" bindtap="showRule">规则说明</view> --> | |||
<view class="propagandaBox"> | |||
@@ -17,10 +20,10 @@ | |||
</view> | |||
<text class="text">人加入星探计划</text> | |||
</view> | |||
<view class="btnBox"> | |||
<!-- <view class="btnBox"> | |||
<image class="starBtn" bindtap="scout" src="{{imgUrl+'/btns/starBtn1.png'}}"></image> | |||
<image class="starBtn" bindtap="everyDay" src="{{imgUrl+'/btns/starBtn2.png'}}"></image> | |||
</view> | |||
</view> --> | |||
</view> | |||
<view class="mask" wx:if="{{maskShow}}"> | |||
<view class="ruleContent"> |
@@ -3,14 +3,12 @@ | |||
.home { | |||
position: relative; | |||
height: 100%; | |||
overflow: hidden; | |||
overflow: auto; | |||
} | |||
.home>.bg { | |||
position: absolute; | |||
bottom: 0; | |||
.bg { | |||
width: 750rpx; | |||
height: 1353rpx; | |||
height: 2814rpx; | |||
} | |||
.home>.logo1 { | |||
@@ -51,7 +49,7 @@ | |||
position: absolute; | |||
width: 100%; | |||
height: 76rpx; | |||
bottom: 457rpx; | |||
top: 820rpx; | |||
left: 0; | |||
display: flex; | |||
justify-content: center; | |||
@@ -170,10 +168,16 @@ | |||
top: 175rpx; | |||
} | |||
.starBtn{ | |||
width: 347rpx; | |||
height: 65rpx; | |||
width: 711rpx; | |||
height: 70rpx; | |||
margin:60rpx auto; | |||
} | |||
.starRuleTitle{ | |||
width: 632rpx; | |||
height: 78rpx; | |||
} | |||
.bgGroup{ | |||
position: relative; | |||
width: 750rpx; | |||
height: 2814rpx; | |||
} |
@@ -0,0 +1,186 @@ | |||
// pages/supplement/supplement.js | |||
const app = getApp() | |||
Page({ | |||
/** | |||
* 页面的初始数据 | |||
*/ | |||
data: { | |||
imgUrl: app.globalData.urlStatic,//图片路径 | |||
agreement: false, | |||
isAgreement: true,//是否同意协议 | |||
jobList:[], | |||
jobValue:0, | |||
provinceArr: [],//省 | |||
provinceValue: 0,//选中的省下标 | |||
storeArr: [],//店铺 | |||
storeValue: 0,//选中的店铺下标 | |||
realname:"", | |||
}, | |||
/** | |||
* 生命周期函数--监听页面加载 | |||
*/ | |||
onLoad: function (options) { | |||
app.globalData.nowPage = 2; | |||
if (app.globalData.openid) { | |||
this.loadFun(); | |||
} else { | |||
app.globalData.openidSuccessFuc = this.loadFun; | |||
} | |||
}, | |||
loadFun:function(){ | |||
this.getJobList(); | |||
this.getUserLocation(); | |||
}, | |||
/** | |||
* 生命周期函数--监听页面初次渲染完成 | |||
*/ | |||
onReady: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面显示 | |||
*/ | |||
onShow: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面隐藏 | |||
*/ | |||
onHide: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面卸载 | |||
*/ | |||
onUnload: function () { | |||
}, | |||
/** | |||
* 页面相关事件处理函数--监听用户下拉动作 | |||
*/ | |||
onPullDownRefresh: function () { | |||
}, | |||
/** | |||
* 页面上拉触底事件的处理函数 | |||
*/ | |||
onReachBottom: function () { | |||
}, | |||
/** | |||
* 用户点击右上角分享 | |||
*/ | |||
onShareAppMessage: function () { | |||
}, | |||
agreementState: function () {//协议 | |||
this.setData({ | |||
isAgreement: !this.data.isAgreement | |||
}) | |||
}, | |||
agreementControl: function () { | |||
this.setData({ | |||
agreement: !this.data.agreement | |||
}) | |||
}, | |||
getJobList:function(){ | |||
app.wxRequest(app.globalData.urlRoot + "userInfo/getJobList", {}, res => { | |||
if(res.code==200){ | |||
this.setData({ | |||
jobList:res.data | |||
}) | |||
} | |||
},this) | |||
}, | |||
jobChange:function(e){ | |||
this.setData({ | |||
jobValue:e.detail.value | |||
}) | |||
}, | |||
getUserLocation: function (e) { | |||
wx.getLocation({ | |||
type: 'gcj02', //wgs84 | |||
success: (res) => { | |||
this.getDistributorList(res.longitude, res.latitude); | |||
}, | |||
fail: (res) => { | |||
this.getDistributorList("", ""); | |||
} | |||
}) | |||
}, | |||
getDistributorList: function (longitude, latitude) {//获取经销商列表 | |||
app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude}, res => { | |||
if (res.code == 200) { | |||
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 | |||
}) | |||
} else { | |||
wx.showToast({ | |||
title: res.msg, | |||
icon: "none" | |||
}) | |||
} | |||
}, 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; | |||
}, | |||
submitMsg: function () { | |||
if(!this.data.realname){ | |||
wx.showToast({ | |||
title: '请输入姓名', | |||
icon:'none' | |||
}) | |||
return; | |||
} | |||
if (!this.data.isAgreement) { | |||
wx.showToast({ | |||
title: '请同意协议', | |||
icon: 'none' | |||
}) | |||
return; | |||
} | |||
var data = { | |||
realName:this.data.realname, | |||
jobId: this.data.jobList[this.data.jobValue].jobId, | |||
jobDetail: this.data.jobList[this.data.jobValue].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'] | |||
} | |||
app.wxRequest(app.globalData.urlRoot + "certificationInfo/submitCertificationInfoData", data,res=>{ | |||
if (res.code == 200) { | |||
wx.navigateBack({ | |||
delta: 1, | |||
}) | |||
}else{ | |||
wx.showToast({ | |||
title: res.msg, | |||
icon:'none' | |||
}) | |||
} | |||
},this,"POST"); | |||
} | |||
}) |
@@ -0,0 +1,7 @@ | |||
{ | |||
"navigationBarTitleText": "东风启辰“星探计划”", | |||
"usingComponents": { | |||
"agreement": "/pages/agreement/agreement", | |||
"tabBar": "../component/tabBar/index" | |||
} | |||
} |
@@ -0,0 +1,51 @@ | |||
<!--pages/supplement/supplement.wxml--> | |||
<view class="all"> | |||
<view class="main"> | |||
<image class="newImages36" src="{{imgUrl+'/newImages/36.png'}}"></image> | |||
<view class="msgFrame"> | |||
<view class="inputGroup"> | |||
<view class="inputTitle">姓名</view> | |||
<input class="inputSty" bindinput="getRealname" placeholder="请输入姓名"></input> | |||
</view> | |||
<view class="inputGroup"> | |||
<view class="inputTitle">当前城市</view> | |||
<picker mode='selector' range="{{provinceArr}}" range-key="province" value="{{provinceValue}}" bindchange="provinceChane"> | |||
<view class="inputSty" style="display:flex;align-items: center;justify-content: space-between;"> | |||
<view>{{provinceArr[provinceValue]['province']}}</view> | |||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||
</view> | |||
</picker> | |||
</view> | |||
<view class="inputGroup"> | |||
<view class="inputTitle">关联专营店</view> | |||
<picker mode='selector' range="{{storeArr}}" range-key="agent_detail" value="{{storeValue}}" bindchange="storeChane"> | |||
<view class="inputSty" style="display:flex;align-items: center;justify-content: space-between;"> | |||
<view>{{storeArr[storeValue]['agent_detail']}}</view> | |||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||
</view> | |||
</picker> | |||
</view> | |||
<view class="inputGroup"> | |||
<view class="inputTitle">职业</view> | |||
<picker mode='selector' range="{{jobList}}" range-key="jobDetail" bindchange="jobChange"> | |||
<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 class="agreementGroup"> | |||
<image class="agreeIcon" bindtap="agreementState" src="{{imgUrl+(isAgreement?'/images/agreeIcon.png?v=003':'/images/disagreeIcon.png?v=002')}}"></image> | |||
<view class="agreementText"> | |||
<image style="width:261rpx;height:23rpx;" src="{{imgUrl+'/images/myCenterAgreenTip.png'}}"></image> | |||
<view bindtap="agreementControl"> | |||
<image style="width:240rpx;height:23rpx;margin-left:3rpx;" src="{{imgUrl+'/images/myCenterAgreen.png'}}"></image> | |||
</view> | |||
</view> | |||
</view> | |||
<image class="newImages37" bindtap="submitMsg" src="{{imgUrl+'/newImages/37.png'}}"></image> | |||
</view> | |||
</view> | |||
<agreement bindmyevent="agreementControl" wx:if="{{agreement}}"></agreement> | |||
<tabBar></tabBar> | |||
</view> |
@@ -0,0 +1,74 @@ | |||
/* pages/supplement/supplement.wxss */ | |||
image{ | |||
display: block; | |||
} | |||
view{ | |||
-webkit-overflow-scrolling: touch; | |||
} | |||
.main{ | |||
height: calc(100vh - 150rpx); | |||
overflow: auto; | |||
position: relative; | |||
} | |||
.newImages36{ | |||
width: 750rpx; | |||
height: 634rpx; | |||
} | |||
.msgFrame{ | |||
padding: 114rpx 35rpx 38rpx; | |||
} | |||
.inputGroup{ | |||
width: 100%; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
margin-bottom: 13rpx; | |||
} | |||
.inputTitle{ | |||
line-height: 24rpx; | |||
font-size:24rpx; | |||
font-family:PingFangSC; | |||
font-weight:400; | |||
color:rgba(35,24,21,1); | |||
} | |||
.inputSty{ | |||
width:522rpx; | |||
height:66rpx; | |||
border: 2rpx solid #B0AEAF; | |||
box-sizing: border-box; | |||
line-height: 64rpx; | |||
font-size:24rpx; | |||
font-family:PingFangSC; | |||
font-weight:300; | |||
border-radius: 20rpx; | |||
padding: 0 10rpx; | |||
} | |||
.selectIcon{ | |||
width: 25rpx; | |||
height: 15rpx; | |||
} | |||
.agreementGroup{ | |||
display: flex; | |||
align-items: center; | |||
margin-top: 15rpx; | |||
} | |||
.agreeIcon{ | |||
width: 29rpx; | |||
height: 28rpx; | |||
margin-right: 17rpx; | |||
} | |||
.agreementText{ | |||
line-height: 24rpx; | |||
font-size:24rpx; | |||
font-family:PingFangSC; | |||
font-weight:300; | |||
color:rgba(156,157,157,1); | |||
display: flex; | |||
align-items: center; | |||
} | |||
.newImages37{ | |||
width: 675rpx; | |||
height: 70rpx; | |||
margin: 0 auto; | |||
margin-top: 60rpx; | |||
} |
@@ -0,0 +1,233 @@ | |||
// pages/userMsg/userMsg.js | |||
const app = getApp() | |||
Component({ | |||
/** | |||
* 组件的属性列表 | |||
*/ | |||
properties: { | |||
}, | |||
/** | |||
* 组件的初始数据 | |||
*/ | |||
data: { | |||
imgUrl: app.globalData.urlStatic,//图片路径 | |||
submitData: { | |||
realName: "", | |||
mobile: "",//电话 | |||
province: "",//省份 | |||
city: "",//城市 | |||
district: "",//地区 | |||
addressDetail: ""//详细 | |||
}, | |||
userData:{ | |||
avatarUrl:"", | |||
nickName:"" | |||
}, | |||
isAddress: false,//是否有地址 | |||
marginT: 0, | |||
}, | |||
attached:function(){ | |||
if (app.globalData.userPhoneType == "ios") { | |||
this.setData({ | |||
marginT: -20 | |||
}) | |||
} | |||
if (app.globalData.openid) { | |||
this.loadFun(); | |||
} else { | |||
app.globalData.openidSuccessFuc = this.loadFun; | |||
} | |||
}, | |||
/** | |||
* 组件的方法列表 | |||
*/ | |||
methods: { | |||
loadFun: function () { | |||
if (app.globalData.userInfoData) { | |||
this.data.userData.avatarUrl = app.globalData.userInfoData.avatarUrl; | |||
this.data.userData.nickName = app.globalData.userInfoData.nickName; | |||
this.setData({ | |||
userData: this.data.userData | |||
}) | |||
} | |||
this.getAddress(); | |||
}, | |||
getAddress: function () {//获取地址 | |||
app.wxRequest(app.globalData.urlRoot + "address/getAddress", {}, res => { | |||
if (res.code == 200) { | |||
if (res.data) { | |||
this.data.isAddress = true; | |||
this.data.submitData.realName = res.data.realName; | |||
this.data.submitData.mobile = res.data.mobile; | |||
this.data.submitData.province = res.data.province; | |||
this.data.submitData.city = res.data.city; | |||
this.data.submitData.district = res.data.district; | |||
this.data.submitData.addressDetail = res.data.addressDetail; | |||
this.setData({ | |||
submitData: this.data.submitData | |||
}) | |||
} | |||
} else { | |||
wx.showToast({ | |||
title: res.msg, | |||
icon: "none" | |||
}) | |||
} | |||
}, this); | |||
}, | |||
addAddress: function () {//添加地址 | |||
app.wxRequest(app.globalData.urlRoot + "address/addAddress", this.data.submitData, res => { | |||
wx.showToast({ | |||
title: res.msg, | |||
}) | |||
if (res.code == 200) { | |||
this.closeXieyi(); | |||
} | |||
}, this, "POST") | |||
}, | |||
updateAddress: function () {//更新地址 | |||
app.wxRequest(app.globalData.urlRoot + "address/updateAddress", this.data.submitData, res => { | |||
wx.showToast({ | |||
title: res.msg, | |||
}) | |||
if (res.code == 200) { | |||
this.closeXieyi(); | |||
} | |||
}, this, "POST"); | |||
}, | |||
addressChange: function (e) {//所在地区发生改变 | |||
this.data.submitData.province = e.detail.value[0]; | |||
this.data.submitData.city = e.detail.value[1]; | |||
this.data.submitData.district = e.detail.value[2]; | |||
this.setData({ | |||
submitData: this.data.submitData | |||
}) | |||
}, | |||
getNickName: function(e) {//获取昵称 | |||
this.data.userData.nickName = e.detail.value; | |||
this.setData({ | |||
userData: this.data.userData | |||
}) | |||
}, | |||
getRealName: function (e) {//获取收货人 | |||
this.data.submitData.realName = e.detail.value; | |||
this.setData({ | |||
submitData: this.data.submitData | |||
}) | |||
}, | |||
getMobile: function (e) {//获取手机号码 | |||
this.data.submitData.mobile = e.detail.value; | |||
this.setData({ | |||
submitData: this.data.submitData | |||
}) | |||
}, | |||
getAddressDetail: function (e) {//获取详细地址 | |||
this.data.submitData.addressDetail = e.detail.value; | |||
this.setData({ | |||
submitData: this.data.submitData | |||
}) | |||
}, | |||
saveUserMsg:function(){ | |||
if (!this.data.submitData.realName) { | |||
wx.showToast({ | |||
title: '请输入收货人', | |||
icon: "none" | |||
}) | |||
return; | |||
} | |||
if (!app.mobileVerify(this.data.submitData.mobile)) { | |||
if (this.data.submitData.mobile) { | |||
wx.showToast({ | |||
title: '请输入正确的电话', | |||
icon: 'none' | |||
}) | |||
} else { | |||
wx.showToast({ | |||
title: '请输入电话', | |||
icon: 'none' | |||
}) | |||
} | |||
return; | |||
} | |||
if (!this.data.submitData.province) { | |||
wx.showToast({ | |||
title: '请选择所在地区', | |||
icon: 'none' | |||
}) | |||
return; | |||
} | |||
if (!this.data.submitData.addressDetail) { | |||
wx.showToast({ | |||
title: '请输入详细地址', | |||
icon: "none" | |||
}) | |||
return; | |||
} | |||
wx.showLoading({ | |||
title: '保存中', | |||
mask: true | |||
}) | |||
app.wxRequest(app.globalData.urlRoot + "userInfo/updateUserInfo", this.data.userData, res => { | |||
if (res.code == 200) { | |||
app.globalData.userInfoData.avatarUrl = this.data.userData.avatarUrl; | |||
app.globalData.userInfoData.nickName = this.data.userData.nickName; | |||
var userInfoData = wx.getStorageSync("userInfoData"); | |||
userInfoData.avatarUrl = this.data.userData.avatarUrl; | |||
userInfoData.nickName = this.data.userData.nickName; | |||
wx.setStorageSync('userInfoData', userInfoData) | |||
this.submitAddress(); | |||
} | |||
}, this, "POST") | |||
}, | |||
submitAddress: function () {//保存地址 | |||
if (this.data.isAddress) { | |||
this.updateAddress(); | |||
} else { | |||
this.addAddress(); | |||
} | |||
}, | |||
closeXieyi: function () { | |||
this.triggerEvent('address') | |||
}, | |||
changeHeadImg:function(){ | |||
wx.chooseImage({ | |||
count:1, | |||
success:(res)=>{ | |||
wx.showLoading({ | |||
title: '上传中', | |||
mask: true | |||
}) | |||
wx.uploadFile({ | |||
url: app.globalData.urlRoot + "upload/uploadImage", | |||
header: { | |||
"OPENID": app.globalData.openid, | |||
"VERSION": 100 | |||
}, | |||
filePath: res.tempFilePaths[0], | |||
name: "file", | |||
formData:{ | |||
filePath:"avatar" | |||
}, | |||
success: option => { | |||
wx.hideLoading(); | |||
var json = JSON.parse(option.data); | |||
if (json.code==200){ | |||
this.data.userData.avatarUrl = json.data[0].url; | |||
this.setData({ | |||
userData: this.data.userData | |||
}) | |||
}else{ | |||
wx.showToast({ | |||
title: option.msg, | |||
icon: 'none' | |||
}) | |||
} | |||
} | |||
}) | |||
} | |||
}) | |||
} | |||
} | |||
}) |
@@ -0,0 +1,4 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": {} | |||
} |
@@ -0,0 +1,45 @@ | |||
<!--pages/userMsg/userMsg.wxml--> | |||
<view class="all"> | |||
<view class="main"> | |||
<view class="titleText">个人中心</view> | |||
<view class="lineSty"></view> | |||
<image class="closeXieyi" bindtap="closeXieyi" src="{{imgUrl+'/images/closeXieyi.png'}}"></image> | |||
<view class="addressMsg"> | |||
<view class="headGroup"> | |||
<view class="headTitle">头像</view> | |||
<view class="selectGroup"> | |||
<image class="avatarUrl" bindtap="changeHeadImg" src="{{userData.avatarUrl}}"></image> | |||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||
</view> | |||
</view> | |||
<view class="headGroup nickGroup"> | |||
<view class="headTitle">昵称</view> | |||
<view class="selectGroup"> | |||
<input class="nickName" bindinput="getNickName" value="{{userData.nickName}}"></input> | |||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||
</view> | |||
</view> | |||
<view class="msgGroup"> | |||
<view class="msgTitle">收货人:</view> | |||
<input class="msgInput" bindinput="getRealName" value="{{submitData.realName}}"></input> | |||
</view> | |||
<view class="msgGroup"> | |||
<view class="msgTitle">手机号码:</view> | |||
<input class="msgInput" maxlength='11' type="number" bindinput="getMobile" value="{{submitData.mobile}}"></input> | |||
<!-- <button wx:if="{{!phoneInputShow}}" class="msgInput buttonSty" style="width:530rpx;height: 62rpx;margin: 0;padding: 0;min-height: 0;opacity:0;" open-type="getPhoneNumber" bindgetphonenumber="getUserPhone"></button> --> | |||
</view> | |||
<view class="msgGroup"> | |||
<view class="msgTitle">所在地区:</view> | |||
<picker class="pickerSty" mode="region" bindchange="addressChange" value="{{[submitData.province,submitData.city,submitData.district]}}"> | |||
<!-- <picker class="pickerSty" mode="region" bindchange="addressChange"> --> | |||
<view class="msgInput">{{submitData.province+" "+submitData.city+" "+submitData.district}}</view> | |||
</picker> | |||
</view> | |||
<view class="msgGroup addressDetail"> | |||
<view class="msgTitle">详细地址:</view> | |||
<textarea class="msgInput addressTextarea" maxlength="-1" style="margin-top:{{marginT}}rpx;" bindinput="getAddressDetail" value="{{submitData.addressDetail}}"></textarea> | |||
</view> | |||
</view> | |||
<image class="saveAddress" bindtap="saveUserMsg" src="{{imgUrl+'/btns/addressSave.png'}}"></image> | |||
</view> | |||
</view> |
@@ -0,0 +1,131 @@ | |||
/* pages/userMsg/userMsg.wxss */ | |||
.main{ | |||
width: 750rpx; | |||
position: fixed; | |||
left: 0; | |||
top: 0; | |||
height: calc(100vh - 150rpx); | |||
overflow: auto; | |||
background-color: white; | |||
z-index: 99; | |||
} | |||
.titleText{ | |||
width: 682rpx; | |||
margin: 0 auto; | |||
margin-top: 78rpx; | |||
margin-bottom: 28rpx; | |||
line-height: 39rpx; | |||
font-size:39rpx; | |||
font-family:PingFangSC; | |||
font-weight:bold; | |||
color:rgba(0,77,149,1); | |||
} | |||
.lineSty{ | |||
width: 682rpx; | |||
height:2rpx; | |||
background-color: #B6B6B6; | |||
margin: 0 auto; | |||
margin-bottom: 45rpx; | |||
} | |||
.closeXieyi{ | |||
position: absolute; | |||
right: 48rpx; | |||
top: 38rpx; | |||
width: 42rpx; | |||
height: 42rpx; | |||
} | |||
.addressMsg{ | |||
display: flex; | |||
align-items: center; | |||
flex-direction: column; | |||
} | |||
.msgGroup{ | |||
position: relative; | |||
width:697rpx; | |||
min-height:62rpx; | |||
border: 2rpx solid #B1B1B1; | |||
border-radius: 15rpx; | |||
display: flex; | |||
align-items: center; | |||
box-sizing: border-box; | |||
padding: 0 27rpx; | |||
margin-bottom: 40rpx; | |||
} | |||
.msgTitle,.msgInput{ | |||
min-height: 23rpx; | |||
line-height: 23rpx; | |||
font-size:23rpx; | |||
font-family:PingFangSC; | |||
font-weight:600; | |||
color:rgba(35,33,34,1); | |||
} | |||
.msgInput{ | |||
width: 510rpx; | |||
} | |||
.pickerSty{ | |||
height: 62rpx; | |||
display: flex; | |||
align-items: center; | |||
} | |||
.addressDetail{ | |||
padding: 21rpx 26rpx; | |||
height:102rpx; | |||
align-items: flex-start; | |||
margin-bottom: 0; | |||
} | |||
.addressTextarea{ | |||
height: 100%; | |||
} | |||
.saveAddress{ | |||
position: absolute; | |||
left: 50%; | |||
bottom: 45rpx; | |||
transform: translateX(-50%); | |||
width:652rpx; | |||
height:70rpx; | |||
} | |||
.headGroup{ | |||
width: 697rpx; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
padding: 0 18rpx; | |||
padding-bottom: 10rpx; | |||
border-bottom: 1rpx solid #B6B6B6; | |||
box-sizing: border-box; | |||
} | |||
.headTitle{ | |||
line-height: 23rpx; | |||
font-size:23rpx; | |||
font-family:PingFangSC; | |||
font-weight:600; | |||
color:rgba(35,33,34,1); | |||
} | |||
.avatarUrl{ | |||
width:109rpx; | |||
height:109rpx; | |||
border-radius: 50%; | |||
} | |||
.nickGroup{ | |||
height: 119rpx; | |||
margin-bottom:48rpx; | |||
padding-bottom: 0; | |||
} | |||
.nickName{ | |||
width: 500rpx; | |||
line-height: 36rpx; | |||
font-size:36rpx; | |||
font-family:NissanBrand; | |||
font-weight:400; | |||
color:rgba(30,27,28,1); | |||
text-align: right; | |||
} | |||
.selectIcon{ | |||
width: 25rpx; | |||
height: 15rpx; | |||
margin-left: 24rpx; | |||
} | |||
.selectGroup{ | |||
display: flex; | |||
align-items: center; | |||
} |
@@ -0,0 +1,301 @@ | |||
// pages/yuyue/yuyue.js | |||
const app = getApp() | |||
Component({ | |||
/** | |||
* 组件的属性列表 | |||
*/ | |||
properties: { | |||
}, | |||
/** | |||
* 组件的初始数据 | |||
*/ | |||
data: { | |||
imgUrl: app.globalData.urlStatic,//图片路径 | |||
agreement:false, | |||
isAgreement: true,//是否同意协议 | |||
phoneInputShow: false,//是否显示电话输入框 | |||
siteSelect: false,//是否显示位置选择框 | |||
provinceArr: [],//省 | |||
provinceValue: 0,//选中的省下标 | |||
storeArr: [],//店铺 | |||
storeValue: 0,//选中的店铺下标 | |||
verificationCode: '获取验证码',//验证码文案 | |||
sendCode: true, | |||
appointment: true, | |||
subscribeData: { | |||
realname: "",//姓名 | |||
mobile: "",//手机号 | |||
captcha: "",//验证码 | |||
province: "",//省份 | |||
agent_code: "",//经销商编码 | |||
agentDetail: "",//经销商详细信息 | |||
parentOpenid: app.globalData.friendOpenid,//好友openid | |||
} | |||
}, | |||
attached:function(){ | |||
if (app.globalData.openid) { | |||
this.loadFun(); | |||
} else { | |||
app.globalData.openidSuccessFuc = this.loadFun; | |||
} | |||
}, | |||
/** | |||
* 组件的方法列表 | |||
*/ | |||
methods: { | |||
closeXieyi: function () { | |||
this.triggerEvent('yuyue') | |||
}, | |||
getRealname: function (e) {//获取用户输入的姓名 | |||
this.data.subscribeData.realname = e.detail.value; | |||
}, | |||
getMobile: function (e) {//获取用户输入的电话 | |||
this.data.subscribeData.mobile = e.detail.value; | |||
}, | |||
getCaptcha: function (e) {//获取用户输入的验证码 | |||
this.data.subscribeData.captcha = e.detail.value; | |||
}, | |||
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({ | |||
phoneInputShow: true, | |||
subscribeData: this.data.subscribeData | |||
}) | |||
} | |||
}, | |||
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, | |||
provinceValue: res.data.nearData.provinceIndex, | |||
storeValue: res.data.nearData.cityIndex | |||
}) | |||
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, | |||
icon: "none" | |||
}) | |||
} | |||
}, 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) { | |||
wx.showToast({ | |||
title: '请输入正确的电话', | |||
icon: 'none' | |||
}) | |||
} else { | |||
wx.showToast({ | |||
title: '请输入电话', | |||
icon: 'none' | |||
}) | |||
} | |||
return; | |||
} | |||
if (!this.data.sendCode) { | |||
return; | |||
} | |||
this.data.sendCode = false; | |||
app.wxRequest(app.globalData.urlRoot + "captcha/sendCaptcha", { mobile: this.data.subscribeData.mobile }, res => { | |||
if (res.code == 200) { | |||
this.countDown(); | |||
wx.showToast({ | |||
title: '验证码获取成功', | |||
icon: "none" | |||
}) | |||
this.setData({ | |||
verificationCode: 60 | |||
}) | |||
} else { | |||
this.data.sendCode = true; | |||
wx.showToast({ | |||
title: res.msg, | |||
icon: "none" | |||
}) | |||
} | |||
}, this) | |||
}, | |||
countDown: function () {//倒计时 | |||
setTimeout(() => { | |||
this.setData({ | |||
verificationCode: this.data.verificationCode - 1 | |||
}) | |||
if (this.data.verificationCode > 0) { | |||
this.countDown(); | |||
} else { | |||
this.setData({ | |||
verificationCode: "获取验证码" | |||
}) | |||
this.data.sendCode = true; | |||
} | |||
}, 1000); | |||
}, | |||
subscribeFun: function (e) {//预约鉴赏 | |||
if (!this.data.subscribeData.realname) { | |||
wx.showToast({ | |||
title: '请输入姓名', | |||
icon: "none" | |||
}) | |||
return; | |||
} | |||
if (!this.data.subscribeData.mobile) { | |||
wx.showToast({ | |||
title: '请输入电话', | |||
icon: "none" | |||
}) | |||
return; | |||
} | |||
if (!this.data.subscribeData.captcha) { | |||
wx.showToast({ | |||
title: '请输入验证码', | |||
icon: "none" | |||
}) | |||
return; | |||
} | |||
if (!this.data.isAgreement) { | |||
wx.showToast({ | |||
title: '请同意协议', | |||
icon: 'none' | |||
}) | |||
return; | |||
} | |||
if (!this.data.appointment) { | |||
return; | |||
} | |||
this.data.appointment = false; | |||
app.wxRequest(app.globalData.urlRoot + "userInfo/submitOrderInfo", this.data.subscribeData, res => { | |||
this.data.appointment = true; | |||
if (res.code == 200) { | |||
wx.showToast({ | |||
title: '预约成功' | |||
}) | |||
this.data.subscribeData.realname = ""; | |||
this.data.subscribeData.captcha = ""; | |||
this.setData({ | |||
subscribeData: this.data.subscribeData, | |||
verificationCode: '获取验证码', | |||
}) | |||
this.setData({ | |||
siteSelect: false | |||
}) | |||
// this.setData({ | |||
// isRegister: true | |||
// }) | |||
// app.globalData.isRegister = true; | |||
app.globalData.userMobile = this.data.subscribeData.mobile; | |||
} else { | |||
wx.showToast({ | |||
title: res.msg, | |||
icon: "none" | |||
}) | |||
} | |||
}, this, "POST") | |||
}, | |||
getUserPhone: function (e) {//获取用户手机号 | |||
this.setData({ | |||
phoneInputShow: true | |||
}) | |||
if (e.detail.errMsg == 'getPhoneNumber:ok') { | |||
app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | |||
if (res.code == 200) { | |||
if (res.data && res.data.decodeData) { | |||
this.data.subscribeData.mobile = res.data.decodeData.phoneNumber; | |||
this.setData({ | |||
subscribeData: this.data.subscribeData | |||
}) | |||
} | |||
} else { | |||
wx.showToast({ | |||
title: res.msg, | |||
icon: "none" | |||
}) | |||
} | |||
}, this); | |||
} | |||
}, | |||
agreementState: function () {//协议 | |||
this.setData({ | |||
isAgreement: !this.data.isAgreement | |||
}) | |||
}, | |||
lookMore: function () { | |||
wx.navigateTo({ | |||
url: '/pages/moreType/moreType', | |||
}) | |||
}, | |||
showSite: function () {//显示地址选择框 | |||
if (!this.data.siteSelect) { | |||
if (!app.globalData.myCenterData) { | |||
this.getUserLocation();//获取用户当前位置 | |||
} else { | |||
this.setData({ | |||
siteSelect: true | |||
}) | |||
} | |||
} | |||
}, | |||
getUserLocation: function (e) { | |||
wx.getLocation({ | |||
type: 'gcj02', //wgs84 | |||
success: (res) => { | |||
this.getDistributorList(res.longitude, res.latitude); | |||
}, | |||
fail: (res) => { | |||
this.getDistributorList("", ""); | |||
}, | |||
complete: (res) => { | |||
this.setData({ | |||
siteSelect: true, | |||
}) | |||
} | |||
}) | |||
}, | |||
agreementControl: function () { | |||
this.setData({ | |||
agreement: !this.data.agreement | |||
}) | |||
} | |||
} | |||
}) |
@@ -0,0 +1,6 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": { | |||
"agreement": "/pages/agreement/agreement" | |||
} | |||
} |
@@ -0,0 +1,53 @@ | |||
<!--pages/yuyue/yuyue.wxml--> | |||
<view class="all"> | |||
<view class="main"> | |||
<view class="titleText">预约试驾</view> | |||
<view class="lineSty"></view> | |||
<image class="closeXieyi" bindtap="closeXieyi" src="{{imgUrl+'/images/closeXieyi.png'}}"></image> | |||
<image class="yuyueTop" src="{{imgUrl+'/images/yuyueTop.png'}}"></image> | |||
<view class="inputGroup"> | |||
<input class="inputCode" bindinput="getRealname" value="{{subscribeData.realname}}" placeholder="请输入您的姓名"></input> | |||
</view> | |||
<view class="inputGroup"> | |||
<input class="inputCode" bindinput="getMobile" type="number" value="{{subscribeData.mobile}}" maxlength='11' placeholder="请输入您的联系电话"></input> | |||
<view class="getPhoneFrame" wx:if="{{!phoneInputShow}}"> | |||
<button class="getPhoneBtn" style="width: 652rpx;height: 65rpx;margin: 0;padding: 0;min-height: 0;" open-type="getPhoneNumber" bindgetphonenumber="getUserPhone"></button> | |||
</view> | |||
</view> | |||
<view class="inputGroup"> | |||
<input class="inputCode" bindfocus="showSite" style="width:450rpx;" value="{{subscribeData.captcha}}" bindinput="getCaptcha" placeholder="请输入验证码"></input> | |||
<view class="codeTime" bindtap="getCode">{{verificationCode}}</view> | |||
</view> | |||
<view wx:if="{{siteSelect}}"> | |||
<picker mode='selector' range="{{provinceArr}}" range-key="province" value="{{provinceValue}}" bindchange="provinceChane"> | |||
<view class="selectSiteGroup"> | |||
<text class="selectName">{{provinceArr[provinceValue].province}}</text> | |||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||
</view> | |||
</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 class="agreementGroup"> | |||
<image class="agreeIcon" bindtap="agreementState" src="{{imgUrl+(isAgreement?'/images/agreeIcon.png?v=003':'/images/disagreeIcon.png?v=002')}}"></image> | |||
<view class="agreementText"> | |||
<image style="width:261rpx;height:23rpx;" src="{{imgUrl+'/images/myCenterAgreenTip.png'}}"></image> | |||
<view bindtap="agreementControl"> | |||
<image style="width:240rpx;height:23rpx;margin-left:3rpx;" src="{{imgUrl+'/images/myCenterAgreen.png'}}"></image> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="subscribeBtn" bindtap="subscribeFun"> | |||
<image style="width:100%;height:100%;" src="{{imgUrl+'/btns/myCenterBtn1.png'}}"></image> | |||
<button wx:if="{{userData}}" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="getUserWxMsg" style="width:100%;height:100%;min-height:0;padding:0;margin:0;"></button> | |||
</view> | |||
<view class="subscribeBtn" bindtap="lookMore"> | |||
<image style="width:100%;height:100%;" src="{{imgUrl+'/btns/myCenterBtn2.png'}}"></image> | |||
</view> | |||
</view> | |||
<agreement bindmyevent="agreementControl" wx:if="{{agreement}}"></agreement> | |||
</view> |
@@ -0,0 +1,145 @@ | |||
/* pages/yuyue/yuyue.wxss */ | |||
.closeXieyi,.xieyi{ | |||
display: block; | |||
} | |||
.main{ | |||
width: 750rpx; | |||
position: fixed; | |||
left: 0; | |||
top: 0; | |||
height: calc(100vh - 150rpx); | |||
overflow: auto; | |||
background-color: white; | |||
z-index: 99; | |||
} | |||
.titleText{ | |||
width: 682rpx; | |||
margin: 0 auto; | |||
margin-top: 78rpx; | |||
margin-bottom: 28rpx; | |||
line-height: 39rpx; | |||
font-size:39rpx; | |||
font-family:PingFangSC; | |||
font-weight:bold; | |||
color:rgba(0,77,149,1); | |||
} | |||
.lineSty{ | |||
width: 682rpx; | |||
height:2rpx; | |||
background-color: #B6B6B6; | |||
margin: 0 auto; | |||
margin-bottom: 45rpx; | |||
} | |||
.closeXieyi{ | |||
position: absolute; | |||
right: 48rpx; | |||
top: 38rpx; | |||
width: 42rpx; | |||
height: 42rpx; | |||
} | |||
.xieyiGroup{ | |||
width: 682rpx; | |||
margin: 0 auto; | |||
height: calc(100vh - 342rpx); | |||
overflow: auto; | |||
} | |||
.yuyueTop{ | |||
display: block; | |||
margin: 0 auto; | |||
width: 699rpx; | |||
height: 225rpx; | |||
margin-bottom: 143rpx; | |||
} | |||
.inputGroup{ | |||
width:654rpx; | |||
height:65rpx; | |||
margin: 0 auto; | |||
background-color: white; | |||
border-radius: 20rpx; | |||
box-sizing: border-box; | |||
line-height: 65rpx; | |||
padding: 0 25rpx; | |||
font-size: 24rpx; | |||
margin-top: 18rpx; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
border: 2rpx solid #B4B4B4; | |||
position: relative; | |||
overflow: hidden; | |||
} | |||
.inputCode{ | |||
height: 100%; | |||
width: 100%; | |||
} | |||
.getPhoneFrame{ | |||
position: absolute; | |||
left: 0; | |||
top: 0; | |||
width: 652rpx; | |||
height: 65rpx; | |||
z-index: 2; | |||
} | |||
.getPhoneBtn{ | |||
opacity: 0; | |||
} | |||
.selectSiteGroup{ | |||
border: 2rpx solid #B4B4B4; | |||
margin: 0 auto; | |||
width:652rpx; | |||
height:65rpx; | |||
background-color: white; | |||
border-radius: 20rpx; | |||
box-sizing: border-box; | |||
line-height: 65rpx; | |||
padding: 0 25rpx; | |||
font-size: 24rpx; | |||
margin-top: 18rpx; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
} | |||
.selectIcon{ | |||
width: 25rpx; | |||
height: 15rpx; | |||
} | |||
.subscribeBtn{ | |||
position: relative; | |||
margin: 0 auto; | |||
width:652rpx; | |||
height:70rpx; | |||
margin-top: 18rpx; | |||
margin-bottom: 24rpx; | |||
} | |||
.getUserMsgBtn{ | |||
position: absolute; | |||
left: 0; | |||
top: 0; | |||
width: 100%; | |||
height: 100%; | |||
opacity: 0; | |||
margin: 0; | |||
padding:0; | |||
} | |||
.agreeIcon{ | |||
width: 29rpx; | |||
height: 28rpx; | |||
margin-right: 17rpx; | |||
} | |||
.agreementGroup{ | |||
width: 652rpx; | |||
margin: 0 auto; | |||
display: flex; | |||
align-items: center; | |||
margin-top: 15rpx; | |||
} | |||
.agreementText{ | |||
line-height: 24rpx; | |||
font-size:24rpx; | |||
font-family:PingFangSC; | |||
font-weight:300; | |||
color:rgba(156,157,157,1); | |||
display: flex; | |||
align-items: center; | |||
} |
@@ -128,7 +128,37 @@ | |||
"name": "星探任务", | |||
"pathName": "pages/scout/scout", | |||
"query": "" | |||
} | |||
}, | |||
{ | |||
"id": -1, | |||
"name": "预约试驾", | |||
"pathName": "pages/yuyue/yuyue", | |||
"query": "" | |||
}, | |||
{ | |||
"id": -1, | |||
"name": "修改个人信息", | |||
"pathName": "pages/userMsg/userMsg", | |||
"query": "" | |||
}, | |||
{ | |||
"id": -1, | |||
"name": "下订单", | |||
"pathName": "pages/placingOrder/placingOrder", | |||
"query": "" | |||
}, | |||
{ | |||
"id": -1, | |||
"name": "补充资料", | |||
"pathName": "pages/supplement/supplement", | |||
"query": "" | |||
}, | |||
{ | |||
"id": -1, | |||
"name": "奖品详情", | |||
"pathName": "pages/prizeDetail/prizeDetail", | |||
"query": "" | |||
} | |||
] | |||
} | |||
} |