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

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

348
pages/zhuanzhang/index.js Normal file
View File

@@ -0,0 +1,348 @@
var app = getApp()
var that=null
var sopenFrame=null
var wait=120
Page( {
data: {
loadingHidden:false,
umoney:0.00,
title:"您的余额",
txzh:"",
txmsg:"",
phone:"",
savedisable:"",
savebutton:"确认",
getcode:"获取验证码",
mybalance:[],
Start: 0,
t:0
},
onLoad: function(options) {
that = this
if(options.t){
that.setData({
t:options.t
});
}
if(that.data.t==0){
wx.setNavigationBarTitle({
title: "激活码互转"
})
}
else if(that.data.t==1){
wx.setNavigationBarTitle({
title: "余额互转"
})
}else if(that.data.t==4){
wx.setNavigationBarTitle({
title: "佣金互转"
})
that.setData({
title:"您的佣金"
});
}
that.rdata()
that.clearCache();//清本页缓存
that.getlist(0);
},rdata: function() {
var userId = wx.getStorageSync("userId")
var LoginId = wx.getStorageSync("LoginId")
var userInfodata = wx.getStorageSync("userInfo")
if(userId&&LoginId&&userInfodata){
var userInfo = JSON.parse(userInfodata)
that.setData({
phone:userInfo.Phone
})
var umoney = userInfo.jhmye
if(that.data.t==1){
umoney = userInfo.xjjye
}
if(that.data.t==4){
umoney = userInfo.xjye
}
var TXEnable = userInfo.ZZEnable
if(that.data.t==4){
TXEnable = userInfo.ZZEnable0
}
if(TXEnable=="1"){
that.setData({
savebutton:"暂时不能转账",
savedisable:"disabled"
})
}
that.setData({
umoney:umoney,
loadingHidden:true
})
}
}, // 下拉刷新
onPullDownRefresh: function () {
//在当前页面显示导航条加载动画
wx.showNavigationBarLoading();
//显示 loading 提示框。需主动调用 wx.hideLoading 才能关闭提示框
wx.showLoading({
title: '刷新中...',
})
that.clearCache();
that.getlist(1);//第一次加载数据
},
// 页面上拉触底事件(上拉加载更多)
onReachBottom: function () {
that.setData({
loadingHidden:false
});
that.getlist(2);//后台获取新数据并追加渲染
},
// 清缓存
clearCache:function(){
that.setData({
loadingHidden:false,
Start: 0,
mybalance:[]
});
},getlist: function(gp) {
var userId = wx.getStorageSync("userId")
var LoginId = wx.getStorageSync("LoginId")
wx.request({
url: app.globalData.apiurl + "/xapiajax.ashx",
data: {
action:"getzhuanzhanglist",
Start:that.data.Start,
t:that.data.t,
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
})
}else{
wx.showToast({
title: res.data.msg,
icon: "none",
duration: 3000
})
}
if(gp==1){
//隐藏loading 提示框
wx.hideLoading();
//隐藏导航条加载动画
wx.hideNavigationBarLoading();
//停止下拉刷新
wx.stopPullDownRefresh();
}
}
})
}
,getnameValue:function(e) {
var username=e.detail.value.replace(/\s+/g, "");
wx.request({
url: app.globalData.apiurl + "/xapiajax.ashx",
data: {
action:"GetUserName2",
name:username,
t:3
},
method:"POST",
dataType:"json",
header: {
"content-type": "application/x-www-form-urlencoded" // 默认值
},
success (res) {
if(res.data.status==1){
that.setData({
xmname:res.data.name
})
}else{
/*wx.showToast({
title: res.data.msg,
icon: "none",
duration: 3000
})*/
}
}
})
},getcode:function(e) {
var userId = wx.getStorageSync("userId")
var LoginId = wx.getStorageSync("LoginId")
var b=true
if(b){
wx.request({
url: app.globalData.apiurl + "/xapiajax.ashx",
data: {
action:"sendphonecode1",
userId:(!userId?"":userId),
LoginId:(!LoginId?"":LoginId)
},
method:"POST",
dataType:"json",
header: {
"content-type": "application/x-www-form-urlencoded" // 默认值
},
success (res) {
if(res.data.status==1){
wx.showToast({
title: res.data.msg,
icon: "success",
duration: 3000
})
that.gettime()
}else{
wx.showToast({
title: res.data.msg,
icon: "none",
duration: 3000
})
}
}
})
}
},
gettime:function() {
if (wait == 0) {
that.setData({
getcode:"获取验证码"
})
wait = 120;
} else {
that.setData({
getcode: "重新发送(" + wait + ")"
})
wait--;
setTimeout(function() {
that.gettime()
}, 1000)
}
},withdrawal:function(e) {
var userId = wx.getStorageSync("userId")
var LoginId = wx.getStorageSync("LoginId")
var userInfodata = wx.getStorageSync("userInfo")
if(userId&&LoginId&&userInfodata){
var userInfo = JSON.parse(userInfodata)
var TXEnable = userInfo.ZZEnable
if(TXEnable=="0"){
var username = e.detail.value.username.replace(/\s+/g, "")
var txje = e.detail.value.txje.replace(/\s+/g, "")
var pwd = e.detail.value.txpwd.replace(/\s+/g, "")
var b=true
if(b){
if(username==null || username==""){
b=false
wx.showToast({
title: "对方账号不能为空!",
icon: "none",
duration: 3000
})
}
}
if(b){
if(txje==null || txje==""){
b=false
wx.showToast({
title: "转账金额不能为空!",
icon: "none",
duration: 3000
})
}
}
if(b){
if(pwd==null || pwd==""){
b=false
wx.showToast({
title: "安全密码不能为空!",
icon: "none",
duration: 3000
})
}
}
if(b){
if(that.data.savebutton=="请稍候..."){
b=false
wx.showToast({
title: "请稍候...",
icon: "none",
duration: 3000
})
}
}
if(b){
that.setData({
savebutton:"请稍候..."
})
wx.request({
url: app.globalData.apiurl + "/xapiajax.ashx",
data: {
action:"zhuanzhang",
userId:(!userId?"":userId),
LoginId:(!LoginId?"":LoginId),
ZZType:that.data.t,
UserName:username,
pwd:pwd,
je:txje
},
method:"POST",
dataType:"json",
header: {
"content-type": "application/x-www-form-urlencoded" // 默认值
},
success (res) {
if(res.data.status==1){
wx.setStorageSync('userInfo', JSON.stringify(res.data.userInfo))
app.globalData.IFRefreshindex=1;
app.globalData.IFRefreshmy=1;
app.globalData.IFRefreshmybalance=1;
wx.showModal({
title: "操作提示",
content: res.data.msg,
showCancel:false,
success (res0) {
if (res0.confirm) {
wx.navigateBack({})
}
}
})
}else{
wx.showToast({
title: res.data.msg,
icon: "none",
duration: 3000
})
}
that.setData({
savebutton:"确认"
})
}
})
}
}
}
}
})

View File

@@ -0,0 +1,3 @@
{
"navigationBarTitleText": ""
}

View File

@@ -0,0 +1,60 @@
<view class="container">
<view class="mydata-box">
<view class="frombody">
<form bindsubmit='withdrawal'>
<view>
<text>对方账号:</text><input name="username" bindblur='getnameValue' placeholder="请填写您要转账的用户名" type="text" value="" />
</view>
<view>
<text>对方姓名:</text><view>{{xmname}}</view>
</view>
<view class="umoney">
<text>{{title}}</text>{{umoney}}
</view>
<view>
<text>转账数量:</text><input name="txje" type="text" placeholder="请填写您要转账的数量" value="" />
</view>
<view>
<text>安全密码:</text><input name="txpwd" type="text" value="" placeholder="请填写您的安全密码" type="password" />
</view>
<view class="button">
<button form-type="submit" class="{{savedisable}}">{{savebutton}}</button>
</view>
</form>
</view>
</view>
<view class="mybalance-box">
<view class="text">
<view class="line_flag"></view>
<text>转账记录</text>
</view>
<view class="mybalance-item" wx:for="{{mybalance}}" wx:for-index="index">
<view class="Total">
<view><text>转账金额:</text>{{item.Totalmoney}}</view>
<view class="right"><text>转账账号:</text>{{item.UserName}}</view>
</view>
<view class="Total0">
<view><text>时间:</text>{{item.addtime}}</view>
</view>
<view>
</view>
</view>
</view>
</view>
<loading hidden="{{loadingHidden}}">
加载中...
</loading>

View File

@@ -0,0 +1,86 @@
page{
background: #ccc;
}
.container {
position: relative;
width: 100%;
height: 100%;
font-size: 14px;
color: #000;
}
.mydata-box{display: flex;flex-direction: column;align-items: center;justify-content: center;width:100%; padding: 0 0.8em; box-sizing: border-box; }
.mydata-box .frombody{margin-top: 1em; padding:0.5em 1em;width:100%; display: flex; border-radius:0.5em; flex-direction: column; align-items: center; background-color:#fff;box-sizing: border-box;}
.mydata-box .frombody view{position: relative;float:left; width:100%;display: flex;flex-direction:row;border-bottom:1px solid #f1f1f1;padding:0.5em 0; box-sizing: border-box; line-height: 2.5em; }
.mydata-box .frombody view view{display: block; width: auto;padding:0; border-bottom:0;line-height: 2.5em;}
.mydata-box .frombody view text{float:left; display: block; padding:0; width:7em; height:2.5em; line-height: 2.5em;}
.mydata-box .frombody view input{float:left; width:13em;height:2.5em; line-height: 2.5em;}
.mydata-box .frombody view input.code{width:9em;}
.mydata-box .frombody view.umoney{color:#ff4d00;}
.mydata-box .frombody view.umoney text{color:#000;}
.mydata-box .frombody view.getumoney view.sjdzmoney{float:left; flex-grow: 1;}
.mydata-box .frombody view.getumoney view.sjdzmoney input{float:left; width:100%;}
.mydata-box .frombody view.getumoney text.getfull{float: right; display: block; width:auto; color:#000;}
.mydata-box .frombody view.getumoney0 text.sjdzmoney{float:left; flex-grow: 1;}
.mydata-box .frombody view.getumoney0 text.getfull{float: right; display: block; width:auto; color:#000;}
.mydata-box .frombody view.txzh{display:block;}
.mydata-box .frombody view.txzh text{float:left; display:block;width:25%;height:4.5em; line-height: 4.5em;}
.mydata-box .frombody view.txzh text.msg{float:left; display:block;width:75%;height:auto; line-height:1.5em;color: #939393;}
.mydata-box .frombody view.area input{width:12.8em;}
.mydata-box .frombody view.area image{position: absolute; top:1.1em; right:0; width:1.2em;height:1.2em;}
.mydata-box .frombody view.button{border: 0;}
.mydata-box .frombody view.button button{width:100%;height:2.5em; line-height: 2.5em; background:linear-gradient(to right,#00B050,#00B050); color:#fff; border-radius:0.5em;}
.mydata-box .frombody view.button button.disabled{background:linear-gradient(to left,#939393,#eeeeee);color:#111;}
.mydata-box .frombody view .picker_hx{color:#939393;line-height:2.5em;}
.mydata-box .frombody view .picker_hx view{ float:left; position: relative; display: block; border:0;min-width:14em; padding:0 1em; box-sizing: border-box;border:1px solid #dfdfdf;border-radius:0.3em;height:2.5em;line-height:2.5em;}
.mydata-box .frombody view .picker_hx image{position: absolute; top:0.6em;right:0.6em; width:1.2em;height:1.2em;}
.mydata-box .frombody view.pay_box{display: flex; flex-direction: row; align-items: center; justify-content: center;width:100%; margin-top: 0em; padding:1em; box-sizing: border-box; background-color:#fff; font-size: 14px;}
.mydata-box .frombody view.pay_box text{display: block; float:left; width:25%; height:2.5em;}
.mydata-box .frombody view.pay_box text.pay_type{width:25%;line-height:2em;}
.mydata-box .frombody view.pay_box view.paytype_box{
float:left;width:75%; padding:0 0.5em; margin-right:0.5em; display: flex; flex-direction: column; align-items: center; justify-content: center; box-sizing: border-box;border-radius:0.5em;
}
.mydata-box .frombody view.pay_box view.paytype_box view{float:left;width: 100%; padding:0 0.5em; margin-right:0.5em; display: flex; align-items: center; justify-content:start;line-height:2em; border:1px solid #f1f1f1; box-sizing: border-box;border-radius:0.5em; text-align: left;}
.mydata-box .frombody view.pay_box view.paytype_box view.weixinlq{margin-top: 1em;}
.mydata-box .frombody view.pay_box view.paytype_box view.hover{border:1px solid #ff4d00;}
.mydata-box .frombody view.pay_box view.paytype_box view image{width:1.4em;height:1.4em; margin-right: 0.5em;}
.text{
margin-bottom: 0.8em;
height: 2.5em;
line-height: 2.5em;
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
border-bottom:1px solid #f1f1f1;
}
.text .line_flag{
margin-top: 0em;
margin-left: 0.8em;
margin-right: 0.5em;
width:0.5em;
height: 1.5em;
line-height: 1.5em;
background-color: #00B050;
border-radius:0.2em;
}
.text .line_more{
flex: 1;
text-align: right;
align-self: center;
color:#ff0000
}
.mybalance-box{display: flex;flex-direction: column;align-items: center;justify-content: center;width:100%; padding:0 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.8em; margin:0.8em 0; margin-top: 0; line-height: 2em; background-color:#fff;border-radius:0.5em;}
.mybalance-item view{width:100%;display: flex;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;}
.mybalance-item view.Total0{float: left; display: block;}
.mybalance-item view.Total0 view{float: left; display: block;width:auto; margin:0; padding:0;color:#939393; box-sizing: border-box; overflow: hidden;}
.mybalance-item view.Total0 view.right{float:right;width:auto;color:#939393;}
.mybalance-item view.Total0 view.right text{color:#000;}