1. 程式人生 > >微信高階介面群發 多客服

微信高階介面群發 多客服

http://yunpan.cn/QizNJp3uSTbpS 訪問密碼 676c



/**
 * 微信介面呼叫
 * 依賴
 * 全域性變數
 * global $uid 公眾號使用者id, $wid 公眾號id, $wechatid 粉絲唯一id;
 * 引數
 * $postStr = $GLOBALS["HTTP_RAW_POST_DATA"];
 * $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);
 * 快取類 自定義
 * Cache:set
 * Cache:get
 * 具體業務修改
 * 1.上傳圖文資訊至微信素材庫
 * function uploadArticlesToWeiXinServer()
 * 2.關鍵字匹配圖文回覆
 * function getArticleData()
 * 
 * usage:
 *   $options = array(
 * 			'token'=>'tokenaccesskey', //填寫你設定的key
 * 			'appid'=>'wxdk1234567890', //填寫高階呼叫功能的app id
 * 			'appsecret'=>'xxxxxxxxxxxxxxxxxxx', //填寫高階呼叫功能的金鑰
 * 		);
 */
class WeiXinTool {

    private $appid;
    private $appsecret;
    private $access_token;
    private $mediaType = array('image' => array("jpg"), 'voice' => array('amr', 'MP3'), 'video' => array('mp4'), 'thumb' => array("jpg"));
    private $mediaMaxSize = array('image' => 131072, 'voice' => 262144, 'video' => 1048576, 'thumb' => 65536);
    private $tem_file_path = "";

//    授權地址
    const AUTH_URL = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s';
//    素材上傳
    const UPLOAD_MEDIA_URL = "http://file.api.weixin.qq.com/cgi-bin/media/upload?access_token=%s&type=%s";
    const GET_MEDIA_URL = "http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=%s&media_id=%s";
    const UPLOAD_NEWS_URL = "https://api.weixin.qq.com/cgi-bin/media/uploadnews?access_token=%s";

    public function __construct($options) {
        $this->appid = isset($options['appid']) ? $options['appid'] : '';
        $this->appsecret = isset($options['appsecret']) ? $options['appsecret'] : '';
        //需修改
        //上傳圖片臨時檔案目錄自定義
        $this->tem_file_path = YYUC_FRAME_PATH . YYUC_PUB . '/' . Session::get('upath');
    }

    /**
     * 需修改
     * 具體業務需求,圖文資訊上傳至素材庫
     * 微站文章上傳至微信素材
     * @param type $wid 
     * @param type $aid
     * @return int
     */
    public function uploadArticlesToWeiXinServer($wid, $aid) {

        //具體圖文組裝過程,需修改
        $m = new Model('website_article');
        $m_pubs = new Model('pubs');
        $m_pubs->find(array("id" => $wid));
        $m->find(array("wid" => $wid, 'id' => $aid));
        $res = array();
        if ($m->has_id() && $m_pubs->has_id()) {
            $res[] = $m->get_model_array();
//            var_dump($res);
            $m->votetouser = json_decode($m->votetouser, TRUE);
            $articles = $m->votetouser[0];
            $m_article = new Model('website_article');
            $ress = $m_article->where(array('wid' => $wid, 'id' => $articles))->list_all_array();
            $res = array_merge($res, $ress);
        } else {
            $errarr = array();
            $errarr['errcode'] = 44003;
            $errarr['errmsg'] = self::$errorno[$errarr['errcode']];
            return $errarr;
        }
        $items = array();
        foreach ($res as $k => $v) {
            $mediaid = $this->uploadMedia($v['picurl']);
            if ($mediaid['media_id']) {
                $thumb_media_id = $mediaid['media_id'];
            } else {
                return $mediaid;
            }
            $item = array(
                "thumb_media_id" => $thumb_media_id,
                "author" => $m_pubs->pubun,
                "title" => $v['title'],
                "content_source_url" => WeiXinTool::complateUrl(WeiSite::parseArticleLinkData($v)),
                "content" => $v['reply_content'], //內容 富文字
                "digest" => $v['description']//描述
            );
            $items[] = $item;
        }
        //以上具體圖文組裝過程,需修改

        $postData['articles'] = $items;
        $error = $this->uploadNews($postData);
        return $error;
    }

    /**
     * 需修改
     * 微站文章關鍵字匹配資料解析
     */
    public static function getArticleData($keyword) {
        global $wid;
        $m = new Model('website_article');
        $m->find(array('wid' => $wid, '
[email protected]
~' => " " . $keyword . " ")); $res = array(); if ($m->has_id()) { $res[] = array("tit" => $m->title, "pic" => $m->picurl, "dec" => $m->description, "url" => WeiSite::parseArticleLinkData($m->get_model_array())); $m->votetouser = json_decode($m->votetouser, TRUE); $articles = $m->votetouser[0]; if (!empty($articles)) { foreach ($articles as $v) { $m_article = new Model('website_article'); $m_article->find(array('wid' => $wid, 'id' => $v)); $res[] = array("tit" => $m_article->title, "pic" => $m_article->picurl, "dec" => $m_article->description, "url" => WeiSite::parseArticleLinkData($m_article->get_model_array())); } } return $res; } } /** * 獲取accesstoken * @param type $flag 強制重新整理accesstoken 開關 * @return type */ public function getAccessToken($flag = FALSE) { $url = sprintf(self::AUTH_URL, $this->appid, $this->appsecret); $result = Cache::get(md5($url)); if ($flag || empty($result)) { $result = $this->http_get($url); $result = json_decode($result, TRUE); if ($result['errcode']) { return $result['errcode']; } Cache::set(md5($url), $result, 1); } $this->access_token = $result['access_token']; return true; } /** * 上傳媒體 * @param type $file 媒體檔案 $url或者物理路徑地址 * @param type $type 型別 * @return int * return array (size=3) 'type' => string 'image' (length=5) 'media_id' => string '-0Lr3rX9mDYBB7i5bDydvwFHHm3zW2Uxt0OoDFBPmGRfYiwckiALqHH_DlP9jCm_' (length=64) 'created_at' => int 1400477181 */ public function uploadMedia($file, $type = "image") { $file = self::complateUrl($file); $urlarr = parse_url($file); $filetype = explode(".", $urlarr['path']); $filetype = strtolower($filetype[count($filetype) - 1]); $resizeSize = 100; //圖片處理後另存質量 if (!key_exists($type, $this->mediaType) || !in_array($filetype, $this->mediaType[$type])) { // return 40005; //格式錯誤 $errarr = array(); $errarr['errcode'] = 40005; $errarr['errmsg'] = self::$errorno[$errarr['errcode']]; return $errarr; } $temp_file = $this->tem_file_path . 'uploadMedia.' . $filetype; $temp_file_resize = $this->tem_file_path . 'uploadMediaResize.' . $filetype; file_put_contents($temp_file, self::http_get($file)); $handle = fopen($temp_file, "r"); $fstat = fstat($handle); if ($fstat['size'] > $this->mediaMaxSize[$type]) { $resizeSize = intval($this->mediaMaxSize[$type] / $fstat['size'] * 100); ImageTool::resizeImage($temp_file_resize, $temp_file, 400, 400, $resizeSize); //圖片太大再處理壓縮 $temp_file = $temp_file_resize; // return 40006; //大小錯誤 } $filePath = realpath($temp_file); $uploadUrl = sprintf(self::UPLOAD_MEDIA_URL, $this->access_token, $type); $postData = array("r" => time(), 'media' => "@{$filePath}"); $result = self::http_post($uploadUrl, $postData); $result = json_decode($result, TRUE); return $result; } /** * 群發圖文資訊 * @param type $touser 粉絲陣列/粉絲組id * @param type $media_id * @return type */ public function sendArticles($touser, $media_id) { $errarr = array(); $postData = array(); $postData['mpnews'] = array("media_id" => $media_id); $postData['msgtype'] = "mpnews"; if (is_array($touser)) { //使用者列表群發 $postData['touser'] = $touser; $url = 'https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token=%s'; } else { $group = intval($touser); $groups = $this->getGroups(true); if (key_exists($group, $groups['list'])) { $postData['filter'] = array("group_id" => $group); } else { $errarr['errcode'] = 40050; //無效分組id $errarr['errmsg'] = self::$errorno[$errarr['errcode']]; return $errarr; } $url = 'https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=%s'; } $url = sprintf($url, $this->access_token); $result = self::http_post($url, self::json_encode($postData)); $result = json_decode($result, TRUE); return $result; } /** * 刪除群發信息 * @param type $msgid * @return type */ public function delSend($msgid) { $url = 'https://api.weixin.qq.com/cgi-bin/message/mass/delete?access_token=%s'; $url = sprintf($url, $this->access_token); $postData = array('msgid' => $msgid, 'r' => time()); $result = self::http_post($url, self::json_encode($postData)); $result = json_decode($result, TRUE); return $result; } /** * 群發圖文素材上傳 $postData = array('articles' => array($item, $item,...)); $item = array( "thumb_media_id" => "WMQubqCECMQwAjqh8CI500LfhyoG0vmTTlKKJM5oP-of0uLML1_2s26j8XeIorDL", "author" => "xxx", "title" => "Happy Day", "content_source_url" => "www.qq.com", "content" => "content", "digest" => "digest" ); * return array (size=3) 'type' => string 'news' (length=4) 'media_id' => string 'OuXqv2dgZzxAmK4z-tvStgr6InG18oIllWkD6Tj1qJZVRg-2f64FDU2D3J7dptHs' (length=64) 'created_at' => int 1400477183 */ public function uploadNews($postData) { $uploadUrl = sprintf(self::UPLOAD_NEWS_URL, $this->access_token); $result = self::http_post($uploadUrl, self::json_encode($postData)); $result = json_decode($result, TRUE); return $result; } /** * 獲取粉絲列表 * @param type $nextOpenId * @return type */ public function getAllConnects($nextOpenId = "") { $url = 'https://api.weixin.qq.com/cgi-bin/user/get?access_token=%s&next_openid=%s'; $url = sprintf($url, $this->access_token, $nextOpenId); $result = self::http_get($url); $result = json_decode($result, TRUE); $count = count($result['data']['openid']); $list = $result['data']['openid']; if ($result['data']['openid'][$count - 1] == $result['next_openid']) { return $result['data']['openid']; } else { $templist = $this->getAllConnects($result['next_openid']); $list = array_merge($list, $templist); return $list; } } /** * 根據粉絲唯一id獲取微信資訊 * @param type $openid * @return type */ public function getFansInfo($openid) { $url = 'https://api.weixin.qq.com/cgi-bin/user/info?access_token=%s&openid=%s&lang=zh_CN'; $url = sprintf($url, $this->access_token, $openid); $result = self::http_get($url); $result = json_decode($result, TRUE); return $result; } /** * 更新粉絲組資訊 * @param type $openid * @param type $groupid * @return type */ public function updateFansGroups($openid, $groupid) { $url = 'https://api.weixin.qq.com/cgi-bin/groups/members/update?access_token=%s'; $url = sprintf($url, $this->access_token); $postData = array("to_groupid" => $groupid, 'openid' => $openid); $result = self::http_post($url, self::json_encode($postData)); $result = json_decode($result, TRUE); $this->getGroups(true); return $result; } /** * 獲取粉絲組資訊 * @param type $openid * @return type */ public function getFansGroupInfo($openid) { $url = 'https://api.weixin.qq.com/cgi-bin/groups/getid?access_token=%s'; $url = sprintf($url, $this->access_token); $postData = array("r" => time(), 'openid' => $openid); $result = self::http_post($url, self::json_encode($postData)); $result = json_decode($result, TRUE); return $result['groupid']; } /** * 獲取唯一key * @param type $key * @return type */ public function getKey($key) { return md5($this->appid . $this->appsecret . $key); } /** * 獲取媒體圖片到本地 * @param type $mediaid * @return string */ public function getMedia($mediaid) { $url = sprintf(self::GET_MEDIA_URL, $this->access_token, $mediaid); $result = self::http_get($url); $temp_file = $this->tem_file_path . 'getMedia.jpg'; file_put_contents($temp_file, $result); return $temp_file; } /** * 使用者組 * @param type $flag 強制重新整理使用者組 * @return type */ public function getGroups($flag = false) { $key = $this->appid . 'gasdfev' . $this->appsecret; $result = Cache::get($key); if (empty($result) || $flag) { $url = 'https://api.weixin.qq.com/cgi-bin/groups/get?access_token=%s'; $url = sprintf($url, $this->access_token); $result = self::http_get($url); $result = json_decode($result, TRUE); $temg = array(); $temlist = array(); foreach ($result['groups'] as $k => $v) { $temg[$v['id']] = $v; $temlist[$v['id']] = $v['name']; } $result['map'] = $temg; $result['list'] = $temlist; Cache::set($key, $result); } return $result; } /** * 新增使用者組 * @param type $name * @return type */ public function createGroup($name) { $url = 'https://api.weixin.qq.com/cgi-bin/groups/create?access_token=%s'; $url = sprintf($url, $this->access_token); $result = self::http_post($url, self::json_encode(array('group' => array('name' => $name)))); $result = json_decode($result, TRUE); return $result; } /** * 修改使用者組 * @param type $id * @param type $name * @return type */ public function modifyGroup($id, $name) { $url = 'https://api.weixin.qq.com/cgi-bin/groups/update?access_token=%s'; $url = sprintf($url, $this->access_token); $result = self::http_post($url, self::json_encode(array('group' => array('id' => $id, 'name' => $name)))); $result = json_decode($result, TRUE); return $result; } /** * 多客服接入 * @global type $wid * @param type $postObj */ public static function responseService($postObj) { global $wid; $fromUsername = $postObj->FromUserName; $toUsername = $postObj->ToUserName; $textTpl = "<xml> <ToUserName><![CDATA[%s]]></ToUserName> <FromUserName><![CDATA[%s]]></FromUserName> <CreateTime>%s</CreateTime> <MsgType><![CDATA[transfer_customer_service]]></MsgType> </xml>"; $resstr = sprintf($textTpl, $fromUsername, $toUsername, time()); echo $resstr; } /** * 微信回覆多圖文 * @global type $wid * @param type $res * array(array(),array() * ); * @param type $rid * @param type $postObj */ public static function response_morearts($res, $postObj) { global $wid; $fromUsername = $postObj->FromUserName; $toUsername = $postObj->ToUserName; $textTpl = "<xml> <ToUserName><![CDATA[%s]]></ToUserName> <FromUserName><![CDATA[%s]]></FromUserName> <CreateTime>%s</CreateTime> <MsgType><![CDATA[%s]]></MsgType> <ArticleCount>%s</ArticleCount> <Articles> ITEM </Articles> </xml>"; $resstr = sprintf($textTpl, $fromUsername, $toUsername, time(), "news", count($res)); $item = ''; $subitem = "<item> <Title><![CDATA[%s]]></Title> <Description><![CDATA[%s]]></Description> <PicUrl><![CDATA[%s]]></PicUrl> <Url><![CDATA[%s]]></Url> </item>"; foreach ($res as $r) { $r['url'] = self::parseUrl($r['url']); $item .= sprintf($subitem, $r['tit'], $r['des'], self::complateUrl($r['pic']), self::replaceToWXUrl(self::complateUrl($r['url']), $postObj)); } $resstr = str_replace('ITEM', $item, $resstr); echo $resstr; } /** * url解析 * @param type $url * @return string */ public static function complateUrl($url) { if (false === stristr($url, "http://")) {//查詢http:// 如果不存在 if (0 === strpos($url, '/')) {//查詢首字母 如果存在 $url = substr($url, 1); //去除/ } $url = "http://" . $_SERVER['HTTP_HOST'] . '/' . $url; //拼接完整路徑 } return $url; } /** * 微信url固定引數替換 * @param type $url * @param type $postObj * @return type */ public static function replaceToWXUrl($url, $postObj) { global $wechatid; return str_ireplace('fromUsername', $wechatid, $url); } /** * 完成以下行為 * parseUrlParam * setUrlPublicParam * buildUrlParam * @param type $url * @param type $other 附加引數 基礎引數wid wxid wechatid */ public static function parseUrl($url, $other = array()) { $url = self::parseUrlParam($url); $url = self::setUrlPublicParam($url); if (is_array($other) && !empty($other)) { $url['param'] = array_merge($url['param'], $other); } $url = self::buildUrlParam($url); return $url; } /** * 分析url * @param type $url * @return type */ public static function parseUrlParam($url) { $temp = explode("?", $url); $url0 = $temp[0]; $url1 = $temp[1]; $p = explode("&", $url1); $param = array(); foreach ($p as $v) { $tempp = explode("=", $v); $param[$tempp[0]] = $tempp[1]; } return array("url" => $url0, "param" => $param); } /** * 組裝url * @param type $arr * @return type */ public static function buildUrlParam($arr) { $url = $arr['url']; $param = $arr['param']; $param_arr = array(); foreach ($param as $k => $v) { if ($k == "") continue; $param_arr[] = $k . "=" . $v; } return $url . "?" . implode("&", $param_arr) . "#mp.weixin.qq.com"; } /** * 設定微信保留引數資訊 * @global type $uid * @global type $wid * @global type $wechatid * @param type $url * @return type */ public static function setUrlPublicParam($url) { global $uid, $wid, $wechatid; $url['param']['wid'] = $wid; $url['param']['wxid'] = $wechatid; $url['param']['wechatid'] = $wechatid; return $url; } public static $errorno = array( '-1' => '系統繁忙', '0' => '請求成功', '40001' => '獲取access_token時AppSecret錯誤,或者access_token無效', '40002' => '不合法的憑證型別', '40003' => '不合法的OpenID', '40004' => '不合法的媒體檔案型別', '40005' => '不合法的檔案型別', '40006' => '不合法的檔案大小', '40007' => '不合法的媒體檔案id', '40008' => '不合法的訊息型別', '40009' => '不合法的圖片檔案大小', '40010' => '不合法的語音檔案大小', '40011' => '不合法的視訊檔案大小', '40012' => '不合法的縮圖檔案大小', '40013' => '不合法的APPID', '40014' => '不合法的access_token', '40015' => '不合法的選單型別', '40016' => '不合法的按鈕個數', '40017' => '不合法的按鈕個數', '40018' => '不合法的按鈕名字長度', '40019' => '不合法的按鈕KEY長度', '40020' => '不合法的按鈕URL長度', '40021' => '不合法的選單版本號', '40022' => '不合法的子選單級數', '40023' => '不合法的子選單按鈕個數', '40024' => '不合法的子選單按鈕型別', '40025' => '不合法的子選單按鈕名字長度', '40026' => '不合法的子選單按鈕KEY長度', '40027' => '不合法的子選單按鈕URL長度', '40028' => '不合法的自定義選單使用使用者', '40029' => '不合法的oauth_code', '40030' => '不合法的refresh_token', '40031' => '不合法的openid列表', '40032' => '不合法的openid列表長度', '40033' => '不合法的請求字元,不能包含\uxxxx格式的字元', '40035' => '不合法的引數', '40038' => '不合法的請求格式', '40039' => '不合法的URL長度', '40050' => '不合法的分組id', '40051' => '分組名字不合法', '40059' => '不合法的訊息id', '41001' => '缺少access_token引數', '41002' => '缺少appid引數', '41003' => '缺少refresh_token引數', '41004' => '缺少secret引數', '41005' => '缺少多媒體檔案資料', '41006' => '缺少media_id引數', '41007' => '缺少子選單資料', '41008' => '缺少oauth code', '41009' => '缺少openid', '42001' => 'access_token超時', '42002' => 'refresh_token超時', '42003' => 'oauth_code超時', '43001' => '需要GET請求', '43002' => '需要POST請求', '43003' => '需要HTTPS請求', '43004' => '需要接收者關注', '43005' => '需要好友關係', '44001' => '多媒體檔案為空', '44002' => 'POST的資料包為空', '44003' => '圖文訊息內容為空', '44004' => '文字訊息內容為空', '45001' => '多媒體檔案大小超過限制', '45002' => '訊息內容超過限制', '45003' => '標題欄位超過限制', '45004' => '描述欄位超過限制', '45005' => '連結欄位超過限制', '45006' => '圖片連結欄位超過限制', '45007' => '語音播放時間超過限制', '45008' => '圖文訊息超過限制', '45009' => '介面呼叫超過限制', '45010' => '建立選單個數超過限制', '45015' => '回覆時間超過限制', '45016' => '系統分組,不允許修改', '45017' => '分組名字過長', '45018' => '分組數量超過上限', '46001' => '不存在媒體資料', '46002' => '不存在的選單版本', '46003' => '不存在的選單資料', '46004' => '不存在的使用者', '47001' => '解析JSON/XML內容錯誤', '48001' => 'api功能未授權', '50001' => '使用者未授權該api' ); /** * GET 請求 * @param string $url */ public static function http_get($url) { if (!function_exists('curl_init')) { die('curl 未開啟'); }; $oCurl = curl_init(); if (stripos($url, "https://") !== FALSE) { curl_setopt($oCurl, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($oCurl, CURLOPT_SSL_VERIFYHOST, FALSE); } curl_setopt($oCurl, CURLOPT_URL, $url); curl_setopt($oCurl, CURLOPT_RETURNTRANSFER, 1); $sContent = curl_exec($oCurl); $aStatus = curl_getinfo($oCurl); curl_close($oCurl); if (intval($aStatus["http_code"]) == 200) { return $sContent; } else { return false; } } /** * POST 請求 * @param string $url * @param array $param * @return string content */ public static function http_post($url, $param, $httpBuildQuery = false) { if (!function_exists('curl_init')) { die('curl 未開啟'); }; $oCurl = curl_init(); if (stripos($url, "https://") !== FALSE) { curl_setopt($oCurl, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($oCurl, CURLOPT_SSL_VERIFYHOST, false); } curl_setopt($oCurl, CURLOPT_URL, $url); curl_setopt($oCurl, CURLOPT_RETURNTRANSFER, 1); // curl_setopt($oCurl, CURLOPT_HTTPHEADER, $header);//設定HTTP頭 curl_setopt($oCurl, CURLOPT_POST, 1); if ($httpBuildQuery) { $param = http_build_query($param); } curl_setopt($oCurl, CURLOPT_POSTFIELDS, $param); $sContent = curl_exec($oCurl); $aStatus = curl_getinfo($oCurl); curl_close($oCurl); if (intval($aStatus["http_code"]) == 200) { return $sContent; } else { return false; } } /** * 微信api不支援中文轉義的json結構 * @param array $arr */ static function json_encode($arr) { $parts = array(); $is_list = false; //Find out if the given array is a numerical array $keys = array_keys($arr); $max_length = count($arr) - 1; if (($keys [0] === 0) && ($keys [$max_length] === $max_length )) { //See if the first key is 0 and last key is length - 1 $is_list = true; for ($i = 0; $i < count($keys); $i ++) { //See if each key correspondes to its position if ($i != $keys [$i]) { //A key fails at position check. $is_list = false; //It is an associative array. break; } } } foreach ($arr as $key => $value) { if (is_array($value)) { //Custom handling for arrays if ($is_list) $parts [] = self::json_encode($value); /* :RECURSION: */ else $parts [] = '"' . $key . '":' . self::json_encode($value); /* :RECURSION: */ } else { $str = ''; if (!$is_list) $str = '"' . $key . '":'; //Custom handling for multiple data types if (is_numeric($value) && $value < 2000000000) $str .= $value; //Numbers elseif ($value === false) $str .= 'false'; //The booleans elseif ($value === true) $str .= 'true'; else $str .= '"' . addslashes($value) . '"'; //All other things // :TODO: Is there any more datatype we should be in the lookout for? (Object?) $parts [] = $str; } } $json = implode(',', $parts); if ($is_list) return '[' . $json . ']'; //Return numerical JSON return '{' . $json . '}'; //Return associative JSON } }


相關推薦

高階介面群發

http://yunpan.cn/QizNJp3uSTbpS 訪問密碼 676c /** * 微信介面呼叫 * 依賴 * 全域性變數 * global $uid 公眾號使用者id, $wid 公眾號id, $wechatid 粉絲唯一id; * 引數 *

轉賬不到賬電話

電話O755-85OOO6O3微信轉賬不到賬客服電話O755-32914926撥通後請再按225#鍵或者226#鍵分機號切記雖然網上經常有刷單被騙的新聞傳出,雖然有法律人士說這個行業屬於灰色,但仍算是一個不錯的選擇。因為時間自由,雖然不能賺大錢,但收入也還能讓人基本滿意,主要是如果找對平臺,投入很少收益卻不低

小程序智能平臺有什麽推薦?的功能是如何實現的?

分享 卡片 logs targe 商家 智能 權限 OS style 依托微信這個強大的入口,小程序以即用即走無需下載的方式搞定日常生活工作和企業的各種需求。 隨之而來,小程序流量湧入,對商品有問題或者有需要咨詢店家的用戶越來越多,客服面對大量的信息,該如何處理? 那麽有沒

weixin-java-mp集成公眾號自帶功能

scribe ogg 技術交流 lis equals etl new t 掃碼 分享圖片 電腦端登錄公眾號管理後臺,【添加功能插件】開通客服功能,輸入"人工客服"接入客服熱線 底部有我的微信二維碼,如有問題,可加好友進行技術交流! ? ? ? ? ? ? ? weixi

小程式—contact-button()

客服會話按鈕,用於在頁面上顯示一個客服會話按鈕,使用者點選該按鈕後會進入客服會話。 效果圖如下, 1.index.wxml中:  第一種實現方式: <view class='myView'>第一種方式實現:</view> <contact-

小程式+“芝麻小”可設自動關注公眾號,助力運營閉環

微信小程式全面上線已經接近1年的時間,從最初的“用完即走”理念到2017年總計更新開放60餘次的功能創新,微信小程式不一定會爆發下一次的紅利,但絕對是微信生態中重要的一環。 芝麻小程式碼(官網)推出小程式“芝麻小客服”,幫助小程式運營和推廣,在微信公眾號與小程式的運營閉環板

公眾平臺系列-4訊息回覆

部分封裝:<?php /** * Created by PhpStorm. * User: wangyetao * Date: 18-1-19 * Time: 下午9:23 */ namespace Wx\WxUtil\MessageManagement;

小程序在線系統都有哪些功能?

程序 移動 全部 聯網 用戶標簽 服務 管理 回復 小程序 微信小程序的用戶已經破6億,不少企業都看準了小程序這塊大蛋糕。但是想要把握住小程序紅利,除了做好運營推廣外,用戶服務也是重中之重。微信小程序自帶的客服系統卻很難滿足用戶服務的需求,於是很多小程序使用者選擇了米多客小

高階群發之五預覽介面

/** * * sendPreview:(通過該介面傳送訊息給指定使用者,在手機端檢視訊息的樣式和排版。). * * @author HanKeQi * @param @par

高階群發之預覽介面

例子一:/** *  * sendPreview:(通過該介面傳送訊息給指定使用者,在手機端檢視訊息的樣式和排版。).   *   * @author HanKeQi   * @param  @param openId  使用者唯一標示 不能為空 * @param  @par

小程式怎麼接入系統

最近有很多運營人說,微信公眾號越來越難做了,開啟率和分享率呈下滑趨勢,發文就掉粉,隨著小程式的功能不斷優化,很多運營人紛紛投入小程式的懷抱。小程式將在今年徹底爆發,更多創業者、流量主會進場廝殺。所以只有提高小程式的使用者服務體驗,才能在這場流量爭奪大戰中佔據有利地位。小程式自

酋長大課堂》之“小程式如何接入系統?”

微酋長小程式接入多客服系統的方式: 一、使用微信公眾平臺網頁版客服工具 ① 新增多客服:小程式後臺——客服反饋——客服人員——新增——確定 ② 客服用“微信公眾平臺網頁版客服工具”回覆使用者訊息 缺點:需要保持電腦線上,經常重新整理訊息,客服需手動接入使用者,使

小程式、公眾號轉私人訊號,實現24小時線上

    現在不少企業都有自己的微信公眾號、服務號、小程式,其中也添加了客服功用。     但據所知,官方提供的僅是網頁版的客服系統,我們的客服人民必須開啟網頁進行“守候”。     我們為什麼不能將

高階群發之一上傳圖文訊息素材

/** * uploadNews(List<MessageIn> messageInfos)上傳圖文訊息素材,最多上傳10個圖文 * accessToken:(ACCESS_TOK

公眾號群發文章怎麽通過文字或圖片鏈接打開小程序?

微信近日宣布小程序的能力再次升級,對於本次升級的內容可能還有不少用戶不是很清楚,那麽微信公眾號群發文章怎麽通過文字或圖片鏈接打開小程序?下面就讓小編給大家介紹一下! 微信公眾號群發文章怎麽通過文字或圖片鏈接打開小程序教程: 微信公眾號為大家準備了一個最新的功能,那就是小夥伴們在使

PC(WeChat)電腦端開分析+源碼

success cut eval .dll duplicate patch 描述 shel ssi 0x00 前言 不知道大家有沒有多個微信號,我反正有一兩三個。 現在電腦端微信使用頻率也比較高,主要用於大文件傳輸,或者手機電腦文件互傳等等,除了不能收紅包和看朋友圈,貌似電

小程序實現選分享

menu 默認 代碼 area asc style message 小程序 HA 微信小程序拉取好友列表後,默認只能選一個分享,現在在分享回調onShareAppMessage裏加上這段代碼,拉取好友列表時,右上角會出現多選按鈕,這樣就解決了微信小程序安卓下只能單選分享的問

個人公眾號-技術博

term log fff images 文章 更多 進步 技術博客 分享 個人技術博客部分在微信號上面,請掃一下關註,後續更新更多文章,共同學習進步個人微信公眾號-技術博客

小程序實現張圖片同時上傳的方法

地址 complete 就是 name func pre files success fun 對於微信小程序上傳圖片其實很麻煩的,每次只能上傳一張,所有很多朋友就會問想要多張圖片上傳怎麽辦?這裏使用遞歸,當上傳完一張圖片後重新執行這個函數,直到所有的圖片都上傳完成後,就不再

小程序之列表的顯示和隱藏功能(附源碼)

初始 hat 思考 控制 inf 效果圖 b-s 分享 ado 今天在項目碰到一個問題,之前在項目首頁實現單列表的顯示和隱藏,通過wx:if判斷就可實現,現在要實現多列表的單項顯示和隱藏功能應該如何實現呢?如果還用wx:if實現的話會出現點擊一個列表項,多個列表同時顯示