From a986630ef222dbf2688f940d2c634d56fffbf0bc Mon Sep 17 00:00:00 2001
From: meo <18801474720@163.com>
Date: Tue, 2 Apr 2019 21:03:24 +0800
Subject: [PATCH] =?UTF-8?q?[=E9=A6=96=E6=AC=A1=E7=99=BB=E5=BD=95][?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0]:[=E9=A6=96=E6=AC=A1=E7=99=BB=E5=BD=95?=
=?UTF-8?q?=E8=8E=B7=E5=BE=97=E6=88=90=E9=95=BF=E5=80=BC]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/index/index.js | 7 +------
pages/main/index.js | 37 +++++++++++++++++++++++++++----------
pages/main/index.wxml | 6 ++++++
pages/main/index.wxss | 33 +++++++++++++++++++++++++++++++++
4 files changed, 67 insertions(+), 16 deletions(-)
diff --git a/pages/index/index.js b/pages/index/index.js
index ee50683..2374188 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -189,12 +189,7 @@ Page({
app.globalData.token = res.data.token;
if (res.data && res.data.score) {
if (res.data.score != 0){
- }else{
- wx.showToast({
- title: '获得' + res.data.score+'成长值',
- duration:2000,
- icon:"none"
- })
+ app.globalData.score=res.data.score;
}
}
Http.setToken(res.data.token);
diff --git a/pages/main/index.js b/pages/main/index.js
index 7bb225d..ce6d665 100644
--- a/pages/main/index.js
+++ b/pages/main/index.js
@@ -30,6 +30,8 @@ Page({
market: app.globalData.market,
list: [],
loading: true,
+ fistLogin:null,
+ alphaData: null,
swiperCurrent: 0,
title: null,
desc: null,
@@ -54,6 +56,11 @@ Page({
showIf:false
})
},
+ alphaClick: function (even) {
+ var animation = wx.createAnimation({})
+ animation.opacity(0).step({ duration: 2000 })
+ this.setData({ alphaData: animation.export() })
+ },
// 我的卡包
mycard:function(){
wx.navigateTo({
@@ -233,8 +240,6 @@ Page({
onLoad: function(options) {
let that = this;
let optionss = JSON.parse(wx.getStorageSync('options'));
- console.log(optionss);
- console.log("-------------------------------------------optionssss------------------------------------")
if (options.played == "true") {
that.setData({
played: true
@@ -252,7 +257,8 @@ Page({
// util.barcode("barcode", optionss.quancode, 510, 100);
},
onShow: function() {
- this.setData({
+ let that = this;
+ that.setData({
havePlayEd: app.globalData.havePlayEd ? app.globalData.havePlayEd : false
})
let num = wx.getStorageSync('couponNum');
@@ -261,14 +267,14 @@ Page({
wx.showTabBarRedDot({
index: 2
})
- this.setData({
+ that.setData({
display: "block"
})
}else{
wx.hideTabBarRedDot({
index: 2
})
- this.setData({
+ that.setData({
display: "none"
})
}
@@ -276,17 +282,27 @@ Page({
wx.showTabBarRedDot({
index: 2
})
- this.setData({
+ that.setData({
display1: "block"
})
} else {
wx.hideTabBarRedDot({
index: 2
})
- this.setData({
+ that.setData({
display1: "none"
})
}
+ console.log(app.globalData.score)
+ if (app.globalData.score){
+ that.setData({
+ fistLogin: app.globalData.score
+ })
+ }
+ // 如果有游戏
+ setTimeout(function(){
+ that.alphaClick();
+ },8000)
},
// 会员码获取
getmemberId: function(token) {
@@ -426,7 +442,7 @@ Page({
}).then(res => {
if (res.data.id) {
_this.setData({
- showGame: true
+ showGame: true,
})
}else{
_this.setData({
@@ -441,6 +457,7 @@ Page({
_this.setData({
showGame: false
})
+ this.alphaClick();
})
},
/**
@@ -455,14 +472,14 @@ Page({
pageSize: 7
}
}).then(res => {
- that.getmemberId(app.globalData.token);
+ // that.getmemberId(app.globalData.token);
// that.checkUserCarStatus();
that.setData({
list: res.data.list
});
})
.catch(err => {
- that.getmemberId(app.globalData.token);
+ // that.getmemberId(app.globalData.token);
// that.checkUserCarStatus();
})
;
diff --git a/pages/main/index.wxml b/pages/main/index.wxml
index bb6fe66..a2fbc81 100644
--- a/pages/main/index.wxml
+++ b/pages/main/index.wxml
@@ -86,4 +86,10 @@
+
+
+
+
+
+ 您今日签到成功,获得{{fistLogin}}成长值
diff --git a/pages/main/index.wxss b/pages/main/index.wxss
index c183cea..892ad91 100644
--- a/pages/main/index.wxss
+++ b/pages/main/index.wxss
@@ -278,4 +278,37 @@ height:100%;
width:690rpx;
height:120rpx;
border-radius:60rpx;
+}
+.signin{
+ width: 542rpx;
+ height: 94rpx;
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ z-index: 100;
+ margin: auto;
+}
+.signin open-data {
+ position: absolute;
+ width:90rpx;
+ left: 0;
+ top: 0;
+ bottom: 0;
+ height:94rpx;
+ margin: auto;
+ border-radius: 50%;
+ overflow: hidden;
+}
+.signin text{
+ display: block;
+ background: rgba(0, 0, 0, 0.5);
+ font-size: 28rpx;
+ height: 80rpx;
+ width: 100%;
+ line-height: 80rpx;
+ color: #D6D5D5;
+ text-indent: 4em;
+ border-radius:60rpx;
+ margin-top: 7rpx;
}
\ No newline at end of file