Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mingPayMobile
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
fengzhaoyu
mingPayMobile
Commits
982598af
Commit
982598af
authored
4 years ago
by
fengzhaoyu
Browse files
Options
Browse Files
Download
Plain Diff
合并ISV分支 dev是线上分支
parents
aaa76a65
5a3d1b64
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
95 additions
and
22 deletions
+95
-22
login.js
API/login.js
+3
-2
action.js
pages/action/action.js
+18
-18
externalContact.js
pages/externalContact/externalContact.js
+71
-0
index.js
pages/index/index.js
+3
-2
No files found.
API/login.js
View file @
982598af
const
login
=
()
=>
{
const
app
=
getApp
()
let
mingUserId
=
dd
.
getStorageSync
({
key
:
'mingUserId'
}).
data
let
username
=
dd
.
getStorageSync
({
key
:
'username'
}).
data
// 有token
if
(
dd
.
getStorageSync
({
key
:
'token'
}).
data
&&
dd
.
getStorageSync
({
key
:
'token'
}).
data
.
access_token
)
{
let
hasToken
=
dd
.
getStorageSync
({
key
:
'token'
}).
data
;
// token
...
...
@@ -92,8 +93,8 @@ const login = () => {
'Content-Type'
:
'application/x-www-form-urlencoded'
},
data
:
{
username
:
mingUserId
,
password
:
mingUserId
,
username
:
username
,
password
:
username
,
scope
:
'server'
,
grant_type
:
'password'
},
...
...
This diff is collapsed.
Click to expand it.
pages/action/action.js
View file @
982598af
...
...
@@ -54,25 +54,25 @@ Page({
method
:
'POST'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
if
(
res
.
data
.
resultCode
==
0
)
{
if
(
res
.
data
.
resultCode
==
0
)
{
const
data
=
res
.
data
.
data
dd
.
setStorageSync
({
key
:
'
name'
,
data
:
data
.
oapiUser
.
name
})
dd
.
setStorageSync
({
key
:
'mingUserId'
,
data
:
data
.
mingUserId
})
dd
.
setStorageSync
({
key
:
'userId'
,
data
:
data
.
oapiUser
.
userid
})
dd
.
setStorageSync
({
key
:
'avatar'
,
data
:
data
.
oapiUser
.
avatar
})
$login
.
login
()
dd
.
setStorageSync
({
key
:
'user
name'
,
data
:
data
.
user
name
})
dd
.
setStorageSync
({
key
:
'mingUserId'
,
data
:
data
.
mingUserId
})
dd
.
setStorageSync
({
key
:
'userId'
,
data
:
data
.
oapiUser
.
userid
})
dd
.
setStorageSync
({
key
:
'avatar'
,
data
:
data
.
oapiUser
.
avatar
})
$login
.
login
()
}
else
if
(
res
.
data
.
resultCode
==
4003
)
{
dd
.
alert
({
...
...
This diff is collapsed.
Click to expand it.
pages/externalContact/externalContact.js
0 → 100644
View file @
982598af
const
app
=
getApp
()
import
create
from
'dd-store'
import
exampleStore
from
'/stores/exampleStore'
import
$http
from
'./../../API/http'
create
.
Page
({
store
:
exampleStore
,
useAll
:
true
,
data
:
{
query
:
''
},
onLoad
(
query
)
{
console
.
log
(
query
.
index
,
'query'
)
this
.
setData
({
query
:
query
.
index
})
dd
.
setNavigationBar
({
title
:
'外部联系人'
,
});
},
onReady
()
{
const
_that
=
this
dd
.
chooseExternalUsers
({
multiple
:
false
,
//是否多选 true多选,false单选,默认是单选
limitTips
:
"请单选"
,
success
:
function
(
res
)
{
if
(
_that
.
data
.
query
==
0
)
{
_that
.
store
.
data
.
visitorName
=
res
[
0
].
name
_that
.
store
.
data
.
selectVisitors
=
false
_that
.
update
()
}
else
{
_that
.
store
.
data
.
visitorPeer
[
_that
.
data
.
query
-
1
].
name
=
res
[
0
].
name
_that
.
store
.
data
.
selectVisitors
=
false
_that
.
update
()
}
dd
.
navigateBack
({
delta
:
1
})
},
fail
:
function
(
err
)
{
_that
.
store
.
data
.
selectVisitors
=
false
dd
.
navigateBack
({
delta
:
1
})
}
});
},
onShow
()
{
// 页面显示
},
onHide
()
{
// 页面隐藏
},
onUnload
()
{
// 页面被关闭
},
onTitleClick
()
{
// 标题被点击
},
onReachBottom
()
{
},
onShareAppMessage
()
{
// 返回自定义分享信息
return
{
title
:
'My App'
,
desc
:
'My App description'
,
path
:
'pages/index/index'
,
};
},
});
This diff is collapsed.
Click to expand it.
pages/index/index.js
View file @
982598af
...
...
@@ -12,7 +12,8 @@ create.Page({
// store: exampleStore,
avatar
:
''
,
realityBalance
:
''
,
cardNo
:
''
cardNo
:
''
,
maxClickCount
:
0
},
onLoad
(
query
)
{
dd
.
hideLoading
()
...
...
@@ -173,7 +174,7 @@ create.Page({
maxClickCount
--
;
if
(
maxClickCount
==
0
)
{
dd
.
alert
({
content
:
'0.0.
19
'
content
:
'0.0.
22
'
});
maxClickCount
=
5
;
}
...
...
This diff is collapsed.
Click to expand it.
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