Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cxerpapp
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
李苏
cxerpapp
Commits
f3f1ae77
Commit
f3f1ae77
authored
Feb 11, 2022
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
6b99c952
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
66 deletions
+74
-66
main.js
main.js
+2
-0
pages.json
pages.json
+2
-0
cusmerLogin.vue
pages/login/cusmerLogin.vue
+66
-63
login.vue
pages/login/login.vue
+3
-2
people.vue
pages/user/people.vue
+1
-1
No files found.
main.js
View file @
f3f1ae77
...
@@ -9,6 +9,8 @@ import {RouterMount} from './plugin/uni-simple-router/index.js'
...
@@ -9,6 +9,8 @@ import {RouterMount} from './plugin/uni-simple-router/index.js'
console
.
log
(
"main"
)
console
.
log
(
"main"
)
// 注册缓存器
// 注册缓存器
Vue
.
use
(
MinCache
,{
timeout
:
6
})
Vue
.
use
(
MinCache
,{
timeout
:
6
})
//判定isCloud
Vue
.
prototype
.
isCloud
=
true
;
// store
// store
Vue
.
prototype
.
$store
=
store
;
Vue
.
prototype
.
$store
=
store
;
// tip
// tip
...
...
pages.json
View file @
f3f1ae77
...
@@ -9,6 +9,8 @@
...
@@ -9,6 +9,8 @@
"path"
:
"pages/login/login"
,
"path"
:
"pages/login/login"
,
"style"
:
{}
"style"
:
{}
},
},
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
{
"path"
:
"pages/index/index"
,
"path"
:
"pages/index/index"
,
...
...
pages/login/cusmerLogin.vue
View file @
f3f1ae77
...
@@ -66,9 +66,9 @@
...
@@ -66,9 +66,9 @@
<!--
<image
src=
"https://static.jeecg.com/upload/test/login4_1595818039175.png"
mode=
"aspectFit"
class=
"round"
></image>
-->
<!--
<image
src=
"https://static.jeecg.com/upload/test/login4_1595818039175.png"
mode=
"aspectFit"
class=
"round"
></image>
-->
<view
class=
"gray-text"
>
登录中...
</view>
<view
class=
"gray-text"
>
登录中...
</view>
</view>
</view>
<view
@
tap=
"changErp()"
style=
"position: absolute;bottom: 20px;right: 10px;text-decoration:underline"
>
<
!--
<
view
@
tap=
"changErp()"
style=
"position: absolute;bottom: 20px;right: 10px;text-decoration:underline"
>
切换到格物erp登录
切换到格物erp登录
</view>
</view>
-->
</view>
</view>
</
template
>
</
template
>
...
@@ -112,6 +112,7 @@
...
@@ -112,6 +112,7 @@
},
},
onLoad
:
function
(
da
){
onLoad
:
function
(
da
){
this
.
isCloud
=
true
if
(
da
&&
da
.
query
){
if
(
da
&&
da
.
query
){
let
infor
=
JSON
.
parse
(
da
.
query
).
infor
let
infor
=
JSON
.
parse
(
da
.
query
).
infor
this
.
userName
=
infor
.
userName
this
.
userName
=
infor
.
userName
...
@@ -144,10 +145,31 @@
...
@@ -144,10 +145,31 @@
// #endif
// #endif
},
},
watch
:{
watch
:{
loginBz
:
function
(
val
){
},
computed
:
{
isSendSMSEnable
()
{
return
this
.
smsCountDown
<=
0
&&
this
.
phoneNo
.
length
>
4
;
},
getSendBtnText
()
{
if
(
this
.
smsCountDown
>
0
)
{
return
this
.
smsCountDown
+
'秒后发送'
;
}
else
{
return
'发送验证码'
;
}
},
canSMSLogin
()
{
return
this
.
userName
.
length
>
4
&&
this
.
smsCode
.
length
>
4
;
},
canPwdLogin
()
{
return
this
.
userName
.
length
>
4
&&
this
.
password
.
length
>
4
;
},
},
methods
:
{
...
mapActions
([
"mLogin"
,
"PhoneLogin"
,
"ThirdLogin"
]),
// 二次登录
loginT
(){
let
_this
=
this
;
let
_this
=
this
;
http
.
config
.
baseUrl
=
"http://192.168.20.214:9090/erp"
;
http
.
config
.
baseUrl
=
"http://localhost:9090/erp"
;
if
(
val
){
this
.
$http
.
post
(
this
.
loginurl
,{}).
then
((
resp
)
=>
{
this
.
$http
.
post
(
this
.
loginurl
,{}).
then
((
resp
)
=>
{
if
(
resp
.
data
.
success
){
if
(
resp
.
data
.
success
){
console
.
log
(
"success"
)
console
.
log
(
"success"
)
...
@@ -201,29 +223,8 @@
...
@@ -201,29 +223,8 @@
this
.
$tip
.
alert
(
resp
.
data
.
message
||
"登录失败"
);
this
.
$tip
.
alert
(
resp
.
data
.
message
||
"登录失败"
);
}
}
})
})
}
}
},
computed
:
{
isSendSMSEnable
()
{
return
this
.
smsCountDown
<=
0
&&
this
.
phoneNo
.
length
>
4
;
},
getSendBtnText
()
{
if
(
this
.
smsCountDown
>
0
)
{
return
this
.
smsCountDown
+
'秒后发送'
;
}
else
{
return
'发送验证码'
;
}
},
canSMSLogin
()
{
return
this
.
userName
.
length
>
4
&&
this
.
smsCode
.
length
>
4
;
},
canPwdLogin
()
{
return
this
.
userName
.
length
>
4
&&
this
.
password
.
length
>
4
;
},
},
},
methods
:
{
...
mapActions
([
"mLogin"
,
"PhoneLogin"
,
"ThirdLogin"
]),
changErp
(){
changErp
(){
this
.
$Router
.
replaceAll
({
name
:
'login'
})
this
.
$Router
.
replaceAll
({
name
:
'login'
})
},
},
...
@@ -240,7 +241,7 @@
...
@@ -240,7 +241,7 @@
onLogin
:
function
(){
onLogin
:
function
(){
// http.config.baseUrl='http://'+this.fwq+'/'+this.dkh
// http.config.baseUrl='http://'+this.fwq+'/'+this.dkh
let
_this
=
this
;
let
_this
=
this
;
http
.
config
.
baseUrl
=
"http://
192.168.20.214
:9080/"
http
.
config
.
baseUrl
=
"http://
localhost
:9080/"
if
(
!
this
.
userName
||
this
.
userName
.
length
==
0
){
if
(
!
this
.
userName
||
this
.
userName
.
length
==
0
){
this
.
$tip
.
toast
(
'请填写用户名'
);
this
.
$tip
.
toast
(
'请填写用户名'
);
return
;
return
;
...
@@ -268,9 +269,11 @@
...
@@ -268,9 +269,11 @@
},
3000
)
},
3000
)
this
.
$http
.
post
(
"/erp/clouderp/cusmer/login"
,
params
).
then
((
resp
)
=>
{
this
.
$http
.
post
(
"/erp/clouderp/cusmer/login"
,
params
).
then
((
resp
)
=>
{
if
(
resp
.
data
.
success
){
if
(
resp
.
data
.
success
){
this
.
lo
ginBz
=
tru
e
;
this
.
lo
ading
=
fals
e
;
this
.
loginurl
=
resp
.
data
.
data
.
records
+
"&&tp='1'"
;
this
.
loginurl
=
resp
.
data
.
data
.
records
+
"&&tp='1'"
;
this
.
loginT
()
}
else
{
}
else
{
this
.
loading
=
false
;
this
.
$tip
.
alert
(
resp
.
data
.
message
||
"请求失败"
);
this
.
$tip
.
alert
(
resp
.
data
.
message
||
"请求失败"
);
}
}
})
})
...
...
pages/login/login.vue
View file @
f3f1ae77
...
@@ -76,9 +76,9 @@
...
@@ -76,9 +76,9 @@
<!--
<image
src=
"https://static.jeecg.com/upload/test/login4_1595818039175.png"
mode=
"aspectFit"
class=
"round"
></image>
-->
<!--
<image
src=
"https://static.jeecg.com/upload/test/login4_1595818039175.png"
mode=
"aspectFit"
class=
"round"
></image>
-->
<view
class=
"gray-text"
>
登录中...
</view>
<view
class=
"gray-text"
>
登录中...
</view>
</view>
</view>
<view
@
tap=
"changErp()"
style=
"position: absolute;bottom: 20px;right: 10px;text-decoration:underline"
>
<
!--
<
view
@
tap=
"changErp()"
style=
"position: absolute;bottom: 20px;right: 10px;text-decoration:underline"
>
切换到格物云erp登录
切换到格物云erp登录
</view>
</view>
-->
</view>
</view>
</
template
>
</
template
>
...
@@ -120,6 +120,7 @@
...
@@ -120,6 +120,7 @@
},
},
onLoad
:
function
(
da
){
onLoad
:
function
(
da
){
this
.
isCloud
=
false
if
(
da
&&
da
.
query
){
if
(
da
&&
da
.
query
){
let
infor
=
JSON
.
parse
(
da
.
query
).
infor
let
infor
=
JSON
.
parse
(
da
.
query
).
infor
this
.
userName
=
infor
.
userName
this
.
userName
=
infor
.
userName
...
...
pages/user/people.vue
View file @
f3f1ae77
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<text
class=
"text-grey"
>
设置
</text>
<text
class=
"text-grey"
>
设置
</text>
</view>
</view>
</navigator>
</navigator>
<navigator
style=
""
class=
"cu-item arrow animation-slide-bottom"
:style=
"[
{animationDelay: '0.7s'}]"
url="/pages/login/login"
hover-class="none">
<navigator
style=
""
class=
"cu-item arrow animation-slide-bottom"
:style=
"[
{animationDelay: '0.7s'}]"
:url="isCloud?'/pages/login/login':'/pages/login/cusmerLogin'"
hover-class="none">
<view
class=
"content"
@
click=
"clearToken()"
>
<view
class=
"content"
@
click=
"clearToken()"
>
<text
class=
"cuIcon-exit text-cyan"
></text>
<text
class=
"cuIcon-exit text-cyan"
></text>
<text
class=
"text-grey"
>
退出
</text>
<text
class=
"text-grey"
>
退出
</text>
...
...
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