fix: return course coordinates for mini program check-in

master
weizong song 15 hours ago
parent 7cd5fcf899
commit 3bb6720cf3

@ -21,6 +21,9 @@ class PublicCourseResource extends JsonResource
'name' => $this->name,
'start_date' => $this->start_date,
'end_date' => $this->end_date,
'address_detail' => $this->address_detail,
'longitude' => $this->longitude,
'latitude' => $this->latitude,
'content' => $this->content,
'publicize_content' => $this->publicize_content,
'type' => $this->type === null ? null : (int) $this->type,

@ -20,6 +20,9 @@ class PublicCourseResourceTest extends TestCase
'name' => '公开课程',
'start_date' => '2026-08-01',
'end_date' => '2026-08-02',
'address_detail' => '仁爱路158号',
'longitude' => '120.73284511399',
'latitude' => '31.276702212172',
'content' => '公开介绍',
'publicize_content' => '宣传介绍',
'status' => 1,
@ -66,6 +69,9 @@ class PublicCourseResourceTest extends TestCase
$this->assertSame(150, $payload['id']);
$this->assertSame('公开课程', $payload['name']);
$this->assertSame('仁爱路158号', $payload['address_detail']);
$this->assertSame('120.73284511399', $payload['longitude']);
$this->assertSame('31.276702212172', $payload['latitude']);
$this->assertSame('张老师', $payload['teacher']['name']);
$this->assertArrayNotHasKey('mobile', $payload['teacher']);
$this->assertArrayNotHasKey('remark', $payload['teacher']);

Loading…
Cancel
Save