關閉→
當前位置:知科普>IT科技>怎麼使用微信掃描二維碼登錄網頁版微信

怎麼使用微信掃描二維碼登錄網頁版微信

知科普 人氣:2.54W

目前,很多軟件都可以使用第三方賬號登入。微信可謂是開闢新徑,微信則使用二維碼掃描登錄。如何使用微信掃描二維碼登錄網頁版微信?

怎麼使用微信掃描二維碼登錄網頁版微信

方法

首先,在桌面上找到360瀏覽器圖標。

怎麼使用微信掃描二維碼登錄網頁版微信 第2張

鼠標右擊,找到“打開”,鼠標單擊一下進入。

怎麼使用微信掃描二維碼登錄網頁版微信 第3張

進入網頁後在搜索欄中輸入“微信網頁版”後,點擊“搜索”。

怎麼使用微信掃描二維碼登錄網頁版微信 第4張

在出來的選項中,選擇帶有“官網”的“微信網頁版”,鼠標單擊進入。

怎麼使用微信掃描二維碼登錄網頁版微信 第5張

此時網頁頁面會出現一個二維碼圖案,這時需要使用手機進行掃描。

怎麼使用微信掃描二維碼登錄網頁版微信 第6張

掃描完成後,你的微信頭像會顯示出來,然後需要在手機上確認登錄。

怎麼使用微信掃描二維碼登錄網頁版微信 第7張

最後可以看見成功登錄了網頁版微信,你可以根據需要發送文件或者和好友聊天了。

怎麼使用微信掃描二維碼登錄網頁版微信 第8張

擴展閲讀,以下內容您可能還感興趣。

如何使用java實現二維碼掃描登錄微信網頁版(微信端)?

jsp+spring+struts2+mybatis:

模仿微信pc網頁版掃碼登錄

使用js代碼生成qrcode二維碼減輕服務器壓力

js循環請求服務端,判斷是否qrcode被掃

二維碼超時失效功能

二維碼被掃成功登錄,服務端產生sessionId,傳到頁面使用js保存cookie

多線程

### 生成qrcode相關js jquery.qrcode.js - ### 代碼 “

請使用手機掃碼

//生成二維碼 

!function(){ 

var uuid = (“#uuid”).val();

var content;

content = “……….do?uuid=”+uuid;

//console.dir(content);(‘.pc_qr_code’).qrcode({ 

render:”canvas”, 

width:200, 

height:200, 

correctLevel:0, 

text:content, 

background:”#ffffff”, 

foreground:”black”, 

src:”/logo.png” 

}); 

setCookie(“sid”, 123, -1*60*60*1000); 

keepPool();//自動循環調用 

}();

   function keepPool(){

       var uuid = $("#uuid").val();

       $.get(ctx+"/web/login/pool.do",{uuid:uuid,},function(msg){//如果放入一個不存在的網址怎麼辦?

           //console.log(msg);

           if(msg.successFlag == '1'){

               $("#result").html("掃碼成功");

               setCookie(msg.data.cname, msg.data.cvalue, 3*60*60*1000);

               //alert("將跳轉...");

               window.location.href = ctx +"/webstage/login/success.do";

           }else if(msg.successFlag == '0'){

               $("#result").html("該二維碼已經失效,請重新獲取");

           }else{

               keepPool();

           }

       });

   }

   //設置cookie

   function setCookie(cname, cvalue, expireTime) {

    var d = new Date();

    d.setTime(d.getTime() + expireTime);//設置過期時間

    var expires = "expires="+d.toUTCString();

    var path = "path=/"

    document.cookie = cname + "=" + cvalue + "; " + expires + "; " + path;

   }

java代碼

//二維碼首頁public String index() {        try {

           uuid = UUID.randomUUID().toString();            super.getRequest().setAttribute("uuid", uuid);

           ScanPool pool = new ScanPool();

           pool.setCreateTime(System.currentTimeMillis());

           Map<String, ScanPool> map = new HashMap<String, ScanPool>(1);

           map.put(uuid, pool);

           PoolCache.cacheMap.put(uuid, pool);

           pool = null;

       } catch (Exception e) {

           Log4jUtil.CommonLog.error("pc生成二維碼登錄", e);

       }        return "index";

   }//判斷二維碼是否被掃描public void pool() {

       DataResultInfo result = null;

       System.out.println("檢測[   " + uuid + "   ]是否登錄");

       ScanPool pool = null;

       if(MapUtils.isNotEmpty(PoolCache.cacheMap)) pool = PoolCache.cacheMap.get(uuid);        try {            if (pool == null) {                // 掃碼超時,進線程休眠

               result = DataResultInfo.getInstance().failure();

               result.setSuccessFlag(CommonConstant.Zero);

               result.setExtension(CommonConstant.Zero, "該二維碼已經失效,請重新獲取");

               Thread.sleep(10 * 1000L);

           } else {                // 使用計時器,固定時間後不再等待掃描結果--防止頁面訪問超時

               new Thread(new ScanCounter(uuid, pool)).start();                boolean scanFlag = pool.getScanStatus(); //這裏得到的ScanPool(時間靠前)和用户使用手機掃碼後得到的不是一個,用户掃碼後又重新更新了ScanPool對象,並重新放入了redis中,,所以這裏要等待上面的計時器走完,才能獲得最新的ScanPool

               if (scanFlag) {

                   result = DataResultInfo.getSuccess();                    // 根據e69da5e887aae799bee5baa6e997aee7ad9431333363396465uuid從redis中獲取pool對象,得到對應的sessionId,返給頁面,通過js存cookie中

                   JSONObject jsonObj = new JSONObject();

                   jsonObj.put("cname", CookieConstant.SESSION_KEY);

                   jsonObj.put("cvalue", pool.getSession());

                   result.setData(jsonObj);

               } else {

                   result = DataResultInfo.getInstance().failure();

                   result.setMessage("等待掃描");

               }

           }

       } catch (Exception e) {

           e.printStackTrace();

       }

       sendJsonMessage(result);

   }//手機掃碼接口(以id和token作為用户身份登錄)

public String phoneScanLogin() {

       DataResultInfo result = null;

        ScanPool pool = null;

        if(MapUtils.isNotEmpty(PoolCache.cacheMap)) pool = PoolCache.cacheMap.get(uuid);        try {            if (pool == null) {

               result = DataResultInfo.getInstance().failure();

               result.setMessage("該二維碼已經失效,請重新獲取");

           } else {                if (StringUtils.isNotEmpty(id) && StringUtils.isNotEmpty(token)) {                    //根據id和token查詢後台,獲取用户信息userBean

                   String redisToken = redisUtil.getRedis(RedisKeyConstant.APP_TOKEN+userId);                    if(redisToken != null && redisToken.equals(token)){

                  UserBean userBean = userService.findByUserId(Long.valueOf(userId));                       if (userBean != null) {

                           String sessionId = SessionConstant.SESSION_ID_PRE

                                   + FormatUtils.password(userBean.getId()

                                           .toString());

                           Map<String, String> cookieSession = new HashMap<String, String>();

                           cookieSession

                           .put(CookieConstant.SESSION_KEY, sessionId);                            // WrCookie.writeCookie(getResponse(),cookieSession);

                           // 添加用户信息到redis

                           boolean re = redisUtil.addUserInfo( RedisKeyConstant.SESSION + sessionId, BeanUtils.toBean(userBean, UserInfo.class));

                           getSession().setAttribute( SessionConstant.USER_INFO_WEB, BeanUtils.toBean(userBean, UserInfo.class));

                           getSession().setAttribute( DomainConstant.USER_CENTER_KEY, DomainConstant.USER_CENTER);

                           pool.setSession(sessionId);

                           pool.scanSuccess();

                       }else{

                           result = DataResultInfo.getInstance().failure();

                           result.setMessage("用户信息獲取異常!請稍後再試");

                       }

                   } else {

                       result = DataResultInfo.getInstance().failure();

                       result.setExtension("11", "用户身份信息失效,請重新登錄!");

                   }

               } else {

                   result = DataResultInfo.getInstance().failure();

                   result.setMessage("請求參數有誤!");                    return "error";

               }                // 不能清除,否則conn方法得不到pool對象,不會進入線程休眠

               // System.out.println("清除掃描過的uuid");

               //PoolCache.cacheMap.remove(uuid);

           }

       } catch (Exception e) {

           Log4jUtil.CommonLog.error("手機掃碼 後訪問 異常", e);

       }

       sendJsonMessage(result);        return null;

   }//掃碼成功跳轉頁

public String success() {

       String sessionId = WrCookie.getCookie(super.getRequest(), CookieConstant.SESSION_KEY);

       UserInfo userInfo = redisUtil.getUserInfo(RedisKeyConstant.SESSION + sessionId);       super.getRequest().setAttribute(SessionConstant.USER_INFO_WEB, userInfo);        return SUCCESS;

   }//線程判斷二維碼是否超時class ScanCounter implements Runnable {    public Long timeout = 30 * 1000L; //超時時長

   // 傳入的對象

   private String uuid;    private ScanPool scanPool;    public ScanCounter(String p, ScanPool scanPool) {

       uuid = p;        this.scanPool = scanPool;

   }    @Override

   public void run() {        try {

           Thread.sleep(timeout);

       } catch (InterruptedException e) {

           e.printStackTrace();

       }

       notifyPool(uuid, scanPool);

   }    public synchronized void notifyPool(String uuid, ScanPool scanPool) {        if (scanPool != null) scanPool.notifyPool();

   }    public String getUuid() {        return uuid;

   }    public void setUuid(String uuid) {        this.uuid = uuid;

   }    public ScanPool getScanPool() {        return scanPool;

   }    public void setScanPool(ScanPool scanPool) {        this.scanPool = scanPool;

   }

}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166

ScanPool.java(存放uuid的bean)

public class ScanPool implements Serializable{

   /**

    * @Fields serialVersionUID : TODO(用一句話描述這個變量表示什麼)

    */

   private static final long serialVersionUID = -9117921544228636689L;    private Object session ;    //創建時間  

   private Long createTime = System.currentTimeMillis();  

   //登錄狀態  

   private boolean scanFlag = false;  

   public boolean isScan(){  

       return scanFlag;  

   }  

   public void setScan(boolean scanFlag){  

       this.scanFlag = scanFlag;

   }

   /**

    * 獲取掃描狀態,如果還沒有掃描,則等待固定秒數

    * @param wiatSecond 需要等待的秒數

    * @return

    */  

   public synchronized boolean getScanStatus(){  

       try  

       {  

           if(!isScan()){ //如果還未掃描,則等待  

               this.wait();  

           }  

           if (isScan())  

           {   System.err.println("手機掃描完成設置getScanStatus..true...........");                return true;  

           }  

       } catch (InterruptedException e)  

       {  

           e.printStackTrace();  

       }  

       return false;  

   }  

   /**

    * 掃碼之後設置掃碼狀態

    * @param token

    * @param id

    */  

   public synchronized void scanSuccess(){  

       try  

       {  System.err.println("手機掃描完成setScan(true)....同時釋放notifyAll(手機掃碼時,根據uuid獲得的scanpool對象)");

           setScan(true);

           this.notifyAll();  

       } catch (Exception e)  

       {  

           // TODO Auto-generated catch block  

           e.printStackTrace();  

       }  

   }  

   public synchronized void notifyPool(){  

       try  

       {  

           this.notifyAll();  

       } catch (Exception e)  

       {  

           // TODO Auto-generated catch block  

           e.printStackTrace();  

       }  

   }  

   /***********************************************/

   public Long getCreateTime()  

   {  

       return createTime;  

   }  

   public void setCreateTime(Long createTime)  

   {  

       this.createTime = createTime;  

   }    public Object getSession() {        return session;

   }    public void setSession(Object session) {        this.session = session;

   }

電腦版微信不用掃描二維碼怎麼登錄

1、需要在電腦中下載安裝“安卓模擬器”和“微信安卓版”,安卓模擬器大家百度搜索一下,可以找到很多。下面我們這裏使用的是“東東手遊助手”,在電腦中打開下載安裝的【東東手遊助手】,然後在zhidao【我的應用】中,點擊【安裝本地應用】,然後打開下載的【微信安卓版】進行安裝;

2、在安卓模擬器中安裝微信安卓版成功後,就可以點擊【啟動】打開微信了;

3、接下來會彈出微信登陸界面,登陸界面不同微信網頁版,而是很手機版回基本相同,我們直接點擊左下角的【登陸】;

4、再接下來我們看到的默認是手機號登陸,無需使用二維碼。如果手機在身答邊,可以接受驗證碼的話,可以直接使用手機號登陸,然後獲取短信驗證完成登陸。如果手機不在身邊或者丟了,我們還可以點擊下方的【使用其他方式登陸】。

微信登錄電腦版不掃二維碼怎麼登陸

打開百度,搜索天天模擬器,進入天天模擬器官網

點擊官網裏面的”百立即下載“,跳出“新建下載任務”框。

點擊“新建下載任務”框裏面的“瀏覽”選擇把文件下載到電度腦的哪一個地方

《一般默認的都是下載到電腦C盤,但是下載到C盤會很佔電腦,導致電腦反應變遲鈍問,所以建議下載到電腦的其他盤裏面,D、E、F盤都可以》

文件下載好後,點擊“打開文件夾”就可以看見天天模擬器的圖標

咱們再用鼠標左鍵雙擊圖標,出現如圖所示,點擊“運行(答R)

點擊“運行”出現如圖所示的框,點擊”開始下載“

如果出現如圖類似的東西,請點擊右下角的“繼續版下載”,(如果沒有請忽權略這一步)

8

下載完成後,再按照提示完成操作,桌面就會有“天天模擬器的圖標”了,雙擊圖標

微信網頁版怎麼用賬號登陸

1、手機登錄自己的私人微信號;

2、電腦瀏覽來器打開微信網頁版登錄頁面;

3、打開手機微信上的“掃一掃”功能,對準網頁版二維碼掃描;

4、掃描成功,請到手機微信上確認登錄源網頁版,確認好了之後,網頁版就會自動加載你微信信息;

5、登錄成功,可以直接向好友或者微信羣發送消息zhidao。

温馨提醒:微信網頁版沒有朋友圈功能,而且對話列表不會顯示公眾號發來的信息。

電腦版微信怎麼掃描二維碼

告訴你個十分管用的方法,

我的來是2.7.0,版本有點老,不過好用。首先要至少有兩個圖,其中一個是你要識別的圖,另一個隨源便。把這兩個圖分開發給任意一個人或微信傳輸助手。百你要點開沒用的那個圖,也就是隨便找的那個圖。點開後,右鍵,有四個選項,然後,移動鼠標度,不要管這四個東西,鼠標移動到圖片右側或左側(這個要根據你發圖知片的順序,反正是要點到要識別的圖),點擊切換上一張或下一張,就來到了要識別道的圖了。離成功僅差一步:右鍵,點開你就有驚喜。

望採納,謝謝!

TAG標籤:#網頁 #版微信 #登錄 #微信 #二維碼 #