Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨建斌
/
dy-wx2
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
fdb4f2b8
authored
2019-10-16 23:02:48 +0800
by
fuenxin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update getUrl
1 parent
83954b2c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
js/controller/mainController.js
js/controller/mainController.js
View file @
fdb4f2b
...
...
@@ -4,6 +4,14 @@ angular.module('myApp')
$rootScope
.
isRendBike
=
false
;
$rootScope
.
isLoadFinish
=
false
;
$scope
.
unfinishOrder
=
{};
var
init
=
function
()
{
// globalService.init();
function
getUrl
(
name
){
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
return
unescape
(
r
[
2
]);
return
null
;
}
var
code
=
getUrl
(
'code'
)
var
loginCode
=
function
(
code
)
{
if
(
code
){
...
...
@@ -27,8 +35,8 @@ angular.module('myApp')
content
:
data
.
meta
.
message
,
time
:
1
});
// alert(data.meta.message);
// layer.msg(data.data.error);
// alert(data.meta.message);
// layer.msg(data.data.error);
return
;
}
})
...
...
@@ -42,13 +50,6 @@ angular.module('myApp')
$scope
.
userinfo
.
loginState
=
false
;
}
}
var
init
=
function
()
{
// globalService.init();
function
getUrl
(
name
){
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
return
unescape
(
r
[
2
]);
return
null
;
}
$scope
.
userinfo
=
globalService
.
getData
(
"user"
);
if
(
!
$scope
.
userinfo
)
{
loginCode
()
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment