小程式登入的一些簡單步驟

2022-08-09 05:33:12 字數 495 閱讀 9457

1.wx.login請求獲取code;

2.3.點選允許;

4.呼叫wx.getuserinfo,得到使用者的相關加密資訊(encrypteddata,iv);

5.在success中請求介面得到token相關資料;

登入(wx.login都是在onshow中請求)--獲取token的兩條線路:

a.含遊客模式

1)直接通過code先請求介面得到token;

2)進行相關瀏覽;

3)到下單等介面的時候回跳登入,使用者授權,getuserinfo,請求介面更新使用者型別及token;

b.無遊客模式

1)登入wx.login;

2)頁面登入button觸發wx.getuserinfo,得到iv,encrypteddata;

3)通過1.2得到的值訪問token介面,再跳轉首頁;

login.service:登入邏輯寫成乙個服務在login頁面呼叫;

login.js:.....

登入MYSQL的簡單步驟,新手上路

1.首先先進入到本地的phpstudy目錄 進入到mysql bin中 登入mysql mysql u root p 密碼 成功登入 列出所有資料庫 mysql show database 切換資料庫 mysql use 資料庫名 列出所有表 mysql show tables 顯示資料表結構 my...

一些C 的小程式(一)

輸出hello word include using namespace std int main 查詢int的空間大小 include using namespace std int main 定義列舉型別,輸出比賽結果 include using namespace std enum gamer...

一些C C 的演算法小程式

1,列印ascii字元 include include using namespace std class table void ascii protected int i void table ascii printf the number of 0 in the end of 100 is d....