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

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

View File

@@ -0,0 +1,158 @@
var app = getApp()
var that=null
var sopenFrame=null
var wait=120
Page( {
data: {
loadingHidden:false,
nodataHidden:true,
t:0,
t0:0,
MemberId:0,
mybalance:[],
Start: 0,
startDate:"",
endDate:"",
zsymoney:"0"
},
onLoad: function(options) {
that = this
if(options.t){
that.setData({
t:options.t
});
}
if(options.t0){
that.setData({
t0:options.t0
});
}
if(options.MemberId){
that.setData({
MemberId:options.MemberId
});
}
if(that.data.t==1){
wx.setNavigationBarTitle({
title: "今日扫码记录"
})
}
if(that.data.t==2){
wx.setNavigationBarTitle({
title: "昨日扫码记录"
})
}
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({
loadingHidden:false,
Start: 0,
mybalance:[]
});
},bindstartDate: function(e) {
const checkoutDate = e.detail.value;
this.setData({
startDate: checkoutDate,
});
},bindendDate: function(e) {
const checkoutDate = e.detail.value;
this.setData({
endDate: checkoutDate,
});
},onsearch: function(e) {
that.clearCache();
that.getlist(1);
},getlist: function(gp) {
var userId = wx.getStorageSync("userId")
var LoginId = wx.getStorageSync("LoginId")
wx.request({
url: app.globalData.apiurl + "/xapiajax.ashx?timestamp=" + (new Date().getTime() / 1000),
data: {
action:"getmybusiness_smlog",
t:that.data.t,
t0:that.data.t0,
MemberId:that.data.MemberId,
Start:that.data.Start,
SJ:that.data.startDate,
SJ2:that.data.endDate,
userId:(userId==null?"":userId),
LoginId:(LoginId==null?"":LoginId)
},
method:"GET",
dataType:"json",
header: {
"content-type": "application/json" // 默认值
},
success (res) {
if(res.data.status==1){
var tmpArr = null;
tmpArr = that.data.mybalance;
if(res.data.data.length>0){
tmpArr.push.apply(tmpArr,res.data.data);
}
that.setData({
mybalance: tmpArr,
Start: that.data.Start+res.data.data.length,
loadingHidden:true
})
if(gp==0||gp==1){
that.setData({
zsymoney:res.data.zsymoney
})
if(res.data.data.length==0){
that.setData({
nodataHidden:false
})
}else{
that.setData({
nodataHidden:true
})
}
}
}else{
wx.showToast({
title: res.data.msg,
icon: "none",
duration: 3000
})
}
if(gp==1){
//隐藏loading 提示框
wx.hideLoading();
//隐藏导航条加载动画
wx.hideNavigationBarLoading();
//停止下拉刷新
wx.stopPullDownRefresh();
}
}
})
}
})

View File

@@ -0,0 +1,3 @@
{
"navigationBarTitleText": "扫码记录"
}

View File

@@ -0,0 +1,32 @@
<view class="container">
<view class="date_box" wx:if="{{t==0}}">
<view class="date_font">日期从</view><picker mode="date" end="" value="{{startDate}}" bindchange="bindstartDate">
<view class="picker-item">{{startDate}}</view>
</picker><view class="date_font0">到</view><picker mode="date" end="" value="{{endDate}}" bindchange="bindendDate">
<view class="picker-item">{{endDate}}</view>
</picker>
<input type="button" id="searchbtn" value="查询" bindtap="onsearch" />
</view>
<view class="zsymoney_box">
<view class="title">总计:</view>
<view class="money">{{zsymoney}}</view>
</view>
<view class="mybalance-item" wx:for="{{mybalance}}" wx:for-index="index">
<view class="Total">
<view><text>扫码金额:{{item.zje}}</text></view>
<view class="right"><text>服务费:{{item.ylje}}</text></view>
</view>
<view class="Total0">
<!--<view><text>增值积分:{{item.zjf}}</text></view>-->
<view class="right">时间:{{item.addtime}}</view>
</view>
</view>
</view>
<view class="nodata" hidden="{{nodataHidden}}">
<image src="../../images/order-null.png"/>
<view>暂无数据</view>
</view>
<loading hidden="{{loadingHidden}}">
加载中...
</loading>

View File

@@ -0,0 +1,171 @@
page{
background: #ccc;
}
.container {
position: relative;
width: 100%;
height: 100%;
font-size: 14px;
color: #000;
padding: 0.8em;
box-sizing: border-box;
}
.date_box{
display: flex;
width: 100%;
margin-bottom: 0.8em;
flex-direction:row;
align-items: center;
justify-content: center;
box-sizing: border-box;
background-color: #fff;
border-radius: 0.4em;
}
.date_box .date_font{
width:4em;
text-align: center;
}
.date_box .date_font0{
width:2em;
text-align: center;
}
.date_box picker{
flex-grow: 1;
height:2.2em;
background-color: #f5f5f5;
border: solid 1px #dfdfdf;
padding: 0 0.3em;
box-sizing: border-box;
}
.date_box picker{
flex-grow: 1;
height:2.2em;
background-color: #f5f5f5;
border: solid 1px #dfdfdf;
padding: 0 0.3em;
box-sizing: border-box;
}
.date_box .picker-item{
flex-grow: 1;
height:2.2em;
line-height: 2.2em;
padding: 0;
box-sizing: border-box;
}
.date_box input[type='button']{
width:4em;
height:2.2em;
background-color: #E7A23A;
border: solid 1px #dfdfdf;
box-sizing: border-box;
text-align: center;
color:#fff;
border-radius: 0 0.4em 0.4em 0;
}
.zsymoney_box{
display: flex;
width: 100%;
margin-bottom: 0.8em;
flex-direction:row;
justify-content: start;
box-sizing: border-box;
}
.zsymoney_box .money{
margin-top: 0em;
color:#ff4d00;
font-weight: 900;
font-size: 1em;
}
.mybalance-item {
float: left;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 0.8em;
margin: 0.8em 0;
margin-top: 0;
line-height: 2em;
border-radius: 0.4em;
background-color: #fff;
border: solid 1px #dfdfdf;
}
.mybalance-item view {
float: left;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: left;
color: #000;
font-size: 0.96em;
box-sizing: border-box;
}
.mybalance-item view text{color: #fff;}
.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: #848484;
box-sizing: border-box;
overflow: hidden;
}
.mybalance-item view.Total view text {
float: left;
display: block;
width: auto;
color: #000;
}
.mybalance-item view.Total view.right {
float: right;
color: #848484;
}
.mybalance-item view.Total view.right span {
color: #000;
}
.mybalance-item view.Total0{float: left; display: block;}
.mybalance-item view.Total0 view{float: left; display: block;width:auto; margin:0; padding:0;color:#848484; box-sizing: border-box; overflow: hidden;}
.mybalance-item view.Total0 view text{
color: #000;
}
.mybalance-item view.Total0 view.right {
float: right;
width: auto;
color: #848484;
}
.mybalance-item view.Total0 view.right text{color:#000;}
.mybalance-item view.Total0 view.right .mybtn{border-radius:0.4em; height:1.8em; line-height:1.8em; padding:0 0.4em; color:#fff;}
.mybalance-item view.button_box {
float: left;
display: block;
}
.mybalance-item view.button_box .mybtn {
float: left;
display: block;
margin: 0;
padding: 0;
width: 50%;
height: 2.5em;
line-height: 2.5em;
background: linear-gradient(to right,#fec811,#fec811);
color: #000;
border-radius: 0.5em 0 0 0.5em;
}
.mybalance-item view.button_box .mybtn.kddjbtn {
background: linear-gradient(to right,#ff9615,#ff9615);
border-radius: 0 0.5em 0.5em 0;
color: #fff;
}
.nodata{padding-top:1em; text-align: center; line-height: 1.5em; color:#939393;}
.nodata image {
width: 80px;
height: 80px;
}