JSFiddle - React, Tailwind, and code Playground
by Majo Chiou
HTML
<h3>
如何抓取到訪客
</h3>
<h4>
Billing 這裡的邏輯把「訪客」當成了一個「過濾條件」,而不是另外的「身份」
</h4>
<div>
新增 $filter_type 條件<br />
若要取得「一般訪客」, $member_status='H', $filter_type = 'VISITOR'<br />
若要取得「付費訪客」, $member_status='V', $filter_type = 'VISITOR'<br />
特別說明$filter_type 的邏輯,是從原有的會員身分條件下,額外篩出特定條件,舉例:<br />
$member_status='V', $filter_type = null ,則會取得包含一般白金會員 及 付費訪客。<br />
$member_status='H', $filter_type = null ,則會取得包含一般過期會員 及 一般訪客。
</div>
<hr />
<hr />
<h3>
原本: 「訪客」未被獨立出來
</h3>
<div class="col-sm-9 inner-wrapper"> <div class="checkbox"><label class="checkbox-inline"><input name="member_types" type="checkbox" value="ALL"> <span>全體會員</span></label><label class="checkbox-inline"><input name="member_types" type="checkbox" value="V"> <span>白金會員</span></label><label class="checkbox-inline"><input name="member_types" type="checkbox" value="G"> <span>白金會員(體驗期)</span></label><label class="checkbox-inline"><input name="member_types" type="checkbox" value="W"> <span>付費過期</span></label><label class="checkbox-inline"><input name="member_types" type="checkbox" value="H"> <span>試用過期</span></label></div> <ul class="field-errors text-danger clearfix"></ul></div>
<hr />
<h3>
新: 只選了「訪客」
</h3>
<div class="col-sm-9 inner-wrapper"> <div class="checkbox"><label class="checkbox-inline"><input name="member_types_only_vistors" type="checkbox" value="ALL"> <span>全體會員</span></label><label class="checkbox-inline"><input name="member_types_only_vistors" type="checkbox" value="V"> <span>白金會員</span></label><label class="checkbox-inline"><input name="member_types_only_vistors" type="checkbox" value="G"> <span>白金會員(體驗期)</span></label><label class="checkbox-inline"><input name="member_types_only_vistors" type="checkbox" value="W"> <span>付費過期</span></label><label class="checkbox-inline"><input name="member_types_only_vistors" type="checkbox" value="H"> <span>試用過期</span></label><label class="checkbox-inline"><input name="member_types_only_vistors" type="checkbox" value="VVISITOR" checked>...