|
@@ -2,6 +2,7 @@
|
|
|
namespace app\Nutrition\controller;
|
|
|
use app\common\model\ArticleCate;
|
|
|
use app\common\model\ArticleIntro;
|
|
|
+use app\common\model\User;
|
|
|
use app\common\model\UserMessage;
|
|
|
use app\common\model\VideoIntro;
|
|
|
use app\common\model\VideoUrl;
|
|
@@ -207,6 +208,7 @@ class UserArticle extends Controller
|
|
|
}else{
|
|
|
$user_article_id= input('user_article_id');
|
|
|
$user_article = \app\common\model\UserArticle::where('id',$user_article_id)->find()->toArray();
|
|
|
+ $user_phone = User::where('id',$user_article['user_id'])->value('phone');
|
|
|
$new_article = [
|
|
|
'title' => $user_article['title'],
|
|
|
'content' => $user_article['desc'],
|
|
@@ -230,6 +232,7 @@ class UserArticle extends Controller
|
|
|
'title' => $new_article['title'],
|
|
|
'rel_id' => $user_article_id,
|
|
|
'user_id' => $user_article['user_id'],
|
|
|
+ 'phone' => $user_phone,
|
|
|
];
|
|
|
Data::save('ArticleItem',$article_item,'article_id',['article_id' => $result->id]);
|
|
|
$this->success('创建成功');
|