<?php include "./inc/odbc.php"; ?>
|
<?php include "./inc/function.php"; ?>
|
<?php
|
$ServiceOrdID=empty($_REQUEST['ServiceOrdID'])!=false ? "" : addslashes($_REQUEST['ServiceOrdID']);
|
$DispatchOrdID=empty($_REQUEST['DispatchOrdID'])!=false ? "0" : addslashes($_REQUEST['DispatchOrdID']);
|
$OrderType=empty($_REQUEST['OrderType'])!=false ? 1 : addslashes($_REQUEST['OrderType']);
|
$s=empty($_REQUEST['s'])!=false ? "" : $_REQUEST['s'];
|
|
//$ServiceOrdID=empty($_REQUEST['ServiceOrdID'])!=false ? "" : $_REQUEST['ServiceOrdID'];
|
//$DispatchOrdID=empty($_REQUEST['DispatchOrdID'])!=false ? "0" : $_REQUEST['DispatchOrdID'];
|
$sign=empty($_REQUEST['sign'])!=false ? "" : $_REQUEST['sign'];
|
//if (($ServiceOrdID=="" and $DispatchOrdID=="0") or $sign==""){header("Location: /OrdEvaluateError.asp");exit;}
|
|
//验签
|
$signA="";
|
if ($ServiceOrdID!=""){$signA=$signA.$ServiceOrdID;}
|
if ($DispatchOrdID!="0"){$signA=$signA.$DispatchOrdID;}
|
//if ($sign!=MD5($signA.$GPSKey) and $sign!="vicgame"){header("Location: /OrdEvaluateError.asp");exit;}
|
|
$openid=empty($_REQUEST['openid'])!=false ? "" : $_REQUEST['openid'];
|
if (isset($_COOKIE["openid"])){$openid=$_COOKIE["openid"];}
|
//include "./inc/OAuth2.php";
|
|
//微信JS
|
require_once "./inc/jssdk.php";
|
$jssdk = new JSSDK($APPID, $APPSECRET);
|
$signPackage = $jssdk->GetSignPackage();
|
$ShareURL="https://wx.966120.com.cn/MyOrder.php?ServiceOrdID=$ServiceOrdID&DispatchOrdID=$DispatchOrdID&s=1&sign=$sign";
|
?>
|
|
|
|
<!--==========================================================HTML --start==========================================================-->
|
<html>
|
<head>
|
<title>被动睡后收入-->微信公众号</title>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
<meta name="viewport" content="width=device-width,initial-scale=0.5">
|
</head>
|
<body>
|
<div id="app">
|
<wx-open-launch-weapp
|
id="launch-btn"
|
username="gh_5f23d12c33a5"
|
path="/pages/index/index.html"
|
>
|
<template>
|
<style>
|
.btn {
|
padding: 12px;
|
width: 10rem;
|
height: 10rem;
|
}
|
</style>
|
<div style="text-align: center;align-items: center;margin: 8rem">
|
<button class="btn">打开小程序</button>
|
</div>
|
</template>
|
</wx-open-launch-weapp>
|
</div>
|
<script type="text/javascript" src="https://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
<script type="text/javascript">
|
wx.config({
|
//debug: true,
|
appId: '<?php echo $signPackage["appId"];?>',
|
timestamp: <?php echo $signPackage["timestamp"];?>,
|
nonceStr: '<?php echo $signPackage["nonceStr"];?>',
|
signature: '<?php echo $signPackage["signature"];?>',
|
jsApiList: [
|
// 所有要调用的 API 都要加到这个列表中
|
'checkJsApi',
|
'updateAppMessageShareData',
|
'updateTimelineShareData',
|
'onMenuShareTimeline',
|
'scanQRCode'
|
],
|
openTagList: ['wx-open-launch-weapp']
|
});
|
var btn = document.getElementById('launch-btn');
|
btn.addEventListener('launch', function (e) {
|
console.log('success');
|
});
|
btn.addEventListener('error', function (e) {
|
console.log('fail', e.detail);
|
});
|
</script>
|
</body>
|
</html>
|