add
This commit is contained in:
parent
c3db002f2d
commit
b8cba26b5a
|
@ -1,227 +1,181 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="total">
|
||||
<view class="">
|
||||
账户总余额(元)
|
||||
<view class="head">
|
||||
<view class="user-info">
|
||||
<up-image :show-loading="true" :src="src" width="100rpx" height="100rpx" shape="circle"></up-image>
|
||||
<text style="margin-left: 42rpx;font-size: 32rpx;font-weight: bold;">{{mobile}}</text>
|
||||
</view>
|
||||
<view style="font-size: 36rpx;">
|
||||
¥{{balance||0.00}}
|
||||
|
||||
<view class='money'>
|
||||
<view style="color: #7B5232;font-size:24rpx;display: flex;align-items: center;width: 90vw;">
|
||||
<text>账户余额(元)</text>
|
||||
<text style="font-size:52rpx;margin-left: 20rpx;">{{now_money}}</text>
|
||||
</view>
|
||||
<view @click="navgo('/pages/gift/index')" class=""
|
||||
style='height: 52rpx;width: 148rpx;color: white;background-color: #7B5232;border-radius: 30rpx;line-height: 52rpx;text-align: center;'>
|
||||
购买
|
||||
</view>
|
||||
</view>
|
||||
<view class="action">
|
||||
<view class="">
|
||||
提现至
|
||||
</view>
|
||||
<view style="font-weight: bold;" @click="showPop1=true">
|
||||
{{target_bank.is_own?'对公账户':"个人账户"}}
|
||||
<view class="detail">
|
||||
<view style="font-weight: bold;font-size: 32rpx;">
|
||||
账户详情
|
||||
</view>
|
||||
<view style="display: flex;align-items: center;color: #20B128;"
|
||||
@click="navgo('/pageQuota/Balance/bindAccout')">
|
||||
<text>更换账户</text> <up-icon color="#20B128" name="arrow-right"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form" v-if='target_bank.bank_name'>
|
||||
<up-form labelPosition="left" borderBottom :label-style="{fontSize:'30rpx'}" ref="form1" labelWidth='70'>
|
||||
<up-form-item label="银行卡" prop="userInfo.name" borderBottom ref="item1">
|
||||
<up-input style="border: none;" v-model="target_bank.bank_name" />
|
||||
</up-form-item>
|
||||
<up-form-item label="持卡人" prop="userInfo.name" borderBottom ref="item1">
|
||||
<up-input style="border: none;" v-model="target_bank.name" />
|
||||
</up-form-item>
|
||||
<up-form-item label="银行账户" prop="userInfo.name" borderBottom ref="item1">
|
||||
<up-input style="border: none;" v-model="target_bank.bank_code" />
|
||||
</up-form-item>
|
||||
<up-form-item label="开户网点" prop="userInfo.name" borderBottom ref="item1">
|
||||
<up-input style="border: none;" v-model="target_bank.bank_branch" />
|
||||
</up-form-item>
|
||||
<up-form-item label="提现金额" prop="userInfo.name" borderBottom ref="item1">
|
||||
<up-input style="border: none;" v-model="form.money" placeholder="请输入提现金额" />
|
||||
</up-form-item>
|
||||
<text style="color: #999999;font-size: 24rpx;">
|
||||
说明:用户下单后该订单金额存放在暂存金额中,用户确认收货后次日18:00才可提现该笔订单金额
|
||||
提货付款订单在完成后次日18:00才可提现
|
||||
<view style="margin:16rpx 0 30rpx 0;color: #777777;">
|
||||
<text>
|
||||
累计消费 <text style="font-weight: bold;color: black;">¥{{order}}</text>
|
||||
</text>
|
||||
<text style="margin-left:68rpx ;">
|
||||
累计购买 <text style="font-weight: bold;color: black;">¥{{recharge}}</text>
|
||||
</text>
|
||||
</up-form>
|
||||
</view>
|
||||
<up-empty mode="data" v-else :text='emptyText'
|
||||
icon="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/89e93202405131146497294.png" />
|
||||
<view class="detail" @click="navgo('/pageQuota/Balance/detail')">
|
||||
明细
|
||||
|
||||
<view class="detail-card">
|
||||
<view class="" v-for="item in orderLists.reverse()">
|
||||
<view class="detail-li">
|
||||
<up-image :show-loading="true"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/b6932202406082138255928.png"
|
||||
width="60rpx" height="60rpx" shape="circle" v-if='(+item.amount) >0'></up-image>
|
||||
|
||||
<up-image :show-loading="true" v-else
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/28097202406082141549267.png"
|
||||
width="60rpx" height="60rpx" shape="circle"></up-image>
|
||||
|
||||
<view class="detail-li-r">
|
||||
<view class="top" style="margin-bottom: 14rpx;">
|
||||
<text>供销经营礼包</text>
|
||||
<text style='font-size: 32rpx;font-weight: bold;'>+{{item.amount}}</text>
|
||||
</view>
|
||||
<view class="submit-btn">
|
||||
<up-button text="提现" @click="submit" shape="circle" color="#50C758"></up-button>
|
||||
</view>
|
||||
<up-popup :show="showPop1" :round="10" mode="bottom" @close="showPop1=false" @open="showPop1=true">
|
||||
<view class="popContent">
|
||||
<view style="text-align: center;font-weight: bold;">请选择提现账户</view>
|
||||
<up-icon name="close" color="#303133" size="24" @click="showPop1=false"
|
||||
style="position: absolute;top: 20rpx;right: 20rpx;"></up-icon>
|
||||
<view class="bank-list">
|
||||
<view class="bank-li" @click="choseAccount(0)">
|
||||
<text>个人账户</text>
|
||||
</view>
|
||||
<view class="bank-li" @click="choseAccount(1)">
|
||||
<text>对公账户</text>
|
||||
<view class="top">
|
||||
<text style='font-size: 24rpx;'>{{item.create_time}}</text>
|
||||
<text style='font-size: 24rpx;'>余额{{item.balance}}元</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</up-popup>
|
||||
<view style="margin: 20rpx 0;">
|
||||
<up-line color="#F3F3F3"></up-line>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
bankListApi,
|
||||
amountAccountApi,
|
||||
UserWithdrawApi
|
||||
} from "@/api/balance.js"
|
||||
userInfoApi,
|
||||
chargeListApi,
|
||||
capitalCountAPi
|
||||
} from "@/api/user.js"
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import {
|
||||
onPullDownRefresh
|
||||
} from "@dcloudio/uni-app"
|
||||
const emptyText = '您尚未绑定提现账户,\n点击右上角"添加账户"'
|
||||
const showPop1 = ref(false)
|
||||
ref
|
||||
} from "vue"
|
||||
const src = ref('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/841c0202406081905268790.png') //
|
||||
const now_money = ref(0)
|
||||
const mobile = ref('')
|
||||
const order = ref(0)
|
||||
const recharge = ref(0)
|
||||
// https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/b6932202406082138255928.png
|
||||
|
||||
const choseAccount = (type) => {
|
||||
target_bank.value = bank_list.value[type] || {}
|
||||
console.log(target_bank.value)
|
||||
showPop1.value = false
|
||||
const getUser = () => {
|
||||
userInfoApi().then(res => {
|
||||
now_money.value = res.data.now_money
|
||||
src.value = res.data.avatar
|
||||
mobile.value = res.data.mobile
|
||||
})
|
||||
}
|
||||
|
||||
const orderLists = ref([])
|
||||
const getLists = () => {
|
||||
chargeListApi().then(res => {
|
||||
orderLists.value = res.data.data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const showPop = ref(false)
|
||||
const getShop = () => {
|
||||
capitalCountAPi().then(res => {
|
||||
order.value = res.data.order
|
||||
recharge.value = res.data.recharge
|
||||
})
|
||||
}
|
||||
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const bankList = ref([])
|
||||
|
||||
const getBankList = async () => {
|
||||
let res = await bankListApi()
|
||||
bankList.value = res.data.lists
|
||||
}
|
||||
|
||||
const choseBank = (item) => {
|
||||
form.bank_name = item.name
|
||||
form.bank_id = item.id
|
||||
showPop.value = false
|
||||
}
|
||||
|
||||
|
||||
const form = reactive({
|
||||
money: ""
|
||||
})
|
||||
|
||||
|
||||
const bank_list = ref([])
|
||||
const balance = ref(0.00)
|
||||
const target_bank = ref([])
|
||||
const getBanlance = (isAsync) => {
|
||||
amountAccountApi().then(res => {
|
||||
balance.value = res.data.balance
|
||||
bank_list.value = res.data.bank_list
|
||||
target_bank.value = res.data.bank_list[0] || {}
|
||||
if (isAsync) {
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
})
|
||||
}
|
||||
getBanlance()
|
||||
|
||||
const submit = async () => {
|
||||
await UserWithdrawApi({
|
||||
"merchant_bank_id": target_bank.value.id,
|
||||
"amount": form.money
|
||||
})
|
||||
uni.showToast({
|
||||
title: '提交成功',
|
||||
duration: 1500
|
||||
})
|
||||
uni.$u.sleep(1500).then(res => {
|
||||
uni.navigateTo({
|
||||
url: '/pageQuota/Balance/detail'
|
||||
})
|
||||
})
|
||||
}
|
||||
getBankList()
|
||||
|
||||
onPullDownRefresh(() => {
|
||||
getBanlance(true)
|
||||
})
|
||||
getUser()
|
||||
getLists()
|
||||
getShop()
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang='scss'>
|
||||
.content {
|
||||
width: 710rpx;
|
||||
margin: 20rpx auto;
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
|
||||
.head {
|
||||
height: 272rpx;
|
||||
background-size: 100% 100%;
|
||||
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/841c0202406081905268790.png');
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx;
|
||||
|
||||
.total {
|
||||
background-color: #50C758;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
color: white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding: 42rpx 30rpx;
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.action {
|
||||
background-color: white;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
padding: 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.form {
|
||||
padding: 28rpx 30rpx;
|
||||
background-color: white;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.popContent {
|
||||
padding: 20rpx;
|
||||
|
||||
.bank-list {
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
max-height: 40vh;
|
||||
|
||||
.bank-li {
|
||||
.user-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20rpx;
|
||||
border-bottom: 1px solid #F8F9FA;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.money {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.detail {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 88rpx;
|
||||
text-align: center;
|
||||
line-height: 88rpx;
|
||||
background-color: #50C758;
|
||||
color: white;
|
||||
position: absolute;
|
||||
bottom: 300rpx;
|
||||
right: 20rpx;
|
||||
margin-top: 50rpx;
|
||||
|
||||
|
||||
.detail-card {
|
||||
background-color: white;
|
||||
padding: 34rpx 20rpx;
|
||||
border-radius: 12rpx 12rpx 0rpx 0rpx;
|
||||
|
||||
|
||||
.detail-li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #333333;
|
||||
font-size: 30rpx;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
position: fixed;
|
||||
bottom: 146rpx;
|
||||
width: 710rpx;
|
||||
.detail-li-r {
|
||||
margin-left: 30rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,227 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="total">
|
||||
<view class="">
|
||||
账户总余额(元)
|
||||
</view>
|
||||
<view style="font-size: 36rpx;">
|
||||
¥{{balance||0.00}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="action">
|
||||
<view class="">
|
||||
提现至
|
||||
</view>
|
||||
<view style="font-weight: bold;" @click="showPop1=true">
|
||||
{{target_bank.is_own?'对公账户':"个人账户"}}
|
||||
</view>
|
||||
<view style="display: flex;align-items: center;color: #20B128;"
|
||||
@click="navgo('/pageQuota/Balance/bindAccout')">
|
||||
<text>更换账户</text> <up-icon color="#20B128" name="arrow-right"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form" v-if='target_bank.bank_name'>
|
||||
<up-form labelPosition="left" borderBottom :label-style="{fontSize:'30rpx'}" ref="form1" labelWidth='70'>
|
||||
<up-form-item label="银行卡" prop="userInfo.name" borderBottom ref="item1">
|
||||
<up-input style="border: none;" v-model="target_bank.bank_name" />
|
||||
</up-form-item>
|
||||
<up-form-item label="持卡人" prop="userInfo.name" borderBottom ref="item1">
|
||||
<up-input style="border: none;" v-model="target_bank.name" />
|
||||
</up-form-item>
|
||||
<up-form-item label="银行账户" prop="userInfo.name" borderBottom ref="item1">
|
||||
<up-input style="border: none;" v-model="target_bank.bank_code" />
|
||||
</up-form-item>
|
||||
<up-form-item label="开户网点" prop="userInfo.name" borderBottom ref="item1">
|
||||
<up-input style="border: none;" v-model="target_bank.bank_branch" />
|
||||
</up-form-item>
|
||||
<up-form-item label="提现金额" prop="userInfo.name" borderBottom ref="item1">
|
||||
<up-input style="border: none;" v-model="form.money" placeholder="请输入提现金额" />
|
||||
</up-form-item>
|
||||
<text style="color: #999999;font-size: 24rpx;">
|
||||
说明:用户下单后该订单金额存放在暂存金额中,用户确认收货后次日18:00才可提现该笔订单金额
|
||||
提货付款订单在完成后次日18:00才可提现
|
||||
</text>
|
||||
</up-form>
|
||||
</view>
|
||||
<up-empty mode="data" v-else :text='emptyText'
|
||||
icon="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/89e93202405131146497294.png" />
|
||||
<view class="detail" @click="navgo('/pageQuota/Balance/detail')">
|
||||
明细
|
||||
</view>
|
||||
<view class="submit-btn">
|
||||
<up-button text="提现" @click="submit" shape="circle" color="#50C758"></up-button>
|
||||
</view>
|
||||
<up-popup :show="showPop1" :round="10" mode="bottom" @close="showPop1=false" @open="showPop1=true">
|
||||
<view class="popContent">
|
||||
<view style="text-align: center;font-weight: bold;">请选择提现账户</view>
|
||||
<up-icon name="close" color="#303133" size="24" @click="showPop1=false"
|
||||
style="position: absolute;top: 20rpx;right: 20rpx;"></up-icon>
|
||||
<view class="bank-list">
|
||||
<view class="bank-li" @click="choseAccount(0)">
|
||||
<text>个人账户</text>
|
||||
</view>
|
||||
<view class="bank-li" @click="choseAccount(1)">
|
||||
<text>对公账户</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</up-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
bankListApi,
|
||||
amountAccountApi,
|
||||
UserWithdrawApi
|
||||
} from "@/api/balance.js"
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import {
|
||||
onPullDownRefresh
|
||||
} from "@dcloudio/uni-app"
|
||||
const emptyText = '您尚未绑定提现账户,\n点击右上角"添加账户"'
|
||||
const showPop1 = ref(false)
|
||||
|
||||
const choseAccount = (type) => {
|
||||
target_bank.value = bank_list.value[type] || {}
|
||||
console.log(target_bank.value)
|
||||
showPop1.value = false
|
||||
}
|
||||
|
||||
|
||||
const showPop = ref(false)
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const bankList = ref([])
|
||||
|
||||
const getBankList = async () => {
|
||||
let res = await bankListApi()
|
||||
bankList.value = res.data.lists
|
||||
}
|
||||
|
||||
const choseBank = (item) => {
|
||||
form.bank_name = item.name
|
||||
form.bank_id = item.id
|
||||
showPop.value = false
|
||||
}
|
||||
|
||||
|
||||
const form = reactive({
|
||||
money: ""
|
||||
})
|
||||
|
||||
|
||||
const bank_list = ref([])
|
||||
const balance = ref(0.00)
|
||||
const target_bank = ref([])
|
||||
const getBanlance = (isAsync) => {
|
||||
amountAccountApi().then(res => {
|
||||
balance.value = res.data.balance
|
||||
bank_list.value = res.data.bank_list
|
||||
target_bank.value = res.data.bank_list[0] || {}
|
||||
if (isAsync) {
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
})
|
||||
}
|
||||
getBanlance()
|
||||
|
||||
const submit = async () => {
|
||||
await UserWithdrawApi({
|
||||
"merchant_bank_id": target_bank.value.id,
|
||||
"amount": form.money
|
||||
})
|
||||
uni.showToast({
|
||||
title: '提交成功',
|
||||
duration: 1500
|
||||
})
|
||||
uni.$u.sleep(1500).then(res => {
|
||||
uni.navigateTo({
|
||||
url: '/pageQuota/Balance/detail'
|
||||
})
|
||||
})
|
||||
}
|
||||
getBankList()
|
||||
|
||||
onPullDownRefresh(() => {
|
||||
getBanlance(true)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
padding: 20rpx;
|
||||
|
||||
.total {
|
||||
background-color: #50C758;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 42rpx 30rpx;
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.action {
|
||||
background-color: white;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
padding: 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.form {
|
||||
padding: 28rpx 30rpx;
|
||||
background-color: white;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.popContent {
|
||||
padding: 20rpx;
|
||||
|
||||
.bank-list {
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
max-height: 40vh;
|
||||
|
||||
.bank-li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20rpx;
|
||||
border-bottom: 1px solid #F8F9FA;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.detail {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 88rpx;
|
||||
text-align: center;
|
||||
line-height: 88rpx;
|
||||
background-color: #50C758;
|
||||
color: white;
|
||||
position: absolute;
|
||||
bottom: 300rpx;
|
||||
right: 20rpx;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
position: fixed;
|
||||
bottom: 146rpx;
|
||||
width: 710rpx;
|
||||
|
||||
}
|
||||
</style>
|
|
@ -78,6 +78,13 @@
|
|||
"navigationBarTitleText": "售后退款详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/gift/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "购买礼包",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [{
|
||||
|
@ -168,7 +175,7 @@
|
|||
}, {
|
||||
"path": "Balance/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的余额",
|
||||
"navigationBarTitleText": "我的账户",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
|
|
|
@ -0,0 +1,223 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="head">
|
||||
账户余额(元)
|
||||
<view class="num">
|
||||
{{now_money}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="card-head">
|
||||
<view style="font-size: 32rpx;">
|
||||
购买礼包
|
||||
</view>
|
||||
<view style="font-size: 28rpx;display: flex;align-items: center;color: #444444;"
|
||||
@click="navgo('/pageQuota/Balance/index')">
|
||||
购买记录<up-icon name="arrow-right"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-ipt">
|
||||
<text style="margin-right: 20rpx;">自定义金额</text>
|
||||
<up-input placeholderStyle='font-size:32rpx' fontSize='56rpx' color='#FC452F' border='none'
|
||||
v-model="money" placeholder="点击输入金额" @blur='setPrice' />
|
||||
<view class="valid-text" v-if='money<300'>
|
||||
最低购买300元
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips">
|
||||
<view class="line"> </view>
|
||||
<view class="">
|
||||
<view style="font-size: 32rpx;font-weight: bold;margin-left: 20rpx;">
|
||||
注意事项:
|
||||
</view>
|
||||
<view class='tips-li'>
|
||||
1、充值后帐户的金额不能提现,可用于消费使用
|
||||
</view>
|
||||
<view class='tips-li'>
|
||||
2、账户充值出现问题可联系平台客服,也可拨打平台客服咨询热线4008888888
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="submit-btn">
|
||||
<up-button text="确认购买" @click="submit" shape="circle" color="#EFCC6E"></up-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<!-- https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/44aaa202406081819375845.png -->
|
||||
<script setup>
|
||||
import {
|
||||
rechargeApi,
|
||||
rechargeAmountApi
|
||||
} from "@/api/user.js";
|
||||
import {
|
||||
userInfoApi
|
||||
} from "@/api/user.js"
|
||||
import {
|
||||
ref
|
||||
} from "vue"
|
||||
const money = ref('')
|
||||
const now_money = ref(0)
|
||||
|
||||
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
|
||||
const setPrice = () => {
|
||||
money.value = (+money.value).toFixed(2)
|
||||
}
|
||||
|
||||
const submit = () => {
|
||||
rechargeApi({
|
||||
price: money.value
|
||||
}).then(res => {
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
timeStamp: res.data.timeStamp,
|
||||
nonceStr: res.data.nonceStr,
|
||||
package: res.data.package,
|
||||
signType: res.data.signType,
|
||||
paySign: res.data.paySign,
|
||||
success: (e) => {
|
||||
if (e.errMsg == 'requestPayment:ok') {
|
||||
uni.showModal({
|
||||
title: '支付成功',
|
||||
confirmText: '查看详情',
|
||||
cancelText: '取消',
|
||||
success: (e) => {
|
||||
if (e.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pageQuota/Balance/index'
|
||||
})
|
||||
|
||||
} else uni.navigateBack();
|
||||
}
|
||||
})
|
||||
} else uni.$u.toast('支付失败')
|
||||
},
|
||||
fail: (e) => {
|
||||
uni.$u.toast('用户取消支付');
|
||||
uni.redirectTo({
|
||||
url: '/pages/gift/index'
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const getUser = () => {
|
||||
userInfoApi().then(res => {
|
||||
now_money.value = res.data.now_money
|
||||
})
|
||||
}
|
||||
getUser()
|
||||
</script>
|
||||
|
||||
<style lang='scss'>
|
||||
.content {
|
||||
width: 710rpx;
|
||||
margin: 20rpx auto;
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
|
||||
.card {
|
||||
background-color: white;
|
||||
padding: 20rpx;
|
||||
height: 300rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 16rpx;
|
||||
|
||||
|
||||
.card-head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-ipt {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 630rpx;
|
||||
margin: 0 auto;
|
||||
height: 162rpx;
|
||||
border-radius: 12rpx;
|
||||
border: 2px solid #FFE5CB;
|
||||
margin-top: 34rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 20rpx;
|
||||
color: #A26341;
|
||||
position: relative;
|
||||
|
||||
.valid-text {
|
||||
font-size: 18rpx;
|
||||
color: #FC6957;
|
||||
position: absolute;
|
||||
top: 110rpx;
|
||||
left: 170rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.head {
|
||||
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/44aaa202406081819375845.png');
|
||||
height: 270rpx;
|
||||
background-size: 100% 100%;
|
||||
padding: 42rpx 30rpx;
|
||||
padding-bottom: 62rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
font-size: 30rpx;
|
||||
|
||||
.num {
|
||||
font-size: 64rpx;
|
||||
color: #7B5232;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.tips {
|
||||
margin-top: 40rpx;
|
||||
position: relative;
|
||||
|
||||
.line {
|
||||
background-color: #FF8056;
|
||||
width: 6rpx;
|
||||
height: 34rpx;
|
||||
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||
position: absolute;
|
||||
top: 5rpx;
|
||||
}
|
||||
|
||||
.tips-li {
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #7A7A7A;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
position: absolute;
|
||||
width: 710rpx;
|
||||
bottom: 100rpx;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
|
@ -5,6 +5,16 @@
|
|||
<view style="font-size: 30rpx;font-weight: bold;" @click="test">惠农批发 </view>
|
||||
</template>
|
||||
</up-navbar>
|
||||
|
||||
<view class="store-info" @click="navgo('/multipleShop/index/index')">
|
||||
<view style="display: flex;font-size: 30rpx;font-weight: bold;">
|
||||
{{STORE_INFO.name}}
|
||||
<up-icon name="arrow-right"></up-icon>
|
||||
</view>
|
||||
<view style="display: flex;font-size: 24rpx;color:#777777 ;">
|
||||
{{STORE_INFO.detailed_address}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="navbar">
|
||||
<view style="width: 400rpx;">
|
||||
<up-search placeholder="请输入商品" @search="searchKeyword" @clear="searchKeyword" v-model="keyword"
|
||||
|
@ -191,6 +201,13 @@
|
|||
})
|
||||
}
|
||||
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 用户选择的门店信息
|
||||
let STORE_INFO = uni.getStorageSync('STORE_INFO');
|
||||
if (STORE_INFO)
|
||||
|
@ -923,4 +940,8 @@
|
|||
overflow: hidden;
|
||||
transition: 400ms;
|
||||
}
|
||||
|
||||
.store-info {
|
||||
margin: 0 0 20rpx 20rpx;
|
||||
}
|
||||
</style>
|
|
@ -13,8 +13,7 @@
|
|||
<view class="u-id">ID: {{userInfo.id}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="u-card-level">
|
||||
<!-- <view class="u-card-level">
|
||||
<view class="u-level-item">
|
||||
<view class="u-level-item-num">{{userInfo.vip_name}}</view>
|
||||
<view class="u-level-item-txt">会员等级</view>
|
||||
|
@ -27,11 +26,11 @@
|
|||
<view class="u-level-item-num">{{userInfo.now_money}}</view>
|
||||
<view class="u-level-item-txt">可用余额</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="member">
|
||||
<!-- <view class="member">
|
||||
<view class="member-wrap">
|
||||
<view class="member-left">
|
||||
<up-image width="36rpx" height="36rpx" src="/static/icon/silver.webp"></up-image>
|
||||
|
@ -54,7 +53,20 @@
|
|||
<up-line-progress :percentage="(userInfo.total_recharge_amount/userInfo.next_limit).toFixed(2)"
|
||||
activeColor="#A26341" inactiveColor="#fff" height="8rpx"></up-line-progress>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="gift">
|
||||
<view style="font-weight: bold;">
|
||||
供销经营礼包
|
||||
</view>
|
||||
<view class='gift-buy' @click="navgo('/pages/gift/index')">
|
||||
立即购买
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
<view class="order-info-box">
|
||||
<view class="order-info">
|
||||
|
@ -153,6 +165,13 @@
|
|||
})
|
||||
}
|
||||
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
const logout = () => {
|
||||
userStore.setToken('');
|
||||
userStore.setUserInfo({});
|
||||
|
@ -189,7 +208,7 @@
|
|||
box-sizing: border-box;
|
||||
padding: 50rpx 0 50rpx 50rpx;
|
||||
position: absolute;
|
||||
top: 100rpx;
|
||||
top: 150rpx;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
|
||||
|
@ -362,4 +381,31 @@
|
|||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
.gift {
|
||||
width: 710rpx;
|
||||
margin: 20rpx;
|
||||
margin-bottom: 0;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx;
|
||||
align-items: center;
|
||||
height: 96rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
background-color: #FAF1D7;
|
||||
font-size: 26rpx;
|
||||
|
||||
.gift-buy {
|
||||
font-size: 24rpx;
|
||||
width: 136rpx;
|
||||
height: 56rpx;
|
||||
background-color: white;
|
||||
border-radius: 28rpx;
|
||||
line-height: 56rpx;
|
||||
text-align: center;
|
||||
color: #7D661E;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -30,10 +30,10 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="address-btn" v-if="datas.paid==0">
|
||||
<!-- <view class="address-btn" v-if="datas.paid==0">
|
||||
<view style="width: 80px;"><up-button @click="shopListShow=true" size="small" shape="circle"
|
||||
color="#f6f6f6" :customStyle="{color:'#666666'}">修改</up-button></view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="m-card m-address" style="margin-top: 20rpx;" v-if="addressInfo && addressInfo.address_id">
|
||||
<view class="address-info">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="shop-item">
|
||||
<view class="item-title" @click="navTo">
|
||||
<view>{{datas.number}}</view>
|
||||
<view>{{order_id}}</view>
|
||||
<view v-if="datas.paid==0">
|
||||
<text>待付款</text>
|
||||
</view>
|
||||
|
@ -14,14 +14,36 @@
|
|||
<view class="item-body" @click="navTo">
|
||||
<view class="body-content">
|
||||
<view style="display: flex;flex: 1;flex-shrink: 0;">
|
||||
<view v-for="(item,index) in datas.goods_list" :key="index">
|
||||
<view v-for="(item,index) in datas.goods_list" :key="index" style="display: flex;">
|
||||
<image class="image" :src="item.image"></image>
|
||||
<view class="">
|
||||
<view class="" style="display: flex;position: relative;">
|
||||
<view>
|
||||
{{item.store_name}}
|
||||
</view>
|
||||
<view style="position: absolute;right: -440rpx;font-size: 32rpx;">
|
||||
¥{{item.price}}
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
<view class="" style="display: flex;margin-top: 20rpx;position: relative;">
|
||||
<view style="translateX:-100rpx;">
|
||||
{{item.unit}}
|
||||
</view>
|
||||
<view style="position: absolute;right: -440rpx;font-size: 32rpx;">
|
||||
x{{item.cart_num}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- <view
|
||||
style="display: flex;flex-direction: column;align-items: center;justify-content: center;width: 100rpx;">
|
||||
<up-icon name="arrow-right-double" color="#20B128"></up-icon>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="all">共 {{datas.goods_count}} 件商品, 总金额 <text>¥{{datas.total_price}}</text> </view>
|
||||
</view>
|
||||
|
@ -33,8 +55,8 @@
|
|||
</view>
|
||||
<view v-else class="item-btn">
|
||||
<!-- <view style="width: 80px;"><up-button size="small" plain color="#989898" shape="circle">申请售后</up-button></view> -->
|
||||
<view @click="takeOrder" v-if="datas.status==1" style="width: 80px;"><up-button size="small" color="#20B128"
|
||||
shape="circle">确认收货</up-button></view>
|
||||
<!-- <view @click="takeOrder" v-if="datas.status==1" style="width: 80px;"><up-button size="small" color="#20B128"
|
||||
shape="circle">确认收货</up-button></view> -->
|
||||
<view @click="purchaseAgain" v-if="datas.status==2||datas.status==3" style="width: 80px;"><up-button
|
||||
size="small" plain color="#20B128" shape="circle">再次购买</up-button></view>
|
||||
<view @click="navTo" style="width: 80px;"><up-button size="small" plain color="#20B128"
|
||||
|
@ -66,13 +88,15 @@
|
|||
status: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
order_id: {
|
||||
type: String,
|
||||
default: '0'
|
||||
}
|
||||
})
|
||||
|
||||
const navTo = () => {
|
||||
console.log(status);
|
||||
if (status == 4) {
|
||||
console.log(props.datas.id);
|
||||
if (props.status == 4) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/afterSales/afterSalesOrderDetail?id=" + props.datas.id
|
||||
})
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
<view class="page-box">
|
||||
<view v-if="list.length>0" class="list">
|
||||
<good v-for="(item, index) in list" :datas="item" :key="index" :type="k"
|
||||
@cancleOrder="cancleOrder" @takeOrder="takeOrder" @rePay="rePay"
|
||||
@purchaseAgain="purchaseAgain" @applyAfterSales="applyAfterSales"></good>
|
||||
:order_id='item.order_id' @cancleOrder="cancleOrder" @takeOrder="takeOrder"
|
||||
@rePay="rePay" @purchaseAgain="purchaseAgain" @applyAfterSales="applyAfterSales"></good>
|
||||
</view>
|
||||
<view v-if="!where[k].loading&&list.length==0" style="padding-top: 100rpx;">
|
||||
<up-empty text="订单空空如也"
|
||||
|
|
|
@ -109,9 +109,9 @@
|
|||
<up-icon name="weixin-circle-fill" color="#20b128" size="22"></up-icon>
|
||||
<text style="margin-left: 20rpx;font-size: 26rpx;">微信支付</text>
|
||||
</view>
|
||||
<view class="icon" @click="onChoosePaytype(1)">
|
||||
<image v-if="pay_type == 1" src="@/static/icon/check.png" />
|
||||
<image v-if="pay_type != 1 || pay_type == 3 || !pay_type" src="@/static/icon/n-check.png" />
|
||||
<view class="icon" @click="onChoosePaytype(7)">
|
||||
<image v-if="pay_type == 7" src="@/static/icon/check.png" />
|
||||
<image v-if="pay_type != 7 || pay_type == 3 || !pay_type" src="@/static/icon/n-check.png" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
@ -372,7 +372,7 @@
|
|||
cart_id: cartStore.cartList,
|
||||
address_id: addressInfo.value.address_id,
|
||||
pay_type: pay_type.value,
|
||||
store_id: 2,
|
||||
store_id: STORE_INFO.id || 0,
|
||||
reservation_time: reservation_time.value,
|
||||
shipping_type: orderInfo.value.shipping_type,
|
||||
mark: formData.value.remark
|
||||
|
|
Loading…
Reference in New Issue