月度消费

pifa
fanfan 2 months ago
parent d97e21e8fe
commit ceb660cc3b
  1. 11
      api/wallet.js
  2. 2
      ext.json
  3. 2
      manifest.json
  4. 61
      pages.json
  5. 231
      pages/news/user/monthlyDetails.vue
  6. 42
      pages/user/index.vue
  7. 2
      project.config.json

@ -4,9 +4,9 @@ import request from '@/utils/request'
const api = {
info: 'user/info',
list: 'dealer.Withdraw/list',
submit:'dealer.withdraw/submit',
balancelist:'balance.log/list',
rechargeSubmit:'recharge/submit'
submit: 'dealer.withdraw/submit',
balancelist: 'balance.log/list',
rechargeSubmit: 'recharge/submit'
}
// 用户信息
@ -28,4 +28,7 @@ export const submit = (param) => {
// 充值
export const rechargeSubmit = (param) => {
return request.post(api.rechargeSubmit, param)
}
}
export const getMonhlySalesList = (param) => {
return request.get('user/getMonhlySalesList', param)
}

@ -1,6 +1,6 @@
{
"extEnable": true,
"extAppid": "wx3f1dcf2e2ac45e7c",
"extAppid": "wx8dc1c2620cfd953a",
"ext": {
"store_id": 10048
}

@ -92,7 +92,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wx3f1dcf2e2ac45e7c",
"appid" : "wx8dc1c2620cfd953a",
"libVersion" : "latest",
"setting" : {
// TLS

@ -259,36 +259,34 @@
],
"subPackages": [{
"root": "pages/invite/",
"pages": [
{
"path": "index",
"style": {
"navigationBarTitleText": "邀请有礼",
"navigationStyle": "custom",
"enablePullDownRefresh": true
}
}, {
"pages": [{
"path": "index",
"style": {
"navigationBarTitleText": "邀请有礼",
"navigationStyle": "custom",
"enablePullDownRefresh": true
}
}, {
"path": "list",
"style": {
"navigationBarTitleText": "邀请记录",
"navigationStyle": "custom",
"enablePullDownRefresh": true
}
}, {
"path": "rule",
"style": {
"navigationBarTitleText": "邀请规则"
}
}, {
"path": "upgrade",
"style": {
"navigationBarTitleText": "立即升级",
"navigationStyle": "custom",
"enablePullDownRefresh": true
}
"path": "list",
"style": {
"navigationBarTitleText": "邀请记录",
"navigationStyle": "custom",
"enablePullDownRefresh": true
}
]
}, {
"path": "rule",
"style": {
"navigationBarTitleText": "邀请规则"
}
}, {
"path": "upgrade",
"style": {
"navigationBarTitleText": "立即升级",
"navigationStyle": "custom",
"enablePullDownRefresh": true
}
}]
},
{
"root": "pages/address/",
@ -502,6 +500,13 @@
"enablePullDownRefresh": false
}
},
{
"path": "user/monthlyDetails",
"style": {
"navigationBarTitleText": "月度明细",
"enablePullDownRefresh": false
}
},
{
"path": "user/recharge",
"style": {

@ -0,0 +1,231 @@
<template>
<view class="wallet">
<u-sticky offset-top="0">
<view class="timecontainer" style="padding: 0 20rpx;">
<view class="timetext">
月份
</view>
<view class="timecontainer">
<view class="selectTime" @click="onchangeTime(1)">
{{start_at?start_at:'开始月份'}}
</view>
<text>-</text>
<view class="selectTime" @click="onchangeTime(2)">
{{end_at?end_at:'结束月份'}}
</view>
</view>
</view>
</u-sticky>
<u-picker v-model="timeShow" mode="time" :params="timeParams" @confirm="timeChage"></u-picker>
<view class="dataList" style="margin: 26rpx;" v-if="list.length>0">
<view class="item" v-for="item in list" :key="i">
<view class="l">
<view class="b">{{item.month}}</view>
</view>
<view class="r">
<view class="a">{{item.total_money?Number(item.total_money):item.total_money}}</view>
</view>
</view>
</view>
<u-empty text="暂无数据显示哦~" v-else mode="list"></u-empty>
</view>
</template>
<script>
import * as wallet from '@/api/wallet'
export default {
data() {
return {
timeShow: false,
timeType: '',
list: [],
start_at: '',
end_at: '',
timeParams: {
year: true,
month: true,
},
y1: '',
m1: '',
y2: '',
m2: '',
}
},
onLoad(options) {
this.getBalance()
},
onShow() {},
methods: {
getBalance() {
let that = this;
let obj = {
userId: uni.getStorageSync('userId'),
startTime: that.start_at,
endTime: that.end_at,
}
wallet.getMonhlySalesList(obj)
.then(res => {
that.list = []
that.list = res.data.list.data
})
.finally()
},
onchangeTime(type) {
this.timeType = type
this.timeShow = true
},
timeChage(e) {
if (this.timeType == 1) {
this.start_at = e.year + '-' + e.month
this.y1 = e.year
this.m1 = e.month
}
if (this.timeType == 2) {
this.end_at = e.year + '-' + e.month
this.y2 = e.year
this.m2 = e.month
}
if (this.start_at && this.end_at) {
console.log(this.y1, this.y2)
console.log(this.m1, this.m2)
if (this.y1 > this.y2) {
uni.showToast({
icon: "none",
title: '结束月份比必须大于开始月份'
})
this.end_at = ''
}
if (this.y1 == this.y2 && this.m1 > this.m2) {
uni.showToast({
icon: "none",
title: '结束月份比必须大于开始月份'
})
this.end_at = ''
}
}
this.getBalance()
},
}
}
</script>
<style lang="scss" scoped>
.wallet {
height: 100%;
}
.timecontainer {
display: flex;
justify-content: center;
align-items: center;
background-color: #fff;
height: 120rpx;
.timetext {
color: #000;
font-size: 30rpx;
}
}
.selectTime {
width: 255rpx;
height: 70rpx;
background: #F3F3F3;
border-radius: 44rpx;
text-align: center;
line-height: 70rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 28rpx;
color: #A1A1A1;
font-style: normal;
text-transform: none;
margin: 0 15rpx;
}
.dataList {
overflow: hidden;
background-color: #fff;
padding: 0 20rpx;
border-radius: 20rpx;
.empty {
// margin:0 auto;
// text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
image {
width: 114rpx;
height: auto;
margin-top: 200rpx;
}
text {
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #464646;
margin-top: 44rpx;
}
}
.item {
padding: 26rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
border-top: 1px solid #F3F3F3;
&:first-child {
border-top-color: #fff;
}
.l {
.a {
padding: 20rpx 0;
font-size: 28rpx;
font-weight: 400;
color: #595959;
margin: 0 6rpx;
}
.b {
font-size: 26rpx;
font-weight: 400;
color: #A3A3A3;
margin: 0 6rpx;
}
}
.r {
flex: 1;
text-align: right;
.a {
font-size: 40rpx;
font-weight: 500;
color: #414141;
margin: 0 6rpx;
}
.b {
font-size: 28rpx;
font-weight: 400;
color: #A3A3A3;
margin: 0 6rpx;
}
}
}
}
::v-deep .u-empty {
padding: 100rpx 0;
}
</style>

@ -363,7 +363,7 @@
</view>
</view>
</view>
<!-- <view class="wallet">
<!-- <view class="wallet">
<view class="myWallet">
我的钱包
</view>
@ -535,6 +535,10 @@
<image :src="$picUrl + '/static/user/gmall.png?t=1'" class="icons"></image>
<view class="serveInfo"> 开通商城 </view>
</view>
<view class="serveIcon" @click="goJump('/pages/news/user/monthlyDetails')">
<image :src="$picUrl + '/static/user/monthUse.png?t=1'" class="icons"></image>
<view class="serveInfo"> 月度消费 </view>
</view>
</view>
</view>
<!-- 商品推荐 -->
@ -572,24 +576,24 @@
</view>
</view> -->
<view class="goodsSend">
<view class="sendLeft">
<view class="left_1">
{{item.goods_source}}
</view>
<view class="left_2">
{{Number(item.discount)}}
</view>
</view>
<view class="sendRight">
<text v-if="item.delivery_time==0">24小时内发货</text>
<text v-if="item.delivery_time==1">48小时内发货</text>
<text v-if="item.delivery_time==2">72小时内发货</text>
<text v-if="item.delivery_time==3">7天内发货</text>
<text v-if="item.delivery_time==4">15天内发货</text>
<text v-if="item.delivery_time==5">30天内发货</text>
<text v-if="item.delivery_time==6">45天内发货</text>
</view>
<view class="sendLeft">
<view class="left_1">
{{item.goods_source}}
</view>
<view class="left_2">
{{Number(item.discount)}}
</view>
</view>
<view class="sendRight">
<text v-if="item.delivery_time==0">24小时内发货</text>
<text v-if="item.delivery_time==1">48小时内发货</text>
<text v-if="item.delivery_time==2">72小时内发货</text>
<text v-if="item.delivery_time==3">7天内发货</text>
<text v-if="item.delivery_time==4">15天内发货</text>
<text v-if="item.delivery_time==5">30天内发货</text>
<text v-if="item.delivery_time==6">45天内发货</text>
</view>
</view>
</view>
</view>
<!-- </template> -->
@ -1427,7 +1431,7 @@
height: 0;
padding-bottom: 100%;
overflow: hidden;
image {
width: 100%;
height: 100%;

@ -1,5 +1,5 @@
{
"appid": "wx3f1dcf2e2ac45e7c",
"appid": "wx8dc1c2620cfd953a",
"compileType": "miniprogram",
"libVersion": "3.3.3",
"packOptions": {

Loading…
Cancel
Save