/**
 * 确认收货
 * @param order_id  订单id
 */
function confirm(order_id){
	$.showConfirm("您确定要确认收货吗？",function(){
		var query = new Object;
		query.order_id=order_id;
		$.ajax({
			type:'post',
			data:query,
			url:APP+"Member/OrderInfo/confirm_order",
			success:function(data){
				if(data.status==1){
					$.showSuccess(data.msg,1,'hc');
					window.location.reload();
				}else{
					$.showErr(data.msg,1,'hc');
				}
			}
		});
	},'hc');
}
/**
 * 继续付款
 * @param order_id  订单ID
 */
function continu_pay(order_id){
	alert(order_id);
	$.showConfirm("您确定要继续付款吗？",function(){
		var query = new Object;
		query.order_id=order_id;
		$.ajax({
			type:'post',
			data:query,
			dataType: "json",
			url:APP+"Home/Order/continu_pay",
			success:function(data){
				alert(JSON.stringify(data));
				if(data.status==1){
					window.location.href=APP+"Home/Order/continue_payhtml/order_id/"+data.order_id;
				}else{
					$.showErr(data.msg,1,'hc');
				}
			}
		});
	},'hc');
}
/**
 * 取消订单
 * @param order_id  订单ID
 */
function cancel_order(order_id){
    $.showConfirm("您确定要取消订单吗？",function(){
        var query = new Object;
        query.order_id=order_id;
        $.ajax({
            type:'post',
            data:query,
            url:APP+"Member/OrderInfo/cancel_order",
            success:function(data){
                if(data.status==1){
                    $.showSuccess(data.msg,1,'hc');
                    window.location.reload();
                }else{
                    $.showErr(data.msg,1,'hc');
                }
            }
        });
    },'hc')
}
/**
 * 退款
 * @param order_goods   订单商品id
 */
function refund_money(order_goods,order_id,score){
	if(score=='th'){
		$.showConfirm("您确定要进行退货操作吗？",function(){
			$.openUrl(APP+"Member/OrderInfo/refund_content/order_id/"+order_id+"/order_goods/"+order_goods+"/score/"+score, "退货申请", 'ID', '410', function () {
				return false;
			}, function () {
				return false;
			});
		},'hc')
	}else if(score=='tk'){
		$.showConfirm("您确定要进行退款操作吗？",function(){
			$.openUrl(APP+"Member/OrderInfo/refund_content/order_id/"+order_id+"/order_goods/"+order_goods+"/score/"+score, "退款申请", 'ID', '410', function () {
				return false;
			}, function () {
				return false;
			});
		},'hc')
	}
}
/**
 * 删除订单
 * @param order_id  订单ID
 */
function del_order(order_id){
    $.showConfirm("您确定要删除订单吗？",function(){
        var query = new Object;
        query.order_id=order_id;
        $.ajax({
            type:'post',
            data:query,
            url:APP+"Member/OrderInfo/del_order",
            success:function(data){
                if(data.status==1){
                    $.showSuccess(data.msg,1,'hc');
                    window.location.reload();
                }else{
                    $.showErr(data.msg,1,'hc');
                }
            }
        });
    },'hc')
}
function connect_qq(qq){
    window.location.href="tencent://Message/?Uin="+qq+"&websiteName=123&Menu=yes";
}