themes/pc/inc/comment.js

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

var cmApp=new Vue({
	el:"#commentApp",
	data:function(){
		return {
			list:[],
			per_page:0,
			pageLoad:false,
			isFirst:true,
			content:"",
			formShow:false,
			cmBtn:true
		}
	},
	created:function(){
		this.getPage();
	},
	methods:{
		getPage:function(){
			var that=this;
			$.ajax({
				url:"/index.php?m=comment&tablename=" + comment_tablename + "&ajax=1&objectid=" + comment_objectid,
				dataType:"json",
				success:function(res){
					if (res.error) {
					    return false;
					}
					that.list=res.data.list;
					that.per_page=res.data.per_page;
					that.isFirst=false;
				}
			})
		},
		getList:function(){
			var that=this;
			$.ajax({
				url:"/index.php?m=comment&tablename=" + comment_tablename + "&ajax=1&objectid=" + comment_objectid,
				dataType:"json",
				success:function(res){
					if (res.error) {
					    return false;
					}
					that.per_page=res.data.per_page;
					for(var i in res.data.list){
						that.list.push(res.data.list[i])
					}
					 
				}
			})
		},
		reply:function(pid,nickname){
			comment_pid=pid;
			this.content="@"+nickname+" ";
			this.cmBtn=false;
			this.formShow=true;
			$("#comment-content").focus();
		},
		submit:function(){
			if(!postCheck.canPost()){
				return false;
			}
后面还有 41 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。