| @@ -65,7 +65,7 @@ Page({ | |||
| * 用户点击右上角分享 | |||
| */ | |||
| onShareAppMessage: function () { | |||
| return app.sharePack(); | |||
| }, | |||
| receive: function () {//立即领取 | |||
| app.globalData.nowPage = 1; | |||
| @@ -1,5 +1,5 @@ | |||
| { | |||
| "navigationBarTitleText": "东风启辰星探计划", | |||
| "navigationBarTitleText": "东风启辰“星探计划”", | |||
| "usingComponents": { | |||
| "tabBar": "../component/tabBar/index" | |||
| } | |||
| @@ -46,7 +46,6 @@ Page({ | |||
| if (app.globalData.isFirstLogin) { | |||
| this.getHomeBanner();//获取banner | |||
| this.getHomeVideo();//获取视频 | |||
| this.getOrderInfo(); | |||
| } else { | |||
| if (app.globalData.indexData.bannerList){ | |||
| this.setData({ | |||
| @@ -74,12 +73,14 @@ Page({ | |||
| this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code; | |||
| } | |||
| } | |||
| if (!app.globalData.isRegister) { | |||
| this.getOrderInfo(); | |||
| } | |||
| this.setData({ | |||
| mainShow: true, | |||
| isStartAdvertisingShow: false, | |||
| isRegister: app.globalData.isRegister | |||
| }) | |||
| console.log(app.globalData.isRegister); | |||
| }, | |||
| provinceChane: function (e) {//选中省 | |||
| this.setData({ | |||
| @@ -355,5 +356,12 @@ Page({ | |||
| console.log(res.msg) | |||
| } | |||
| }, this); | |||
| }, | |||
| /** | |||
| * 用户点击右上角分享 | |||
| */ | |||
| onShareAppMessage: function () { | |||
| return app.sharePack(); | |||
| } | |||
| }) | |||
| @@ -1,15 +0,0 @@ | |||
| //logs.js | |||
| const util = require('../../utils/util.js') | |||
| Page({ | |||
| data: { | |||
| logs: [] | |||
| }, | |||
| onLoad: function () { | |||
| // this.setData({ | |||
| // logs: (wx.getStorageSync('logs') || []).map(log => { | |||
| // return util.formatTime(new Date(log)) | |||
| // }) | |||
| // }) | |||
| } | |||
| }) | |||
| @@ -1,4 +0,0 @@ | |||
| { | |||
| "navigationBarTitleText": "查看启动日志", | |||
| "usingComponents": {} | |||
| } | |||
| @@ -1,6 +0,0 @@ | |||
| <!--logs.wxml--> | |||
| <view class="container log-list"> | |||
| <block wx:for="{{logs}}" wx:for-item="log"> | |||
| <text class="log-item">{{index + 1}}. {{log}}</text> | |||
| </block> | |||
| </view> | |||
| @@ -1,8 +0,0 @@ | |||
| .log-list { | |||
| display: flex; | |||
| flex-direction: column; | |||
| padding: 40rpx; | |||
| } | |||
| .log-item { | |||
| margin: 10rpx; | |||
| } | |||
| @@ -76,7 +76,7 @@ Page({ | |||
| * 用户点击右上角分享 | |||
| */ | |||
| onShareAppMessage: function () { | |||
| return app.sharePack(); | |||
| }, | |||
| closeRule:function(){//关闭游戏玩法 | |||
| this.setData({ | |||
| @@ -74,15 +74,9 @@ Page({ | |||
| 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; | |||
| }else{ | |||
| this.getOrderInfo(); | |||
| } | |||
| if (this.data.optionsData){ | |||
| if (this.data.optionsData == "home") { | |||
| this.setData({ | |||
| selectNow: 2 | |||
| }) | |||
| } | |||
| if (!app.globalData.isRegister) { | |||
| this.getOrderInfo(); | |||
| } | |||
| }, | |||
| /** | |||
| @@ -131,7 +125,7 @@ Page({ | |||
| * 用户点击右上角分享 | |||
| */ | |||
| onShareAppMessage: function () { | |||
| return app.sharePack(); | |||
| }, | |||
| selectChange:function(e){ | |||
| this.setData({ | |||
| @@ -336,7 +330,10 @@ Page({ | |||
| userData: this.data.userData, | |||
| isLogin: true | |||
| }) | |||
| app.wxRequest(app.globalData.urlRoot + "userInfo/updateUserInfo", { avatarUrl: e.detail.userInfo.avatarUrl, nickName: e.detail.userInfo.nickName},res=>{},this,"POST") | |||
| app.globalData.userInfoData = {}; | |||
| app.globalData.userInfoData.avatarUrl = e.detail.userInfo.avatarUrl; | |||
| app.globalData.userInfoData.nickName = e.detail.userInfo.nickName; | |||
| app.submitUserMsg(e.detail.userInfo.avatarUrl, e.detail.userInfo.nickName); | |||
| } | |||
| }, | |||
| getUserInfo:function(e){//获取个人信息 | |||
| @@ -351,6 +348,9 @@ Page({ | |||
| userData: this.data.userData, | |||
| isLogin: true | |||
| }) | |||
| app.globalData.userInfoData = {}; | |||
| app.globalData.userInfoData.avatarUrl = res.data.avatarUrl; | |||
| app.globalData.userInfoData.nickName = res.data.nickName; | |||
| } | |||
| } | |||
| },this) | |||
| @@ -10,7 +10,7 @@ Page({ | |||
| canvasContron:null,//canvas | |||
| posterBg:[],//海报背景 | |||
| qrCodeUrl:"https://www.jiyou-tech.com/2020/496_qichen/static/images/testQrCode.png",//二维码图片 | |||
| userHead: app.globalData.urlStatic + '/images/defaultHead.png',//用户头像 | |||
| userHead: app.globalData.userInfoData ? app.globalData.userInfoData.avatarUrl : null,//用户头像 | |||
| rankNum: '8908',//缓存数字 | |||
| windowScale:0,//屏幕缩放比 | |||
| windowW: 0,//屏幕宽度 | |||
| @@ -24,7 +24,7 @@ Page({ | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad: function (options) { | |||
| this.data.posterBg.push(); | |||
| }, | |||
| /** | |||
| @@ -32,6 +32,9 @@ Page({ | |||
| */ | |||
| onReady: function () { | |||
| this.data.canvasContron = wx.createCanvasContext('myCanvas'); | |||
| this.getCertificationCount(); | |||
| }, | |||
| cacheFun:function(){ | |||
| wx.getSystemInfo({ | |||
| success: option => { | |||
| this.data.windowScale = option.windowWidth / 750; | |||
| @@ -42,7 +45,7 @@ Page({ | |||
| src: this.data.imgUrl + '/images/tempImg1.jpg', | |||
| success: res => { | |||
| this.data.posterBg.push(res.path); | |||
| countNum+=1; | |||
| countNum += 1; | |||
| } | |||
| }) | |||
| wx.getImageInfo({//缓存二维码 | |||
| @@ -52,13 +55,15 @@ Page({ | |||
| countNum += 1; | |||
| } | |||
| }) | |||
| wx.getImageInfo({//缓存头像 | |||
| src: this.data.userHead, | |||
| success: res => { | |||
| this.data.userHead = res.path; | |||
| countNum += 1; | |||
| } | |||
| }) | |||
| if (this.data.userHead) { | |||
| wx.getImageInfo({//缓存头像 | |||
| src: this.data.userHead, | |||
| success: res => { | |||
| this.data.userHead = res.path; | |||
| countNum += 1; | |||
| } | |||
| }) | |||
| } | |||
| wx.getImageInfo({//缓存数字背景 | |||
| src: this.data.imgUrl + '/images/posterNum.png', | |||
| success: res => { | |||
| @@ -69,7 +74,7 @@ Page({ | |||
| this.data.rankNum = this.data.rankNum.toString().split(""); | |||
| for (let i = 0; i < this.data.rankNum.length; i++) { | |||
| wx.getImageInfo({//缓存数字 | |||
| src: this.data.imgUrl + '/images/nums/' + this.data.rankNum[i]+'.png', | |||
| src: this.data.imgUrl + '/images/nums/' + this.data.rankNum[i] + '.png', | |||
| success: res => { | |||
| this.data.rankNum[i] = res.path; | |||
| countNum += 1; | |||
| @@ -81,11 +86,10 @@ Page({ | |||
| this.posterDrawing(1); | |||
| clearInterval(setInt); | |||
| } | |||
| },50); | |||
| }, 50); | |||
| } | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| @@ -158,7 +162,7 @@ Page({ | |||
| ctx.setFontSize(scale * 28); | |||
| ctx.setFillStyle('#FFFFFF'); | |||
| ctx.setTextAlign('left'); | |||
| ctx.fillText("啦啦啦", scale * 102, scale *572); | |||
| ctx.fillText(app.globalData.userInfoData ? app.globalData.userInfoData.nickName : "", scale * 102, scale *572); | |||
| //我是第XXX星探 | |||
| ctx.drawImage(this.data.numBg, scale * 50, scale * 598, scale * 333, scale * 74); | |||
| //排名数字 | |||
| @@ -222,5 +226,21 @@ Page({ | |||
| swiperCurrent: e.detail.current, | |||
| }) | |||
| } | |||
| }, | |||
| getCertificationCount: function () {//获取星探计划人数 | |||
| app.wxRequest(app.globalData.urlRoot +"userInfo/getCertificationCount",{},res=>{ | |||
| this.createQrcode(); | |||
| if(res.code==200){ | |||
| this.data.rankNum = res.data.total; | |||
| } | |||
| },this) | |||
| }, | |||
| createQrcode: function () {//获取个人小程序分享码 | |||
| app.wxRequest(app.globalData.urlRoot + "wxInfo/getQrcode", {}, res => { | |||
| if (res.code = 200) { | |||
| this.data.qrCodeUrl = res.data.qrcodeUrl; | |||
| } | |||
| this.cacheFun(); | |||
| }, this) | |||
| } | |||
| }) | |||
| @@ -1,5 +1,5 @@ | |||
| { | |||
| "navigationBarTitleText": "东风启辰星探计划", | |||
| "navigationBarTitleText": "东风启辰“星探计划”", | |||
| "usingComponents": { | |||
| "tabBar": "../component/tabBar/index" | |||
| } | |||
| @@ -62,6 +62,6 @@ Page({ | |||
| * 用户点击右上角分享 | |||
| */ | |||
| onShareAppMessage: function () { | |||
| return app.sharePack(); | |||
| } | |||
| }) | |||