意见反馈

This commit is contained in:
haomingming 2025-09-08 09:11:03 +08:00
parent b8f6257bf1
commit d40f65de65
8 changed files with 1294 additions and 25 deletions

View File

@ -308,6 +308,9 @@ const api = {
return request('/expertAPI/updateStatus', data, 'post', false);
},
addFeedBack(data){
return request('/expertAPI/addFeedBack', data, 'post', false);
},
// 肝胆新闻相关API
// 顶部轮播
newsRollNew(data){
@ -335,6 +338,9 @@ const api = {
patientListByGBK(data){
return request('/expertAPI/patientListByGBK', data, 'post', false);
},
patientListByGBKU(data){
return request('/expertAPI/patientListByGBKU', data, 'post', false);
},
followUpList(data){
return request('/expertAPI/followUpList', data, 'post', false);
},
@ -401,6 +407,16 @@ const api = {
polularScienceArticleListIndexNew(data){
return request('/expertAPI/polularScienceArticleListIndexNew', data, 'post', false);
},
bankCardList(data){
return request('/expertPay/bankCardList', data, 'post', false);
},
getIncomeTax(data){
return request('/expertPay/getIncomeTax', data, 'post', false);
},
createWithdrawal(data){
return request('/expertPay/createWithdrawal', data, 'post', false);
},
}
export default api

View File

@ -1,5 +1,5 @@
{
"name" : "uniapp",
"name" : "肝胆相照专家端",
"appid" : "__UNI__89F511F",
"description" : "",
"versionName" : "1.0.0",
@ -62,6 +62,30 @@
"UniversalLinks" : "https://doc.igandan.com/gdxzExpert/"
}
}
},
"splashscreen" : {
"androidStyle" : "common"
},
"icons" : {
"android" : {
"hdpi" : "D:/haomi/Documents/WeChat Files/wxid_x5u4rycntnkq21/FileStorage/File/2025-09/专家版图标/专家版图标/72.png",
"xhdpi" : "D:/haomi/Documents/WeChat Files/wxid_x5u4rycntnkq21/FileStorage/File/2025-09/专家版图标/专家版图标/96.png",
"xxhdpi" : "D:/haomi/Documents/WeChat Files/wxid_x5u4rycntnkq21/FileStorage/File/2025-09/专家版图标/专家版图标/144.png",
"xxxhdpi" : "D:/haomi/Documents/WeChat Files/wxid_x5u4rycntnkq21/FileStorage/File/2025-09/专家版图标/专家版图标/192.png"
},
"ios" : {
"appstore" : "D:/haomi/Documents/WeChat Files/wxid_x5u4rycntnkq21/FileStorage/File/2025-09/专家版图标/专家版图标/1024.png",
"iphone" : {
"app@2x" : "D:/haomi/Documents/WeChat Files/wxid_x5u4rycntnkq21/FileStorage/File/2025-09/专家版图标/专家版图标/120.png",
"app@3x" : "D:/haomi/Documents/WeChat Files/wxid_x5u4rycntnkq21/FileStorage/File/2025-09/专家版图标/专家版图标/180.png",
"spotlight@2x" : "D:/haomi/Documents/WeChat Files/wxid_x5u4rycntnkq21/FileStorage/File/2025-09/专家版图标/专家版图标/80.png",
"spotlight@3x" : "D:/haomi/Documents/WeChat Files/wxid_x5u4rycntnkq21/FileStorage/File/2025-09/专家版图标/专家版图标/120.png",
"settings@2x" : "D:/haomi/Documents/WeChat Files/wxid_x5u4rycntnkq21/FileStorage/File/2025-09/专家版图标/专家版图标/58.png",
"settings@3x" : "D:/haomi/Documents/WeChat Files/wxid_x5u4rycntnkq21/FileStorage/File/2025-09/专家版图标/专家版图标/87.png",
"notification@2x" : "D:/haomi/Documents/WeChat Files/wxid_x5u4rycntnkq21/FileStorage/File/2025-09/专家版图标/专家版图标/40.png",
"notification@3x" : "D:/haomi/Documents/WeChat Files/wxid_x5u4rycntnkq21/FileStorage/File/2025-09/专家版图标/专家版图标/60.png"
}
}
}
},
"nativePlugins" : {

View File

@ -1,7 +1,6 @@
{
"easycom": {
"autoscan": true,
// customhttps://ask.dcloud.net.cn/question/131175
"custom": {
"^u--(.*)": "@/node_modules/uview-plus/components/u-$1/u-$1.vue",
"^up-(.*)": "@/node_modules/uview-plus/components/u-$1/u-$1.vue",
@ -595,6 +594,16 @@
}
}
},
{
"path": "myAccount/withdrawal",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "提现",
"app": {
"bounce": "none"
}
}
},
{
"path": "myCourseware/myCourseware",
"style": {
@ -829,6 +838,26 @@
"bounce": "none"
}
}
},
{
"path": "feedback/feedback",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "意见反馈",
"app": {
"bounce": "none"
}
}
},
{
"path": "feedback/feedback-logoff",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "注销账户",
"app": {
"bounce": "none"
}
}
}
@ -933,13 +962,13 @@
"navigationStyle": "custom"
}
},
"condition" : { //
"current": 0, //(list )
"condition" : {
"current": 0,
"list": [
{
"name": "", //
"path": "pages_app/videoDetail/videoDetail", //
"query": "" //onLoad
"name": "",
"path": "pages_app/videoDetail/videoDetail",
"query": ""
}
]
}

View File

@ -0,0 +1,253 @@
<template>
<view class="feedback-container">
<!-- 状态栏占位 -->
<view class="status-bar"></view>
<!-- 顶部导航栏 -->
<view class="nav-bar">
<view class="nav-left" @click="goBack">
<text class="back-arrow"></text>
</view>
<text class="nav-title">意见反馈</text>
</view>
<!-- 反馈输入区域 -->
<view class="feedback-input-container">
<view class="input-area">
<textarea
class="feedback-textarea"
v-model="feedbackText"
:maxlength="200"
placeholder=""
@input="onInput"
disabled
></textarea>
<view class="voice-button" @click="toggleVoiceInput">
<text class="voice-icon">🎙</text>
</view>
</view>
</view>
<!-- 底部提交按钮 -->
<view class="submit-container">
<button class="submit-btn" @click="submitFeedback" :disabled="!feedbackText.trim()">
已确认风险提交注销申请
</button>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue';
import api from '@/api/api';
const feedbackText = ref('账户注销后不可恢复,您将永久放弃此账户现有权益\n1.您将不能再使用此账户随访患者,不能接收随访患者发送的信息\n2.您所有的咨询、订单、下载记录将被清除且不能找回\n3.肝胆相照平台提供的文献、视频等服务将结束\n4.申请注销账户前请确保账户相关权益已结清收到您的注销申请后我们将在10个工作日内帮您完成注销及数据清除工作');
//
const goBack = () => {
uni.navigateBack();
};
//
const onInput = (e) => {
feedbackText.value = e.detail.value;
};
//
const toggleVoiceInput = () => {
uni.showToast({
title: '语音输入功能',
icon: 'none'
});
};
//
const submitFeedback = () => {
if (!feedbackText.value.trim()) {
uni.showToast({
title: '请输入反馈内容',
icon: 'none'
});
return;
}
api.patientListByGBKU().then(res => {
console.log(res);
if(res.code == 200 && res.data.length == 0){
//
uni.showModal({
title: '确认注销',
content: '注销账户后,您的所有数据将被永久删除且无法恢复。确定要提交注销申请吗?',
confirmText: '确认注销',
cancelText: '取消',
confirmColor: '#ff0000',
success: (res) => {
if (res.confirm) {
//
uni.showLoading({
title: '提交中...'
});
api.addFeedBack({
content: feedbackText.value
}).then(res => {
console.log(res);
uni.hideLoading();
uni.showToast({ title: '注销申请已提交', icon: 'success' });
setTimeout(() => {
uni.navigateBack();
}, 1500);
}).catch(err => {
uni.hideLoading();
uni.showToast({ title: '提交失败,请重试', icon: 'none' });
});
}
}
});
}else{
uni.showToast({ title: "请您解除所有随访患者后再提交注销申请", icon: 'none', duration: 5000 });
}
});
};
</script>
<style scoped>
.feedback-container {
background-color: #ffffff;
min-height: 100vh;
position: relative;
}
/* 状态栏占位 */
.status-bar {
height: 44rpx;
background-color: #ffffff;
}
/* 导航栏样式 */
.nav-bar {
display: flex;
align-items: center;
height: 88rpx;
background-color: #f5f5f5;
padding: 0 30rpx;
position: relative;
border-bottom: 1rpx solid #e0e0e0;
}
.nav-left {
position: absolute;
left: 30rpx;
z-index: 1;
}
.back-arrow {
font-size: 48rpx;
color: #ff0000;
font-weight: bold;
line-height: 1;
}
.nav-title {
flex: 1;
text-align: center;
font-size: 36rpx;
color: #ff0000;
font-weight: 500;
}
/* 反馈输入区域 */
.feedback-input-container {
padding: 30rpx;
flex: 1;
}
.input-area {
position: relative;
background-color: #ffffff;
border: 2rpx solid #e0e0e0;
border-radius: 8rpx;
min-height: 400rpx;
padding: 30rpx;
}
.input-placeholder {
position: absolute;
top: 30rpx;
left: 30rpx;
font-size: 28rpx;
color: #999999;
line-height: 1.5;
pointer-events: none;
z-index: 1;
width: calc(100% - 100rpx);
}
.feedback-textarea {
width: 100%;
min-height: 300rpx;
font-size: 28rpx;
color: #333333;
line-height: 1.5;
background: transparent;
border: none;
outline: none;
resize: none;
position: relative;
z-index: 2;
}
.voice-button {
position: absolute;
bottom: 20rpx;
right: 20rpx;
width: 60rpx;
height: 60rpx;
background-color: #ff0000;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
z-index: 3;
}
.voice-icon {
font-size: 32rpx;
color: #ffffff;
}
/* 底部提交按钮 */
.submit-container {
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 30rpx;
background-color: #ffffff;
border-top: 1rpx solid #e0e0e0;
z-index: 999;
}
.submit-btn {
width: 100%;
height: 88rpx;
background-color: #ffffff;
border: 2rpx solid #e0e0e0;
border-radius: 8rpx;
color: #ff0000;
font-size: 32rpx;
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
}
.submit-btn:active {
background-color: #fff0f0;
}
.submit-btn:disabled {
color: #cccccc;
border-color: #f0f0f0;
}
</style>

View File

@ -0,0 +1,227 @@
<template>
<view class="feedback-container">
<!-- 状态栏占位 -->
<view class="status-bar"></view>
<!-- 顶部导航栏 -->
<view class="nav-bar">
<view class="nav-left" @click="goBack">
<text class="back-arrow"></text>
</view>
<text class="nav-title">意见反馈</text>
</view>
<!-- 反馈输入区域 -->
<view class="feedback-input-container">
<view class="input-area">
<text class="input-placeholder" v-show="!feedbackText">欢迎对我们的软件提供建议,帮助我们更好更快的改进"肝胆相照"APP (200字以内)</text>
<textarea
class="feedback-textarea"
v-model="feedbackText"
:maxlength="200"
placeholder=""
@input="onInput"
></textarea>
<view class="voice-button" @click="toggleVoiceInput">
<text class="voice-icon">🎙</text>
</view>
</view>
</view>
<!-- 底部提交按钮 -->
<view class="submit-container">
<button class="submit-btn" @click="submitFeedback" :disabled="!feedbackText.trim()">
提交
</button>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue';
import api from '@/api/api';
const feedbackText = ref('');
//
const goBack = () => {
uni.navigateBack();
};
//
const onInput = (e) => {
feedbackText.value = e.detail.value;
};
//
const toggleVoiceInput = () => {
uni.showToast({
title: '语音输入功能',
icon: 'none'
});
};
//
const submitFeedback = () => {
if (!feedbackText.value.trim()) {
uni.showToast({
title: '请输入反馈内容',
icon: 'none'
});
return;
}
uni.showLoading({
title: '提交中...'
});
api.addFeedBack({
content: feedbackText.value
}).then(res => {
console.log(res);
uni.hideLoading();
uni.showToast({ title: '提交成功', icon: 'success' });
});
uni.navigateBack();
};
</script>
<style scoped>
.feedback-container {
background-color: #ffffff;
min-height: 100vh;
position: relative;
}
/* 状态栏占位 */
.status-bar {
height: 44rpx;
background-color: #ffffff;
}
/* 导航栏样式 */
.nav-bar {
display: flex;
align-items: center;
height: 88rpx;
background-color: #f5f5f5;
padding: 0 30rpx;
position: relative;
border-bottom: 1rpx solid #e0e0e0;
}
.nav-left {
position: absolute;
left: 30rpx;
z-index: 1;
}
.back-arrow {
font-size: 48rpx;
color: #ff0000;
font-weight: bold;
line-height: 1;
}
.nav-title {
flex: 1;
text-align: center;
font-size: 36rpx;
color: #ff0000;
font-weight: 500;
}
/* 反馈输入区域 */
.feedback-input-container {
padding: 30rpx;
flex: 1;
}
.input-area {
position: relative;
background-color: #ffffff;
border: 2rpx solid #e0e0e0;
border-radius: 8rpx;
min-height: 400rpx;
padding: 30rpx;
}
.input-placeholder {
position: absolute;
top: 30rpx;
left: 30rpx;
font-size: 28rpx;
color: #999999;
line-height: 1.5;
pointer-events: none;
z-index: 1;
width: calc(100% - 100rpx);
}
.feedback-textarea {
width: 100%;
min-height: 300rpx;
font-size: 28rpx;
color: #333333;
line-height: 1.5;
background: transparent;
border: none;
outline: none;
resize: none;
position: relative;
z-index: 2;
}
.voice-button {
position: absolute;
bottom: 20rpx;
right: 20rpx;
width: 60rpx;
height: 60rpx;
background-color: #ff0000;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
z-index: 3;
}
.voice-icon {
font-size: 32rpx;
color: #ffffff;
}
/* 底部提交按钮 */
.submit-container {
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 30rpx;
background-color: #ffffff;
border-top: 1rpx solid #e0e0e0;
z-index: 999;
}
.submit-btn {
width: 100%;
height: 88rpx;
background-color: #ffffff;
border: 2rpx solid #e0e0e0;
border-radius: 8rpx;
color: #ff0000;
font-size: 32rpx;
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
}
.submit-btn:active {
background-color: #fff0f0;
}
.submit-btn:disabled {
color: #cccccc;
border-color: #f0f0f0;
}
</style>

View File

@ -90,10 +90,36 @@ const goBack = () => {
}
const handleWithdrawal = () => {
uni.showToast({
title: '提现功能开发中',
icon: 'none'
})
if(accountBalance.value < lessWithdrawalBalance.value){
uni.showToast({
title: `提现金额不得少于${(lessWithdrawalBalance/100).toFixed(2)}`,
icon: 'none'
})
return
}else{
api.bankCardList().then(res => {
console.log(res)
if(res.code == 200 && res.data.length > 0){
uni.navigateTo({
url: '/pages_app/myAccount/withdrawal'
})
}else{
uni.showModal({
title: '提示',
content: '请先添加银行卡',
confirmText: '确定',
cancelText: '取消',
success: (res) => {
if(res.confirm){
uni.navigateTo({
url: '/pages_app/idcardAuth/bankCardList'
})
}
}
})
}
})
}
}
const handleBillDetails = () => {

View File

@ -0,0 +1,704 @@
<template>
<view class="withdrawal-page">
<!-- 顶部导航栏 -->
<uni-nav-bar
left-icon="left"
title="提现"
@clickLeft="goBack"
fixed
color="#8B2316"
height="140rpx"
:border="false"
backgroundColor="#eeeeee"
></uni-nav-bar>
<!-- 主内容区域 -->
<view class="main-content">
<!-- 加载状态 -->
<view class="loading-container" v-if="loading">
<text class="loading-text">数据加载中...</text>
</view>
<!-- 结算银行卡区域 -->
<view class="bank-card-section" v-else>
<view class="section-header">
<text class="section-title">结算银行卡</text>
<text class="withdrawal-rules" @click="showWithdrawalRules">提现规则</text>
</view>
<view class="divider"></view>
<view class="bank-card-info" @click="selectBankCard" v-if="selectedBankCard">
<view class="bank-logo">
<text class="bank-icon">{{ selectedBankCard.bankName ? selectedBankCard.bankName.charAt(0) : '工' }}</text>
</view>
<view class="bank-details">
<text class="bank-name">{{ selectedBankCard.bankName || '工商银行' }}</text>
<text class="bank-card-number">尾号为{{ selectedBankCard.cardNumber ? selectedBankCard.cardNumber.slice(-4) : '8937' }}储蓄卡</text>
</view>
<text class="arrow-icon"></text>
</view>
<view class="no-bank-card" v-else>
<text class="no-card-text">请先添加银行卡</text>
<text class="arrow-icon"></text>
</view>
<view class="divider"></view>
</view>
<!-- 提现金额区域 -->
<view class="amount-section">
<text class="amount-title">提现金额</text>
<view class="amount-display">
<text class="currency-symbol">¥</text>
<text class="amount-value">{{ withdrawalAmount }}</text>
</view>
<view class="amount-details">
<text class="tax-info">扣除个人所得税<text class="highlight-red">{{ (incomeTax / 100).toFixed(2) }}</text></text>
<text class="fee-info">扣除提现手续费<text class="highlight-red">{{ (withdrawalBalanceFee / 100).toFixed(2) }}</text></text>
<text class="actual-amount">此次提现实际到账<text class="highlight-red">{{ actualAmount }}</text></text>
</view>
</view>
</view>
<!-- 底部确认按钮 -->
<view class="bottom-button-container">
<button class="confirm-button" @click="confirmWithdrawal" :disabled="loading || !selectedBankCard">
{{ loading ? '处理中...' : '确认转出' }}
</button>
</view>
<!-- 底部手势指示器 -->
<view class="gesture-indicator"></view>
<!-- 短信验证码弹框 -->
<view v-if="showSmsDialog" class="sms-mask">
<view class="sms-dialog">
<view class="sms-title">短信验证码</view>
<view class="sms-subtitle">请输入手机{{ maskedMobile }}收到的验证码</view>
<view class="sms-input-row">
<input class="sms-input" v-model="smsCode" placeholder="请输入验证码" placeholder-style="color: #cccccc" />
<button class="sms-code-btn" :disabled="countdown > 0 || sendingCode" @click="onGetSmsCode">
<text v-if="countdown === 0">获取验证码</text>
<text v-else>{{ countdown }}s</text>
</button>
</view>
<view class="sms-actions">
<button class="sms-cancel" @click="onCancelSms">取消</button>
<button class="sms-confirm" @click="onConfirmSms">确定</button>
</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref, onMounted, computed } from 'vue'
import api from '@/api/api'
//
const accountBalance = ref(0) //
const withdrawalBalanceMaxOnce = ref(0) //
const withdrawalBalanceFee = ref(0) //
const lessWithdrawalBalance = ref(0) //
const incomeTax = ref(0) //
const withdrawalAmount = ref('0.00') //
const actualAmount = ref('0.00') //
const bankCardList = ref([]) //
const selectedBankCard = ref(null) //
const loading = ref(false)
//
const showSmsDialog = ref(false)
const smsCode = ref('')
const sendingCode = ref(false)
const countdown = ref(0)
let countdownTimer = null
//
const maskedMobile = computed(() => {
if (selectedBankCard.value && selectedBankCard.value.mobile) {
const m = selectedBankCard.value.mobile
if (m && m.length >= 7) {
return `${m.slice(0,3)}****${m.slice(-4)}`
}
return m
}
return '***********'
})
onMounted(() => {
//
initData()
})
//
const calculateAmounts = () => {
// = - -
const totalDeduction = incomeTax.value + withdrawalBalanceFee.value
const amount = accountBalance.value - totalDeduction
withdrawalAmount.value = accountBalance.value > 0 ? (accountBalance.value/100).toFixed(2) : '0.00'
actualAmount.value = amount > 0 ? (amount/100).toFixed(2) : '0.00'
}
//
const initData = async () => {
loading.value = true
try {
await Promise.all([
getMyAccount(),
getBankCardList()
])
} catch (error) {
console.error('初始化数据失败:', error)
uni.showToast({
title: '数据加载失败',
icon: 'none'
})
} finally {
loading.value = false
}
}
//
const goBack = () => {
uni.navigateBack()
}
//
const getMyAccount = async () => {
try {
const res = await api.getMyAccount({})
console.log('账户信息:', res)
if (res && res.code === 200 && res.data) {
accountBalance.value = res.data.balance || 0
withdrawalBalanceMaxOnce.value = res.data.withdrawalBalanceMaxOnce
withdrawalBalanceFee.value = res.data.withdrawalBalanceFee
lessWithdrawalBalance.value = res.data.lessWithdrawalBalance
//
calculateAmounts()
//
getIncomeTax(accountBalance.value)
}
} catch (error) {
console.error('获取账户信息失败:', error)
}
}
//
const getIncomeTax = async (amount) => {
try {
const res = await api.getIncomeTax({amount: amount})
console.log('个人所得税:', res)
if (res && res.code === 200 && res.data) {
incomeTax.value = res.data.incomeTax || 0
//
calculateAmounts()
}
} catch (error) {
console.error('获取个人所得税失败:', error)
}
}
//
const getBankCardList = async () => {
try {
const res = await api.bankCardList({})
console.log('银行卡列表:', res)
if (res && res.code === 200 && res.data && res.data.length > 0) {
bankCardList.value = res.data
//
selectedBankCard.value = res.data[0]
} else {
uni.showModal({
title: '提示',
content: '请先添加银行卡',
showCancel: false,
confirmText: '去添加',
success: (modalRes) => {
if (modalRes.confirm) {
uni.navigateTo({
url: '/pages_app/idcardAuth/bankCardList'
})
}
}
})
}
} catch (error) {
console.error('获取银行卡列表失败:', error)
}
}
//
const selectBankCard = () => {
if (bankCardList.value.length <= 1) {
uni.showToast({
title: '只有一张银行卡',
icon: 'none'
})
return
}
//
uni.showActionSheet({
itemList: bankCardList.value.map(card => `${card.bankName} 尾号${card.cardNumber.slice(-4)}`),
success: (res) => {
selectedBankCard.value = bankCardList.value[res.tapIndex]
}
})
}
//
const showWithdrawalRules = () => {
const minAmount = (lessWithdrawalBalance.value / 100).toFixed(2)
const maxAmount = (withdrawalBalanceMaxOnce.value / 100).toFixed(2)
const feeAmount = (withdrawalBalanceFee.value / 100).toFixed(2)
uni.showModal({
title: '提现规则',
content: `1. 提现金额不得少于${minAmount}\n2. 单次提现限额为${maxAmount}\n3. 提现手续费为${feeAmount}\n4. 工作日24小时内到账`,
showCancel: false,
confirmText: '我知道了'
})
}
//
const confirmWithdrawal = () => {
if (!selectedBankCard.value) {
uni.showToast({
title: '请先选择银行卡',
icon: 'none'
})
return
}
const minAmount = lessWithdrawalBalance.value / 100
if (parseFloat(withdrawalAmount.value) < minAmount) {
uni.showToast({
title: `提现金额不得少于${minAmount.toFixed(2)}`,
icon: 'none'
})
return
}
//
const maxAmount = withdrawalBalanceMaxOnce.value / 100
if (parseFloat(withdrawalAmount.value) > maxAmount) {
uni.showToast({
title: `单次提现限额为${maxAmount.toFixed(2)}`,
icon: 'none'
})
return
}
//
showSmsDialog.value = true
smsCode.value = '' //
}
//
const onGetSmsCode = async () => {
if (countdown.value > 0) return
if (!selectedBankCard.value || !selectedBankCard.value.mobile) {
uni.showToast({
title: '银行卡手机号信息不完整',
icon: 'none'
})
return
}
sendingCode.value = true
try {
const res = await api.smsSend({
mobile: selectedBankCard.value.mobile,
type: 4 //
})
if (res.code === 200) {
uni.showToast({
title: '短信验证码发送成功',
icon: 'success'
})
// 60
countdown.value = 60
if (countdownTimer) clearInterval(countdownTimer)
countdownTimer = setInterval(() => {
if (countdown.value > 0) {
countdown.value -= 1
} else {
clearInterval(countdownTimer)
countdownTimer = null
}
}, 1000)
} else {
uni.showToast({
title: res.msg || '短信验证码发送失败',
icon: 'none'
})
}
} catch (error) {
console.error('发送短信验证码失败:', error)
uni.showToast({
title: '网络错误,请重试',
icon: 'none'
})
} finally {
sendingCode.value = false
}
}
//
const onConfirmSms = async () => {
if (!smsCode.value) {
uni.showToast({
title: '请输入短信验证码',
icon: 'none'
})
return
}
//
showSmsDialog.value = false
// API
api.createWithdrawal({
bankcard_uuid: selectedBankCard.value.uuid,
phone_number: selectedBankCard.value.mobile,
sms: smsCode.value
}).then(res => {
console.log(res)
if(res.code === 200){
uni.showToast({
title: '提现申请已提交',
icon: 'success'
})
uni.navigateBack()
}
else{
uni.showToast({
title: res.msg || '提现申请失败',
icon: 'none'
})
}
})
.catch(err => {
console.log(err)
uni.showToast({
title: '网络错误,请重试',
icon: 'none'
})
})
}
//
const onCancelSms = () => {
showSmsDialog.value = false
smsCode.value = ''
}
</script>
<style lang="scss" scoped>
.withdrawal-page {
background-color: #f5f5f5;
min-height: 100vh;
position: relative;
}
//
.main-content {
padding: 0 30rpx;
}
//
.loading-container {
display: flex;
justify-content: center;
align-items: center;
padding: 100rpx 0;
.loading-text {
font-size: 28rpx;
color: #999999;
}
}
//
.bank-card-section {
.withdrawal-rules {
font-size: 28rpx;
color: #333333;
}
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx 0;
.section-title {
font-size: 32rpx;
color: #333333;
font-weight: 500;
}
.withdrawal-rules {
font-size: 28rpx;
color: #333333;
}
}
.divider {
height: 1rpx;
background-color: #f0f0f0;
margin: 0;
}
.bank-card-info {
display: flex;
align-items: center;
padding: 30rpx 0;
.bank-logo {
width: 60rpx;
height: 60rpx;
background-color: #8B2316;
border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 24rpx;
.bank-icon {
font-size: 32rpx;
color: #ffffff;
font-weight: bold;
}
}
.bank-details {
flex: 1;
.bank-name {
display: block;
font-size: 32rpx;
color: #333333;
margin-bottom: 8rpx;
}
.bank-card-number {
display: block;
font-size: 26rpx;
color: #999999;
}
}
.arrow-icon {
font-size: 32rpx;
color: #cccccc;
font-weight: bold;
}
}
//
.no-bank-card {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx 0;
.no-card-text {
font-size: 32rpx;
color: #999999;
}
.arrow-icon {
font-size: 32rpx;
color: #cccccc;
font-weight: bold;
}
}
//
.amount-section {
padding: 40rpx 0;
.amount-title {
display: block;
font-size: 32rpx;
color: #333333;
font-weight: 500;
margin-bottom: 30rpx;
}
.amount-display {
display: flex;
align-items: baseline;
margin-bottom: 30rpx;
.currency-symbol {
font-size: 48rpx;
color: #333333;
margin-right: 8rpx;
}
.amount-value {
font-size: 60rpx;
color: #333333;
font-weight: 500;
}
}
.amount-details {
.tax-info, .fee-info, .actual-amount {
display: block;
font-size: 26rpx;
color: #999999;
margin-bottom: 12rpx;
.highlight-red {
color: #8B2316;
}
}
}
}
//
.bottom-button-container {
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 30rpx;
background-color: #ffffff;
.confirm-button {
width: 100%;
height: 88rpx;
background-color: #8B2316;
border-radius: 8rpx;
border: none;
color: #ffffff;
font-size: 32rpx;
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
&:active:not(:disabled) {
background-color: #6B1A0F;
}
&:disabled {
background-color: #cccccc;
color: #999999;
}
}
}
//
.gesture-indicator {
position: fixed;
bottom: 20rpx;
left: 50%;
transform: translateX(-50%);
width: 120rpx;
height: 6rpx;
background-color: #e0e0e0;
border-radius: 3rpx;
}
/* 短信弹框样式 */
.sms-mask {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
}
.sms-dialog {
width: 680rpx;
background: #ffffff;
border-radius: 16rpx;
padding: 30rpx;
}
.sms-title {
text-align: center;
font-size: 34rpx;
color: #000000;
font-weight: 600;
margin-bottom: 20rpx;
}
.sms-subtitle {
text-align: center;
font-size: 28rpx;
color: #333333;
margin-bottom: 24rpx;
}
.sms-input-row {
display: flex;
align-items: center;
gap: 16rpx;
margin: 10rpx 0 30rpx;
}
.sms-input {
flex: 1;
height: 88rpx;
border: 2rpx solid #eeeeee;
border-radius: 8rpx;
padding: 0 20rpx;
font-size: 28rpx;
}
.sms-code-btn {
width: 200rpx;
height: 88rpx;
border-radius: 8rpx;
background: #eeeeee;
color: #8B2316;
font-size: 26rpx;
border: none;
&:disabled {
background: #f5f5f5;
color: #cccccc;
}
}
.sms-actions {
display: flex;
justify-content: space-between;
margin-top: 10rpx;
}
.sms-cancel,
.sms-confirm {
flex: 1;
height: 88rpx;
border-radius: 8rpx;
font-size: 32rpx;
border: none;
}
.sms-cancel {
background: #f5f5f5;
color: #000000;
margin-right: 20rpx;
}
.sms-confirm {
background: #8B2316;
color: #ffffff;
margin-left: 20rpx;
}
</style>

View File

@ -197,25 +197,15 @@
//
const goToFeedback = () => {
uni.showToast({
title: '意见反馈',
icon: 'none'
uni.navigateTo({
url: '/pages_app/feedback/feedback'
});
};
//
const goToDeleteAccount = () => {
uni.showModal({
title: '注销账户',
content: '确定要注销账户吗?此操作不可逆!',
success: (res) => {
if (res.confirm) {
uni.showToast({
title: '注销账户',
icon: 'none'
});
}
}
uni.navigateTo({
url: '/pages_app/feedback/feedback-logoff'
});
};