正在显示
7 个修改的文件
包含
405 行增加
和
49 行删除
@@ -236,20 +236,20 @@ $configs = [ | @@ -236,20 +236,20 @@ $configs = [ | ||
236 | //快递鸟参数配置 | 236 | //快递鸟参数配置 |
237 | 'bird'=>[ | 237 | 'bird'=>[ |
238 | //正式 | 238 | //正式 |
239 | - //'EBusinessID' => '1472267',//电商ID | ||
240 | - //'AppKey' => 'cc8314fd-0381-4e37-ad17-239287f1d8d2',//AppKey | 239 | + 'EBusinessID' => '1472267',//电商ID |
240 | + 'AppKey' => 'cc8314fd-0381-4e37-ad17-239287f1d8d2',//AppKey | ||
241 | //测试 | 241 | //测试 |
242 | - 'EBusinessID' => 'test1472267', | ||
243 | - 'AppKey' => 'f84c7071-a6c7-48ce-8fe0-11b719d88a1d', | 242 | +// 'EBusinessID' => 'test1472267', |
243 | +// 'AppKey' => 'f84c7071-a6c7-48ce-8fe0-11b719d88a1d', | ||
244 | ], | 244 | ], |
245 | //快递鸟预约取件接口寄件人参数 | 245 | //快递鸟预约取件接口寄件人参数 |
246 | 'sender'=>[ | 246 | 'sender'=>[ |
247 | - 'Name' => "李先生", | ||
248 | - 'Mobile' => "18888888888", | 247 | + 'Name' => "姚先生", |
248 | + 'Mobile' => "15555555555", | ||
249 | 'ProvinceName' => "河北省", | 249 | 'ProvinceName' => "河北省", |
250 | 'CityName' => "石家庄市", | 250 | 'CityName' => "石家庄市", |
251 | 'ExpAreaName' => "新华区", | 251 | 'ExpAreaName' => "新华区", |
252 | - 'Address' => "学府路121号", | 252 | + 'Address' => "debug", |
253 | ], | 253 | ], |
254 | ]; | 254 | ]; |
255 | return array_merge($configs, $runtimeConfig,$wechatConfig); | 255 | return array_merge($configs, $runtimeConfig,$wechatConfig); |
@@ -9,38 +9,61 @@ | @@ -9,38 +9,61 @@ | ||
9 | namespace app\portal\controller; | 9 | namespace app\portal\controller; |
10 | 10 | ||
11 | 11 | ||
12 | +use app\portal\model\AddressModel; | ||
12 | use app\portal\model\IndentModel; | 13 | use app\portal\model\IndentModel; |
13 | use cmf\controller\HomeBaseController; | 14 | use cmf\controller\HomeBaseController; |
14 | use think\Db; | 15 | use think\Db; |
15 | 16 | ||
16 | class BirdController extends HomeBaseController | 17 | class BirdController extends HomeBaseController |
17 | { | 18 | { |
19 | + protected $EBusinessID; | ||
20 | + protected $AppKey; | ||
21 | + protected $indent_id; | ||
22 | + function _initialize() { | ||
23 | + $bird = config('bird'); | ||
24 | + $this->EBusinessID = $bird['EBusinessID']; | ||
25 | + $this->AppKey = $bird['AppKey']; | ||
26 | + //电商ID | ||
27 | + defined('EBusinessID') or define('EBusinessID', $this->EBusinessID); | ||
28 | + //电商加密私钥,快递鸟提供,注意保管,不要泄漏 | ||
29 | + defined('AppKey') or define('AppKey', $this->AppKey); | ||
30 | + } | ||
31 | + | ||
32 | + /** | ||
33 | + * 预约取件 | ||
34 | + * @return mixed | ||
35 | + * @throws \think\db\exception\DataNotFoundException | ||
36 | + * @throws \think\db\exception\ModelNotFoundException | ||
37 | + * @throws \think\exception\DbException | ||
38 | + */ | ||
18 | public function createOrder($indent_id = null) | 39 | public function createOrder($indent_id = null) |
19 | { | 40 | { |
20 | if(empty($indent_id)){ | 41 | if(empty($indent_id)){ |
21 | - $this->error('缺少必要参数','','',''); | 42 | + return "缺少必要参数"; |
22 | } | 43 | } |
23 | - $where['id'] = ['eq',$indent_id]; | 44 | + $this->indent_id = $indent_id; |
45 | + $where1['id'] = ['eq',$this->indent_id]; | ||
24 | $indentModel = new IndentModel(); | 46 | $indentModel = new IndentModel(); |
25 | - $indent = $indentModel->findData($where); | 47 | + $indent = $indentModel->findData($where1); |
26 | if(empty($indent)){ | 48 | if(empty($indent)){ |
27 | - $this->error('未查询到该订单','','',''); | 49 | + return '未查询到该订单'; |
28 | } | 50 | } |
29 | if($indent['state'] != 2){ | 51 | if($indent['state'] != 2){ |
30 | - $this->error('该订单不是待发货状态','','',''); | 52 | + return '该订单不是待发货状态'; |
31 | } | 53 | } |
32 | - $bird = config('bird'); | ||
33 | - //电商ID | ||
34 | - defined('EBusinessID') or define('EBusinessID', $bird['EBusinessID']); | ||
35 | - //电商加密私钥,快递鸟提供,注意保管,不要泄漏 | ||
36 | - defined('AppKey') or define('AppKey', $bird['AppKey']); | 54 | + //收货地址 |
55 | + $where2['id'] = ['eq',$indent['indent_address']]; | ||
56 | + $addressModel = new AddressModel(); | ||
57 | + $address = $addressModel->findData($where2); | ||
58 | + $region = explode(' ',$address['region']); | ||
59 | + | ||
37 | //请求url,接口正式地址:http://api.kdniao.com/api/eorderservice 测试环境地址:http://testapi.kdniao.com:8081/api/oorderservice | 60 | //请求url,接口正式地址:http://api.kdniao.com/api/eorderservice 测试环境地址:http://testapi.kdniao.com:8081/api/oorderservice |
38 | - defined('ReqURL') or define('ReqURL', 'http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json'); | 61 | + defined('ReqURL') or define('ReqURL', 'http://api.kdniao.com/api/OOrderService'); |
39 | 62 | ||
40 | //构造在线下单提交信息 | 63 | //构造在线下单提交信息 |
41 | $eorder = []; | 64 | $eorder = []; |
42 | $eorder["ShipperCode"] = "SF"; | 65 | $eorder["ShipperCode"] = "SF"; |
43 | - $eorder["OrderCode"] = "PM2016050789471"; | 66 | + $eorder["OrderCode"] = $indent['order_number']; |
44 | $eorder["PayType"] = 1; | 67 | $eorder["PayType"] = 1; |
45 | $eorder["ExpType"] = 1; | 68 | $eorder["ExpType"] = 1; |
46 | $eorder['IsNotice'] = 0; | 69 | $eorder['IsNotice'] = 0; |
@@ -53,12 +76,12 @@ class BirdController extends HomeBaseController | @@ -53,12 +76,12 @@ class BirdController extends HomeBaseController | ||
53 | // $sender["Address"] = "赛格广场5401AB"; | 76 | // $sender["Address"] = "赛格广场5401AB"; |
54 | 77 | ||
55 | $receiver = []; | 78 | $receiver = []; |
56 | - $receiver["Name"] = "李先生"; | ||
57 | - $receiver["Mobile"] = "18888888888"; | ||
58 | - $receiver["ProvinceName"] = "李先生"; | ||
59 | - $receiver["CityName"] = "深圳市"; | ||
60 | - $receiver["ExpAreaName"] = "福田区"; | ||
61 | - $receiver["Address"] = "赛格广场5401AB"; | 79 | + $receiver["Name"] = $address['name']; |
80 | + $receiver["Mobile"] = $address['phone']; | ||
81 | + $receiver["ProvinceName"] = $region[0]; | ||
82 | + $receiver["CityName"] = $region[1]; | ||
83 | + $receiver["ExpAreaName"] = $region[2]; | ||
84 | + $receiver["Address"] = $address['detailed']; | ||
62 | 85 | ||
63 | $commodityOne = []; | 86 | $commodityOne = []; |
64 | $commodityOne["GoodsName"] = "书"; | 87 | $commodityOne["GoodsName"] = "书"; |
@@ -77,13 +100,12 @@ class BirdController extends HomeBaseController | @@ -77,13 +100,12 @@ class BirdController extends HomeBaseController | ||
77 | //解析在线下单返回结果 | 100 | //解析在线下单返回结果 |
78 | $result = json_decode($jsonResult, true); | 101 | $result = json_decode($jsonResult, true); |
79 | if ($result["ResultCode"] == "100") { | 102 | if ($result["ResultCode"] == "100") { |
80 | - return $result['Order']['LogisticCode'];//返回快递单号 | 103 | + return ['code'=>20000,'msg'=>'SUCCESS','data'=>$result['Order']['LogisticCode']];//返回快递单号 |
81 | } else { | 104 | } else { |
82 | - return $result['Reason']; | 105 | + return ['code'=>40000,'msg'=>$result['Reason']]; |
83 | } | 106 | } |
84 | } | 107 | } |
85 | 108 | ||
86 | - | ||
87 | /** | 109 | /** |
88 | * Json方式 提交在线下单 | 110 | * Json方式 提交在线下单 |
89 | * @param $requestData | 111 | * @param $requestData |
@@ -105,6 +127,136 @@ class BirdController extends HomeBaseController | @@ -105,6 +127,136 @@ class BirdController extends HomeBaseController | ||
105 | return $result; | 127 | return $result; |
106 | } | 128 | } |
107 | 129 | ||
130 | + /** | ||
131 | + * 查询订单 | ||
132 | + * @return array | ||
133 | + * @throws \think\db\exception\DataNotFoundException | ||
134 | + * @throws \think\db\exception\ModelNotFoundException | ||
135 | + * @throws \think\exception\DbException | ||
136 | + */ | ||
137 | + public function getOrder($indent_id = null){ | ||
138 | + if(empty($indent_id)){ | ||
139 | + $this->error('缺少必要参数','','',''); | ||
140 | + } | ||
141 | + $this->indent_id = $indent_id; | ||
142 | + $where['id'] = ['eq',$this->indent_id]; | ||
143 | + $indentModel = new IndentModel(); | ||
144 | + $indent = $indentModel->findData($where); | ||
145 | + if(empty($indent)){ | ||
146 | + $this->error('未查询到该订单','','',''); | ||
147 | + } | ||
148 | + if($indent['state'] != 5){ | ||
149 | + $this->error('该订单不是已发货状态','','',''); | ||
150 | + } | ||
151 | + | ||
152 | + //请求url,接口正式地址:http://api.kdniao.com/api/eorderservice 测试环境地址:http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json | ||
153 | + defined('ReqURL') or define('ReqURL', 'http://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx'); | ||
154 | + | ||
155 | + $jsonResult = $this->getOrderTracesByJson($indent['order_number'],$indent['logistic_code']); | ||
156 | + $result = json_decode($jsonResult,true); | ||
157 | + if($result['Success'] == true){ | ||
158 | + return dump($result);['code'=>20000,'msg'=>'SUCCESS','data'=>['state'=>$result['State'],'traces'=>$result['Traces']]];//订单轨迹 | ||
159 | + }else{ | ||
160 | + return ['code'=>40000,'msg'=>$result['Reason']]; | ||
161 | + } | ||
162 | + } | ||
163 | + | ||
164 | + /** | ||
165 | + * Json方式 查询订单物流轨迹 | ||
166 | + */ | ||
167 | + function getOrderTracesByJson($OrderCode,$LogisticCode){ | ||
168 | + $requestData= "{'OrderCode':$OrderCode,'ShipperCode':'SF','LogisticCode':$LogisticCode}"; | ||
169 | + | ||
170 | + $datas = array( | ||
171 | + 'EBusinessID' => EBusinessID, | ||
172 | + 'RequestType' => '1002', | ||
173 | + 'RequestData' => urlencode($requestData) , | ||
174 | + 'DataType' => '2', | ||
175 | + ); | ||
176 | + $datas['DataSign'] = $this->encrypt($requestData, AppKey); | ||
177 | + $result=$this->sendPost(ReqURL, $datas); | ||
178 | + | ||
179 | + //根据公司业务处理返回的信息...... | ||
180 | + | ||
181 | + return $result; | ||
182 | + } | ||
183 | + | ||
184 | + /** | ||
185 | + * 订阅订单轨迹 | ||
186 | + * @return string|void | ||
187 | + * @throws \think\db\exception\DataNotFoundException | ||
188 | + * @throws \think\db\exception\ModelNotFoundException | ||
189 | + * @throws \think\exception\DbException | ||
190 | + */ | ||
191 | + public function takeOrder($indent_id = null){ | ||
192 | + if(empty($indent_id)){ | ||
193 | + $this->error('缺少必要参数','','',''); | ||
194 | + } | ||
195 | + $this->indent_id = $indent_id; | ||
196 | + $where['id'] = ['eq',$this->indent_id]; | ||
197 | + $indentModel = new IndentModel(); | ||
198 | + $indent = $indentModel->findData($where); | ||
199 | + if(empty($indent)){ | ||
200 | + $this->error('未查询到该订单','','',''); | ||
201 | + } | ||
202 | + if($indent['state'] != 5){ | ||
203 | + $this->error('该订单不是已发货状态','','',''); | ||
204 | + } | ||
205 | + //收货地址 | ||
206 | + $where2['id'] = ['eq',$indent['indent_address']]; | ||
207 | + $addressModel = new AddressModel(); | ||
208 | + $address = $addressModel->findData($where2); | ||
209 | + //请求url,接口正式地址:http://api.kdniao.com/api/eorderservice 测试环境地址:http://testapi.kdniao.com:8081/api/oorderservice | ||
210 | + defined('ReqURL') or define('ReqURL', 'http://api.kdniao.com/api/dist'); | ||
211 | + | ||
212 | + $jsonResult = $this->orderTracesSubByJson($indent['order_number'],$indent['logistic_code'],$address); | ||
213 | + $result = json_decode($jsonResult,true); | ||
214 | + if(empty($result['Reason'])){ | ||
215 | + return dump($result);//订单轨迹 | ||
216 | + }else{ | ||
217 | + return $result['Reason']; | ||
218 | + } | ||
219 | + } | ||
220 | + | ||
221 | + /** | ||
222 | + * Json方式 物流信息订阅 | ||
223 | + */ | ||
224 | + public function orderTracesSubByJson($OrderCode,$LogisticCode,$address){ | ||
225 | + $sender = config('sender'); | ||
226 | + $region = explode(' ',$address['region']); | ||
227 | + $requestData="{'OrderCode': '$OrderCode',". | ||
228 | + "'ShipperCode':'SF',". | ||
229 | + "'LogisticCode':'$LogisticCode',". | ||
230 | + "'PayType':1,". | ||
231 | + "'ExpType':1,". | ||
232 | + "'IsNotice':0,". | ||
233 | + "'Sender':". | ||
234 | + "{". | ||
235 | + "'Company':'LV','Name':'$sender[Name]','Mobile':'$sender[Mobile]','ProvinceName':'$sender[ProvinceName]','CityName':'$sender[CityName]','ExpAreaName':'$sender[ExpAreaName]','Address':'$sender[Address]'},". | ||
236 | + "'Receiver':". | ||
237 | + "{". | ||
238 | + "'Company':'GCCUI','Name':'$address[name]','Mobile':'$address[phone]','ProvinceName':'$region[0]','CityName':'$region[1]','ExpAreaName':'$region[2]','Address':'$address[detailed]'},". | ||
239 | + "'Commodity':". | ||
240 | + "[{". | ||
241 | + "'GoodsName':'书'}],". | ||
242 | + "'Remark':'小心轻放'}"; | ||
243 | + | ||
244 | + $datas = array( | ||
245 | + 'EBusinessID' => EBusinessID, | ||
246 | + 'RequestType' => '1008', | ||
247 | + 'RequestData' => urlencode($requestData) , | ||
248 | + 'DataType' => '2', | ||
249 | + ); | ||
250 | + $datas['DataSign'] = $this->encrypt($requestData, AppKey); | ||
251 | + $result = $this->sendPost(ReqURL, $datas); | ||
252 | + | ||
253 | + //根据公司业务处理返回的信息...... | ||
254 | + | ||
255 | + return $result; | ||
256 | + } | ||
257 | + | ||
258 | + | ||
259 | + | ||
108 | 260 | ||
109 | /** | 261 | /** |
110 | * post提交数据 | 262 | * post提交数据 |
@@ -120,6 +272,10 @@ class BirdController extends HomeBaseController | @@ -120,6 +272,10 @@ class BirdController extends HomeBaseController | ||
120 | } | 272 | } |
121 | $post_data = implode('&', $temps); | 273 | $post_data = implode('&', $temps); |
122 | $url_info = parse_url($url); | 274 | $url_info = parse_url($url); |
275 | + if(empty($url_info['port'])) | ||
276 | + { | ||
277 | + $url_info['port']=80; | ||
278 | + } | ||
123 | $httpheader = "POST " . $url_info['path'] . " HTTP/1.0\r\n"; | 279 | $httpheader = "POST " . $url_info['path'] . " HTTP/1.0\r\n"; |
124 | $httpheader .= "Host:" . $url_info['host'] . "\r\n"; | 280 | $httpheader .= "Host:" . $url_info['host'] . "\r\n"; |
125 | $httpheader .= "Content-Type:application/x-www-form-urlencoded\r\n"; | 281 | $httpheader .= "Content-Type:application/x-www-form-urlencoded\r\n"; |
app/portal/controller/LoadController.php
0 → 100644
1 | +<?php | ||
2 | +/** | ||
3 | + * Created by PhpStorm. | ||
4 | + * User: Administrator | ||
5 | + * Date: 2019/6/7 | ||
6 | + * Time: 16:48 | ||
7 | + */ | ||
8 | + | ||
9 | +namespace app\portal\controller; | ||
10 | + | ||
11 | + | ||
12 | +use app\portal\model\IndentModel; | ||
13 | +use cmf\controller\HomeBaseController; | ||
14 | + | ||
15 | +class LoadController extends HomeBaseController | ||
16 | +{ | ||
17 | + public function index(){ | ||
18 | + $indentModel = new IndentModel(); | ||
19 | + $where['state'] = ['eq',2]; | ||
20 | + $data = $indentModel->selectData($where); | ||
21 | + if(!empty($data)){ | ||
22 | + foreach($data as $key => $vo){ | ||
23 | + $birdController = new BirdController(); | ||
24 | + $result = $birdController->getOrder($vo['id']); | ||
25 | + } | ||
26 | + } | ||
27 | + } | ||
28 | +} |
@@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
9 | namespace app\portal\controller; | 9 | namespace app\portal\controller; |
10 | 10 | ||
11 | 11 | ||
12 | +use app\portal\model\AddressModel; | ||
12 | use app\portal\model\IndentGoodsModel; | 13 | use app\portal\model\IndentGoodsModel; |
13 | use app\portal\model\IndentModel; | 14 | use app\portal\model\IndentModel; |
14 | use cmf\controller\WeChatBaseController; | 15 | use cmf\controller\WeChatBaseController; |
@@ -52,13 +53,16 @@ class OrderController extends WeChatBaseController | @@ -52,13 +53,16 @@ class OrderController extends WeChatBaseController | ||
52 | $where1['uid'] = ['eq',$user_id]; | 53 | $where1['uid'] = ['eq',$user_id]; |
53 | $where1['id'] = ['eq',$id]; | 54 | $where1['id'] = ['eq',$id]; |
54 | $indentModel = new IndentModel(); | 55 | $indentModel = new IndentModel(); |
55 | - $data = $indentModel->findData($where1); | 56 | + $data = $indentModel->findData($where1)->toArray(); |
56 | if(empty($data)){ | 57 | if(empty($data)){ |
57 | $this->error('未查询到该订单','','',''); | 58 | $this->error('未查询到该订单','','',''); |
58 | } | 59 | } |
59 | $where2['indent_id'] = ['eq',$data['id']]; | 60 | $where2['indent_id'] = ['eq',$data['id']]; |
60 | $indentGoodsModel = new IndentGoodsModel(); | 61 | $indentGoodsModel = new IndentGoodsModel(); |
61 | $indentGoods = $indentGoodsModel->selectData($where2); | 62 | $indentGoods = $indentGoodsModel->selectData($where2); |
63 | + $addressModle = new AddressModel(); | ||
64 | + $address = $addressModle->findData(['id'=>$data['indent_address']])->toArray(); | ||
65 | + $data['address'] = $address; | ||
62 | $data['indent_goods'] = $indentGoods; | 66 | $data['indent_goods'] = $indentGoods; |
63 | $this->assign('data',$data); | 67 | $this->assign('data',$data); |
64 | return $this->fetch(); | 68 | return $this->fetch(); |
app/portal/model/AddressModel.php
0 → 100644
1 | +<?php | ||
2 | +/** | ||
3 | + * Created by PhpStorm. | ||
4 | + * User: Administrator | ||
5 | + * Date: 2019/6/7 | ||
6 | + * Time: 11:48 | ||
7 | + */ | ||
8 | + | ||
9 | +namespace app\portal\model; | ||
10 | + | ||
11 | + | ||
12 | +use think\Model; | ||
13 | + | ||
14 | +class AddressModel extends Model | ||
15 | +{ | ||
16 | + /** | ||
17 | + * 获取单条数据 | ||
18 | + * @param $where | ||
19 | + * @return array|false|\PDOStatement|string|Model | ||
20 | + * @throws \think\db\exception\DataNotFoundException | ||
21 | + * @throws \think\db\exception\ModelNotFoundException | ||
22 | + * @throws \think\exception\DbException | ||
23 | + */ | ||
24 | + public function findData($where){ | ||
25 | + $data = $this->where($where)->find(); | ||
26 | + return $data; | ||
27 | + } | ||
28 | +} |
@@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
32 | <!-- 全部 --> | 32 | <!-- 全部 --> |
33 | <div class="myorder_con1" style="display: block"> | 33 | <div class="myorder_con1" style="display: block"> |
34 | <foreach name="data" item="vo"> | 34 | <foreach name="data" item="vo"> |
35 | - <a href=""> | 35 | + <a href="{:url('order/get_one',array('id'=>$vo['id']))}"> |
36 | <div class="myorder_information"> | 36 | <div class="myorder_information"> |
37 | <!-- 订单 --> | 37 | <!-- 订单 --> |
38 | <div class="myorder_the"> | 38 | <div class="myorder_the"> |
@@ -85,9 +85,9 @@ | @@ -85,9 +85,9 @@ | ||
85 | <div class="myorder_bottom2_1">取消订单</div> | 85 | <div class="myorder_bottom2_1">取消订单</div> |
86 | <div class="myorder_bottom2_2">去支付</div> | 86 | <div class="myorder_bottom2_2">去支付</div> |
87 | <elseif condition="$vo.state eq 2"/> | 87 | <elseif condition="$vo.state eq 2"/> |
88 | - <a href="w_Ypayment.html"> | ||
89 | - <div class="myorder_bottom2_2">查看订单</div> | ||
90 | - </a> | 88 | + <!--<a href="w_Ypayment.html">--> |
89 | + <!--<div class="myorder_bottom2_2">查看订单</div>--> | ||
90 | + <!--</a>--> | ||
91 | <elseif condition="$vo.state eq 5"/> | 91 | <elseif condition="$vo.state eq 5"/> |
92 | <a href="w_logistics.html"> | 92 | <a href="w_logistics.html"> |
93 | <div class="myorder_bottom2_2">查看物流</div> | 93 | <div class="myorder_bottom2_2">查看物流</div> |
@@ -105,7 +105,7 @@ | @@ -105,7 +105,7 @@ | ||
105 | <div class="myorder_con1"> | 105 | <div class="myorder_con1"> |
106 | <foreach name="data" item="vo"> | 106 | <foreach name="data" item="vo"> |
107 | <if condition="$vo.state eq 4"> | 107 | <if condition="$vo.state eq 4"> |
108 | - <a href=""> | 108 | + <a href="{:url('order/get_one',array('id'=>$vo['id']))}"> |
109 | <div class="myorder_information"> | 109 | <div class="myorder_information"> |
110 | <!-- 订单 --> | 110 | <!-- 订单 --> |
111 | <div class="myorder_the"> | 111 | <div class="myorder_the"> |
@@ -158,9 +158,9 @@ | @@ -158,9 +158,9 @@ | ||
158 | <div class="myorder_bottom2_1">取消订单</div> | 158 | <div class="myorder_bottom2_1">取消订单</div> |
159 | <div class="myorder_bottom2_2">去支付</div> | 159 | <div class="myorder_bottom2_2">去支付</div> |
160 | <elseif condition="$vo.state eq 2"/> | 160 | <elseif condition="$vo.state eq 2"/> |
161 | - <a href="w_Ypayment.html"> | ||
162 | - <div class="myorder_bottom2_2">查看订单</div> | ||
163 | - </a> | 161 | + <!--<a href="w_Ypayment.html">--> |
162 | + <!--<div class="myorder_bottom2_2">查看订单</div>--> | ||
163 | + <!--</a>--> | ||
164 | <elseif condition="$vo.state eq 5"/> | 164 | <elseif condition="$vo.state eq 5"/> |
165 | <a href="w_logistics.html"> | 165 | <a href="w_logistics.html"> |
166 | <div class="myorder_bottom2_2">查看物流</div> | 166 | <div class="myorder_bottom2_2">查看物流</div> |
@@ -179,7 +179,7 @@ | @@ -179,7 +179,7 @@ | ||
179 | <div class="myorder_con1"> | 179 | <div class="myorder_con1"> |
180 | <foreach name="data" item="vo"> | 180 | <foreach name="data" item="vo"> |
181 | <if condition="$vo.state eq 2"> | 181 | <if condition="$vo.state eq 2"> |
182 | - <a href=""> | 182 | + <a href="{:url('order/get_one',array('id'=>$vo['id']))}"> |
183 | <div class="myorder_information"> | 183 | <div class="myorder_information"> |
184 | <!-- 订单 --> | 184 | <!-- 订单 --> |
185 | <div class="myorder_the"> | 185 | <div class="myorder_the"> |
@@ -232,9 +232,9 @@ | @@ -232,9 +232,9 @@ | ||
232 | <div class="myorder_bottom2_1">取消订单</div> | 232 | <div class="myorder_bottom2_1">取消订单</div> |
233 | <div class="myorder_bottom2_2">去支付</div> | 233 | <div class="myorder_bottom2_2">去支付</div> |
234 | <elseif condition="$vo.state eq 2"/> | 234 | <elseif condition="$vo.state eq 2"/> |
235 | - <a href="w_Ypayment.html"> | ||
236 | - <div class="myorder_bottom2_2">查看订单</div> | ||
237 | - </a> | 235 | + <!--<a href="w_Ypayment.html">--> |
236 | + <!--<div class="myorder_bottom2_2">查看订单</div>--> | ||
237 | + <!--</a>--> | ||
238 | <elseif condition="$vo.state eq 5"/> | 238 | <elseif condition="$vo.state eq 5"/> |
239 | <a href="w_logistics.html"> | 239 | <a href="w_logistics.html"> |
240 | <div class="myorder_bottom2_2">查看物流</div> | 240 | <div class="myorder_bottom2_2">查看物流</div> |
@@ -253,7 +253,7 @@ | @@ -253,7 +253,7 @@ | ||
253 | <div class="myorder_con1"> | 253 | <div class="myorder_con1"> |
254 | <foreach name="data" item="vo"> | 254 | <foreach name="data" item="vo"> |
255 | <if condition="$vo.state eq 5"> | 255 | <if condition="$vo.state eq 5"> |
256 | - <a href=""> | 256 | + <a href="{:url('order/get_one',array('id'=>$vo['id']))}"> |
257 | <div class="myorder_information"> | 257 | <div class="myorder_information"> |
258 | <!-- 订单 --> | 258 | <!-- 订单 --> |
259 | <div class="myorder_the"> | 259 | <div class="myorder_the"> |
@@ -306,9 +306,9 @@ | @@ -306,9 +306,9 @@ | ||
306 | <div class="myorder_bottom2_1">取消订单</div> | 306 | <div class="myorder_bottom2_1">取消订单</div> |
307 | <div class="myorder_bottom2_2">去支付</div> | 307 | <div class="myorder_bottom2_2">去支付</div> |
308 | <elseif condition="$vo.state eq 2"/> | 308 | <elseif condition="$vo.state eq 2"/> |
309 | - <a href="w_Ypayment.html"> | ||
310 | - <div class="myorder_bottom2_2">查看订单</div> | ||
311 | - </a> | 309 | + <!--<a href="w_Ypayment.html">--> |
310 | + <!--<div class="myorder_bottom2_2">查看订单</div>--> | ||
311 | + <!--</a>--> | ||
312 | <elseif condition="$vo.state eq 5"/> | 312 | <elseif condition="$vo.state eq 5"/> |
313 | <a href="w_logistics.html"> | 313 | <a href="w_logistics.html"> |
314 | <div class="myorder_bottom2_2">查看物流</div> | 314 | <div class="myorder_bottom2_2">查看物流</div> |
@@ -327,7 +327,7 @@ | @@ -327,7 +327,7 @@ | ||
327 | <div class="myorder_con1"> | 327 | <div class="myorder_con1"> |
328 | <foreach name="data" item="vo"> | 328 | <foreach name="data" item="vo"> |
329 | <if condition="$vo.state eq 3"> | 329 | <if condition="$vo.state eq 3"> |
330 | - <a href=""> | 330 | + <a href="{:url('order/get_one',array('id'=>$vo['id']))}"> |
331 | <div class="myorder_information"> | 331 | <div class="myorder_information"> |
332 | <!-- 订单 --> | 332 | <!-- 订单 --> |
333 | <div class="myorder_the"> | 333 | <div class="myorder_the"> |
@@ -380,9 +380,9 @@ | @@ -380,9 +380,9 @@ | ||
380 | <div class="myorder_bottom2_1">取消订单</div> | 380 | <div class="myorder_bottom2_1">取消订单</div> |
381 | <div class="myorder_bottom2_2">去支付</div> | 381 | <div class="myorder_bottom2_2">去支付</div> |
382 | <elseif condition="$vo.state eq 2"/> | 382 | <elseif condition="$vo.state eq 2"/> |
383 | - <a href="w_Ypayment.html"> | ||
384 | - <div class="myorder_bottom2_2">查看订单</div> | ||
385 | - </a> | 383 | + <!--<a href="w_Ypayment.html">--> |
384 | + <!--<div class="myorder_bottom2_2">查看订单</div>--> | ||
385 | + <!--</a>--> | ||
386 | <elseif condition="$vo.state eq 5"/> | 386 | <elseif condition="$vo.state eq 5"/> |
387 | <a href="w_logistics.html"> | 387 | <a href="w_logistics.html"> |
388 | <div class="myorder_bottom2_2">查看物流</div> | 388 | <div class="myorder_bottom2_2">查看物流</div> |
1 | +<!DOCTYPE html> | ||
2 | +<html lang="en"> | ||
3 | + | ||
4 | +<head> | ||
5 | + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> | ||
6 | + <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" /> | ||
7 | + <meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||
8 | + <title>学考无忧</title> | ||
9 | + <link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css" /> | ||
10 | + <link rel="stylesheet" href="__TMPL__/public/assets/css/base.css" /> | ||
11 | + <style> | ||
12 | + .pay_banner { | ||
13 | + width: 100%; | ||
14 | + height: 1.3rem; | ||
15 | + background-size: cover; | ||
16 | + background-image: url("__TMPL__/public/assets/images/55.png"); | ||
17 | + } | ||
18 | + | ||
19 | + .order_address { | ||
20 | + padding: 0.28rem 0 0.42rem; | ||
21 | + box-sizing: border-box; | ||
22 | + background-repeat: no-repeat; | ||
23 | + background-image: url("__TMPL__/public/assets/images/32.png"); | ||
24 | + background-position: bottom; | ||
25 | + background-size: 100% 0.06rem; | ||
26 | + } | ||
27 | + </style> | ||
28 | +</head> | ||
29 | + | ||
30 | +<body> | ||
31 | + <div class="Dpayment"> | ||
32 | + <!-- 顶部 --> | ||
33 | + <div class="order_top"> | ||
34 | + <img src="__TMPL__/public/assets/images/left.png" alt="" /> | ||
35 | + <p>我的订单</p> | ||
36 | + </div> | ||
37 | + <!-- 顶部banner --> | ||
38 | + <div class="pay_banner"> | ||
39 | + <div class="pay_bannerLeft"> | ||
40 | + <div class="pay_bannerImg"> | ||
41 | + <img src="__TMPL__/public/assets/images/53.png" alt="" /> | ||
42 | + </div> | ||
43 | + <p> | ||
44 | + <if condition="$data.state eq 4"> | ||
45 | + 待付款 | ||
46 | + <elseif condition="$data.state eq 2"/> | ||
47 | + 待发货 | ||
48 | + <elseif condition="$data.state eq 5"/> | ||
49 | + 已发货 | ||
50 | + <elseif condition="$data.state eq 3"/> | ||
51 | + 已完成 | ||
52 | + </if> | ||
53 | + </p> | ||
54 | + </div> | ||
55 | + </div> | ||
56 | + <!-- 地址 --> | ||
57 | + <div class="order_address"> | ||
58 | + <!-- 有地址 --> | ||
59 | + <a href=""> | ||
60 | + <div class="order_addressYes"> | ||
61 | + <div class="or_addressYesImg1"> | ||
62 | + <img src="__TMPL__/public/assets/images/38.png" alt="" /> | ||
63 | + </div> | ||
64 | + <div class="or_addressYesTxt1"> | ||
65 | + <div class="or_addressYesTxt2"> | ||
66 | + <div class="or_addressName">{$data.address.name}</div> | ||
67 | + <p class="or_addressPhone">{$data.phone}</p> | ||
68 | + </div> | ||
69 | + <p class="or_address_detailed"> | ||
70 | + {$data.address.region}{$data.address.detailed} | ||
71 | + </p> | ||
72 | + </div> | ||
73 | + <div class="or_addressYesImg2"> | ||
74 | + <img src="__TMPL__/public/assets/images/29.png" alt="" /> | ||
75 | + </div> | ||
76 | + </div> | ||
77 | + </a> | ||
78 | + </div> | ||
79 | + <!-- 订单信息 --> | ||
80 | + <div class="order_news"> | ||
81 | + <h1 class="order_newsTit">订单信息</h1> | ||
82 | + <ul class="order_newsUl"> | ||
83 | + <foreach name="$data.indent_goods" item="i_g"> | ||
84 | + <li> | ||
85 | + <div class="order_newsImg"> | ||
86 | + <img src="{:cmf_get_image_url($i_g['thumbnail'])}" alt="" /> | ||
87 | + </div> | ||
88 | + <div class="order_newsCon"> | ||
89 | + <div class="order_newsTxt1 txt-cut"> | ||
90 | + {$i_g.book_name} | ||
91 | + </div> | ||
92 | + <div class="order_newsTxt2">×<span>{$i_g.number}</span></div> | ||
93 | + <div class="order_newsTxt3"> | ||
94 | + <p class="de_topTxt1_1">¥<span>{$i_g.price}</span></p> | ||
95 | + <p class="de_topTxt1_2">¥<span>{$i_g.pricing}</span></p> | ||
96 | + </div> | ||
97 | + </div> | ||
98 | + </li> | ||
99 | + <php>$sum[] = $i_g['price']*$i_g['number'];</php> | ||
100 | + </foreach> | ||
101 | + </ul> | ||
102 | + </div> | ||
103 | + <!-- 支付方式/配送方式 --> | ||
104 | + <div class="order_Etc"> | ||
105 | + <div class="order_Etc1 ypayTxt"> | ||
106 | + <p>订单编号:</p> | ||
107 | + <p>{$data.order_number}</p> | ||
108 | + </div> | ||
109 | + <div class="order_Etc1 ypayTxt"> | ||
110 | + <p>下单时间:</p> | ||
111 | + <p>{:date('Y-m-d H:i:s',$data.create_time)}</p> | ||
112 | + </div> | ||
113 | + <div class="order_Etc1 ypayTxt"> | ||
114 | + <p>配送方式:</p> | ||
115 | + <if condition="$data.is_courier eq 0"> | ||
116 | + <p>统一配送(0元)</p> | ||
117 | + <elseif condition="$data.id_courier eq 1"/> | ||
118 | + <p>快递({$data.money-array_sum($sum)}元)</p> | ||
119 | + </if> | ||
120 | + </div> | ||
121 | + </div> | ||
122 | + <!-- 实付金额: --> | ||
123 | + <div class="ypay_price"> | ||
124 | + <p class="ypay_price1">实付金额:</p> | ||
125 | + <p class="de_topTxt1_1">¥<span>{$data.money}</span></p> | ||
126 | + </div> | ||
127 | + <!-- 底部 --> | ||
128 | + <div class="pay_bottom"> | ||
129 | + <div class="pay_bottom2"> | ||
130 | + <a href="w_logistics.html"> | ||
131 | + <div class="pay_bottom2_1">物流信息</div> | ||
132 | + </a> | ||
133 | + <div class="pay_bottom2_2">售后咨询</div> | ||
134 | + </div> | ||
135 | + </div> | ||
136 | + </div> | ||
137 | + <script src="__TMPL__/public/assets/js/base.js"></script> | ||
138 | +</body> | ||
139 | + | ||
140 | +</html> |
-
请 注册 或 登录 后发表评论