From d9cb8e57537fe5764018f53a224f6afceec64f9e Mon Sep 17 00:00:00 2001
From: liuwh <liuwh@hugeinfo.com.cn>
Date: Tue, 24 Mar 2020 09:22:06 +0800
Subject: [PATCH] 提交
---
SunshineLnsMinApp/pages/fzpxInfo/fzpxInfo.js | 37 +++++++++++++++++++++++++++++++++++--
1 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/SunshineLnsMinApp/pages/fzpxInfo/fzpxInfo.js b/SunshineLnsMinApp/pages/fzpxInfo/fzpxInfo.js
index 1efb2b9..4704e66 100644
--- a/SunshineLnsMinApp/pages/fzpxInfo/fzpxInfo.js
+++ b/SunshineLnsMinApp/pages/fzpxInfo/fzpxInfo.js
@@ -12,6 +12,9 @@
loading: false,
peopleInfo: {},
signStatus: '',
+ id: "",
+ topattList:[],
+ bottomattList:[]
},
/**
@@ -39,7 +42,9 @@
if (res.data.code == 0) {
res.data.data.startTime = app.formatDate(res.data.data.startTime)
that.setData({
- activity: res.data.data
+ activity: res.data.data,
+ bottomattList:res.data.data.attList.filter((item)=>(item.associateType==1020)),
+ topattList:res.data.data.attList.filter((item)=>(item.associateType==1000))
})
console.log('传过来', options.flag)
console.log('传过来', options.signStatus)
@@ -48,7 +53,7 @@
that.setData({
signStatus: options.signStatus
})
- } else {
+ } else {sign
if (options.flag == 'true') {
//可报名
console.log('可报名')
@@ -121,11 +126,39 @@
// 签到
sign: function () {
+ var id = this.data.id;
+ var userinfo = wx.getStorageSync("user");
+ var userId = userinfo.id;
// 只允许从相机扫码
wx.scanCode({
onlyFromCamera: true,
success(res) {
console.log(res)
+ wx.showLoading({
+ title: '识别中',
+ })
+ wx.request({
+ url: app.globalData.url + '/api/activity/sign?id='+id+'&code='+res.result+'&userId='+userId,
+ method: 'GET',
+ header: {
+ "Content-Type": "application/json"
+ },
+ success: function (res) {
+ wx.hideLoading();
+ if (res.data.code == 0) {
+ wx.showToast({
+ title: '签到成功!',
+ icon: 'success',
+ duration: 2000
+ })
+ } else {
+ wx.showToast({
+ title: '签到失败,请稍后重试!',
+ icon: 'none'
+ })
+ }
+ }
+ })
}
})
},
--
Gitblit v1.8.0