themes/index/home/index.js

(开头部分) 1KB

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

var App=new Vue({
	el:"#App",
	data:function(){
		return {
			list:[],
			pageLoad:false,
			user:{}
			 
		}
	},
	created:function(){
		this.getPage();
	},
	watch:{
		pageLoad:function(n,o){
			console.log(n,o)
		}
	},
	methods:{
		goPm:function(userid){
			window.location="/index.php?m=pm&a=detail&userid="+userid;
			 
		},  
		goBlog:function(id){
			window.location="/module.php?m=forum&a=show&id="+id;
		},
		getPage:function(){
			var that=this;
			
			$.ajax({
				url:"/index.php?m=home&ajax=1",
				data:{
					userid:userid
				},
				dataType:"json",
				success:function(res){
					console.log(that.pageLoad);
					that.user=res.data.user;
					that.pageLoad=true;
				}
			})
		},
 
		toggleFollow:function(item){
			var that=this;
			$.ajax({
				url: "/index.php?m=follow&a=Toggle&ajax=1",
				dataType: "json",
				data: {
					t_userid: item.userid
				},
				success: function(res) {
					if(res.error){
						skyToast(res.message);
						return false;
					}
					item.isFollow = res.follow;
			
				}
			});
后面还有 3 行代码,购买后查看完整代码

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

AI 解读 AI

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

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