作者 郭文星

123

@@ -148,7 +148,7 @@ class Index extends Api @@ -148,7 +148,7 @@ class Index extends Api
148 ); 148 );
149 if ($wxopenid) { 149 if ($wxopenid) {
150 $config = get_addon_config('wechat'); 150 $config = get_addon_config('wechat');
151 - $tourl = 'https://wyc.tenyes.cn/IkpLwqxfKQ.php/order/orderinfo?id='.$order['user_id'].'&ids=460&dialog=1'; 151 + $tourl = 'https://wyc.tenyes.cn/api/order/orderinfo?id='.$order['user_id'].'&ids=460&dialog=1';
152 $ywt_appid = ''; 152 $ywt_appid = '';
153 $pagepath =''; 153 $pagepath ='';
154 $res = $this->sendAstuWxMsgToAgent($sendInfo, $wxopenid, $tourl, $config['app_id'], $config['secret'], $ywt_appid, $pagepath); 154 $res = $this->sendAstuWxMsgToAgent($sendInfo, $wxopenid, $tourl, $config['app_id'], $config['secret'], $ywt_appid, $pagepath);
  1 +<?php
  2 +
  3 +namespace app\api\controller;
  4 +
  5 +use app\api\controller\inspection\Task;
  6 +use app\common\controller\Api;
  7 +use fast\Http;
  8 +use think\Db;
  9 +
  10 +/**
  11 + * 首页接口
  12 + */
  13 +class Order extends Api
  14 +{
  15 + protected $noNeedLogin = ['*'];
  16 + protected $noNeedRight = ['*'];
  17 +
  18 +
  19 + public function orderinfo($ids){
  20 + $row = Db::name("order")->field("id,passengers,driver_id,starting_point,end_point,order_no,pay_type,price,route_id,is_pay,phone,type")->find(['id' => $ids]);
  21 +
  22 + $res=Db::name("passenger")->where("id","in",$row['passengers'])->select();
  23 + $row['passenger']="";
  24 + foreach ($res as $k=>$v) {
  25 + $row['passenger']=$row['passenger']."姓名:".$res[$k]['name']." 身份证:".$res[$k]['IDcard']." 手机号:".$res[$k]['phone'];
  26 + }
  27 + unset($row['passengers']);
  28 + if($row['is_pay']==1){
  29 + $row['is_pay']="已支付";
  30 + }elseif($row['is_pay']==2){
  31 + $row['is_pay']="未支付";
  32 + }elseif($row['is_pay']==3){
  33 + $row['is_pay']="已退款";
  34 + }elseif($row['is_pay']==4){
  35 + $row['is_pay']="已取消";
  36 + }
  37 + if($row['type']==1){
  38 + $row['type']="计票";
  39 + }elseif($row['type']==2){
  40 + $row['type']="城际";
  41 + }elseif($row['type']==3){
  42 + $row['type']="包车";
  43 + }
  44 + if($row['pay_type']=="wxpay"){
  45 + $row['pay_type']="微信";
  46 + }elseif($row['pay_type']=="offlinepay"){
  47 + $row['pay_type']="线下";
  48 + }elseif($row['pay_type']=="background"){
  49 + $row['pay_type']="后台下单";
  50 + }
  51 + $row['license_plate']="";
  52 + $row['driver_name']="";
  53 + if($row['driver_id']){
  54 + $driver=Db::name("driver")->find($row['driver_id']);
  55 + $car=Db::name("car")->where("driver_id",$row['driver_id'])->find();
  56 + $row['license_plate']=$car['license_plate'];
  57 + $row['driver_name']=$driver['name'];
  58 + $row['driver_phone']=$driver['phone'];
  59 + }
  60 + $route=Db::name("route")->find($row['route_id']);
  61 + $row['route_name']=$route['name'];
  62 + unset($row['driver_id']);
  63 + unset($row['route_id']);
  64 + if (!$row) {
  65 + $this->error(__('No Results were found'));
  66 + }
  67 + $this->view->assign("row", $row);
  68 + return $this->view->fetch();
  69 + }
  70 +
  71 +}
  1 +<style>
  2 + .table-adminlog tr td {
  3 + word-break: break-all;
  4 + }
  5 +</style>
  6 +<table class="table table-striped table-adminlog">
  7 + <thead>
  8 + <tr>
  9 + <th width="100">{:__('Title')}</th>
  10 + <th>{:__('Content')}</th>
  11 + </tr>
  12 + </thead>
  13 + <tbody>
  14 + {volist name="row" id="vo" }
  15 + <tr>
  16 + <td>{:__($key)}</td>
  17 + <td>{if $key=='createtime'}{$vo|datetime}{else/}{$vo|htmlentities}{/if}</td>
  18 + </tr>
  19 + {/volist}
  20 + </tbody>
  21 +</table>
  22 +<div class="hide layer-footer">
  23 + <label class="control-label col-xs-12 col-sm-2"></label>
  24 + <div class="col-xs-12 col-sm-8">
  25 + <button type="reset" class="btn btn-primary btn-embossed btn-close" onclick="Layer.closeAll();">{:__('Close')}</button>
  26 + </div>
  27 +</div>