Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
Compass
Overview
Overview
Details
Activity
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
zong
Compass
Commits
3f989d03
Commit
3f989d03
authored
Mar 14, 2020
by
shijiuyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6341be4a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
35 deletions
+46
-35
index.js
src/wx/pages/index/index.js
+1
-3
register.js
src/wx/pages/register/register.js
+45
-32
No files found.
src/wx/pages/index/index.js
View file @
3f989d03
...
@@ -32,9 +32,7 @@ Page({
...
@@ -32,9 +32,7 @@ Page({
var
location
=
wx
.
getStorageSync
(
'location'
);
var
location
=
wx
.
getStorageSync
(
'location'
);
var
latitude
=
location
.
latitude
;
var
latitude
=
location
.
latitude
;
var
longitude
=
location
.
longitude
;
var
longitude
=
location
.
longitude
;
wx
.
showToast
({
title
:
location
,
})
wx
.
request
({
wx
.
request
({
url
:
app
.
url
+
'ajax_get_user_role.php'
,
url
:
app
.
url
+
'ajax_get_user_role.php'
,
data
:
{
data
:
{
...
...
src/wx/pages/register/register.js
View file @
3f989d03
...
@@ -70,40 +70,53 @@ Page({
...
@@ -70,40 +70,53 @@ Page({
}
}
wx
.
request
({
wx
.
request
({
url
:
app
.
url
+
'ajax_user_register.php'
,
url
:
app
.
url
+
'ajax_get_unionid.php'
,
data
:
{
data
:{
unionId
:
config
.
unionId
,
openid
:
config
.
openId
,
openId
:
config
.
openId
,
iv
:
res
.
iv
,
role
:
that
.
data
.
role
,
encryptedData
:
res
.
encryptedData
name
:
app
.
globalData
.
userInfo
.
nickName
,
headerImg
:
app
.
globalData
.
userInfo
.
avatarUrl
,
schoolNo
:
that
.
data
.
schoolNo
,
classNo
:
that
.
data
.
classNo
,
schoolOwner
:
that
.
data
.
schoolOwner
,
classOwner
:
that
.
data
.
classOwner
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
//跳转到首页
wx
.
switchTab
({
url
:
'../index/index'
,
});
},
},
fail
:
function
(
res
)
{
success
(
resp
){
wx
.
showToast
({
if
(
resp
.
data
.
status
==
'OK'
){
title
:
res
.
data
.
result
.
message
,
wx
.
request
({
icon
:
'success'
,
url
:
app
.
url
+
'ajax_user_register.php'
,
duration
:
2000
data
:
{
});
unionId
:
resp
.
data
.
result
.
unionId
,
//跳转到首页
openId
:
config
.
openId
,
wx
.
switchTab
({
role
:
that
.
data
.
role
,
url
:
'../index/index'
,
name
:
app
.
globalData
.
userInfo
.
nickName
,
});
headerImg
:
app
.
globalData
.
userInfo
.
avatarUrl
,
},
schoolNo
:
that
.
data
.
schoolNo
,
complete
:
function
(
res
)
{
},
classNo
:
that
.
data
.
classNo
,
schoolOwner
:
that
.
data
.
schoolOwner
,
classOwner
:
that
.
data
.
classOwner
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
//跳转到首页
wx
.
switchTab
({
url
:
'../index/index'
,
});
},
fail
:
function
(
res
)
{
wx
.
showToast
({
title
:
res
.
data
.
result
.
message
,
icon
:
'success'
,
duration
:
2000
});
//跳转到首页
wx
.
switchTab
({
url
:
'../index/index'
,
});
},
complete
:
function
(
res
)
{
},
})
}
}
})
})
}
}
})
})
...
...
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