Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李俊赕
self-support
Commits
01078be8
Commit
01078be8
authored
Apr 18, 2023
by
刘文虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改用户授权方式-无需用户授权-code+手机验证码登录
parent
87f94581
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
352 additions
and
401 deletions
+352
-401
App.vue
src/App.vue
+3
-3
common.js
src/common/api/common.js
+10
-1
manifest.json
src/manifest.json
+10
-16
pages.json
src/pages.json
+1
-1
index.vue
src/pages/index/index.vue
+4
-0
learn.vue
src/pages/index/learn.vue
+7
-0
mine.vue
src/pages/index/mine.vue
+5
-1
index - 副本.vue
src/pages/login/index - 副本.vue
+0
-0
index.vue
src/pages/login/index.vue
+304
-372
about.vue
src/pages/mine/about/about.vue
+8
-7
No files found.
src/App.vue
View file @
01078be8
...
@@ -138,9 +138,9 @@ export default {
...
@@ -138,9 +138,9 @@ export default {
this
.
profileSet
(
this
)
this
.
profileSet
(
this
)
this
.
profileAppend
(
this
)
this
.
profileAppend
(
this
)
}
else
{
}
else
{
uni
.
navigateTo
({
//
uni.navigateTo({
url
:
"pages/login/index"
,
//
url: "pages/login/index",
});
//
});
}
}
}
else
{
}
else
{
uni
.
showModal
({
uni
.
showModal
({
...
...
src/common/api/common.js
View file @
01078be8
const
globalUrl
=
process
.
uniEnv
||
{}
const
ucenterApiUrl
=
globalUrl
.
ucenterUrl
.
apiUrl
let
commonApiFun
=
function
(
vm
){
let
commonApiFun
=
function
(
vm
){
/* 登录 */
let
loginWechatAuth
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'/wxh-support-rest/rest/ssoinfo/wxapp/unify/authorization'
,
params
,
{
'content-type'
:
'application/x-www-form-urlencoded'
});
let
loginWechatAuth
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'/wxh-support-rest/rest/ssoinfo/wxapp/unify/authorization'
,
params
,
{
'content-type'
:
'application/x-www-form-urlencoded'
});
/* 2023-04-18 新版登录 */
let
newLoginWechatAuth
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'/wxh-support-rest/rest/ssoinfo/wxapp/unify/authorization/v2'
,
params
,
{
'content-type'
:
'application/x-www-form-urlencoded'
});
/* 发送验证码 */
let
sendCode
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'/wxh-support-rest/rest/ssoinfo/wxapp/sendMessage'
,
params
,
{
'content-type'
:
'application/x-www-form-urlencoded'
});
// 水印-查询用户自定义设置
// 水印-查询用户自定义设置
let
getUserWatermark
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'http://apidoc.banshouhui.com:3000/mock/89/getUserWatermark'
,
params
);
let
getUserWatermark
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'http://apidoc.banshouhui.com:3000/mock/89/getUserWatermark'
,
params
);
// 水印-保存用户自定义设置
// 水印-保存用户自定义设置
...
@@ -9,6 +16,8 @@ let commonApiFun = function(vm){
...
@@ -9,6 +16,8 @@ let commonApiFun = function(vm){
const
commonApi
=
{
const
commonApi
=
{
loginWechatAuth
,
loginWechatAuth
,
newLoginWechatAuth
,
sendCode
,
getUserWatermark
,
getUserWatermark
,
saveUserWatermark
,
saveUserWatermark
,
saveImage
saveImage
...
...
src/manifest.json
View file @
01078be8
{
{
"name"
:
"
自营平台
"
,
"name"
:
"
扳手会
"
,
"appid"
:
"__UNI__05F3AA2"
,
"appid"
:
"__UNI__05F3AA2"
,
"description"
:
""
,
"description"
:
""
,
"versionName"
:
"1.0.0"
,
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
"transformPx"
:
false
,
"networkTimeout"
:
{
"networkTimeout"
:
{
"connectSocket"
:
100000
,
"connectSocket"
:
100000
,
"uploadFile"
:
100000
,
"uploadFile"
:
100000
,
"downloadFile"
:
100000
"downloadFile"
:
100000
},
},
"app-plus"
:
{
"app-plus"
:
{
"optimization"
:
{
"optimization"
:
{
...
@@ -67,7 +67,6 @@
...
@@ -67,7 +67,6 @@
"quickapp"
:
{},
"quickapp"
:
{},
/*
快应用特有相关
*/
/*
快应用特有相关
*/
"mp-weixin"
:
{
"mp-weixin"
:
{
/*
微信小程序特有相关
*/
"appid"
:
"wx402a711597dddbaf"
,
"appid"
:
"wx402a711597dddbaf"
,
"optimization"
:
{
"optimization"
:
{
"subPackages"
:
true
"subPackages"
:
true
...
@@ -78,24 +77,19 @@
...
@@ -78,24 +77,19 @@
"minified"
:
true
"minified"
:
true
},
},
"usingComponents"
:
true
,
"usingComponents"
:
true
,
"permission"
:
{
"scope.userLocation"
:
{
"desc"
:
"方便查看订单与你的距离"
}
},
"requiredPrivateInfos"
:
[
"getLocation"
,
"onLocationChange"
,
"startLocationUpdate"
],
"permission"
:
{
"permission"
:
{
"scope.userLocation"
:
{
"scope.userLocation"
:
{
"desc"
:
"你的位置信息将用于小程序获取所在地与订单地点的距离"
"desc"
:
"你的位置信息将用于小程序获取所在地与订单地点的距离"
}
}
},
},
"requiredPrivateInfos"
:
[
"getLocation"
,
"onLocationChange"
,
"startLocationUpdate"
],
"uniStatistics"
:
{
"uniStatistics"
:
{
"enable"
:
true
"enable"
:
true
},
},
"plugins"
:
{
"plugins"
:
{
"contactPlugin"
:
{
"contactPlugin"
:
{
"version"
:
"1.4.4"
,
"version"
:
"1.4.4"
,
"provider"
:
"wx104a1a20c3f81ec2"
"provider"
:
"wx104a1a20c3f81ec2"
}
}
}
}
},
},
...
...
src/pages.json
View file @
01078be8
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
{
{
"path"
:
"pages/login/index"
,
"path"
:
"pages/login/index"
,
"style"
:
{
"style"
:
{
//
"navigationBarTitleText"
:
"授权登录
"
,
"navigationBarTitleText"
:
"绑定手机
"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
...
...
src/pages/index/index.vue
View file @
01078be8
...
@@ -205,6 +205,10 @@ export default {
...
@@ -205,6 +205,10 @@ export default {
this
.
loaded
=
true
;
this
.
loaded
=
true
;
}
else
{
}
else
{
this
.
loaded
=
true
;
this
.
loaded
=
true
;
if
(
this
.
freshing
)
{
this
.
triggered
=
false
;
this
.
freshing
=
false
;
}
}
}
},
},
loadMessageList
()
{
loadMessageList
()
{
...
...
src/pages/index/learn.vue
View file @
01078be8
...
@@ -787,6 +787,13 @@ export default {
...
@@ -787,6 +787,13 @@ export default {
},
},
//跳转到assessment页面
//跳转到assessment页面
aaa
(
index
)
{
aaa
(
index
)
{
if
(
!
this
.
vuex_token
)
{
uni
.
showToast
({
icon
:
'none'
,
title
:
"请先登录"
})
return
false
;
}
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
//考试完成分成通过、未通过
//考试完成分成通过、未通过
getApp
().
globalData
.
questionTime
=
this
.
examList
[
index
].
questionTime
;
getApp
().
globalData
.
questionTime
=
this
.
examList
[
index
].
questionTime
;
...
...
src/pages/index/mine.vue
View file @
01078be8
...
@@ -272,7 +272,11 @@ export default {
...
@@ -272,7 +272,11 @@ export default {
app
.
getBaseInfo
(
self
);
app
.
getBaseInfo
(
self
);
},
},
handleClick
(
path
,
isWarehouse
)
{
handleClick
(
path
,
isWarehouse
)
{
if
(
this
.
vuex_token
)
{
if
(
path
===
'about/about'
){
this
.
$u
.
route
({
url
:
'pages/mine/'
+
path
});
}
else
if
(
this
.
vuex_token
)
{
// 没入驻不能进入仓配相关页面
// 没入驻不能进入仓配相关页面
if
(
isWarehouse
&&
this
.
needSettled
)
{
if
(
isWarehouse
&&
this
.
needSettled
)
{
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
...
...
src/pages/login/index - 副本.vue
0 → 100644
View file @
01078be8
This diff is collapsed.
Click to expand it.
src/pages/login/index.vue
View file @
01078be8
This diff is collapsed.
Click to expand it.
src/pages/mine/about/about.vue
View file @
01078be8
...
@@ -40,13 +40,14 @@
...
@@ -40,13 +40,14 @@
},
},
methods
:
{
methods
:
{
handleClick
(
path
)
{
handleClick
(
path
)
{
if
(
this
.
vuex_token
)
{
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/mine/'
+
path
url
:
'pages/mine/'
+
path
})
})
}
else
{
// if(this.vuex_token) {
this
.
$u
.
route
({
url
:
"pages/login/index"
})
}
// } else {
// this.$u.route({url: "pages/login/index"})
// }
},
},
}
}
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment