Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
jgdl
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-08-16 14:24:12 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
231795dfdb6b28d54c19f11df1f020a7fc46fdc0
231795df
1 parent
dce84a7f
feat(收款设置): 添加收款账户绑定状态控制
添加 jee_pay_receiver_id 字段到用户状态管理 在收款设置页面根据绑定状态控制操作按钮显示
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
src/pages/collectionSettings/index.vue
src/stores/user.js
src/pages/collectionSettings/index.vue
View file @
231795d
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-08-1
3 16:46:03
* @LastEditTime: 2025-08-1
6 14:16:46
* @FilePath: /jgdl/src/pages/collectionSettings/index.vue
* @Description: 收款设置
-->
...
...
@@ -73,11 +73,13 @@
</view>
<!-- 操作按钮 -->
<view class="modal-footer">
<nut-button type="default" @click="closeAccountModal" class="footer-btn footer-btn-cancel">
关闭
</nut-button>
<nut-button type="primary" @click="saveAccountInfo" color="#ffa500"
<!-- 保存按钮 - 只有在未绑定收款账户时才显示 -->
<nut-button v-if="!jeePayReceiverId" type="primary" @click="saveAccountInfo" color="#ffa500"
:disabled="!tempAccountInfo.bankName || !tempAccountInfo.bankAccount"
class="footer-btn footer-btn-save">
保存
...
...
@@ -171,11 +173,13 @@
</view>
</view>
<!-- 操作按钮 -->
<view class="modal-footer">
<nut-button type="default" @click="closeIdentityModal" class="footer-btn footer-btn-cancel">
关闭
</nut-button>
<nut-button type="primary" @click="saveIdentityInfo" color="#ffa500"
<!-- 保存按钮 - 只有在未绑定收款账户时才显示 -->
<nut-button v-if="!jeePayReceiverId" type="primary" @click="saveIdentityInfo" color="#ffa500"
:disabled="!tempIdentityInfo.userName || !tempIdentityInfo.idCard || !tempIdentityInfo.idcard_1_img || !tempIdentityInfo.idcard_2_img || !tempIdentityInfo.idcard_province || !tempIdentityInfo.idcard_city || !tempIdentityInfo.idcard_district || !tempIdentityInfo.idcard_address || !!idCardError"
class="footer-btn footer-btn-save">
保存
...
...
@@ -210,7 +214,7 @@ import "./index.less";
import { RectRight } from '@nutui/icons-vue-taro'
// 导入接口
import { updateProfileAPI, getProfileAPI } from '@/api/index'
import { updateProfileAPI, getProfileAPI
, bindJeePayAPI
} from '@/api/index'
import { getBanksAPI } from '@/api/other'
import BASE_URL from '@/utils/config'
...
...
@@ -229,6 +233,12 @@ const { target } = instance.router?.params || {}
const userStore = useUserStore()
/**
* 收款账户绑定状态
* 用于控制操作按钮的显示与隐藏
*/
const jeePayReceiverId = ref('')
/**
* 判断是否显示返回按钮
* 只有当参数target=sell时才显示
*/
...
...
@@ -340,6 +350,10 @@ const getUserInfo = async () => {
if (result.code && result.data) {
const userInfo = result.data;
// 获取收款账户绑定状态
jeePayReceiverId.value = userInfo.jee_pay_receiver_id || '';
console.log('获取到的jee_pay_receiver_id:', jeePayReceiverId.value);
// 设置收款账号信息
if (userInfo.bank_id && userInfo.bank_no) {
accountInfo.value = {
...
...
src/stores/user.js
View file @
231795d
/*
* @Date: 2025-01-08 18:00:00
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-08-1
2 16:36:02
* @LastEditTime: 2025-08-1
6 14:09:27
* @FilePath: /jgdl/src/stores/user.js
* @Description: 用户状态管理
*/
...
...
@@ -37,6 +37,7 @@ export const useUserStore = defineStore('user', {
idcard_district
:
''
,
idcard_address
:
''
,
division_agree_pic
:
''
,
jee_pay_receiver_id
:
''
,
},
isAuthenticated
:
false
,
isLoading
:
false
...
...
@@ -146,6 +147,7 @@ export const useUserStore = defineStore('user', {
idcard_district
:
''
,
idcard_address
:
''
,
division_agree_pic
:
''
,
jee_pay_receiver_id
:
''
,
}
this
.
isAuthenticated
=
false
},
...
...
Please
register
or
login
to post a comment