完善页面

This commit is contained in:
wangxiaowei 2024-07-16 17:31:53 +08:00
parent 53b5967595
commit 4f65fa4152
13 changed files with 282 additions and 86 deletions

@ -147,6 +147,11 @@ export function getRechargeRecord(params) {
return request.get("recharge/rechargeRecord", {params})
}
//提现记录
export function getWidthdrawlRecord(params) {
return request.get("recharge/widthdrawlRecord", {params})
}
// 新版 邀请码
export function bindSuperior(data) {
return request.post("distribution/writeCode", data)
@ -340,3 +345,8 @@ export function billionsRechargeRecord(params) {
export function billionsWithdrawalRecord(params) {
return request.get('billions/withdrawalRecord', {params})
}
// 本地生活-商品支付
export function localShopPay(data) {
return request.post('abutment/paytest', data)
}

@ -11,13 +11,13 @@
</view>
<view class="opt-box m-t-20 bg-white">
<view v-show="!hiddenOpt">
<view class="opt-item flex row-between border-line" @tap="onlyRefund">
<!-- <view class="opt-item flex row-between border-line" @tap="onlyRefund">
<view>
<view class="lg">仅退款</view>
<view class="muted xs m-t-10">未收到货,与卖家协商同意无需退货只需退款</view>
</view>
<u-icon class="m-l-10" name="arrow-right" size="28" />
</view>
</view> -->
<view class="opt-item flex row-between" @tap="allRefunds">
<view>
<view class="lg">退货退款</view>

@ -55,6 +55,12 @@
<view class="m-t-10 sm">充值记录</view>
</view>
</router-link>
<router-link class="nav-item" to="/bundle/pages/user_withdraw/withdrawal_record">
<view class="flex-col col-center">
<image class="icon" src="../../static/icon_yezz.png"></image>
<view class="m-t-10 sm">提现记录</view>
</view>
</router-link>
</view>
<view class="rule" v-if="wallet.rule">
@ -127,7 +133,6 @@
getWallet().then(res => {
if (res.code == 1) {
this.wallet = res.data
console.log(this.wallet.rule)
}
});
}

@ -0,0 +1,60 @@
<!-- 账户明细 -->
<template>
<view class="user-growth">
<mescroll-body ref="mescrollRef" @init="mescrollInit" @up="upCallback" :up="upOption" @down="downCallback">
<view class="p-t-20" >
<view class="bg-white" v-for="(item, index) in list" :key="index" >
<record-cell :remark="item.desc" :date="item.create_time" :money="item.status == 4 ? item.money : item.left_money" :type="1" />
</view>
</view>
</mescroll-body>
</view>
</template>
<script>
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
import {getWidthdrawlRecord} from "@/api/user"
export default {
mixins: [MescrollMixin], // 使用mixin
data() {
return {
// Tabs 列表
upOption: {
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/order_null.png',
tip: '暂无记录', // 提示
}
},
list: [], // 列表数据--全部
};
},
methods: {
// 上拉加载
upCallback(page) {
const pageNum = page.num; // 页码, 默认从1开始
const pageSize = page.size; // 页长, 默认每页10条
getWidthdrawlRecord({
page_size: pageSize,
page_no: pageNum
}).then(({
data
}) => {
if (page.num == 1) this.list = [];
const curPageData = data.lists;
const curPageLen = curPageData.length;
const hasNext = !!data.more;
this.list = this.list.concat(curPageData);
this.mescroll.endSuccess(curPageLen, hasNext);
}).catch(() => {
this.mescroll.endErr()
})
}
},
}
</script>
<style scoped>
</style>

@ -20,7 +20,7 @@
</price-format>
</view>
</view>
<button class="btn br60 white" size="md" hover-class="none" @tap="pay">
<button class="btn br60 white" size="md" hover-class="none" @tap="handlePrepay">
支付
</button>
</view>
@ -63,6 +63,8 @@
</template>
<script>
import {prepay} from '@/api/app'
import {localShopPay} from '@/api/user.js'
export default {
data() {
return {
@ -87,9 +89,43 @@
console.log(e)
},
pay() {
console.log('支付')
}
// 微信预支付处理
handlePrepay() {
localShopPay().then((result) => {
console.log('result=', result)
})
// if (this.loadingPay) return
// this.loadingPay = true
// prepay({
// from: this.from,
// order_id: this.order_id,
// pay_way: 1, // 微信支付
// p_id: this.$store.getters.hasPid,
// set: this.$store.getters.hasSetId
// }).then(({ code, data }) => {
// switch(code) {
// case 1:
// this.handleWechatPay(data);
// break;
// case 10001:
// this.handleAlipayPay(data);
// break;
// case 20001:
// this.handleWalletPay();
// break;
// case 20002:
// this.handleCreditPat();
// break;
// }
// }).catch(err => {
// }).finally(() => {
// setTimeout(() => {
// this.loadingPay = false
// }, 500)
// })
},
},
watch: {
}

@ -126,11 +126,7 @@
})
const {code, data, msg} = await subsidyWithdrawal(this.billions_id);
if (code == 1) {
setTimeout(() => {
uni.navigateTo({
url: '/bundle_b/pages/exchange/exchange'
})
}, 500)
uni.$emit('refreshBillionsWithdrawConfigFun')
}
uni.hideLoading()
},

@ -4,20 +4,24 @@
:down="downOption" :up="upOption">
<view>
<view class="subsidy-shop-item">
<view class="text-center">
<view class="lg money-color bold">{{historyOrder}}</view>
<view class="xs subsidy-shop-info">消费订单笔数</view>
<view class="text-center" v-if="index == 0" style="width: 50%;">
<view class="lg money-color bold">{{queuesNumber}}</view>
<view class="xs subsidy-shop-info">正在排队</view>
</view>
<view class="subsidy-shop-border"></view>
<view class="text-center">
<view class="lg money-color bold">¥{{getSubsidy}}</view>
<view class="xs subsidy-shop-info">已返补到的金额</view>
</view>
<view class="subsidy-shop-border"></view>
<view class="text-center">
<view class="subsidy-shop-border" v-if="index == 0"></view>
<view class="text-center" v-if="index == 0" style="width: 50%;">
<view class="lg money-color bold">¥{{highSubsidy}}</view>
<view class="xs subsidy-shop-info">商家最高补贴</view>
</view>
<view class="text-center" v-if="index == 1" style="width: 50%;">
<view class="lg money-color bold">{{doneOrder}}</view>
<view class="xs subsidy-shop-info">已完成订单笔数</view>
</view>
<view class="subsidy-shop-border" v-if="index == 1"></view>
<view class="text-center" v-if="index == 1" style="width: 50%;">
<view class="lg money-color bold">¥{{getSubsidy}}</view>
<view class="xs subsidy-shop-info">已返补到的金额</view>
</view>
</view>
<view class="subsidy-shop-block">
@ -61,16 +65,19 @@
}
},
orderList: [],
historyOrder: 0,
doneOrder: 0,
highSubsidy: 0,
getSubsidy: 0
getSubsidy: 0,
queuesNumber: 0
};
},
created() {
uni.$on('refreshSubsidyPage', this.refreshs)
uni.$on('refreshBillionsWithdrawConfigFun', this.refreshs)
},
destroyed() {
uni.$off('refreshSubsidyPage')
uni.$on('refreshBillionsWithdrawConfigFun')
},
methods: {
refreshs() {
@ -90,9 +97,10 @@
}).then(({
data
}) => {
this.historyOrder = data.historyOrder;
this.doneOrder = data.doneOrder;
this.highSubsidy = data.highSubsidy;
this.getSubsidy = data.getSubsidy;
this.queuesNumber = data.queuesNumber;
let curPageData = data.list;
let curPageLen = curPageData.length;
let hasNext = !!data.more;

@ -54,7 +54,6 @@
</view>
</view>
<tabs :current="active" @change="changeShow" bar-width="60" :is-scroll="false">
<tab v-for="(item, index) in order" :key="index" :name="item.name">
<subsidy-list :i="index" :index="active"></subsidy-list>
@ -118,6 +117,10 @@
onLoad(options) {
this.changeShow(0);
this.getBillionsWithdrawConfigFun();
uni.$on('refreshBillionsWithdrawConfigFun', this.getBillionsWithdrawConfigFun)
},
onUnload() {
uni.$off('refreshBillionsWithdrawConfigFun')
},
methods: {
async getBillionsWithdrawConfigFun() {
@ -125,12 +128,11 @@
code,
data
} = await getBillionsWithdrawConfig({type: this.type})
if (code == 1) {
this.widthDrawConfig = data
}
},
changeShow(index) {
if(index != -1) {
this.$nextTick(() => {
@ -141,7 +143,6 @@
changeTab(index) {
this.currentTab = index;
console.log('index=', index)
uni.createSelectorQuery().in(this).select('.rule-ele').boundingClientRect(data => {
console.log('data=', data)
if (data) {
@ -208,11 +209,12 @@
const result = await rechargeBalance(data)
if (result.code == 1) {
uni.$emit('refreshSubsidyPage')
this.showPopup = true
this.tipsText = '已成功充值¥' + data.recharge_money
this.form.recharge_money = ''
}
this.form.recharge_money = ''
uni.hideLoading()
} else if(this.currentTab == 1) {
// 提现
@ -250,14 +252,15 @@
})
data.money = data.withdrawl_money
const result = await applyBillionsWithdrawl(data);
const result = await rechargeBalance(data);
if (result.code == 1) {
uni.$emit('refreshSubsidyPage')
this.showPopup = true
this.tipsText = '已成功提现¥' + data.withdrawl_money + '至微信零钱'
this.form.withdrawl_money = ''
}
this.form.withdrawl_money = ''
uni.hideLoading()
}
this.getBillionsWithdrawConfigFun();

@ -223,12 +223,6 @@
title: '提现成功!'
});
this.form.money = ''
// this.$toast({
// title: '提交成功'
// }, {
// tab: 2,
// url: '/bundle/pages/widthdraw_result/widthdraw_result?id=' + res.data.id
// });
}
});
}

@ -152,6 +152,10 @@
return {}
}
},
fontBold: {
type: Boolean,
default: false
},
// 标签的宽度
itemWidth: {
type: [Number, String],
@ -221,6 +225,9 @@
flex: this.isScroll ? 'auto' : '1',
width: this.$u.addUnit(this.itemWidth)
};
if (this.fontBold) {
style.fontWeight = 'bold'
}
// 字体加粗
if (index == this.currentIndex && this.bold) style.fontWeight = 'bold';
if (index == this.currentIndex) {

@ -861,15 +861,26 @@
}
}
,{
,
{
"path" : "pages/wallet_withdraw_result/wallet_withdraw_result",
"style" :
{
"navigationBarTitleText": "余额提现结果",
"enablePullDownRefresh": false
}
}
{
"navigationBarTitleText": "余额提现结果",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/user_withdraw/withdrawal_record",
"style" :
{
"navigationBarTitleText": "提现记录"
},
"meta": {
"auth": true
}
}
]
},
{
@ -977,7 +988,7 @@
{
"path": "pages/subsidy_shop/subsidy_shop",
"style": {
"navigationBarTitleText": "我的排名"
"navigationBarTitleText": "我的返补"
},
"meta": {
"auth": true

@ -37,10 +37,10 @@
</u-navbar>
<view class="flex">
<view class="flex-1" style="min-width:600rpx">
<u-tabs active-color="#fff" inactive-color="#fff" :current="active" :list="cateList"
<u-tabs active-color="#000" inactive-color="#000" :current="active" :list="cateList"
bg-color="transparent" :active-item-style="{fontSize:'32rpx'}" :bar-width="64"
:bold="false"
:barStyle="{background: 'linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 49%, rgba(255, 255, 255, 0) 100%)'}"
:bold="true" :font-bold="true"
:barStyle="{background: 'linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000000 49%, rgba(0, 0, 0, 0) 100%)'}"
@change="changeActive">
</u-tabs>
</view>
@ -56,6 +56,10 @@
</u-sticky>
<view class="tab-con">
<view v-if="appConfig.show_mini_notice">
<u-notice-bar mode="horizontal" :list="[appConfig.mini_notice]" :font-size="28" :close-icon="false" :speed="100"
color="#449FFB" ></u-notice-bar>
</view>
<view v-show="active == 0">
<index-home ref="indexHome" :home-data="homeData" :nav-list="navList" :live-list="liveLists">
</index-home>

@ -52,12 +52,49 @@
<view class="xl primary">
{{userInfo.user_money || 0}}
</view>
<view class="sm m-t-10">
<view class="sm m-t-10 bold">
余额
</view>
</view>
</router-link>
<router-link class="user-assests-item" to="/bundle/pages/user_collection/user_collection">
<router-link v-if="userInfo.xp_price_state == 2" class="user-assests-item"
to="/bundle/pages/account_limit/account_limit">
<view class="flex-col col-center">
<view class="xl primary">
{{userInfo.xy_price || 0}}
</view>
<view class="sm m-t-10 bold">
信用额度
</view>
</view>
</router-link>
<router-link v-if="appConfig.show_my_refund == 1" class="user-assests-item"
to="/bundle_b/pages/subsidy_shop/subsidy_shop">
<view class="flex-col col-center">
<view>
<image :src="appConfig.my_refund_image"></image>
</view>
<view class="sm m-t-10 bold">
{{appConfig.my_refund_name}}
</view>
</view>
</router-link>
<router-link v-if="appConfig.show_my_promotion == 1" class="user-assests-item"
to="/bundle/pages/user_spread/user_spread">
<view class="flex-col col-center">
<view>
<image :src="appConfig.my_promotion_image"></image>
</view>
<view class="sm m-t-10 bold">
{{appConfig.my_promotion_name}}
</view>
</view>
</router-link>
<!-- <router-link class="user-assests-item" to="/bundle/pages/user_collection/user_collection">
<view class="flex-col col-center">
<view class="xl primary">
{{userInfo.collect || 0}}
@ -76,7 +113,7 @@
优惠券
</view>
</view>
</router-link>
</router-link> -->
<!-- <router-link v-if="userInfo.xp_price_state == 0 || userInfo.xp_price_state == 1 || userInfo.xp_price_state == 3" class="user-assests-item" to="/bundle/pages/credit_payment/credit_payment">
<view class="flex-col col-center">
@ -90,26 +127,30 @@
</view>
</router-link> -->
<router-link v-if="userInfo.xp_price_state == 2" class="user-assests-item"
to="/bundle/pages/account_limit/account_limit">
<view class="flex-col col-center">
<view class="xl primary">
{{userInfo.xy_price || 0}}
</view>
<view class="sm m-t-10">
信用额度
</view>
</view>
</router-link>
</view>
</view>
</view>
<view class="server-nav bg-white" v-if="menuList && menuList.length > 0">
<view>
<view class="title flex row-between">
<view class="lg bold">我的功能</view>
</view>
</view>
<view class="nav flex flex-wrap">
<view v-for="(item, index) in menuList" :key="index" class="item flex-col col-center m-b-20"
style="width: 20%;" @tap="menuJump(item)">
<image class="nav-icon" :src="item.image"></image>
<view class="sm m-t-10 bold">{{item.name}}</view>
</view>
</view>
</view>
<view class="order-nav bg-white">
<router-link to="/bundle/pages/user_order/user_order">
<view class="title flex row-between">
<view class="lg">我的订单</view>
<view class="muted sm row">
<view class="lg bold">我的订单</view>
<view class="muted sm row bold">
全部订单
<u-icon name="arrow-right" size="28rpx" />
</view>
@ -125,7 +166,7 @@
<image class="nav-icon"
src="https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/icon_my_payment.png"></image>
</view>
<view class="sm m-t-10">待付款</view>
<view class="sm m-t-10 bold">待付款</view>
</view>
</router-link>
<router-link class="item" to="/bundle/pages/user_order/user_order?type=delivery">
@ -137,7 +178,7 @@
<image class="nav-icon m-b-10"
src="https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/icon_my_fahuo.png"></image>
</view>
<view class="sm">待发货</view>
<view class="sm bold">待发货</view>
</view>
</router-link>
<router-link class="item" to="/bundle/pages/user_order/user_order?type=delivery">
@ -149,7 +190,7 @@
<image class="nav-icon"
src="https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/icon_my_shouhuo.png"></image>
</view>
<view class="sm m-t-10">待收货</view>
<view class="sm m-t-10 bold">待收货</view>
</view>
</router-link>
<router-link class="item" to="/bundle/pages/user_comment/user_comment">
@ -161,7 +202,7 @@
<image class="nav-icon"
src="https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/icon_my_pingjia.png"></image>
</view>
<view class="sm m-t-10">商品评价</view>
<view class="sm m-t-10 bold">商品评价</view>
</view>
</router-link>
<router-link class="item" to="/bundle/pages/after_sales/after_sales">
@ -173,25 +214,36 @@
<image class="nav-icon"
src="https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/icon_my_shouhou.png"></image>
</view>
<view class="sm m-t-10">退款/售后</view>
<view class="sm m-t-10 bold">退款/售后</view>
</view>
</router-link>
<router-link class="item" to="/bundle_b/pages/my_order/my_order">
<view class="flex-col col-center m-b-20">
<view class="icon-contain">
<view v-if="userInfo.after_sale" class="badge xs flex row-center bg-white">
{{userInfo.after_sale}}
</view>
<image class="nav-icon"
src="https://dlh.hainings.com/uploads/images/20240523164511214f81779.png"></image>
</view>
<view class="sm m-t-10 bold">我的订单</view>
</view>
</router-link>
<router-link class="item" to="/bundle/pages/user_address/user_address">
<view class="flex-col col-center m-b-20">
<view class="icon-contain">
<view v-if="userInfo.after_sale" class="badge xs flex row-center bg-white">
{{userInfo.after_sale}}
</view>
<image class="nav-icon"
src="https://dlh.hainings.com/uploads/images/202106231653409334c6907.png"></image>
</view>
<view class="sm m-t-10 bold">收货地址</view>
</view>
</router-link>
</view>
</view>
<view class="server-nav bg-white" v-if="menuList && menuList.length > 0">
<view>
<view class="title flex row-between">
<view class="lg">我的功能</view>
</view>
</view>
<view class="nav flex flex-wrap">
<view v-for="(item, index) in menuList" :key="index" class="item flex-col col-center m-b-20"
style="width: 25%;" @tap="menuJump(item)">
<image class="nav-icon" :src="item.image"></image>
<view class="sm m-t-10">{{item.name}}</view>
</view>
</view>
</view>
<goods-column ref="mescrollItem"></goods-column>
<tabbar></tabbar>
</view>
@ -371,10 +423,19 @@
.user-assets {
flex: 1;
.user-assests-item {
flex: 1;
}
.xl {
height: 52rpx;
}
image {
width: 52rpx;
height: 52rpx;
}
}
}
@ -404,6 +465,7 @@
.nav {
padding: 26rpx 0 0;
flex-wrap: wrap;
.assets-item {
flex: 1;