diff --git a/xietang-answer-h5/App.vue b/xietang-answer-h5/App.vue
index 8914298..63de7eb 100644
--- a/xietang-answer-h5/App.vue
+++ b/xietang-answer-h5/App.vue
@@ -5,7 +5,8 @@
onLaunch: function() {
console.log('App Launch')
this.$nextTick(() => {
- let link = window.location.href;
+ let link = window.location.href;
+ let that = this
if (/code=/.test(link) || link.indexOf("code") > -1) {
let temp = decodeURIComponent((new RegExp('[?|&]' + 'code' + '=' +
'([^&;]+?)(&|#|;|$)')
@@ -19,12 +20,108 @@
method: 'GET',
utilSuccess: function(res) {
console.log(res)
- uni.setStorageSync('userInfo_token', {"token":"7777|QHwrodQSA6dhth3TEYjIwJfW2BNok5azI9CO25yb","user_id":5081});
+ uni.setStorageSync('userInfo_token', {"token":"7777|QHwrodQSA6dhth3TEYjIwJfW2BNok5azI9CO25yb","user_id":5081});
+ // 分享
+ let url = location.href.split('#')[0]
+ let link = "http://vr.langye.net/h5xtdt/";
+ that.util.request({
+ api: '/api/mobile/user/wechat-share',
+ data: {
+ url:url
+ },
+ method: 'GET',
+ utilSuccess: function(res) {
+ 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: '百步芳草·与理同行——斜塘街道2023-2024年度基层党员冬训', // 分享标题
+ link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
+ desc: ' ',
+ imgUrl: 'http://vr.langye.net/storage/files/170701702865bf034424468.jpg', // 分享图标
+ success: () => {
+ console.log(
+ 'updateAppMessageShareData-success'
+ )
+ },
+
+ });
+ jwx.updateTimelineShareData({
+ title: '百步芳草·与理同行——斜塘街道2023-2024年度基层党员冬训', // 分享标题
+ desc: ' ',
+ link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
+ imgUrl: 'http://vr.langye.net/storage/files/170701702865bf034424468.jpg', // 分享图标
+ success: () => {
+ console.log(
+ 'updateTimelineShareData-success'
+ )
+ }
+ });
+ })
+ },
+ utilFail: function(res) {
+ that.util.toast(res)
+ }
+ })
},
utilFail: function(res) {
that.util.toast(res)
}
})
+ }else{
+ let url = location.href.split('#')[0]
+ let link = "http://vr.langye.net/h5xtdt/";
+ that.util.request({
+ api: '/api/mobile/user/wechat-share',
+ data: {
+ url:url
+ },
+ method: 'GET',
+ utilSuccess: function(res) {
+ 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: '百步芳草·与理同行——斜塘街道2023-2024年度基层党员冬训', // 分享标题
+ link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
+ desc: ' ',
+ imgUrl: 'http://vr.langye.net/storage/files/170701702865bf034424468.jpg', // 分享图标
+ success: () => {
+ console.log(
+ 'updateAppMessageShareData-success'
+ )
+ },
+
+ });
+ jwx.updateTimelineShareData({
+ title: '百步芳草·与理同行——斜塘街道2023-2024年度基层党员冬训', // 分享标题
+ desc: ' ',
+ link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
+ imgUrl: 'http://vr.langye.net/storage/files/170701702865bf034424468.jpg', // 分享图标
+ success: () => {
+ console.log(
+ 'updateTimelineShareData-success'
+ )
+ }
+ });
+ })
+ },
+ utilFail: function(res) {
+ that.util.toast(res)
+ }
+ })
}
} else {
let redirect = encodeURIComponent(link.replace(/#\//, ""))
diff --git a/xietang-answer-h5/pages/answer/index.vue b/xietang-answer-h5/pages/answer/index.vue
index 601821e..ab0e4eb 100644
--- a/xietang-answer-h5/pages/answer/index.vue
+++ b/xietang-answer-h5/pages/answer/index.vue
@@ -14,7 +14,8 @@
- {{answerNum[ansindex]}}{{ans.is_correct}}---{{ans.title}}
+ {{answerNum[ansindex]}}{{ans.title}}
+
@@ -28,7 +29,7 @@
-
+
@@ -52,13 +53,13 @@
- 生成证书
+ 生成证书
结束答题
再来一次
- 生成证书
+ 生成证书
结束答题
@@ -96,6 +97,7 @@
showAnswer:false,
ansicon100:require('../../static/answer100icon.png'),
ansicon80:require('../../static/answer80icon.png'),
+ maskHeight:0,
}
},
onLoad() {
@@ -118,6 +120,11 @@
url:'/pages/me/me'
})
},
+ toCer(){
+ uni.redirectTo({
+ url:'/pages/certificate/certificate'
+ })
+ },
againAnswer(){
setTimeout(() => {
this.$router.go(0)
@@ -179,6 +186,11 @@
},
submitQue(){
console.log("this.myAnswer",this.myAnswer)
+ let that = this
+ const query = uni.createSelectorQuery().in(this);
+ query.select('.wrap').boundingClientRect(({ height }) => {
+ that.maskHeight = height + 'px'
+ }).exec();
if(this.myAnswer.length>0){
let count = 0
this.myAnswer.map(item=>{
@@ -190,7 +202,8 @@
}else{
this.correctScore = 0
}
- let that = this
+ this.showAnswer = true
+
this.util.request({
api: '/api/mobile/quiz/save-quiz-simple',
data: {
@@ -201,8 +214,8 @@
method: 'POST',
utilSuccess: function(res) {
console.log(res)
- this.showAnswer = true
- clearTimeout(this.timer)
+ that.showAnswer = true
+ clearTimeout(that.timer)
},
utilFail: function(res) {
@@ -260,7 +273,7 @@
that.answerSubmit = true
// return
}
- },100)
+ },1500)
},
countdown(duration, onTick, onEnd) {
@@ -293,7 +306,7 @@
/* padding-top: 11vh; */
}
.wrap{
- height: 100%;
+ /* height: 100%; */
width:100%;
}
@@ -415,8 +428,9 @@
width:100%;
height:100%;
background-color: rgba(0,0,0,0.7);
- padding-top:397rpx;
- padding-bottom:300rpx;
+ /* padding-top:397rpx;
+ padding-bottom:300rpx; */
+ z-index:9;
}
.answertipitem{
position: absolute;
diff --git a/xietang-answer-h5/pages/certificate/certificate.vue b/xietang-answer-h5/pages/certificate/certificate.vue
index c97e167..8a869b3 100644
--- a/xietang-answer-h5/pages/certificate/certificate.vue
+++ b/xietang-answer-h5/pages/certificate/certificate.vue
@@ -9,10 +9,10 @@
-
+
-
-
+
+
@@ -50,7 +50,7 @@
-
+
请点击右上角将它发送给指定朋友或分享到朋友圈
@@ -68,7 +68,11 @@ export default {
userInfo: {},
isRotate: false,
scale: 1,
- imgData: ''
+ imgData: '',
+ certificate:require("../../static/certificate/certificate.png"),
+ icon1:require("../../static/certificate/icon1.png"),
+ title:require("../../static/certificate/title.png"),
+ toShare:require("../../static/toShare.png"),
};
},
methods: {
@@ -123,7 +127,7 @@ export default {
converToDate (date) {
let chinese = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
let y = date.getFullYear().toString();
- let m = date.getMonth().toString();
+ let m = (date.getMonth()+1).toString();
let d = date.getDate().toString();
let result = "";
for (let i = 0; i < y.length; i++) {
diff --git a/xietang-answer-h5/pages/index/index.vue b/xietang-answer-h5/pages/index/index.vue
index 4ab05f1..cf4e49b 100644
--- a/xietang-answer-h5/pages/index/index.vue
+++ b/xietang-answer-h5/pages/index/index.vue
@@ -16,10 +16,10 @@
-
+
-
+
@@ -32,7 +32,8 @@
export default {
data() {
return {
- isLogin:false,//是否注册
+ isLogin:false,//是否注册
+ isEnd:false,//是否结束
animations: [{
name: 'fadeIn',
duration: '1s',
@@ -43,17 +44,18 @@
show:false,
width:'750rpx',
height:'1650rpx'
- },{
- name: 'heartBeat',
- duration: '1.5s',
- timer: 1000,
- content: require('../../static/index/logo.png'),
- autoplay:false,
- class:'logo',
- show:false,
- width:'285rpx',
- height:'202rpx'
- },
+ },
+ // {
+ // name: 'heartBeat',
+ // duration: '1.5s',
+ // timer: 1000,
+ // content: require('../../static/index/logo.png'),
+ // autoplay:false,
+ // class:'logo',
+ // show:false,
+ // width:'285rpx',
+ // height:'202rpx'
+ // },
{
name: 'fadeIn',
duration: '1s',
@@ -62,8 +64,8 @@
autoplay:false,
class:'logo1',
show:false,
- width:'671rpx',
- height:'336rpx'
+ width:'242rpx',
+ height:'432rpx'
},
{
name: 'fadeInUp',
@@ -74,7 +76,7 @@
class:'logo2',
show:false,
width:'750rpx',
- height:'802rpx'
+ height:'605rpx'
}
],
logo20:require('../../static/index/2logo.png'),
@@ -105,45 +107,40 @@
onLoad() {
// this.play2(0)
// this.getUserInfo()
- this.play(3)
+ this.getConfig()
+ this.play(2)
},
- methods: {
- // getUserInfo(){
- // let userinfo = uni.getStorageSync('userInfo')
- // if(userinfo){
- // this.isLogin = true
- // }
- // },
+ methods: {
play(index){
// 第一屏结束
if(index<0){
// 第一屏结束
- let that = this
- var animation = uni.createAnimation({
- duration: 1500,
- timingFunction: 'ease-in',
- })
- // this.animations[1]['show'] = true
- setTimeout(function(){
- that.animations[1]['show'] = false
- },500)
- animation.opacity(0).width("135rpx").height("100rpx").top('106rpx').left('55rpx').step()
- this.animationData = animation.export()
- // 第二屏logo
- var animation20 = uni.createAnimation({
- duration: 2500,
- timingFunction: 'ease-in'
- })
- animation20.opacity(1).step()
- this.animationData20 = animation20.export()
- // 第二屏s
- var animation1 = uni.createAnimation({
- duration: 2000,
- timingFunction: 'ease-in',
- })
- animation1.opacity(1).step()
- this.animationData1 = animation1.export()
- this.play2()
+ // let that = this
+ // var animation = uni.createAnimation({
+ // duration: 1500,
+ // timingFunction: 'ease-in',
+ // })
+ // // this.animations[1]['show'] = true
+ // setTimeout(function(){
+ // that.animations[1]['show'] = false
+ // },500)
+ // animation.opacity(0).width("135rpx").height("100rpx").top('106rpx').left('55rpx').step()
+ // this.animationData = animation.export()
+ // // 第二屏logo
+ // var animation20 = uni.createAnimation({
+ // duration: 2500,
+ // timingFunction: 'ease-in'
+ // })
+ // animation20.opacity(1).step()
+ // this.animationData20 = animation20.export()
+ // // 第二屏s
+ // var animation1 = uni.createAnimation({
+ // duration: 2000,
+ // timingFunction: 'ease-in',
+ // })
+ // animation1.opacity(1).step()
+ // this.animationData1 = animation1.export()
+ // this.play2()
return
}
this.animations[index]['show'] = true
@@ -179,14 +176,48 @@
this.animationData23 = animation23.export()
this.towhere()
},
+ getConfig(){
+ // /
+ let that = this
+ this.util.request({
+ api: '/api/mobile/user/wechat-login-url',
+ method: 'GET',
+ data:{
+ activity_tag:'bbfc'
+ },
+ utilSuccess: (res) => {
+ that.isEnd = that.isCurrentTimeBetween(res.start_time,res.end_time)
+ let config = res.config
+ config.map(item=>{
+ if(item.key==='active_tip'){
+ uni.setStorageSync('active_tip',item.value)
+ }
+ })
+
+ uni.setStorageSync('isEnd',that.isEnd)
+ // this.userInfo = res;
+ // uni.setStorageSync("userInfo",res)
+ },
+ utilFail: (res) => {
+ this.util.toast(res)
+ }
+ })
+ },
+ isCurrentTimeBetween(startTime, endTime) {
+ const now = new Date();
+ const start = new Date(startTime);
+ const end = new Date(endTime);
+
+ return now >= start && now <= end;
+ },
towhere(isclick){
let userinfo = uni.getStorageSync('userInfo')
let url = '/pages/login/index'
if(userinfo){
url = '/pages/me/me'
}
- console.log(userinfo,url,isclick)
// return
+ // 不点击 动画结束后延时进入
if(isclick){
uni.navigateTo({
url:url
@@ -240,8 +271,8 @@
.logo1 {
position: absolute;
- bottom: 520rpx;
- left: 60rpx;
+ bottom: 670rpx;
+ left: 270rpx;
}
.logo2 {
diff --git a/xietang-answer-h5/pages/login/index.vue b/xietang-answer-h5/pages/login/index.vue
index 9a7ba79..d9a39bb 100644
--- a/xietang-answer-h5/pages/login/index.vue
+++ b/xietang-answer-h5/pages/login/index.vue
@@ -67,12 +67,14 @@ export default {
address: '',
department_id:''
},
- showTip:true
+ showTip:false,
+ isEnd:true,
}
},
onLoad() {
this.getParty()
-
+ this.isEnd = uni.getStorageSync('isEnd')
+ console.log(this.isEnd)
},
methods: {
openMe(){
@@ -81,6 +83,15 @@ export default {
})
},
openAnswer(){
+ if(!this.isEnd){
+ this.util.toast("答题已结束")
+ setTimeout(function(){
+ uni.redirectTo({
+ url:'/pages/me/me'
+ })
+ },3500)
+ return
+ }
uni.redirectTo({
url:'/pages/answer/index'
})
diff --git a/xietang-answer-h5/pages/me/me.vue b/xietang-answer-h5/pages/me/me.vue
index 6395f01..f9e9951 100644
--- a/xietang-answer-h5/pages/me/me.vue
+++ b/xietang-answer-h5/pages/me/me.vue
@@ -133,19 +133,7 @@
-
- 1、填写真实姓名、手机号、居住地所属党支部
-
-
- 2、答题时间3月x日至3月xx日
-
- 3、答题数目10题,答完一道题显示一道题正确答案;一道题目10分,得分100分的页面可生成“优秀之星”证书,得分90分及以下显示再接再厉;题库随机抽题目;每个微信号2次学习机会,以最高成绩为准。
-
-
- 4、答题时间为15分钟
-
- 5、竞赛结束后抽出20名优胜奖。
-
+
@@ -153,7 +141,6 @@
-
@@ -180,12 +167,17 @@ export default {
showwin:false,
showtips:false,
winimg:require('../../static/index/logo2.png'),
- tiptitle:require('../../static/tiptitle.png')
-
+ tiptitle:require('../../static/tiptitle.png'),
+ isEnd:true,
+ active_tip:'',
};
},
methods: {
toanswer(){
+ if(!this.isEnd){
+ this.util.toast("答题已结束")
+ return
+ }
if(this.answercount==2){
this.util.toast("每人只有2次答题机会")
return
@@ -255,6 +247,8 @@ export default {
onLoad() {
this.getUserInfo()
this.getQuestion()
+ this.isEnd = uni.getStorageSync('isEnd')
+ this.active_tip = uni.getStorageSync('active_tip')
},
}
diff --git a/xietang-answer-h5/pages/record/index.vue b/xietang-answer-h5/pages/record/index.vue
index a8d644e..c5e7eca 100644
--- a/xietang-answer-h5/pages/record/index.vue
+++ b/xietang-answer-h5/pages/record/index.vue
@@ -20,17 +20,17 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
+
@@ -53,14 +53,14 @@
-
+
- 80分
+ {{item.score}}分
- 第一次答题
- 2024-02-03 12:00
+ 第{{countList[index]}}答题
+ {{item.created_at?item.created_at.substring(0,16):''}}
@@ -76,15 +76,45 @@ export default {
data() {
return {
src: "http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg",
+ stage:require("../../static/me/bkg-back.png"),
+ grass1:require("../../static/me/grass1.png"),
+ grass2:require("../../static/me/grass2.png"),
+ cloud1:require("../../static/me/cloud1.png"),
+ cloud2:require("../../static/me/cloud2.png"),
+ shuibaxian:require("../../static/me/shuibaxian.png"),
+ logo:require("../../static/index/logo.png"),
+ pencil:require("../../static/me/pencil.png"),
+ record:require("../../static/me/record.png"),
+ collect:require("../../static/me/collect.png"),
userInfo: {},
answercount:0,
+ askList:[],
+ countList:["一","二"],
+
};
},
methods: {
-
+ getQuestion(){
+ let that = this
+ this.util.request({
+ api: '/api/mobile/quiz/get-questions',
+ data: {
+ activity_tag:'bbfc'
+ },
+ method: 'GET',
+ utilSuccess: function(res) {
+ that.answercount = res.ask_count
+ that.askList = res.ask
+ },
+ utilFail: function(res) {
+ that.util.toast(res)
+ }
+ })
+ },
},
onLoad() {
this.userInfo = uni.getStorageSync("userInfo")
+ this.getQuestion()
},
}
diff --git a/xietang-answer-h5/static/certificate/icon1.png b/xietang-answer-h5/static/certificate/icon1.png
index d32b47f..97c2581 100644
Binary files a/xietang-answer-h5/static/certificate/icon1.png and b/xietang-answer-h5/static/certificate/icon1.png differ
diff --git a/xietang-answer-h5/static/index/2logo1.png b/xietang-answer-h5/static/index/2logo1.png
index e596b5f..05eeb67 100644
Binary files a/xietang-answer-h5/static/index/2logo1.png and b/xietang-answer-h5/static/index/2logo1.png differ
diff --git a/xietang-answer-h5/static/index/2logo2.png b/xietang-answer-h5/static/index/2logo2.png
index 7136955..28aeaae 100644
Binary files a/xietang-answer-h5/static/index/2logo2.png and b/xietang-answer-h5/static/index/2logo2.png differ
diff --git a/xietang-answer-h5/static/index/logo1.png b/xietang-answer-h5/static/index/logo1.png
index f6ef768..79d8ed9 100644
Binary files a/xietang-answer-h5/static/index/logo1.png and b/xietang-answer-h5/static/index/logo1.png differ
diff --git a/xietang-answer-h5/static/index/logo12.png b/xietang-answer-h5/static/index/logo12.png
new file mode 100644
index 0000000..f6ef768
Binary files /dev/null and b/xietang-answer-h5/static/index/logo12.png differ
diff --git a/xietang-answer-h5/static/index/logo2.png b/xietang-answer-h5/static/index/logo2.png
index 9a78957..ebbd727 100644
Binary files a/xietang-answer-h5/static/index/logo2.png and b/xietang-answer-h5/static/index/logo2.png differ
diff --git a/xietang-answer-h5/static/index/logo22.png b/xietang-answer-h5/static/index/logo22.png
new file mode 100644
index 0000000..9a78957
Binary files /dev/null and b/xietang-answer-h5/static/index/logo22.png differ