售后服务

This commit is contained in:
TL 2022-08-31 18:08:47 +08:00
parent a3e19e0c06
commit c3c94acaff
4 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@ class Rma extends Base
public function reason() :BelongsTo
{
return $this->belongsTo(RmaReason::class, 'rma_reason_id', 'id')->where('locale', locale());
return $this->belongsTo(RmaReason::class, 'rma_reason_id', 'id');
}
public function histories() :HasMany

View File

@ -12,10 +12,10 @@
namespace Beike\Shop\Http\Controllers\Account;
use App\Http\Controllers\Controller;
use Beike\Shop\Http\Resources\RmaReasonDetail;
use Beike\Repositories\RmaReasonRepo;
use Beike\Repositories\RmaRepo;
use Beike\Shop\Http\Requests\RmaRequest;
use Beike\Shop\Http\Resources\Account\RmaReasonDetail;
use Beike\Shop\Services\RmaService;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\View\Factory;

View File

@ -9,7 +9,7 @@
* @modified 2022-08-31 11:56:28
*/
namespace Beike\Shop\Http\Resources;
namespace Beike\Shop\Http\Resources\Account;
use Illuminate\Http\Resources\Json\JsonResource;

View File

@ -35,7 +35,7 @@ class RmaDetail extends JsonResource
'product_name' => $this->product_name,
'name' => $this->name,
'sku' => $this->sku,
'reason' => $this->reason->name ?? '',
'reason' => json_decode($this->reason->name, true)[locale()] ?? '',
'type_text' => $this->type_text,
];
}