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
Nov 10, 2020
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
login
=
()
=>
{
const
app
=
getApp
()
const
app
=
getApp
()
let
mingUserId
=
dd
.
getStorageSync
({
key
:
'mingUserId'
}).
data
let
mingUserId
=
dd
.
getStorageSync
({
key
:
'mingUserId'
}).
data
let
username
=
dd
.
getStorageSync
({
key
:
'username'
}).
data
// 有token
// 有token
if
(
dd
.
getStorageSync
({
key
:
'token'
}).
data
&&
dd
.
getStorageSync
({
key
:
'token'
}).
data
.
access_token
)
{
if
(
dd
.
getStorageSync
({
key
:
'token'
}).
data
&&
dd
.
getStorageSync
({
key
:
'token'
}).
data
.
access_token
)
{
let
hasToken
=
dd
.
getStorageSync
({
key
:
'token'
}).
data
;
// token
let
hasToken
=
dd
.
getStorageSync
({
key
:
'token'
}).
data
;
// token
...
@@ -92,8 +93,8 @@ const login = () => {
...
@@ -92,8 +93,8 @@ const login = () => {
'Content-Type'
:
'application/x-www-form-urlencoded'
'Content-Type'
:
'application/x-www-form-urlencoded'
},
},
data
:
{
data
:
{
username
:
mingUserId
,
username
:
username
,
password
:
mingUserId
,
password
:
username
,
scope
:
'server'
,
scope
:
'server'
,
grant_type
:
'password'
grant_type
:
'password'
},
},
...
...
pages/action/action.js
View file @
982598af
...
@@ -54,25 +54,25 @@ Page({
...
@@ -54,25 +54,25 @@ Page({
method
:
'POST'
,
method
:
'POST'
,
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
data
.
resultCode
==
0
)
{
if
(
res
.
data
.
resultCode
==
0
)
{
const
data
=
res
.
data
.
data
const
data
=
res
.
data
.
data
dd
.
setStorageSync
({
dd
.
setStorageSync
({
key
:
'
name'
,
key
:
'user
name'
,
data
:
data
.
oapiUser
.
name
data
:
data
.
user
name
})
})
dd
.
setStorageSync
({
dd
.
setStorageSync
({
key
:
'mingUserId'
,
key
:
'mingUserId'
,
data
:
data
.
mingUserId
data
:
data
.
mingUserId
})
})
dd
.
setStorageSync
({
dd
.
setStorageSync
({
key
:
'userId'
,
key
:
'userId'
,
data
:
data
.
oapiUser
.
userid
data
:
data
.
oapiUser
.
userid
})
})
dd
.
setStorageSync
({
dd
.
setStorageSync
({
key
:
'avatar'
,
key
:
'avatar'
,
data
:
data
.
oapiUser
.
avatar
data
:
data
.
oapiUser
.
avatar
})
})
$login
.
login
()
$login
.
login
()
}
}
else
if
(
res
.
data
.
resultCode
==
4003
)
{
else
if
(
res
.
data
.
resultCode
==
4003
)
{
dd
.
alert
({
dd
.
alert
({
...
...
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'
,
};
},
});
pages/index/index.js
View file @
982598af
...
@@ -12,7 +12,8 @@ create.Page({
...
@@ -12,7 +12,8 @@ create.Page({
// store: exampleStore,
// store: exampleStore,
avatar
:
''
,
avatar
:
''
,
realityBalance
:
''
,
realityBalance
:
''
,
cardNo
:
''
cardNo
:
''
,
maxClickCount
:
0
},
},
onLoad
(
query
)
{
onLoad
(
query
)
{
dd
.
hideLoading
()
dd
.
hideLoading
()
...
@@ -173,7 +174,7 @@ create.Page({
...
@@ -173,7 +174,7 @@ create.Page({
maxClickCount
--
;
maxClickCount
--
;
if
(
maxClickCount
==
0
)
{
if
(
maxClickCount
==
0
)
{
dd
.
alert
({
dd
.
alert
({
content
:
'0.0.
19
'
content
:
'0.0.
22
'
});
});
maxClickCount
=
5
;
maxClickCount
=
5
;
}
}
...
...
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