作者 anyv
1 个管道 的构建 通过 耗费 0 秒

5

... ... @@ -6,6 +6,7 @@ use cmf\controller\HomeBaseController;
use EasyWeChat\Foundation\Application;
use EasyWeChat\Payment\Order;
use think\Db;
use app\portal\controller\BirdController;
/**
* 微信支付,退款,提现DEMO
... ... @@ -87,6 +88,11 @@ class PayController extends HomeBaseController
//查询订单信息
$order = Db::name('indent')->where('order_number',$out_trade_no)->find();
if($successful){
$bird = new BirdController;
$takeOrder = $bird -> takeOrder($order['id']);
$createOrder = $bird -> createOrder($order['id']);
cache('dingyue',$takeOrder);
cache('yuyue',$createOrder);
$update['state'] = 2;
//更新订单状态为待发货
Db::name('indent')->where('order_number',$out_trade_no)->update($update);
... ...
... ... @@ -407,6 +407,17 @@ class PersonalcenterController extends WeChatBaseController{
*/
public function invitation_list(){
$uid = cmf_get_current_user_id();
$my_user = Db::name('my_user') -> where('uid',$uid) -> find();
if($my_user['status'] == 3){
$student_user = Db::name('my_user') -> where('pid',$my_user['id']) -> select();
foreach ($student_user as $key => $val){
$indent[] = Db::name('') -> where('') -> select();
}
}elseif ($my_user['status'] == 2){
}
return $this -> fetch();
}
... ...