Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nyx
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
发现
nyx
Commits
028b90f4
Commit
028b90f4
authored
Aug 10, 2020
by
jscat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nyx weapp: 功能更新
1. 添加二维码验证流程
parent
eaa46ddb
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
91 行增加
和
22 行删除
+91
-22
增值产品-小程序及app/nyx-master/app.json
+1
-2
增值产品-小程序及app/nyx-master/config.js
+6
-4
增值产品-小程序及app/nyx-master/pages/activity/activity.js
+80
-11
增值产品-小程序及app/nyx-master/pages/my/my-points/my-points.js
+2
-3
增值产品-小程序及app/nyx-master/project.config.json
+2
-2
没有找到文件。
增值产品-小程序及app/nyx-master/app.json
查看文件 @
028b90f4
{
{
...
...
@@ -10,7 +10,6 @@
"pages/key/matchTest/matchTest"
,
"pages/my/my-points/my-points"
,
"pages/my/user/user"
,
"pages/my/myposts/myposts"
,
"pages/logs/logs"
,
"pages/post/post"
,
"pages/post/edit/edit"
,
...
...
增值产品-小程序及app/nyx-master/config.js
查看文件 @
028b90f4
//con
fig.js API全局域名配置
//con
fig.js API全局域名配置
//config.js API全局域名配置
var
prod
=
0
;
//阿里云服务器生产版本
var
local
=
1
;
//本地java测试,需要启动java 后台
var
test
=
0
;
//阿里云服务器测试版本
var
local
=
0
;
//本地java测试,需要启动java 后台
var
test
=
1
;
//阿里云服务器测试版本
var
debug
=
0
;
//是否打印调试信息
var
host_key
=
"https://fun.hisuhong.com"
;
...
...
@@ -45,7 +45,9 @@ var config={
userinfo_query_url
:
host_key
+
"/api/nyx/userinfo/query"
,
notes_query_url
:
host_key
+
"/api/nyx/post/query"
,
activity_query_url
:
host_key
+
"/api/nyx/activity/query"
,
points_query_url
:
host_key
+
"/api/nyx/match/point/query"
,
match_query_url
:
host_key
+
"/api/nyx/match/query"
,
match_query_by_id_url
:
host_key
+
"/api/nyx/match/query/id"
,
match_query_then_update_url
:
host_key
+
"/api/nyx/match/queryThenUpdate/id"
,
bonus_query_url
:
host_key
+
"/api/nyx/match/bonus/query/id"
,
socket_url
:
socket_url
,
oss_token_url
:
host_key
+
"/api/nyx/oss/getToken"
,
...
...
增值产品-小程序及app/nyx-master/pages/activity/activity.js
查看文件 @
028b90f4
// pa
ges/activity/activity.js
// pa
ges/activity/activity.js
...
...
@@ -365,10 +365,40 @@ Page({
- 答题时间create_datetime: 2020/07/30 12:00:00
- 更新时间update_datetime: 2020/07/30 12:00:00
- 积分时效状态(有效|无效)(暂不实现)
2. 扫码流程
2. 扫码流程
; javaapp只负责获取数据; weapp负责解析数据
1) 扫码获取记录id,发给服务器后台,
如果 存在 && 未使用,则置为 "已使用",同时返回"成功"
否则返回"失败"
msg:
- "成功", 如果 存在 && 未使用,则置为 "已使用", match_id && match_status='01'
{
"resultCode": "200",
"totalCount": 1,
"resultMsg": "OK",
"data": [
{
"matchId": "mid_002",
"matchStatus": "01",
}
]
}
- "失败, 已使用二维码", 如果 存在 && 已使用, match_id && match_status='00'
{
"resultCode": "200",
"totalCount": 1,
"resultMsg": "OK",
"data": [
{
"matchId": "mid_001",
"matchStatus": "00",
}
]
}
- "失败, 无效二维码", 未查询到 !match_id
{
"resultCode": "200",
"totalCount": 0,
"resultMsg": "OK",
"data": []
}
*/
getQRCode
:
function
(){
var
_this
=
this
;
...
...
@@ -376,13 +406,52 @@ Page({
wx
.
scanCode
({
//扫描API
success
:
function
(
res
){
console
.
log
(
res
);
//输出回调信息
_this
.
setData
({
qRCodeMsg
:
res
.
result
});
wx
.
showToast
({
title
:
'成功'
,
duration
:
2000
})
_this
.
checkQRCode
(
res
.
result
)
}
})
},
checkQRCode
(
qrcode_string
){
var
_this
=
this
;
var
strUrl
=
config
.
match_query_then_update_url
+
"?matchId="
+
qrcode_string
config
.
debug
==
1
?
console
.
log
(
"===checkQRCode strUrl "
+
strUrl
):
""
wx
.
request
({
url
:
strUrl
,
method
:
'GET'
,
header
:
{
'Cookie'
:
wx
.
getStorageSync
(
'cookieKey'
),
},
success
:
function
(
res
)
{
if
(
res
.
data
.
resultCode
==
200
)
{
//表示query成功
console
.
log
(
"qrcode查询成功"
);
//得到matchId
var
matchList
=
res
.
data
.
data
;
var
title
=
""
if
(
matchList
.
length
==
0
)
{
title
=
"失败, 无效二维码"
}
else
if
(
matchList
[
0
].
matchStatus
==
'00'
)
{
title
=
"失败,已使用二维码"
}
else
if
(
matchList
[
0
].
matchStatus
==
'01'
)
{
title
=
"成功扫码"
}
wx
.
showToast
({
title
:
title
,
duration
:
3000
})
}
},
fail
:
function
(
res
)
{
console
.
log
(
"failed"
)
}
})
},
...
...
增值产品-小程序及app/nyx-master/pages/my/my-points/my-points.js
查看文件 @
028b90f4
// pa
ges/my/rank/rank.js
// pa
ges/my/rank/rank.js
...
...
@@ -181,7 +181,7 @@ Page({
getPoints
:
function
(
scrollType
,
pageNum
,
pageCount
,
memberStatus
)
{
var
_this
=
this
;
var
query_url
=
'&matchStatus='
+
memberStatus
var
strUrl
=
config
.
points
_query_url
+
"?pageCount="
+
pageCount
var
strUrl
=
config
.
match
_query_url
+
"?pageCount="
+
pageCount
+
"&pageNum="
+
pageNum
+
query_url
config
.
debug
==
1
?
console
.
log
(
"===strUrl is:
\"
"
+
strUrl
+
"
\"
"
)
:
""
wx
.
request
({
...
...
@@ -230,7 +230,6 @@ Page({
var
_this
=
this
;
var
query_url
=
'?matchId='
+
matchId
var
strUrl
=
config
.
bonus_query_url
+
query_url
config
.
debug
==
1
?
console
.
log
(
"===strUrl is:
\"
"
+
strUrl
+
"
\"
"
)
:
""
wx
.
request
({
...
...
增值产品-小程序及app/nyx-master/project.config.json
查看文件 @
028b90f4
{
{
{
"description"
:
"项目配置文件。"
,
"setting"
:
{
"urlCheck"
:
fals
e
,
"urlCheck"
:
tru
e
,
"es6"
:
true
,
"postcss"
:
true
,
"minified"
:
true
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论