正在显示
7 个修改的文件
包含
729 行增加
和
8 行删除
@@ -232,5 +232,24 @@ $configs = [ | @@ -232,5 +232,24 @@ $configs = [ | ||
232 | 'cmf_default_theme' => 'simpleboot3', | 232 | 'cmf_default_theme' => 'simpleboot3', |
233 | 'cmf_admin_theme_path' => 'themes/', | 233 | 'cmf_admin_theme_path' => 'themes/', |
234 | 'cmf_admin_default_theme' => 'admin_simpleboot3', | 234 | 'cmf_admin_default_theme' => 'admin_simpleboot3', |
235 | + | ||
236 | + //快递鸟参数配置 | ||
237 | + 'bird'=>[ | ||
238 | + //正式 | ||
239 | + //'EBusinessID' => '1472267',//电商ID | ||
240 | + //'AppKey' => 'cc8314fd-0381-4e37-ad17-239287f1d8d2',//AppKey | ||
241 | + //测试 | ||
242 | + 'EBusinessID' => 'test1472267', | ||
243 | + 'AppKey' => 'f84c7071-a6c7-48ce-8fe0-11b719d88a1d', | ||
244 | + ], | ||
245 | + //快递鸟预约取件接口寄件人参数 | ||
246 | + 'sender'=>[ | ||
247 | + 'Name' => "李先生", | ||
248 | + 'Mobile' => "18888888888", | ||
249 | + 'ProvinceName' => "河北省", | ||
250 | + 'CityName' => "石家庄市", | ||
251 | + 'ExpAreaName' => "新华区", | ||
252 | + 'Address' => "学府路121号", | ||
253 | + ], | ||
235 | ]; | 254 | ]; |
236 | return array_merge($configs, $runtimeConfig,$wechatConfig); | 255 | return array_merge($configs, $runtimeConfig,$wechatConfig); |
app/portal/controller/BirdController.php
0 → 100644
1 | +<?php | ||
2 | +/** | ||
3 | + * Created by PhpStorm. | ||
4 | + * User: Administrator | ||
5 | + * Date: 2019/6/7 | ||
6 | + * Time: 9:25 | ||
7 | + */ | ||
8 | + | ||
9 | +namespace app\portal\controller; | ||
10 | + | ||
11 | + | ||
12 | +use app\portal\model\IndentModel; | ||
13 | +use cmf\controller\HomeBaseController; | ||
14 | +use think\Db; | ||
15 | + | ||
16 | +class BirdController extends HomeBaseController | ||
17 | +{ | ||
18 | + public function createOrder($indent_id = null) | ||
19 | + { | ||
20 | + if(empty($indent_id)){ | ||
21 | + $this->error('缺少必要参数','','',''); | ||
22 | + } | ||
23 | + $where['id'] = ['eq',$indent_id]; | ||
24 | + $indentModel = new IndentModel(); | ||
25 | + $indent = $indentModel->findData($where); | ||
26 | + if(empty($indent)){ | ||
27 | + $this->error('未查询到该订单','','',''); | ||
28 | + } | ||
29 | + if($indent['state'] != 2){ | ||
30 | + $this->error('该订单不是待发货状态','','',''); | ||
31 | + } | ||
32 | + $bird = config('bird'); | ||
33 | + //电商ID | ||
34 | + defined('EBusinessID') or define('EBusinessID', $bird['EBusinessID']); | ||
35 | + //电商加密私钥,快递鸟提供,注意保管,不要泄漏 | ||
36 | + defined('AppKey') or define('AppKey', $bird['AppKey']); | ||
37 | + //请求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'); | ||
39 | + | ||
40 | + //构造在线下单提交信息 | ||
41 | + $eorder = []; | ||
42 | + $eorder["ShipperCode"] = "SF"; | ||
43 | + $eorder["OrderCode"] = "PM2016050789471"; | ||
44 | + $eorder["PayType"] = 1; | ||
45 | + $eorder["ExpType"] = 1; | ||
46 | + $eorder['IsNotice'] = 0; | ||
47 | + $sender = config('sender'); | ||
48 | +// $sender["Name"] = "李先生"; | ||
49 | +// $sender["Mobile"] = "18888888888"; | ||
50 | +// $sender["ProvinceName"] = "李先生"; | ||
51 | +// $sender["CityName"] = "深圳市"; | ||
52 | +// $sender["ExpAreaName"] = "福田区"; | ||
53 | +// $sender["Address"] = "赛格广场5401AB"; | ||
54 | + | ||
55 | + $receiver = []; | ||
56 | + $receiver["Name"] = "李先生"; | ||
57 | + $receiver["Mobile"] = "18888888888"; | ||
58 | + $receiver["ProvinceName"] = "李先生"; | ||
59 | + $receiver["CityName"] = "深圳市"; | ||
60 | + $receiver["ExpAreaName"] = "福田区"; | ||
61 | + $receiver["Address"] = "赛格广场5401AB"; | ||
62 | + | ||
63 | + $commodityOne = []; | ||
64 | + $commodityOne["GoodsName"] = "书"; | ||
65 | + $commodity = []; | ||
66 | + $commodity[] = $commodityOne; | ||
67 | + | ||
68 | + $eorder["Sender"] = $sender; | ||
69 | + $eorder["Receiver"] = $receiver; | ||
70 | + $eorder["Commodity"] = $commodity; | ||
71 | + | ||
72 | + | ||
73 | + //调用在线下单 | ||
74 | + $jsonParam = json_encode($eorder, JSON_UNESCAPED_UNICODE); | ||
75 | + $jsonResult = $this->submitOOrder($jsonParam); | ||
76 | + | ||
77 | + //解析在线下单返回结果 | ||
78 | + $result = json_decode($jsonResult, true); | ||
79 | + if ($result["ResultCode"] == "100") { | ||
80 | + return $result['Order']['LogisticCode'];//返回快递单号 | ||
81 | + } else { | ||
82 | + return $result['Reason']; | ||
83 | + } | ||
84 | + } | ||
85 | + | ||
86 | + | ||
87 | + /** | ||
88 | + * Json方式 提交在线下单 | ||
89 | + * @param $requestData | ||
90 | + * @return url响应返回的html | ||
91 | + */ | ||
92 | + function submitOOrder($requestData) | ||
93 | + { | ||
94 | + $datas = array( | ||
95 | + 'EBusinessID' => EBusinessID, | ||
96 | + 'RequestType' => '1001', | ||
97 | + 'RequestData' => urlencode($requestData), | ||
98 | + 'DataType' => '2', | ||
99 | + ); | ||
100 | + $datas['DataSign'] = $this->encrypt($requestData, AppKey); | ||
101 | + $result = $this->sendPost(ReqURL, $datas); | ||
102 | + | ||
103 | + //根据公司业务处理返回的信息...... | ||
104 | + | ||
105 | + return $result; | ||
106 | + } | ||
107 | + | ||
108 | + | ||
109 | + /** | ||
110 | + * post提交数据 | ||
111 | + * @param string $url 请求Url | ||
112 | + * @param array $datas 提交的数据 | ||
113 | + * @return url响应返回的html | ||
114 | + */ | ||
115 | + function sendPost($url, $datas) | ||
116 | + { | ||
117 | + $temps = array(); | ||
118 | + foreach ($datas as $key => $value) { | ||
119 | + $temps[] = sprintf('%s=%s', $key, $value); | ||
120 | + } | ||
121 | + $post_data = implode('&', $temps); | ||
122 | + $url_info = parse_url($url); | ||
123 | + $httpheader = "POST " . $url_info['path'] . " HTTP/1.0\r\n"; | ||
124 | + $httpheader .= "Host:" . $url_info['host'] . "\r\n"; | ||
125 | + $httpheader .= "Content-Type:application/x-www-form-urlencoded\r\n"; | ||
126 | + $httpheader .= "Content-Length:" . strlen($post_data) . "\r\n"; | ||
127 | + $httpheader .= "Connection:close\r\n\r\n"; | ||
128 | + $httpheader .= $post_data; | ||
129 | + $fd = fsockopen($url_info['host'], $url_info['port']); | ||
130 | + fwrite($fd, $httpheader); | ||
131 | + $gets = ""; | ||
132 | + $headerFlag = true; | ||
133 | + while (!feof($fd)) { | ||
134 | + if (($header = @fgets($fd)) && ($header == "\r\n" || $header == "\n")) { | ||
135 | + break; | ||
136 | + } | ||
137 | + } | ||
138 | + while (!feof($fd)) { | ||
139 | + $gets .= fread($fd, 128); | ||
140 | + } | ||
141 | + fclose($fd); | ||
142 | + | ||
143 | + return $gets; | ||
144 | + } | ||
145 | + | ||
146 | + /** | ||
147 | + * 电商Sign签名生成 | ||
148 | + * @param data 内容 | ||
149 | + * @param appkey Appkey | ||
150 | + * @return DataSign签名 | ||
151 | + */ | ||
152 | + function encrypt($data, $appkey) | ||
153 | + { | ||
154 | + return urlencode(base64_encode(md5($data . $appkey))); | ||
155 | + } | ||
156 | +} |
@@ -9,20 +9,78 @@ | @@ -9,20 +9,78 @@ | ||
9 | namespace app\portal\controller; | 9 | namespace app\portal\controller; |
10 | 10 | ||
11 | 11 | ||
12 | -use app\portal\model\OrderModel; | 12 | +use app\portal\model\IndentGoodsModel; |
13 | +use app\portal\model\IndentModel; | ||
13 | use cmf\controller\WeChatBaseController; | 14 | use cmf\controller\WeChatBaseController; |
14 | 15 | ||
15 | class OrderController extends WeChatBaseController | 16 | class OrderController extends WeChatBaseController |
16 | { | 17 | { |
18 | + /** | ||
19 | + * 全部订单 | ||
20 | + * @return mixed | ||
21 | + * @throws \think\db\exception\DataNotFoundException | ||
22 | + * @throws \think\db\exception\ModelNotFoundException | ||
23 | + * @throws \think\exception\DbException | ||
24 | + */ | ||
17 | public function get_all(){ | 25 | public function get_all(){ |
26 | + $state = $this->request->param('state',0,'intval'); | ||
27 | +// if(!empty($state)){ | ||
28 | +// $where1['state'] = ['eq',$state]; | ||
29 | +// } | ||
18 | $user_id = cmf_get_current_user_id(); | 30 | $user_id = cmf_get_current_user_id(); |
19 | - $orderModel = new OrderModel(); | ||
20 | - $where['uid'] = ['eq',$user_id]; | ||
21 | - $data = $orderModel->selectData($where); | 31 | + $indentModel = new IndentModel(); |
32 | + $where1['uid'] = ['eq',$user_id]; | ||
33 | + $data = $indentModel->selectData($where1); | ||
22 | if(!empty($data)){ | 34 | if(!empty($data)){ |
35 | + $indentGoodsModel = new IndentGoodsModel(); | ||
23 | foreach($data as $key => $vo){ | 36 | foreach($data as $key => $vo){ |
24 | - | 37 | + $where2['indent_id'] = ['eq',$vo['id']]; |
38 | + $indentGoods = $indentGoodsModel->selectData($where2); | ||
39 | + $data[$key]['indent_goods'] = $indentGoods; | ||
25 | } | 40 | } |
26 | } | 41 | } |
42 | + $this->assign('data',$data); | ||
43 | + $this->assign('state',$state); | ||
44 | + return $this->fetch(); | ||
45 | + } | ||
46 | + public function get_one(){ | ||
47 | + $id = $this->request->param('id',0,'intval'); | ||
48 | + if(empty($id)){ | ||
49 | + $this->error('缺少必要参数','','',''); | ||
50 | + } | ||
51 | + $user_id = cmf_get_current_user_id(); | ||
52 | + $where1['uid'] = ['eq',$user_id]; | ||
53 | + $where1['id'] = ['eq',$id]; | ||
54 | + $indentModel = new IndentModel(); | ||
55 | + $data = $indentModel->findData($where1); | ||
56 | + if(empty($data)){ | ||
57 | + $this->error('未查询到该订单','','',''); | ||
58 | + } | ||
59 | + $where2['indent_id'] = ['eq',$data['id']]; | ||
60 | + $indentGoodsModel = new IndentGoodsModel(); | ||
61 | + $indentGoods = $indentGoodsModel->selectData($where2); | ||
62 | + $data['indent_goods'] = $indentGoods; | ||
63 | + $this->assign('data',$data); | ||
64 | + return $this->fetch(); | ||
65 | + } | ||
66 | + public function cancel_order(){ | ||
67 | + $id = $this->request->param('id',0,'intval'); | ||
68 | + if(empty($id)){ | ||
69 | + $this->error('缺少必要参数','','',''); | ||
70 | + } | ||
71 | + $where1['id'] = ['eq',$id]; | ||
72 | + $indentModel = new IndentModel(); | ||
73 | + $data = $indentModel->findData($where1); | ||
74 | + if(empty($data)){ | ||
75 | + $this->error('缺少必要参数','','',''); | ||
76 | + } | ||
77 | + if($data['state'] != 4){ | ||
78 | + $this->error('订单不是待支付状态','','',''); | ||
79 | + } | ||
80 | + $result = $indentModel->deleteData($where1); | ||
81 | + if(empty($result)){ | ||
82 | + $this->error('sql执行失败','','',''); | ||
83 | + } | ||
84 | + $this->redirect('order/get_all'); | ||
27 | } | 85 | } |
28 | } | 86 | } |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | * Created by PhpStorm. | 3 | * Created by PhpStorm. |
4 | * User: Administrator | 4 | * User: Administrator |
5 | * Date: 2019/6/5 | 5 | * Date: 2019/6/5 |
6 | - * Time: 19:56 | 6 | + * Time: 20:27 |
7 | */ | 7 | */ |
8 | 8 | ||
9 | namespace app\portal\model; | 9 | namespace app\portal\model; |
@@ -11,8 +11,16 @@ namespace app\portal\model; | @@ -11,8 +11,16 @@ namespace app\portal\model; | ||
11 | 11 | ||
12 | use think\Model; | 12 | use think\Model; |
13 | 13 | ||
14 | -class OrderModel extends Model | 14 | +class IndentGoodsModel extends Model |
15 | { | 15 | { |
16 | + /** | ||
17 | + * 获取多个订单明细 | ||
18 | + * @param $where | ||
19 | + * @return array | ||
20 | + * @throws \think\db\exception\DataNotFoundException | ||
21 | + * @throws \think\db\exception\ModelNotFoundException | ||
22 | + * @throws \think\exception\DbException | ||
23 | + */ | ||
16 | public function selectData($where){ | 24 | public function selectData($where){ |
17 | $data = $this->where($where)->select()->toArray(); | 25 | $data = $this->where($where)->select()->toArray(); |
18 | return $data; | 26 | return $data; |
app/portal/model/IndentModel.php
0 → 100644
1 | +<?php | ||
2 | +/** | ||
3 | + * Created by PhpStorm. | ||
4 | + * User: Administrator | ||
5 | + * Date: 2019/6/5 | ||
6 | + * Time: 19:56 | ||
7 | + */ | ||
8 | + | ||
9 | +namespace app\portal\model; | ||
10 | + | ||
11 | + | ||
12 | +use think\Model; | ||
13 | + | ||
14 | +class IndentModel extends Model | ||
15 | +{ | ||
16 | + /** | ||
17 | + * 获取多个订单 | ||
18 | + * @param $where | ||
19 | + * @return array | ||
20 | + * @throws \think\db\exception\DataNotFoundException | ||
21 | + * @throws \think\db\exception\ModelNotFoundException | ||
22 | + * @throws \think\exception\DbException | ||
23 | + */ | ||
24 | + public function selectData($where){ | ||
25 | + $data = $this->where($where)->order('create_time desc')->select()->toArray(); | ||
26 | + return $data; | ||
27 | + } | ||
28 | + | ||
29 | + /** | ||
30 | + * 获取单条数据 | ||
31 | + * @param $where | ||
32 | + * @return array|false|\PDOStatement|string|Model | ||
33 | + * @throws \think\db\exception\DataNotFoundException | ||
34 | + * @throws \think\db\exception\ModelNotFoundException | ||
35 | + * @throws \think\exception\DbException | ||
36 | + */ | ||
37 | + public function findData($where){ | ||
38 | + $data = $this->where($where)->find(); | ||
39 | + return $data; | ||
40 | + } | ||
41 | + | ||
42 | + /** | ||
43 | + * 删除订单 | ||
44 | + * @param $where | ||
45 | + * @return int | ||
46 | + */ | ||
47 | + public function deleteData($where){ | ||
48 | + $result = $this->where($where)->delete(); | ||
49 | + return $result; | ||
50 | + } | ||
51 | +} |
@@ -39,4 +39,4 @@ define('BRONET_VERSION', '5.0.170927'); | @@ -39,4 +39,4 @@ define('BRONET_VERSION', '5.0.170927'); | ||
39 | require CMF_ROOT . 'simplewind/thinkphp/base.php'; | 39 | require CMF_ROOT . 'simplewind/thinkphp/base.php'; |
40 | 40 | ||
41 | // 执行应用 | 41 | // 执行应用 |
42 | -\think\App::run()->send(); | 42 | +\think\App::run()->send(); |
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 | +</head> | ||
12 | + | ||
13 | +<body> | ||
14 | + <div class="myorder_box"> | ||
15 | + <!-- 顶部 --> | ||
16 | + <div class="order_top"> | ||
17 | + <img src="__TMPL__/public/assets/images/left.png" alt="" /> | ||
18 | + <p>我的订单</p> | ||
19 | + </div> | ||
20 | + <!-- 头部 --> | ||
21 | + <div class="myor_title"> | ||
22 | + <ul> | ||
23 | + <li class="<if condition='$state eq 0'>myor_title_active</if>">全部</li> | ||
24 | + <li class="<if condition='$state eq 4'>myor_title_active</if>">待付款</li> | ||
25 | + <li class="<if condition='$state eq 2'>myor_title_active</if>">待发货</li> | ||
26 | + <li class="<if condition='$state eq 5'>myor_title_active</if>">已发货</li> | ||
27 | + <li class="<if condition='$state eq 3'>myor_title_active</if>">已完成</li> | ||
28 | + </ul> | ||
29 | + </div> | ||
30 | + <!-- 内容 --> | ||
31 | + <div class="myorder_content"> | ||
32 | + <!-- 全部 --> | ||
33 | + <div class="myorder_con1" style="display: block"> | ||
34 | + <foreach name="data" item="vo"> | ||
35 | + <a href=""> | ||
36 | + <div class="myorder_information"> | ||
37 | + <!-- 订单 --> | ||
38 | + <div class="myorder_the"> | ||
39 | + <p class="order_dan">订单号:{$vo.order_number}</p> | ||
40 | + <div class="myorder_state1"> | ||
41 | + <if condition="$vo.state eq 4"> | ||
42 | + 待付款 | ||
43 | + <elseif condition="$vo.state eq 2"/> | ||
44 | + 待发货 | ||
45 | + <elseif condition="$vo.state eq 5"/> | ||
46 | + 已发货 | ||
47 | + <elseif condition="$vo.state eq 3"/> | ||
48 | + 已完成 | ||
49 | + </if> | ||
50 | + </div> | ||
51 | + </div> | ||
52 | + <ul class="order_newsUl myorder_border"> | ||
53 | + <foreach name="$vo.indent_goods" item="i_g"> | ||
54 | + <li> | ||
55 | + <div class="order_newsImg"> | ||
56 | + <img src="{:cmf_get_image_url($i_g.thumbnail)}" alt="" /> | ||
57 | + </div> | ||
58 | + <div class="order_newsCon"> | ||
59 | + <div class="order_newsTxt1 txt-cut"> | ||
60 | + {$i_g.book_name} | ||
61 | + </div> | ||
62 | + <div class="order_newsTxt2">×<span>{$i_g.number}</span></div> | ||
63 | + <div class="order_newsTxt3"> | ||
64 | + <p class="de_topTxt1_1">¥<span>{$i_g.price}</span></p> | ||
65 | + <p class="de_topTxt1_2">¥<span>{$i_g.pricing}</span></p> | ||
66 | + </div> | ||
67 | + </div> | ||
68 | + </li> | ||
69 | + </foreach> | ||
70 | + <div class="my_ordera"> | ||
71 | + <span>共{:count($vo.indent_goods)}件商品 合计:</span> | ||
72 | + <p>¥{$vo.money}</p> | ||
73 | + </div> | ||
74 | + </ul> | ||
75 | + <!-- 时间/底部 --> | ||
76 | + <div class="myorder_bottom"> | ||
77 | + <div class="myorder_bottom1"> | ||
78 | + <div class="myorder_bottom1Img"> | ||
79 | + <img src="__TMPL__/public/assets/images/52.png" alt="" /> | ||
80 | + </div> | ||
81 | + <p class="myorder_bottom1Txt">{:date('Y-m-d H:i:s',$vo['create_time'])}</p> | ||
82 | + </div> | ||
83 | + <div class="myorder_bottom2"> | ||
84 | + <if condition="$vo.state eq 4"> | ||
85 | + <div class="myorder_bottom2_1">取消订单</div> | ||
86 | + <div class="myorder_bottom2_2">去支付</div> | ||
87 | + <elseif condition="$vo.state eq 2"/> | ||
88 | + <a href="w_Ypayment.html"> | ||
89 | + <div class="myorder_bottom2_2">查看订单</div> | ||
90 | + </a> | ||
91 | + <elseif condition="$vo.state eq 5"/> | ||
92 | + <a href="w_logistics.html"> | ||
93 | + <div class="myorder_bottom2_2">查看物流</div> | ||
94 | + </a> | ||
95 | + <elseif condition="$vo.state eq 3"/> | ||
96 | + <div class="myorder_bottom2_2">去评价</div> | ||
97 | + </if> | ||
98 | + </div> | ||
99 | + </div> | ||
100 | + </div> | ||
101 | + </a> | ||
102 | + </foreach> | ||
103 | + </div> | ||
104 | + <!-- 待付款 --> | ||
105 | + <div class="myorder_con1"> | ||
106 | + <foreach name="data" item="vo"> | ||
107 | + <if condition="$vo.state eq 4"> | ||
108 | + <a href=""> | ||
109 | + <div class="myorder_information"> | ||
110 | + <!-- 订单 --> | ||
111 | + <div class="myorder_the"> | ||
112 | + <p class="order_dan">订单号:{$vo.order_number}</p> | ||
113 | + <div class="myorder_state1"> | ||
114 | + <if condition="$vo.state eq 4"> | ||
115 | + 待付款 | ||
116 | + <elseif condition="$vo.state eq 2"/> | ||
117 | + 待发货 | ||
118 | + <elseif condition="$vo.state eq 5"/> | ||
119 | + 已发货 | ||
120 | + <elseif condition="$vo.state eq 3"/> | ||
121 | + 已完成 | ||
122 | + </if> | ||
123 | + </div> | ||
124 | + </div> | ||
125 | + <ul class="order_newsUl myorder_border"> | ||
126 | + <foreach name="$vo.indent_goods" item="i_g"> | ||
127 | + <li> | ||
128 | + <div class="order_newsImg"> | ||
129 | + <img src="{:cmf_get_image_url($i_g.thumbnail)}" alt="" /> | ||
130 | + </div> | ||
131 | + <div class="order_newsCon"> | ||
132 | + <div class="order_newsTxt1 txt-cut"> | ||
133 | + {$i_g.book_name} | ||
134 | + </div> | ||
135 | + <div class="order_newsTxt2">×<span>{$i_g.number}</span></div> | ||
136 | + <div class="order_newsTxt3"> | ||
137 | + <p class="de_topTxt1_1">¥<span>{$i_g.price}</span></p> | ||
138 | + <p class="de_topTxt1_2">¥<span>{$i_g.pricing}</span></p> | ||
139 | + </div> | ||
140 | + </div> | ||
141 | + </li> | ||
142 | + </foreach> | ||
143 | + <div class="my_ordera"> | ||
144 | + <span>共{:count($vo.indent_goods)}件商品 合计:</span> | ||
145 | + <p>¥{$vo.money}</p> | ||
146 | + </div> | ||
147 | + </ul> | ||
148 | + <!-- 时间/底部 --> | ||
149 | + <div class="myorder_bottom"> | ||
150 | + <div class="myorder_bottom1"> | ||
151 | + <div class="myorder_bottom1Img"> | ||
152 | + <img src="__TMPL__/public/assets/images/52.png" alt="" /> | ||
153 | + </div> | ||
154 | + <p class="myorder_bottom1Txt">{:date('Y-m-d H:i:s',$vo['create_time'])}</p> | ||
155 | + </div> | ||
156 | + <div class="myorder_bottom2"> | ||
157 | + <if condition="$vo.state eq 4"> | ||
158 | + <div class="myorder_bottom2_1">取消订单</div> | ||
159 | + <div class="myorder_bottom2_2">去支付</div> | ||
160 | + <elseif condition="$vo.state eq 2"/> | ||
161 | + <a href="w_Ypayment.html"> | ||
162 | + <div class="myorder_bottom2_2">查看订单</div> | ||
163 | + </a> | ||
164 | + <elseif condition="$vo.state eq 5"/> | ||
165 | + <a href="w_logistics.html"> | ||
166 | + <div class="myorder_bottom2_2">查看物流</div> | ||
167 | + </a> | ||
168 | + <elseif condition="$vo.state eq 3"/> | ||
169 | + <div class="myorder_bottom2_2">去评价</div> | ||
170 | + </if> | ||
171 | + </div> | ||
172 | + </div> | ||
173 | + </div> | ||
174 | + </a> | ||
175 | + </if> | ||
176 | + </foreach> | ||
177 | + </div> | ||
178 | + <!-- 待发货 --> | ||
179 | + <div class="myorder_con1"> | ||
180 | + <foreach name="data" item="vo"> | ||
181 | + <if condition="$vo.state eq 2"> | ||
182 | + <a href=""> | ||
183 | + <div class="myorder_information"> | ||
184 | + <!-- 订单 --> | ||
185 | + <div class="myorder_the"> | ||
186 | + <p class="order_dan">订单号:{$vo.order_number}</p> | ||
187 | + <div class="myorder_state1"> | ||
188 | + <if condition="$vo.state eq 4"> | ||
189 | + 待付款 | ||
190 | + <elseif condition="$vo.state eq 2"/> | ||
191 | + 待发货 | ||
192 | + <elseif condition="$vo.state eq 5"/> | ||
193 | + 已发货 | ||
194 | + <elseif condition="$vo.state eq 3"/> | ||
195 | + 已完成 | ||
196 | + </if> | ||
197 | + </div> | ||
198 | + </div> | ||
199 | + <ul class="order_newsUl myorder_border"> | ||
200 | + <foreach name="$vo.indent_goods" item="i_g"> | ||
201 | + <li> | ||
202 | + <div class="order_newsImg"> | ||
203 | + <img src="{:cmf_get_image_url($i_g.thumbnail)}" alt="" /> | ||
204 | + </div> | ||
205 | + <div class="order_newsCon"> | ||
206 | + <div class="order_newsTxt1 txt-cut"> | ||
207 | + {$i_g.book_name} | ||
208 | + </div> | ||
209 | + <div class="order_newsTxt2">×<span>{$i_g.number}</span></div> | ||
210 | + <div class="order_newsTxt3"> | ||
211 | + <p class="de_topTxt1_1">¥<span>{$i_g.price}</span></p> | ||
212 | + <p class="de_topTxt1_2">¥<span>{$i_g.pricing}</span></p> | ||
213 | + </div> | ||
214 | + </div> | ||
215 | + </li> | ||
216 | + </foreach> | ||
217 | + <div class="my_ordera"> | ||
218 | + <span>共{:count($vo.indent_goods)}件商品 合计:</span> | ||
219 | + <p>¥{$vo.money}</p> | ||
220 | + </div> | ||
221 | + </ul> | ||
222 | + <!-- 时间/底部 --> | ||
223 | + <div class="myorder_bottom"> | ||
224 | + <div class="myorder_bottom1"> | ||
225 | + <div class="myorder_bottom1Img"> | ||
226 | + <img src="__TMPL__/public/assets/images/52.png" alt="" /> | ||
227 | + </div> | ||
228 | + <p class="myorder_bottom1Txt">{:date('Y-m-d H:i:s',$vo['create_time'])}</p> | ||
229 | + </div> | ||
230 | + <div class="myorder_bottom2"> | ||
231 | + <if condition="$vo.state eq 4"> | ||
232 | + <div class="myorder_bottom2_1">取消订单</div> | ||
233 | + <div class="myorder_bottom2_2">去支付</div> | ||
234 | + <elseif condition="$vo.state eq 2"/> | ||
235 | + <a href="w_Ypayment.html"> | ||
236 | + <div class="myorder_bottom2_2">查看订单</div> | ||
237 | + </a> | ||
238 | + <elseif condition="$vo.state eq 5"/> | ||
239 | + <a href="w_logistics.html"> | ||
240 | + <div class="myorder_bottom2_2">查看物流</div> | ||
241 | + </a> | ||
242 | + <elseif condition="$vo.state eq 3"/> | ||
243 | + <div class="myorder_bottom2_2">去评价</div> | ||
244 | + </if> | ||
245 | + </div> | ||
246 | + </div> | ||
247 | + </div> | ||
248 | + </a> | ||
249 | + </if> | ||
250 | + </foreach> | ||
251 | + </div> | ||
252 | + <!-- 已发货 --> | ||
253 | + <div class="myorder_con1"> | ||
254 | + <foreach name="data" item="vo"> | ||
255 | + <if condition="$vo.state eq 5"> | ||
256 | + <a href=""> | ||
257 | + <div class="myorder_information"> | ||
258 | + <!-- 订单 --> | ||
259 | + <div class="myorder_the"> | ||
260 | + <p class="order_dan">订单号:{$vo.order_number}</p> | ||
261 | + <div class="myorder_state1"> | ||
262 | + <if condition="$vo.state eq 4"> | ||
263 | + 待付款 | ||
264 | + <elseif condition="$vo.state eq 2"/> | ||
265 | + 待发货 | ||
266 | + <elseif condition="$vo.state eq 5"/> | ||
267 | + 已发货 | ||
268 | + <elseif condition="$vo.state eq 3"/> | ||
269 | + 已完成 | ||
270 | + </if> | ||
271 | + </div> | ||
272 | + </div> | ||
273 | + <ul class="order_newsUl myorder_border"> | ||
274 | + <foreach name="$vo.indent_goods" item="i_g"> | ||
275 | + <li> | ||
276 | + <div class="order_newsImg"> | ||
277 | + <img src="{:cmf_get_image_url($i_g.thumbnail)}" alt="" /> | ||
278 | + </div> | ||
279 | + <div class="order_newsCon"> | ||
280 | + <div class="order_newsTxt1 txt-cut"> | ||
281 | + {$i_g.book_name} | ||
282 | + </div> | ||
283 | + <div class="order_newsTxt2">×<span>{$i_g.number}</span></div> | ||
284 | + <div class="order_newsTxt3"> | ||
285 | + <p class="de_topTxt1_1">¥<span>{$i_g.price}</span></p> | ||
286 | + <p class="de_topTxt1_2">¥<span>{$i_g.pricing}</span></p> | ||
287 | + </div> | ||
288 | + </div> | ||
289 | + </li> | ||
290 | + </foreach> | ||
291 | + <div class="my_ordera"> | ||
292 | + <span>共{:count($vo.indent_goods)}件商品 合计:</span> | ||
293 | + <p>¥{$vo.money}</p> | ||
294 | + </div> | ||
295 | + </ul> | ||
296 | + <!-- 时间/底部 --> | ||
297 | + <div class="myorder_bottom"> | ||
298 | + <div class="myorder_bottom1"> | ||
299 | + <div class="myorder_bottom1Img"> | ||
300 | + <img src="__TMPL__/public/assets/images/52.png" alt="" /> | ||
301 | + </div> | ||
302 | + <p class="myorder_bottom1Txt">{:date('Y-m-d H:i:s',$vo['create_time'])}</p> | ||
303 | + </div> | ||
304 | + <div class="myorder_bottom2"> | ||
305 | + <if condition="$vo.state eq 4"> | ||
306 | + <div class="myorder_bottom2_1">取消订单</div> | ||
307 | + <div class="myorder_bottom2_2">去支付</div> | ||
308 | + <elseif condition="$vo.state eq 2"/> | ||
309 | + <a href="w_Ypayment.html"> | ||
310 | + <div class="myorder_bottom2_2">查看订单</div> | ||
311 | + </a> | ||
312 | + <elseif condition="$vo.state eq 5"/> | ||
313 | + <a href="w_logistics.html"> | ||
314 | + <div class="myorder_bottom2_2">查看物流</div> | ||
315 | + </a> | ||
316 | + <elseif condition="$vo.state eq 3"/> | ||
317 | + <div class="myorder_bottom2_2">去评价</div> | ||
318 | + </if> | ||
319 | + </div> | ||
320 | + </div> | ||
321 | + </div> | ||
322 | + </a> | ||
323 | + </if> | ||
324 | + </foreach> | ||
325 | + </div> | ||
326 | + <!-- 已完成 --> | ||
327 | + <div class="myorder_con1"> | ||
328 | + <foreach name="data" item="vo"> | ||
329 | + <if condition="$vo.state eq 3"> | ||
330 | + <a href=""> | ||
331 | + <div class="myorder_information"> | ||
332 | + <!-- 订单 --> | ||
333 | + <div class="myorder_the"> | ||
334 | + <p class="order_dan">订单号:{$vo.order_number}</p> | ||
335 | + <div class="myorder_state1"> | ||
336 | + <if condition="$vo.state eq 4"> | ||
337 | + 待付款 | ||
338 | + <elseif condition="$vo.state eq 2"/> | ||
339 | + 待发货 | ||
340 | + <elseif condition="$vo.state eq 5"/> | ||
341 | + 已发货 | ||
342 | + <elseif condition="$vo.state eq 3"/> | ||
343 | + 已完成 | ||
344 | + </if> | ||
345 | + </div> | ||
346 | + </div> | ||
347 | + <ul class="order_newsUl myorder_border"> | ||
348 | + <foreach name="$vo.indent_goods" item="i_g"> | ||
349 | + <li> | ||
350 | + <div class="order_newsImg"> | ||
351 | + <img src="{:cmf_get_image_url($i_g.thumbnail)}" alt="" /> | ||
352 | + </div> | ||
353 | + <div class="order_newsCon"> | ||
354 | + <div class="order_newsTxt1 txt-cut"> | ||
355 | + {$i_g.book_name} | ||
356 | + </div> | ||
357 | + <div class="order_newsTxt2">×<span>{$i_g.number}</span></div> | ||
358 | + <div class="order_newsTxt3"> | ||
359 | + <p class="de_topTxt1_1">¥<span>{$i_g.price}</span></p> | ||
360 | + <p class="de_topTxt1_2">¥<span>{$i_g.pricing}</span></p> | ||
361 | + </div> | ||
362 | + </div> | ||
363 | + </li> | ||
364 | + </foreach> | ||
365 | + <div class="my_ordera"> | ||
366 | + <span>共{:count($vo.indent_goods)}件商品 合计:</span> | ||
367 | + <p>¥{$vo.money}</p> | ||
368 | + </div> | ||
369 | + </ul> | ||
370 | + <!-- 时间/底部 --> | ||
371 | + <div class="myorder_bottom"> | ||
372 | + <div class="myorder_bottom1"> | ||
373 | + <div class="myorder_bottom1Img"> | ||
374 | + <img src="__TMPL__/public/assets/images/52.png" alt="" /> | ||
375 | + </div> | ||
376 | + <p class="myorder_bottom1Txt">{:date('Y-m-d H:i:s',$vo['create_time'])}</p> | ||
377 | + </div> | ||
378 | + <div class="myorder_bottom2"> | ||
379 | + <if condition="$vo.state eq 4"> | ||
380 | + <div class="myorder_bottom2_1">取消订单</div> | ||
381 | + <div class="myorder_bottom2_2">去支付</div> | ||
382 | + <elseif condition="$vo.state eq 2"/> | ||
383 | + <a href="w_Ypayment.html"> | ||
384 | + <div class="myorder_bottom2_2">查看订单</div> | ||
385 | + </a> | ||
386 | + <elseif condition="$vo.state eq 5"/> | ||
387 | + <a href="w_logistics.html"> | ||
388 | + <div class="myorder_bottom2_2">查看物流</div> | ||
389 | + </a> | ||
390 | + <elseif condition="$vo.state eq 3"/> | ||
391 | + <div class="myorder_bottom2_2">去评价</div> | ||
392 | + </if> | ||
393 | + </div> | ||
394 | + </div> | ||
395 | + </div> | ||
396 | + </a> | ||
397 | + </if> | ||
398 | + </foreach> | ||
399 | + </div> | ||
400 | + </div> | ||
401 | + </div> | ||
402 | + <script src="__TMPL__/public/assets/js/base.js"></script> | ||
403 | + <script src="__TMPL__/public/assets/js/jquery.js"></script> | ||
404 | + <script> | ||
405 | + function load(){ | ||
406 | + var index = $(".myor_title ul li").index($('.myor_title_active')); | ||
407 | + $(".myorder_con1").eq(index).show().siblings().hide(); | ||
408 | + } | ||
409 | + $(function() { | ||
410 | + load(); | ||
411 | + // myor_title_active | ||
412 | + $(".myor_title ul li").click(function() { | ||
413 | + console.log($(this)); | ||
414 | + $(this) | ||
415 | + .addClass("myor_title_active") | ||
416 | + .siblings() | ||
417 | + .removeClass("myor_title_active"); | ||
418 | + var index = $(this).index(); | ||
419 | + $(".myorder_con1") | ||
420 | + .eq(index) | ||
421 | + .show() | ||
422 | + .siblings() | ||
423 | + .hide(); | ||
424 | + }); | ||
425 | + }) | ||
426 | + </script> | ||
427 | +</body> | ||
428 | + | ||
429 | +</html> |
-
请 注册 或 登录 后发表评论