<label id="2a06w"><tt id="2a06w"></tt></label><label id="2a06w"><tt id="2a06w"><em id="2a06w"></em></tt></label><menu id="2a06w"></menu>
  • <dfn id="2a06w"><var id="2a06w"><label id="2a06w"></label></var></dfn>
    <sup id="2a06w"><button id="2a06w"><em id="2a06w"></em></button></sup>
    <dfn id="2a06w"><var id="2a06w"></var></dfn>
    <dfn id="2a06w"></dfn>
  • <dfn id="2a06w"><code id="2a06w"><ins id="2a06w"></ins></code></dfn>
  • <small id="2a06w"><samp id="2a06w"></samp></small>
  • <dfn id="2a06w"><table id="2a06w"><center id="2a06w"></center></table></dfn>
    <label id="2a06w"><tt id="2a06w"><em id="2a06w"></em></tt></label>
    <strike id="2a06w"><form id="2a06w"></form></strike>
    <menu id="2a06w"><tt id="2a06w"></tt></menu>

    將想法與焦點和您一起共享

    企業(yè)怎么建立自己的微官網(wǎng),其實很簡單發(fā)布者:本站     時間:2020-04-19 12:04:25

    其實我們認為現(xiàn)在的人把微站神話了,在我們的概念里,其實他就和百度,網(wǎng)址一樣只是一個入口而已,沒有什么難處,只不過有些是需要,單獨的手機網(wǎng)站,來做為微網(wǎng)站的落地頁的。
    1:首先,需要在微信公眾平臺上注冊一個自己的服務號或者訂閱號,這一步其實很簡單的。

    需要在微信公眾平臺上注冊一個自己的服務號或者訂閱號


    2:申請公眾賬號成功后,其實就等于你已經(jīng)有了自己的為網(wǎng)站了,便可以使用其基本功能了,當然,要想做成自己的微信官網(wǎng),則需要進入開發(fā)模式,接入第三方接口?;蛘呃檬謾C網(wǎng)站做,手機網(wǎng)站模板參考http://www.ccxcn.com/mobile

    微網(wǎng)站制作圖解3

    微官網(wǎng)


    3:注冊成功并登陸第三方接口,將注冊好的微信公眾號添加到第三方接口上,所需信息在微信公眾號設置下的賬號信息里。

    注冊成功并登陸第三方接口


    4:添加公眾賬號后,連接公眾平臺與第三方接口,如圖:登錄微信公眾平臺,點擊最左側(cè)最下方的【開發(fā)者中心】,點擊開發(fā)模式。

    登錄微信公眾平臺


    第五步:最后,設計自己的微信官網(wǎng)。并且可在線預覽。

    設計自己的微信官網(wǎng),并且可在線預覽


    完成以上步驟后,并且認證訂閱號或服務號后就可以做微信的二次開發(fā)了,比如我要制作一個群發(fā)功能的接口,需要使用一下微信接口:
    1、獲取access token
    2、新增臨時素材接口
    3、上傳圖文消息素材接口
    4、調(diào)用群發(fā)接口
    接口代碼示例:WeixinApi.class.php
    <?php
    class WeixinApi{
    private $appid,$appsecret,$media_id;
    public function __construct($appid="",$appsecret=""){
    $this->appid=$appid;
    $this->appsecret=$appsecret;
    }
    //獲取token
    public function getToken(){
    if($_COOKIE["exptime"]=="" || time()-$_COOKIE["create_time"]>=$_COOKIE["exptime"]){
    $token=@file_get_contents("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={$this->appid}&secret={$this->appsecret}");
    $tokenarr=json_decode($token,true);
    setcookie("exptime",$tokenarr["expires_in"],0,'/');
    setcookie("access_token",$tokenarr["access_token"],0,'/');
    setcookie("create_time",time(),0,'/');
    }else{
    $tokenarr=array(
    "access_token"=>$_COOKIE["access_token"],
    "expires_in"=>$_COOKIE["exptime"],
    "create_time"=>$_COOKIE["create_time"]
    );
    }
    return $tokenarr;
    }
    private function sockupload($phost,$pport,$purl,$filename,$file_data=array()){
    $host = $phost;
    $port = $pport;
    $errno = '';
    $errstr = '';
    $timeout = 30;
    $url = $purl;
    /*$form_data = array(
    'name' => 'lijie',
    'gender' => 'man',
    );*/
    $file_data = array(
    array(
    'name' => 'media',
    'filename' => $filename,
    //'path' =>'1.jpg'
    )
    );
    // create connect
    $fp = fsockopen($host, $port, $errno, $errstr, $timeout);
    if(!$fp){
    return false;
    }
    // send request
    srand((double)microtime()*1000000);
    $boundary = "---------------------------".substr(md5(rand(0,32000)),0,10);
    $data = "--$boundaryrn";
    // form data
    if(count($form_data)>0){
    foreach($form_data as $key=>$val){
    $data .= "Content-Disposition: form-data; name="".$key.""rn";
    $data .= "Content-type:text/plainrnrn";
    $data .= rawurlencode($val)."rn";
    $data .= "--$boundaryrn";
    }
    }
    // file data
    if($filename!=""){
    foreach($file_data as $file){
    $data .= "Content-Disposition: form-data; name="".$file['name'].""; filename="".$file['filename'].""rn";
    $pinfo=pathinfo($file['filename']);
    $data .= "Content-Type: ".$pinfo["extension"]."rnrn";
    $data .= implode("",file($file['filename']))."rn";
    $data .= "--$boundaryrn";
    }
    }
    $data .="--rnrn";
    $out = "POST ${url} HTTP/1.1rn";
    $out .= "Host:${host}rn";
    $out .= "Content-type:multipart/form-data; boundary=$boundaryrn"; // multipart/form-data
    $out .= "Content-length:".strlen($data)."rn";
    $out .= "Connection:closernrn";
    $out .= "${data}";
    fputs($fp, $out);
    // get response
    $response = '';
    while($row=fread($fp, 4096)){
    $response .= $row;
    }
    $pos = strpos($response, "rnrn");
    $response = substr($response, $pos+4);
    return $response;
    }
    //json數(shù)據(jù)提交
    private function jsonUpload($url,$jsdata){
    $data_string = $jsdata;
    $ch = curl_init();
    curl_setopt ( $ch, CURLOPT_URL, $url );
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS,$data_string);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json;charset=utf-8',
    'Content-Length: ' . strlen($data_string))
    );
    $result = curl_exec($ch);
    curl_close ( $ch );
    return $result;
    }
    //上傳媒體接口
    public function upload($type,$filename){
    $tokens=$this->getToken();
    $result=$this->sockupload("api.weixin.qq.com",80,"/cgi-bin/media/upload?access_token=".$tokens["access_token"]."&type={$type}",$filename);
    $media=json_decode($result,true);
    $this->media_id=$media['media_id'];
    return $this;
    }
    //上傳素材
    public function uploadnews($title,$content,$author="",$url="",$digest="",$show_cover_pic="1"){
    $articles=array(
    "articles"=>array(
    array(
    "thumb_media_id"=>$this->media_id,
    "author"=>$author,
    "title"=>urlencode($title),
    "content_source_url"=>$url,
    "content"=>urlencode($content),
    "digest"=>$digest,
    "show_cover_pic"=>"1"
    )
    )
    );
    $tokens=$this->getToken();
    $news=urldecode(json_encode($articles));
    $result=$this->jsonUpload("api.weixin.qq.com/cgi-bin/media/uploadnews?access_token=".$tokens["access_token"]."",$news);
    $newsdata=json_decode($result,true);
    $this->media_id=$newsdata["media_id"];
    return $this;
    }
    //群發(fā)接口
    public function sendall(){
    $arr=array(
    "filter"=>array("is_to_all"=>true,"group_id"=>""),
    "mpnews"=>array("media_id"=>$this->media_id),
    "msgtype"=>"mpnews"
    );
    $json=json_encode($arr);
    $tokens=$this->getToken();
    $result=$this->jsonUpload("api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=".$tokens["access_token"]."",$json);
    return $result;
    }
    }
    使用:
    $weixin=new WeixinApi($appid,$appsecret);
    $result=$weixin->upload("image","圖片路徑")->uploadnews("文章標題","文章內(nèi)容")->sendall();

    微官網(wǎng)是為適應高速發(fā)展的移動互聯(lián)網(wǎng)市場環(huán)境而誕生的一種基于WebApp和傳統(tǒng)PC版網(wǎng)站相融合的新型網(wǎng)站。微官網(wǎng)可兼容iOS、android、WP等多種智能手機操作系統(tǒng),可便捷的與微信、微博等網(wǎng)絡互動咨詢平臺鏈接,簡言之,微官網(wǎng)就是適應移動客戶端瀏覽體驗與交互性能要求的新一代網(wǎng)站。
    優(yōu)點

    1、不用注冊域名更方便
             2、不用購買空間更節(jié)約
             3、不用進行網(wǎng)站備案更省時

     

    4、多款行業(yè)模版隨意選擇,多種內(nèi)頁列表展現(xiàn)方式,布局采用DIV+CSS技術(shù),簡潔大方,拓展性強,無限制頁面數(shù)量與容量,頁面圖片任意編輯,自動適應屏幕比例,移動客戶端界面視覺效果強,版面豐富,布局靈活,擴展性強

    5、應用HTML5技術(shù)提升瀏覽體驗與交互性能,訪問速度更快,更安全,用戶體驗更佳
    6、內(nèi)置一鍵導航功能,可個性化定制功能模塊,自定義微網(wǎng)站導航
    7、提供在線支付,購物,等多種電商移動互聯(lián)網(wǎng)開發(fā)



    選擇我們,優(yōu)質(zhì)服務,不容錯過
    1. 優(yōu)秀的網(wǎng)絡資源,強大的網(wǎng)站優(yōu)化技術(shù),穩(wěn)定的網(wǎng)站和速度保證
    2. 15年上海網(wǎng)站建設經(jīng)驗,優(yōu)秀的技術(shù)和設計水平,更放心
    3. 全程省心服務,不必擔心自己不懂網(wǎng)絡,更省心。
    ------------------------------------------------------------
    24小時聯(lián)系電話:021-58370032
    99人妻中文字幕视频在,亚洲无码视频在线免费看,久久国产乱子伦免费精品,日本中文字幕色视频网站
    <label id="2a06w"><tt id="2a06w"></tt></label><label id="2a06w"><tt id="2a06w"><em id="2a06w"></em></tt></label><menu id="2a06w"></menu>
  • <dfn id="2a06w"><var id="2a06w"><label id="2a06w"></label></var></dfn>
    <sup id="2a06w"><button id="2a06w"><em id="2a06w"></em></button></sup>
    <dfn id="2a06w"><var id="2a06w"></var></dfn>
    <dfn id="2a06w"></dfn>
  • <dfn id="2a06w"><code id="2a06w"><ins id="2a06w"></ins></code></dfn>
  • <small id="2a06w"><samp id="2a06w"></samp></small>
  • <dfn id="2a06w"><table id="2a06w"><center id="2a06w"></center></table></dfn>
    <label id="2a06w"><tt id="2a06w"><em id="2a06w"></em></tt></label>
    <strike id="2a06w"><form id="2a06w"></form></strike>
    <menu id="2a06w"><tt id="2a06w"></tt></menu>