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
6c09f169
Commit
6c09f169
authored
Aug 03, 2020
by
jscat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nyx weapp 产品功能
1. 添加获取积分 points 的功能 2. 添加获取某一个积分 qrcode 的功能 3. 添加获取某一组积分助力 bonus 的功能
parent
f4cd7cdb
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
157 行增加
和
110 行删除
+157
-110
增值产品-小程序及app/nyx-master/config.js
+5
-10
增值产品-小程序及app/nyx-master/pages/my/points/points.js
+128
-9
增值产品-小程序及app/nyx-master/pages/my/points/points.wxml
+16
-84
增值产品-小程序及app/nyx-master/pages/my/points/points.wxss
+5
-4
增值产品-小程序及app/nyx-master/project.config.json
+3
-3
没有找到文件。
增值产品-小程序及app/nyx-master/config.js
查看文件 @
6c09f169
//con
fig.js API全局域名配置
//con
fig.js API全局域名配置
//config.js API全局域名配置
var
prod
=
0
;
//阿里云服务器生产版本
var
local
=
0
;
//本地java测试,需要启动java 后台
var
test
=
1
;
//阿里云服务器测试版本
var
local
=
1
;
//本地java测试,需要启动java 后台
var
test
=
0
;
//阿里云服务器测试版本
var
debug
=
0
;
//是否打印调试信息
var
host_key
=
"https://fun.hisuhong.com"
;
...
...
@@ -40,17 +40,12 @@ var config={
msg_like_url
:
host_key
+
"/api/nyx/msg/like"
,
user_login_url
:
login_url
+
"/api/nyx/user/wxLogin"
,
test_url
:
host_key
+
"/api/nyx/match/test"
,
match_rank_query_url
:
host_key
+
"/api/nyx/match/rank/query"
,
quiz_total_query_url
:
host_key
+
"/api/nyx/quiz/total/query"
,
match_rank_update_url
:
host_key
+
"/api/nyx/match/rank/update"
,
quiz_study_query_url
:
host_key
+
"/api/nyx/quiz/query/study"
,
match_add_item_url
:
host_key
+
"/api/nyx/match/add/item"
,
user_reg_url
:
host_key
+
"/api/nyx/user/reg"
,
userinfo_query_url
:
host_key
+
"/api/nyx/userinfo/query"
,
notes_query_url
:
host_key
+
"/api/nyx/post/query"
,
city_list_url
:
host_key
+
"/api/nyx/citylist/query"
,
city_query_url
:
host_key
+
"/api/nyx/city/query"
,
member_query_url
:
host_key
+
"/api/nyx/member/pos/query"
,
points_query_url
:
host_key
+
"/api/nyx/match/point/query"
,
bonus_query_url
:
host_key
+
"/api/nyx/match/bonus/query/id"
,
socket_url
:
socket_url
,
oss_token_url
:
host_key
+
"/api/nyx/oss/getToken"
,
oss_callback_url
:
login_url
+
"/api/nyx/oss/callback"
,
...
...
增值产品-小程序及app/nyx-master/pages/my/points/points.js
查看文件 @
6c09f169
// pa
ges/my/rank/rank.js
// pa
ges/my/rank/rank.js
...
...
@@ -12,7 +12,14 @@ Page({
nyxCode
:
""
,
authStatus
:
""
,
userInfo
:
{},
matchSeason
:
""
,
//积分信息
points
:
[],
//助力信息
bonus_info
:
[],
//选中barcode的qrcode和url
qrcode
:
""
,
qrcode_url
:
""
,
// {
// rankId : "rid_001",
...
...
@@ -23,7 +30,6 @@ Page({
// score : "200",
// ratio : "96%",
// },
rankList
:
[],
isHideLoadMore
:
false
,
/* 模态框 */
...
...
@@ -54,6 +60,14 @@ Page({
})
}
//初始载入四个积分
if
(
_this
.
__data__
.
points
.
length
==
0
)
{
//getPoints(scrollType, pageNum, pageCount, matchStatus)
//onLoad的时候展示可使用的积分
var
matchStatus
=
"01"
_this
.
getPoints
(
0
,
1
,
4
,
matchStatus
);
}
},
...
...
@@ -108,17 +122,29 @@ Page({
/*
*/
/* 点击好友助力 */
onClickPoints
:
function
(){
this
.
setData
({
onClickPoints
:
function
(
e
){
var
_this
=
this
;
var
indexId
=
e
.
currentTarget
.
dataset
.
id
var
match_id
=
_this
.
__data__
.
points
[
indexId
].
match_id
_this
.
getBonus
(
match_id
)
_this
.
setData
({
showModalPoints
:
true
})
},
/* 点击barcode */
onClickBarcode
:
function
(){
onClickBarcode
:
function
(
e
){
var
_this
=
this
;
//指明具体是list的哪一个item
var
indexId
=
e
.
currentTarget
.
dataset
.
id
var
qrcode_url
=
_this
.
__data__
.
points
[
indexId
].
qrcode_url
var
qrcode
=
_this
.
__data__
.
points
[
indexId
].
match_id
this
.
setData
({
showModalBarcode
:
true
})
showModalBarcode
:
true
,
qrcode
:
qrcode
,
qrcode_url
:
qrcode_url
})
},
// 弹出层里面的弹窗
...
...
@@ -133,15 +159,107 @@ Page({
* tab切换
*/
tab
:
function
(
e
)
{
var
_this
=
this
;
//js的e.currentTarget.id 对应wxml的 id="tab0"
//js的e.currentTarget.dataSet.id 对应wxml的 data-id="tab0"
var
id
=
e
.
currentTarget
.
id
;
var
dataId
=
e
.
currentTarget
.
dataset
.
id
this
.
setData
({
_
this
.
setData
({
validStatus
:
dataId
==
"tab0"
?
true
:
false
,
})
var
matchStatus
=
dataId
==
"tab0"
?
"01"
:
"00"
_this
.
getPoints
(
0
,
1
,
4
,
matchStatus
)
},
/**
* 用户自定义函数
*
*/
// 获取points数据
// scrollType: 是否是翻页, 0-不翻页 | 1-翻页
getPoints
:
function
(
scrollType
,
pageNum
,
pageCount
,
memberStatus
)
{
var
_this
=
this
;
var
query_url
=
'&matchStatus='
+
memberStatus
var
strUrl
=
config
.
points_query_url
+
"?pageCount="
+
pageCount
+
"&pageNum="
+
pageNum
+
query_url
config
.
debug
==
1
?
console
.
log
(
"===strUrl is:
\"
"
+
strUrl
+
"
\"
"
)
:
""
wx
.
request
({
url
:
strUrl
,
method
:
'GET'
,
header
:
{
'Cookie'
:
wx
.
getStorageSync
(
'cookieKey'
),
},
success
:
function
(
res
)
{
if
(
res
.
data
.
resultCode
==
200
)
{
//表示HTTP请求成功
console
.
log
(
res
.
data
);
var
list
=
[]
var
bisHideLoadMoreType
=
false
;
if
(
res
.
data
.
data
.
length
<
pageCount
)
{
bisHideLoadMoreType
=
true
;
}
for
(
var
i
=
0
;
i
<
res
.
data
.
data
.
length
;
i
++
)
{
var
result
=
{}
result
[
"total_point"
]
=
res
.
data
.
data
[
i
].
totalPoint
result
[
"member_name"
]
=
res
.
data
.
data
[
i
].
memberName
result
[
"bonus_count"
]
=
res
.
data
.
data
[
i
].
bonusCount
result
[
"bonus_point"
]
=
res
.
data
.
data
[
i
].
bonusPoint
result
[
"match_id"
]
=
res
.
data
.
data
[
i
].
matchId
result
[
"qrcode_url"
]
=
res
.
data
.
data
[
i
].
qrcodeUrl
list
.
push
(
result
)
}
//进行翻页设置(加载更多)
if
(
scrollType
==
1
)
{
var
pointList
=
_this
.
__data__
.
points
;
list
=
pointsList
.
concat
(
list
)
}
_this
.
setData
({
points
:
list
,
pageIndex
:
pageNum
+
1
,
isHideLoadMore
:
bisHideLoadMoreType
,
})
}
}
})
},
// 获取bonus points数据
getBonus
:
function
(
matchId
)
{
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
({
url
:
strUrl
,
method
:
'GET'
,
header
:
{
'Cookie'
:
wx
.
getStorageSync
(
'cookieKey'
),
},
success
:
function
(
res
)
{
if
(
res
.
data
.
resultCode
==
200
)
{
//表示HTTP请求成功
console
.
log
(
res
.
data
);
var
list
=
[]
for
(
var
i
=
0
;
i
<
res
.
data
.
data
.
length
;
i
++
)
{
var
result
=
{}
result
[
"match_id"
]
=
res
.
data
.
data
[
i
].
matchId
result
[
"user_name"
]
=
res
.
data
.
data
[
i
].
userName
result
[
"bonus_point"
]
=
res
.
data
.
data
[
i
].
bonusPoint
list
.
push
(
result
)
}
_this
.
setData
({
bonus_info
:
list
,
})
}
}
})
},
})
\ No newline at end of file
增值产品-小程序及app/nyx-master/pages/my/points/points.wxml
查看文件 @
6c09f169
<view
class="page">
<view
class="page">
...
...
@@ -12,14 +12,16 @@
</view>
<!-- Content: refer to 有品·优惠券 + 点评(可使用) -->
<view class="coupon-list">
<view class="coupon-list"
wx:for="{{points}}" wx:for-item="item" wx:key="{{index}}"
>
<view class="item stamp {{validStatus==true?'stamp01':'stamp06'}}">
<!-- 积分详情 -->
<view class="float-li t1">
<view class="coupon-left">
<view class="t1">
<view class="t1-left">9元</view>
<view class="t1-right">Renaissance Bar优惠积分</view>
<view class="t1-left">
{{item.total_point}}
</view>
<view class="t1-right">{{item.member_name}}优惠积分</view>
</view>
<!-- <view class="t2">
...
...
@@ -30,15 +32,15 @@
</view> -->
<view class="t3">
<view class="t3-left">好友助力:助力
10人,共4
积分</view>
<view class="t3-right" bindtap="onClickPoints">
<view class="t3-left">好友助力:助力
{{item.bonus_count}}人,共{{item.bonus_count}}
积分</view>
<view class="t3-right" bindtap="onClickPoints"
data-id='{{index}}'
>
<image src="../../../icon/my/points-detail.png"></image>
</view>
</view>
<view class="t4">
<view class="t4-left">优惠券码:
264669616164
</view>
<view class="t4-right" bindtap="onClickBarcode" hidden="{{validStatus==false?true:false}}">
<view class="t4-left">优惠券码:
{{item.match_id}}
</view>
<view class="t4-right" bindtap="onClickBarcode"
data-id='{{index}}'
hidden="{{validStatus==false?true:false}}">
<image src="../../../icon/my/logo-barcode.png"></image>
</view>
</view>
...
...
@@ -46,76 +48,6 @@
</view>
</view>
</view>
<view class="item stamp {{validStatus==true?'stamp01':'stamp06'}} ">
<!-- 积分详情 -->
<view class="float-li t1">
<view class="coupon-left">
<view class="t1">
<view class="t1-left">9元</view>
<view class="t1-right">Renaissance Bar优惠积分</view>
</view>
<!-- <view class="t2">
<view class="t2-left">有效期至:2020/07/31 23:59</view>
<view class="t2-right" hidden="{{validStatus==true?true:false}}">
已过期
</view>
</view> -->
<view class="t3">
<view class="t3-left">好友助力:助力10人,共4积分</view>
<view class="t3-right" bindtap="onClickPoints">
<image src="../../../icon/my/points-detail.png"></image>
</view>
</view>
<view class="t4">
<view class="t4-left">优惠券码:264669616164</view>
<view class="t4-right" bindtap="onClickBarcode" hidden="{{validStatus==false?true:false}}">
<image src="../../../icon/my/logo-barcode.png"></image>
</view>
</view>
</view>
</view>
</view>
<view class="item stamp {{validStatus==true?'stamp01':'stamp06'}} ">
<!-- 积分详情 -->
<view class="float-li t1">
<view class="coupon-left">
<view class="t1">
<view class="t1-left">9元</view>
<view class="t1-right">Renaissance Bar优惠积分</view>
</view>
<!-- <view class="t2">
<view class="t2-left">有效期至:2020/07/31 23:59</view>
<view class="t2-right" hidden="{{validStatus==true?true:false}}">
已过期
</view>
</view> -->
<view class="t3">
<view class="t3-left">好友助力:助力10人,共4积分</view>
<view class="t3-right" bindtap="onClickPoints">
<image src="../../../icon/my/points-detail.png"></image>
</view>
</view>
<view class="t4">
<view class="t4-left">优惠券码:264669616164</view>
<view class="t4-right" bindtap="onClickBarcode" hidden="{{validStatus==false?true:false}}">
<image src="../../../icon/my/logo-barcode.png"></image>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 查看好友助力-->
...
...
@@ -134,9 +66,9 @@
</view>
<view class="list-point">
<view class="text"
>Jerry Su助力2积分</view
>
<view class="text">小屋助力2积分</view>
<view class="text">zsy助力1.2积分
</view>
<view class="text"
wx:for="{{bonus_info}}" wx:for-item="item" wx:key="{{index}}"
>
{{item.user_name}}助力{{item.bonus_point}}积分
</view>
</view>
</view>
<!-- end 遮罩层 -->
...
...
@@ -147,7 +79,7 @@
<!-- start 遮罩层 -->
<view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModalBarcode}}"></view>
<!-- 弹出层 -->
<view class="modalDlg"
style="height: 420rpx;"
wx:if="{{showModalBarcode}}">
<view class="modalDlg" wx:if="{{showModalBarcode}}">
<!-- 二维码或其他图片 -->
<view class="title">
<text style="color:#666666">请扫描以下券码验券 </text>
...
...
@@ -157,8 +89,8 @@
</view>
<view class="list-barcode">
<view class="text">券码:
0425 5158 3573
</view>
<image src="
../../../icon/my/barcode.png
"></image>
<view class="text">券码:
{{qrcode}}
</view>
<image src="
{{qrcode_url}}
"></image>
</view>
<view class="list-barcode-image">
...
...
增值产品-小程序及app/nyx-master/pages/my/points/points.wxss
查看文件 @
6c09f169
.page
{
.page
{
...
...
@@ -101,7 +101,7 @@
/* 弹出层 */
.modalDlg{
width: 80%;
height:
36
0rpx;
height:
54
0rpx;
position: fixed;
top: 240rpx;
left: 0;
...
...
@@ -195,12 +195,13 @@
.list-barcode .text{
align-items: center;
margin-left: 20rpx;
}
.list-barcode image{
overflow: visible;
width:
24
0rpx;
height:
24
0rpx;
width:
30
0rpx;
height:
30
0rpx;
}
/* 弹出层里面的按钮 */
...
...
增值产品-小程序及app/nyx-master/project.config.json
查看文件 @
6c09f169
{
{
{
"description"
:
"项目配置文件。"
,
"setting"
:
{
"urlCheck"
:
tru
e
,
"urlCheck"
:
fals
e
,
"es6"
:
true
,
"postcss"
:
true
,
"minified"
:
true
,
...
...
@@ -18,7 +18,7 @@
"disablePlugins"
:
[],
"outputPath"
:
""
},
"useCompilerModule"
:
tru
e
,
"useCompilerModule"
:
fals
e
,
"userConfirmedUseCompilerModuleSwitch"
:
false
},
"compileType"
:
"miniprogram"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论