HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/cs.wgegeghx.com/templates/default/index/course/index.html
{include file="/header" /}

<div style='background:rgb(245,245,245);min-height:600px;margin-top:50px;' id='app'>
	<div class="w1200">
		<div class="container-top">
            <!--S 面包屑 -->
            <div class="bread-nav">
                <a href="/">首页</a> / {:catpos($moduleId)}
            </div>
            <!--E 面包屑 -->
        </div>
		<div class='course_cat'>
		   <div class='catList'>
		       <li><a v-on:click='getData(0)' :class="{'on':catid==0}">全部</a></li>
			   <li v-for='itm in cats'>
			      <a v-on:click='getData(itm.id)' :class="{'on':catid==itm.id}">
			        {{itm.catname}}
				  </a></li>
		   </div>
		</div>
	</div>

	<div class="w1200">
	   <ul class="content_list" v-cloak>
		  <li v-for="itm in data" class="content_item"   v-on:click='goUrl(itm.id)'>
		     <img :src="itm.thumb" />
			 <div class="main_title">{{itm.title}}</div>
			 
			 <div class="sub_title">
				<em class="price free" v-if="itm.price==0">免费</em>
				<em class="price price1" v-else>{{itm.price}}</em>
				<em class="item_right fr">{{itm.hits}}次学习</em>
			  </div>
		  </li>
	   </ul>
	   <div style='clear:both'></div>
	   <div>
	      <div class="loadmore loadmore-line loadmore-nodata" v-if='!more'>
		     <span class="loadmore-tips">暂无更多数据</span>
	      </div>
	      <div class="tc" v-else>
			<a class="btn btn-loadmore" v-on:click='loadMore()'>加载更多</a>
		  </div>
	   </div>
	   <br>
	</div>
</div>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.min.js"></script>

<script>
  
   {yzn module="cms" action="category" catid="$moduleId" cache="3600" order="listorder ASC" num="100" return="data"}
   var cats = <?php echo json_encode($data)?>;
   {/yzn}
   var vue_app = new Vue({
        el: '#app',
		data:{
		  data:[],
		  catid:0,
		  cats:cats,
		  page:1,
		  more:true
		},
		created:function(){
		   this.loadData();
		},
		methods:{
		  loadData(){
		     var that = this;
			 if(that.page == 1){
			    that.data = [];
			 }
		     $.getJSON("{:url('ajaxGetCourse')}", {catid:that.catid, page:that.page}, function(data){
			     if(data.length > 0){
				     that.data = that.data.concat(data);
				 }else{
				     that.more = false;
				 }
			 })
		  },
		  loadMore(){
		     this.page++;
			 this.loadData();
		  },
		  goUrl(id){
		      location.href = "/shows/"+id;
		  },
		  getData(id){
		     this.page  = 1;
			 this.catid = id;
			 this.more  = true;
			 this.loadData();
		  }
		}
    })
</script>
<style>
  [v-cloak]{
    display: none;
}
</style>
{include file="/footer" /}