vr-shopxo-source/app/index/controller/Orderaftersale.php

149 lines
4.0 KiB
PHP
Raw Normal View History

2019-05-24 05:57:10 +00:00
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
2021-03-16 02:34:52 +00:00
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
2019-05-24 05:57:10 +00:00
// +----------------------------------------------------------------------
2021-03-16 02:34:52 +00:00
// | Licensed ( https://opensource.org/licenses/mit-license.php )
2019-05-24 05:57:10 +00:00
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\index\controller;
2023-08-27 08:59:15 +00:00
use app\index\controller\Center;
use app\service\ApiService;
2019-05-24 05:57:10 +00:00
use app\service\OrderAftersaleService;
2019-12-24 07:18:56 +00:00
use app\service\SeoService;
2021-01-27 14:21:04 +00:00
use app\service\ResourcesService;
2019-05-24 05:57:10 +00:00
/**
* 订单售后
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
2023-08-27 08:59:15 +00:00
class Orderaftersale extends Center
2019-05-24 05:57:10 +00:00
{
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-11-30
* @desc description
*/
public function __construct()
{
parent::__construct();
}
/**
2020-06-30 15:32:16 +00:00
* 列表
2019-05-24 05:57:10 +00:00
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-28
* @desc description
*/
public function Index()
{
2019-12-24 07:18:56 +00:00
// 浏览器名称
2024-01-19 06:49:32 +00:00
MyViewAssign('home_seo_site_title', SeoService::BrowserSeoTitle(MyLang('orderaftersale.base_nav_title'), 1));
2021-07-18 15:42:10 +00:00
return MyView();
2019-05-24 05:57:10 +00:00
}
/**
2020-06-30 15:32:16 +00:00
* 详情
2019-05-24 05:57:10 +00:00
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-05-21
* @desc description
*/
2020-06-30 15:32:16 +00:00
public function Detail()
2019-05-24 05:57:10 +00:00
{
2026-03-04 02:21:47 +00:00
$params = $this->data_request;
$params['user'] = $this->user;
$ret = OrderAftersaleService::OrderAftersaleDetailData($params);
if($ret['code'] != 0)
2019-05-24 05:57:10 +00:00
{
2026-03-04 02:21:47 +00:00
return MyView('public/tips_error', ['msg'=>$ret['msg']]);
2019-05-24 05:57:10 +00:00
}
2026-03-04 02:21:47 +00:00
MyViewAssign($ret['data']);
return MyView();
2019-05-24 05:57:10 +00:00
}
/**
* 申请售后创建
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-05-23
* @desc description
*/
public function Create()
{
2019-05-27 10:40:31 +00:00
// 是否ajax请求
if(!IS_AJAX)
{
2023-01-19 09:44:03 +00:00
MyViewAssign('msg', MyLang('illegal_access_tips'));
2021-07-18 15:42:10 +00:00
return MyView('public/tips_error');
2019-05-27 10:40:31 +00:00
}
2020-06-30 15:32:16 +00:00
$params = $this->data_request;
2019-05-24 05:57:10 +00:00
$params['user'] = $this->user;
2024-04-15 02:25:01 +00:00
$params['creator'] = $this->user['id'];
$params['creator_name'] = $this->user['username'];
return ApiService::ApiDataReturn(OrderAftersaleService::AftersaleCreate($params));
2019-05-24 05:57:10 +00:00
}
/**
* 用户退货
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-05-23
* @desc description
*/
public function Delivery()
{
2019-05-27 10:40:31 +00:00
// 是否ajax请求
if(!IS_AJAX)
{
2023-01-19 09:44:03 +00:00
MyViewAssign('msg', MyLang('illegal_access_tips'));
2021-07-18 15:42:10 +00:00
return MyView('public/tips_error');
2019-05-27 10:40:31 +00:00
}
2020-06-30 15:32:16 +00:00
$params = $this->data_request;
2019-05-24 05:57:10 +00:00
$params['user'] = $this->user;
2024-04-15 02:25:01 +00:00
$params['creator'] = $this->user['id'];
$params['creator_name'] = $this->user['username'];
return ApiService::ApiDataReturn(OrderAftersaleService::AftersaleDelivery($params));
2019-05-24 05:57:10 +00:00
}
/**
* 订单取消
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-30
* @desc description
*/
public function Cancel()
{
2019-05-27 10:40:31 +00:00
// 是否ajax请求
if(!IS_AJAX)
2019-05-24 05:57:10 +00:00
{
2023-01-19 09:44:03 +00:00
MyViewAssign('msg', MyLang('illegal_access_tips'));
2021-07-18 15:42:10 +00:00
return MyView('public/tips_error');
2019-05-24 05:57:10 +00:00
}
2019-05-27 10:40:31 +00:00
2023-08-27 08:59:15 +00:00
$params = $this->data_request;
2019-05-27 10:40:31 +00:00
$params['user'] = $this->user;
2024-04-15 02:25:01 +00:00
$params['creator'] = $this->user['id'];
$params['creator_name'] = $this->user['username'];
return ApiService::ApiDataReturn(OrderAftersaleService::AftersaleCancel($params));
2019-05-24 05:57:10 +00:00
}
}
?>