mui.plusReady(function(){
	// some ajax 
})
const app = new Vue({
	el: '#app',
	data() {
		return {
			ruleData: [
			]
		}
	},
	methods: {
		detail(index){
			console.log(this.ruleData[index])
			// some jump
		},
		loadData(){
			$.ajax({
				url: qlgUrl("app/trade_rule/index"),
				method: "GET",
				dataType: 'json',
				success: function(res){
					if(res.status == 1){
						this.ruleData = res.data;
						localStorage.setItem("LOCAL_RULE", JSON.stringify(res.data));
					}else{
						mui.alert(res.msg);
					}
				},
				error: function(err){
					mui.alert("请求失败");
					self.back();
				}
			});
		}
	},
	created() {
		var localData = localStorage.getItem("LOCAL_RULE");
		this.loadData();
		if(localData){
			try {
				JSON.parse(localData);
				this.ruleData = JSON.parse(localData);
			} catch (e) {
				
			}
		}
	}
})