| if (userMobile){ | if (userMobile){ | ||||
| this.globalData.userMobile = userMobile; | this.globalData.userMobile = userMobile; | ||||
| } | } | ||||
| var scene = wx.getStorageSync('scene'); | |||||
| if (scene) { | |||||
| this.globalData.scene = scene; | |||||
| var parentOpenid = wx.getStorageSync('parentOpenid'); | |||||
| if (parentOpenid) { | |||||
| this.globalData.parentOpenid = parentOpenid; | |||||
| } | } | ||||
| var certificationInfo = wx.getStorageSync('certificationInfo'); | var certificationInfo = wx.getStorageSync('certificationInfo'); | ||||
| if (certificationInfo) { | if (certificationInfo) { | ||||
| urlStatic: "https://www.jiyou-tech.com/2020/496_qichen/static",//测试静态资源根目录 | urlStatic: "https://www.jiyou-tech.com/2020/496_qichen/static",//测试静态资源根目录 | ||||
| // urlStatic: "https://xingb.venucia.com/resource",//静态资源根目录 | // urlStatic: "https://xingb.venucia.com/resource",//静态资源根目录 | ||||
| openid: "",//OPENID | openid: "",//OPENID | ||||
| scene:"",//推荐人的openid | |||||
| parentOpenid:"",//推荐人的openid | |||||
| session_key: "",//session_key | session_key: "",//session_key | ||||
| openidSuccessFuc: null,//方法回调 | openidSuccessFuc: null,//方法回调 | ||||
| buyStateSuccessFuc:null, | buyStateSuccessFuc:null, | ||||
| nowPage:'1',//当前tabBar | |||||
| nowPage:'0',//当前tabBar | |||||
| isRegister:false,//是否已注册 | isRegister:false,//是否已注册 | ||||
| userMobile:null,//用户手机号 | userMobile:null,//用户手机号 | ||||
| isFirstLogin: true,//是否为第一次登录 | isFirstLogin: true,//是否为第一次登录 |
| */ | */ | ||||
| data: { | data: { | ||||
| imgUrl: app.globalData.urlStatic,//图片路径 | imgUrl: app.globalData.urlStatic,//图片路径 | ||||
| scene:null,//朋友的openid | |||||
| countNum:0, | countNum:0, | ||||
| pageShow: false,//是否显示页面 false | pageShow: false,//是否显示页面 false | ||||
| isAppointmentShow: false,//是否显示预约弹框 | isAppointmentShow: false,//是否显示预约弹框 | ||||
| city:"",//城市 | city:"",//城市 | ||||
| agent_code: "",//经销商编码 | agent_code: "",//经销商编码 | ||||
| agentDetail: "",//经销商详细信息 | agentDetail: "",//经销商详细信息 | ||||
| parentOpenid: app.globalData.scene,//好友openid | |||||
| parentOpenid: app.globalData.parentOpenid,//好友openid | |||||
| }, | }, | ||||
| submitSuccess:false, | submitSuccess:false, | ||||
| placing:false | placing:false | ||||
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| onLoad: function (options) { | onLoad: function (options) { | ||||
| if (options.scene) { | |||||
| this.data.scene = options.scene; | |||||
| wx.setStorageSync("scene", options.scene); | |||||
| app.globalData.scene = options.scene; | |||||
| if (options.parentOpenid) { | |||||
| this.data.parentOpenid = options.parentOpenid; | |||||
| wx.setStorageSync("parentOpenid", options.parentOpenid); | |||||
| app.globalData.parentOpenid = options.parentOpenid; | |||||
| } | } | ||||
| if (app.globalData.openid) { | if (app.globalData.openid) { | ||||
| this.loadFun(); | this.loadFun(); |
| "navigationBarTitleText": "东风启辰“星探计划”", | "navigationBarTitleText": "东风启辰“星探计划”", | ||||
| "usingComponents": { | "usingComponents": { | ||||
| "tabBar": "../component/tabBar/index", | "tabBar": "../component/tabBar/index", | ||||
| "placingOrder": "/pages/placingOrder/placingOrder" | |||||
| "yuyue": "/pages/yuyue/yuyue" | |||||
| } | } | ||||
| } | } |
| </view> | </view> | ||||
| </view> | </view> | ||||
| <image class="lookCar" bindtap="cutPage" src="{{imgUrl+'/newImages2/36.png'}}"></image> | <image class="lookCar" bindtap="cutPage" src="{{imgUrl+'/newImages2/36.png'}}"></image> | ||||
| <placingOrder bindplacing="placingControl" wx:if="{{placing}}"></placingOrder> | |||||
| <yuyue bindyuyue="placingControl" wx:if="{{placing}}"></yuyue> | |||||
| <tabBar></tabBar> | <tabBar></tabBar> | ||||
| </view> | </view> | ||||
| province:"",//省份 | province:"",//省份 | ||||
| agent_code: "",//经销商编码 | agent_code: "",//经销商编码 | ||||
| agentDetail: "",//经销商详细信息 | agentDetail: "",//经销商详细信息 | ||||
| parentOpenid: app.globalData.scene,//好友openid | |||||
| parentOpenid: app.globalData.parentOpenid,//好友openid | |||||
| }, | }, | ||||
| startAdvertisingUrl:'',//开屏广告路径 | startAdvertisingUrl:'',//开屏广告路径 | ||||
| isStartAdvertising: 1,//开屏广告透明度 | isStartAdvertising: 1,//开屏广告透明度 | ||||
| this.setData({ | this.setData({ | ||||
| siteSelect: false | siteSelect: false | ||||
| }) | }) | ||||
| this.data.subscribeData.parentOpenid = app.globalData.scene; | |||||
| this.data.subscribeData.parentOpenid = app.globalData.parentOpenid; | |||||
| }, | }, | ||||
| getBuyStates:function(){ | getBuyStates:function(){ | ||||
| this.setData({ | this.setData({ |
| province: "",//省份 | province: "",//省份 | ||||
| agent_code: "",//经销商编码 | agent_code: "",//经销商编码 | ||||
| agentDetail: "",//经销商详细信息 | agentDetail: "",//经销商详细信息 | ||||
| parentOpenid: app.globalData.scene,//好友openid | |||||
| parentOpenid: app.globalData.parentOpenid,//好友openid | |||||
| }, | }, | ||||
| userData:{ | userData:{ | ||||
| avatarUrl: null, | avatarUrl: null, | ||||
| } else { | } else { | ||||
| app.globalData.buyStateSuccessFuc = this.getBuyStates; | app.globalData.buyStateSuccessFuc = this.getBuyStates; | ||||
| } | } | ||||
| this.data.subscribeData.parentOpenid = app.globalData.scene; | |||||
| this.data.subscribeData.parentOpenid = app.globalData.parentOpenid; | |||||
| }, | }, | ||||
| getBuyStates: function () { | getBuyStates: function () { | ||||
| this.setData({ | this.setData({ |
| city:"",//市区 | city:"",//市区 | ||||
| agent_code: "",//经销商编码 | agent_code: "",//经销商编码 | ||||
| agentDetail: "",//经销商详细信息 | agentDetail: "",//经销商详细信息 | ||||
| parentOpenid: app.globalData.scene,//好友openid | |||||
| parentOpenid: app.globalData.parentOpenid,//好友openid | |||||
| }, | }, | ||||
| getBuyState: false, | getBuyState: false, | ||||
| mobileType: 2 | mobileType: 2 |
| return { | return { | ||||
| title: '您有一份启辰星专属礼品待领取', | title: '您有一份启辰星专属礼品待领取', | ||||
| imageUrl: this.data.imgUrl + "/newImages3/28_" + (this.data.swiperCurrent+1)+".png?v=004", | imageUrl: this.data.imgUrl + "/newImages3/28_" + (this.data.swiperCurrent+1)+".png?v=004", | ||||
| path: "/pages/coupon/coupon?scene=" + app.globalData.openid | |||||
| path: "/pages/coupon/coupon?parentOpenid=" + app.globalData.openid | |||||
| } | } | ||||
| }, | }, | ||||
| saveImg: function () {//保存到手机 | saveImg: function () {//保存到手机 |
| data: { | data: { | ||||
| imgUrl: app.globalData.urlStatic,//图片路径 | imgUrl: app.globalData.urlStatic,//图片路径 | ||||
| nums:1, | nums:1, | ||||
| imgShow:true, | |||||
| showType:1, | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| onLoad: function (options) { | onLoad: function (options) { | ||||
| if (options.num>5){ | |||||
| this.data.imgShow = false; | |||||
| } | |||||
| this.setData({ | this.setData({ | ||||
| imgShow: this.data.imgShow, | |||||
| nums: options.num ? options.num :1 | nums: options.num ? options.num :1 | ||||
| }) | }) | ||||
| app.globalData.nowPage = 3; | app.globalData.nowPage = 3; | ||||
| */ | */ | ||||
| onShareAppMessage: function () { | onShareAppMessage: function () { | ||||
| }, | |||||
| showTypeControl:function(e){ | |||||
| this.setData({ | |||||
| showType: e.currentTarget.dataset.type | |||||
| }) | |||||
| } | } | ||||
| }) | }) |
| <!--pages/prizeDetail/prizeDetail.wxml--> | <!--pages/prizeDetail/prizeDetail.wxml--> | ||||
| <view class="all"> | <view class="all"> | ||||
| <view class="main"> | <view class="main"> | ||||
| <image style="width:750rpx;" mode="widthFix" src="{{imgUrl+'/newImages2/prizeDetail/'+nums+'.png'}}"></image> | |||||
| <image wx:if="{{imgShow}}" style="width:750rpx;" mode="widthFix" src="{{imgUrl+'/newImages3/prizeDetail/'+nums+'.png'}}"></image> | |||||
| <view wx:if="{{nums==6 || nums==7 || nums==8}}"> | |||||
| <image style="width:750rpx;" mode="widthFix" src="{{imgUrl+'/newImages3/prizeDetail/'+nums+'_1.png'}}"></image> | |||||
| <view class="image6Group"> | |||||
| <image style="width:750rpx;" mode="widthFix" src="{{imgUrl+'/newImages3/prizeDetail/'+nums+'_2_'+showType+'.png'}}"></image> | |||||
| <view class="image6Btn1" style="{{nums==7||nums==8?'top:20rpx;':''}}" wx:if="{{showType==2}}" bindtap="showTypeControl" data-type="1"></view> | |||||
| <view class="image6Btn2" style="{{nums==7||nums==8?'top:20rpx;':''}}" wx:if="{{showType==1}}" bindtap="showTypeControl" data-type="2"></view> | |||||
| </view> | |||||
| <image style="width:750rpx;" mode="widthFix" src="{{imgUrl+'/newImages3/prizeDetail/'+nums+'_3.png'}}"></image> | |||||
| </view> | |||||
| <view wx:if="{{nums==9 || nums==10}}"> | |||||
| <image style="width:750rpx;" mode="widthFix" src="{{imgUrl+'/newImages3/prizeDetail/'+nums+'_1.png'}}"></image> | |||||
| <!-- <view class="image6Group"> | |||||
| <image style="width:750rpx;" mode="widthFix" src="{{imgUrl+'/newImages3/prizeDetail/'+nums+'_2_'+showType+'.png'}}"></image> | |||||
| <view class="image6Btn1" wx:if="{{showType==2}}" bindtap="showTypeControl" data-type="1"></view> | |||||
| <view class="image6Btn2" wx:if="{{showType==1}}" bindtap="showTypeControl" data-type="2"></view> | |||||
| <view class="image6Btn2" wx:if="{{showType==3}}" bindtap="showTypeControl" data-type="3"></view> | |||||
| </view> --> | |||||
| <image style="width:750rpx;" mode="widthFix" src="{{imgUrl+'/newImages3/prizeDetail/'+nums+'_3.png'}}"></image> | |||||
| </view> | |||||
| </view> | </view> | ||||
| <tabBar></tabBar> | <tabBar></tabBar> | ||||
| </view> | </view> |
| height: calc(100vh - 120rpx); | height: calc(100vh - 120rpx); | ||||
| overflow: auto; | overflow: auto; | ||||
| -webkit-overflow-scrolling: touch; | -webkit-overflow-scrolling: touch; | ||||
| } | |||||
| .image6Group{ | |||||
| position: relative; | |||||
| } | |||||
| .image6Btn1,.image6Btn2{ | |||||
| position: absolute; | |||||
| top: 40rpx; | |||||
| left: 70rpx | |||||
| } | |||||
| .image6Btn1{ | |||||
| width: 310rpx; | |||||
| height: 80rpx; | |||||
| background-color: red; | |||||
| opacity: 0; | |||||
| } | |||||
| .image6Btn2{ | |||||
| left: auto; | |||||
| right: 70rpx; | |||||
| width: 310rpx; | |||||
| height: 80rpx; | |||||
| background-color: green; | |||||
| opacity: 0; | |||||
| } | } |
| <view class="prize7" data-num="7" bindtap="lookDetail"></view> | <view class="prize7" data-num="7" bindtap="lookDetail"></view> | ||||
| <view class="prize8" data-num="8" bindtap="lookDetail"></view> | <view class="prize8" data-num="8" bindtap="lookDetail"></view> | ||||
| <view class="prize9" data-num="9" bindtap="lookDetail"></view> | <view class="prize9" data-num="9" bindtap="lookDetail"></view> | ||||
| <view class="prize10" data-num="11" bindtap="lookDetail"></view> | |||||
| <view class="prize10" data-num="10" bindtap="lookDetail"></view> | |||||
| <view class="bottomBtn" bindtap="backPage"></view> | <view class="bottomBtn" bindtap="backPage"></view> | ||||
| </view> | </view> | ||||
| </view> | </view> |
| province: "",//省份 | province: "",//省份 | ||||
| agent_code: "",//经销商编码 | agent_code: "",//经销商编码 | ||||
| agentDetail: "",//经销商详细信息 | agentDetail: "",//经销商详细信息 | ||||
| parentOpenid: app.globalData.scene,//好友openid | |||||
| parentOpenid: app.globalData.parentOpenid,//好友openid | |||||
| }, | }, | ||||
| }, | }, | ||||
| city:"",//城市 | city:"",//城市 | ||||
| agent_code: "",//经销商编码 | agent_code: "",//经销商编码 | ||||
| agentDetail: "",//经销商详细信息 | agentDetail: "",//经销商详细信息 | ||||
| parentOpenid: app.globalData.scene,//好友openid | |||||
| parentOpenid: app.globalData.parentOpenid,//好友openid | |||||
| }, | }, | ||||
| mobileType:2 | mobileType:2 | ||||
| }, | }, | ||||
| this.data.subscribeData.mobile = sourceMobile; | this.data.subscribeData.mobile = sourceMobile; | ||||
| this.data.appointment = true; | this.data.appointment = true; | ||||
| if (res.code == 200) { | if (res.code == 200) { | ||||
| if (app.globalData.nowPage=='0'){ | |||||
| wx.reLaunch({ | |||||
| url: '/pages/index/index' | |||||
| }) | |||||
| return; | |||||
| } | |||||
| wx.showToast({ | wx.showToast({ | ||||
| title: '预约成功' | title: '预约成功' | ||||
| }) | }) |