diff --git a/App copy.vue b/App copy.vue new file mode 100644 index 0000000..73a3b3a --- /dev/null +++ b/App copy.vue @@ -0,0 +1,160 @@ + + + \ No newline at end of file diff --git a/App.vue b/App.vue index 4e42c05..fe190b4 100644 --- a/App.vue +++ b/App.vue @@ -4,137 +4,138 @@ export default { onLaunch: function() { this.$nextTick(() => { - let link = window.location.href; - if (/code=/.test(link) || link.indexOf("code") > -1) { - let temp = decodeURIComponent((new RegExp('[?|&]' + 'code' + '=' + '([^&;]+?)(&|#|;|$)') - .exec(link) || [, ''])[1].replace(/\+/g, '%20')) || null - let tadk2_lifeData = uni.getStorageSync('tadk2_lifeData') - if (!tadk2_lifeData.vuex_token) { - this.$u.api.login({ - code: temp - }).then(res => { - this.$u.vuex('vuex_token', res.token) - this.$u.api.user().then(res => { - this.$u.vuex('vuex_user', res) - let url = location.href.split('#')[0] - let link = "https://vr.langye.net/h5tadk/"; - this.$u.api.share({ - url + let link = window.location.href; + if (/code=/.test(link) || link.indexOf("code") > -1) { + let temp = decodeURIComponent((new RegExp('[?|&]' + 'code' + '=' + '([^&;]+?)(&|#|;|$)') + .exec(link) || [, ''])[1].replace(/\+/g, '%20')) || null + let tadk2_lifeData = uni.getStorageSync('tadk2_lifeData') + if (!tadk2_lifeData.vuex_token) { + this.$u.api.login({ + code: temp + }).then(res => { + this.$u.vuex('vuex_token', res.token) + this.$u.api.user().then(res => { + this.$u.vuex('vuex_user', res) + let url = location.href.split('#')[0] + let link = "https://vr.langye.net/h5tadk/"; + this.$u.api.share({ + url }).then(res => { this.$u.vuex('vuex_share', true) - this.$isResolve() - jwx.config({ - debug: false, // 开启调试模式,调用的所有 api 的返回值会在客户端 alert 出来,若要查看传入的参数,可以在 pc 端打开,参数信息会通过 log 打出,仅在 pc 端时才会打印。 - appId: res.appId, - jsApiList: res.jsApiList, - nonceStr: res.nonceStr, - signature: res.signature, - timestamp: res.timestamp, - }) - jwx.ready(() => { - jwx.updateAppMessageShareData({ - title: '阵地有声 理响通安', // 分享标题 - link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 - desc: '点击查看', - imgUrl: 'https://vr.langye.net/storage/files/170899758665dd3bd2c88c7.png', // 分享图标 - success: () => { - console.log( - 'updateAppMessageShareData-success' - ) - }, - - }); - jwx.updateTimelineShareData({ - title: '阵地有声 理响通安', // 分享标题 - desc: '点击查看', - link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 - imgUrl: 'https://vr.langye.net/storage/files/170899758665dd3bd2c88c7.png', // 分享图标 - success: () => { - console.log( - 'updateTimelineShareData-success' - ) - } - }); + jwx.config({ + debug: false, // 开启调试模式,调用的所有 api 的返回值会在客户端 alert 出来,若要查看传入的参数,可以在 pc 端打开,参数信息会通过 log 打出,仅在 pc 端时才会打印。 + appId: res.appId, + jsApiList: res.jsApiList, + nonceStr: res.nonceStr, + signature: res.signature, + timestamp: res.timestamp, + }) + jwx.ready(() => { + jwx.updateAppMessageShareData({ + title: '阵地有声 理响通安', // 分享标题 + link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 + desc: '点击查看', + imgUrl: 'https://vr.langye.net/storage/files/170951606765e52523351d8.jpg', // 分享图标 + success: () => { + console.log( + 'updateAppMessageShareData-success' + ) + }, + + }); + jwx.updateTimelineShareData({ + title: '阵地有声 理响通安', // 分享标题 + desc: '点击查看', + link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 + imgUrl: 'https://vr.langye.net/storage/files/170951606765e52523351d8.jpg', // 分享图标 + success: () => { + console.log( + 'updateTimelineShareData-success' + ) + } + }); }) + this.$isResolve() // console.log("123---to") // uni.reLaunch({ // url: '/pages/index/index', - // }); + // }); }) - - }) - }) - } else { - this.$u.api.user().then(res => { - this.$u.vuex('vuex_user', res) - let url = location.href.split('#')[0] - let link = "https://vr.langye.net/h5tadk/"; - this.$u.api.share({ - url + + }) + }) + } else { + this.$u.api.user().then(res => { + this.$u.vuex('vuex_user', res) + let url = location.href.split('#')[0] + let link = "https://vr.langye.net/h5tadk/"; + this.$u.api.share({ + url }).then(res => { this.$u.vuex('vuex_share', true) - this.$isResolve() - jwx.config({ - debug: false, // 开启调试模式,调用的所有 api 的返回值会在客户端 alert 出来,若要查看传入的参数,可以在 pc 端打开,参数信息会通过 log 打出,仅在 pc 端时才会打印。 - appId: res.appId, - jsApiList: res.jsApiList, - nonceStr: res.nonceStr, - signature: res.signature, - timestamp: res.timestamp, - }) - jwx.ready(() => { - jwx.updateAppMessageShareData({ - title: '阵地有声 理响通安', // 分享标题 - desc: '点击查看', - link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 - imgUrl: 'https://vr.langye.net/storage/files/170899758665dd3bd2c88c7.png', // 分享图标 - success: () => { - console.log( - 'updateAppMessageShareData-success' - ) - }, - - }); - jwx.updateTimelineShareData({ - title: '阵地有声 理响通安', // 分享标题 - desc: '点击查看', - link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 - imgUrl: 'https://vr.langye.net/storage/files/170899758665dd3bd2c88c7.png', // 分享图标 - success: () => { - console.log( - 'updateTimelineShareData-success' - ) - } - }); + jwx.config({ + debug: false, // 开启调试模式,调用的所有 api 的返回值会在客户端 alert 出来,若要查看传入的参数,可以在 pc 端打开,参数信息会通过 log 打出,仅在 pc 端时才会打印。 + appId: res.appId, + jsApiList: res.jsApiList, + nonceStr: res.nonceStr, + signature: res.signature, + timestamp: res.timestamp, + }) + jwx.ready(() => { + jwx.updateAppMessageShareData({ + title: '阵地有声 理响通安', // 分享标题 + desc: '点击查看', + link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 + imgUrl: 'https://vr.langye.net/storage/files/170951606765e52523351d8.jpg', // 分享图标 + success: () => { + console.log( + 'updateAppMessageShareData-success' + ) + }, + + }); + jwx.updateTimelineShareData({ + title: '阵地有声 理响通安', // 分享标题 + desc: '点击查看', + link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 + imgUrl: 'https://vr.langye.net/storage/files/170951606765e52523351d8.jpg', // 分享图标 + success: () => { + console.log( + 'updateTimelineShareData-success' + ) + } + }); }) + this.$isResolve() // console.log("123---to") // uni.reLaunch({ // url: '/pages/index/index', - // }); - }) - }) - } + // }); + }) + }) + } } else { // let that = this // setInterval(function(){ // console.log("asd-------------") - // that.$u.vuex('vuex_token', "8801|764nhDiiWEGvu0TPh0wyhl3Pfq01Oozhgu8X8Cvl") + // that.$u.vuex('vuex_token', "8849|gyvzzL2oj23cjFEHLkL3R6D3nG1G2LjkXj9j6NfP") // that.$u.vuex('vuex_share', true) // },10000) - - this.$u.api.getAppId().then(res => { - let redirect = encodeURIComponent(link.replace(/#\//, "")) - window.location.href = - `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${res.appid}&redirect_uri=${redirect}&response_type=code&scope=snsapi_base#wechat_redirect` - }) + // this.$u.vuex('vuex_token', "8849|gyvzzL2oj23cjFEHLkL3R6D3nG1G2LjkXj9j6NfP") + this.$u.api.getAppId().then(res => { + let redirect = encodeURIComponent(link.replace(/#\//, "")) + console.log(redirect) + window.location.href = + `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${res.appid}&redirect_uri=${redirect}&response_type=code&scope=snsapi_base#wechat_redirect` + }) } }) }, onShow: function() { - console.log('App Show') + }, onHide: function() { console.log('App Hide') diff --git a/pages/certificate/certificate.vue b/pages/certificate/certificate.vue index a0e2ccb..4b57c08 100644 --- a/pages/certificate/certificate.vue +++ b/pages/certificate/certificate.vue @@ -21,10 +21,9 @@ - + @@ -159,9 +158,9 @@ export default { } .footer { text-align: center; - font-size: 18rpx; + font-size: 24rpx; font-weight: 400; - color: #F8DB97; + color: #f8cd82; padding: 20rpx 0; position: absolute; diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue index 680c0c2..ec88697 100644 --- a/pages/detail/detail.vue +++ b/pages/detail/detail.vue @@ -67,7 +67,8 @@ hasAnswer:false, // goBack:false, showAnswer:false, - isSubmit:false + isSubmit:false, + isNext:false }; }, methods: { @@ -133,9 +134,10 @@ toast('请先答题') return } - if(this.isSubmit){ + if(this.isSubmit || this.isNext){ return } + this.isNext = true if(this.currentIndex==this.question_list.length-1){ uni.showLoading({title:'提交中'}) this.isSubmit = true @@ -178,6 +180,7 @@ that.currentIndex++ that.showAnswer = false that.hasAnswer = false + that.isNext = false } },1200) @@ -260,7 +263,8 @@ &-text { color: #000000; - font-size: 32rpx; + font-size: 32rpx; + padding-left:30rpx; } } &-answer{ diff --git a/pages/index/index copy.vue b/pages/index/index copy.vue new file mode 100644 index 0000000..344d41f --- /dev/null +++ b/pages/index/index copy.vue @@ -0,0 +1,219 @@ + + + + + \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index 75a0b3b..24e5172 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,15 +1,12 @@ @@ -31,39 +27,24 @@ data() { return { progressPercentage: 0, - // interval0:null, interval:null, - isShare:false, - // shareFalse101:0, - // isOk:'未请求完毕', + isShare:false, } }, async onLoad() { - await this.startBefore() - await this.$onLaunched; - // console.log("请求完毕,开始执行") - // this.isOk =" 请求完毕,开始执行" + // await this.$onLaunched; this.start(); }, beforeDestroy() { clearInterval(this.interval); }, - methods: { - startBefore(){ - this.interval0 = setInterval(() => { - if(this.progressPercentage<33){ - this.progressPercentage++; - }else{ - clearInterval(this.interval0); - } - }, 50); - }, + methods: { start() { this.interval = setInterval(() => { this.isShare = uni.getStorageSync('tadk2_lifeData').vuex_share?true:false const userInfo = uni.getStorageSync('tadk2_lifeData').vuex_user - if(this.isShare){ + // if(this.isShare){ if(this.progressPercentage<100){ this.progressPercentage++; }else{ @@ -78,15 +59,13 @@ }) } } - }else{ - if(this.progressPercentage<99){ - this.progressPercentage++; - }else{ - this.shareFalse101 = this.progressPercentage - } - } + // }else{ + // if(this.progressPercentage<99){ + // this.progressPercentage++; + // } + // } - }, 50); + }, 60); }, }, } @@ -177,7 +156,7 @@ bottom: 10rpx; width: 100%; font-size: 24rpx; - color: #666; + color: #333; font-family: '宋体'; opacity: 1; text-align: center; diff --git a/pages/login/login.vue b/pages/login/login.vue index 3d0ba02..c6831fb 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -148,6 +148,15 @@ background: #e1f1f2; position: relative; overflow: scroll; + ::v-deep .u-drawer-content-visible{ + height:60%!important; + .u-datetime-picker{ + height:100%!important; + .u-picker-body{ + height:100%!important; + } + } + } .show-modal{ width: 100%; height: 100%; diff --git a/pages/map/map.vue b/pages/map/map.vue index 9513770..d3a6516 100644 --- a/pages/map/map.vue +++ b/pages/map/map.vue @@ -97,7 +97,7 @@ area: { w: 2212, h: 1583, - x: -523 / 2 + x: -2212 / 4.8 }, pointers: [] };