}) | }) | ||||
this.wxRequest(this.globalData.urlRoot + "wxInfo/getOpenid", { code: code }, res => { | this.wxRequest(this.globalData.urlRoot + "wxInfo/getOpenid", { code: code }, res => { | ||||
wx.hideLoading(); | wx.hideLoading(); | ||||
console.log(res); | |||||
if (res.code == 200) { | if (res.code == 200) { | ||||
wx.setStorageSync("openid", res.data.openid); | wx.setStorageSync("openid", res.data.openid); | ||||
wx.setStorageSync("session_key", res.data.session_key); | wx.setStorageSync("session_key", res.data.session_key); | ||||
method: methods, | method: methods, | ||||
header: { | header: { | ||||
"content-type": "application/x-www-form-urlencoded", | "content-type": "application/x-www-form-urlencoded", | ||||
"OPENID": this.globalData.openid | |||||
"OPENID": this.globalData.openid, | |||||
"VERSION":100 | |||||
}, | }, | ||||
success: function (re) { | success: function (re) { | ||||
// if (re.data.code == -1002) { | // if (re.data.code == -1002) { | ||||
}, this, "POST"); | }, this, "POST"); | ||||
}, | }, | ||||
getMobile: function (encryptedData, iv, callback, thisArg) {//检查登录态是否过期 | getMobile: function (encryptedData, iv, callback, thisArg) {//检查登录态是否过期 | ||||
console.log(encryptedData); | |||||
console.log(iv); | |||||
wx.checkSession({ | wx.checkSession({ | ||||
success: res => { | success: res => { | ||||
this.getMobile2(encryptedData,iv,callback,thisArg); | this.getMobile2(encryptedData,iv,callback,thisArg); |
"pages/receiveRegister/receiveRegister", | "pages/receiveRegister/receiveRegister", | ||||
"pages/address/address", | "pages/address/address", | ||||
"pages/mobileVerification/mobileVerification", | "pages/mobileVerification/mobileVerification", | ||||
"pages/agreement/agreement" | |||||
"pages/agreement/agreement", | |||||
"pages/moreType/moreType" | |||||
], | ], | ||||
"window": { | "window": { | ||||
"backgroundTextStyle": "light", | "backgroundTextStyle": "light", | ||||
"scope.userLocation": { | "scope.userLocation": { | ||||
"desc": "你的位置信息将用于小程序位置接口的效果展示" | "desc": "你的位置信息将用于小程序位置接口的效果展示" | ||||
} | } | ||||
} | |||||
}, | |||||
"navigateToMiniProgramAppIdList":[ | |||||
"wx1d585c8c2fffe589" | |||||
] | |||||
} | } |
<textarea class="msgInput addressTextarea" style="margin-top:{{marginT}}rpx;" bindinput="getAddressDetail" value="{{submitData.addressDetail}}"></textarea> | <textarea class="msgInput addressTextarea" style="margin-top:{{marginT}}rpx;" bindinput="getAddressDetail" value="{{submitData.addressDetail}}"></textarea> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="saveAddress" bindtap="submitAddress">保存</view> | |||||
<image class="saveAddress" bindtap="submitAddress" src="{{imgUrl+'/btns/addressSave.png'}}"></image> | |||||
</view> | </view> | ||||
<tabBar></tabBar> | <tabBar></tabBar> | ||||
</view> | </view> |
position: absolute; | position: absolute; | ||||
left: 50%; | left: 50%; | ||||
bottom: 45rpx; | bottom: 45rpx; | ||||
text-align: center; | |||||
transform: translateX(-50%); | transform: translateX(-50%); | ||||
width:652rpx; | width:652rpx; | ||||
height:70rpx; | height:70rpx; | ||||
background-color: #01538E; | |||||
line-height: 70rpx; | |||||
font-size:30rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:400; | |||||
color:rgba(255,255,255,1); | |||||
border-radius: 15rpx; | |||||
} | } | ||||
.pickerSty{ | .pickerSty{ | ||||
height: 62rpx; | height: 62rpx; |
}, | }, | ||||
newCarConsultation:function(e){//新车咨询 | newCarConsultation:function(e){//新车咨询 | ||||
console.log("小程序跳转"); | console.log("小程序跳转"); | ||||
// wx.navigateToMiniProgram({ | |||||
// appId: 'wx5c64e733d849c3ef', | |||||
// success(res) { | |||||
// // 打开成功 | |||||
// }, | |||||
// complete(res){ | |||||
// console.log(res); | |||||
// } | |||||
// }) | |||||
wx.navigateToMiniProgram({ | |||||
appId:'wx1d585c8c2fffe589', | |||||
path:"/pages/take/takeHome/takeHome", | |||||
envVersion:"trial", | |||||
success(res) { | |||||
// 打开成功 | |||||
}, | |||||
complete(res){ | |||||
console.log(res); | |||||
} | |||||
}) | |||||
} | } | ||||
} | } | ||||
}) | }) |
<view wx:if="{{maskState}}" class="maskGroup" catchtouchmove="ture"> | <view wx:if="{{maskState}}" class="maskGroup" catchtouchmove="ture"> | ||||
<view class="contentGroup"> | <view class="contentGroup"> | ||||
<view class="tipGroup"> | <view class="tipGroup"> | ||||
<image class="serviceIcon2" src="{{imgUrl+'/images/serviceIcon.png'}}"></image> | |||||
<text class="serviceTip">请选择客服</text> | |||||
<image style="width:254rpx;height:45rpx;" src="{{imgUrl+'/images/selectService.png'}}"></image> | |||||
</view> | </view> | ||||
<view class="btnGroup" bindtap="newCarConsultation"> | <view class="btnGroup" bindtap="newCarConsultation"> | ||||
<text class="serviceText">新车咨询</text> | |||||
<image class="serviceArrow" src="{{imgUrl+'/images/serviceArrow.png'}}"></image> | |||||
<image style="width:100%;height:100%;" src="{{imgUrl+'/images/severBtn1.png'}}"></image> | |||||
</view> | </view> | ||||
<view class="btnGroup" style="margin-top:30rpx;"> | <view class="btnGroup" style="margin-top:30rpx;"> | ||||
<text class="serviceText">活动咨询</text> | |||||
<image class="serviceArrow" src="{{imgUrl+'/images/serviceArrow.png'}}"></image> | |||||
<image style="width:100%;height:100%;" src="{{imgUrl+'/images/severBtn2.png'}}"></image> | |||||
<button style="width:100%;" class="serviceBtn" open-type="contact"></button> | <button style="width:100%;" class="serviceBtn" open-type="contact"></button> | ||||
</view> | </view> | ||||
<view style="position:relative;"> | |||||
<image class="closeService" bindtap="closeService" src="{{imgUrl+'/images/closeService.png'}}"></image> | |||||
</view> | |||||
</view> | </view> | ||||
<image class="closeService" bindtap="closeService" src="{{imgUrl+'/images/closeService.png'}}"></image> | |||||
</view> | </view> | ||||
</view> | </view> |
/* pages/component/service/index.wxss */ | /* pages/component/service/index.wxss */ | ||||
.serviceIcon{ | .serviceIcon{ | ||||
display: block; | display: block; | ||||
width: 93rpx; | |||||
height: 94rpx; | |||||
width: 81rpx; | |||||
height: 81rpx; | |||||
position: fixed; | position: fixed; | ||||
top: 385rpx; | top: 385rpx; | ||||
right: 30rpx; | right: 30rpx; | ||||
height: 100%; | height: 100%; | ||||
background-color: rgba(000, 000, 000, 0.8); | background-color: rgba(000, 000, 000, 0.8); | ||||
padding-bottom: 150rpx; | padding-bottom: 150rpx; | ||||
z-index: 99; | |||||
box-sizing: border-box; | |||||
} | } | ||||
.contentGroup{ | .contentGroup{ | ||||
position: absolute; | position: absolute; | ||||
left: 50%; | left: 50%; | ||||
top: 277rpx; | |||||
transform: translateX(-50%); | |||||
top: 50%; | |||||
transform: translate(-50%,-50%); | |||||
width:596rpx; | width:596rpx; | ||||
height:425rpx; | height:425rpx; | ||||
background-color: white; | background-color: white; | ||||
.closeService{ | .closeService{ | ||||
display: block; | display: block; | ||||
position: absolute; | position: absolute; | ||||
left: 50%; | |||||
top: 740rpx; | |||||
transform: translateX(-50%); | |||||
right: -60rpx; | |||||
top: -445rpx; | |||||
width: 73rpx; | width: 73rpx; | ||||
height: 73rpx; | height: 73rpx; | ||||
} | } | ||||
} | } | ||||
.btnGroup{ | .btnGroup{ | ||||
position: relative; | position: relative; | ||||
height: 100rpx; | |||||
width: 530rpx; | |||||
background-color: #005BFF; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
height: 101rpx; | |||||
width: 529rpx; | |||||
margin: 0 auto; | margin: 0 auto; | ||||
border-radius: 10rpx; | |||||
margin-top: 40rpx; | margin-top: 40rpx; | ||||
overflow: hidden; | |||||
} | } | ||||
.serviceText{ | .serviceText{ | ||||
font-size: 40rpx; | font-size: 40rpx; |
imgUrl: app.globalData.urlStatic,//图片路径 | imgUrl: app.globalData.urlStatic,//图片路径 | ||||
friendOpenid:null,//朋友的openid | friendOpenid:null,//朋友的openid | ||||
countNum:0, | countNum:0, | ||||
pageShow:false,//是否显示页面 | |||||
pageShow: false,//是否显示页面 false | |||||
isAppointmentShow: false,//是否显示预约弹框 | |||||
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 | |||||
} | |||||
}, | }, | ||||
/** | /** | ||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad: function (options) { | onLoad: function (options) { | ||||
app.globalData.nowPage = 2; | |||||
if (options.friendOpenid) { | if (options.friendOpenid) { | ||||
this.data.friendOpenid = options.friendOpenid; | this.data.friendOpenid = options.friendOpenid; | ||||
wx.setStorageSync("friendOpenid", options.friendOpenid); | wx.setStorageSync("friendOpenid", options.friendOpenid); | ||||
app.globalData.friendOpenid = options.friendOpenid; | app.globalData.friendOpenid = options.friendOpenid; | ||||
} | } | ||||
if (app.globalData.openid) { | if (app.globalData.openid) { | ||||
this.getOrderInfo(); | |||||
this.loadFun(); | |||||
} else { | } else { | ||||
app.globalData.openidSuccessFuc = this.getOrderInfo; | |||||
app.globalData.openidSuccessFuc = this.loadFun; | |||||
} | } | ||||
}, | }, | ||||
loadFun:function(){ | |||||
this.getOrderInfo(); | |||||
}, | |||||
/** | /** | ||||
* 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
*/ | */ | ||||
this.setData({ | this.setData({ | ||||
pageShow:true | pageShow:true | ||||
}) | }) | ||||
this.getTotalOrder(); | |||||
} | } | ||||
} | } | ||||
},this) | },this) | ||||
}, | }, | ||||
getTotalOrder:function(){//获取预约人数 | |||||
app.wxRequest(app.globalData.urlRoot + "userInfo/getTotalOrder", {}, res => { | |||||
if (res.code == 200) { | |||||
if (res.data) { | |||||
this.setData({ | |||||
countNum: res.data.total | |||||
cutPage:function(){//发现启辰星 | |||||
wx.reLaunch({ | |||||
url: '/pages/index/index', | |||||
}) | |||||
}, | |||||
showAppointment:function(){ | |||||
this.setData({ | |||||
isAppointmentShow:true | |||||
}) | |||||
}, | |||||
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; | |||||
}, | |||||
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); | |||||
} | |||||
}, | |||||
getUserLocation: function (e) { | |||||
wx.getLocation({ | |||||
type: 'gcj02', // | |||||
success: (res) => { | |||||
this.getDistributorList(res.longitude, res.latitude); | |||||
}, | |||||
fail: (res) => { | |||||
this.getDistributorList("", ""); | |||||
}, | |||||
complete: (res) => { | |||||
this.setData({ | |||||
siteSelect: true, | |||||
}) | |||||
} | |||||
}) | |||||
}, | |||||
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 | |||||
}) | |||||
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.indexData.provinceArr = res.data.list; | |||||
app.globalData.indexData.storeArr = res.data.list[res.data.nearData.provinceIndex].children; | |||||
app.globalData.indexData.provinceValue = res.data.nearData.provinceIndex; | |||||
app.globalData.indexData.storeValue = res.data.nearData.cityIndex; | |||||
} else { | |||||
wx.showToast({ | |||||
title: res.msg, | |||||
icon: "none" | |||||
}) | |||||
} | |||||
}, this); | |||||
}, | |||||
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) | }, 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); | |||||
}, | |||||
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; | |||||
}, | |||||
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.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) { | |||||
app.globalData.userMobile = this.data.subscribeData.mobile; | |||||
wx.reLaunch({ | |||||
url: '/pages/index/index', | |||||
}) | |||||
} else { | |||||
wx.showToast({ | |||||
title: res.msg, | |||||
icon: "none" | |||||
}) | |||||
} | |||||
}, this, "POST") | |||||
}, | |||||
getUserWxMsg: function (e) { | |||||
if (e.detail.errMsg == "getUserInfo:ok") { | |||||
this.setData({ | |||||
userData: e.detail.userInfo | |||||
}) | |||||
app.submitUserMsg(e.detail.userInfo.avatarUrl, e.detail.userInfo.nickName); | |||||
} | |||||
}, | |||||
showSite: function () {//显示地址选择框 | |||||
if (!this.data.siteSelect) { | |||||
this.getUserLocation();//获取用户当前位置 | |||||
} | |||||
} | } | ||||
}) | }) |
<!--pages/coupon/coupon.wxml--> | <!--pages/coupon/coupon.wxml--> | ||||
<view class="all" wx:if="{{pageShow}}"> | <view class="all" wx:if="{{pageShow}}"> | ||||
<view class="main"> | <view class="main"> | ||||
<image class="couponBg" src="{{imgUrl+'/images/couponBg.png'}}"></image> | |||||
<view class="prizeFrame"> | |||||
<image class="coupon" src="{{imgUrl+'/images/coupon.png'}}"></image> | |||||
<view class="getPrizeNumGroup"> | |||||
<view class="getPrizeNum">全国已有 {{countNum}}人获得了500元启辰星购车券</view> | |||||
<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> | |||||
</view> | |||||
<view class="msgFrame" wx:if="{{isAppointmentShow}}"> | |||||
<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> | |||||
<view class="getPhoneFrame" wx:if="{{!phoneInputShow}}"> | |||||
<button class="getPhoneBtn" style="width:100%;height:100%;min-height:0;" open-type="getPhoneNumber" bindgetphonenumber="getUserPhone"></button> | |||||
</view> | |||||
</view> | |||||
<view class="codeGroup"> | |||||
<input class="inputCode" bindfocus="showSite" bindinput="getCaptcha" value="{{subscribeData.captcha}}" 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="selectGroup"> | |||||
<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="selectGroup"> | |||||
<text class="selectName">{{storeArr[storeValue].agent_detail}}</text> | |||||
<image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | |||||
</view> | |||||
</picker> | |||||
</view> | |||||
<view class="subscribeBtn" bindtap="subscribeFun"> | |||||
<image style="width:100%;height:100%;" src="{{imgUrl+'/btns/indexMake.png'}}"></image> | |||||
<button wx:if="{{!userData}}" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="getUserWxMsg" style="width:100%;height:100%;min-height:0;"></button> | |||||
</view> | </view> | ||||
<view bindtap="receive" class="receiveBtn">立即领取</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<tabBar></tabBar> | <tabBar></tabBar> |
.couponBg{ | .couponBg{ | ||||
width: 750rpx; | width: 750rpx; | ||||
height: 734rpx; | |||||
height: 1172rpx; | |||||
} | } | ||||
.prizeFrame{ | .prizeFrame{ | ||||
position: absolute; | position: absolute; | ||||
font-weight:bold; | font-weight:bold; | ||||
color:rgba(248,197,109,1); | color:rgba(248,197,109,1); | ||||
text-align: center; | text-align: center; | ||||
} | |||||
.btnGroup{ | |||||
padding: 90rpx 20rpx 40rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-between; | |||||
height: 65rpx; | |||||
} | |||||
.couponBtn{ | |||||
width: 348rpx; | |||||
height: 65rpx; | |||||
} | |||||
.msgFrame{ | |||||
position: fixed; | |||||
bottom: 150rpx; | |||||
left: 0; | |||||
width:750rpx; | |||||
padding: 40rpx 20rpx; | |||||
background-color: rgba(000, 000, 000, 0.5); | |||||
box-sizing: border-box; | |||||
} | |||||
.inputGroup{ | |||||
position: relative; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-between; | |||||
} | |||||
.inputSty{ | |||||
width:347rpx; | |||||
height:70rpx; | |||||
background-color: white; | |||||
border-radius: 20rpx; | |||||
box-sizing: border-box; | |||||
line-height: 55rpx; | |||||
padding: 0 25rpx; | |||||
font-size:24rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:300; | |||||
} | |||||
.getPhoneFrame{ | |||||
position: absolute; | |||||
top:0; | |||||
right:0; | |||||
width:347rpx; | |||||
height:70rpx; | |||||
border-radius: 10rpx; | |||||
overflow: hidden; | |||||
opacity: 0; | |||||
z-index: 2; | |||||
} | |||||
.getPhoneBtn{ | |||||
margin: 0; | |||||
padding: 0; | |||||
height: 100%; | |||||
width: 100%; | |||||
} | |||||
.selectGroup{ | |||||
width:710rpx; | |||||
height:70rpx; | |||||
background-color: white; | |||||
border-radius: 10rpx; | |||||
box-sizing: border-box; | |||||
line-height: 55rpx; | |||||
padding: 0 25rpx; | |||||
margin-top: 18rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-between; | |||||
font-size:24rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:300; | |||||
} | |||||
.selectIcon{ | |||||
width: 25rpx; | |||||
height: 15rpx; | |||||
} | |||||
.codeGroup{ | |||||
width:710rpx; | |||||
height:70rpx; | |||||
background-color: white; | |||||
border-radius: 20rpx; | |||||
box-sizing: border-box; | |||||
line-height: 55rpx; | |||||
padding: 0 25rpx; | |||||
margin-top: 18rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-between; | |||||
font-size:24rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:300; | |||||
} | |||||
.inputCode{ | |||||
height: 100%; | |||||
width: 500rpx; | |||||
} | |||||
.subscribeBtn{ | |||||
position: relative; | |||||
width:710rpx; | |||||
height:70rpx; | |||||
margin-top: 18rpx; | |||||
} | |||||
.getUserMsgBtn{ | |||||
position: absolute; | |||||
top: 0; | |||||
left: 0; | |||||
padding: 0; | |||||
margin: 0; | |||||
opacity: 0; | |||||
} | } |
<!--pages/everyday/everyday.wxml--> | <!--pages/everyday/everyday.wxml--> | ||||
<view id="everyday" class="showView"> | <view id="everyday" class="showView"> | ||||
<image class="showImg" src="{{imgUrl+'/star/everyday/show.jpg'}}"></image> | <image class="showImg" src="{{imgUrl+'/star/everyday/show.jpg'}}"></image> | ||||
<view class="ruleBtn" bindtap="ruleControl" data-state="{{true}}">游戏规则</view> | |||||
<image class="ruleBtn" bindtap="ruleControl" data-state="{{true}}" src="{{imgUrl+'/images/everyDayRuleIcon.png'}}"></image> | |||||
<view class="title">集碎片,攒红包</view> | <view class="title">集碎片,攒红包</view> | ||||
<view class="menuBox"> | <view class="menuBox"> | ||||
<image class="menu" src="{{imgUrl+'/star/everyday/menu.png'}}"></image> | <image class="menu" src="{{imgUrl+'/star/everyday/menu.png'}}"></image> | ||||
<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!=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> | <image class="arrowBtn" wx:if="{{picturlCurrent!=picturlList.length-1}}" style="right:-30rpx;" src="{{imgUrl+'/star/everyday/arrowRightBtn.png'}}" bindtap="nextPicturl"></image> | ||||
</view> | </view> | ||||
<view class="btnBox" wx:if="{{picturlList[picturlCurrent]['awardState']==0}}"> | |||||
<view class="btn" style="margin-right:20rpx;" bindtap="goScout">星探任务</view> | |||||
<view class="btn select" style="margin-left:20rpx;">每日任务</view> | |||||
<!-- <view class="btnBox" wx:if="{{picturlList[picturlCurrent]['awardState']==0}}"> --> | |||||
<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> | ||||
<view class="btnBox" style="width:677rpx;" wx:if="{{picturlList[picturlCurrent]['awardState']==1}}"> | <view class="btnBox" style="width:677rpx;" wx:if="{{picturlList[picturlCurrent]['awardState']==1}}"> | ||||
<view class="receive" bindtap="receive">领取购车红包</view> | <view class="receive" bindtap="receive">领取购车红包</view> | ||||
<view class="mask" wx:if="{{maskShow}}"> | <view class="mask" wx:if="{{maskShow}}"> | ||||
<view class="taskBox" wx:if="{{taskShow}}"> | <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> | <image wx:if="{{!isSign}}" class="gameRuleClose" bindtap="hiddenTask" style="top:-40rpx;right:-40rpx;" src="{{imgUrl+'/star/closebtn.png'}}"></image> | ||||
<view class="title">今日任务</view> | |||||
<!-- <view class="title">今日任务</view> --> | |||||
<image class="everyDayTitle" src="{{imgUrl+'/images/everyDayTitle.png'}}"></image> | |||||
<view class="contentBox"> | <view class="contentBox"> | ||||
<view class="name" wx:if="{{!isSign}}">{{taskName}}</view> | <view class="name" wx:if="{{!isSign}}">{{taskName}}</view> | ||||
<image class="taskImg" src="{{taskImgUrl}}" wx:if="{{!isSign}}"></image> | <image class="taskImg" src="{{taskImgUrl}}" wx:if="{{!isSign}}"></image> | ||||
<view class="signBtnGroup"> | <view class="signBtnGroup"> | ||||
<view class="btn" wx:if="{{isSign}}" bindtap="signIn">签到解锁 | |||||
<view wx:if="{{isSign}}" bindtap="signIn"> | |||||
<image class="everyDaySign" src="{{imgUrl+'/images/everyDaySign.png'}}"></image> | |||||
<button wx:if="{{!userData}}" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="getUserWxMsg" style="width:100%;height:100%;min-height:0;"></button> | <button wx:if="{{!userData}}" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="getUserWxMsg" style="width:100%;height:100%;min-height:0;"></button> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="btn" wx:if="{{!isSign}}">分享再获取一张碎片 | |||||
<view class="btn" wx:if="{{!isSign}}"> | |||||
<image class="everyDaySign" src="{{imgUrl+'/images/everyDayShare.png'}}"></image> | |||||
<button open-type="share" class="shareBtn" style="width:100%;height:100%;margin:0;padding:0;min-height:0;"></button> | <button open-type="share" class="shareBtn" style="width:100%;height:100%;margin:0;padding:0;min-height:0;"></button> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="gameRuleGroup"> | <view class="gameRuleGroup"> | ||||
<image class="gameRuleIcon" src="{{imgUrl+'/images/gameRuleIcon.png'}}"></image> | <image class="gameRuleIcon" src="{{imgUrl+'/images/gameRuleIcon.png'}}"></image> | ||||
<image class="gameRuleClose" src="{{imgUrl+'/star/closebtn.png'}}" bindtap="ruleControl" data-state="{{false}}"></image> | <image class="gameRuleClose" src="{{imgUrl+'/star/closebtn.png'}}" bindtap="ruleControl" data-state="{{false}}"></image> | ||||
<view class="openTask" bindtap="ruleControl" data-state="{{false}}">开启任务</view> | |||||
<view class="openTask" bindtap="ruleControl" data-state="{{false}}"> | |||||
<image style="width:100%;height:100%;" class="everyDayOpen" src="{{imgUrl+'/images/everyDayOpen.png'}}"></image> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="successPop" wx:if="{{tipWindow}}"> | <view class="successPop" wx:if="{{tipWindow}}"> |
} | } | ||||
.ruleBtn { | .ruleBtn { | ||||
right: 0; | |||||
top: 180rpx; | |||||
right: 42rpx; | |||||
top: 219rpx; | |||||
position: fixed; | position: fixed; | ||||
width: 153rpx; | |||||
height: 46rpx; | |||||
line-height: 46rpx; | |||||
font-size: 24rpx; | |||||
color: #fff; | |||||
background-color: rgba(35, 24, 21, 0.63); | |||||
border-top-left-radius: 20rpx; | |||||
border-bottom-left-radius: 20rpx; | |||||
padding-left: 20rpx; | |||||
box-sizing: border-box; | |||||
width: 81rpx; | |||||
height: 81rpx; | |||||
} | } | ||||
.title { | .title { | ||||
} | } | ||||
.btnBox{ | .btnBox{ | ||||
position: relative; | position: relative; | ||||
width: 615rpx; | |||||
height: 49rpx; | |||||
text-align: center; | |||||
width: 710rpx; | |||||
height: 65rpx; | |||||
padding: 0 20rpx; | |||||
padding-top: 22rpx; | padding-top: 22rpx; | ||||
padding-bottom: 38rpx; | padding-bottom: 38rpx; | ||||
margin:0 auto; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-between; | |||||
} | } | ||||
.btnBox>.btn{ | .btnBox>.btn{ | ||||
display: inline-block; | display: inline-block; | ||||
left: 50%; | left: 50%; | ||||
bottom: 100rpx; | bottom: 100rpx; | ||||
transform: translateX(-50%); | transform: translateX(-50%); | ||||
width: 348rpx; | |||||
height: 64rpx; | |||||
background-color: #16538A; | |||||
border-radius: 20rpx; | |||||
text-align: center; | |||||
line-height:64rpx; | |||||
font-size:30rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:400; | |||||
color:rgba(255,255,255,1); | |||||
width: 347rpx; | |||||
height: 62rpx; | |||||
} | } | ||||
.gameRuleGroup{ | .gameRuleGroup{ | ||||
width: 609rpx; | width: 609rpx; | ||||
padding: 0; | padding: 0; | ||||
margin: 0; | margin: 0; | ||||
opacity: 0; | opacity: 0; | ||||
} | |||||
.starBtn{ | |||||
width: 347rpx; | |||||
height: 65rpx; | |||||
} | |||||
.everyDaySign{ | |||||
width: 347rpx; | |||||
height: 62rpx; | |||||
} | |||||
.everyDayTitle{ | |||||
width: 567rpx; | |||||
height: 79rpx; | |||||
} | } |
phoneInputShow: true, | phoneInputShow: true, | ||||
subscribeData: this.data.subscribeData | subscribeData: this.data.subscribeData | ||||
}) | }) | ||||
this.getUserLocation(); | |||||
} | } | ||||
if (app.globalData.isFirstLogin) { | if (app.globalData.isFirstLogin) { | ||||
this.getHomeBanner();//获取banner | this.getHomeBanner();//获取banner | ||||
}) | }) | ||||
}, | }, | ||||
onShow:function(){ | onShow:function(){ | ||||
this.setData({ | |||||
siteSelect: false | |||||
}) | |||||
this.data.subscribeData.parentOpenid = app.globalData.friendOpenid; | this.data.subscribeData.parentOpenid = app.globalData.friendOpenid; | ||||
}, | }, | ||||
provinceChane: function (e) {//选中省 | provinceChane: function (e) {//选中省 | ||||
this.setData({ | this.setData({ | ||||
phoneInputShow: true | phoneInputShow: true | ||||
}) | }) | ||||
if (!app.globalData.indexData.provinceArr) { | |||||
this.getUserLocation();//获取用户当前位置 | |||||
} | |||||
// if (!app.globalData.indexData.provinceArr) { | |||||
// this.getUserLocation();//获取用户当前位置 | |||||
// } | |||||
if (e.detail.errMsg=='getPhoneNumber:ok'){ | if (e.detail.errMsg=='getPhoneNumber:ok'){ | ||||
app.getMobile(e.detail.encryptedData, e.detail.iv,res=>{ | app.getMobile(e.detail.encryptedData, e.detail.iv,res=>{ | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
} | } | ||||
}, | }, | ||||
swiperChange(e){//通过鼠标滑动改变swiper时 | swiperChange(e){//通过鼠标滑动改变swiper时 | ||||
if (e.detail.source == "touch"){ | |||||
this.setData({ | |||||
swiperCurrent: e.detail.current, | |||||
}) | |||||
} | |||||
this.setData({ | |||||
swiperCurrent: e.detail.current, | |||||
}) | |||||
}, | }, | ||||
getDistributorList: function (longitude, latitude){//获取经销商列表 | getDistributorList: function (longitude, latitude){//获取经销商列表 | ||||
app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude}, res => { | app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude}, res => { | ||||
subscribeData: this.data.subscribeData, | subscribeData: this.data.subscribeData, | ||||
verificationCode: '获取验证码', | verificationCode: '获取验证码', | ||||
}) | }) | ||||
this.setData({ | |||||
siteSelect: false | |||||
}) | |||||
// this.setData({ | // this.setData({ | ||||
// isRegister:true | // isRegister:true | ||||
// }) | // }) | ||||
phoneInputShow:true, | phoneInputShow:true, | ||||
subscribeData: this.data.subscribeData | subscribeData: this.data.subscribeData | ||||
}) | }) | ||||
this.getUserLocation(); | |||||
} | } | ||||
} | } | ||||
} else { | } else { | ||||
}) | }) | ||||
app.submitUserMsg(e.detail.userInfo.avatarUrl, e.detail.userInfo.nickName); | app.submitUserMsg(e.detail.userInfo.avatarUrl, e.detail.userInfo.nickName); | ||||
} | } | ||||
}, | |||||
showSite: function () {//显示地址选择框 | |||||
if (!this.data.siteSelect) { | |||||
if (!app.globalData.indexData.provinceArr) { | |||||
this.getUserLocation();//获取用户当前位置 | |||||
}else{ | |||||
this.setData({ | |||||
siteSelect:true | |||||
}) | |||||
} | |||||
} | |||||
}, | |||||
lookMore: function () { | |||||
wx.navigateTo({ | |||||
url: '/pages/moreType/moreType', | |||||
}) | |||||
} | } | ||||
}) | }) |
<view class="all" wx:if="{{mainShow}}"> | <view class="all" wx:if="{{mainShow}}"> | ||||
<view class="main" wx:if="{{isStartAdvertising==0 || !isStartAdvertisingShow}}"> | <view class="main" wx:if="{{isStartAdvertising==0 || !isStartAdvertisingShow}}"> | ||||
<view class="contentFrame"> | <view class="contentFrame"> | ||||
<image style="width:750rpx;height:1506rpx;" src="{{imgUrl+'/images/indexBg.jpg'}}"></image> | |||||
<image style="width:750rpx;height:331rpx;" src="{{imgUrl+'/images/indexText.png'}}"></image> | |||||
<view class="swiperFrame"> | <view class="swiperFrame"> | ||||
<swiper class="swiperSty" autoplay current="{{swiperCurrent}}" bindchange="swiperChange"> | <swiper class="swiperSty" autoplay current="{{swiperCurrent}}" bindchange="swiperChange"> | ||||
<swiper-item wx:for="{{bannerList}}" wx:key="index"><image src="{{item.bannerUrl}}" style="width:100%;" mode="aspectFill"></image></swiper-item> | <swiper-item wx:for="{{bannerList}}" wx:key="index"><image src="{{item.bannerUrl}}" style="width:100%;" mode="aspectFill"></image></swiper-item> | ||||
<image class="rightArrow" bindtap="nextImg" src="{{imgUrl+'/images/rightArrow.png'}}"></image> | <image class="rightArrow" bindtap="nextImg" src="{{imgUrl+'/images/rightArrow.png'}}"></image> | ||||
</view> | </view> | ||||
<view class="bannerBarFrame"> | <view class="bannerBarFrame"> | ||||
<view class="bannerBarGroup"> | |||||
<!-- <view class="bannerBarGroup"> | |||||
<view class="bannerBar1 {{index==swiperCurrent?'bannerBar2':''}}" wx:for="{{bannerList}}" wx:key="index"></view> | <view class="bannerBar1 {{index==swiperCurrent?'bannerBar2':''}}" wx:for="{{bannerList}}" wx:key="index"></view> | ||||
</view> | |||||
</view> --> | |||||
<view class="bannerName">{{bannerList[swiperCurrent].bannerName}}</view> | <view class="bannerName">{{bannerList[swiperCurrent].bannerName}}</view> | ||||
</view> | </view> | ||||
<image class="indexBottom" src="{{imgUrl+'/images/indexBottom.png'}}"></image> | |||||
<view class="videoSty"> | <view class="videoSty"> | ||||
<video id="video" poster="{{videoList.posterUrl}}" src="{{videoList.videoUrl}}"></video> | <video id="video" poster="{{videoList.posterUrl}}" src="{{videoList.videoUrl}}"></video> | ||||
<image wx:if="{{!videoVideoControls}}" class="videoPoster" src="{{videoList.posterUrl}}"></image> | <image wx:if="{{!videoVideoControls}}" class="videoPoster" src="{{videoList.posterUrl}}"></image> | ||||
<image wx:if="{{!videoVideoControls}}" bindtap="hideVideoControls" class="videoPlay" src="{{imgUrl+'/images/videoPlay.png'}}"></image> | <image wx:if="{{!videoVideoControls}}" bindtap="hideVideoControls" class="videoPlay" src="{{imgUrl+'/images/videoPlay.png'}}"></image> | ||||
</view> | </view> | ||||
<view class="interval1"></view> | |||||
<view class="indexBottom2Group"> | <view class="indexBottom2Group"> | ||||
<image class="indexBottom" style="height:204rpx;" src="{{imgUrl+'/images/indexBottom2.png?v=002'}}"></image> | |||||
<view class="lookMore"></view> | |||||
<image class="indexBottom" src="{{imgUrl+'/images/indexBottom2.png?v=002'}}"></image> | |||||
<view class="lookMore" bindtap="lookMore"></view> | |||||
</view> | </view> | ||||
<view class="indexBottom2"></view> | |||||
</view> | </view> | ||||
<!-- <view class="msgFrame" wx:if="{{!isRegister}}"> --> | <!-- <view class="msgFrame" wx:if="{{!isRegister}}"> --> | ||||
<view class="msgFrame"> | <view class="msgFrame"> | ||||
<input class="inputSty" placeholder="姓名" value="{{subscribeData.realname}}" bindinput="getRealname"></input> | <input class="inputSty" placeholder="姓名" value="{{subscribeData.realname}}" bindinput="getRealname"></input> | ||||
<input class="inputSty" bindinput="getMobile" type="number" value="{{subscribeData.mobile}}" maxlength='11' placeholder="电话"></input> | <input class="inputSty" bindinput="getMobile" type="number" value="{{subscribeData.mobile}}" maxlength='11' placeholder="电话"></input> | ||||
<view class="getPhoneFrame" wx:if="{{!phoneInputShow}}"> | <view class="getPhoneFrame" wx:if="{{!phoneInputShow}}"> | ||||
<button class="getPhoneBtn" open-type="getPhoneNumber" bindgetphonenumber="getUserPhone"></button> | |||||
<button class="getPhoneBtn" style="width:100%;height:100%;min-height:0;" open-type="getPhoneNumber" bindgetphonenumber="getUserPhone"></button> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="codeGroup"> | <view class="codeGroup"> | ||||
<input class="inputCode" bindinput="getCaptcha" value="{{subscribeData.captcha}}" placeholder="验证码"></input> | |||||
<input class="inputCode" bindfocus="showSite" bindinput="getCaptcha" value="{{subscribeData.captcha}}" placeholder="验证码"></input> | |||||
<view class="codeTime" bindtap="getCode">{{verificationCode}}</view> | <view class="codeTime" bindtap="getCode">{{verificationCode}}</view> | ||||
</view> | </view> | ||||
<view wx:if="{{siteSelect}}"> | <view wx:if="{{siteSelect}}"> | ||||
</view> | </view> | ||||
</picker> | </picker> | ||||
</view> | </view> | ||||
<view class="subscribeBtn" bindtap="subscribeFun">预约鉴赏 | |||||
<view class="subscribeBtn" bindtap="subscribeFun"> | |||||
<image style="width:100%;height:100%;" src="{{imgUrl+'/btns/indexMake.png'}}"></image> | |||||
<button wx:if="{{!userData}}" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="getUserWxMsg" style="width:100%;height:100%;min-height:0;"></button> | <button wx:if="{{!userData}}" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="getUserWxMsg" style="width:100%;height:100%;min-height:0;"></button> | ||||
</view> | </view> | ||||
</view> | </view> |
bottom: 150rpx; | bottom: 150rpx; | ||||
left: 0; | left: 0; | ||||
width:750rpx; | width:750rpx; | ||||
padding: 0 39rpx; | |||||
padding-top:50rpx; | |||||
padding-bottom: 64rpx; | |||||
padding: 40rpx 20rpx; | |||||
background-color: rgba(000, 000, 000, 0.5); | background-color: rgba(000, 000, 000, 0.5); | ||||
box-sizing: border-box; | box-sizing: border-box; | ||||
} | } | ||||
justify-content: space-between; | justify-content: space-between; | ||||
} | } | ||||
.inputSty{ | .inputSty{ | ||||
width:333rpx; | |||||
height:55rpx; | |||||
width:347rpx; | |||||
height:70rpx; | |||||
background-color: white; | background-color: white; | ||||
border-radius: 10rpx; | |||||
border-radius: 20rpx; | |||||
box-sizing: border-box; | box-sizing: border-box; | ||||
line-height: 55rpx; | line-height: 55rpx; | ||||
padding: 0 25rpx; | padding: 0 25rpx; | ||||
font-size: 20rpx; | |||||
color: black; | |||||
font-size:24rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:300; | |||||
} | } | ||||
.getPhoneFrame{ | .getPhoneFrame{ | ||||
position: absolute; | position: absolute; | ||||
top:0; | top:0; | ||||
right:0; | right:0; | ||||
width:333rpx; | |||||
height:55rpx; | |||||
width:347rpx; | |||||
height:70rpx; | |||||
border-radius: 10rpx; | border-radius: 10rpx; | ||||
overflow: hidden; | overflow: hidden; | ||||
opacity: 0; | opacity: 0; | ||||
width: 100%; | width: 100%; | ||||
} | } | ||||
.selectGroup{ | .selectGroup{ | ||||
width:672rpx; | |||||
height:55rpx; | |||||
width:710rpx; | |||||
height:70rpx; | |||||
background-color: white; | background-color: white; | ||||
border-radius: 10rpx; | border-radius: 10rpx; | ||||
box-sizing: border-box; | box-sizing: border-box; | ||||
line-height: 55rpx; | line-height: 55rpx; | ||||
padding: 0 25rpx; | padding: 0 25rpx; | ||||
font-size: 20rpx; | |||||
margin-top: 18rpx; | margin-top: 18rpx; | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
font-size:24rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:300; | |||||
} | } | ||||
.selectIcon{ | .selectIcon{ | ||||
width: 25rpx; | width: 25rpx; | ||||
} | } | ||||
.subscribeBtn{ | .subscribeBtn{ | ||||
position: relative; | position: relative; | ||||
width:672rpx; | |||||
height:54rpx; | |||||
line-height: 54rpx; | |||||
text-align: center; | |||||
background-color: #345489; | |||||
color: white; | |||||
font-size: 29rpx; | |||||
width:710rpx; | |||||
height:70rpx; | |||||
margin-top: 18rpx; | margin-top: 18rpx; | ||||
border-radius: 10rpx; | |||||
} | } | ||||
.indexBottom{ | .indexBottom{ | ||||
width: 750rpx; | width: 750rpx; | ||||
height: 353rpx; | |||||
height: 205rpx; | |||||
} | } | ||||
.videoSty{ | .videoSty{ | ||||
position: relative; | position: relative; | ||||
width:750rpx; | width:750rpx; | ||||
height:530rpx; | height:530rpx; | ||||
margin: 35rpx 0; | |||||
} | } | ||||
#video{ | #video{ | ||||
width: 100%; | width: 100%; | ||||
.swiperFrame{ | .swiperFrame{ | ||||
position: relative; | position: relative; | ||||
width: 750rpx; | width: 750rpx; | ||||
height: 340rpx; | |||||
height: 530rpx; | |||||
} | } | ||||
.swiperSty{ | .swiperSty{ | ||||
width: 100%; | width: 100%; | ||||
transform: translateY(-50%); | transform: translateY(-50%); | ||||
} | } | ||||
.codeGroup{ | .codeGroup{ | ||||
width:672rpx; | |||||
height:55rpx; | |||||
width:710rpx; | |||||
height:70rpx; | |||||
background-color: white; | background-color: white; | ||||
border-radius: 10rpx; | |||||
border-radius: 20rpx; | |||||
box-sizing: border-box; | box-sizing: border-box; | ||||
line-height: 55rpx; | line-height: 55rpx; | ||||
padding: 0 25rpx; | padding: 0 25rpx; | ||||
font-size: 20rpx; | |||||
margin-top: 18rpx; | margin-top: 18rpx; | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
font-size:24rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:300; | |||||
} | } | ||||
.inputCode{ | .inputCode{ | ||||
height: 100%; | height: 100%; | ||||
width: 80rpx; | width: 80rpx; | ||||
background-color: #212B53; | background-color: #212B53; | ||||
} | } | ||||
.bannerBarFrame{ | |||||
width: 750rpx; | |||||
height: 192rpx; | |||||
background-color: #ececec; | |||||
padding-top: 41rpx; | |||||
box-sizing: border-box; | |||||
} | |||||
.bannerName{ | .bannerName{ | ||||
font-size:28rpx; | |||||
font-family:PingFang; | |||||
font-weight:bold; | |||||
color:rgba(25,47,91,1); | |||||
line-height: 30rpx; | |||||
font-size:30rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:300; | |||||
color:rgba(0,0,0,1); | |||||
text-align: center; | text-align: center; | ||||
line-height: 28rpx; | |||||
margin-top: 21rpx; | |||||
margin-bottom: 40rpx; | |||||
} | } | ||||
.videoPoster{ | .videoPoster{ | ||||
position: absolute; | position: absolute; | ||||
padding: 0; | padding: 0; | ||||
margin: 0; | margin: 0; | ||||
opacity: 0; | opacity: 0; | ||||
} | |||||
.interval1{ | |||||
width: 750rpx; | |||||
height: 58rpx; | |||||
background-color: #ececec; | |||||
} | |||||
.indexBottom2{ | |||||
width:750rpx; | |||||
height:502rpx; | |||||
background-color: #ececec; | |||||
} | } |
imgUrl: app.globalData.urlStatic,//图片路径 | imgUrl: app.globalData.urlStatic,//图片路径 | ||||
ruleShow: true,//是否显示游戏玩法 | ruleShow: true,//是否显示游戏玩法 | ||||
ruleCloseShow: true,//是否显示游戏玩法关闭按钮 | ruleCloseShow: true,//是否显示游戏玩法关闭按钮 | ||||
clawTop:95,//爪子的top值 | |||||
clawLeft: 293,//爪子的left值 | |||||
clawTop:-440,//爪子的top值 | |||||
clawLeft: 268,//爪子的left值 | |||||
clawScale: 1,//爪子的scale值 | clawScale: 1,//爪子的scale值 | ||||
downNum:30,//倒计时时间 | downNum:30,//倒计时时间 | ||||
setInt:null,//倒计时元素 | setInt:null,//倒计时元素 | ||||
top: null, | top: null, | ||||
bottom: null, | bottom: null, | ||||
}, | }, | ||||
btnGroup:{ | |||||
left: false, | |||||
right: false, | |||||
top: false, | |||||
bottom: false, | |||||
claw:false | |||||
}, | |||||
gameSign: null, //游戏结束时需要 | gameSign: null, //游戏结束时需要 | ||||
gameState:false,//游戏状态 | gameState:false,//游戏状态 | ||||
endGameData:null,//中奖数据 | endGameData:null,//中奖数据 | ||||
userData:null, | userData:null, | ||||
scrollNum:0, | scrollNum:0, | ||||
setInt:null, | setInt:null, | ||||
isMore:true | |||||
isMore:true, | |||||
startDown:-1,//游戏开始倒计时 | |||||
clawType:false,//是否正在抓取 | |||||
}, | }, | ||||
/** | /** | ||||
beginGame: function () {//开始游戏 | beginGame: function () {//开始游戏 | ||||
app.wxRequest(app.globalData.urlRoot + "dollGame/beginGame", {}, res => { | app.wxRequest(app.globalData.urlRoot + "dollGame/beginGame", {}, res => { | ||||
if(res.code==200){ | if(res.code==200){ | ||||
this.data.gameSign = res.data.sign; | |||||
this.endGame(); | |||||
if (this.data.gameSign) { | |||||
this.downTimeFun(); | |||||
} | |||||
this.setData({ | |||||
startDown: 3 | |||||
}) | |||||
var setInt2 = setInterval(() => { | |||||
if (this.data.startDown > -1) { | |||||
this.setData({ | |||||
startDown: this.data.startDown -= 1 | |||||
}) | |||||
} else { | |||||
this.setData({ | |||||
startDown: -1 | |||||
}) | |||||
clearInterval(setInt2); | |||||
this.data.gameSign = res.data.sign; | |||||
this.endGame(); | |||||
if (this.data.gameSign) { | |||||
this.downTimeFun(); | |||||
} | |||||
} | |||||
}, 1000); | |||||
}else{ | }else{ | ||||
wx.showToast({ | wx.showToast({ | ||||
title: res.msg, | title: res.msg, | ||||
} | } | ||||
let direction = e.currentTarget.dataset.direction; | let direction = e.currentTarget.dataset.direction; | ||||
if (direction == "L") {//向左 | if (direction == "L") {//向左 | ||||
this.data.btnGroup.left = true; | |||||
this.setData({ | |||||
btnGroup: this.data.btnGroup | |||||
}) | |||||
if (this.data.clawLeft <= 130) { | if (this.data.clawLeft <= 130) { | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
},20); | },20); | ||||
} else if (direction == "R") {//向右 | } else if (direction == "R") {//向右 | ||||
this.data.btnGroup.right = true; | |||||
this.setData({ | |||||
btnGroup: this.data.btnGroup | |||||
}) | |||||
if (this.data.clawLeft >= 445) { | if (this.data.clawLeft >= 445) { | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
}, 20); | }, 20); | ||||
} else if (direction == "T") {//向后 | } else if (direction == "T") {//向后 | ||||
if (this.data.clawScale <= 0.5) { | |||||
this.data.btnGroup.top = true; | |||||
this.setData({ | |||||
btnGroup: this.data.btnGroup | |||||
}) | |||||
if (this.data.clawScale <= 0.8) { | |||||
return; | return; | ||||
} | } | ||||
this.data.setGroup.top = setInterval(() => { | this.data.setGroup.top = setInterval(() => { | ||||
this.setData({ | this.setData({ | ||||
clawScale: this.data.clawScale -= 0.01 | clawScale: this.data.clawScale -= 0.01 | ||||
}) | }) | ||||
if (this.data.clawScale <= 0.5) { | |||||
if (this.data.clawScale <= 0.8) { | |||||
clearInterval(this.data.setGroup.top); | clearInterval(this.data.setGroup.top); | ||||
} | } | ||||
}, 20); | }, 20); | ||||
} else if (direction == "B") {//向前 | } else if (direction == "B") {//向前 | ||||
if (this.data.clawScale >= 1.5) { | |||||
this.data.btnGroup.bottom = true; | |||||
this.setData({ | |||||
btnGroup: this.data.btnGroup | |||||
}) | |||||
if (this.data.clawScale >= 1.2) { | |||||
return; | return; | ||||
} | } | ||||
this.data.setGroup.bottom = setInterval(() => { | this.data.setGroup.bottom = setInterval(() => { | ||||
this.setData({ | this.setData({ | ||||
clawScale: this.data.clawScale += 0.01 | clawScale: this.data.clawScale += 0.01 | ||||
}) | }) | ||||
if (this.data.clawScale >= 1.5) { | |||||
if (this.data.clawScale >= 1.2) { | |||||
clearInterval(this.data.setGroup.bottom); | clearInterval(this.data.setGroup.bottom); | ||||
} | } | ||||
}, 20); | }, 20); | ||||
} | } | ||||
let direction = e.currentTarget.dataset.direction; | let direction = e.currentTarget.dataset.direction; | ||||
if (direction == "L") {//向左 | if (direction == "L") {//向左 | ||||
this.data.btnGroup.left = false; | |||||
this.setData({ | |||||
btnGroup: this.data.btnGroup | |||||
}) | |||||
clearInterval(this.data.setGroup.left); | clearInterval(this.data.setGroup.left); | ||||
} else if (direction == "R") {//向右 | } else if (direction == "R") {//向右 | ||||
this.data.btnGroup.right = false; | |||||
this.setData({ | |||||
btnGroup: this.data.btnGroup | |||||
}) | |||||
clearInterval(this.data.setGroup.right); | clearInterval(this.data.setGroup.right); | ||||
} else if (direction == "T") {//向后 | } else if (direction == "T") {//向后 | ||||
this.data.btnGroup.top = false; | |||||
this.setData({ | |||||
btnGroup: this.data.btnGroup | |||||
}) | |||||
clearInterval(this.data.setGroup.top); | clearInterval(this.data.setGroup.top); | ||||
} else if (direction == "B") {//向前 | } else if (direction == "B") {//向前 | ||||
this.data.btnGroup.bottom = false; | |||||
this.setData({ | |||||
btnGroup: this.data.btnGroup | |||||
}) | |||||
clearInterval(this.data.setGroup.bottom); | clearInterval(this.data.setGroup.bottom); | ||||
} | } | ||||
}, | }, | ||||
getClaw:function(){//抓取 | getClaw:function(){//抓取 | ||||
if (!this.data.gameState){ | |||||
return; | |||||
} | |||||
this.setData({ | this.setData({ | ||||
clawTop: this.data.clawScale > 1 ? 490 - (2 * (this.data.clawScale-1) * 90) : 490 + (2 * (1 - this.data.clawScale) * 90 ) | |||||
clawType:true | |||||
}) | |||||
this.setData({ | |||||
clawTop: this.data.clawScale > 1 ? -100 - (2 * (this.data.clawScale - 1) * 440) : -100 + (2 * (1 - this.data.clawScale) * 440 ) | |||||
}) | }) | ||||
this.closeSetInt(); | this.closeSetInt(); | ||||
setTimeout(() => { | setTimeout(() => { | ||||
this.setData({ | |||||
clawType: false | |||||
}) | |||||
this.data.gameState = false; | this.data.gameState = false; | ||||
if (this.data.endGameData) { | if (this.data.endGameData) { | ||||
this.setData({ | this.setData({ | ||||
clearInterval(this.data.setInt); | clearInterval(this.data.setInt); | ||||
this.setData({ | this.setData({ | ||||
downNum: 30, | downNum: 30, | ||||
clawTop: this.data.clawScale > 1 ? 455 - (2 * (this.data.clawScale - 1) * 90) : 455 + (2 * (1 - this.data.clawScale) * 90) | |||||
clawTop: this.data.clawScale > 1 ? -100 - (2 * (this.data.clawScale - 1) * 440) : -100 + (2 * (1 - this.data.clawScale) * 440) | |||||
}) | }) | ||||
setTimeout(()=>{ | setTimeout(()=>{ | ||||
this.setData({ | this.setData({ | ||||
downNum: 30, | downNum: 30, | ||||
clawTop: 95, | |||||
clawLeft: 293, | |||||
clawTop: -440, | |||||
clawLeft: 268, | |||||
clawScale:1 | clawScale:1 | ||||
}) | }) | ||||
}, 1200); | }, 1200); | ||||
} | } | ||||
}, | }, | ||||
changeScroll:function(){ | changeScroll:function(){ | ||||
this.data.setInt = setInterval(()=>{ | |||||
this.setData({ | |||||
scrollNum: this.data.scrollNum+=1 | |||||
}) | |||||
},30); | |||||
// this.data.setInt = setInterval(()=>{ | |||||
// this.setData({ | |||||
// scrollNum: this.data.scrollNum+=1 | |||||
// }) | |||||
// },30); | |||||
}, | }, | ||||
getMore:function(){ | getMore:function(){ | ||||
if (!this.data.isMore){ | if (!this.data.isMore){ | ||||
} | } | ||||
this.data.configure.page+=1; | this.data.configure.page+=1; | ||||
this.getGameAwardList(); | this.getGameAwardList(); | ||||
}, | |||||
cutPage:function(){//500元待领取 | |||||
wx.redirectTo({ | |||||
url: '/pages/star/star', | |||||
}) | |||||
}, | |||||
openClaw:function(){ | |||||
if (!this.data.gameState) { | |||||
return; | |||||
} | |||||
this.data.btnGroup.claw = true; | |||||
this.setData({ | |||||
btnGroup: this.data.btnGroup | |||||
}) | |||||
setTimeout(()=>{ | |||||
this.data.btnGroup.claw = false; | |||||
this.setData({ | |||||
btnGroup: this.data.btnGroup | |||||
}) | |||||
this.getClaw(); | |||||
},200); | |||||
} | } | ||||
}) | }) |
<view class="all"> | <view class="all"> | ||||
<view class="main"> | <view class="main"> | ||||
<view class="gameMain"> | <view class="gameMain"> | ||||
<image class="gameStarBg" src="{{imgUrl+'/images/gameStarBg.png?v=002'}}"></image> | |||||
<view class="gameTitle">幸运星抓手</view> | |||||
<image class="gameStarBg" src="{{imgUrl+'/images/gameStarBg.png?v=004'}}"></image> | |||||
<!-- <view class="gameTitle">幸运星抓手</view> --> | |||||
<image class="gameTitle" src="{{imgUrl+'/images/luckyTitle.png'}}"></image> | |||||
<view class="downTime">{{'00:'+downNum}}</view> | <view class="downTime">{{'00:'+downNum}}</view> | ||||
<image class="prizeIcon2" src="{{imgUrl+'/images/prizeIcon2.png?v=002'}}"></image> | |||||
<image class="gameClaw" style="top:{{clawTop}}rpx;left:{{clawLeft}}rpx;transform: scale({{clawScale}});" src="{{imgUrl+'/images/gameClaw.png'}}"></image> | |||||
<image class="prizeIcon1" src="{{imgUrl+'/images/prizeIcon1.png?v=002'}}"></image> | |||||
<image class="prizeIcon2" src="{{imgUrl+'/images/prizeIcon2.png?v=003'}}"></image> | |||||
<image class="gameClaw" style="top:{{clawTop}}rpx;left:{{clawLeft}}rpx;transform: scale({{clawScale}});" src="{{imgUrl+'/images/gameClaw'+(clawType?2:1)+'.png'}}"></image> | |||||
<image class="prizeIcon1" src="{{imgUrl+'/images/prizeIcon1.png?v=003'}}"></image> | |||||
<view class="getPrizeTip"> | <view class="getPrizeTip"> | ||||
<view class="prizeTipLine"></view> | <view class="prizeTipLine"></view> | ||||
<view class="prizeTipText">他们都中奖了</view> | <view class="prizeTipText">他们都中奖了</view> | ||||
<view class="scrollMask"></view> | <view class="scrollMask"></view> | ||||
</view> | </view> | ||||
<view class="prizeLookGroup"> | <view class="prizeLookGroup"> | ||||
<view class="prizeLook" bindtap="prizeLook">活动奖品</view> | |||||
<image class="prizeLook" bindtap="prizeLook" src="{{imgUrl+'/btns/luckyPrize.png'}}"></image> | |||||
</view> | </view> | ||||
<view class="gameControlFrame"> | <view class="gameControlFrame"> | ||||
<view class="gameControlGroup"> | <view class="gameControlGroup"> | ||||
<view class="btnControlL" bindtouchstart="startClaw" bindtouchend="endClaw" data-direction="L"></view> | |||||
<view class="btnControlR" bindtouchstart="startClaw" bindtouchend="endClaw" data-direction="R"></view> | |||||
<view class="btnControlT" bindtouchstart="startClaw" bindtouchend="endClaw" data-direction="T"></view> | |||||
<view class="btnControlB" bindtouchstart="startClaw" bindtouchend="endClaw" data-direction="B"></view> | |||||
<view class="btnControlL" bindtouchstart="startClaw" bindtouchend="endClaw" data-direction="L"> | |||||
<image wx:if="{{btnGroup.left}}" class="luckyLeft" src="{{imgUrl+'/btns/luckyLeft.png'}}"></image> | |||||
</view> | |||||
<view class="btnControlR" bindtouchstart="startClaw" bindtouchend="endClaw" data-direction="R"> | |||||
<image wx:if="{{btnGroup.right}}" class="luckyRight" src="{{imgUrl+'/btns/luckyRight.png'}}"></image> | |||||
</view> | |||||
<view class="btnControlT" bindtouchstart="startClaw" bindtouchend="endClaw" data-direction="T"> | |||||
<image wx:if="{{btnGroup.top}}" class="luckyTop" src="{{imgUrl+'/btns/luckyTop.png'}}"></image> | |||||
</view> | |||||
<view class="btnControlB" bindtouchstart="startClaw" bindtouchend="endClaw" data-direction="B"> | |||||
<image wx:if="{{btnGroup.bottom}}" class="luckyBottom" src="{{imgUrl+'/btns/luckyBottom.png'}}"></image> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="gameGetBtn" bindtap="getClaw"></view> | |||||
<view class="gameGetBtn" bindtouchstart="openClaw"> | |||||
<image class="luckyClaw" wx:if="{{btnGroup.claw}}" src="{{imgUrl+'/btns/luckyClaw.png'}}"></image> | |||||
</view> | |||||
</view> | </view> | ||||
<view bindtap="openGameRule" class="gameRuleBtn {{ruleShow?'gameRuleBtn2':''}}">游戏玩法</view> | |||||
<view class="gameTip">500元待领取</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> | |||||
<image bindtap="cutPage" class="gameTip" src="{{imgUrl+'/images/luckyGetMoney.png'}}"></image> | |||||
<view class="gameRuleDesc" wx:if="{{ruleShow}}"> | <view class="gameRuleDesc" wx:if="{{ruleShow}}"> | ||||
<view class="ruleGroup"> | <view class="ruleGroup"> | ||||
<image class="gameRuleIcon" src="{{imgUrl+'/images/gameRuleDesc.png'}}"></image> | <image class="gameRuleIcon" src="{{imgUrl+'/images/gameRuleDesc.png'}}"></image> | ||||
<image class="gameRuleClose" wx:if="{{ruleCloseShow}}" bindtap="closeRule" src="{{imgUrl+'/star/closebtn.png'}}"></image> | <image class="gameRuleClose" wx:if="{{ruleCloseShow}}" bindtap="closeRule" src="{{imgUrl+'/star/closebtn.png'}}"></image> | ||||
<view class="gameStrat" bindtap="gameStart">开始游戏<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="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> | </view> | ||||
</view> | </view> | ||||
<view class="gameRuleDesc" style="background-color:rgba(000,000,000,0)" wx:if="{{false}}"> | <view class="gameRuleDesc" style="background-color:rgba(000,000,000,0)" wx:if="{{false}}"> | ||||
<view class="startRegister" bindtap="userRegister" wx:if="{{pizeTip==3}}">立即注册,探索更多星探好礼</view> | <view class="startRegister" bindtap="userRegister" wx:if="{{pizeTip==3}}">立即注册,探索更多星探好礼</view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="downTimeGroup" wx:if="{{startDown!=-1}}"> | |||||
<image class="luckyNum" src="{{imgUrl+'/images/luckyNum'+startDown+'.png'}}"></image> | |||||
</view> | |||||
</view> | </view> | ||||
<tabBar></tabBar> | <tabBar></tabBar> | ||||
</view> | </view> |
overflow: auto; | overflow: auto; | ||||
} | } | ||||
.gameRuleBtn{ | .gameRuleBtn{ | ||||
width:200rpx; | |||||
height:50rpx; | |||||
background-color:rgba(000,000,000,0.63); | |||||
width:81rpx; | |||||
height:81rpx; | |||||
position: fixed; | position: fixed; | ||||
right: 0; | |||||
top: 164rpx; | |||||
border-top-left-radius: 30rpx; | |||||
border-bottom-left-radius: 30rpx; | |||||
font-size:26rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:400; | |||||
color:rgba(255,255,255,1); | |||||
text-align: center; | |||||
line-height: 50rpx; | |||||
right: 17rpx; | |||||
top: 216rpx; | |||||
} | } | ||||
.gameRuleBtn2{ | .gameRuleBtn2{ | ||||
background-color: #28568B; | background-color: #28568B; | ||||
} | } | ||||
.gameTip{ | .gameTip{ | ||||
width:200rpx; | |||||
height:50rpx; | |||||
background-color:rgba(000,000,000,0.63); | |||||
width:81rpx; | |||||
height:81rpx; | |||||
position: fixed; | position: fixed; | ||||
right: 0; | |||||
top: 240rpx; | |||||
border-top-left-radius: 30rpx; | |||||
border-bottom-left-radius: 30rpx; | |||||
font-size:26rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:400; | |||||
color:rgba(255,255,255,1); | |||||
text-align: center; | |||||
line-height: 50rpx; | |||||
right: 17rpx; | |||||
top: 331rpx; | |||||
} | } | ||||
.gameRuleDesc{ | .gameRuleDesc{ | ||||
position: fixed; | position: fixed; | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
justify-content: center; | justify-content: center; | ||||
z-index: 99; | |||||
} | } | ||||
.ruleGroup{ | .ruleGroup{ | ||||
position: relative; | position: relative; | ||||
.gameStrat{ | .gameStrat{ | ||||
width:277rpx; | width:277rpx; | ||||
height:50rpx; | height:50rpx; | ||||
background-color: #355483; | |||||
font-size:21rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:400; | |||||
color:rgba(255,255,255,1); | |||||
line-height:50rpx; | |||||
text-align: center; | |||||
border-radius: 10rpx; | |||||
position: absolute; | position: absolute; | ||||
bottom: 50rpx; | bottom: 50rpx; | ||||
left: 50%; | left: 50%; | ||||
} | } | ||||
.gameTitle{ | .gameTitle{ | ||||
position: absolute; | position: absolute; | ||||
left: 50%; | |||||
left: 49%; | |||||
top: 0; | top: 0; | ||||
transform: translateX(-50%); | transform: translateX(-50%); | ||||
width: 342rpx; | |||||
height: 70rpx; | |||||
line-height: 70rpx; | |||||
font-size:40rpx; | |||||
font-family:PingFangSC; | |||||
color:rgba(35,33,34,1); | |||||
text-align: center; | |||||
font-weight: bold; | |||||
width: 343rpx; | |||||
height: 97rpx; | |||||
z-index: 10; | |||||
} | } | ||||
.downTime{ | .downTime{ | ||||
position: absolute; | position: absolute; | ||||
} | } | ||||
.gameClaw{ | .gameClaw{ | ||||
position: absolute; | position: absolute; | ||||
left: 293rpx; | |||||
top: 95rpx; | |||||
width: 164rpx; | |||||
height: 259rpx; | |||||
left: 268rpx; | |||||
top: -440rpx; | |||||
width: 224rpx; | |||||
height: 800rpx; | |||||
transition: top 0.8s linear; | transition: top 0.8s linear; | ||||
transform: scale(2); | transform: scale(2); | ||||
transform-origin:50% 0 0; | transform-origin:50% 0 0; | ||||
} | } | ||||
.prizeIcon2{ | .prizeIcon2{ | ||||
position: absolute; | position: absolute; | ||||
left: 115rpx; | |||||
top: 562rpx; | |||||
width: 527rpx; | |||||
height: 169rpx; | |||||
left: 74rpx; | |||||
top: 558rpx; | |||||
width: 561rpx; | |||||
height: 187rpx; | |||||
} | } | ||||
.prizeIcon1{ | .prizeIcon1{ | ||||
position: absolute; | position: absolute; | ||||
left: 64rpx; | |||||
top: 592rpx; | |||||
width: 624rpx; | |||||
height: 265rpx; | |||||
left: 77rpx; | |||||
top: 571rpx; | |||||
width: 673rpx; | |||||
height: 287rpx; | |||||
} | } | ||||
.gameGetBtn{ | .gameGetBtn{ | ||||
position: absolute; | position: absolute; | ||||
} | } | ||||
.gameControlFrame{ | .gameControlFrame{ | ||||
position: absolute; | position: absolute; | ||||
left: 130rpx; | |||||
top: 910rpx; | |||||
left: 120rpx; | |||||
top: 915rpx; | |||||
width: 174rpx; | width: 174rpx; | ||||
height: 106rpx; | height: 106rpx; | ||||
} | } | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
justify-content: center; | justify-content: center; | ||||
z-index: 99; | |||||
} | } | ||||
.successGroup{ | .successGroup{ | ||||
position: relative; | position: relative; | ||||
.prizeLook{ | .prizeLook{ | ||||
width:710rpx; | width:710rpx; | ||||
height:70rpx; | height:70rpx; | ||||
background-color: #355483; | |||||
line-height: 70rpx; | |||||
text-align: center; | |||||
font-size:30rpx; | |||||
font-family:PingFangSC; | |||||
font-weight:400; | |||||
color:rgba(255,255,255,1); | |||||
border-radius: 20rpx; | |||||
} | } | ||||
.shareBtn{ | .shareBtn{ | ||||
position: absolute; | position: absolute; | ||||
.scrollFirstView{ | .scrollFirstView{ | ||||
width:712rpx; | width:712rpx; | ||||
height:72rpx; | height:72rpx; | ||||
} | |||||
.luckyClaw{ | |||||
width: 304rpx; | |||||
height: 80rpx; | |||||
margin-left: -2rpx; | |||||
} | |||||
.luckyLeft{ | |||||
width: 83rpx; | |||||
height: 40rpx; | |||||
margin-left: -4rpx; | |||||
margin-top: -1rpx; | |||||
} | |||||
.luckyRight{ | |||||
width: 83rpx; | |||||
height: 40rpx; | |||||
margin-left: -5rpx; | |||||
margin-top: -2rpx; | |||||
} | |||||
.luckyTop{ | |||||
width: 72rpx; | |||||
height: 47rpx; | |||||
} | |||||
.luckyBottom{ | |||||
width: 73rpx; | |||||
height: 47rpx; | |||||
margin-left: -14rpx; | |||||
margin-top: 6rpx; | |||||
} | |||||
.downTimeGroup{ | |||||
position: fixed; | |||||
left: 0; | |||||
top: 0; | |||||
width: 100%; | |||||
height: calc(100vh - 150rpx); | |||||
background-color: rgba( 000, 000, 000, 0.3); | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
z-index: 99; | |||||
} | |||||
.luckyNum{ | |||||
width: 221rpx; | |||||
height: 131rpx; | |||||
} | } |
// pages/moreType/moreType.js | |||||
Page({ | |||||
/** | |||||
* 页面的初始数据 | |||||
*/ | |||||
data: { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面加载 | |||||
*/ | |||||
onLoad: function (options) { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面初次渲染完成 | |||||
*/ | |||||
onReady: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面显示 | |||||
*/ | |||||
onShow: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面隐藏 | |||||
*/ | |||||
onHide: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面卸载 | |||||
*/ | |||||
onUnload: function () { | |||||
}, | |||||
/** | |||||
* 页面相关事件处理函数--监听用户下拉动作 | |||||
*/ | |||||
onPullDownRefresh: function () { | |||||
}, | |||||
/** | |||||
* 页面上拉触底事件的处理函数 | |||||
*/ | |||||
onReachBottom: function () { | |||||
}, | |||||
/** | |||||
* 用户点击右上角分享 | |||||
*/ | |||||
onShareAppMessage: function () { | |||||
} | |||||
}) |
{ | |||||
"usingComponents": {} | |||||
} |
<!--pages/moreType/moreType.wxml--> | |||||
<web-view src="https://www.venucia.com/v2/carlist"></web-view> |
/* pages/moreType/moreType.wxss */ |
phoneInputShow: true, | phoneInputShow: true, | ||||
subscribeData: this.data.subscribeData | subscribeData: this.data.subscribeData | ||||
}) | }) | ||||
this.getUserLocation(); | |||||
} | } | ||||
if (app.globalData.myCenterData) { | if (app.globalData.myCenterData) { | ||||
this.setData({ | this.setData({ | ||||
* 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
*/ | */ | ||||
onShow: function () { | onShow: function () { | ||||
this.setData({ | |||||
siteSelect:false | |||||
}) | |||||
this.data.subscribeData.parentOpenid = app.globalData.friendOpenid; | this.data.subscribeData.parentOpenid = app.globalData.friendOpenid; | ||||
}, | }, | ||||
subscribeData: this.data.subscribeData, | subscribeData: this.data.subscribeData, | ||||
verificationCode: '获取验证码', | verificationCode: '获取验证码', | ||||
}) | }) | ||||
this.setData({ | |||||
siteSelect: false | |||||
}) | |||||
// this.setData({ | // this.setData({ | ||||
// isRegister: true | // isRegister: true | ||||
// }) | // }) | ||||
phoneInputShow: true, | phoneInputShow: true, | ||||
subscribeData: this.data.subscribeData | subscribeData: this.data.subscribeData | ||||
}) | }) | ||||
this.getUserLocation(); | |||||
} | } | ||||
} | } | ||||
} else { | } else { | ||||
this.setData({ | this.setData({ | ||||
phoneInputShow: true | phoneInputShow: true | ||||
}) | }) | ||||
if (!app.globalData.myCenterData) { | |||||
this.getUserLocation();//获取用户当前位置 | |||||
} | |||||
if (e.detail.errMsg == 'getPhoneNumber:ok') { | if (e.detail.errMsg == 'getPhoneNumber:ok') { | ||||
app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
this.setData({ | this.setData({ | ||||
agreement: !this.data.agreement | agreement: !this.data.agreement | ||||
}) | }) | ||||
}, | |||||
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 | |||||
}) | |||||
} | |||||
} | |||||
} | } | ||||
}) | }) |
<view class="headGroup"> | <view class="headGroup"> | ||||
<image class="defaultHead" src="{{imgUrl+'/images/defaultHead.png'}}"></image> | <image class="defaultHead" src="{{imgUrl+'/images/defaultHead.png'}}"></image> | ||||
</view> | </view> | ||||
<view class="loginBtn">微信一键登录<button bindgetuserinfo="getUserWxMsg" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN"></button></view> | |||||
<view class="loginBtn"><image style="width:307rpx;height:48rpx;" src="{{imgUrl+'/btns/wxLoginIcon.jpg'}}"></image><button bindgetuserinfo="getUserWxMsg" style="width:100%;height:100%;min-height:0;padding:0;margin:0;" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN"></button></view> | |||||
</view> | </view> | ||||
<view class="userMsg" wx:if="{{isLogin}}"> | <view class="userMsg" wx:if="{{isLogin}}"> | ||||
<image class="userMsgBg" src="{{imgUrl+'/images/userMsgBg.png'}}"></image> | <image class="userMsgBg" src="{{imgUrl+'/images/userMsgBg.png'}}"></image> | ||||
</view> | </view> | ||||
<view class="userLevel" wx:if="{{userData.userLevel}}"> | <view class="userLevel" wx:if="{{userData.userLevel}}"> | ||||
<image class="userLevelIcon" src="{{imgUrl+'/images/userLevelIcon'+userData.userLevel+'.png'}}"></image> | <image class="userLevelIcon" src="{{imgUrl+'/images/userLevelIcon'+userData.userLevel+'.png'}}"></image> | ||||
<view class="userLevelTip">您的级别为</view> | |||||
<image class="userLevelTip" src="{{imgUrl+'/images/myCenterTipLevel.jpg'}}"></image> | |||||
<image class="userLevelText" src="{{imgUrl+'/images/userLevelText'+userData.userLevel+'.png'}}"></image> | <image class="userLevelText" src="{{imgUrl+'/images/userLevelText'+userData.userLevel+'.png'}}"></image> | ||||
<view class="lookRule" bindtap="lookRule" data-value="{{true}}">星探规则</view> | |||||
<image class="lookRule" bindtap="lookRule" data-value="{{true}}" src="{{imgUrl+'/btns/myCenterRule.jpg'}}"></image> | |||||
</view> | </view> | ||||
<view class="userLevel" wx:if="{{!userData.userLevel}}"> | <view class="userLevel" wx:if="{{!userData.userLevel}}"> | ||||
<image class="userWaitIcon" src="{{imgUrl+'/images/userWaitIcon.png'}}"></image> | <image class="userWaitIcon" src="{{imgUrl+'/images/userWaitIcon.png'}}"></image> | ||||
<view class="userWaitText">您的星探待激活</view> | <view class="userWaitText">您的星探待激活</view> | ||||
<view class="lookRule" bindtap="lookRule" data-value="{{true}}">星探规则</view> | |||||
<image class="lookRule" bindtap="lookRule" data-value="{{true}}" src="{{imgUrl+'/btns/myCenterRule.jpg'}}"></image> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="funList"> | <view class="funList"> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="inputGroup"> | <view class="inputGroup"> | ||||
<input class="inputCode" style="width:500rpx;" value="{{subscribeData.captcha}}" bindinput="getCaptcha" placeholder="请输入验证码"></input> | |||||
<input class="inputCode" bindfocus="showSite" style="width:450rpx;" value="{{subscribeData.captcha}}" bindinput="getCaptcha" placeholder="请输入验证码"></input> | |||||
<view class="codeTime" bindtap="getCode">{{verificationCode}}</view> | <view class="codeTime" bindtap="getCode">{{verificationCode}}</view> | ||||
</view> | </view> | ||||
<view wx:if="{{siteSelect}}"> | <view wx:if="{{siteSelect}}"> | ||||
</picker> | </picker> | ||||
</view> | </view> | ||||
<view class="agreementGroup"> | <view class="agreementGroup"> | ||||
<image class="agreeIcon" bindtap="agreementState" src="{{imgUrl+(isAgreement?'/images/agreeIcon.png':'/images/disagreeIcon.png')}}"></image> | |||||
<view class="agreementText"><view>我仔细阅读并接受所附的</view><view bindtap="agreementControl">《用户协议与隐私政策》</view></view> | |||||
<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> | ||||
<view class="subscribeBtn" bindtap="subscribeFun">登录/注册 | |||||
<button wx:if="{{userData}}" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="getUserWxMsg" style="width:100%;height:100%;min-height:0;"></button> | |||||
<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> | ||||
<view class="subscribeBtn">查看更多车型</view> | |||||
<view class="subscribeBtn" bindtap="lookMore"> | |||||
<image style="width:100%;height:100%;" src="{{imgUrl+'/btns/myCenterBtn2.png'}}"></image></view> | |||||
</view> | </view> | ||||
<!-- <view class="subscribeGroup" wx:if="{{selectNow==4 && isRegister}}"> | <!-- <view class="subscribeGroup" wx:if="{{selectNow==4 && isRegister}}"> | ||||
<view>已预约</view> | <view>已预约</view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="prizeDesc" style="background-color:'rgba(000,000,000,0.8)';" wx:if="{{ruleShow}}"> | <view class="prizeDesc" style="background-color:'rgba(000,000,000,0.8)';" wx:if="{{ruleShow}}"> | ||||
<view class="ruleImgGroup"> | |||||
<view class="ruleImgGroup" style="overflow: auto;border-radius:20rpx;"> | |||||
<image class="ruleImg" src="{{imgUrl+'/star/xingRule.png?v=002'}}"></image> | |||||
<view class="ruleContent"> | |||||
<image class="starRuleTitle" src="{{imgUrl+'/images/starRuleTitle.png'}}"></image> | |||||
<view class="rule"> | |||||
<image class="ruleImg" src="{{imgUrl+'/images/starRule.png'}}"></image> | |||||
</view> | </view> | ||||
<image bindtap="lookRule" data-value="{{false}}" class="closeDescIcon" src="{{imgUrl+'/images/closeDescIcon.png'}}"></image> | |||||
<image class="closeBtn" src="{{imgUrl+'/star/closebtn.png'}}" bindtap="lookRule" data-value="{{false}}"></image> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> |
position: relative; | position: relative; | ||||
margin: 0 auto; | margin: 0 auto; | ||||
width:307rpx; | width:307rpx; | ||||
height:49rpx; | |||||
background-color: #345486; | |||||
border-radius: 10rpx; | |||||
text-align: center; | |||||
font-size: 25rpx; | |||||
color: white; | |||||
line-height: 49rpx; | |||||
overflow: hidden; | |||||
height:48rpx; | |||||
} | } | ||||
.funList{ | .funList{ | ||||
position: relative; | position: relative; | ||||
height: 60rpx; | height: 60rpx; | ||||
} | } | ||||
.userLevelTip{ | .userLevelTip{ | ||||
font-size: 21rpx; | |||||
margin-top: 32rpx; | margin-top: 32rpx; | ||||
margin-bottom: 11rpx; | margin-bottom: 11rpx; | ||||
width:103rpx; | |||||
height:21rpx; | |||||
} | } | ||||
.userLevelText{ | .userLevelText{ | ||||
width: 352rpx; | width: 352rpx; | ||||
} | } | ||||
.lookRule{ | .lookRule{ | ||||
margin-top: 27rpx; | margin-top: 27rpx; | ||||
width:368rpx; | |||||
width:367rpx; | |||||
height:57rpx; | height:57rpx; | ||||
border-radius: 10rpx; | |||||
background-color: #345486; | |||||
text-align: center; | |||||
line-height: 57rpx; | |||||
font-size: 29rpx; | |||||
color:white; | |||||
} | } | ||||
.userWaitIcon{ | .userWaitIcon{ | ||||
width:48rpx; | width:48rpx; | ||||
} | } | ||||
.inputGroup{ | .inputGroup{ | ||||
width:652rpx; | width:652rpx; | ||||
height:65rpx; | |||||
height:70rpx; | |||||
margin: 0 auto; | margin: 0 auto; | ||||
background-color: white; | background-color: white; | ||||
border-radius: 10rpx; | border-radius: 10rpx; | ||||
box-sizing: border-box; | box-sizing: border-box; | ||||
line-height: 65rpx; | |||||
line-height: 70rpx; | |||||
padding: 0 25rpx; | padding: 0 25rpx; | ||||
font-size: 20rpx; | |||||
font-size: 24rpx; | |||||
margin-top: 18rpx; | margin-top: 18rpx; | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
border: 2rpx solid #B4B4B4; | border: 2rpx solid #B4B4B4; | ||||
margin: 0 auto; | margin: 0 auto; | ||||
width:652rpx; | width:652rpx; | ||||
height:65rpx; | |||||
height:70rpx; | |||||
background-color: white; | background-color: white; | ||||
border-radius: 10rpx; | border-radius: 10rpx; | ||||
box-sizing: border-box; | box-sizing: border-box; | ||||
line-height: 65rpx; | |||||
line-height: 70rpx; | |||||
padding: 0 25rpx; | padding: 0 25rpx; | ||||
font-size: 20rpx; | |||||
font-size: 24rpx; | |||||
margin-top: 18rpx; | margin-top: 18rpx; | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
position: relative; | position: relative; | ||||
margin: 0 auto; | margin: 0 auto; | ||||
width:652rpx; | width:652rpx; | ||||
height:65rpx; | |||||
line-height: 65rpx; | |||||
text-align: center; | |||||
background-color: #345486; | |||||
color: white; | |||||
font-size: 29rpx; | |||||
height:70rpx; | |||||
margin-top: 18rpx; | margin-top: 18rpx; | ||||
border-radius: 10rpx; | |||||
} | } | ||||
.subscribeGroup{ | .subscribeGroup{ | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
flex-direction: column; | flex-direction: column; | ||||
justify-content: center; | justify-content: center; | ||||
padding-bottom: 10rpx; | |||||
height: 670rpx; | |||||
} | } | ||||
.taskGroup,.ranksGroup,.subscribeGroup{ | .taskGroup,.ranksGroup,.subscribeGroup{ | ||||
height: 589rpx; | height: 589rpx; | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
justify-content: center; | justify-content: center; | ||||
padding-bottom: 150rpx; | |||||
box-sizing: border-box; | box-sizing: border-box; | ||||
} | } | ||||
.prizeImgGroup{ | .prizeImgGroup{ | ||||
width: 38rpx; | width: 38rpx; | ||||
height: 37rpx; | height: 37rpx; | ||||
} | } | ||||
.ruleImgGroup{ | |||||
width: 631rpx; | |||||
height: 923rpx; | |||||
position: relative; | |||||
} | |||||
.ruleImg{ | |||||
width: 100%; | |||||
height: 1160rpx; | |||||
border-radius: 20rpx; | |||||
} | |||||
.prizeCustomGroup{ | .prizeCustomGroup{ | ||||
width:453rpx; | width:453rpx; | ||||
height:503rpx; | height:503rpx; | ||||
left: 0; | left: 0; | ||||
top: 0; | top: 0; | ||||
width: 652rpx; | width: 652rpx; | ||||
height: 65rpx; | |||||
height: 70rpx; | |||||
z-index: 2; | z-index: 2; | ||||
} | } | ||||
.getPhoneBtn{ | .getPhoneBtn{ | ||||
color:rgba(156,157,157,1); | color:rgba(156,157,157,1); | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
} | |||||
.ruleContent { | |||||
position: relative; | |||||
width: 632rpx; | |||||
height: 763rpx; | |||||
border-radius: 20rpx; | |||||
background-color: white; | |||||
} | |||||
.starRuleTitle{ | |||||
width: 632rpx; | |||||
height: 78rpx; | |||||
} | |||||
.rule { | |||||
position: relative; | |||||
width: 563rpx; | |||||
height: 586rpx; | |||||
padding: 0 34rpx; | |||||
padding-top: 42rpx; | |||||
padding-bottom: 57rpx; | |||||
overflow: auto; | |||||
} | |||||
.ruleImg{ | |||||
width: 563rpx; | |||||
height: 1009rpx; | |||||
} | |||||
.closeBtn { | |||||
position: absolute; | |||||
height: 40rpx; | |||||
width: 40rpx; | |||||
right:-40rpx; | |||||
top:-40rpx; | |||||
} | } |
this.data.windowH = option.windowHeight; | this.data.windowH = option.windowHeight; | ||||
var countNum = 0; | var countNum = 0; | ||||
wx.getImageInfo({//缓存海报背景 | wx.getImageInfo({//缓存海报背景 | ||||
src: this.data.imgUrl + '/images/tempImg1.jpg', | |||||
src: this.data.imgUrl + '/images/tempImg1.jpg?v=006', | |||||
success: res => { | success: res => { | ||||
this.data.posterBg.push(res.path); | this.data.posterBg.push(res.path); | ||||
countNum += 1; | countNum += 1; | ||||
}) | }) | ||||
} | } | ||||
wx.getImageInfo({//缓存数字背景 | wx.getImageInfo({//缓存数字背景 | ||||
src: this.data.imgUrl + '/images/posterNum.png', | |||||
src: this.data.imgUrl + '/images/posterNum.png?v=004', | |||||
success: res => { | success: res => { | ||||
this.data.numBg = res.path; | this.data.numBg = res.path; | ||||
countNum += 1; | countNum += 1; | ||||
this.posterDrawing(1); | this.posterDrawing(1); | ||||
clearInterval(setInt); | clearInterval(setInt); | ||||
} | } | ||||
}, 50); | |||||
}, 500); | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
onShareAppMessage: function () { | onShareAppMessage: function () { | ||||
return { | return { | ||||
title: '您有一份启辰星专属礼品待领取', | title: '您有一份启辰星专属礼品待领取', | ||||
imageUrl: this.data.imgUrl + "/images/posterShareImg" + (this.data.swiperCurrent+1)+".jpg", | |||||
imageUrl: this.data.imgUrl + "/images/posterShareImg" + (this.data.swiperCurrent+1)+".jpg?v=003", | |||||
path: "/pages/coupon/coupon?friendOpenid=" + app.globalData.openid | path: "/pages/coupon/coupon?friendOpenid=" + app.globalData.openid | ||||
} | } | ||||
}, | }, | ||||
var ctx = this.data.canvasContron;//canvas对象 | var ctx = this.data.canvasContron;//canvas对象 | ||||
var scale = this.data.windowScale;//屏幕缩放比 | var scale = this.data.windowScale;//屏幕缩放比 | ||||
//背景 | //背景 | ||||
ctx.drawImage(this.data.posterBg[e-1], 0, 0, scale * 444, scale * 817);// | |||||
ctx.drawImage(this.data.posterBg[e-1], 0, 0, scale * 750, scale * 1380);// | |||||
ctx.setFillStyle("#FFFFFF"); | ctx.setFillStyle("#FFFFFF"); | ||||
ctx.save(); | ctx.save(); | ||||
ctx.beginPath(); //开始绘制 | ctx.beginPath(); //开始绘制 | ||||
//先画个圆 前两个参数确定了圆心 (x,y) 坐标 第三个参数是圆的半径 四参数是绘图方向 默认是false,即顺时针 | //先画个圆 前两个参数确定了圆心 (x,y) 坐标 第三个参数是圆的半径 四参数是绘图方向 默认是false,即顺时针 | ||||
ctx.arc(scale * 48 / 2 + scale * 49, scale * 48 / 2 + scale * 538, scale * 48 / 2, 0, Math.PI * 2, false); | |||||
ctx.arc(scale * 80 / 2 + scale * 84, scale * 80 / 2 + scale * 908, scale * 80 / 2, 0, Math.PI * 2, false); | |||||
ctx.clip(); //剪切 | ctx.clip(); //剪切 | ||||
ctx.drawImage(this.data.userHead, scale * 49, scale * 538, scale * 48, scale * 48); //头像 | |||||
ctx.drawImage(this.data.userHead, scale * 84, scale * 908, scale * 80, scale * 80); //头像 | |||||
ctx.restore(); //恢复之前保存的绘图上下文 | ctx.restore(); //恢复之前保存的绘图上下文 | ||||
//名称 | //名称 | ||||
ctx.setFontSize(scale * 28); | |||||
ctx.setFontSize(scale * 40); | |||||
ctx.setFillStyle('#FFFFFF'); | ctx.setFillStyle('#FFFFFF'); | ||||
ctx.setTextAlign('left'); | ctx.setTextAlign('left'); | ||||
ctx.fillText(app.globalData.userInfoData ? app.globalData.userInfoData.nickName : "", scale * 102, scale *572); | |||||
ctx.fillText(app.globalData.userInfoData ? app.globalData.userInfoData.nickName : "", scale * 174, scale *960); | |||||
//我是第XXX星探 | //我是第XXX星探 | ||||
ctx.drawImage(this.data.numBg, scale * 50, scale * 598, scale * 333, scale * 74); | |||||
ctx.drawImage(this.data.numBg, scale * 86, scale * 1010, scale * 563, scale * 124); | |||||
//排名数字 | //排名数字 | ||||
ctx.drawImage(this.data.rankNum[0], scale * 168, scale * 602, scale * 32, scale * 40); | |||||
ctx.drawImage(this.data.rankNum[1], scale * 202, scale * 602, scale * 32, scale * 40); | |||||
ctx.drawImage(this.data.rankNum[2], scale * 236, scale * 602, scale * 32, scale * 40); | |||||
ctx.drawImage(this.data.rankNum[3], scale * 270, scale * 602, scale * 32, scale * 40); | |||||
ctx.drawImage(this.data.rankNum[0], scale * 286, scale * 1012, scale * 52, scale * 70); | |||||
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]); | |||||
//二维码 | //二维码 | ||||
ctx.drawImage(this.data.qrCodeUrl, scale * 282, scale * 672, scale * 105, scale* 105); | |||||
console.log(this.data.qrCodeUrl); | |||||
ctx.drawImage(this.data.qrCodeUrl, scale * 476, scale * 1134, scale * 176, scale * 176); | |||||
//绘制 | //绘制 | ||||
ctx.draw(false, setTimeout(() => { | ctx.draw(false, setTimeout(() => { | ||||
console.log(); | console.log(); | ||||
wx.canvasToTempFilePath({ | wx.canvasToTempFilePath({ | ||||
width:scale*444, | |||||
height: scale * 817, | |||||
width:scale*750, | |||||
height: scale * 1380, | |||||
canvasId: 'myCanvas', | canvasId: 'myCanvas', | ||||
success: res => { | success: res => { | ||||
this.data.posterUrl.push(res.tempFilePath); | this.data.posterUrl.push(res.tempFilePath); | ||||
}) | }) | ||||
if (e < 3) { | if (e < 3) { | ||||
wx.getImageInfo({ | wx.getImageInfo({ | ||||
src: this.data.imgUrl + '/images/tempImg'+(e+1)+'.jpg', | |||||
src: this.data.imgUrl + '/images/tempImg'+(e+1)+'.jpg?v=006', | |||||
success: res => { | success: res => { | ||||
this.data.posterBg.push(res.path); | this.data.posterBg.push(res.path); | ||||
this.posterDrawing(e + 1); | this.posterDrawing(e + 1); |
<!--pages/poster/poster.wxml--> | <!--pages/poster/poster.wxml--> | ||||
<view class="all"> | <view class="all"> | ||||
<view class="main"> | <view class="main"> | ||||
<!-- <image class="posterBg" src="{{imgUrl+'/images/posterBg.jpg'}}"></image> --> | |||||
<view class="swiperFrame"> | <view class="swiperFrame"> | ||||
<swiper class="swiperSty" current="{{swiperCurrent}}" bindchange="swiperChange" previous-margin="130rpx" next-margin="130rpx"> | <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="{{posterUrl}}" wx:key="index"> --> | ||||
<swiper-item wx:for="{{3}}" wx:key="index"> | <swiper-item wx:for="{{3}}" wx:key="index"> | ||||
<view class="selectTempFrame {{index==swiperCurrent?'selectTempFrameBorder':''}}"> | <view class="selectTempFrame {{index==swiperCurrent?'selectTempFrameBorder':''}}"> | ||||
<view class="imgGroup"> | <view class="imgGroup"> | ||||
<image style="width:100%;height:100%;" src="{{imgUrl+'/images/tempImg'+(index+1)+'.jpg'}}"></image> | |||||
<image style="width:100%;height:100%;" src="{{imgUrl+'/images/tempImg'+(index+1)+'.jpg?v=004'}}"></image> | |||||
<view class="userMsg"> | <view class="userMsg"> | ||||
<image class="userHead" src="{{userHead}}"></image> | <image class="userHead" src="{{userHead}}"></image> | ||||
<!-- <image class="userHead" src="{{imgUrl+'/images/posterChoose.png'}}"></image> --> | <!-- <image class="userHead" src="{{imgUrl+'/images/posterChoose.png'}}"></image> --> | ||||
<image class="rightArrow" wx:if="{{swiperCurrent!=2}}" bindtap="nextImg" src="{{imgUrl+'/images/rightArrow.png'}}"></image> | <image class="rightArrow" wx:if="{{swiperCurrent!=2}}" bindtap="nextImg" src="{{imgUrl+'/images/rightArrow.png'}}"></image> | ||||
</view> | </view> | ||||
<canvas wx:if="{{canvasShow}}" class="canvasDraw" canvas-id="myCanvas"></canvas> | <canvas wx:if="{{canvasShow}}" class="canvasDraw" canvas-id="myCanvas"></canvas> | ||||
<view class="lookBigPic" bindtap="savePoster"> | |||||
<!-- <view class="lookBigPic" bindtap="savePoster"> | |||||
<image class="lookBigIcon" src="{{imgUrl+'/images/lookbigIcon.png'}}"></image> | <image class="lookBigIcon" src="{{imgUrl+'/images/lookbigIcon.png'}}"></image> | ||||
<view class="lookBigText">查看大图</view> | <view class="lookBigText">查看大图</view> | ||||
</view> | |||||
</view> --> | |||||
<image class="selectPosterTip" src="{{imgUrl+'/images/selectPosterTip.png'}}"></image> | <image class="selectPosterTip" src="{{imgUrl+'/images/selectPosterTip.png'}}"></image> | ||||
<view class="operationFrame"> | <view class="operationFrame"> | ||||
<view class="operationGroup" style="margin-right:55rpx;" bindtap="saveImg"> | <view class="operationGroup" style="margin-right:55rpx;" bindtap="saveImg"> |
height: calc(100vh - 150rpx); | height: calc(100vh - 150rpx); | ||||
overflow: auto; | overflow: auto; | ||||
position: relative; | position: relative; | ||||
background-image: url('https://www.jiyou-tech.com/2020/496_qichen/static/images/posterBg.jpg?v=002'); | |||||
} | } | ||||
.operationFrame{ | .operationFrame{ | ||||
margin-top: 43rpx; | margin-top: 43rpx; | ||||
width: 750rpx; | width: 750rpx; | ||||
height: 234rpx; | height: 234rpx; | ||||
background-image: url('https://www.jiyou-tech.com/2020/496_qichen/static/images/posterBg.png?v=002'); | |||||
/* background-image: url('https://www.jiyou-tech.com/2020/496_qichen/static/images/posterBg.png?v=002'); */ | |||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
justify-content:center; | justify-content:center; |
<view class="all"> | <view class="all"> | ||||
<view class="main"> | <view class="main"> | ||||
<view class="prizeTitleFrame"> | <view class="prizeTitleFrame"> | ||||
<view class="prizeTitle">活动奖品</view> | |||||
<image class="prizeTitle" src="{{imgUrl+'/btns/luckyPrize.png'}}"></image> | |||||
</view> | </view> | ||||
<view class="thirdAward" style="margin-top:0;">一等奖</view> | <view class="thirdAward" style="margin-top:0;">一等奖</view> | ||||
<view class="firstPrize"> | <view class="firstPrize"> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="immediateFetching"> | <view class="immediateFetching"> | ||||
<view class="prizeTitle" bindtap="backPage" style="margin-top:0;">立即抓取</view> | |||||
<image class="prizeTitle" bindtap="backPage" src="{{imgUrl+'/btns/gameStart2.png'}}"></image> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<tabBar></tabBar> | <tabBar></tabBar> |
.prizeTitle{ | .prizeTitle{ | ||||
width:710rpx; | width:710rpx; | ||||
height:70rpx; | height:70rpx; | ||||
background-color: #17528A; | |||||
border-radius: 20rpx; | |||||
margin: 0 auto; | margin: 0 auto; | ||||
line-height: 70rpx; | |||||
text-align: center; | |||||
font-size:30rpx; | |||||
font-family:PingFang; | |||||
font-weight:500; | |||||
color:rgba(255,255,255,1); | |||||
} | } | ||||
.ticketGroup{ | .ticketGroup{ | ||||
padding: 0 45rpx; | padding: 0 45rpx; |
for (let i = 0; i < res.tempFilePaths.length; i++) { | for (let i = 0; i < res.tempFilePaths.length; i++) { | ||||
wx.uploadFile({ | wx.uploadFile({ | ||||
url: app.globalData.urlRoot + "upload/uploadImage", | url: app.globalData.urlRoot + "upload/uploadImage", | ||||
header: { "OPENID": app.globalData.openid }, | |||||
header: { | |||||
"OPENID": app.globalData.openid, | |||||
"VERSION": 100 | |||||
}, | |||||
filePath: res.tempFilePaths[i], | filePath: res.tempFilePaths[i], | ||||
name: "file", | name: "file", | ||||
success: res => { | success: res => { |
<view class="showView"> | <view class="showView"> | ||||
<view class="registerContainer"> | <view class="registerContainer"> | ||||
<view class="tabsBox"> | <view class="tabsBox"> | ||||
<view class="item {{type==1?'select':''}}" data-type="1" bindtap="changeType" style="border-top-left-radius: 8rpx;border-bottom-left-radius: 8rpx;">车主</view> | |||||
<view class="item {{type==0?'select':''}}" data-type="0" bindtap="changeType" | |||||
style="border-top-right-radius: 8rpx;border-bottom-right-radius: 8rpx;">非车主</view> | |||||
<image class="registerTitle" wx:if="{{type==1}}" src="{{imgUrl+'/images/registerTitle1.png'}}" bindtap="changeType" data-type="0"></image> | |||||
<image class="registerTitle" wx:if="{{type==0}}" src="{{imgUrl+'/images/registerTitle2.png'}}" bindtap="changeType" data-type="1"></image> | |||||
<view class="registerTitleMask" style="left:{{type==0?'50%':0}}"></view> | |||||
</view> | </view> | ||||
<view class="welcome">欢迎加入星探计划</view> | |||||
<image class="welcome" src="{{imgUrl+'/images/registerTip.png'}}"></image> | |||||
<form bindsubmit="formSubmit1" wx:if="{{type==1}}"> | <form bindsubmit="formSubmit1" wx:if="{{type==1}}"> | ||||
<view class="Vehicle"> | <view class="Vehicle"> | ||||
<input name="VIN" placeholder="请输入车牌号/VIN号" placeholder-style="font-size:23rpx;" /> | <input name="VIN" placeholder="请输入车牌号/VIN号" placeholder-style="font-size:23rpx;" /> | ||||
</view> | </view> | ||||
<view class="tipTxt">VIN示意图</view> | <view class="tipTxt">VIN示意图</view> | ||||
<image class="license" src="{{imgUrl+'/star/scout/register/card.png'}}"></image> | <image class="license" src="{{imgUrl+'/star/scout/register/card.png'}}"></image> | ||||
<button class="submitBtn" style="padding:0;margin:20rpx auto 0;min-height:0;" formType="submit">提交</button> | |||||
<view class="reminder">温馨提示:您填写的信息将同步至东风启辰服务号,以便改善我们的产品,更好的为您提供优质的服务。</view> | |||||
<button class="submitBtn" style="padding:0;margin:20rpx auto 0;min-height:0;" formType="submit"> | |||||
<image style="width:100%;height:100%;" src="{{imgUrl+'/images/registerSubmit.png'}}"></image> | |||||
</button> | |||||
<image class="reminder" src="{{imgUrl+'/images/registerTip4.png'}}"></image> | |||||
</view> | </view> | ||||
</form> | </form> | ||||
<form bindsubmit="formSubmit2" wx:else> | <form bindsubmit="formSubmit2" wx:else> | ||||
</view> | </view> | ||||
<image class="arrowDown" src="{{imgUrl+'/star/scout/register/arrowDown.png'}}"></image> | <image class="arrowDown" src="{{imgUrl+'/star/scout/register/arrowDown.png'}}"></image> | ||||
</picker> | </picker> | ||||
<view class="hintTitle">网约车司机合影示意图</view> | |||||
<view class="hintBox"> | |||||
<view class="hintItem" style="margin-right:15rpx;"> | |||||
<image class="hintImg" src="{{imgUrl+'/star/scout/register/hintImg1.png'}}"></image> | |||||
<view class="hintTxt">驾驶员与车辆合影示意</view> | |||||
</view> | |||||
<view class="hintItem" style="margin-left:15rpx;"> | |||||
<image class="hintImg" src="{{imgUrl+'/star/scout/register/hintImg2.png'}}"></image> | |||||
<view class="hintTxt">驾驶员与许可证合影示意</view> | |||||
</view> | |||||
</view> | |||||
<view class="upPhotoTitle">请上传您的照片:</view> | |||||
<image class="registerMainPic" src="{{imgUrl+'/images/registerMainPic.png?v=002'}}"></image> | |||||
<view class="upPhonoBox"> | <view class="upPhonoBox"> | ||||
<view class="phontBox" wx:for="{{photoList}}" wx:key="*this" wx:if="{{photoList.length>0}}" data-value="{{index}}"> | <view class="phontBox" wx:for="{{photoList}}" wx:key="*this" wx:if="{{photoList.length>0}}" data-value="{{index}}"> | ||||
<image src="{{item}}" mode="aspectFill" ></image> | <image src="{{item}}" mode="aspectFill" ></image> | ||||
</view> | </view> | ||||
<image class="upPhontBtn" wx:if="{{photoList.length<3}}" src="{{imgUrl+'/star/scout/register/upBtn.png'}}" bindtap="chooseImage"></image> | <image class="upPhontBtn" wx:if="{{photoList.length<3}}" src="{{imgUrl+'/star/scout/register/upBtn.png'}}" bindtap="chooseImage"></image> | ||||
</view> | </view> | ||||
<view class="photoNotes">注:请上传您与车辆及经营许可证的合影</view> | |||||
<button class="submitBtn" formType="submit">提交</button> | |||||
<image class="photoNotes" src="{{imgUrl+'/images/registerTip2.png'}}" ></image> | |||||
<button class="submitBtn" style="padding:0;margin:20rpx auto 0;min-height:0;" formType="submit"> | |||||
<image style="width:100%;height:100%;" src="{{imgUrl+'/images/registerSubmit.png'}}"></image> | |||||
</button> | |||||
<view class="agreementBox"> | <view class="agreementBox"> | ||||
<view class="checkBox" bindtap='agreementClick'> | <view class="checkBox" bindtap='agreementClick'> | ||||
<icon type="success_no_circle" size="10" wx:if="{{agree}}" /> | <icon type="success_no_circle" size="10" wx:if="{{agree}}" /> | ||||
</view> | </view> | ||||
请阅读并同意本协议内容 | |||||
<image style="width:176rpx;height:16rpx;" src="{{imgUrl+'/images/registerTip3.png'}}"></image> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</form> | </form> |
overflow-y: scroll; | overflow-y: scroll; | ||||
} | } | ||||
.tabsBox{ | .tabsBox{ | ||||
position: relative; | |||||
width: 611rpx; | width: 611rpx; | ||||
height: 81rpx; | height: 81rpx; | ||||
border: 1rpx solid #345489; | border: 1rpx solid #345489; | ||||
background-color: #345489; | background-color: #345489; | ||||
} | } | ||||
.welcome{ | .welcome{ | ||||
font-size: 33rpx; | |||||
font-weight: bold; | |||||
text-align: center; | |||||
width: 269rpx; | |||||
height: 33rpx; | |||||
margin: 28rpx auto 28rpx auto; | margin: 28rpx auto 28rpx auto; | ||||
} | } | ||||
.Vehicle{ | .Vehicle{ | ||||
.Vehicle>.submitBtn{ | .Vehicle>.submitBtn{ | ||||
width: 675rpx; | width: 675rpx; | ||||
height: 70rpx; | height: 70rpx; | ||||
line-height: 70rpx; | |||||
background-color: #2a558d; | |||||
color: #ffffff; | |||||
font-size: 28rpx; | |||||
margin: 200rpx auto 0 auto; | |||||
margin: 20rpx auto 0 auto; | |||||
} | } | ||||
.Vehicle>.reminder{ | .Vehicle>.reminder{ | ||||
font-size: 17rpx; | |||||
color: #adaeae; | |||||
width: 675rpx; | |||||
width: 667rpx; | |||||
height: 57rpx; | |||||
margin: 25rpx auto; | margin: 25rpx auto; | ||||
line-height: 32rpx; | |||||
} | } | ||||
.NoVehicle{ | .NoVehicle{ | ||||
position: relative; | position: relative; | ||||
height: 100%; | height: 100%; | ||||
} | } | ||||
.NoVehicle>.photoNotes{ | .NoVehicle>.photoNotes{ | ||||
font-size: 17rpx; | |||||
width: 322rpx; | |||||
height: 17rpx; | |||||
margin-left: 55rpx; | margin-left: 55rpx; | ||||
} | } | ||||
.NoVehicle>.submitBtn{ | .NoVehicle>.submitBtn{ | ||||
width: 675rpx; | width: 675rpx; | ||||
height: 70rpx; | height: 70rpx; | ||||
background-color: #2a558d; | |||||
color: #ffffff; | |||||
font-size: 30rpx; | |||||
margin: 20rpx auto 0 auto; | margin: 20rpx auto 0 auto; | ||||
border-radius: 20rpx; | |||||
} | } | ||||
.NoVehicle>.agreementBox{ | .NoVehicle>.agreementBox{ | ||||
margin-top: 20rpx; | margin-top: 20rpx; | ||||
position:absolute; | position:absolute; | ||||
left:0; | left:0; | ||||
top:0; | top:0; | ||||
} | |||||
.registerTitle{ | |||||
width: 611rpx; | |||||
height: 81rpx; | |||||
} | |||||
.registerTitleMask{ | |||||
position: absolute; | |||||
top: 0; | |||||
width: 50%; | |||||
height: 100%; | |||||
} | |||||
.registerMainPic{ | |||||
width: 655rpx; | |||||
height: 278rpx; | |||||
margin: 0 auto; | |||||
margin-bottom: 25rpx; | |||||
} | } |
<!--pages/scout/scout.wxml--> | <!--pages/scout/scout.wxml--> | ||||
<view class="showView"> | <view class="showView"> | ||||
<view class="content"> | <view class="content"> | ||||
<image class="bg" src="{{imgUrl+'/star/scout/bg.jpg'}}"></image> | |||||
<image class="reward" wx:if="{{maskid<4}}" src="{{imgUrl+'/star/scout/reward.png'}}"></image> | |||||
<image class="bg" src="{{imgUrl+'/star/scout/bg.jpg?v=004'}}"></image> | |||||
<image class="reward" wx:if="{{maskid<4}}" src="{{imgUrl+'/star/scout/reward.png?v=002'}}"></image> | |||||
<image class="reward" wx:if="{{maskid>3}}" src="{{imgUrl+'/star/tu1.png?v=002'}}"></image> | <image class="reward" wx:if="{{maskid>3}}" src="{{imgUrl+'/star/tu1.png?v=002'}}"></image> | ||||
<view class="btn" bindtap="getPoster">{{maskid<4?"立即分享,赚取奖励":"立即分享"}}</view> | |||||
<image class="scoutbtn1" wx:if="{{maskid>3}}" bindtap="getPoster" src="{{imgUrl+'/star/scout/scoutbtn2.png'}}"></image> | |||||
<image class="scoutbtn1" wx:if="{{maskid<4}}" bindtap="getPoster" src="{{imgUrl+'/star/scout/scoutbtn1.png'}}"></image> | |||||
<button class="btn2" wx:if="{{iconShow}}" open-type="getUserInfo" bindgetuserinfo="getUserWxMsg"></button> | <button class="btn2" wx:if="{{iconShow}}" open-type="getUserInfo" bindgetuserinfo="getUserWxMsg"></button> | ||||
</view> | </view> | ||||
<view class="mask" wx:if="{{maskShow}}"> | <view class="mask" wx:if="{{maskShow}}"> | ||||
<view class="tipContent" wx:if="{{tipShow}}"> | <view class="tipContent" wx:if="{{tipShow}}"> | ||||
<view class="title">{{titleContent}}</view> | |||||
<image wx:if="{{maskid==4}}" class="titleImg" src="{{imgUrl+'/star/scout/scoutTitle4.png'}}"></image> | |||||
<image wx:if="{{maskid==1}}" class="titleImg" src="{{imgUrl+'/star/scout/scoutTitle1.png'}}"></image> | |||||
<image wx:if="{{maskid==3}}" class="titleImg" src="{{imgUrl+'/star/scout/scoutTitle2.png'}}"></image> | |||||
<image wx:if="{{maskid==2}}" class="titleImg" src="{{imgUrl+'/star/scout/scoutTitle3.png'}}"></image> | |||||
<image class="txt" wx:if="{{maskid<4}}" src="{{imgUrl+'/star/scout/tipContent.png'}}"></image> | <image class="txt" wx:if="{{maskid<4}}" src="{{imgUrl+'/star/scout/tipContent.png'}}"></image> | ||||
<image class="txt2" wx:if="{{maskid>3}}" src="{{imgUrl+'/star/txt1.png'}}"></image> | <image class="txt2" wx:if="{{maskid>3}}" src="{{imgUrl+'/star/txt1.png'}}"></image> | ||||
<image class="closeBtn" src="{{imgUrl+'/star/closebtn.png'}}" bindtap="hiddenTip"></image> | <image class="closeBtn" src="{{imgUrl+'/star/closebtn.png'}}" bindtap="hiddenTip"></image> |
align-items: center; | align-items: center; | ||||
} | } | ||||
.bg{ | .bg{ | ||||
width: 100%; | |||||
width: 750rpx; | |||||
height: 650rpx; | height: 650rpx; | ||||
} | } | ||||
.reward{ | .reward{ | ||||
position: relative; | position: relative; | ||||
width: 560rpx; | width: 560rpx; | ||||
height: 403rpx; | height: 403rpx; | ||||
border-radius: 15rpx; | |||||
border-radius: 30rpx; | |||||
background-color: #ffffff; | background-color: #ffffff; | ||||
} | } | ||||
.tipContent>.title{ | .tipContent>.title{ | ||||
opacity: 0; | opacity: 0; | ||||
margin: 0; | margin: 0; | ||||
padding: 0; | padding: 0; | ||||
} | |||||
.scoutbtn1{ | |||||
width: 654rpx; | |||||
height: 70rpx; | |||||
margin: 20rpx auto 40rpx auto; | |||||
} | |||||
.titleImg{ | |||||
width: 560rpx; | |||||
height: 77rpx; | |||||
} | } |
<!--pages/star/star.wxml--> | <!--pages/star/star.wxml--> | ||||
<view id="star" class="showView"> | <view id="star" class="showView"> | ||||
<view class="home"> | <view class="home"> | ||||
<image class="bg" src="{{imgUrl+'/star/bg.jpg'}}"></image> | |||||
<image class="bg" src="{{imgUrl+'/star/bg.png'}}"></image> | |||||
<image class="logo1" src="{{imgUrl+'/star/logo1.png'}}"></image> | <image class="logo1" src="{{imgUrl+'/star/logo1.png'}}"></image> | ||||
<image class="logo2" src="{{imgUrl+'/star/logo2.png'}}"></image> | <image class="logo2" src="{{imgUrl+'/star/logo2.png'}}"></image> | ||||
<view class="ruleBtn" wx:if="{{!maskShow}}" bindtap="showRule">规则说明</view> | |||||
<view class="ruleBtn ruleBtnColor" wx:if="{{maskShow}}" bindtap="showRule">规则说明</view> | |||||
<image class="starRule" bindtap="showRule" src="{{imgUrl+'/btns/starRule.png'}}"></image> | |||||
<!-- <view class="ruleBtn" wx:if="{{!maskShow}}" bindtap="showRule">规则说明</view> --> | |||||
<!-- <view class="ruleBtn ruleBtnColor" wx:if="{{maskShow}}" bindtap="showRule">规则说明</view> --> | |||||
<view class="propagandaBox"> | <view class="propagandaBox"> | ||||
<text class="text">已有</text> | <text class="text">已有</text> | ||||
<view class="numBox"> | <view class="numBox"> | ||||
<text class="text">人加入星探计划</text> | <text class="text">人加入星探计划</text> | ||||
</view> | </view> | ||||
<view class="btnBox"> | <view class="btnBox"> | ||||
<view class="btn" bindtap="scout">星探任务</view> | |||||
<view class="btn" bindtap="everyDay">每日任务</view> | |||||
<!-- <button class="btn2" wx:if="{{phonebol}}" open-type="getPhoneNumber" bindgetphonenumber="getPhone"></button> --> | |||||
<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> | ||||
<view class="mask" wx:if="{{maskShow}}"> | <view class="mask" wx:if="{{maskShow}}"> | ||||
<view class="ruleContent"> | <view class="ruleContent"> | ||||
<image class="starRuleTitle" src="{{imgUrl+'/images/starRuleTitle.png'}}"></image> | |||||
<view class="rule"> | <view class="rule"> | ||||
<image class="ruleImg" src="{{imgUrl+'/star/xingRule.png?v=002'}}"></image> | |||||
<image class="ruleImg" src="{{imgUrl+'/images/starRule.png'}}"></image> | |||||
</view> | </view> | ||||
<image class="closeBtn" src="{{imgUrl+'/star/closebtn.png'}}" bindtap="hiddenRule"></image> | <image class="closeBtn" src="{{imgUrl+'/star/closebtn.png'}}" bindtap="hiddenRule"></image> | ||||
<!-- <view class="closeBtn" style="right:-40rpx;top:-45rpx;" bindtap="hiddenRule"></view> --> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> |
.home>.btnBox { | .home>.btnBox { | ||||
position: absolute; | position: absolute; | ||||
width: 100%; | |||||
width: 750rpx; | |||||
text-align: center; | text-align: center; | ||||
left: 0; | left: 0; | ||||
bottom: 15rpx; | bottom: 15rpx; | ||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-between; | |||||
padding: 0 20rpx; | |||||
box-sizing: border-box; | |||||
} | } | ||||
.home>.btnBox>.btn { | .home>.btnBox>.btn { | ||||
.mask>.ruleContent { | .mask>.ruleContent { | ||||
position: relative; | position: relative; | ||||
width: 631rpx; | |||||
height: 923rpx; | |||||
width: 632rpx; | |||||
height: 763rpx; | |||||
border-radius: 20rpx; | border-radius: 20rpx; | ||||
background-color: white; | |||||
} | } | ||||
.mask>.ruleContent>.rule { | .mask>.ruleContent>.rule { | ||||
position: relative; | position: relative; | ||||
width: 100%; | |||||
height: 100%; | |||||
width: 563rpx; | |||||
height: 586rpx; | |||||
padding: 0 34rpx; | |||||
padding-top: 42rpx; | |||||
padding-bottom: 57rpx; | |||||
overflow: auto; | overflow: auto; | ||||
} | } | ||||
content: "\2716"; | content: "\2716"; | ||||
} */ | } */ | ||||
.ruleImg{ | .ruleImg{ | ||||
width: 631rpx; | |||||
height: 1160rpx; | |||||
border-radius: 20rpx; | |||||
width: 563rpx; | |||||
height: 1009rpx; | |||||
} | |||||
.starRule{ | |||||
width: 81rpx; | |||||
height: 81rpx; | |||||
position: absolute; | |||||
right: 29rpx; | |||||
top: 175rpx; | |||||
} | |||||
.starBtn{ | |||||
width: 347rpx; | |||||
height: 65rpx; | |||||
} | |||||
.starRuleTitle{ | |||||
width: 632rpx; | |||||
height: 78rpx; | |||||
} | } |