topus.js 760 字节

new Vue({
	el:'#card',
	data:{
		cardindex:[]
	},
	created: function() {
		this.details();
	},
	methods: {
		//获取信息
		details: function() {
			var that = this;
			var url = '/Card/index'
			var params = {
				
			}
			ajaxsend(url, params, function(res) {
				/*console.log(JSON.stringify(res))*/
				console.log(res);
				var data=res.data;
				that.cardindex=data;
				console.log(that.cardindex)
			})
		},
		//充值卡充值
		recharge:function(obj){
			var that = this;
			var id=obj.id;

			var url = '/Card/recharges'
			var params = {
				unique_id: localStorage.getItem('unique_id'),
				id:id,
				from:2,
			}
			ajaxsend(url, params, function(res) {
				/*console.log(JSON.stringify(res))*/
				console.log(res);
			})
			
		},
	},
	
	
})