【调度系统】广东民航医疗快线调度系统源代码
wanglizhong
2025-05-05 8a7dab004bc3eca7808d0cc196a329464402bbc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<?php include "../inc/odbc.php"; ?>
<?php include "../inc/function.php"; ?>
<?php
 
$path = !empty($_GET["path"])?str_replace("|","&",$_GET["path"]):"";
$dir = !empty($_GET["dir"])?$_GET["dir"]:"";
 
if(!empty($_POST)){
    // var_dump($_POST);exit;
    $CodeType = !empty($_POST["CodeType"])?$_POST["CodeType"]:"1";
    $is_hyaline = !empty($_POST["is_hyaline"])?$_POST["is_hyaline"]:"1";
    
    $weixinAPP = $_POST["weixinAPP"];
    if ($weixinAPP == "GDS-0008-fDwr") {
        $APPSECRET="TH8o9RQItfd9bzffeOCW";
    }else{
        header("Location: ma.php?APPID=".$APPID);exit;
    }
    
    $GetUrl="https://api.966120.com.cn/weixin/";
    $GetArgs="method=weixin_Appid&APPID=".$weixinAPP."&UnixTime=".time();
    
    $Sign=PHP_Sign($GetUrl,$GetArgs,$APPSECRET);
 
    $wx_url=$GetUrl."?".$GetArgs."&Sign=".$Sign;
    //$wx_url = "https://api.966120.com.cn/weixin/?method=weixin_Appid&APPID=GDS-0008-fDwr&UnixTime=".time()."&Sign=Sign";
    $wxinfo=file_get_contents($wx_url);
    $wxinfo=json_decode($wxinfo,true);
 
    $weixin_Name = $wxinfo["weixin_Name"];
    $access_token = $wxinfo["access_token"];
    if($_POST["dir"] == "0"){
        header("Location: ma.php?APPID=".$APPID);exit;
    }elseif($_POST["dir"] != "0"){
        $dir = $_POST["dir"];
        if(empty($_POST[$dir])){
            header("Location: ma.php?APPID=".$APPID);exit;
        }
        if($dir == "detail"){
            $path = "pages/detail/detail?";
            $can = $_POST[$dir];
            $path .= $can."&UAid=82188";
            $width = $_POST["width"];
            if ($CodeType==1){
                $ma_url = "https://api.weixin.qq.com/wxa/getwxacode?access_token=$access_token";
            }else{
                $ma_url = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=$access_token";
            }
 
            $send = array(
                "path"=>$path,
                "width"=>$width,
            );
            if ($is_hyaline==2 and $CodeType==1){
                $send=array_merge($send, array("is_hyaline"=>true,));
            }
            // var_dump($send);exit;
            $send = json_encode($send);
 
            $ch = curl_init();//初始化curl
            curl_setopt($ch, CURLOPT_TIMEOUT, 30);
            curl_setopt($ch, CURLOPT_URL, $ma_url);
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,FALSE);
            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,FALSE);
            curl_setopt($ch, CURLOPT_HEADER, FALSE);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
            curl_setopt($ch, CURLOPT_POSTFIELDS,$send);
 
            $data_save = curl_exec($ch);//运行curl
            // var_dump($data_save);exit;
            curl_close($ch);
 
            header("content-type: image/jpeg");
 
            echo $data_save;
        }elseif($dir == "shopList"){
            $path = "pages/shopList/shopList?";
            $can = $_POST[$dir];
            $path .= $can;
            $width = $_POST["width"];
            if ($CodeType==1){
                $ma_url = "https://api.weixin.qq.com/wxa/getwxacode?access_token=$access_token";
            }else{
                $ma_url = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=$access_token";
            }
 
            $send = array(
                "path"=>$path,
                "width"=>$width,
            );
            if ($is_hyaline==2 and $CodeType==1){
                $send=array_merge($send, array("is_hyaline"=>true,));
            }
            $send = json_encode($send);
 
            $ch = curl_init();//初始化curl
            curl_setopt($ch, CURLOPT_TIMEOUT, 30);
            curl_setopt($ch, CURLOPT_URL, $ma_url);
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,FALSE);
            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,FALSE);
            curl_setopt($ch, CURLOPT_HEADER, FALSE);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
            curl_setopt($ch, CURLOPT_POSTFIELDS,$send);
 
            $data_save = curl_exec($ch);//运行curl
            // var_dump($data_save);exit;
            curl_close($ch);
 
            header("content-type: image/jpeg");
 
            echo $data_save;
        }elseif($dir == "define"){
            $hand = $_POST["define"];
            $width = $_POST["width"];
            if ($CodeType==1){
                $ma_url = "https://api.weixin.qq.com/wxa/getwxacode?access_token=$access_token";
            }else{
                $ma_url = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=$access_token";
            }
 
            $send = array(
                "path"=>$hand,
                "width"=>$width
                //"is_hyaline"=>true,
            );
            if ($is_hyaline==2 and $CodeType==1){
                $send=array_merge($send, array("is_hyaline"=>true,));
            }
            $send = json_encode($send);
 
            $ch = curl_init();//初始化curl
            curl_setopt($ch, CURLOPT_TIMEOUT, 30);
            curl_setopt($ch, CURLOPT_URL, $ma_url);
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,FALSE);
            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,FALSE);
            curl_setopt($ch, CURLOPT_HEADER, FALSE);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
            curl_setopt($ch, CURLOPT_POSTFIELDS,$send);
 
            $data_save = curl_exec($ch);//运行curl
            // var_dump($data_save);exit;
            curl_close($ch);
 
            header("content-type: image/png");
 
            echo $data_save;
        }
    }
}
 
?>
<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
<form method="post" action="ma.php?APPID=<?php echo $APPID;?>">
    生成二维码类型:
    <select name="CodeType">
        <option value="1" selected>小程序码</option>
        <option value="2">二维码</option>
    </select>
    <select name="is_hyaline">
        <option value="1" selected>白底</option>
        <option value="2">透明</option>
    </select><br />
    对应的小程序:
    <select name="weixinAPP">
        <option value="0">请选择</option>
        <option value="GDS-0008-fDwr" selected>966120微信小程序</option>
        <!--<option value="9">白马全球馆CX</option>-->
    </select><br />
    小程序指向:
    <select id="set" name="dir">
        <option value="0">请选择</option>
        <option value="detail" <?php if($dir != "" && $dir=="detail"){echo "selected";}?>>商品详情页</option>
        <option value="shopList" <?php if($dir != "" && $dir=="shopList"){echo "selected";}?>>商品列表页</option>
        <option value="define"<?php if($dir == "" || $dir=="define"){echo "selected";}?>>自定义路径</option>
    </select><br />
    参数:<input type="text" name="path" id="get" style="width:350px;" value="<?php if($path != ""){echo $path;}?>"/><span class="0 spanSum" style="display:none;">请选择小程序的路径</span><span class="detail spanSum" style="display:none;">商品详情页参数例子:strItmID=1120-002735</span><span class="shopList spanSum" style="display:none;">商品列表页参数例子:TopID=1&ItmFlagOd=2</span><span class="define spanSum">自定义路径例子:pages/index/index</span>
    <br />
    图片宽度:<input type="text" value="430" name="width" /><br />
    <input type="submit" />
    <br><br>
    966120微信小程序路径参考:<br>
    首页:pages/index/index<br>
    带来源参数的预约入口:pages/index/index?S=XXXX<br>
    我的订单:pages/order/list/list<br>
    订单详情/支付/评论:pages/order/detail/detail?ServiceOrdID=1016165355<br>
    个人中心:pages/my/my<br>
    发票申请列表:pages/order/list2/list2?OrdState=11<br>
    服务评价列表:pages/order/list2/list2?OrdState=10<br>
    H5网页:pages/h5/h5?src=https://api.966120.com.cn/<br>
</form>
<a href="ma0629.php">生成B模式码</a>
</body>
</html>
<script type="text/javascript" src="http://v.com.cn/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$('#get').attr('name',$('#set').val());
var set;
$('#set').change(function(){
    $(".spanSum").hide();
    set = $('#set').val();
    $('#get').attr('name',set);
    $("."+set).show();
})
</script>