|
@@ -13,7 +13,7 @@ use wxpay;
|
|
|
*/
|
|
|
class Index extends Api
|
|
|
{
|
|
|
- protected $noNeedLogin = [];
|
|
|
+ protected $noNeedLogin = ['banner', 'activelist', 'personaltype', 'personalactivetype'];
|
|
|
protected $noNeedRight = ['*'];
|
|
|
|
|
|
/**
|
|
@@ -833,6 +833,42 @@ class Index extends Api
|
|
|
return $age;
|
|
|
}
|
|
|
|
|
|
+ //私人订制类型
|
|
|
+ public function personaltype() {
|
|
|
+ $list = Db::name('personal_type')->field('id, name')->order('weigh', 'desc')->select();
|
|
|
+
|
|
|
+ $this->success('私人订制类型', $list);
|
|
|
+ }
|
|
|
+
|
|
|
+ //私人订制活动类型
|
|
|
+ public function personalactivetype() {
|
|
|
+ $list = Db::name('personal_active_type')->field('id, name')->where(['pid' => 0])->order('weigh', 'desc')->select();
|
|
|
+
|
|
|
+ $list = $this->getchildtype($list);
|
|
|
+ $this->success('私人订制活动类型', $list);
|
|
|
+ }
|
|
|
+
|
|
|
+ //无限级私人订制活动类型
|
|
|
+ public function getchildtype($list = [])
|
|
|
+ {
|
|
|
+ $complaint_type = Db::name('personal_active_type');
|
|
|
+ foreach ($list as &$v) {
|
|
|
+ $child = $complaint_type->field('id, name')->where(['pid' => $v['id']])->order('weigh', 'desc')->select();
|
|
|
+ if ($child) {
|
|
|
+ $child = $this->getchildtype($child);
|
|
|
+ }
|
|
|
+
|
|
|
+ $v['child'] = $child;
|
|
|
+ }
|
|
|
+
|
|
|
+ return $list;
|
|
|
+ }
|
|
|
+
|
|
|
+ //私人订制
|
|
|
+ public function personalactive() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
|