application/index/controller/UserCommont.php
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace app\index\controller;
//use think\Controller;
use app\index\model\CommontSpace;
use app\index\model\GoodsSpace;
use app\index\model\UserOrderSpace;
use app\index\model\DealSpace;
use app\index\model\ShopSpace;
//use think\helper\Time;
class UserCommont extends UserBase {
// 买家自己写的关于购买过的所有商品的评论
public function commont_by_buyers() {
$CommontSpace_old = CommontSpace::where(['commont_type' => 1, 'buy_uid' => session('uid', '', 'index')])->order('update_time', 'desc')->select();
foreach ($CommontSpace_old as $value) {
$value['arr_pic'] = explode(",", $value['pic']);
$CommontSpace[] = $value;
}
$arr = array(1, 2, 3, 4, 5);
$this->assign('arr', $arr);
$this->assign('CommontSpace', $CommontSpace);
return $this->fetch();
}
// 所有买家写的关于我作为卖家的商品评论
public function commont_by_buyers_to_me() {
$CommontSpace_old = CommontSpace::where(['commont_type' => 1, 'goods_uid' => session('uid', '', 'index')])->order('update_time', 'desc')->select();
foreach ($CommontSpace_old as $value) {
$value['arr_pic'] = explode(",", $value['pic']);
$CommontSpace[] = $value;
}
$arr = array(1, 2, 3, 4, 5);
$this->assign('arr', $arr);
$this->assign('CommontSpace', $CommontSpace);
return $this->fetch('user_commont/commont_by_buyers');
}
//卖家写的关于卖出商品的评论
public function commont_by_seller() {
// dump(session("checkout_ids","", "index"));
$CommontSpace_old = CommontSpace::where(['commont_type' => 2, 'goods_uid' => session('uid', '', 'index')])->order('update_time', 'desc')->select();
// if ($CartSpace['pic']) { $arr_pic = explode(",", $CartSpace['pic']);}
foreach ($CommontSpace_old as $value) {
$value['arr_pic'] = explode(",", $value['pic']);
$CommontSpace[] = $value;
}
$arr = array(1, 2, 3, 4, 5);
$this->assign('arr', $arr);
// dump($CommontSpace);
$this->assign('CommontSpace', $CommontSpace);
return $this->fetch();
}
// 所有卖家写的关于我作为买家的商品评论
后面还有 181 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。