银花优选微信小程序修改后的最新版本代码
This commit is contained in:
123
pages/myincome0/index.js
Normal file
123
pages/myincome0/index.js
Normal file
@@ -0,0 +1,123 @@
|
||||
var WxParse = null;
|
||||
var app = getApp()
|
||||
var that=null
|
||||
var sopenFrame=null
|
||||
Page( {
|
||||
data: {
|
||||
zsymoney:"0.00",
|
||||
jrsymoney:"0.00",
|
||||
zrsymoney:"0.00",
|
||||
bysymoney:"0.00",
|
||||
sysymoney:"0.00",
|
||||
symoney0:"0.00",
|
||||
symoney1:"0.00",
|
||||
symoney2:"0.00",
|
||||
symoney3:"0.00",
|
||||
symoney4:"0.00",
|
||||
symoney5:"0.00",
|
||||
symoney6:"0.00",
|
||||
Start:0,
|
||||
addtime:"",
|
||||
datas: [],
|
||||
bonuscategorys: [],
|
||||
},
|
||||
onLoad: function(options) {
|
||||
|
||||
that = this
|
||||
that.setData({
|
||||
addtime: options.addtime
|
||||
})
|
||||
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({
|
||||
bonuscategorys:userInfo.bonuscategorys
|
||||
})
|
||||
}
|
||||
that.rdata(0)
|
||||
|
||||
},onPullDownRefresh: function () {
|
||||
//在当前页面显示导航条加载动画
|
||||
wx.showNavigationBarLoading();
|
||||
//显示 loading 提示框。需主动调用 wx.hideLoading 才能关闭提示框
|
||||
wx.showLoading({
|
||||
title: '刷新中...',
|
||||
})
|
||||
that.clearCache();
|
||||
that.rdata(1);
|
||||
}, // 页面上拉触底事件(上拉加载更多)
|
||||
onReachBottom: function () {
|
||||
that.setData({
|
||||
loadingHidden:false
|
||||
});
|
||||
that.rdata(2);//后台获取新数据并追加渲染
|
||||
},// 清缓存
|
||||
clearCache:function(){
|
||||
that.setData({
|
||||
datas: [],
|
||||
Start: 0,
|
||||
loadingHidden:false
|
||||
});
|
||||
},rdata: function(t) {
|
||||
|
||||
var userId = wx.getStorageSync("userId")
|
||||
var LoginId = wx.getStorageSync("LoginId")
|
||||
|
||||
if(userId&&LoginId){
|
||||
wx.request({
|
||||
url: app.globalData.apiurl + "/xapiajax.ashx",
|
||||
data: {
|
||||
action:"getmyincome",
|
||||
userId:(!userId?"":userId),
|
||||
LoginId:(!LoginId?"":LoginId),
|
||||
t:1,
|
||||
addtime:that.data.addtime,
|
||||
Start:that.data.Start
|
||||
},
|
||||
method:"GET",
|
||||
dataType:"json",
|
||||
header: {
|
||||
"content-type": "application/json" // 默认值
|
||||
},
|
||||
success (res) {
|
||||
if(that.data.Start==0){
|
||||
that.setData({
|
||||
zsymoney:res.data.zsymoney,
|
||||
jrsymoney:res.data.jrsymoney,
|
||||
zrsymoney:res.data.zrsymoney,
|
||||
bysymoney:res.data.bysymoney,
|
||||
sysymoney:res.data.sysymoney,
|
||||
symoney0:res.data.SYCount1,
|
||||
symoney1:res.data.SYCount2,
|
||||
symoney2:res.data.SYCount3,
|
||||
symoney3:res.data.SYCount4,
|
||||
symoney4:res.data.SYCount5,
|
||||
symoney5:res.data.SYCount6,
|
||||
symoney6:res.data.SYCount7
|
||||
})
|
||||
}
|
||||
var tmpArr = null;
|
||||
tmpArr = that.data.datas;
|
||||
tmpArr.push.apply(tmpArr,res.data.data);
|
||||
that.setData({
|
||||
datas: tmpArr,
|
||||
Start: that.data.Start+res.data.data.length,
|
||||
loadingHidden:true
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
if(t==1){
|
||||
//隐藏loading 提示框
|
||||
wx.hideLoading();
|
||||
//隐藏导航条加载动画
|
||||
wx.hideNavigationBarLoading();
|
||||
//停止下拉刷新
|
||||
wx.stopPullDownRefresh();
|
||||
}
|
||||
}
|
||||
})
|
||||
3
pages/myincome0/index.json
Normal file
3
pages/myincome0/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
29
pages/myincome0/index.wxml
Normal file
29
pages/myincome0/index.wxml
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
<view class="container">
|
||||
|
||||
<view class="myincome-box">
|
||||
<view class="myincome-box-to">
|
||||
<view class="myincome-item">
|
||||
<view class="title">{{addtime+"收益"}}</view>
|
||||
<view>{{zsymoney}}</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="clear"></view>
|
||||
|
||||
<view class="myincome-list">
|
||||
<view class="list-item" wx:for="{{datas}}" bindtap="ondetails" data-time="{{item.addtime}}">
|
||||
<view class="title-box">
|
||||
<view class="title">{{t==0?item.addtime:item.conent}}</view>
|
||||
<view class="money">{{item.Totalmoney}}</view>
|
||||
</view>
|
||||
<view class="font-box">{{item.seef==1?"已释放":"未释放"}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<loading hidden="{{loadingHidden}}">
|
||||
加载中...
|
||||
</loading>
|
||||
|
||||
210
pages/myincome0/index.wxss
Normal file
210
pages/myincome0/index.wxss
Normal file
@@ -0,0 +1,210 @@
|
||||
/**index.wxss**/
|
||||
page{
|
||||
background: #ccc;
|
||||
}
|
||||
.container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
}
|
||||
.clear{ height:0;clear:both;}
|
||||
|
||||
.myincome-box{
|
||||
margin: 0;
|
||||
padding:0.8em;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
}
|
||||
.myincome-box .myincome-box-to{
|
||||
width: 100%;
|
||||
background-color: #383843;
|
||||
border-radius: 0.5em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.myincome-box .myincome-item{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0;
|
||||
padding: 0.8em;
|
||||
width:auto;
|
||||
color:#ff4d00;
|
||||
|
||||
}
|
||||
.myincome-box .myincome-item view{
|
||||
font-size: 1.2em;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
.myincome-box .myincome-item view.title{
|
||||
color:#939393;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.myincome-box .myincome-item-to{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin: 0;
|
||||
padding:0;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
}
|
||||
.myincome-box .myincome-item-to .myincome-item{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height:4em;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
.myincome-box .myincome-item-to .myincome-item view{
|
||||
font-size: 1.2em;
|
||||
color: #fff;
|
||||
}
|
||||
.myincome-box .myincome-item-to .myincome-item view.title{
|
||||
color:#939393;
|
||||
font-size: 1em;
|
||||
}
|
||||
.myincome-list{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
padding: 0 0.8em;
|
||||
box-sizing: border-box
|
||||
}
|
||||
.myincome-list .list-item{
|
||||
margin-bottom:0.8em;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding:0.8em;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
border-radius:0.5em;
|
||||
}
|
||||
.myincome-list .list-item .title-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.myincome-list .list-item .title{
|
||||
flex-grow: 1;
|
||||
color:#000;
|
||||
}
|
||||
|
||||
.myincome-list .list-item .money{
|
||||
width:auto;
|
||||
color:#ff4d00;
|
||||
}
|
||||
.myincome-list .list-item .font-box{
|
||||
color:#939393;
|
||||
}
|
||||
.myincome-list .list-item .ico{
|
||||
width:1.2em;
|
||||
height: 1.2em;
|
||||
}
|
||||
.myincome-list .list-item .ico image{
|
||||
width:100%;
|
||||
height: 100%;
|
||||
}
|
||||
.balance-title{width:100%; height: 2.5em; line-height: 2.5em; padding:0 1em;box-sizing: border-box;}
|
||||
.balance-box0{
|
||||
display: flex;
|
||||
flex-direction:column;
|
||||
padding: 0 0.8em;
|
||||
padding-top: 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.balance-box0 .balance-box0-to{
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
width: 100%;
|
||||
border-radius:0.5em;
|
||||
background-color: #fff;
|
||||
}
|
||||
.balance-box0 .balance-item{
|
||||
display: flex;
|
||||
flex-direction:row;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.balance-box0 .balance-item .item-left{
|
||||
display: flex;
|
||||
flex-direction:row;
|
||||
width:50%;
|
||||
padding: 0.5em 1em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.balance-box0 .balance-item .item-right{
|
||||
display: flex;
|
||||
flex-direction:row;
|
||||
width:50%;
|
||||
padding: 0.5em 1em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.balance-box0 .balance-item .item-image{
|
||||
display: flex;
|
||||
width:2em;
|
||||
height: 2em;
|
||||
padding: 0.5em;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.image-color0{
|
||||
background-color: #05c4db;
|
||||
}
|
||||
.image-color1{
|
||||
background-color: #ff4d00;
|
||||
}
|
||||
.image-color2{
|
||||
background-color: #9a0b95;
|
||||
}
|
||||
.image-color3{
|
||||
background-color: #eab104;
|
||||
}
|
||||
.image-color4{
|
||||
background-color: #0dc1ae;
|
||||
}
|
||||
.image-color5{
|
||||
background-color: #3313ac;
|
||||
}
|
||||
.balance-box0 .balance-item .item-image image{
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
.balance-box0 .balance-item .item-font{
|
||||
display: flex;
|
||||
flex-direction:column;
|
||||
flex-flow: 1;
|
||||
padding-left: 0.5em;
|
||||
box-sizing: border-box;
|
||||
color:#848484;
|
||||
}
|
||||
.balance-box0 .balance-item .item-font .money{
|
||||
color: #ff0000;
|
||||
}
|
||||
.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);z-index: 100;}
|
||||
.Hidden_box_to{position: relative; padding: 8px; width:90%;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 .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{width:100%;height:100%;}
|
||||
.Hidden_box_to .title{width:100%;height:2.5em;}
|
||||
.Hidden_box_to .body{line-height:1em;}
|
||||
.Hidden_box_to .body button::after{border:0;}
|
||||
.Hidden_box_to .body button{margin-top:0.5em;background:linear-gradient(to right,#00B050,#00B050);color:#fff; border-radius:0.5em;}
|
||||
.Hidden_box_to.gotoagent .body{padding:1em 0; line-height: 1.2em;}
|
||||
.Hidden_box_to.gotoagent .body button{float: left;margin-top:1.5em; width:49%;height:2em; line-height:2em;}
|
||||
.Hidden_box_to.gotoagent .body button.closebtn{margin-right: 2%; background:#eee; color:#aaa;}
|
||||
Reference in New Issue
Block a user