Commit 2ece4a83 by 陈超

A

parent b0a54753
...@@ -900,3 +900,38 @@ div::-webkit-scrollbar { ...@@ -900,3 +900,38 @@ div::-webkit-scrollbar {
.goods_detail_top { .goods_detail_top {
} }
/* 真题 */
.zhenti_my_collect_list_container {
position: relative;
box-sizing: border-box;
padding-top: 2.25rem;
}
.zhenti_tab {
position: fixed !important;
top: 2.75rem;
width: 100%;
height: 2.25rem;
}
.zhenti_tab_normal {
font-size:14px;
font-weight:600;
color:rgba(51,51,51,1);
}
.zhenti_tab_selected {
font-size:14px;
font-weight:600;
color:rgba(101,192,0,1);
}
.zhenti_my_collect_cell {
padding: 0.75rem;
margin-bottom: 0.5rem;
}
.zhenti_my_collect_cell_time {
margin-top: 0.75rem;
}
\ No newline at end of file
...@@ -139,7 +139,9 @@ ...@@ -139,7 +139,9 @@
<van-tabbar-item> <van-tabbar-item>
<span class="text_10_400">真题题库</span> <span class="text_10_400">真题题库</span>
<template #icon="props"> <template #icon="props">
<a href="{:U('home/Home/exams')}">
<img :src="props.active ? '__THEME__/img/zhenti.png' : '__THEME__/img/zhenti_s.png'" /> <img :src="props.active ? '__THEME__/img/zhenti.png' : '__THEME__/img/zhenti_s.png'" />
</a>
</template> </template>
</van-tabbar-item> </van-tabbar-item>
<van-tabbar-item> <van-tabbar-item>
......
<include file="__THEME__/public_header_w3g"/> <include file="__THEME__/public_header_w3g" />
<link rel="stylesheet" type="text/css" href="{$Think.APPS_URL}/exams/_static/css/public.css">
<link rel="stylesheet" type="text/css" href="{$Think.APPS_URL}/exams/_static/icon/iconfont.css">
<link rel="stylesheet" type="text/css" href="{$Think.APPS_URL}/exams/_static/css/public_header_footer_media.css">
<link rel="stylesheet" type="text/css" href="{$Think.APPS_URL}/exams/_static/css/exam_2.0.css">
<div class="cover"></div> <div id="app">
<div class="layout_v tab_container">
<van-tabs :border="false" v-model="tab" sticky @change="onTopTab" line-width="72px" line-height="4px" background="white"
color="#A3E460" title-inactive-color="#333333" title-active-color="#A3E460">
<div class="min-height-wrap"> <van-tab>
<div class="suren-box"> <span slot="title" v-bind:class="tab == 0 ? 'tab_text_selected' : 'tab_text_normal'">
<ul class="suren-coas"> 真题演练
<li <php>if(!$_GET['tab'] || $_GET['tab'] == 1){</php>class="on"<php>}</php>> <a href="{:U('home/Home/exams',['tab'=>1])}">练习记录</a></li>
<li <eq name="Think.get.tab" value="2">class="on"</eq>><a href="{:U('home/Home/exams',['tab'=>2])}">考试记录</a></li>
<li <eq name="Think.get.tab" value="3">class="on"</eq>><a href="{:U('home/Home/exams',['tab'=>3])}">错题记录</a></li>
<li <eq name="Think.get.tab" value="4">class="on"</eq>><a href="{:U('home/Home/exams',['tab'=>4])}">题目收藏</a></li>
<li <eq name="Think.get.tab" value="5">class="on"</eq>><a href="{:U('home/Home/exams',['tab'=>5])}">高频练习</a></li>
</ul>
<div class="asmarfr-pr">
<switch name="Think.get.tab">
<case value="3">
<!--错题记录-->
<php>if($list['data']){</php>
<ul class="suren-content">
<volist name="list.data" id="vo">
<li>
<a href="#">
<span>
<h4>{$vo.paper_info.exams_paper_title}</h4>
<p>{$vo['update_time']|friendlyDate}</p>
</span> </span>
<strong>{$vo.wrong_count}道错题</strong> <van-sticky :offset-top="44">
<a href="{:U('exams/Index/wrongExamsroom',['joinType'=>1,'paper_id'=>$vo['exams_paper_id'],'temp'=>$vo['exams_users_id']])}" class='btn exams'>错题再练</a> <div class="layout_v">
<a class='btn del deleteExeams' data-temp_id="{$vo.exams_users_id}">删除</a> <van-dropdown-menu active-color="#333333">
</a> <van-dropdown-item title="筛选" ref="item">
</li> <div class="drop_down_grid">
</volist> <div class="drop_down_option_selected">全部</div>
</ul> <div class="drop_down_option">事业单位</div>
<php>}else{</php> <div class="drop_down_option">公考面试</div>
<include file="__THEME__/no_data_w3g" /> <div class="drop_down_option">教师</div>
<php>}</php> <div class="drop_down_option">财会</div>
</case> <div class="drop_down_option">银行</div>
<case value="4"> <div class="drop_down_option">法考</div>
<!--题目收藏--> <div class="drop_down_option">考研</div>
<php>if($list['data']){</php> </div>
<ul class="suren-content collection"> </van-dropdown-item>
<volist name="list.data" id="vo"> </van-dropdown-menu>
<li> <div class="drop_down_selected_container">
<a href="#"> <div class="color_primary text_14_400 drop_down_selected_item">公务员</div>
<span> </div>
<php>if($vo['question_info']['content']){</php> </div>
<h4>{:t($vo['question_info']['content'])}</h4> </van-sticky>
<php>}else{</php> <div class="layout_v list_container">
<h4 style="color: #F00;">该试题已被删除</h4> <!-- 项目1 -->
<php>}</php> <div v-for="(idx, index) in [1,2,3,4,5,6,7,8,9,10]" :key="idx" class="class_item layout_h">
<p>{$vo['ctime']|friendlyDate}</p> <div class="class_left layout_v weight_full">
</span> <div class="layout_h">
<php>if($vo['question_info']['content']){</php> <div class="mark_green layout_center">免费</div>
<a href="{:U('exams/Index/showQuestioninfo',['question_id'=>$vo['source_id']])}" class="btn exams">查看题目</a> <span class="text_14_600 color_333333 weight_full van-multi-ellipsis--l2" style="margin-left: 0.625rem;">2020年国家公务员《行测》试卷(省级)-名师版</span>
<a class='btn del deleteCollection' data-question_id="{$vo.source_id}">删除</a> </div>
<php>}else{</php> <div class="layout_h" style="margin-top: 1.25rem;">
<a class='btn del deleteCollection' style="right: -95px;" data-question_id="{$vo.source_id}">删除</a> <span class="text_12_400 color_999999">题数:45</span>
<php>}</php> <span class="class_attr text_12_400 color_999999">推荐用时:45m</span>
<span class="class_attr text_12_400 color_999999">45121已做</span>
</div>
</div>
<div class="class_right layout_center">
<div class="button_green layout_center">开始做题</div>
</div>
</div>
<!-- 项目2 -->
<div class="class_item layout_h">
<div class="class_left layout_v weight_full">
<div class="layout_h">
<div class="mark_orange layout_center">付费</div>
<span class="text_14_600 color_333333 weight_full van-multi-ellipsis--l2" style="margin-left: 0.625rem;">2020年国家公务员《行测》试卷(省级)-名师版</span>
</div>
<div class="layout_h" style="margin-top: 1.25rem;">
<span class="text_12_400 color_999999">题数:45</span>
<span class="class_attr text_12_400 color_999999">推荐用时:45m</span>
<span class="class_attr text_12_400 color_999999">45121已做</span>
</div>
</div>
<div class="class_right layout_center">
<div class="button_orange layout_center">¥23</div>
</div>
</div>
<!-- 项目3 -->
<div class="class_item layout_h">
<div class="class_left layout_v weight_full">
<div class="layout_h">
<div class="mark_orange layout_center">付费</div>
<span class="text_14_600 color_333333 weight_full van-multi-ellipsis--l2" style="margin-left: 0.625rem;">2020年国家公务员《行测》试卷(省级)-名师版</span>
</div>
<div class="layout_h" style="margin-top: 1.25rem;">
<span class="text_12_400 color_999999">题数:45</span>
<span class="class_attr text_12_400 color_999999">推荐用时:45m</span>
<span class="class_attr text_12_400 color_999999">45121已做</span>
</div>
</div>
<div class="class_right layout_center">
<div class="button_green layout_center">开始做题</div>
</div>
</div>
</div>
</van-tab>
</a> <van-tab>
</li> <span slot="title" v-bind:class="tab == 1 ? 'tab_text_selected' : 'tab_text_normal'">
</volist> 真题下载
</ul>
<php>}else{</php>
<include file="__THEME__/no_data_w3g" />
<php>}</php>
</case>
<case value="5">
<!--高频练习-->
<php>if($list['data']){</php>
<ul class="suren-content">
<volist name="list.data" id="vo">
<li>
<a href="#">
<span>
<h4>{$vo.exams_paper_title}</h4>
<p>{$vo['update_time']|friendlyDate}</p>
</span> </span>
<strong>0分</strong> <van-sticky :offset-top="44">
<a href="{:U('exams/Index/wrongExamsroom',['joinType'=>1,'paper_id'=>$vo['exams_paper_id'],'temp'=>$vo['exams_users_id'],'is_highwrong'=>1])}" class='btn exams'>开始练习</a> <van-dropdown-menu active-color="#333333">
<!-- <a class='btn del deleteExeams' data-temp_id="{$vo.exams_users_id}">删除</a> --> <van-dropdown-item title="筛选" ref="item">
</a> <div class="drop_down_grid">
</li> <div class="drop_down_option_selected">全部</div>
</volist> <div class="drop_down_option">事业单位</div>
</ul> <div class="drop_down_option">公考面试</div>
<php>}else{</php> <div class="drop_down_option">教师</div>
<include file="__THEME__/no_data_w3g" /> <div class="drop_down_option">财会</div>
<php>}</php> <div class="drop_down_option">银行</div>
</case> <div class="drop_down_option">法考</div>
<default /> <div class="drop_down_option">考研</div>
<!--练习记录 考试记录--> </div>
<php>if($list['data']){</php> </van-dropdown-item>
<ul class="suren-content"> </van-dropdown-menu>
<volist name="list.data" id="vo"> </van-sticky>
<li> <div class="layout_v list_container">
<span> <!-- 项目1 -->
<h4>{$vo.paper_info.exams_paper_title}<if condition="$vo['course_title']"><a href="{:U('course/Video/view',array('id'=>$vo['vid']))}">{$vo.course_title}</a></if></h4> <div class="class_item layout_h">
<p>{$vo['update_time']|friendlyDate}</p> <div class="class_left layout_v weight_full">
<div class="layout_h">
<div class="mark_green layout_center">免费</div>
<span class="text_14_600 color_333333 weight_full van-multi-ellipsis--l2" style="margin-left: 0.625rem;">2020年国家公务员《行测》试卷(省级)-名师版</span>
</div>
<div class="layout_h" style="margin-top: 1.25rem;">
<span class="text_12_400 color_999999">题数:45</span>
<span class="class_attr text_12_400 color_999999">推荐用时:45m</span>
<span class="class_attr text_12_400 color_999999">45121已做</span>
</div>
</div>
<div class="class_right layout_center">
<div class="button_green layout_center">下载试题</div>
</div>
</div>
<!-- 项目2 -->
<div class="class_item layout_h">
<div class="class_left layout_v weight_full">
<div class="layout_h">
<div class="mark_orange layout_center">付费</div>
<span class="text_14_600 color_333333 weight_full van-multi-ellipsis--l2" style="margin-left: 0.625rem;">2020年国家公务员《行测》试卷(省级)-名师版</span>
</div>
<div class="layout_h" style="margin-top: 1.25rem;">
<span class="text_12_400 color_999999">题数:45</span>
<span class="class_attr text_12_400 color_999999">推荐用时:45m</span>
<span class="class_attr text_12_400 color_999999">45121已做</span>
</div>
</div>
<div class="class_right layout_center">
<div class="button_green layout_center">下载试题</div>
</div>
</div>
</div>
</van-tab>
<van-tab>
<span slot="title" v-bind:class="tab == 2 ? 'tab_text_selected' : 'tab_text_normal'">
我的题库
</span> </span>
<php>if($vo['progress'] == 100){</php> <div class="layout_v zhenti_my_collect_list_container">
<strong>{$vo.score|default="0"}分</strong> <div class="layout_h zhenti_tab">
<a href="{:U('exams/Index/examsresult',['joinType'=>$vo['exams_mode'],'paper_id'=>$vo['exams_paper_id'],'temp'=>$vo['exams_users_id']])}" class='btn show'>查看结果</a> <div @click="onMyTab(0)" class="layout_center weight_full" :class="myTab == 0 ? 'zhenti_tab_selected' : 'zhenti_tab_normal'">已做</div>
<a class='btn del deleteExeams' data-temp_id="{$vo.exams_users_id}">删除</a> <div @click="onMyTab(1)" class="layout_center weight_full" :class="myTab == 1 ? 'zhenti_tab_selected' : 'zhenti_tab_normal'">收藏</div>
<php>}else{</php> </div>
<i class="icon icon-weiwancheng"></i> <div v-if="myTab == 1" class="zhenti_my_collect_cell layout_v">
<a href="{:U('exams/Index/examsroom',['joinType'=>$vo['exams_mode'],'paper_id'=>$vo['exams_paper_id'],'temp'=>$vo['exams_users_id']])}" class='btn exams'>继续答题</a> <div class="text_16_600 color_333333">某种糖果的进价为12元/千克,现购进这种糖果若干千克,每天销售10千克,且从第二天起每天都比前一天降价2元/千克。已知以6元/千克的价格销售的那天正好卖完最后10千克,且总销售额是总进货成本的2倍。问总共进了多少千克这种糖果?</div>
<a class='btn del deleteExeams' data-temp_id="{$vo.exams_users_id}">删除</a> <div class="text_12_400 color_999999 zhenti_my_collect_cell_time">2020-04-04 03:12:56</div>
<php>}</php> </div>
</li> <!-- 项目2 -->
</volist> <div v-if="myTab == 0" class="class_item layout_h">
</ul> <div class="class_left layout_v weight_full">
<php>}else{</php> <div class="layout_h">
<include file="__THEME__/no_data_w3g" /> <div class="mark_orange layout_center">付费</div>
<php>}</php> <span class="text_14_600 color_333333 weight_full van-multi-ellipsis--l2" style="margin-left: 0.625rem;">2020年国家公务员《行测》试卷(省级)-名师版</span>
</switch> </div>
<div class="layout_h" style="margin-top: 1.25rem;">
<span class="text_12_400 color_primary">得分:80</span>
<span class="class_attr text_12_400 color_999999">2020-04-04 03:12:56</span>
</div>
</div> </div>
<div class="class_right layout_center">
<div class="button_green layout_center">查看详情</div>
</div>
</div>
</div>
</van-tab>
</van-tabs>
</div> </div>
<van-tabbar v-model="active" @change="onChange" :fixed="true" :route="false" :safe-area-inset-bottom="true"
active-color="#65C000" inactive-color="#363636">
<van-tabbar-item>
<span class="text_10_400">名师课堂</span>
<template #icon="props">
<a href="{:U('classroom/Index/index')}">
<img :src="props.active ? '__THEME__/img/minshi.png' : '__THEME__/img/minshi_s.png'" />
</a>
</template>
</van-tabbar-item>
<van-tabbar-item>
<span class="text_10_400">真题题库</span>
<template #icon="props">
<a href="{:U('home/Home/exams')}">
<img :src="props.active ? '__THEME__/img/zhenti.png' : '__THEME__/img/zhenti_s.png'" />
</a>
</template>
</van-tabbar-item>
<van-tabbar-item>
<span class="text_10_400">考试咨询</span>
<template #icon="props">
<a href="{:U('classroom/Index/find')}">
<img :src="props.active ? '__THEME__/img/zixun.png' : '__THEME__/img/zixun_s.png'" />
</a>
</template>
</van-tabbar-item>
<van-tabbar-item>
<span class="text_10_400">会员中心</span>
<template #icon="props">
<if condition="$_SESSION['mid']">
<a href="{:U('home/User/index')}">
<else />
<a href="{:U('basic/Passport/login')}">
</if>
<img :src="props.active ? '__THEME__/img/huiyuan.png' : '__THEME__/img/huiyuan_s.png'" />
</a>
</template>
</van-tabbar-item>
</van-tabbar>
</div> </div>
<include file="__THEME__/public_footer_w3g"/>
<script src="{$Think.APPS_URL}/exams/_static/js/public_header_footer_media.js"></script>
<script src="{$Think.APPS_URL}/exams/_static/js/swipe.js" charset="utf-8"></script>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ new Vue({
$('.suren-content li').rhuiSwipe('swipeLeft', function(event){ el: '#app',
var left = 0; data: function() {
$(this). find(".btn").each(function(){ return {
left += $(this).width(); active: 1,
$(this).css({lineHeight:$(this).height()+'px'}); tab: 0,
}); myTab: 0
$(this).animate({left:"-"+left+"px"},500);
$(this).siblings().css("left","0px");
}, {
// 可选参数
isStopPropagation: false,
isPreventDefault: false,
triggerOnMove: true
});
$('.suren-content li').rhuiSwipe('swipeRight', function(event){
$(this).animate({left:"0px"},500);
$(this).siblings().animate({left:0},500);
}, {
// 可选参数
isStopPropagation: false,
isPreventDefault: false,
triggerOnMove: true
});
$('.suren-content li').click(function(){
if($(this).css("left") == '0px'){
var left = 0;
$(this).find(".btn").each(function(){
left += $(this).width();
$(this).css({lineHeight:$(this).height()+'px'});
});
$(this).animate({left:"-"+left+"px"},500);
$(this).siblings().css("left","0px");
}else{
$(this).animate({left:"0px"},500);
$(this).siblings().animate({left:0},500);
}
});
// 删除考试记录
$(".deleteExeams").live('click',function(){
var temp_id = $(this).data('temp_id');
ui.confirm('确认删除该记录吗?', {
yes: function () {
$.post('{:U("exams/Index/deleteExeams")}',{temp_id:temp_id},function(res){
if(typeof(res) != "object"){
try{
var res = JSON.parse(res);
}catch(e){
ui.error("请求出错,请稍后再试");
return false;
}
}
if(res.status == 1){
ui.success(res.data.info);
window.location.reload();
}else{
ui.error(res.message);
return false;
}
});
}
});
});
// 取消收藏
$(".deleteCollection").live('click',function(){
var question_id = $(this).data('question_id');
ui.confirm('确认删除该试题吗?', {
yes: function () {
// 后台
$.post(U('exams/Index/collect'),{action:0,source_id:question_id},function(res){
if(typeof(res) != 'object'){
try{
var res = JSON.parse(res);
}catch(e){
ui.error("处理异常,请重新尝试");
return false;
}
}
if(res.status == 1){
ui.success(res.data.info);
window.location.reload();
return true;
}else{
ui.error(res.message);
return false;
} }
});
}
});
});
var p = 1;
$(window).scroll(function(){
var scrollTop = $(this).scrollTop();
var scrollHeight = $(document).height();
var windowHeight = $(this).height();
if(scrollTop + windowHeight == scrollHeight){
if(!p || p >= parseInt("{$list['totalPages']}")){
return false;
}else{
p = p+1;
$.ajax({
type: "GET",
url:"{:U('home/Home/exams',['tab'=>$_GET['tab']])}",
data:{
tab:'{$Think.get.tab}',
p:p
}, },
dataType:"json", methods: {
success:function(res){ onChange: function(tab) {
if(typeof(res) != 'object'){
try{
var res = JSON.parse(res);
}catch(e){
ui.error("处理异常,请重新尝试");
return false;
}
}
if(res.status == 1){ },
$(".asmarfr-pr ul").append(res.data.html); onTopTab: function(tab) {
return true;
}
} },
}); onMyTab: function(tab) {
this.myTab = tab
} }
} }
}); })
});
</script> </script>
...@@ -103,7 +103,9 @@ ...@@ -103,7 +103,9 @@
<van-tabbar-item> <van-tabbar-item>
<span class="text_10_400">真题题库</span> <span class="text_10_400">真题题库</span>
<template #icon="props"> <template #icon="props">
<a href="{:U('home/Home/exams')}">
<img :src="props.active ? '__THEME__/img/zhenti.png' : '__THEME__/img/zhenti_s.png'" /> <img :src="props.active ? '__THEME__/img/zhenti.png' : '__THEME__/img/zhenti_s.png'" />
</a>
</template> </template>
</van-tabbar-item> </van-tabbar-item>
<van-tabbar-item> <van-tabbar-item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment