? ???? ??? ?? ?? ?? ??? ?? ?? ?? ?? ?? ??? ?? ?????. ??? ??? ??? ? ????.
1. ??? ??? ???? js-sdk ?????? ?????. ???? ?? ?? ??? ?? ?? WeChat ?? ??? ???? (?? URL: http://gaoboy.com/article/25.html)
2. ???? ?? ?? ??? ?? ??? ? ?? ? ??? ?? ????. ?? ???? ??? ?? ??? ???? ??? ??? ?? ?? ?????. (??? ?? ???? ?? ??? ?? ????????)
js-sdk ?? ??? ??:
1. ?? URL, ?????, ?? ??? ? jsapiticket? ?????.
//調(diào)用js-sdk的簽名包 public function getSignPackage() { $jsapiTicket = $this->getJsApiTicket(); // 注意 URL 一定要?jiǎng)討B(tài)獲取,不能 hardcode.(獲取當(dāng)前網(wǎng)頁(yè)的url) $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://"; $url = "$protocol$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; //時(shí)間戳 $timestamp = time(); //隨機(jī)字符串獲取 $nonceStr = $this->createNonceStr(); // 這里參數(shù)的順序要按照 key 值 ASCII 碼升序排序 $string = "jsapi_ticket=$jsapiTicket&noncestr=$nonceStr×tamp=$timestamp&url=$url"; //生成字符串是用來(lái)簽名用的 $signature = sha1($string); $signPackage = array( "appId" => $this->appid, "nonceStr" => $nonceStr, "timestamp" => $timestamp, "url" => $url, "signature" => $signature, "rawString" => $string ); return $signPackage; }
?? ?? ?? ??? ??:
//使用會(huì)員卡領(lǐng)取的簽名包 public function getHuiYuanSignPackage() { $apiTicket = $this->getApiTicket(); // 注意 URL 一定要?jiǎng)討B(tài)獲取,不能 hardcode.(獲取當(dāng)前網(wǎng)頁(yè)的url) $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://"; $url = "$protocol$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; //時(shí)間戳 $timestamp = time(); //隨機(jī)字符串獲取 // $nonceStr = $this->createNonceStr(); // 這里參數(shù)的順序要按照 key 值 ASCII 碼升序排序 $string = $timestamp.$apiTicket."pVYA_t3RCVF_yhNcO6QCeAmb-1UI"; //生成字符串是用來(lái)簽名用的 $signature = sha1($string); $signPackage = array( "timestamp" => $timestamp, "signature" => $signature, ); return $signPackage; }
??? ?? ??:
HTML ???:
//引入微信js文件 <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> <script type="text/JavaScript"> //配置信息驗(yàn)證接口(填寫(xiě)的js-sdk獲取的簽名包的參數(shù)) wx.config({ debug: false, appId: '<?PHP echo $signPackage["appId"];?>', timestamp: '<?php echo $signPackage["timestamp"];?>', nonceStr: '<?php echo $signPackage["nonceStr"];?>', signature: '<?php echo $signPackage["signature"];?>', jsApiList: [ // 所有要調(diào)用的 API 都要加到這個(gè)列表中 'addCard' ] }); wx.ready(function(){ //添加卡券 document.querySelector('#addCard').onclick = function () { wx.addCard({ cardList: [ { cardId: "",//微信公眾號(hào)內(nèi)創(chuàng)建的會(huì)員卡的id cardExt: '{"timestamp":"<?php echo $huiyuanPackage['timestamp'] ?>","signature":"<?php echo $huiyuanPackage['signature'] ?>"}'//會(huì)員卡的簽名包 } ], //成功之后的回調(diào)的函數(shù)(通過(guò)回調(diào)函數(shù)該表數(shù)據(jù)庫(kù)是否領(lǐng)取會(huì)員卡的狀態(tài)) success: function (res) { $.ajax({ url: '__CONTROLLER__/editHuiYuan', type: 'post', dataType: 'json', data: {is_LingQu: '1',user_id:"<?php echo $user['user_id'] ?>"}, success:function(){ $("#addCard").html("我的會(huì)員卡"); } }) } }); }; }); </script>
????? ??:
??? ?????: http://www.jb51.net /article /115732.htm
public function index(){ $user_id = session('user_id'); if($user_id){ $jssdk = new \Home\Model\WechatModel(); $signPackage = $jssdk->GetSignPackage();//獲取js-sdk簽名包 $huiyuanPackage = $jssdk->getHuiYuanSignPackage();獲取會(huì)員卡簽名包 //獲取用戶(hù)信息 $user = M('user')->where(array('user_id' => $user_id))->find(); //產(chǎn)品收藏?cái)?shù)量統(tǒng)計(jì) $goods_count = M('goods_shoucang')->where(array('user_id' => $user_id))->count(); //門(mén)店收藏?cái)?shù)量統(tǒng)計(jì) $shop_count = M('shop_shoucang')->where(array('user_id' => $user_id))->count(); }else{ //判斷該用戶(hù)是否存在 $model = new \Home\Model\WechatModel(); $openid_accesstoken = $model->openId(); $rst = M('user')->where(array('user_openid' => $openid_accesstoken['openid']))->find(); if($rst){ session('openid',$openid_accesstoken['openid']); session('user_id', $rst['user_id']); $jssdk = new \Home\Model\WechatModel(); $signPackage = $jssdk->GetSignPackage(); $huiyuanPackage = $jssdk->getHuiYuanSignPackage(); //獲取用戶(hù)信息 $user = M('user')->where(array('user_id' => $rst['user_id']))->find(); //產(chǎn)品收藏?cái)?shù)量統(tǒng)計(jì) $goods_count = M('goods_shoucang')->where(array('user_id' => $rst['user_id']))->count(); //門(mén)店收藏?cái)?shù)量統(tǒng)計(jì) $shop_count = M('shop_shoucang')->where(array('user_id' => $rst['user_id']))->count(); }else{ $userInfo = $model->getOpenId($openid_accesstoken['openid'],$openid_accesstoken['access_token']); $data = array( 'user_img' => $userInfo['headimgurl'], 'user_openid' => $userInfo['openid'], 'user_name' => filter($userInfo['nickname']), 'user_register_time' => time(), 'city' => $userInfo['province'].'-'.$userInfo['city'], ); $id = M('user')->add($data); session('openid', $userInfo['openid']); session('user_id',$id); $jssdk = new \Home\Model\WechatModel(); $signPackage = $jssdk->GetSignPackage(); $huiyuanPackage = $jssdk->getHuiYuanSignPackage(); //獲取用戶(hù)信息 $user = M('user')->where(array('user_id' => $id))->find(); //產(chǎn)品收藏?cái)?shù)量統(tǒng)計(jì) $goods_count = M('goods_shoucang')->where(array('user_id' => $id))->count(); //門(mén)店收藏?cái)?shù)量統(tǒng)計(jì) $shop_count = M('shop_shoucang')->where(array('user_id' => $id))->count(); } } $this->assign('signPackage', $signPackage); $this->assign('huiyuanPackage', $huiyuanPackage); $this->assign('user', $user); $this->assign('shop_count', $shop_count); $this->assign('goods_count', $goods_count); $this->display(); }
? ??? WeChat ?? ??? ???? ?? ?? ?? ?? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

Douyin ? ??? ??? ??? https://www.douyin.com/???. ??? ???? ??? ?????. 1. ???? ??; 2. URL https://www.douyin.com/? ??????. 3. "???"??? ???? ??? ??? ??????. 4. ?? ????? ??????. 5. ?? ???. ? ??? ????, ??, ?? ??, ??? ??? ? ?? ???? ??? ?? ??? ???? ?? ??? ??, ?? ???, ??? ?? ?? ? ??? ??? ?? ??? ????.

??? ???? ?? ?? ? ???? ?? ????? ?????. ???? ????? ????? ?? ????? ???? ???? ? ?? ???? ????? ??? ???? ?? ??? ?? ? ????. ???? ????? ??? ??? ???? ??? ???? ??? ???? ? ????. Copy Comics?? ???? ?? ??? ?? ??? ?? ?? ??? ?? ??? ?? ?? ?????, ???? ???? ?? ??? ???, ???? ?? ??? ???? ??? ?? ??? ??? ? ????.

UC ???? ?? QQ ????? ???? ?? ??? ?? ????. 1. UC ????? ???? ? ??? ?????? ??? ???? ????? ?????. 2. QQ ????? Tencent ???? ???? ??? ??? ??? ????? ?????.

2025 ? ?? ?? ???? ??? ?? ???? ??? ??? ?? ??? ? ??? ???? ????? ?? ??, ?? ?? ? ?? ???? ?? ?? ????? ??? ?? 10 ?? ??? ? AI ?? ????? ?? ?????.

?? ???? ?? ?? ?? ?? ? ?? ?? ??? ? Nice Comics? ????? ?? ??? ?? ??? ?????. ?? ?? ??? ?? ? ??? ?? ???? ??? ???? ?? ??? ???? ??????????. ???? ??? ? ????? ???? ??? ?? ??? ?? NES Comics? ???? ???? ??? ?? ?? ? ??? ???? ??? ?? ??? ?? ? ????. ???? ???? ???? ??? ??? ?? ?????, ?? ??? ??? ?? ???? ?? ??? ??????!

Frogman Comics? ???? ??? ?? ??? ???? ??? ??? ?? ??? ?? ?? ?? ?????? ? ?? ????????. ??? ???? ???? ???? ???? ???? ??? ???? ????? ???? ??? ??? ????. ??? ?? ??? ??? ? ???? ??? ??, ??? ? ?? ???? ???? ??? ????? ??? ??? ??? ????. ?? ??? ???? ???? ?? ???? ??? ?? ? ????. ???? ??? ? ????? ???? ?? ?? ???? ?? ?? ??? ??? ?? ?? ??? ?? ??? ?? ? ? ????.

???, ??? ??? ? ?? ???? ???? ???? ?? ??, ????? ??? ?? ???? ???? ???? ???? ?? ??? ????? ??? ??? ???? ?? ? ??? ??? ??? ??? ???? ??? ?? ? ? ????. ??? ?? ??? ?? ??? ??????? ??? ?? ??? ????? ???? ?????? ??? ? ?? ???? ??? ?? ? ??? ???????.

2025b Anhui? ?? ?? ? ???? ??? ????. https://www.marketwebb.co/zh-cn/join?ref=507720986&type=wenzi; Binance Exchange? ??, ??, ??, ??, ?? ? ????? ? 180 ??? ??? ???? ???? ??? ?? ?? ??????. 600 ?? ?? ?? ??? ???? ? ????? 2 ? 7 ?? ?? ?? ? ???? ???? ????.
