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

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

218
pages/zzjf_log/index.js Normal file
View File

@@ -0,0 +1,218 @@
var app = getApp()
var that=null
var sopenFrame=null
var wait=120
Page( {
data: {
loadingHidden:false,
nodataHidden:true,
mybalance:[],
Start: 0,
nav:0,
mcHidden:true,
mcsl:0,
mcjg:0,
yjdz:0,
zzid:0,
ifrdata:0,
qytitle:"确认",
a_pwd:""
},
onLoad: function(options) {
that = this
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:[]
});
},onnav:function(e) {
var index = e.currentTarget.dataset.id
that.setData({
nav:index
})
that.clearCache();
that.getlist(0);
},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:"getzzjf_log",
Start:that.data.Start,
t:that.data.nav,
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,
mcjg:res.data.jrjg
})
if(gp==0||gp==1){
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();
}
}
})
},showmc:function(e) {
var id = e.currentTarget.dataset.id
var index = e.currentTarget.dataset.index
that.setData({
mcHidden:false,
zzid:id,
mcsl:index,
yjdz: (parseFloat(that.data.mcjg) * parseFloat(index)).toFixed(2)
})
},closemc:function(e) {
that.setData({
mcHidden:true
})
},inorderpay:function(e) {
},getpwdValue:function(e) {
that.setData({
a_pwd:e.detail.value.replace(/\s+/g, "")
})
},onqymc:function() {
var userId = wx.getStorageSync("userId")
var LoginId = wx.getStorageSync("LoginId")
if(userId&&LoginId){
var b=true
if(that.data.a_pwd==""){
b=false
wx.showToast({
title: "安全密码不能为空!",
icon: "none",
duration: 3000
})
}
if(b){
if(that.data.qytitle=="请稍候..."){
b=false
}
}
if(b){
that.setData({
qytitle:"请稍候..."
})
wx.request({
url: app.globalData.apiurl + "/xapiajax.ashx",
data: {
action:"qymczzjf",
userId:(userId==null?"":userId),
LoginId:(LoginId==null?"":LoginId),
id:that.data.zzid,
pwd:that.data.a_pwd
},
method:"POST",
dataType:"json",
header: {
"content-type": "application/x-www-form-urlencoded" // 默认值
},
success (res0) {
that.setData({
qytitle:"确认"
})
if(res0.data.status==1){
wx.showToast({
title: res0.data.msg,
icon: "none",
duration: 3000
})
app.globalData.IFRefreshmy=1;
app.globalData.IFRefreshzzjf=1;
that.clearCache();
that.getlist(0);
that.setData({
mcHidden:true
})
}else{
wx.showToast({
title: res0.data.msg,
icon: "none",
duration: 3000
})
}
}
})
}
}else{
wx.navigateTo({
url: "../login/index"
})
}
}
})

View File

@@ -0,0 +1,3 @@
{
"navigationBarTitleText": "增值记录"
}

45
pages/zzjf_log/index.wxml Normal file
View File

@@ -0,0 +1,45 @@
<view class="container">
<view class="myorder-menu">
<view class='{{nav==0?"hover":""}}' bindtap="onnav" data-id="0">全部</view>
<view class='{{nav==1?"hover":""}}' bindtap="onnav" data-id="1">收入</view>
<view class='{{nav==2?"hover":""}}' bindtap="onnav" data-id="2">支出</view>
</view>
<view class="mybalance-item" wx:for="{{mybalance}}" wx:for-index="index">
<view class="Total">
<view><text>数量:{{item.sl}}</text></view>
<view class="right"><text>价格:{{item.jg}}</text></view>
</view>
<view class="Total0">
<view>时间:{{item.addtime}}</view>
</view>
<view class="Total0">
<view>{{item.content}}</view>
</view>
</view>
</view>
<view class="Hidden_box" hidden="{{mcHidden}}" bindtap="closemc">
<view class="Hidden_box_to" catchtap="inorderpay">
<view class="Hidden_box_title">
<text>确认卖出</text>
<view class="close" bindtap="closemc"><image src="../../images/close.png" /></view>
</view>
<view class="frombody">
<view>卖出数量:{{mcsl}}</view>
<view>卖出价格:{{mcjg}}</view>
<view>预计到账:{{yjdz}}</view>
<view><text>安全密码:</text><input type="password" name="txtpwd" style="width: 14em;" bindinput='getpwdValue' /></view>
</view>
<view class="button">
<button bindtap="onqymc">{{qytitle}}</button>
</view>
</view>
</view>
<view class="nodata" hidden="{{nodataHidden}}">
<image src="../../images/order-null.png"/>
<view>暂无数据</view>
</view>
<loading hidden="{{loadingHidden}}">
加载中...
</loading>

131
pages/zzjf_log/index.wxss Normal file
View File

@@ -0,0 +1,131 @@
page{
background: #ccc;
}
.container {
position: relative;
width: 100%;
height: 100%;
font-size: 14px;
color: #000;
padding: 0.8em;
box-sizing: border-box;
}
.myorder-menu{display: flex;flex-direction: row;align-items: center;justify-content: center;width:100%; margin-bottom: 0.8em; background-color: #fff;border-radius: 0.4em; overflow: hidden;}
.myorder-menu view{display: flex;flex: 1; height:2.5em; line-height: 2.5em; text-align: center; border:1px solid #f1f1f1; border-left:0;border-top: 0; align-items: center;justify-content: center;}
.myorder-menu view.hover{border-bottom:1px solid #00B050;color:#00B050;}
.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;background-color: #00B050;}
.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;
}
.Hidden_box{ position: fixed;display: flex;align-items: center; justify-content: center; top:0; left:0; width:100%;height:100vh; background:rgba(0, 0, 0, 0.5);}
.Hidden_box_to{position: relative; padding: 8px; width:95%;height:auto; background-color: #fff; box-sizing: border-box; border-radius:0.5em;}
.Hidden_box_to.addcart_box{ position: absolute; bottom:0; width:100%;border-radius:0.5em 0.5em 0 0;}
.Hidden_box_to .Hidden_box_title{width:100%;height:2.5em; line-height: 2.5em; text-align: left; font-weight: 900; box-sizing: border-box;border-bottom:1px solid #f1f1f1;}
.Hidden_box_to .close{position: absolute; right:0.5em; top:0.5em; width:1.5em; height:1.5em; padding:0.15em; background-color:#fff;border:1px solid #f1f1f1;border-radius:50%;box-sizing:border-box;}
.Hidden_box_to .close image{float:left;width:100%;height:100%; position: relative;}
.Hidden_box_to .title{width:100%;height:2.5em;}
.Hidden_box_to .frombody{display: flex;flex-direction: column;flex: 1; max-height: 24em; align-items: center;justify-content: center; overflow: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch;}
.Hidden_box_to .frombody image{width: 100%;}
.Hidden_box_to .frombody view{display: flex; flex-direction: row; width: 100%;margin: 0.8em 0;}
.Hidden_box_to .frombody view text{width: 7em; margin-top:0.4em;}
.Hidden_box_to .frombody view input{width:100%;height: 2em; border:1px #dfdfdf solid; background-color: #f1f1f1; border-radius:0.4em;padding:0 0.2em;box-sizing: border-box;}
.Hidden_box_to .frombody .wxParse{
line-height:1.5em;
padding:0.8em 0;
font-size:1em;
max-height:70vh;
overflow-y: auto;
}
.Hidden_box_to view.button{margin:0.8em 0; margin-bottom: 0; border: 0;}
.Hidden_box_to view.button button{width:100%;padding:0 1em; height:2em; line-height: 2em; background:linear-gradient(to right,#00B050,#00B050); color:#fff; border-radius:0.2em;}
.nodata{padding-top:1em; text-align: center; line-height: 1.5em; color:#939393;}
.nodata image {
width: 80px;
height: 80px;
}