{"size": 1257, "ext": "js", "max_stars_repo_path": "weixin/mine/js/myvoucher.js", "max_stars_repo_name": "HongshunChen/yjt", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "weixin/mine/js/myvoucher.js", "max_issues_repo_name": "HongshunChen/yjt", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "weixin/mine/js/myvoucher.js", "max_forks_repo_name": "HongshunChen/yjt", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.2741935484, "max_line_length": 60, "alphanum_fraction": 0.553699284}
var myvoucher = {
	data: {},
	dataInit: function() {
		myvoucher.fn.initialize();
		myvoucher.fn.list_init();
	},
	eventBind: function() {},
	fn: {
		list_init: function() {
			$.ajax({
					type: 'GET',
					url: config.host + "/coupon/list",
					data: {
						token:localStorage.getItem('token'),
					},
					dataType: "jsonp",
					success: function(list) {
						console.log("请求成功");
						if (list.status == 1) {
							//成功操作
							myvoucher.fn.dataFill(list);
						} else {
							$.alert(list.data);
						}
					},
					error: function(xhr, type) {
						console.log("请求失败");
						$.alert('网络异常');
					}
				});
		},
		dataFill: function(list) {
			if (list) {
				var data = {
					total: list.data.length,
					list: list,
				};
				var html = template('daijinQuan', data);
				document.getElementById('daijin_quan').innerHTML = html;
			}
		},
		tagFill: function() {
			var data = {
				user_name: '个人中心',
				ChaBuDaoXinXi: '查不到信息',
			};
			var tem = template('page', data);
			document.getElementById('page').innerHTML = tem;
		},
		initialize: function() {
			myvoucher.fn.tagFill();
		},
		cordavaDataGet: function() {
			myvoucher.dataInit();
			myvoucher.eventBind();

		},
	}
}
$(function($) {
	myvoucher.fn.cordavaDataGet();
});