This commit is contained in:
mkm 2024-08-05 18:00:36 +08:00
parent 4e1768fa58
commit 5b6d14c85b
10 changed files with 756 additions and 25 deletions

View File

@ -166,3 +166,22 @@ export const isUserShipApi = (data) => {
export const getRechargeListApi = (data) => {
return request.get('/user/UserRecharge/recharge_list', data);
}
/**
* 提现信息
*/
export const getCashInfoApi = (data) => {
return request.get('/user/User/cash_info', data);
}
/**
* 提交提现申请
*/
export const CashApplicationApi = (data) => {
return request.post('/user/User/cash_application', data);
}
/**
* 提现申请记录
*/
export const getCashRecordApi = (data) => {
return request.get('/user/User/cash_record', data);
}

View File

@ -3,9 +3,9 @@ let WSS_URL
import store from "@/store/user.js"
// 环境
// let env = "dev"
// let env = "prod"
let env = "prod"
// let env = "release";
let env = "local";
// let env = "local";
switch (env) {
case 'dev':
@ -17,7 +17,7 @@ switch (env) {
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
break;
case 'local':
BASE_URL = 'http://192.168.1.22:8545';
BASE_URL = 'http://192.168.1.231:8545';
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
break;
default:

View File

@ -100,6 +100,27 @@
"navigationBarTitleText" : "商品列表",
"enablePullDownRefresh": true
}
},
{
"path" : "pages/user_cash/index",
"style" :
{
"navigationBarTitleText" : "提现"
}
},
{
"path" : "pages/user_cash/status",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/user_cash/list",
"style" :
{
"navigationBarTitleText" : "提现申请记录"
}
}
],
"subPackages": [{

View File

@ -655,8 +655,7 @@
}
const settleAccounts = () => {
if (+cartInfo.value.pay_price < 500) return showOverlay.value = true;
if (+cartInfo.value.pay_price < 500 && userStore.userInfo.user_ship==0 ) return showOverlay.value = true;
uni.navigateTo({
url: '/pagesOrder/settle/settle'
})

View File

@ -7,7 +7,7 @@
</template>
</up-navbar>
<view class="login-box">
<image class="logo" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png">
<image class="logo" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png" @click="test()">
</image>
<view class="tips">欢迎登录泸优采</view>
<block v-if="showWeixin">
@ -16,7 +16,7 @@
<up-button @click="weixinLogin" color="#20B128" size="large"><up-icon color="#fff"
size="28"></up-icon></up-button>
</view>
<view class="btn" style="width: 7rem; margin: 1rem auto;">
<view class="btn" style="width: 7rem; margin: 1rem auto;" v-if="test_click>=8">
<up-button @click="navgo('/pages/login/test')" color="#20B128" size="large"><up-icon
name="account-fill" color="#fff" size="28"></up-icon></up-button>
</view>
@ -100,8 +100,11 @@
config
} from "@/config/app.js"
const test_click=ref(0);
const showOfficial = ref(false);
const test=()=>{
test_click.value++
}
const navToIndex = () => {
if (userStore.userInfo && userStore.token) uni.reLaunch({
url: '/pages/index/index'

View File

@ -51,7 +51,8 @@
会员报备
</view>
</view>
<view class="balance" @click="navgo('/pageQuota/balanceDetail/index?type=2')">
<!-- <view class="balance" @click="navgo('/pageQuota/balanceDetail/index?type=2')">L -->
<view class="balance" @click="navgo('/pages/user_cash/index')">
<view class="" style="font-size: 28rpx;transform: translateY(10rpx);">
余额:
</view>
@ -121,7 +122,7 @@
<up-cell title="预约记录" :isLink="true" url="/pageQuota/asset/lists"></up-cell> -->
<up-cell title="我的地址" :isLink="true" url="/pagesOrder/addressList/addressList"></up-cell>
<up-cell title="支付密码" :isLink="true" url="/pagesOrder/setPayPassword/index"></up-cell>
<!-- <up-cell title="商品列表" :isLink="true" url="pages/product/product"></up-cell> -->
<up-cell title="商品列表" :isLink="true" url="pages/product/product" v-if="userInfo.system_store_id>0"></up-cell>
</up-cell-group>
</view>

View File

@ -9,9 +9,9 @@
:showAction="false"></up-search>
</view>
</up-sticky>
<up-list @scrolltolower="loadMoreGood">
<u-list @scrolltolower="loadMoreGood" :enableFlex="enable_flex">
<view v-if="frequentlyList.length>0" class="list">
<up-list-item class="shop-item" v-for="(item, index) in frequentlyList" :key="index">
<view class="shop-item" v-for="(item, index) in frequentlyList" :key="index" >
<image class="shop-img" :src="item.image"></image>
<view class="shop-content" style="width: 490rpx;">
<view class="title">
@ -29,15 +29,15 @@
</view>
</view>
</view>
</up-list-item>
<up-loadmore :status="status" />
</view>
<u-loadmore :status="status" />
</view>
<view v-else style="margin-top: 100rpx;">
<up-empty :text="text"
icon="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/29955202404260944367594.png">
</up-empty>
</view>
</up-list>
</u-list>
</view>
</template>
@ -57,7 +57,7 @@
let status = ref('loadmore')
let list1 = ['零售', '商户', '会员']
let keyword = ref('');
let enable_flex=ref(true)
const where = ref({
page_no: 1,
page_size: 15,
@ -99,6 +99,34 @@
</script>
<style lang="scss">
.tabs {
color: #444444;
font-size: 32rpx;
margin-right: 30rpx;
}
.tabs-active {
color: #20B128;
// font-size: 34rpx;
transition: 300ms;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
background-color: #f6f6f6;
}
.swiper-box {
flex: 1;
}
.swiper-item {
height: 100%;
}
.page-box1 {
position: relative;
@ -123,11 +151,6 @@
border-radius: 20rpx;
overflow: hidden;
// height: calc(100vh - var(--window-top) - 400rpx);
// /* #ifdef H5 */
// height: calc(100vh - 44px - 200rpx);
// /* #endif */
.shop-item {
padding: 20rpx;
border-bottom: 1rpx solid #f6f6f6;
@ -196,4 +219,36 @@
}
}
.cart-btn {
.cart-check {
display: flex;
align-items: center;
image {
width: 40rpx;
height: 40rpx;
margin: 0 10rpx;
}
}
.btn-boxs {
display: flex;
.all-price {
display: flex;
align-items: center;
margin-right: 20rpx;
.price {
color: #20B128;
display: table-cell;
vertical-align: bottom;
font-weight: bold;
}
}
}
}
</style>

506
pages/user_cash/index.vue Normal file
View File

@ -0,0 +1,506 @@
<template>
<view
style="--view-theme: rgb(32, 177, 40);--view-priceColor:#FF7600;--view-minorColor:rgba(108, 198, 94, 0.5);--view-minorColorT:rgba(66, 202, 77, 0.1);--view-bntColor:#FE960F;--view-gradient:#4DEA4D">
<view class='cash-withdrawal'>
<!-- #ifdef MP -->
<view class="accountTitle">
<view :style="{height:getHeight.barTop+'px'}"></view>
<view class="sysTitle acea-row row-center-wrapper" :style="{height:getHeight.barHeight+'px'}">
<text class="iconfont icon-ic_leftarrow" @click="goarrow"></text>
</view>
</view>
<view :style="{height:(getHeight.barTop+getHeight.barHeight)+'px'}"></view>
<!-- #endif -->
<view class="header">
<view class="headerCon">
<navigator url="/pageQuota/balanceDetail/index?type=2" hover-class="navigator-hover">
<view class="money">{{userInfo.now_money}}</view>
<view>可提现金额</view>
</navigator>
</view>
</view>
<view class='wrapper'>
<view>
<form @submit="subCash">
<view class="list">
<view class="itemCon">
<view class='item acea-row row-between-wrapper'>
<view class='name'>提现</view>
<view class='input acea-row row-between-wrapper'>
<input :value='cashVal' :maxlength="moneyMaxLeng"
:placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder'
name="money" type='digit'></input>
<view class="all" @click="allCash">全部提现</view>
</view>
</view>
</view>
<view class='tip'>
<navigator url="/pages/user_cash/list" hover-class="navigator-hover">
当前可提现金额: <text class="price">{{userInfo.now_money}}</text>
<text>查看提现记录</text>
</navigator>
</view>
<view class='tip'>
说明: <text class="num">{{userInfo.notes}}</text>
</view>
</view>
<button formType="submit"
style="margin-top: 15rpx;color: white; background-color: rgb(32, 177, 40); border-color: rgb(32, 177, 40); border-width: 1px; border-style: solid;">立即提现</button>
</form>
</view>
</view>
</view>
<!-- #ifdef MP -->
<authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
<!-- #endif -->
</view>
</template>
<script>
import {
getCashInfoApi,
CashApplicationApi,
getCashRecordApi
} from "@/api/user.js"
// import {
// extractCash,
// } from '@/api/user.js';
import {
mapGetters
} from "vuex";
export default {
components: {},
data() {
return {
// #ifdef MP
getHeight: this.getWXStatusHeight(),
// #endif
index: 0,
minPrice: 0.00, //
userInfo: [],
prevent: true, //
moneyMaxLeng: 8,
withdraw_fee: '0',
true_money: 0,
cashVal: '',
};
},
computed: {
...mapGetters(['isLogin']),
disabled() {
return true
}
},
onLoad() {},
onShow() {
getCashInfoApi().then(res => {
this.userInfo = res.data;
})
},
methods: {
goarrow() {
uni.navigateBack()
},
allCash() {
this.cashVal = '';
this.$nextTick(() => {
this.cashVal = this.userInfo.now_money;
})
},
//
getWXStatusHeight() {
//
const barTop = uni.getSystemInfoSync().statusBarHeight;
// #ifdef MP
//
const menuButtonInfo = wx.getMenuButtonBoundingClientRect() || 0
//
const barHeight = menuButtonInfo.height + (menuButtonInfo.top - barTop) * 2
let barWidth = menuButtonInfo.width
// #endif
// #ifndef MP
//
const barHeight = parseInt(barTop) + 10;
let barWidth = '100%'
// #endif
return {
barHeight,
barTop,
barWidth
}
},
subCash: function(e) {
let that = this,
value = e.detail.value;
value.extract_type = 'balance';
if (value.money.length == 0) return uni.$u.toast('请填写提现金额');
if (Number(value.money) < Number(that.minPrice)) return uni.$u.toast('提现金额不能低于:¥' + that.minPrice);
if (this.prevent) {
this.prevent = false
} else {
return
}
console.log(value)
CashApplicationApi(value).then(res => {
uni.$u.toast(res.msg);
setTimeout(()=>{
uni.navigateTo({
url: `/pages/my/my`
})
},1500)
}).catch(err => {
return uni.$u.toast(err);
});
}
}
}
</script>
<style lang="scss">
.cash-withdrawal {
.accountTitle {
background: linear-gradient(90deg, var(--view-theme) 0%, var(--view-gradient) 100%);
position: fixed;
left: 0;
top: 0;
width: 100%;
z-index: 99;
.sysTitle {
width: 100%;
position: relative;
font-weight: 500;
color: #fff;
font-size: 30rpx;
.iconfont {
position: absolute;
font-size: 36rpx;
left: 11rpx;
width: 60rpx;
}
}
}
.header {
width: 100%;
height: 380rpx;
background: linear-gradient(90deg, var(--view-theme) 0%, var(--view-gradient) 100%);
font-size: 30rpx;
font-weight: 400;
color: #F5F5F5;
text-align: center;
padding-top: 88rpx;
position: relative;
&::after {
position: absolute;
content: ' ';
width: 50%;
height: 160rpx;
background: linear-gradient(180deg, var(--view-theme) 0%, #F5F5F5 100%);
left: 0;
}
&:before {
position: absolute;
content: ' ';
width: 50%;
height: 160rpx;
background: linear-gradient(180deg, var(--view-gradient) 0%, #F5F5F5 100%);
right: 0;
bottom: -146rpx;
}
.headerCon {
background-image: url('../static/cashBg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
width: 100%;
height: 278rpx;
}
.money {
font-size: 76rpx;
font-weight: 600;
color: #FFFFFF;
font-family: 'Regular';
margin-bottom: 16rpx;
}
}
}
.cash-withdrawal .wrapper {
width: 710rpx;
margin: -100rpx auto 0 auto;
position: relative;
z-index: 9;
.nav {
width: 100%;
height: 110rpx;
background-color: rgba(255, 255, 255, 0.9);
border-radius: 24rpx 24rpx 0 0;
position: relative;
z-index: 9;
&.on {
height: unset;
padding: 18rpx 0 8rpx 0;
background-color: #fff;
.item {
padding-top: 0;
padding-left: 30rpx;
font-weight: 500;
color: #333;
}
}
.item {
width: 33.33%;
height: 84rpx;
line-height: 84rpx;
color: #666666;
font-size: 26rpx;
position: relative;
z-index: 9;
&.items {
font-size: 28rpx;
color: var(--view-theme);
font-weight: 500 !important;
}
&.on {
width: 50%;
padding-left: 0;
text-align: center;
}
&.ons {
color: var(--view-theme);
font-weight: 500;
font-size: 28rpx;
}
&.on1,
&.on2,
&.on3 {
font-weight: 400;
padding-left: 0;
text-align: center;
}
&.on6,
&.on7,
&.on8,
&.on9 {
width: 25%;
font-weight: 400;
padding-left: 0;
text-align: center;
}
}
.navBg {
position: absolute;
background-repeat: no-repeat;
background-size: 100% 100%;
width: 710rpx;
height: 122rpx;
left: 0;
bottom: 0;
box-sizing: border-box;
&.on1 {
background-image: url('../static/tixian01.png');
}
&.on2 {
background-image: url('../static/tixian02.png');
}
&.on3 {
background-image: url('../static/tixian03.png');
}
&.on4 {
background-image: url('../static/tixian04.png');
}
&.on5 {
background-image: url('../static/tixian05.png');
}
&.on6 {
background-image: url('../static/tixian06.png');
}
&.on7 {
background-image: url('../static/tixian07.png');
}
&.on8 {
background-image: url('../static/tixian08.png');
}
&.on9 {
background-image: url('../static/tixian09.png');
}
}
}
.bnt {
font-size: 28rpx;
color: #fff;
width: 710rpx;
height: 88rpx;
text-align: center;
border-radius: 50rpx;
line-height: 88rpx;
margin: 48rpx auto;
}
}
.cash-withdrawal .wrapper .list {
padding: 0 30rpx 48rpx 30rpx;
background-color: #fff;
border-radius: 0 0 24rpx 24rpx;
.itemCon {
border-bottom: 1px solid #EEEEEE;
padding-bottom: 15rpx;
margin-bottom: 42rpx;
}
}
.cash-withdrawal .wrapper .list .item {
font-size: 28rpx;
color: #333;
padding: 28rpx 0;
}
.cash-withdrawal .wrapper .list .item .name {
width: 130rpx;
}
.cash-withdrawal .wrapper .list .item .input {
width: 505rpx;
input {
font-size: 28rpx;
}
.iconfont {
color: #ccc;
}
.icon-ic_camera {
font-size: 38rpx;
margin-bottom: 6rpx;
}
.all {
font-size: 26rpx;
color: var(--view-theme);
}
}
.cash-withdrawal .wrapper .list .item .input .placeholder {
color: #ccc;
}
.cash-withdrawal .wrapper .list .item .picEwm,
.cash-withdrawal .wrapper .list .item .pictrue {
width: 128rpx;
height: 128rpx;
border-radius: 14rpx;
position: relative;
margin-right: 23rpx;
background: #F5F5F5;
}
.cash-withdrawal .wrapper .list .item .picEwm image {
width: 100%;
height: 100%;
border-radius: 3rpx;
}
.cash-withdrawal .wrapper .list .item .picEwm .icon-ic_close {
position: absolute;
right: 0;
top: 0;
font-size: 24rpx;
width: 32rpx;
height: 32rpx;
background: #999999;
border-radius: 0 16rpx 0 16rpx;
color: #fff;
text-align: center;
line-height: 32rpx;
}
.cash-withdrawal .wrapper .list .item .pictrue {
font-size: 22rpx;
color: #BBBBBB;
}
.cash-withdrawal .wrapper .list .item .pictrue .icon-icon25201 {
font-size: 47rpx;
color: #DDDDDD;
margin-bottom: 3px;
}
.cash-withdrawal .wrapper .list .tip {
font-size: 24rpx;
color: #999;
margin-top: 16rpx;
.price {
color: var(--view-theme);
margin: 0 16rpx;
}
.num {
margin-left: 16rpx;
}
}
.cash-withdrawal .wrapper .list .tip2 {
font-size: 26rpx;
color: #999;
text-align: center;
margin: 44rpx 0 20rpx 0;
}
.cash-withdrawal .wrapper .list .value {
height: 135rpx;
line-height: 135rpx;
border-bottom: 1rpx solid #eee;
width: 690rpx;
margin: 0 auto;
}
.cash-withdrawal .wrapper .list .value input {
font-size: 80rpx;
color: #282828;
height: 135rpx;
text-align: center;
}
.cash-withdrawal .wrapper .list .value .placeholder2 {
color: #bbb;
}
.bg-gray {
background-color: var(--view-theme);
opacity: 0.4;
}
</style>

93
pages/user_cash/list.vue Normal file
View File

@ -0,0 +1,93 @@
<template>
<block v-if="lists.length>0">
<view class="content">
<view class="li" v-for="(item,index) in lists" :key="index">
<view class="li-top">
<text>{{item.title}}</text>
<text style="font-weight: bold;" :style="{color:item.pay_status=='1'?'#50C758':'red'
}">{{item.price}}</text>
</view>
<view class="li-top" style="margin-bottom: 0;">
<text style="font-size: 24rpx;color: grey;">{{item.create_time}}</text>
<text style="font-size: 24rpx;color: grey;" >{{item.status_name}}</text>
</view>
</view>
</view>
</block>
<up-empty v-else mode="history" style="margin-top: 20vh;" text='没有更多内容了'>
</up-empty>
<view style="height: 50rpx;">
</view>
</template>
<script setup>
import {
ref,
reactive
} from "vue"
import {
onLoad,
onPullDownRefresh
} from "@dcloudio/uni-app"
import {
getCashRecordApi
} from "@/api/user.js"
const mark = ref(0)
const lists = ref([])
let type = ref('')
const getLists = async (isPullDown = false) => {
let res = await getCashRecordApi({
})
lists.value = res.data
if (isPullDown) uni.stopPullDownRefresh()
}
onLoad((opt) => {
type.value = opt.type
getLists()
})
onPullDownRefresh(() => {
getLists(true)
})
</script>
<style lang="scss">
.content {
background-color: white;
width: 690rpx;
padding: 20rpx;
margin: 0 auto;
box-sizing: border-box;
margin: 0 auto;
margin-top: 30rpx;
border-radius: 20rpx;
margin-bottom: 100rpx;
.li {
margin-top: 20rpx;
border-bottom: 1px solid #EDF2FA;
padding-bottom: 20rpx;
.li-top {
display: flex;
justify-content: space-between;
margin-bottom: 20rpx;
}
}
}
</style>

View File

@ -0,0 +1,34 @@
<template>
<view style="--view-theme: #42CA4D;--view-priceColor:#FF7600;--view-minorColor:rgba(108, 198, 94, 0.5);--view-minorColorT:rgba(66, 202, 77, 0.1);--view-bntColor:#FE960F;--view-gradient:#4DEA4D">
<view class="px-20 mt-40">
<view class="bg--w111-fff rd-24rpx flex-col flex-center box">
<text class="iconfont icon-a-ic_CompleteSelect"></text>
<view class="fs-32 lh-44rpx mt-64">提现申请已提交等待人工审核</view>
<view class="w-498 h-88 rd-44rpx flex-center fs-28 text--w111-fff bg-color mt-30" @tap="goPage">好的</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'status',
methods:{
goPage(){
uni.switchTab({
url: '/pages/my/my'
})
}
}
}
</script>
<style scoped>
.box{
padding: 88rpx 0 64rpx;
}
.icon-a-ic_CompleteSelect{
font-size: 112rpx;
color: #00B42A;
}
</style>