lizhen_gitee 1 yıl önce
ebeveyn
işleme
ef5f80d550

+ 2 - 2
application/api/controller/Usercenter.php

@@ -160,7 +160,7 @@ class Usercenter extends Api
         $lesson_order = Db::name('lesson_order')->where($map)->find();
 
         if($lesson_order['order_status'] != 10){
-            $this->error('此订单状态无法取消');
+            $this->error('此订单无法取消');
         }
 
         //还有24小时上课,不能取消
@@ -191,7 +191,7 @@ class Usercenter extends Api
         $update = [
             'order_status' => 30,
             'cancel_time' => time(),
-            'cancel_reason' => '用户在开课24小时之前主动取消',
+            'cancel_reason' => __('用户主动取消'),
         ];
 
         $rs = Db::name('lesson_order')->where($map)->update($update);

+ 11 - 0
application/api/lang/en/Usercenter.php

@@ -0,0 +1,11 @@
+<?php
+
+return [
+    '操作成功' => 'Operation successful',
+    '此订单已无法取消' => 'This order cannot be canceled',
+    '距离上课时间不足24小时,不能取消' => 'Less than 24 hours until class starts, no cancellations allowed',
+    '取消失败' => 'Cancellation failed',
+    '用户主动取消' => 'User actively cancels',
+    '取消完成' => 'Cancellation completed',
+    '申请成功,请等待审核' => 'The application is successful, please wait for review',
+];