银花优选微信小程序修改后的最新版本代码

This commit is contained in:
ss001
2026-02-07 16:22:31 +08:00
commit c00caf5744
516 changed files with 41796 additions and 0 deletions

127
pages/checkin_log/index.js Normal file
View File

@@ -0,0 +1,127 @@
var app = getApp()
var that = null
var sopenFrame = null
Page({
data: {
balanceImg: '../../images/order-null.png',
tipWords: '亲,暂时没有数据哦!',
balanceHidden: false,
nobalanceHidden: true,
loadingHidden: false,
mybalance: [],
Start: 0,
ZZEnable: 1,
TXEnable: 0,
nav: 0,
},
onLoad: function (options) {
that = this
if (options.t) {
that.setData({
nav: options.t
});
}
sopenFrame = setInterval(function () {
if (app.globalData.IFRefreshmybalance == 1) {
app.globalData.IFRefreshmybalance = 0
that.clearCache(); //清本页缓存
that.getlist(0)
}
}, 1000);
that.clearCache(); //清本页缓存
that.getlist(0)
}, // 下拉刷新
onPullDownRefresh: function () {
//在当前页面显示导航条加载动画
wx.showNavigationBarLoading();
//显示 loading 提示框。需主动调用 wx.hideLoading 才能关闭提示框
wx.showLoading({
title: '刷新中...',
})
that.clearCache();
that.getlist(1); //第一次加载数据
},
// 页面上拉触底事件(上拉加载更多)
onReachBottom: function () {
if (that.data.loadingHidden) {
that.setData({
loadingHidden: false
});
that.getlist(2); //后台获取新数据并追加渲染
} else {
wx.hideLoading();
}
},
// 清缓存
clearCache: function () {
that.setData({
balanceHidden: false,
nobalanceHidden: true,
loadingHidden: false,
Start: 0,
mybalance: []
});
},
getlist: function (gp) {
that = this
var userId = wx.getStorageSync("userId")
wx.request({
url: app.globalData.apiurl + "/api/api.ashx?action=user_sign_list",
data: {
userId: (userId == null ? "" : userId)
},
method: "POST",
dataType: "json",
header: {
"content-type": "application/x-www-form-urlencoded"
},
success(res) {
if (res.data.status == 1) {
var tmpArr = null;
tmpArr = that.data.mybalance;
tmpArr.push.apply(tmpArr, res.data.listResult);
that.setData({
mybalance: tmpArr,
Start: that.data.Start + res.data.listResult.length,
loadingHidden: true
})
if (gp == 0 || gp == 1) {
if (res.data.listResult.length > 0) {
that.setData({
balanceHidden: false,
nobalanceHidden: true
})
} else {
that.setData({
balanceHidden: true,
nobalanceHidden: false
})
}
}
}
if (gp == 1) {
//隐藏loading 提示框
wx.hideLoading();
//隐藏导航条加载动画
wx.hideNavigationBarLoading();
//停止下拉刷新
wx.stopPullDownRefresh();
}
}
})
},
onnav: function (e) {
var index = e.currentTarget.dataset.id
that.setData({
nav: index
})
that.clearCache();
that.getlist(0);
}
})

View File

@@ -0,0 +1,3 @@
{
"navigationBarTitleText": "用户签到明细"
}

View File

@@ -0,0 +1,44 @@
<view class="container">
<!-- <view class="button_box" wx:if="{{nav==1&&TXEnable==0}}">
<view class="button_box_item" style="width:100%" wx:if="{{nav==11}}">
<view class="mybtn" bindtap="onzz">互转</view>
</view>
<view class="button_box_item" wx:if="{{nav==11}}">
<view class="mybtn" bindtap="onzz">互转</view>
</view>
<view class="button_box_item" wx:if="{{nav==1}}">
<view class="mybtn" bindtap="ontx">提现</view>
</view>
<view class="button_box_item" style="width:100%" wx:if="{{nav==2}}">
<view class="mybtn" bindtap="onzh">划转流量积分</view>
</view>
</view> -->
<view class="mybalance-box" hidden="{{balanceHidden}}">
<view class="mybalance-item" wx:for="{{mybalance}}" wx:for-index="index" wx:key="id">
<view class="Total">
<view><text>兑换券增减:</text>{{item.ClassId==1?"+"+item.Point:"-"+item.Point}}</view>
<view class="right"><text>余额:</text>{{item.AfterPoint}}</view>
</view>
<view>
<text>时间:</text>{{item.CreateDay}}
</view>
<view>
<text>备注:</text>{{item.Remark}}
</view>
</view>
</view>
<view class="nodata" hidden="{{nobalanceHidden}}">
<image src="../../images/order-null.png"/>
<view>暂无数据</view>
</view>
</view>
<loading hidden="{{loadingHidden}}">
加载中...
</loading>

View File

@@ -0,0 +1,67 @@
page{
background: #ccc;
}
.container {
position: relative;
width: 100%;
height: 100%;
font-size: 14px;
color: #000;
}
.container .balance-image {
width: 80px;
height: 80px;
}
.button_box{
display: flex;
flex-direction: row;
margin: 0;
padding:0;
padding-right: 0.8em;
box-sizing: border-box;
align-items: center;
justify-content: center;
background-color: #fff;
}
.button_box .button_box_item{
display: flex;
flex-direction: column;
flex-grow: 1;
width:50%;
height:2.5em;
margin: 0;
padding: 0.8em;
padding-right: 0;
}
.button_box .button_box_item .mybtn{
width: 100%;
height: 100%;
border-radius: 0.4em;
background-color: #00B050;
color:#fff;
line-height: 2.5em;
text-align: center;
}
.mybalance-menu{display: flex;flex-direction: row;align-items: center;justify-content: center;width:100%; background-color: #fff;}
.mybalance-menu view{width:25%; height:2.5em; line-height: 2.5em; text-align: center; border:1px solid #f1f1f1; border-left:0;border-top: 0;}
.mybalance-menu view.hover{border-bottom:1px solid #ff4d00;}
.mybalance-box{display: flex;flex-direction: column;align-items: center;justify-content: center;width:100%;padding:0.8em; box-sizing: border-box;}
.mybalance-item{width:100%;display: flex;flex-direction: column; align-items: center;justify-content: center;box-sizing: border-box; padding:0.5em 0.8em; margin:0.8em 0; margin-top: 0; line-height: 2em; background-color:#fff;border-radius:0.5em;}
.mybalance-item view{width:100%;flex-direction: row; align-items: center;justify-content:left;color: #939393;}
.mybalance-item view text{color: #000;}
.mybalance-item view text.Totalprice{ margin-left: 1em;}
.mybalance-item view.Total{float: left; display: block;}
.mybalance-item view.Total view{float: left; display: block;width:auto; margin:0; padding:0;color:#ff4d00; box-sizing: border-box; overflow: hidden;}
.mybalance-item view.Total view.right{float:right;}
.mybalance-item view.Total view text{float: left; display: block;width:auto;color: #000;}
.nodata{padding-top:1em; text-align: center; line-height: 1.5em; color:#939393;}
.nodata image {
width: 80px;
height: 80px;
}