themes/index/city/index.js

(开头部分) 1KB

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

var query
new Vue({
	el:"#App",
	data: function() {
		return {
			aaBoxClass: "",
			keyword: "",
			searchList: {},
			city: "厦门",
			cityGroup: {},
			zm: "A",
			zms: {},
			recList: {}
		}
	},
	created: function() {
		var that=this;
		that.city=localStorage.getItem("city");
		
		this.getPage();
		$(window).on("scroll",function(e){
			
			var y = $(window).scrollTop();
			 
			var zms = that.zms;
			for (var el in zms) {
				if (zms[el] > y+40) {
					that.zm = el;
					break;
				}
			}
		}) 

	},
 
	methods: {
		search: function() {
			var that = this;
			setTimeout(function() {
				$.ajax({
					dataType:"json",
					url: "/index.php?m=city&a=search&ajax=1&city=" + that.keyword,
					success: function(res) {
						that.searchList = res.data.list
					}
				})
			}, 30)

		},
		searchShow: function() {
			this.aaBoxClass = "flex-col";
		},
		setCity: function(acity,cityid) {
			localStorage.setItem("city",acity);
			localStorage.setItem("cityid",cityid);
			this.city = acity;
			goBack();
		},
		setZm: function(zm) {
			this.zm = zm;
后面还有 34 行代码,购买后查看完整代码

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

AI 解读 AI

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

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