Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jamesyang1999
ShopXO
提交
d1d9db5a
ShopXO
项目概览
jamesyang1999
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d1d9db5a
编写于
12月 22, 2020
作者:
D
Devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qq小程序新增签到
上级
f6d96487
变更
33
隐藏空白更改
内联
并排
Showing
33 changed file
with
1614 addition
and
14 deletion
+1614
-14
sourcecode/qq/default/app.js
sourcecode/qq/default/app.js
+1
-1
sourcecode/qq/default/app.json
sourcecode/qq/default/app.json
+8
-1
sourcecode/qq/default/pages/plugins/signin/index-detail/index-detail.js
...default/pages/plugins/signin/index-detail/index-detail.js
+212
-0
sourcecode/qq/default/pages/plugins/signin/index-detail/index-detail.json
...fault/pages/plugins/signin/index-detail/index-detail.json
+8
-0
sourcecode/qq/default/pages/plugins/signin/index-detail/index-detail.qml
...efault/pages/plugins/signin/index-detail/index-detail.qml
+85
-0
sourcecode/qq/default/pages/plugins/signin/index-detail/index-detail.qss
...efault/pages/plugins/signin/index-detail/index-detail.qss
+132
-0
sourcecode/qq/default/pages/plugins/signin/user-coming-list/user-coming-list.js
...pages/plugins/signin/user-coming-list/user-coming-list.js
+148
-0
sourcecode/qq/default/pages/plugins/signin/user-coming-list/user-coming-list.json
...ges/plugins/signin/user-coming-list/user-coming-list.json
+8
-0
sourcecode/qq/default/pages/plugins/signin/user-coming-list/user-coming-list.qml
...ages/plugins/signin/user-coming-list/user-coming-list.qml
+29
-0
sourcecode/qq/default/pages/plugins/signin/user-coming-list/user-coming-list.qss
...ages/plugins/signin/user-coming-list/user-coming-list.qss
+26
-0
sourcecode/qq/default/pages/plugins/signin/user-qrcode-detail/user-qrcode-detail.js
...s/plugins/signin/user-qrcode-detail/user-qrcode-detail.js
+89
-0
sourcecode/qq/default/pages/plugins/signin/user-qrcode-detail/user-qrcode-detail.json
...plugins/signin/user-qrcode-detail/user-qrcode-detail.json
+8
-0
sourcecode/qq/default/pages/plugins/signin/user-qrcode-detail/user-qrcode-detail.qml
.../plugins/signin/user-qrcode-detail/user-qrcode-detail.qml
+46
-0
sourcecode/qq/default/pages/plugins/signin/user-qrcode-detail/user-qrcode-detail.qss
.../plugins/signin/user-qrcode-detail/user-qrcode-detail.qss
+27
-0
sourcecode/qq/default/pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.js
...ugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.js
+130
-0
sourcecode/qq/default/pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.json
...ins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.json
+8
-0
sourcecode/qq/default/pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.qml
...gins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.qml
+31
-0
sourcecode/qq/default/pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.qss
...gins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.qss
+10
-0
sourcecode/qq/default/pages/plugins/signin/user-qrcode/user-qrcode.js
...q/default/pages/plugins/signin/user-qrcode/user-qrcode.js
+171
-0
sourcecode/qq/default/pages/plugins/signin/user-qrcode/user-qrcode.json
...default/pages/plugins/signin/user-qrcode/user-qrcode.json
+8
-0
sourcecode/qq/default/pages/plugins/signin/user-qrcode/user-qrcode.qml
.../default/pages/plugins/signin/user-qrcode/user-qrcode.qml
+46
-0
sourcecode/qq/default/pages/plugins/signin/user-qrcode/user-qrcode.qss
.../default/pages/plugins/signin/user-qrcode/user-qrcode.qss
+38
-0
sourcecode/qq/default/pages/plugins/signin/user-signin/user-signin.js
...q/default/pages/plugins/signin/user-signin/user-signin.js
+133
-0
sourcecode/qq/default/pages/plugins/signin/user-signin/user-signin.json
...default/pages/plugins/signin/user-signin/user-signin.json
+8
-0
sourcecode/qq/default/pages/plugins/signin/user-signin/user-signin.qml
.../default/pages/plugins/signin/user-signin/user-signin.qml
+25
-0
sourcecode/qq/default/pages/plugins/signin/user-signin/user-signin.qss
.../default/pages/plugins/signin/user-signin/user-signin.qss
+15
-0
sourcecode/qq/default/pages/plugins/signin/user/user.js
sourcecode/qq/default/pages/plugins/signin/user/user.js
+105
-0
sourcecode/qq/default/pages/plugins/signin/user/user.json
sourcecode/qq/default/pages/plugins/signin/user/user.json
+8
-0
sourcecode/qq/default/pages/plugins/signin/user/user.qml
sourcecode/qq/default/pages/plugins/signin/user/user.qml
+20
-0
sourcecode/qq/default/pages/plugins/signin/user/user.qss
sourcecode/qq/default/pages/plugins/signin/user/user.qss
+29
-0
sourcecode/toutiao/default/pages/plugins/signin/index-detail/index-detail.js
...default/pages/plugins/signin/index-detail/index-detail.js
+0
-10
sourcecode/toutiao/default/pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.js
...ugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.js
+1
-1
sourcecode/weixin/default/pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.js
...ugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.js
+1
-1
未找到文件。
sourcecode/qq/default/app.js
浏览文件 @
d1d9db5a
...
...
@@ -74,7 +74,7 @@ App({
// 请求地址
request_url
:
"
{{request_url}}
"
,
// request_url: 'http://shopxo.com/',
//
request_url: 'https://dev.shopxo.net/',
request_url
:
'
https://dev.shopxo.net/
'
,
// 基础信息
application_title
:
"
{{application_title}}
"
,
...
...
sourcecode/qq/default/app.json
浏览文件 @
d1d9db5a
...
...
@@ -46,7 +46,14 @@
"pages/plugins/invoice/invoice/invoice"
,
"pages/plugins/invoice/invoice-detail/invoice-detail"
,
"pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo"
,
"pages/plugins/invoice/order/order"
"pages/plugins/invoice/order/order"
,
"pages/plugins/signin/user/user"
,
"pages/plugins/signin/index-detail/index-detail"
,
"pages/plugins/signin/user-signin/user-signin"
,
"pages/plugins/signin/user-qrcode/user-qrcode"
,
"pages/plugins/signin/user-qrcode-detail/user-qrcode-detail"
,
"pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo"
,
"pages/plugins/signin/user-coming-list/user-coming-list"
],
"window"
:
{
"navigationBarTitleText"
:
"{{application_title}}"
,
...
...
sourcecode/qq/default/pages/plugins/signin/index-detail/index-detail.js
0 → 100644
浏览文件 @
d1d9db5a
const
app
=
getApp
();
Page
({
data
:
{
data_bottom_line_status
:
false
,
data_list_loding_status
:
1
,
data_list_loding_msg
:
''
,
params
:
null
,
user
:
null
,
data_base
:
null
,
data
:
null
,
team_signin_data
:
null
,
user_signin_data
:
null
,
is_already_coming
:
0
,
is_success_tips
:
0
,
coming_integral
:
0
,
},
onLoad
(
params
)
{
//params['id'] = 1;
this
.
setData
({
params
:
params
,
user
:
app
.
get_user_cache_info
(),
});
},
onShow
()
{
this
.
get_data
();
},
// 获取数据
get_data
()
{
var
self
=
this
;
qq
.
request
({
url
:
app
.
get_request_url
(
"
detail
"
,
"
index
"
,
"
signin
"
),
method
:
"
POST
"
,
data
:
{
id
:
this
.
data
.
params
.
id
||
0
},
dataType
:
"
json
"
,
success
:
res
=>
{
qq
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
self
.
setData
({
data_base
:
data
.
base
||
null
,
data
:
data
.
data
||
null
,
team_signin_data
:
data
.
team_signin_data
||
null
,
user_signin_data
:
data
.
user_signin_data
||
null
,
is_already_coming
:
((
data
.
user_signin_data
||
null
)
!=
null
&&
(
data
.
user_signin_data
.
integral
||
0
)
>
0
)
?
1
:
0
,
data_list_loding_msg
:
''
,
data_list_loding_status
:
0
,
data_bottom_line_status
:
true
,
});
}
else
{
self
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
res
.
data
.
msg
,
});
}
},
fail
:
()
=>
{
qq
.
stopPullDownRefresh
();
self
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
'
服务器请求出错
'
,
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
},
// 下拉刷新
onPullDownRefresh
()
{
this
.
get_data
();
},
// 初始化
init
()
{
var
user
=
app
.
get_user_info
(
this
,
"
init
"
),
self
=
this
;
if
(
user
!=
false
)
{
// 用户未绑定用户则转到登录页面
if
(
app
.
user_is_need_login
(
user
))
{
qq
.
showModal
({
title
:
'
温馨提示
'
,
content
:
'
绑定手机号码
'
,
confirmText
:
'
确认
'
,
cancelText
:
'
暂不
'
,
success
:
(
result
)
=>
{
qq
.
stopPullDownRefresh
();
if
(
result
.
confirm
)
{
qq
.
navigateTo
({
url
:
"
/pages/login/login?event_callback=init
"
});
}
},
});
}
else
{
return
true
;
}
}
return
false
;
},
// 签到
coming_event
(
e
)
{
if
(
this
.
data
.
is_already_coming
!=
1
&&
this
.
init
())
{
var
self
=
this
;
qq
.
showLoading
({
title
:
"
处理中...
"
});
qq
.
request
({
url
:
app
.
get_request_url
(
"
coming
"
,
"
index
"
,
"
signin
"
),
method
:
"
POST
"
,
data
:
{
id
:
this
.
data
.
data
.
id
},
dataType
:
"
json
"
,
success
:
res
=>
{
qq
.
hideLoading
();
if
(
res
.
data
.
code
==
0
)
{
this
.
setData
({
is_already_coming
:
1
,
is_success_tips
:
1
,
coming_integral
:
res
.
data
.
data
,
});
this
.
get_data
();
}
else
{
if
(
app
.
is_login_check
(
res
.
data
,
self
,
'
team_request
'
))
{
app
.
showToast
(
res
.
data
.
msg
);
}
}
},
fail
:
()
=>
{
qq
.
hideLoading
();
app
.
showToast
(
"
服务器请求出错
"
);
}
});
}
},
// 签到成功提示关闭
coming_success_close_event
(
e
)
{
this
.
setData
({
is_success_tips
:
0
,
});
},
// 组队事件
team_event
(
e
)
{
if
(
this
.
init
())
{
var
self
=
this
;
qq
.
showLoading
({
title
:
"
处理中...
"
});
qq
.
request
({
url
:
app
.
get_request_url
(
"
team
"
,
"
userqrcode
"
,
"
signin
"
),
method
:
"
POST
"
,
data
:
{},
dataType
:
"
json
"
,
success
:
res
=>
{
qq
.
hideLoading
();
if
(
res
.
data
.
code
==
0
)
{
switch
(
res
.
data
.
data
.
status
)
{
// 组队成功
case
0
:
// 设置签到码id
var
temp_params
=
this
.
data
.
params
;
temp_params
[
'
id
'
]
=
res
.
data
.
data
.
qrcode_id
;
this
.
setData
({
params
:
temp_params
});
// 重新拉取数据
this
.
get_data
();
break
;
// 需要填写联系人信息
case
1
:
qq
.
navigateTo
({
url
:
'
/pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo?is_team=1
'
,
})
break
;
}
}
else
{
if
(
app
.
is_login_check
(
res
.
data
,
self
,
'
team_request
'
))
{
app
.
showToast
(
res
.
data
.
msg
);
}
}
},
fail
:
()
=>
{
qq
.
hideLoading
();
app
.
showToast
(
"
服务器请求出错
"
);
}
});
}
},
// 图片事件
right_images_event
(
e
)
{
if
((
this
.
data
.
data
.
right_images_url
||
null
)
!=
null
)
{
qq
.
navigateTo
({
url
:
this
.
data
.
data
.
right_images_url
,
});
}
},
// 自定义分享
onShareAppMessage
()
{
var
user_id
=
app
.
get_user_cache_info
(
'
id
'
,
0
)
||
0
;
return
{
title
:
this
.
data
.
data
.
seo_title
||
'
签到 -
'
+
app
.
data
.
application_title
,
desc
:
this
.
data
.
data
.
seo_desc
||
'
签到获得积分奖励 -
'
+
app
.
data
.
application_describe
,
path
:
'
/pages/plugins/signin/index-detail/index-detail?id=
'
+
this
.
data
.
data
.
id
+
'
&referrer=
'
+
user_id
};
},
});
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/index-detail/index-detail.json
0 → 100644
浏览文件 @
d1d9db5a
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#f6b015"
,
"backgroundColorTop"
:
"#f6b015"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"签到"
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/index-detail/index-detail.qml
0 → 100644
浏览文件 @
d1d9db5a
<
view
qq
:
if
=
"
{{(data || null) != null}}
"
>
<!--
签到
-->
<
view
class
=
"
coming-container tc
"
>
<
navigator
qq
:
if
=
"
{{(data_base.is_user_menu || 0) == 1}}
"
class
=
"
signin-user-menu-submit
"
url
=
"
/pages/plugins/signin/user-signin/user-signin
"
hover
-
class
=
"
none
"
>
我的签到
<
/navigator
>
<
view
class
=
"
coming-submit {{(is_already_coming == 1) ? 'already-coming' : ''}}
"
bindtap
=
"
coming_event
"
>
签到
<
/view
>
<
block
qq
:
if
=
"
{{(user || null) == null}}
"
>
<
view
class
=
"
coming-title
"
>
登录签到获得积分奖励
<
/view
>
<
/block
>
<
block
qq
:
else
>
<!--
是否已签到
-->
<
block
qq
:
if
=
"
{{(user_signin_data || null) != null && (user_signin_data.integral || 0) > 0}}
"
>
<
view
class
=
"
coming-title
"
>
今日已签到
,
获得
{{
user_signin_data
.
integral
}}
积分
,
共
{{
user_signin_data
.
total
}}
次
<
/view
>
<
view
class
=
"
coming-tips
"
>
请明日继续签到
,
更多积分奖励
<
/view
>
<
/block
>
<
block
qq
:
else
>
<
view
class
=
"
coming-title am-margin-top-sm
"
>
立即签到获得积分奖励
<
/view
>
<
/block
>
<!--
队长
-->
<
block
qq
:
if
=
"
{{(team_signin_data || null) != null && user.id == data.user_id}}
"
>
<
view
class
=
"
coming-title
"
>
<
text
>
今日
{{
team_signin_data
.
day
}}
人签到
,
共
{{
team_signin_data
.
total
}}
人
<
/text
>
<
navigator
qq
:
if
=
"
{{(data_base.is_team_show_coming_user || 0) == 1}}
"
url
=
"
/pages/plugins/signin/user-coming-list/user-coming-list?id={{data.id}}
"
hover
-
class
=
"
none
"
class
=
"
detail-submit
"
>
详情
>><
/navigator
>
<
/view
>
<
view
class
=
"
coming-tips
"
>
分享获得更多奖励
<
/view
>
<
/block
>
<
/block
>
<!--
按钮组
-->
<
view
class
=
"
submit-container
"
>
<
button
qq
:
if
=
"
{{(data_base.is_team) == 1 && (user || null) != null && data.user_id != user.id}}
"
type
=
"
default
"
size
=
"
mini
"
class
=
"
team-submit
"
bindtap
=
"
team_event
"
>
组队
<
/button
>
<
button
qq
:
if
=
"
{{(data_base.is_share) == 1}}
"
type
=
"
default
"
size
=
"
mini
"
open
-
type
=
"
share
"
class
=
"
share-submit
"
>
分享
<
/button
>
<
/view
>
<
/view
>
<!--
广告图片
-->
<
image
qq
:
if
=
"
{{(data.right_images || null) != null}}
"
src
=
"
{{data.right_images}}
"
class
=
"
wh-auto dis-block spacing-mt
"
mode
=
"
widthFix
"
bindtap
=
"
right_images_event
"
/>
<!--
公告信息
-->
<
view
qq
:
if
=
"
{{(data_base.signin_desc || null) != null && data_base.signin_desc.length > 0}}
"
class
=
"
tips spacing-mt
"
>
<
view
qq
:
for
=
"
{{data_base.signin_desc}}
"
qq
:
key
=
"
key
"
class
=
"
item
"
>
{{
item
}}
<
/view
>
<
/view
>
<!--
推荐商品
-->
<
view
qq
:
if
=
"
{{(data.goods_list || null) != null && data.goods_list.length > 0}}
"
class
=
"
spacing-mt
"
>
<
view
class
=
"
spacing-nav-title
"
>
<
text
class
=
"
line
"
><
/text
>
<
text
class
=
"
text-wrapper
"
>
推荐商品
<
/text
>
<
/view
>
<
view
class
=
"
data-list spacing-10
"
>
<
view
class
=
"
items bg-white
"
qq
:
for
=
"
{{data.goods_list}}
"
qq
:
key
=
"
key
"
>
<
navigator
url
=
"
/pages/goods-detail/goods-detail?goods_id={{item.id}}
"
hover
-
class
=
"
none
"
>
<
image
src
=
"
{{item.images}}
"
mode
=
"
aspectFit
"
/>
<
view
class
=
"
base
"
>
<
view
class
=
"
multi-text
"
>
{{
item
.
title
}}
<
/view
>
<
view
class
=
"
price
"
>
<
text
class
=
"
sales-price
"
>
{{
currency_symbol
}}{{
item
.
min_price
}}
<
/text
>
<
/view
>
<
/view
>
<
/navigator
>
<
/view
>
<
/view
>
<
/view
>
<!--
签到成功提示信息
-->
<
view
qq
:
if
=
"
{{is_success_tips == 1}}
"
class
=
"
coming-tips-container am-text-center
"
>
<
view
class
=
"
coming-content tc
"
>
<
icon
type
=
"
clear
"
size
=
"
20
"
bindtap
=
"
coming_success_close_event
"
/>
<
image
src
=
"
/images/plugins/signin/coming-success-icon.png
"
mode
=
"
widthFix
"
/>
<
view
class
=
"
coming-tips-content
"
>
<
text
class
=
"
coming-tips-text
"
>
获得
<
text
>
{{
coming_integral
}}
<
/text> 积分</
text
>
<
/view
>
<
/view
>
<
/view
>
<!--
结尾
-->
<
import
src
=
"
/pages/common/bottom_line.qml
"
/>
<
template
is
=
"
bottom_line
"
data
=
"
{{status: data_bottom_line_status}}
"
><
/template
>
<
/view
>
<
view
qq
:
else
>
<
import
src
=
"
/pages/common/nodata.qml
"
/>
<
template
is
=
"
nodata
"
data
=
"
{{status: data_list_loding_status, msg: data_list_loding_msg}}
"
><
/template
>
<
/view>
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/index-detail/index-detail.qss
0 → 100644
浏览文件 @
d1d9db5a
/**
* 签到
*/
.coming-container {
background-color: #f6b015;
position: relative;
padding: 100rpx 0 120rpx 0;
}
.coming-submit {
width: 200rpx;
height: 200rpx;
line-height: 200rpx;
border-radius: 50%;
background-color: #F37B1D;
color: #f8fb0b;
border: 12rpx solid #f9f420;
font-size: 62rpx;
margin: 0 auto;
}
.already-coming {
border: 12rpx solid #bebebe;
background-color: #ccc;
color: #9f9f9f;
}
.coming-title {
color: #fff;
margin-top: 20rpx;
}
.coming-tips {
color: #ffe7b2;
}
.signin-user-menu-submit {
border: 1px solid #fff900;
color: #fffb62;
position: absolute;
top: 20rpx;
right: 20rpx;
padding: 6rpx 20rpx;
border-radius: 3rpx;
}
.detail-submit {
margin-left: 20rpx;
color: #0e90d2;
display: inline;
}
.submit-container {
position: absolute;
bottom: 20rpx;
right: 20rpx;
}
.submit-container button:not(:first-child) {
margin-left: 30rpx;
}
.submit-container button.team-submit {
color: #5eb95e;
background-color: #E4F3E4;
border-color: #d2e8d2;
}
.submit-container button.share-submit {
color: #F37B1D;
background-color: #ffe5be;
border-color: #f8d093;
}
/**
* 签到成功提示
*/
.coming-tips-container {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 1050;
background: rgb(0 0 0 / 0.6);
padding-top: 30%;
}
.coming-content {
max-width: 300px;
height: 305px;
margin: 0 auto;
position: relative;
}
.coming-content icon {
position: absolute;
top: 5px;
right: 5px;
}
.coming-tips-container image {
max-width: 100%;
margin-top:60rpx;
}
.coming-tips-content .coming-tips-text {
background: #fff;
color: #f00;
padding: 10rpx 20rpx;
border-radius: 1000rpx;
}
/**
* 商品列表
*/
.scroll-box {
height: calc(100vh - 80rpx);
}
.data-list {
overflow: hidden;
}
.data-list .items {
width: calc(50% - 5rpx);
margin-bottom: 10rpx;
padding-bottom: 20rpx;
}
.data-list .items:nth-child(2n) {
float: right;
}
.data-list .items:nth-child(2n+1) {
float: left;
}
.data-list .items image {
width: 100%;
height: 200px !important;
}
.data-list .items .base {
text-align: left;
font-size: 32rpx;
padding: 0 15rpx;
}
.data-list .items .base,
.data-list .items .base .price {
margin-top: 15rpx;
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-coming-list/user-coming-list.js
0 → 100644
浏览文件 @
d1d9db5a
const
app
=
getApp
();
Page
({
data
:
{
data_list_loding_status
:
1
,
data_bottom_line_status
:
false
,
params
:
null
,
data_list
:
[],
data_page_total
:
0
,
data_page
:
1
,
},
onLoad
(
params
)
{
this
.
setData
({
params
:
params
,
});
this
.
init
();
},
onShow
()
{
},
init
()
{
var
user
=
app
.
get_user_info
(
this
,
'
init
'
);
if
(
user
!=
false
)
{
// 用户未绑定用户则转到登录页面
if
(
app
.
user_is_need_login
(
user
))
{
qq
.
redirectTo
({
url
:
"
/pages/login/login?event_callback=init
"
});
return
false
;
}
else
{
// 获取数据
this
.
get_data_list
();
}
}
else
{
this
.
setData
({
data_list_loding_status
:
0
,
data_bottom_line_status
:
false
,
});
}
},
// 获取数据
get_data_list
(
is_mandatory
)
{
// 分页是否还有数据
if
((
is_mandatory
||
0
)
==
0
)
{
if
(
this
.
data
.
data_bottom_line_status
==
true
)
{
return
false
;
}
}
// 加载loding
qq
.
showLoading
({
title
:
"
加载中...
"
});
this
.
setData
({
data_list_loding_status
:
1
});
// 获取数据
qq
.
request
({
url
:
app
.
get_request_url
(
"
usercominglist
"
,
"
userqrcode
"
,
"
signin
"
),
method
:
"
POST
"
,
data
:
{
id
:
this
.
data
.
params
.
id
||
0
,
page
:
this
.
data
.
data_page
,
},
dataType
:
"
json
"
,
success
:
res
=>
{
qq
.
hideLoading
();
qq
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
if
(
res
.
data
.
data
.
data
.
length
>
0
)
{
if
(
this
.
data
.
data_page
<=
1
)
{
var
temp_data_list
=
res
.
data
.
data
.
data
;
}
else
{
var
temp_data_list
=
this
.
data
.
data_list
;
var
temp_data
=
res
.
data
.
data
.
data
;
for
(
var
i
in
temp_data
)
{
temp_data_list
.
push
(
temp_data
[
i
]);
}
}
this
.
setData
({
data_list
:
temp_data_list
,
data_total
:
res
.
data
.
data
.
total
,
data_page_total
:
res
.
data
.
data
.
page_total
,
data_list_loding_status
:
3
,
data_page
:
this
.
data
.
data_page
+
1
,
});
// 是否还有数据
if
(
this
.
data
.
data_page
>
1
&&
this
.
data
.
data_page
>
this
.
data
.
data_page_total
)
{
this
.
setData
({
data_bottom_line_status
:
true
});
}
else
{
this
.
setData
({
data_bottom_line_status
:
false
});
}
}
else
{
this
.
setData
({
data_list_loding_status
:
0
,
data_list
:
[],
data_bottom_line_status
:
false
,
});
}
}
else
{
this
.
setData
({
data_list_loding_status
:
0
,
});
if
(
app
.
is_login_check
(
res
.
data
,
this
,
'
get_data_list
'
))
{
app
.
showToast
(
res
.
data
.
msg
);
}
}
},
fail
:
()
=>
{
qq
.
hideLoading
();
qq
.
stopPullDownRefresh
();
this
.
setData
({
data_list_loding_status
:
2
,
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
},
// 下拉刷新
onPullDownRefresh
()
{
this
.
setData
({
data_page
:
1
});
this
.
get_data_list
(
1
);
},
// 滚动加载
scroll_lower
(
e
)
{
this
.
get_data_list
();
},
// 头像查看
avatar_event
(
e
)
{
var
value
=
e
.
currentTarget
.
dataset
.
value
||
null
;
if
(
value
!=
null
)
{
qq
.
previewImage
({
current
:
value
,
urls
:
[
value
]
});
}
else
{
app
.
showToast
(
'
头像地址有误
'
);
}
},
});
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-coming-list/user-coming-list.json
0 → 100644
浏览文件 @
d1d9db5a
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#f6b015"
,
"backgroundColorTop"
:
"#f6b015"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"用户签到"
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-coming-list/user-coming-list.qml
0 → 100644
浏览文件 @
d1d9db5a
<
scroll
-
view
scroll
-
y
=
"
{{true}}
"
class
=
"
scroll-box
"
bindscrolltolower
=
"
scroll_lower
"
lower
-
threshold
=
"
30
"
>
<
view
class
=
"
data-list
"
>
<
view
class
=
"
item bg-white spacing-mb
"
qq
:
if
=
"
{{data_list.length > 0}}
"
qq
:
for
=
"
{{data_list}}
"
qq
:
key
=
"
key
"
>
<
view
class
=
"
base oh br-b
"
>
<
image
src
=
"
{{item.user.avatar}}
"
class
=
"
avatar dis-block fl
"
mode
=
"
widthFix
"
bindtap
=
"
avatar_event
"
data
-
value
=
"
{{item.user.avatar}}
"
/>
<
text
class
=
"
fr nickname cr-888
"
>
{{
item
.
user
.
user_name_view
||
''
}}
<
/text
>
<
/view
>
<
view
class
=
"
content
"
>
<
view
class
=
"
single-text
"
>
<
text
class
=
"
title cr-666
"
>
奖励积分
<
/text
>
<
text
class
=
"
value
"
>
{{
item
.
integral
}}
<
/text
>
<
/view
>
<
view
class
=
"
single-text
"
>
<
text
class
=
"
title cr-666
"
>
签到时间
<
/text
>
<
text
class
=
"
value
"
>
{{
item
.
add_time
}}
<
/text
>
<
/view
>
<
/view
>
<
/view
>
<
view
qq
:
if
=
"
{{data_list.length == 0}}
"
>
<
import
src
=
"
/pages/common/nodata.qml
"
/>
<
template
is
=
"
nodata
"
data
=
"
{{status: data_list_loding_status}}
"
>
<
/template
>
<
/view
>
<
import
src
=
"
/pages/common/bottom_line.qml
"
/>
<
template
is
=
"
bottom_line
"
data
=
"
{{status: data_bottom_line_status}}
"
><
/template
>
<
/view
>
<
/scroll-view>
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-coming-list/user-coming-list.qss
0 → 100644
浏览文件 @
d1d9db5a
.scroll-box {
height: 100vh;
}
.data-list .item .base {
padding: 15rpx 10rpx;
}
.data-list .item .base .avatar {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
}
.data-list .item .base .nickname {
margin-top: 10rpx;
}
.data-list .item .content {
padding: 20rpx 10rpx;
}
.data-list .item .content .single-text {
line-height: 50rpx;
}
.data-list .item .content .single-text .title {
margin-right: 30rpx;
}
.data-list .item .content .single-text .value {
font-weight: 500;
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-qrcode-detail/user-qrcode-detail.js
0 → 100644
浏览文件 @
d1d9db5a
const
app
=
getApp
();
Page
({
data
:
{
params
:
null
,
data_list_loding_status
:
1
,
data_list_loding_msg
:
''
,
data_bottom_line_status
:
false
,
detail
:
null
,
detail_list
:
[],
express_data
:
[],
},
onLoad
(
params
)
{
//params['id'] = 1;
this
.
setData
({
params
:
params
});
this
.
init
();
},
onShow
()
{},
init
()
{
var
self
=
this
;
qq
.
showLoading
({
title
:
"
加载中...
"
});
this
.
setData
({
data_list_loding_status
:
1
});
qq
.
request
({
url
:
app
.
get_request_url
(
"
detail
"
,
"
userqrcode
"
,
"
signin
"
),
method
:
"
POST
"
,
data
:
{
id
:
this
.
data
.
params
.
id
},
dataType
:
"
json
"
,
success
:
res
=>
{
qq
.
hideLoading
();
qq
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
self
.
setData
({
detail
:
data
.
data
,
detail_list
:
[
{
name
:
"
是否启用
"
,
value
:
data
.
data
.
is_enable_name
||
''
},
{
name
:
"
邀请人奖励积分
"
,
value
:
data
.
data
.
reward_master
||
''
},
{
name
:
"
受邀人奖励积分
"
,
value
:
data
.
data
.
reward_invitee
||
''
},
{
name
:
"
联系人姓名
"
,
value
:
data
.
data
.
name
||
''
},
{
name
:
"
联系人电话
"
,
value
:
data
.
data
.
tel
||
''
},
{
name
:
"
联系人地址
"
,
value
:
data
.
data
.
address
||
''
},
{
name
:
"
创建时间
"
,
value
:
data
.
data
.
add_time
||
''
},
{
name
:
"
更新时间
"
,
value
:
data
.
data
.
upd_time
||
''
},
],
express_data
:
[
{
name
:
"
快递名称
"
,
value
:
data
.
data
.
express_name
||
''
},
{
name
:
"
快递单号
"
,
value
:
data
.
data
.
express_number
||
''
},
],
data_list_loding_status
:
3
,
data_bottom_line_status
:
true
,
data_list_loding_msg
:
''
,
});
}
else
{
self
.
setData
({
data_list_loding_status
:
2
,
data_bottom_line_status
:
false
,
data_list_loding_msg
:
res
.
data
.
msg
,
});
if
(
app
.
is_login_check
(
res
.
data
,
self
,
'
init
'
))
{
app
.
showToast
(
res
.
data
.
msg
);
}
}
},
fail
:
()
=>
{
qq
.
hideLoading
();
qq
.
stopPullDownRefresh
();
self
.
setData
({
data_list_loding_status
:
2
,
data_bottom_line_status
:
false
,
data_list_loding_msg
:
'
服务器请求出错
'
,
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
},
// 下拉刷新
onPullDownRefresh
()
{
this
.
init
();
},
});
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-qrcode-detail/user-qrcode-detail.json
0 → 100644
浏览文件 @
d1d9db5a
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#f6b015"
,
"backgroundColorTop"
:
"#f6b015"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"签到码详情"
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-qrcode-detail/user-qrcode-detail.qml
0 → 100644
浏览文件 @
d1d9db5a
<
view
qq
:
if
=
"
{{detail != null}}
"
>
<!--
基础信息
-->
<
view
qq
:
if
=
"
{{detail_list.length > 0}}
"
class
=
"
panel-item
"
>
<
view
class
=
"
panel-content bg-white
"
>
<
view
class
=
"
panel-title
"
>
基础信息
<
/view
>
<
view
qq
:
for
=
"
{{detail_list}}
"
qq
:
key
=
"
item
"
class
=
"
item br-b oh
"
>
<
view
class
=
"
title fl
"
>
{{
item
.
name
}}
<
/view
>
<
view
class
=
"
content fl br-l
"
>
{{
item
.
value
}}
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<!--
连续签到翻倍奖励配置
-->
<
view
qq
:
if
=
"
{{(detail.continuous_rules || null) != null && detail.continuous_rules.length > 0}}
"
class
=
"
panel-item spacing-mt
"
>
<
view
class
=
"
panel-content bg-white
"
>
<
view
class
=
"
panel-title
"
>
连续签到翻倍奖励配置
<
/view
>
<
view
qq
:
for
=
"
{{detail.continuous_rules}}
"
qq
:
key
=
"
item
"
class
=
"
item br-b oh
"
>
<
view
class
=
"
content fl br-l
"
>
连续
{{
item
.
number
}}
天
、
翻
{{
item
.
value
}}
倍
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<!--
指定时段额外奖励
-->
<
view
qq
:
if
=
"
{{(detail.specified_time_reward || null) != null && (detail.specified_time_reward.time_start || null) != null && (detail.specified_time_reward.time_end || null) != null && (detail.specified_time_reward.value || null) != null}}
"
class
=
"
panel-item spacing-mt
"
>
<
view
class
=
"
panel-content bg-white
"
>
<
view
class
=
"
panel-title
"
>
指定时段额外奖励
<
/view
>
<
view
class
=
"
item br-b oh
"
>
<
view
class
=
"
content fl br-l
"
>
时段
{{
detail
.
specified_time_reward
.
time_start
}}
~
{{
detail
.
specified_time_reward
.
time_end
}}
、
额外奖励
{{
detail
.
specified_time_reward
.
value
}}
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
import
src
=
"
/pages/common/bottom_line.qml
"
/>
<
template
is
=
"
bottom_line
"
data
=
"
{{status: data_bottom_line_status}}
"
><
/template
>
<
/view
>
<
view
qq
:
if
=
"
{{detail == null}}
"
>
<
import
src
=
"
/pages/common/nodata.qml
"
/>
<
template
is
=
"
nodata
"
data
=
"
{{status: data_list_loding_status, msg: data_list_loding_msg}}
"
><
/template
>
<
view
qq
:
if
=
"
{{data_list_loding_status != 1}}
"
class
=
"
nav-back tc wh-auto
"
>
<
navigator
open
-
type
=
"
navigateBack
"
hover
-
class
=
"
none
"
>
<
button
type
=
"
default
"
size
=
"
mini
"
class
=
"
cr-888 br
"
hover
-
class
=
"
none
"
>
返回
<
/button
>
<
/navigator
>
<
/view
>
<
/view>
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-qrcode-detail/user-qrcode-detail.qss
0 → 100644
浏览文件 @
d1d9db5a
.panel-item .panel-title {
background: #fff;
font-weight: bold;
padding: 15rpx;
border-bottom: 2px solid #eee;
font-size: 34rpx;
}
.panel-item .panel-content .item {
padding: 20rpx 0;
}
.panel-item .panel-content .item:last-child {
border: 0;
}
.panel-item .panel-content .item .title {
width: 25%;
padding-left: 20rpx;
}
.panel-item .panel-content .item .content {
width: calc(75% - 50rpx);
padding-left: 20rpx;
min-height: 46rpx;
word-wrap: break-word;
word-break: normal;
}
.panel-item .panel-content .item view {
line-height: 46rpx;
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.js
0 → 100644
浏览文件 @
d1d9db5a
const
app
=
getApp
();
Page
({
data
:
{
params
:
null
,
form_submit_loading
:
false
,
data_list_loding_status
:
1
,
data_list_loding_msg
:
''
,
data_base
:
null
,
data
:
null
,
},
onLoad
(
params
)
{
this
.
setData
({
params
:
params
});
this
.
init
();
},
onShow
()
{},
init
()
{
var
self
=
this
;
qq
.
showLoading
({
title
:
"
加载中...
"
});
this
.
setData
({
data_list_loding_status
:
1
});
qq
.
request
({
url
:
app
.
get_request_url
(
"
saveinfo
"
,
"
userqrcode
"
,
"
signin
"
),
method
:
"
POST
"
,
data
:
this
.
data
.
params
,
dataType
:
"
json
"
,
success
:
res
=>
{
qq
.
hideLoading
();
qq
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
self
.
setData
({
data_base
:
data
.
base
||
null
,
data
:
data
.
data
||
null
,
data_list_loding_status
:
0
,
});
}
else
{
self
.
setData
({
data_list_loding_status
:
2
,
data_list_loding_msg
:
res
.
data
.
msg
,
});
if
(
app
.
is_login_check
(
res
.
data
,
self
,
'
init
'
))
{
app
.
showToast
(
res
.
data
.
msg
);
}
}
},
fail
:
()
=>
{
qq
.
hideLoading
();
qq
.
stopPullDownRefresh
();
self
.
setData
({
data_list_loding_status
:
2
,
data_list_loding_msg
:
'
服务器请求出错
'
,
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
},
// 下拉刷新
onPullDownRefresh
()
{
this
.
init
();
},
// 表单提交
formSubmit
(
e
)
{
var
data
=
e
.
detail
.
value
;
if
((
this
.
data
.
data
||
null
)
!=
null
)
{
data
[
'
id
'
]
=
this
.
data
.
data
.
id
||
0
;
}
// 数据验证
var
validation
=
[
{
fields
:
'
name
'
,
msg
:
'
请填写联系人姓名格式 2~30 个字符之间
'
},
{
fields
:
'
tel
'
,
msg
:
'
请填写联系人电话 6~15 个字符
'
},
{
fields
:
'
address
'
,
msg
:
'
请填写联系人地址、最多230个字符
'
}
];
if
(
app
.
fields_check
(
data
,
validation
))
{
qq
.
showLoading
({
title
:
'
提交中...
'
});
this
.
setData
({
form_submit_loading
:
true
});
// 网络请求
var
self
=
this
;
qq
.
request
({
url
:
app
.
get_request_url
(
"
save
"
,
"
userqrcode
"
,
"
signin
"
),
method
:
'
POST
'
,
data
:
data
,
dataType
:
'
json
'
,
header
:
{
'
content-type
'
:
'
application/x-www-form-urlencoded
'
},
success
:
(
res
)
=>
{
qq
.
hideLoading
();
if
(
res
.
data
.
code
==
0
)
{
app
.
showToast
(
res
.
data
.
msg
,
"
success
"
);
setTimeout
(
function
()
{
// 是否签到也组队
if
((
self
.
data
.
params
||
null
)
!=
null
&&
(
self
.
data
.
params
.
is_team
||
0
)
==
1
)
{
qq
.
redirectTo
({
url
:
"
/pages/plugins/signin/index-detail/index-detail?id=
"
+
res
.
data
.
data
});
}
else
{
qq
.
navigateBack
();
}
},
2000
);
}
else
{
this
.
setData
({
form_submit_loading
:
false
});
if
(
app
.
is_login_check
(
res
.
data
))
{
app
.
showToast
(
res
.
data
.
msg
);
}
else
{
app
.
showToast
(
'
提交失败,请重试!
'
);
}
}
},
fail
:
()
=>
{
qq
.
hideLoading
();
this
.
setData
({
form_submit_loading
:
false
});
app
.
showToast
(
'
服务器请求出错
'
);
}
});
}
},
});
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.json
0 → 100644
浏览文件 @
d1d9db5a
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#f6b015"
,
"backgroundColorTop"
:
"#f6b015"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"签到码新增/编辑"
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.qml
0 → 100644
浏览文件 @
d1d9db5a
<
form
qq
:
if
=
"
{{data_list_loding_status != 1}}
"
bindsubmit
=
"
formSubmit
"
qq
:
if
=
"
{{data_list_loding_status == 0}}
"
>
<
view
class
=
"
content-top bg-white spacing-mb
"
>
<
view
>
邀请人奖励
<
text
class
=
"
cr-main
"
>
{{
data
.
reward_master
||
data_base
.
reward_master
}}
<
/text> 积分</
view
>
<
view
>
受邀人奖励
<
text
class
=
"
cr-main
"
>
{{
data
.
reward_invitee
||
data_base
.
reward_invitee
}}
<
/text> 积分</
view
>
<
/view
>
<
view
class
=
"
form-container spacing-mb oh
"
>
<
view
class
=
"
form-gorup bg-white
"
>
<
view
class
=
"
form-gorup-title
"
>
联系人姓名
<
text
class
=
"
form-group-tips-must
"
>
必填
<
/text></
view
>
<
input
type
=
"
text
"
name
=
"
name
"
placeholder
-
class
=
"
cr-ccc
"
class
=
"
cr-666
"
placeholder
=
"
联系人姓名格式 2~30 个字符之间
"
maxlength
=
"
30
"
value
=
"
{{data.name || ''}}
"
/>
<
/view
>
<
view
class
=
"
form-gorup bg-white
"
>
<
view
class
=
"
form-gorup-title
"
>
联系人电话
<
text
class
=
"
form-group-tips-must
"
>
必填
<
/text></
view
>
<
input
type
=
"
text
"
name
=
"
tel
"
placeholder
-
class
=
"
cr-ccc
"
class
=
"
cr-666
"
placeholder
=
"
联系人电话 6~15 个字符
"
maxlength
=
"
15
"
value
=
"
{{data.tel || ''}}
"
/>
<
/view
>
<
view
class
=
"
form-gorup bg-white
"
>
<
view
class
=
"
form-gorup-title
"
>
联系人地址
<
text
class
=
"
form-group-tips-must
"
>
必填
<
/text></
view
>
<
input
type
=
"
text
"
name
=
"
address
"
placeholder
-
class
=
"
cr-ccc
"
class
=
"
cr-666
"
placeholder
=
"
联系人地址、最多230个字符
"
maxlength
=
"
230
"
value
=
"
{{data.address || ''}}
"
/>
<
/view
>
<
view
class
=
"
form-gorup bg-white
"
>
<
view
class
=
"
form-gorup-title
"
>
备注
<
text
class
=
"
form-group-tips
"
>
选填
<
/text></
view
>
<
input
type
=
"
text
"
name
=
"
note
"
placeholder
-
class
=
"
cr-ccc
"
class
=
"
cr-666
"
placeholder
=
"
备注最多230个字符
"
maxlength
=
"
60
"
value
=
"
{{data.note || ''}}
"
/>
<
/view
>
<
view
class
=
"
form-gorup
"
>
<
button
class
=
"
bg-main submit-bottom
"
type
=
"
default
"
formType
=
"
submit
"
hover
-
class
=
"
none
"
loading
=
"
{{form_submit_loading}}
"
disabled
=
"
{{form_submit_loading}}
"
>
提交
<
/button
>
<
/view
>
<
/view
>
<
/form
>
<
view
qq
:
if
=
"
{{data_list_loding_status != 0}}
"
>
<
import
src
=
"
/pages/common/nodata.qml
"
/>
<
template
is
=
"
nodata
"
data
=
"
{{status: data_list_loding_status, msg: data_list_loding_msg}}
"
><
/template
>
<
/view>
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.qss
0 → 100644
浏览文件 @
d1d9db5a
.content-top {
padding: 30rpx 10rpx;
}
.content-top text {
font-size: 38rpx;
font-weight: bold;
}
.submit-bottom {
background-color: #f6b015 !important;
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-qrcode/user-qrcode.js
0 → 100644
浏览文件 @
d1d9db5a
const
app
=
getApp
();
Page
({
data
:
{
data_list_loding_status
:
1
,
data_bottom_line_status
:
false
,
params
:
null
,
data_base
:
null
,
data_list
:
[],
data_page_total
:
0
,
data_page
:
1
,
},
onLoad
(
params
)
{
this
.
setData
({
params
:
params
,
});
},
onShow
()
{
this
.
init
();
},
init
()
{
var
user
=
app
.
get_user_info
(
this
,
'
init
'
);
if
(
user
!=
false
)
{
// 用户未绑定用户则转到登录页面
if
(
app
.
user_is_need_login
(
user
))
{
qq
.
redirectTo
({
url
:
"
/pages/login/login?event_callback=init
"
});
return
false
;
}
else
{
// 获取数据
this
.
get_data_list
();
}
}
else
{
this
.
setData
({
data_list_loding_status
:
0
,
data_bottom_line_status
:
false
,
});
}
},
// 获取数据
get_data_list
(
is_mandatory
)
{
// 分页是否还有数据
if
((
is_mandatory
||
0
)
==
0
)
{
if
(
this
.
data
.
data_bottom_line_status
==
true
)
{
return
false
;
}
}
// 加载loding
qq
.
showLoading
({
title
:
"
加载中...
"
});
this
.
setData
({
data_list_loding_status
:
1
});
// 请求数据
var
data
=
{
page
:
this
.
data
.
data_page
};
// 获取数据
qq
.
request
({
url
:
app
.
get_request_url
(
"
index
"
,
"
userqrcode
"
,
"
signin
"
),
method
:
"
POST
"
,
data
:
data
,
dataType
:
"
json
"
,
success
:
res
=>
{
qq
.
hideLoading
();
qq
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
if
(
res
.
data
.
data
.
data
.
length
>
0
)
{
if
(
this
.
data
.
data_page
<=
1
)
{
var
temp_data_list
=
res
.
data
.
data
.
data
;
}
else
{
var
temp_data_list
=
this
.
data
.
data_list
;
var
temp_data
=
res
.
data
.
data
.
data
;
for
(
var
i
in
temp_data
)
{
temp_data_list
.
push
(
temp_data
[
i
]);
}
}
this
.
setData
({
data_base
:
res
.
data
.
data
.
base
||
null
,
data_list
:
temp_data_list
,
data_total
:
res
.
data
.
data
.
total
,
data_page_total
:
res
.
data
.
data
.
page_total
,
data_list_loding_status
:
3
,
data_page
:
this
.
data
.
data_page
+
1
,
});
// 是否还有数据
if
(
this
.
data
.
data_page
>
1
&&
this
.
data
.
data_page
>
this
.
data
.
data_page_total
)
{
this
.
setData
({
data_bottom_line_status
:
true
});
}
else
{
this
.
setData
({
data_bottom_line_status
:
false
});
}
}
else
{
this
.
setData
({
data_base
:
res
.
data
.
data
.
base
||
null
,
data_list_loding_status
:
0
,
data_list
:
[],
data_bottom_line_status
:
false
,
});
}
}
else
{
this
.
setData
({
data_list_loding_status
:
0
,
});
if
(
app
.
is_login_check
(
res
.
data
,
this
,
'
get_data_list
'
))
{
app
.
showToast
(
res
.
data
.
msg
);
}
}
},
fail
:
()
=>
{
qq
.
hideLoading
();
qq
.
stopPullDownRefresh
();
this
.
setData
({
data_list_loding_status
:
2
,
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
},
// 下拉刷新
onPullDownRefresh
()
{
this
.
setData
({
data_page
:
1
});
this
.
get_data_list
(
1
);
},
// 滚动加载
scroll_lower
(
e
)
{
this
.
get_data_list
();
},
// 查看详情
show_event
(
e
)
{
var
value
=
e
.
currentTarget
.
dataset
.
value
;
qq
.
navigateTo
({
url
:
'
/pages/plugins/signin/index-detail/index-detail?id=
'
+
value
,
});
},
// 签到用户
coming_event
(
e
)
{
var
value
=
e
.
currentTarget
.
dataset
.
value
;
qq
.
navigateTo
({
url
:
'
/pages/plugins/signin/user-coming-list/user-coming-list?id=
'
+
value
,
});
},
// 编辑
edit_event
(
e
)
{
var
value
=
e
.
currentTarget
.
dataset
.
value
;
qq
.
navigateTo
({
url
:
'
/pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo?id=
'
+
value
,
});
},
// 组队签到
team_event
(
e
)
{
qq
.
navigateTo
({
url
:
'
/pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo
'
,
});
},
});
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-qrcode/user-qrcode.json
0 → 100644
浏览文件 @
d1d9db5a
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#f6b015"
,
"backgroundColorTop"
:
"#f6b015"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"签到码管理"
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-qrcode/user-qrcode.qml
0 → 100644
浏览文件 @
d1d9db5a
<
scroll
-
view
scroll
-
y
=
"
{{true}}
"
class
=
"
scroll-box
"
bindscrolltolower
=
"
scroll_lower
"
lower
-
threshold
=
"
30
"
>
<
view
class
=
"
data-list
"
>
<
block
qq
:
if
=
"
{{data_list.length > 0}}
"
>
<
view
class
=
"
item bg-white spacing-mb
"
qq
:
for
=
"
{{data_list}}
"
qq
:
key
=
"
key
"
>
<
view
class
=
"
base oh br-b
"
>
<
text
class
=
"
cr-666
"
>
{{
item
.
add_time
}}
<
/text
>
<
/view
>
<
navigator
url
=
"
/pages/plugins/signin/user-qrcode-detail/user-qrcode-detail?id={{item.id}}
"
hover
-
class
=
"
none
"
>
<
view
class
=
"
content
"
>
<
view
class
=
"
single-text
"
>
<
text
class
=
"
title cr-666
"
>
是否启用
<
/text
>
<
text
class
=
"
value
"
>
{{
item
.
is_enable_name
}}
<
/text
>
<
/view
>
<
view
class
=
"
single-text
"
>
<
text
class
=
"
title cr-666
"
>
邀请人奖励积分
<
/text
>
<
text
class
=
"
value
"
>
{{
item
.
reward_master
}}
<
/text
>
<
/view
>
<
view
class
=
"
single-text
"
>
<
text
class
=
"
title cr-666
"
>
受邀人奖励积分
<
/text
>
<
text
class
=
"
value
"
>
{{
item
.
reward_invitee
}}
<
/text
>
<
/view
>
<
/view
>
<
/navigator
>
<
view
class
=
"
operation tr br-t-dashed
"
>
<
button
class
=
"
cr-666 br
"
type
=
"
default
"
size
=
"
mini
"
hover
-
class
=
"
none
"
data
-
value
=
"
{{item.id}}
"
bindtap
=
"
show_event
"
>
查看
<
/button
>
<
button
qq
:
if
=
"
{{(data_base.is_team_show_coming_user || 0) == 1}}
"
class
=
"
cr-666 br
"
type
=
"
default
"
size
=
"
mini
"
hover
-
class
=
"
none
"
data
-
value
=
"
{{item.id}}
"
bindtap
=
"
coming_event
"
>
签到
<
/button
>
<
button
class
=
"
cr-666 br
"
type
=
"
default
"
size
=
"
mini
"
hover
-
class
=
"
none
"
data
-
value
=
"
{{item.id}}
"
bindtap
=
"
edit_event
"
>
编辑
<
/button
>
<
/view
>
<
/view
>
<
/block
>
<
block
qq
:
else
>
<
view
qq
:
if
=
"
{{(data_base || null) != null && (data_base.is_team || 0) == 1}}
"
class
=
"
user-team-container tc
"
>
<
button
type
=
"
default
"
hover
-
class
=
"
none
"
bindtap
=
"
team_event
"
>
组队签到
<
/button
>
<
view
>
组队分享让更多人参与签到
、
获得更多积分奖励
<
/view
>
<
/view
>
<
view
qq
:
else
>
<
import
src
=
"
/pages/common/nodata.qml
"
/>
<
template
is
=
"
nodata
"
data
=
"
{{status: data_list_loding_status}}
"
><
/template
>
<
/view
>
<
/block
>
<
import
src
=
"
/pages/common/bottom_line.qml
"
/>
<
template
is
=
"
bottom_line
"
data
=
"
{{status: data_bottom_line_status}}
"
><
/template
>
<
/view
>
<
/scroll-view>
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-qrcode/user-qrcode.qss
0 → 100644
浏览文件 @
d1d9db5a
/*
* 列表
*/
.data-list .item .base,
.data-list .item .content {
padding: 20rpx 10rpx;
}
.data-list .item .content .single-text {
line-height: 50rpx;
}
.data-list .item .content .single-text .title {
margin-right: 30rpx;
}
.data-list .item .content .single-text .value {
font-weight: 500;
}
.data-list .item .content .single-text .unit {
margin-left: 10rpx;
}
.data-list .item .operation {
padding: 20rpx 10rpx;
}
.data-list .item .operation button:not(:first-child) {
margin-left: 30rpx;
}
/*
* 组队签到
*/
.user-team-container {
padding-top: 35%;
}
.user-team-container button {
margin-bottom: 50rpx;
width: 50%;
background-color: #f6b015;
color: #fff;
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-signin/user-signin.js
0 → 100644
浏览文件 @
d1d9db5a
const
app
=
getApp
();
Page
({
data
:
{
data_list
:
[],
data_page_total
:
0
,
data_page
:
1
,
data_list_loding_status
:
1
,
data_bottom_line_status
:
false
,
params
:
null
,
},
onLoad
(
params
)
{
this
.
setData
({
params
:
params
,
});
this
.
init
();
},
onShow
()
{
},
init
()
{
var
user
=
app
.
get_user_info
(
this
,
'
init
'
);
if
(
user
!=
false
)
{
// 用户未绑定用户则转到登录页面
if
(
app
.
user_is_need_login
(
user
))
{
qq
.
redirectTo
({
url
:
"
/pages/login/login?event_callback=init
"
});
return
false
;
}
else
{
// 获取数据
this
.
get_data_list
();
}
}
else
{
this
.
setData
({
data_list_loding_status
:
0
,
data_bottom_line_status
:
false
,
});
}
},
// 获取数据
get_data_list
(
is_mandatory
)
{
// 分页是否还有数据
if
((
is_mandatory
||
0
)
==
0
)
{
if
(
this
.
data
.
data_bottom_line_status
==
true
)
{
return
false
;
}
}
// 加载loding
qq
.
showLoading
({
title
:
"
加载中...
"
});
this
.
setData
({
data_list_loding_status
:
1
});
// 获取数据
qq
.
request
({
url
:
app
.
get_request_url
(
"
index
"
,
"
usersignin
"
,
"
signin
"
),
method
:
"
POST
"
,
data
:
{
page
:
this
.
data
.
data_page
,
},
dataType
:
"
json
"
,
success
:
res
=>
{
qq
.
hideLoading
();
qq
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
if
(
res
.
data
.
data
.
data
.
length
>
0
)
{
if
(
this
.
data
.
data_page
<=
1
)
{
var
temp_data_list
=
res
.
data
.
data
.
data
;
}
else
{
var
temp_data_list
=
this
.
data
.
data_list
;
var
temp_data
=
res
.
data
.
data
.
data
;
for
(
var
i
in
temp_data
)
{
temp_data_list
.
push
(
temp_data
[
i
]);
}
}
this
.
setData
({
data_list
:
temp_data_list
,
data_total
:
res
.
data
.
data
.
total
,
data_page_total
:
res
.
data
.
data
.
page_total
,
data_list_loding_status
:
3
,
data_page
:
this
.
data
.
data_page
+
1
,
});
// 是否还有数据
if
(
this
.
data
.
data_page
>
1
&&
this
.
data
.
data_page
>
this
.
data
.
data_page_total
)
{
this
.
setData
({
data_bottom_line_status
:
true
});
}
else
{
this
.
setData
({
data_bottom_line_status
:
false
});
}
}
else
{
this
.
setData
({
data_list_loding_status
:
0
,
data_list
:
[],
data_bottom_line_status
:
false
,
});
}
}
else
{
this
.
setData
({
data_list_loding_status
:
0
,
});
if
(
app
.
is_login_check
(
res
.
data
,
this
,
'
get_data_list
'
))
{
app
.
showToast
(
res
.
data
.
msg
);
}
}
},
fail
:
()
=>
{
qq
.
hideLoading
();
qq
.
stopPullDownRefresh
();
this
.
setData
({
data_list_loding_status
:
2
,
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
},
// 下拉刷新
onPullDownRefresh
()
{
this
.
setData
({
data_page
:
1
});
this
.
get_data_list
(
1
);
},
// 滚动加载
scroll_lower
(
e
)
{
this
.
get_data_list
();
},
});
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-signin/user-signin.json
0 → 100644
浏览文件 @
d1d9db5a
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#f6b015"
,
"backgroundColorTop"
:
"#f6b015"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"我的签到"
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-signin/user-signin.qml
0 → 100644
浏览文件 @
d1d9db5a
<
scroll
-
view
scroll
-
y
=
"
{{true}}
"
class
=
"
scroll-box
"
bindscrolltolower
=
"
scroll_lower
"
lower
-
threshold
=
"
30
"
>
<
view
class
=
"
data-list
"
>
<
view
class
=
"
item bg-white spacing-mb
"
qq
:
if
=
"
{{data_list.length > 0}}
"
qq
:
for
=
"
{{data_list}}
"
qq
:
key
=
"
key
"
>
<
view
class
=
"
content
"
>
<
view
class
=
"
single-text
"
>
<
text
class
=
"
title cr-666
"
>
奖励积分
<
/text
>
<
text
class
=
"
value
"
>
{{
item
.
integral
}}
<
/text
>
<
/view
>
<
view
class
=
"
single-text
"
>
<
text
class
=
"
title cr-666
"
>
签到时间
<
/text
>
<
text
class
=
"
value
"
>
{{
item
.
add_time
}}
<
/text
>
<
/view
>
<
/view
>
<
/view
>
<
view
qq
:
if
=
"
{{data_list.length == 0}}
"
>
<
import
src
=
"
/pages/common/nodata.qml
"
/>
<
template
is
=
"
nodata
"
data
=
"
{{status: data_list_loding_status}}
"
>
<
/template
>
<
/view
>
<
import
src
=
"
/pages/common/bottom_line.qml
"
/>
<
template
is
=
"
bottom_line
"
data
=
"
{{status: data_bottom_line_status}}
"
><
/template
>
<
/view
>
<
/scroll-view>
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user-signin/user-signin.qss
0 → 100644
浏览文件 @
d1d9db5a
.scroll-box {
height: 100vh;
}
.data-list .item .content {
padding: 20rpx 10rpx;
}
.data-list .item .content .single-text {
line-height: 50rpx;
}
.data-list .item .content .single-text .title {
margin-right: 30rpx;
}
.data-list .item .content .single-text .value {
font-weight: 500;
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user/user.js
0 → 100644
浏览文件 @
d1d9db5a
const
app
=
getApp
();
Page
({
data
:
{
data_bottom_line_status
:
false
,
data_list_loding_status
:
1
,
data_list_loding_msg
:
''
,
data_base
:
null
,
nav_list
:
[],
},
onLoad
(
params
)
{},
onShow
()
{
this
.
init
();
},
init
(
e
)
{
var
user
=
app
.
get_user_info
(
this
,
"
init
"
),
self
=
this
;
if
(
user
!=
false
)
{
// 用户未绑定用户则转到登录页面
if
(
app
.
user_is_need_login
(
user
))
{
qq
.
showModal
({
title
:
'
温馨提示
'
,
content
:
'
绑定手机号码
'
,
confirmText
:
'
确认
'
,
cancelText
:
'
暂不
'
,
success
:
(
result
)
=>
{
qq
.
stopPullDownRefresh
();
if
(
result
.
confirm
)
{
qq
.
navigateTo
({
url
:
"
/pages/login/login?event_callback=init
"
});
}
},
});
}
else
{
self
.
get_data
();
}
}
},
// 获取数据
get_data
()
{
var
self
=
this
;
qq
.
request
({
url
:
app
.
get_request_url
(
"
center
"
,
"
user
"
,
"
signin
"
),
method
:
"
POST
"
,
data
:
{},
dataType
:
"
json
"
,
success
:
res
=>
{
qq
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
// 是否开启组队
var
temp_nav_list
=
[
{
icon
:
"
/images/plugins/signin/user-signin-icon.png
"
,
title
:
"
我的签到
"
,
url
:
"
/pages/plugins/signin/user-signin/user-signin
"
,
}
];
if
((
data
.
base
||
null
)
!=
null
&&
(
data
.
base
.
is_team
||
0
)
==
1
)
{
temp_nav_list
.
push
({
icon
:
"
/images/plugins/signin/user-qrcode-icon.png
"
,
title
:
"
签到码管理
"
,
url
:
"
/pages/plugins/signin/user-qrcode/user-qrcode
"
,
});
}
self
.
setData
({
data_base
:
data
.
base
||
null
,
nav_list
:
temp_nav_list
,
data_list_loding_msg
:
''
,
data_list_loding_status
:
0
,
data_bottom_line_status
:
false
,
});
}
else
{
self
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
res
.
data
.
msg
,
});
if
(
app
.
is_login_check
(
res
.
data
,
self
,
'
get_data
'
))
{
app
.
showToast
(
res
.
data
.
msg
);
}
}
},
fail
:
()
=>
{
qq
.
stopPullDownRefresh
();
self
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
'
服务器请求出错
'
,
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
},
// 下拉刷新
onPullDownRefresh
()
{
this
.
get_data
();
},
});
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user/user.json
0 → 100644
浏览文件 @
d1d9db5a
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#f6b015"
,
"backgroundColorTop"
:
"#f6b015"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarTitleText"
:
"签到"
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user/user.qml
0 → 100644
浏览文件 @
d1d9db5a
<!--
导航
-->
<
view
qq
:
if
=
"
{{nav_list.length > 0}}
"
class
=
"
nav oh bg-white
"
>
<
block
qq
:
for
=
"
{{nav_list}}
"
qq
:
key
=
"
key
"
>
<
navigator
url
=
"
{{item.url}}
"
hover
-
class
=
"
none
"
>
<
view
class
=
"
item fl tc
"
>
<
image
src
=
"
{{item.icon}}
"
mode
=
"
scaleToFill
"
class
=
"
dis-block
"
/>
<
view
class
=
"
title
"
>
{{
item
.
title
}}
<
/view
>
<
/view
>
<
/navigator
>
<
/block
>
<
/view
>
<!--
通知
-->
<
view
qq
:
if
=
"
{{(data_base || null) != null && (data_base.signin_desc || null) != null && data_base.signin_desc.length > 0}}
"
class
=
"
tips-container spacing-mt
"
>
<
view
class
=
"
tips
"
>
<
view
qq
:
for
=
"
{{data_base.signin_desc}}
"
qq
:
key
=
"
key
"
class
=
"
item
"
>
{{
item
}}
<
/view
>
<
/view
>
<
/view>
\ No newline at end of file
sourcecode/qq/default/pages/plugins/signin/user/user.qss
0 → 100644
浏览文件 @
d1d9db5a
/*
* 导航
*/
.nav {
border-top: 1px solid #eee;
}
.nav .item {
padding: 30rpx 0;
width: calc(50% - 1px);
border-bottom: 1px solid #eee;
}
.nav .item:nth-child(odd) {
border-right: 1px solid #eee;
}
.nav .item image {
width: 100rpx;
height: 100rpx;
margin: 0 auto;
}
.nav .item .title {
margin-top: 20rpx;
}
/*
* 提示信息
*/
.tips-container {
padding: 0 10rpx;
}
\ No newline at end of file
sourcecode/toutiao/default/pages/plugins/signin/index-detail/index-detail.js
浏览文件 @
d1d9db5a
...
...
@@ -209,14 +209,4 @@ Page({
path
:
'
/pages/plugins/signin/index-detail/index-detail?id=
'
+
this
.
data
.
data
.
id
+
'
&referrer=
'
+
user_id
};
},
// 分享朋友圈
onShareTimeline
()
{
var
user_id
=
app
.
get_user_cache_info
(
'
id
'
,
0
)
||
0
;
return
{
title
:
this
.
data
.
data
.
seo_title
||
'
签到 -
'
+
app
.
data
.
application_title
,
query
:
'
id=
'
+
this
.
data
.
data
.
id
+
'
&referrer=
'
+
user_id
,
imageUrl
:
this
.
data
.
data
.
right_images
||
''
};
},
});
\ No newline at end of file
sourcecode/toutiao/default/pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.js
浏览文件 @
d1d9db5a
...
...
@@ -71,7 +71,7 @@ Page({
var
data
=
e
.
detail
.
value
;
if
((
this
.
data
.
data
||
null
)
!=
null
)
{
data
[
'
id
'
]
=
this
.
data
.
data
.
id
;
data
[
'
id
'
]
=
this
.
data
.
data
.
id
||
0
;
}
// 数据验证
var
validation
=
[
...
...
sourcecode/weixin/default/pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo.js
浏览文件 @
d1d9db5a
...
...
@@ -71,7 +71,7 @@ Page({
var
data
=
e
.
detail
.
value
;
if
((
this
.
data
.
data
||
null
)
!=
null
)
{
data
[
'
id
'
]
=
this
.
data
.
data
.
id
;
data
[
'
id
'
]
=
this
.
data
.
data
.
id
||
0
;
}
// 数据验证
var
validation
=
[
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录