第一次提交
This commit is contained in:
194
pages/wodeqianbao/qianbao.js
Normal file
194
pages/wodeqianbao/qianbao.js
Normal file
@@ -0,0 +1,194 @@
|
||||
//获取应用实例
|
||||
var app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
resp:{
|
||||
"currentPage": 1,
|
||||
"detail": [
|
||||
{
|
||||
"account_type_name": "微信提现",
|
||||
"money": "-5.79",
|
||||
"time": "2022-02-24 10:40:03",
|
||||
"type": "-1"
|
||||
},
|
||||
{
|
||||
"account_type_name": "订单退款",
|
||||
"money": "0.01",
|
||||
"time": "2022-02-23 15:22:05",
|
||||
"type": "1"
|
||||
},
|
||||
{
|
||||
"account_type_name": "购买商品",
|
||||
"money": "-0.01",
|
||||
"time": "2022-02-23 09:27:31",
|
||||
"type": "-1"
|
||||
},
|
||||
{
|
||||
"account_type_name": "购买商品",
|
||||
"money": "-0.10",
|
||||
"time": "2022-02-22 11:48:20",
|
||||
"type": "-1"
|
||||
},
|
||||
{
|
||||
"account_type_name": "订单退款",
|
||||
"money": "0.01",
|
||||
"time": "2022-02-18 16:31:09",
|
||||
"type": "1"
|
||||
},
|
||||
{
|
||||
"account_type_name": "订单退款",
|
||||
"money": "0.01",
|
||||
"time": "2022-02-17 11:06:04",
|
||||
"type": "1"
|
||||
},
|
||||
{
|
||||
"account_type_name": "订单退款",
|
||||
"money": "2.00",
|
||||
"time": "2022-02-17 10:59:13",
|
||||
"type": "1"
|
||||
},
|
||||
{
|
||||
"account_type_name": "购买商品",
|
||||
"money": "-2.00",
|
||||
"time": "2022-02-16 10:31:46",
|
||||
"type": "-1"
|
||||
},
|
||||
{
|
||||
"account_type_name": "订单退款",
|
||||
"money": "2.00",
|
||||
"time": "2022-02-16 10:25:33",
|
||||
"type": "1"
|
||||
},
|
||||
{
|
||||
"account_type_name": "购买商品",
|
||||
"money": "-2.00",
|
||||
"time": "2022-02-16 10:01:25",
|
||||
"type": "-1"
|
||||
}
|
||||
],
|
||||
"erro": 0,
|
||||
"lastPage": 6,
|
||||
"msg": "获取数据成功",
|
||||
"total": 52
|
||||
},
|
||||
order_list:[],
|
||||
navHeight: '',
|
||||
menuButtonInfo: {},
|
||||
searchMarginTop: 0, // 搜索框上边距
|
||||
searchWidth: 0, // 搜索框宽度
|
||||
searchHeight: 0 // 搜索框高度
|
||||
},
|
||||
back(){
|
||||
wx.navigateBack()
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
wx.setNavigationBarTitle({
|
||||
title: '我的钱包'
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
this.getGoodsList();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
},
|
||||
// 跳转详情
|
||||
activity(e){
|
||||
|
||||
if (e.currentTarget.dataset.id != 0) {
|
||||
console.log("你选择的课程id是"+e.currentTarget.dataset.id);
|
||||
wx.navigateTo({
|
||||
url: "/shopping/pages/goddess/goddess?id=" + e.currentTarget.dataset.id,
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
//商品列表
|
||||
getGoodsList: function () {
|
||||
var that = this;
|
||||
|
||||
|
||||
//假数据
|
||||
if(this.data.resp.erro==0){
|
||||
that.setData({
|
||||
order_list:this.data.resp.detail
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
wx.request({
|
||||
url: app.buildUrl("/app/Goddesswechat/getCapitalDetails"),
|
||||
header: app.getRequestHeader(),
|
||||
method:'POST',
|
||||
data: {
|
||||
version_number: this.data.version_number,
|
||||
uid:wx.getStorageSync('uid'),
|
||||
token:wx.getStorageSync('token'),
|
||||
page:'1',
|
||||
page_size:10,
|
||||
},
|
||||
success: function (res) {
|
||||
var resp = res.data;
|
||||
console.log(resp+"=================dddddddddddddddddddddddddddddddddddddddddddd")
|
||||
console.log(resp.erro+"=================dddddddddddddddddddddddddddddddddddddddddddd")
|
||||
if(resp.erro==0){
|
||||
that.setData({
|
||||
order_list:resp.detail
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
})
|
||||
4
pages/wodeqianbao/qianbao.json
Normal file
4
pages/wodeqianbao/qianbao.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "我的收藏"
|
||||
}
|
||||
20
pages/wodeqianbao/qianbao.wxml
Normal file
20
pages/wodeqianbao/qianbao.wxml
Normal file
@@ -0,0 +1,20 @@
|
||||
<view>
|
||||
<view class="order-list" wx:if="{{order_list.length}}">
|
||||
<view wx:for="{{order_list}}" wx:key="{{index}}" wx:for-item="item">
|
||||
<view class="Group" bindtap="activity" data-id="{{item.id}}">
|
||||
|
||||
|
||||
<view style="margin-left: 34rpx;">
|
||||
<view wx:if="{{item.type==1}}" class="title1">退款到账</view>
|
||||
<view wx:if="{{item.type==-1}}" class="title1">提现</view>
|
||||
<view class="title2">{{item.time}}</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view style="position: absolute;right: 24rpx;">
|
||||
<view class="Price1">¥{{item.money}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
116
pages/wodeqianbao/qianbao.wxss
Normal file
116
pages/wodeqianbao/qianbao.wxss
Normal file
@@ -0,0 +1,116 @@
|
||||
/* pages/activity/activity.wxss */
|
||||
.Group {
|
||||
height: 120rpx;
|
||||
display: flex;
|
||||
border-bottom: 1px solid #f5f5f5;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.Group-image image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.title1 {
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.title2 {
|
||||
font-size: 26rpx;
|
||||
color: #A8A8A8;
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
|
||||
.content .title2 .house {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
margin-right: 7rpx;
|
||||
margin-top: 5rpx;
|
||||
}
|
||||
|
||||
.content .title2 .house image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.Price1 {
|
||||
display: flex;
|
||||
font-size: 28rpx;
|
||||
color: #FF4A4A;
|
||||
line-height: 42rpx;
|
||||
margin-right: 17rpx;
|
||||
}
|
||||
|
||||
.content .Price .Price2 {
|
||||
font-size: 24rpx;
|
||||
color: #CBCBCB;
|
||||
line-height: 41rpx;
|
||||
margin-right: 23rpx;
|
||||
text-decoration:line-through;
|
||||
}
|
||||
|
||||
.content .Price .Price3 {
|
||||
width: 51rpx;
|
||||
height: 21rpx;
|
||||
font-size: 15rpx;
|
||||
color: #E75D4D;
|
||||
border: 1px solid #E75D4D;
|
||||
border-radius: 4rpx;
|
||||
text-align: center;
|
||||
line-height: 18rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.order-list{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* _______________________________________ */
|
||||
view {
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
.custom-bar {
|
||||
/* background-color: #aaa; */
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.custom-bar__wrapper {
|
||||
padding: 0 10rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.search-group {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
border-radius: 60rpx;
|
||||
/* padding: 0 10rpx; */
|
||||
padding-left: 25rpx;
|
||||
background: #F5F5F5;
|
||||
}
|
||||
.search-group > input {
|
||||
font-size: 25rpx;
|
||||
width: 800rpx;
|
||||
}
|
||||
.search-group > image {
|
||||
height: 32rpx;
|
||||
width: 32rpx;
|
||||
margin-right: 20rpx
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user