Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
e476cdb9
Commit
e476cdb9
authored
Dec 19, 2019
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
d28d973d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
333 additions
and
13 deletions
+333
-13
.gitignore
+3
-0
xgg-web/app/base/wxapplet/applet.base.js
+5
-5
xgg-web/app/base/wxapplet/impl/chuangfuApplet.js
+314
-0
xgg-web/app/base/wxapplet/impl/xggApplet.js
+11
-8
No files found.
.gitignore
0 → 100644
View file @
e476cdb9
xgg-web/node_modules/
.idea/*
\ No newline at end of file
xgg-web/app/base/wxapplet/applet.base.js
View file @
e476cdb9
...
...
@@ -5,7 +5,7 @@ var path = require('path');
var
http
=
require
(
"http"
);
var
request
=
require
(
'request'
);
class
AppletBase
{
constructor
()
{
constructor
(
config
)
{
this
.
db
=
system
.
getObject
(
"db.connection"
).
getCon
();
this
.
cacheManager
=
system
.
getObject
(
"db.cacheManager"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
...
...
@@ -14,10 +14,10 @@ class AppletBase {
// appid: "wx3fa4626b74d1e944",
// secret: "238cdac5b7d3102a367e2eafc0eaa5da"
// };
this
.
wxConfig
=
{
appid
:
"wx427b4e988444908f"
,
secret
:
"3d092eb22c3451618a9c0656b1861ac6"
}
;
if
(
!
config
)
{
throw
new
Error
(
"请传入小程序appid和secret配置"
);
}
this
.
wxConfig
=
config
;
}
async
code2Session
(
obj
,
req
)
{
...
...
xgg-web/app/base/wxapplet/impl/chuangfuApplet.js
0 → 100644
View file @
e476cdb9
This diff is collapsed.
Click to expand it.
xgg-web/app/base/wxapplet/impl/xggApplet.js
View file @
e476cdb9
...
...
@@ -9,7 +9,10 @@ const moment = require("moment");
class
xggApplet
extends
AppletBase
{
constructor
()
{
super
();
super
({
appid
:
"wx427b4e988444908f"
,
secret
:
"3d092eb22c3451618a9c0656b1861ac6"
});
this
.
bmuserSve
=
system
.
getObject
(
"service.bmuserSve"
);
this
.
bmuserbizSve
=
system
.
getObject
(
"service.bmuserbizSve"
);
this
.
bmmerchantSve
=
system
.
getObject
(
"service.bmmerchantSve"
);
...
...
@@ -17,7 +20,7 @@ class xggApplet extends AppletBase {
this
.
dictUtils
=
system
.
getObject
(
"util.dictUtils"
);
this
.
uploadCtl
=
system
.
getObject
(
"web.uploadCtl"
);
this
.
idcardClient
=
system
.
getObject
(
"util.idcardClient"
);
}
...
...
@@ -40,7 +43,7 @@ class xggApplet extends AppletBase {
var
decryptObj
=
{
encryptedData
:
encryptedData
,
iv
:
iv
,
sessionKey
:
wxSession
.
session_key
sessionKey
:
wxSession
.
session_key
};
console
.
log
(
decryptObj
);
var
decryptData
=
await
this
.
decryptData
(
decryptObj
);
...
...
@@ -97,7 +100,7 @@ class xggApplet extends AppletBase {
async
commonInfo
(
gobj
,
pobj
,
req
,
loginUser
)
{
return
{
code
:
1
,
code
:
1
,
data
:
{
telphone
:
"15210210265"
}
...
...
@@ -190,12 +193,12 @@ class xggApplet extends AppletBase {
rs
.
msg
=
"请填写手机号码"
;
return
rs
;
}
if
(
!
obj
.
companyNames
)
{
rs
.
msg
=
"请填写公司名称"
;
return
rs
;
}
if
(
!
obj
.
bank_front
)
{
rs
.
msg
=
"请上传银行卡正面图"
;
return
rs
;
...
...
@@ -236,7 +239,7 @@ class xggApplet extends AppletBase {
rs
.
code
=
1
;
rs
.
data
=
{
order
:
order
,
order
:
order
,
userbiz
:
userbiz
,
};
return
rs
;
...
...
@@ -259,7 +262,7 @@ class xggApplet extends AppletBase {
return
result
;
}
catch
(
e
)
{
console
.
log
(
e
.
stack
);
//日志记录
//日志记录
logCtl
.
error
({
optitle
:
"绑定手机, params ["
+
JSON
.
stringify
(
params
)
+
" ]"
,
op
:
"wxapplet/impl/xggApplet/myReqList"
,
...
...
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