当前位置: 首页>>代码示例>>PHP>>正文


PHP JSSDK::getSignPackage方法代码示例

本文整理汇总了PHP中JSSDK::getSignPackage方法的典型用法代码示例。如果您正苦于以下问题:PHP JSSDK::getSignPackage方法的具体用法?PHP JSSDK::getSignPackage怎么用?PHP JSSDK::getSignPackage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JSSDK的用法示例。


在下文中一共展示了JSSDK::getSignPackage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 function show_action()
 {
     $this->rightinfo();
     $this->get_moblie();
     $UserinfoM = $this->MODEL('userinfo');
     $CacheM = $this->MODEL('cache');
     $CacheList = $CacheM->GetCache(array('job', 'com', 'city', 'hy'));
     $this->yunset($CacheList);
     $row = $UserinfoM->GetUserinfoOne(array('uid' => (int) $_GET['id']), array('usertype' => 2));
     $row['lastupdate'] = date("Y-m-d", $row['lastupdate']);
     $this->yunset("row", $row);
     $data['company_name'] = $row['name'];
     $data['company_name_desc'] = $row['content'];
     $this->data = $data;
     //这里是微信jssdk
     $jssdk = new JSSDK();
     $WxData = $jssdk->getSignPackage();
     $this->yunset("wxAppid", $WxData['appId']);
     $this->yunset('wxNonceStr', $WxData['nonceStr']);
     $this->yunset('wxTimestamp', $WxData['timestamp']);
     $this->yunset('wxSignature', $WxData['signature']);
     //微信jssdk结束
     $this->seo("company_index");
     $this->yunset("headertitle", "公司详情");
     $this->yuntpl(array('wap/company_show'));
 }
开发者ID:justinyaoqi,项目名称:qyhr,代码行数:26,代码来源:company.class.php

示例2: array

 function show_action()
 {
     $this->rightinfo();
     $ResumeM = $this->MODEL('resume');
     if ($_GET['uid']) {
         if ($_GET['type'] == "2") {
             $user = $ResumeM->GetResumeExpectOne(array("uid" => (int) $_GET['uid'], "height_status" => '2'));
             $id = $user['id'];
         } else {
             $def_job = $ResumeM->SelectResumeOne(array("uid" => (int) $_GET['uid'], "`r_status`<>'2'"));
             $id = $def_job['def_job'];
         }
     } else {
         $id = (int) $_GET['id'];
     }
     $user = $ResumeM->resume_select($_GET['id']);
     $ResumeM->AddExpectHits($id);
     if ($_COOKIE['usertype'] == "2" || $_COOKIE['usertype'] == "3") {
         $this->yunset("uid", $_COOKIE['uid']);
         $ResumeM->RemindDeal("userid_job", array("is_browse" => "2"), array("com_id" => $this->uid, "eid" => (int) $_GET['id']));
         if ($_COOKIE['usertype'] == "2") {
             $this->unset_remind("userid_job", '2');
         } else {
             $this->unset_remind("userid_job3", '3');
         }
         $look_resume = $ResumeM->SelectLookResumeOne(array("com_id" => $this->uid, "resume_id" => $id));
         if (!empty($look_resume)) {
             $ResumeM->SaveLookResume(array("datetime" => time()), array("resume_id" => $id, "com_id" => $this->uid));
         } else {
             $data['uid'] = $user['uid'];
             $data['resume_id'] = $id;
             $data['com_id'] = $this->uid;
             $data['datetime'] = time();
             $ResumeM->SaveLookResume($data);
         }
     }
     $data['resume_username'] = $user['username_n'];
     $data['resume_city'] = $user['city_one'] . "," . $user['city_two'];
     $data['resume_job'] = $user['hy'];
     $this->data = $data;
     //这里是微信jssdk
     $jssdk = new JSSDK();
     $WxData = $jssdk->getSignPackage();
     $this->yunset("wxAppid", $WxData['appId']);
     $this->yunset('wxNonceStr', $WxData['nonceStr']);
     $this->yunset('wxTimestamp', $WxData['timestamp']);
     $this->yunset('wxSignature', $WxData['signature']);
     //微信jssdk结束
     $this->seo("resume");
     $this->yunset("Info", $user);
     $this->yunset("headertitle", "找人才");
     $this->yuntpl(array('mobile/resume_show'));
 }
开发者ID:justinyaoqi,项目名称:qyhr,代码行数:53,代码来源:resume.class.php

示例3: JSSDK

 function loginout_action()
 {
     $this->unset_cookie();
     //这里是微信jssdk
     $jssdk = new JSSDK();
     $WxData = $jssdk->getSignPackage();
     $this->yunset("wxAppid", $WxData['appId']);
     $this->yunset('wxNonceStr', $WxData['nonceStr']);
     $this->yunset('wxTimestamp', $WxData['timestamp']);
     $this->yunset('wxSignature', $WxData['signature']);
     //微信jssdk结束
     $this->wapheader('index.php');
 }
开发者ID:justinyaoqi,项目名称:qyhr,代码行数:13,代码来源:index.class.php

示例4: JSSDK

 function index_action()
 {
     $this->get_moblie();
     $this->yunset("headertitle", "找回密码");
     $this->seo("forgetpw");
     //这里是微信jssdk
     $jssdk = new JSSDK();
     $WxData = $jssdk->getSignPackage();
     $this->yunset("wxAppid", $WxData['appId']);
     $this->yunset('wxNonceStr', $WxData['nonceStr']);
     $this->yunset('wxTimestamp', $WxData['timestamp']);
     $this->yunset('wxSignature', $WxData['signature']);
     //微信jssdk结束
     $this->yuntpl(array('wap/forgetpw'));
 }
开发者ID:justinyaoqi,项目名称:qyhr,代码行数:15,代码来源:forgetpw.class.php

示例5: result

 public function result(Requests\YikangQustionnaireRequest $request)
 {
     $jssdk = new JSSDK(env('WX_APPID'), env('WX_SECRET'));
     $signPackage = $jssdk->getSignPackage();
     $request->persist();
     /** @var Customer $customer */
     $customer = \Helper::getCustomerOrFail();
     $q = $customer->yikangQuestionnaire()->first();
     if ($q->q1 == '口服药等其他治疗方式' || $q->q2 == '已停用') {
         $result = 1;
     } else {
         $result = 2;
     }
     return view('questionnaire.finish2')->with(['result' => $result, 'signPackage' => $signPackage]);
 }
开发者ID:whplay,项目名称:ohmate-shop,代码行数:15,代码来源:YikangQuestionnaireController.php

示例6: JSSDK

 function index_action()
 {
     $this->get_moblie();
     //这里是微信jssdk
     $jssdk = new JSSDK();
     $WxData = $jssdk->getSignPackage();
     $this->yunset("wxAppid", $WxData['appId']);
     $this->yunset('wxNonceStr', $WxData['nonceStr']);
     $this->yunset('wxTimestamp', $WxData['timestamp']);
     $this->yunset('wxSignature', $WxData['signature']);
     //微信jssdk结束
     $this->yunset("title", "附近职位");
     $this->yunset('JobList', $JobList);
     $this->yuntpl(array('wap/map'));
 }
开发者ID:justinyaoqi,项目名称:qyhr,代码行数:15,代码来源:map.class.php

示例7: JSSDK

<?php

/**
 * Created by PhpStorm.
 * User: EdwardChor
 * Date: 7/31/15
 * Time: 10:36 AM
 */
require_once "jssdk.php";
$jssdk = new JSSDK("wxd1c57c307f05d877", "f6473b539bf2b74d647350eb1d4fa26b");
$signPackage = $jssdk->getSignPackage();
$backSrc = $_POST["back"];
$frontSrc = $_POST["front"];
$time = time();
$worldMap = "/var/www/html/WeWorld/result/" . $time . ".jpg";
$tempj = ['worldMapSrc' => $worldMap];
$result = json_encode($tempj);
echo $result;
开发者ID:edwardchor,项目名称:WeWorld,代码行数:18,代码来源:progress.php

示例8: JSSDK

 function ask_content_action()
 {
     $this->rightinfo();
     $this->get_moblie();
     //这里是微信
     $jssdk = new JSSDK();
     $WxData = $jssdk->getSignPackage();
     $this->yunset("wxAppid", $WxData['appId']);
     $this->yunset('wxNonceStr', $WxData['nonceStr']);
     $this->yunset('wxTimestamp', $WxData['timestamp']);
     $this->yunset('wxSignature', $WxData['signature']);
     $M = $this->MODEL('ask');
     $UserInfoM = $this->MODEL('userinfo');
     $FriendM = $this->MODEL('friend');
     $ID = (int) $_GET['id'];
     $show = $M->GetQuestionOne(array("id" => $ID));
     if (empty($show)) {
         $this->ACT_msg($_SERVER['HTTP_REFERER'], "问答不存在或被删除!");
     }
     if ($_GET['orderby']) {
         $order = " order by support desc";
     }
     $pageurl = Url('ask', array("c" => $_GET['c'], 'id' => $ID, 'orderby' => $_GET['orderby'], "page" => "{{page}}"));
     $rows = $M->get_page("answer", "`qid`='" . $ID . "'" . $order, $pageurl, "10");
     $this->yunset($rows);
     $answer = $M->GetAnswerList($rows['rows']);
     $Userinfo = $FriendM->GetFriendInfo(array('uid' => $show['uid']));
     if ($this->uid) {
         $atten_ask = $M->GetAttentionList(array('uid' => $this->uid, 'type' => 1));
         $atn = $M->GetAtnList(array('uid' => $this->uid), array('field' => 'sc_uid'));
         $myinfo = $FriendM->GetFriendInfo(array('uid' => $this->uid), array('field' => '`nickname`,`description`,`pic`,`uid`'));
         if ($myinfo['pic'] == '') {
             $myinfo['pic'] = $this->config['sy_friend_icon'];
         }
     } else {
         $myinfo['pic'] = $this->config['sy_friend_icon'];
     }
     if (!empty($answer)) {
         foreach ($answer as $key => $val) {
             if ($val['uid'] == $this->uid) {
                 $answer[$key]['is_atn'] = '2';
             } else {
                 foreach ($atn as $a_v) {
                     if ($a_v['sc_uid'] == $val['uid']) {
                         $answer[$key]['is_atn'] = '1';
                     }
                 }
             }
             if ($val['pic']) {
                 $answer[$key]['pic'] = str_replace("..", $this->config['sy_weburl'], $val['pic']);
             } else {
                 $answer[$key]['pic'] = $this->config['sy_weburl'] . '/' . $this->config['sy_friend_icon'];
             }
         }
     }
     if ($Userinfo['uid'] == $this->uid) {
         $Userinfo['useratn'] = '2';
         $show['qatn'] = '2';
     } else {
         if (!empty($atn)) {
             foreach ($atn as $val) {
                 if ($Userinfo['uid'] == $val['sc_uid']) {
                     $Userinfo['useratn'] = '1';
                 }
             }
         }
     }
     if ($atten_ask && is_array($atten_ask) && $show['qatn'] == '') {
         $ids = explode(',', rtrim($atten_ask['ids'], ','));
         if (in_array($show['id'], $ids)) {
             $show['qatn'] = '1';
         }
     }
     $CacheM = $this->MODEL('cache');
     $reason = $CacheM->GetCache('reason');
     $M->AddQuestionHits(array("id" => (int) $_GET['id']));
     $show['pic'] ? $show['pic'] = str_replace("..", $this->config['sy_weburl'], $show['pic']) : $this->config['sy_weburl'] . '/' . $this->config['sy_friend_icon'];
     $this->yunset("userinfo", $Userinfo);
     $this->yunset("myinfo", $myinfo);
     $this->yunset(array("reason" => $reason, "show" => $show, "uid" => $this->uid, "answer" => $answer, "title" => $show['title'] . ' - ' . $this->config['sy_webname'], "c" => "index"));
     $this->ask_tpl('wap/ask_content');
 }
开发者ID:justinyaoqi,项目名称:qyhr,代码行数:82,代码来源:ask.class.php

示例9: getJSSDKSignPackage

function getJSSDKSignPackage()
{
    $js = new JSSDK('wx5510644a09934bfd', 'ffad1f7211b582beb538a091d00d2d33');
    return $js->getSignPackage();
}
开发者ID:eduNeusoft,项目名称:weixin,代码行数:5,代码来源:common.inc.php

示例10: json_encode

<?php

require_once './jssdk.php';
$url = $_GET['url'];
$jssdk = new JSSDK('<% your appid %>', '<% your appsecret %>');
$wxconfig = $jssdk->getSignPackage($url);
header('Access-Control-Allow-Origin: *');
echo json_encode($wxconfig);
开发者ID:heitaoa,项目名称:wxjssdk-signature,代码行数:8,代码来源:signature.php

示例11: setcookie

 function index_action()
 {
     if (preg_match("/^[a-zA-Z0-9_-]+\$/", $_GET['wxid'])) {
         setcookie("wxid", $_GET['wxid'], time() + 86400, "/");
     }
     if (preg_match("/^[a-zA-Z0-9_-]+\$/", $_GET['unionid'])) {
         setcookie("unionid", $_GET['unionid'], time() + 86400, "/");
     }
     $this->get_moblie();
     if ($this->uid || $this->username) {
         if ($_GET['bind'] == '1') {
             $this->unset_cookie();
             $data['msg'] = '重新绑定您的求职账户!';
         } elseif ($_GET['wxid']) {
             $this->unset_cookie();
         } else {
             $this->wapheader('member/index.php');
         }
     }
     if ($_POST['submit']) {
         $UserinfoM = $this->MODEL('userinfo');
         if ($_POST['wxid']) {
             $wxparse = '&wxid=' . $_POST['wxid'];
         }
         $username = yun_iconv("utf-8", "gbk", $_POST['username']);
         if (!$this->CheckRegUser($username) && !$this->CheckRegEmail($username)) {
             $data['msg'] = '无效的用户名!';
             $this->layer_msg($data['msg'], 9, 0, '', 2);
         }
         if ($username != '') {
             $userinfo = $UserinfoM->GetMemberOne(array('username' => $username), array('field' => "username,usertype,password,uid,salt"));
             if (!is_array($userinfo)) {
                 $data['msg'] = '用户不存在!';
                 $this->layer_msg($data['msg'], 9, 0, '', 2);
             }
             if ($userinfo['usertype'] == '3') {
                 $data['msg'] = '手机访问暂只支持求职与招聘用户!';
                 $this->layer_msg($data['msg'], 9, 0, '', 2);
             }
             $pass = md5(md5($_POST['password']) . $userinfo['salt']);
             if ($pass != $userinfo['password']) {
                 $data['msg'] = '密码不正确!';
             } else {
                 if ($_COOKIE['wxid']) {
                     $UserinfoM->UpdateMember(array('wxid' => '', 'unionid' => '', 'wxopenid' => ''), array('wxid' => $_COOKIE['wxid']));
                     $UserinfoM->UpdateMember(array('wxid' => $_COOKIE['wxid']), array('uid' => $userinfo['uid']));
                     setcookie("wxid", '', time() - 86400, "/");
                 }
                 if ($_COOKIE['unionid']) {
                     $UserinfoM->UpdateMember(array('unionid' => ''), array('unionid' => $_COOKIE['unionid']));
                     $UserinfoM->UpdateMember(array('unionid' => $_COOKIE['unionid']), array('uid' => $userinfo['uid']));
                     setcookie("unionid", '', time() - 86400, "/");
                 }
                 $this->add_cookie($userinfo['uid'], $userinfo['username'], $userinfo['salt'], $userinfo['email'], $userinfo['password'], $userinfo['usertype']);
                 if ($_COOKIE['wxid']) {
                     $this->layer_msg('绑定成功,请按左上方返回进入微信客户端', 9, 0, $this->config['sy_wapdomain'] . '/member/', 2);
                 } else {
                     $this->layer_msg('', 9, 0, $this->config['sy_wapdomain'] . '/member/', 2);
                 }
             }
         } else {
             $data['msg'] = '数据错误!';
         }
         $this->layer_msg($data['msg'], 9, 0, '', 2);
     }
     if ($_GET['usertype'] == "2") {
         $this->yunset("headertitle", "会员登录");
     } else {
         $this->yunset("headertitle", "会员登录");
     }
     //这里是微信jssdk
     $jssdk = new JSSDK();
     $WxData = $jssdk->getSignPackage();
     $this->yunset("wxAppid", $WxData['appId']);
     $this->yunset('wxNonceStr', $WxData['nonceStr']);
     $this->yunset('wxTimestamp', $WxData['timestamp']);
     $this->yunset('wxSignature', $WxData['signature']);
     //微信jssdk结束
     $this->seo("login");
     $this->yuntpl(array('wap/login'));
 }
开发者ID:justinyaoqi,项目名称:qyhr,代码行数:81,代码来源:login.class.php

示例12: JSSDK

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <title>流量君电影</title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" id="viewport" name="viewport">
    <meta content="流量君,流量君电影|微信电影,值得信任的安全电影,最新免费电影,热播剧,热门综艺,喜剧片" name="Description">
    <meta content="流量君电影|我的少女时代,夏洛特烦恼,北京时间,坏蛋必须死" name="Keywords">
    <meta content="telephone=no" name="format-detection">
    <meta http-equiv="Cache-Control" content="no-siteapp">
    <meta http-equiv="Cache-Control" content="no-transform">
    <link href="css/global.css" rel="stylesheet" type="text/css">
    <link href="css/index_v2.css" rel="stylesheet" type="text/css">
    <script src="js/jquery-2.2.0.min.js"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <?php 
$jssdk = new JSSDK(APPID, SECRET);
$jsbag = $jssdk->getSignPackage();
?>
    <script type="text/javascript">
        wx.config({"debug":false,
            "beta":false,
            "appId":"<?php 
echo $jsbag['appId'];
?>
",
            "nonceStr":"<?php 
echo $jsbag['nonceStr'];
?>
",
            "timestamp":<?php 
echo $jsbag['timestamp'];
?>
开发者ID:xxsser,项目名称:moveGather,代码行数:31,代码来源:index.php

示例13: httpGet

            if ($access_token) {
                $data->expire_time = time() + 7000;
                $data->access_token = $access_token;
                memcache_set($this->mmc, 'access_token', json_encode($data));
            }
        } else {
            $access_token = $data->access_token;
        }
        return $access_token;
    }
    private function httpGet($url)
    {
        $curl = curl_init();
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($curl, CURLOPT_TIMEOUT, 500);
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
        curl_setopt($curl, CURLOPT_URL, $url);
        $res = curl_exec($curl);
        curl_close($curl);
        return $res;
    }
}
$obj = new JSSDK('Your APP_ID', 'Your APP_SECRIET');
$access_token = $obj->getAccessToken();
//echo $access_token;
//$ticket = $obj->getJsApiTicket();
//echo $ticket;exit;
$url = $_REQUEST['url'];
$ticket = $obj->getSignPackage($url);
echo json_encode($ticket);
开发者ID:pemako,项目名称:weixin,代码行数:31,代码来源:pemakoWeixinApi.php

示例14: array

 function show_action()
 {
     $this->rightinfo();
     if ($this->config['sy_wjl_web'] == "2") {
         $data['msg'] = '很抱歉!该模块已关闭!';
         $data['url'] = 'index.php';
         $this->yunset("layer", $data);
     }
     $this->get_moblie();
     $this->yunset("headertitle", "微简历");
     $CacheList = $this->MODEL('cache')->GetCache('user');
     $this->yunset($CacheList);
     $TinyM = $this->MODEL('tiny');
     $TinyM->UpdateTinyresume(array("`hits`=`hits`+1"), array('id' => $_GET[id]));
     $row = $TinyM->GetTinyresumeOne(array('id' => $_GET[id]));
     //这里是微信jssdk
     $jssdk = new JSSDK();
     $WxData = $jssdk->getSignPackage();
     $this->yunset("wxAppid", $WxData['appId']);
     $this->yunset('wxNonceStr', $WxData['nonceStr']);
     $this->yunset('wxTimestamp', $WxData['timestamp']);
     $this->yunset('wxSignature', $WxData['signature']);
     //微信jssdk结束
     $this->data = array('tiny_username' => $row['username'], 'tiny_job' => $row['job'], 'tiny_desc' => $row['production']);
     $this->seo('tiny_cont');
     $this->yunset("row", $row);
     $this->yuntpl(array('wap/tiny_show'));
 }
开发者ID:justinyaoqi,项目名称:qyhr,代码行数:28,代码来源:tiny.class.php

示例15: JSSDK

<?php

require_once './jssdk.php';
$jssdk = new JSSDK('<% your appid %>', '<% your appsecret %>');
$wxconfig = $jssdk->getSignPackage();
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>wx.config</title>
</head>
<body>
	<h1>share to test</h1>
	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script>
		wx.config({
			appId: '<?php 
echo $wxconfig['appId'];
?>
',
			timestamp: '<?php 
echo $wxconfig['timestamp'];
?>
',
			nonceStr: '<?php 
echo $wxconfig['nonceStr'];
?>
',
			signature: '<?php 
echo $wxconfig['signature'];
开发者ID:heitaoa,项目名称:wxjssdk-signature,代码行数:31,代码来源:sample.php


注:本文中的JSSDK::getSignPackage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。