stanley-king před 7 roky
rodič
revize
0acb1fab05

+ 15 - 0
daemon/ugc.txt

@@ -0,0 +1,15 @@
+mb_special 表修改
+
+ALTER TABLE pandashop.lrlz_mb_special ADD category_id INT DEFAULT 0 NULL;
+ALTER TABLE pandashop.lrlz_mb_special ADD comments INT DEFAULT 0 NULL;
+ALTER TABLE pandashop.lrlz_mb_special ADD clicks INT DEFAULT 0 NULL;
+ALTER TABLE pandashop.lrlz_mb_special ADD likes INT DEFAULT 0 NULL;
+ALTER TABLE pandashop.lrlz_mb_special ADD state INT DEFAULT 0 NULL;
+ALTER TABLE pandashop.lrlz_mb_special ADD origin_data TEXT DEFAULT NULL  NULL;
+ALTER TABLE pandashop.lrlz_mb_special ADD share_image VARCHAR(200) DEFAULT '' NULL;
+ALTER TABLE pandashop.lrlz_mb_special ADD share_title VARCHAR(200) DEFAULT '' NULL;
+ALTER TABLE pandashop.lrlz_mb_special ADD addtime INT(11) DEFAULT 0 NULL;
+ALTER TABLE pandashop.lrlz_mb_special ADD member_id INT DEFAULT 0 NULL;
+ALTER TABLE pandashop.lrlz_mb_special ADD from_user TINYINT(1) DEFAULT 0 NULL;
+ALTER TABLE pandashop.lrlz_mb_special
+  MODIFY COLUMN special_desc VARCHAR(20) NOT NULL COMMENT '专题描述' AFTER from_user;

+ 15 - 0
helper/ugc/factory.php

@@ -0,0 +1,15 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: stanley-king
+ * Date: 2017/7/5
+ * Time: 下午6:24
+ */
+
+namespace ugc;
+
+
+class factory
+{
+
+}

+ 101 - 0
helper/ugc/ugc_content.php

@@ -0,0 +1,101 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: stanley-king
+ * Date: 2017/7/5
+ * Time: 下午6:13
+ */
+
+namespace ugc;
+
+
+interface IUGContent
+{
+    function format();
+}
+
+class pics_item implements IUGContent
+{
+    private $mTitle;
+    private $mImages;
+
+    public function __construct($tite='')
+    {
+        $this->mTitle = $tite;
+        $this->mImages = [];
+    }
+    public function set_images($images)
+    {
+        $this->mImages = $images;
+    }
+    public function add_image($image) {
+        $this->mImages[] = $image;
+    }
+    function format()
+    {
+
+    }
+}
+class text_item implements IUGContent
+{
+    function format()
+    {
+
+    }
+}
+class goods_item implements IUGContent
+{
+    function format()
+    {
+
+    }
+}
+
+class voice_item implements IUGContent
+{
+    function format()
+    {
+
+    }
+}
+class vote_item implements IUGContent
+{
+    function format()
+    {
+
+    }
+}
+class question_item implements IUGContent
+{
+    function format()
+    {
+
+    }
+}
+
+class special_object
+{
+    private $share_title;
+    private $share_image;
+
+    private $contents;
+
+    public function __construct()
+    {
+        $this->contents = [];
+    }
+
+    public function set_share($title,$image) {
+        $this->share_title = $title;
+        $this->share_image = $image;
+    }
+    public function add_item(IUGContent $item)
+    {
+        $this->contents[] = $item;
+    }
+
+    public function save()
+    {
+
+    }
+}

+ 15 - 0
helper/ugc_helper.php

@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * Created by PhpStorm.
+ * User: stanley-king
+ * Date: 2017/7/5
+ * Time: 下午6:34
+ */
+require_once (BASE_ROOT_PATH . '/helper/ugc/factory.php');
+require_once (BASE_ROOT_PATH . '/helper/ugc/ugc_content.php');
+
+class ugc_helper
+{
+
+}

+ 35 - 0
mobile/control/member_ugc.php

@@ -0,0 +1,35 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: stanley-king
+ * Date: 2017/7/5
+ * Time: 下午4:02
+ */
+
+
+class member_ugcControl extends mbMemberControl
+{
+    public function __construct()
+    {
+        parent::__construct();
+    }
+
+    public function listOp()
+    {
+    }
+    public function addOp()
+    {
+        $contet = urldecode($_POST['content']);
+
+
+    }
+    public function publishOp()
+    {
+    }
+    public function editOp()
+    {
+    }
+    public function delOp()
+    {
+    }
+}

+ 24 - 0
test/TestUGC.php

@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * Created by PhpStorm.
+ * User: stanley-king
+ * Date: 2017/7/6
+ * Time: 上午9:00
+ */
+define('BASE_ROOT_PATH',str_replace('/test','',dirname(__FILE__)));
+require_once(BASE_ROOT_PATH . '/fooder.php');
+
+require_once(BASE_ROOT_PATH . '/helper/ugc_helper.php');
+
+class TestUGC extends PHPUnit_Framework_TestCase
+{
+    public static function setUpBeforeClass()
+    {
+        Base::run_util();
+    }
+    public function testSpecialObj()
+    {
+
+    }
+}