From d8cca8b372e2a932f0b204c5d172ade978bf81b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Fri, 16 Sep 2022 16:39:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9F=BA=E4=BA=8E=20@xiaochangbai=20?= =?UTF-8?q?=E8=80=81=E5=93=A5=E7=9A=84=E4=BB=A3=E7=A0=81=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E4=BA=86=E4=B8=80=E7=82=B9=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 看到老哥有引入其他的qr插件,在项目里面本身自带了一个,稍微改了一下部分样式 https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp/pulls/3 --- api/login.js | 17 +++ pages.json | 16 +- pages/passport/scannerCodeLoginConfirm.vue | 164 +++++++++++++++++++++ pages/tabbar/home/views.vue | 12 ++ 4 files changed, 206 insertions(+), 3 deletions(-) create mode 100644 pages/passport/scannerCodeLoginConfirm.vue diff --git a/api/login.js b/api/login.js index 7a07d2d..5add383 100644 --- a/api/login.js +++ b/api/login.js @@ -91,3 +91,20 @@ export function logout () { needToken: true, }) } + +export function scannerCodeLogin(params){ + return http.request({ + url: '/passport/member/app_scanner', + method: "POST", + params, + needToken: true, + }); +} +export function scannerCodeLoginConfirm(params){ + return http.request({ + url: '/passport/member/app_confirm', + method: "POST", + params, + needToken: true, + }); +} diff --git a/pages.json b/pages.json index 115501b..6838480 100644 --- a/pages.json +++ b/pages.json @@ -244,6 +244,8 @@ "navigationBarTitleText": "面容登录" } }, + + { "path": "set/securityCenter/editPassword", "style": { @@ -455,6 +457,14 @@ "navigationStyle": "custom", "navigationBarTextStyle": "black" } + }, + { + "path": "scannerCodeLoginConfirm", + "style": { + "navigationBarTitleText": "扫码登录", + "navigationStyle": "custom", + "navigationBarTextStyle": "black" + } } ] @@ -465,8 +475,8 @@ "pages": [ { "path": "seckill", "style": { - "navigationBarTitleText": "限时抢购", - "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTitleText": "限时抢购", + "navigationStyle": "custom", // 隐藏系统导航栏 "navigationBarTextStyle": "white" , "app-plus": { "titleNView": { @@ -480,7 +490,7 @@ "path": "joinGroup", "style": { "navigationBarTitleText": "拼团活动", - "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationStyle": "custom", // 隐藏系统导航栏 "navigationBarTextStyle": "white" , "app-plus": { // 将回弹属性关掉 diff --git a/pages/passport/scannerCodeLoginConfirm.vue b/pages/passport/scannerCodeLoginConfirm.vue new file mode 100644 index 0000000..66ec5b1 --- /dev/null +++ b/pages/passport/scannerCodeLoginConfirm.vue @@ -0,0 +1,164 @@ + + + + + diff --git a/pages/tabbar/home/views.vue b/pages/tabbar/home/views.vue index 39c7e6d..414a9ec 100644 --- a/pages/tabbar/home/views.vue +++ b/pages/tabbar/home/views.vue @@ -146,6 +146,18 @@ export default { uni.scanCode({ success: function (res) { let path = encodeURIComponent(res.result); + + + + if(path!=undefined && path.indexOf("QR_CODE_LOGIN_SESSION")==0){ + console.log(path) + //app扫码登录 + uni.navigateTo({ + url:"/pages/passport/scannerCodeLoginConfirm?token="+path + }); + return; + } + // WX_CODE 为小程序码 if (res.scanType == "WX_CODE") {