|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="page flex-col">
|
|
|
- <s-header :name="sys ? sys.title : $t('public.sysName')" :noback="true" :isFixed="false"></s-header>
|
|
|
+ <s-header :name="sys ? sys.title : $t('user.personalCenter')" :noback="true" :isFixed="false"></s-header>
|
|
|
<div class="userPageBox">
|
|
|
<div class="userBaseBox">
|
|
|
<div class="baseRow flex-row justify-between">
|
|
@@ -106,6 +106,46 @@
|
|
|
<span>{{ relationAdminName }}</span>
|
|
|
<van-icon name="edit" class="editIcon" @click="editClk(1)" />
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 自定义货币符号 -->
|
|
|
+ <div v-if="!symbolShow" class="userInfo l-flex-between">
|
|
|
+ <span class="userInfoLeft">{{ $t("user.currencySymbol") }}: </span>
|
|
|
+ <div class="cust_vantBorder">
|
|
|
+ <van-field class="relationClass" v-model="cofficentForm.currencySymbol"
|
|
|
+ :placeholder="$t('user.currencySymbolPlace')">
|
|
|
+ <template #button>
|
|
|
+ <van-button type="primary" @click="mailboxChg(cofficentForm.currencySymbol, 5)">{{
|
|
|
+ $t("user.confirmLog") }}
|
|
|
+ </van-button>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+ </div>
|
|
|
+ <van-icon name="edit" class="editIcon" @click="editClk(5)" />
|
|
|
+ </div>
|
|
|
+ <div v-else class="userInfo l-flex-between">
|
|
|
+ <span class="userInfoLeft">{{ $t("user.currencySymbol") }}: </span>
|
|
|
+ <span>{{ accountDetail.currencySymbol }}</span>
|
|
|
+ <van-icon name="edit" class="editIcon" @click="editClk(5)" />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 切换支付平台 -->
|
|
|
+ <div v-if="chaSzPayShow" class="userInfo l-flex-between">
|
|
|
+ <span class="userInfoLeft">{{ $t("user.szPayType") }}: </span>
|
|
|
+ <div class="cust_vantBorder o-pl-15">
|
|
|
+ <van-switch :model-value="sunzeePay" active-color="#0090fa" inactive-color="#30c25c" size="21px"
|
|
|
+ @update:model-value="changeSunzeePay" />
|
|
|
+ </div>
|
|
|
+ <span class="o-pl-50">{{ $t("user.currentChoose") }}: {{ sunzeePay ? "汇付" : "汇聚" }}</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div v-if="chaScPayShow" class="userInfo l-flex-between">
|
|
|
+ <span class="userInfoLeft">{{ $t("user.scPayType") }}: </span>
|
|
|
+ <div class="cust_vantBorder o-pl-15">
|
|
|
+ <van-switch :model-value="sevencloudPay" active-color="#0090fa" inactive-color="#30c25c" size="21px"
|
|
|
+ @update:model-value="changeSevenCloudPay" />
|
|
|
+ </div>
|
|
|
+ <span class="o-pl-50">{{ $t("user.currentChoose") }}: {{ sevencloudPay ? "汇付" : "汇聚" }}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="lineBox"></div>
|
|
@@ -125,31 +165,39 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 提现帐号 -->
|
|
|
- <div v-if="isInland" class="taskListRow flex-col" @click="pushPageList('/huifuMch')">
|
|
|
+ <div v-if="isInland" class="taskListRow flex-col" @click="pushPageList('/settlement')">
|
|
|
<div class="taskIcon joinPayMchIcon"></div>
|
|
|
<div class="taskRight">
|
|
|
- <div class="taskTitle">{{ $t("user.withdrawalAccountNo") }}</div>
|
|
|
+ <div class="taskTitle">{{ $t("user.settlementAccount") }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+ <!-- 提现帐号 -->
|
|
|
+ <!-- <div v-if="isInland" class="taskListRow flex-col" @click="pushPageList('/joinpayMch')">
|
|
|
+ <div class="taskIcon joinPayMchIcon"></div>
|
|
|
+ <div class="taskRight">
|
|
|
+ <div class="taskTitle">{{ $t("user.withdrawalAccountNo") }}</div>
|
|
|
+ </div>
|
|
|
+ </div> -->
|
|
|
+
|
|
|
<!-- Airwallex 钱包 -->
|
|
|
- <div v-if="isAbroad && user.companyType != '1'" class="taskListRow flex-col" @click="pushPageList('/airwallex')">
|
|
|
+ <!-- <div v-if="isAbroad && user.companyType != '1'" class="taskListRow flex-col"
|
|
|
+ @click="pushPageList('/airwallex')">
|
|
|
<div class="taskIcon airwallexIcon"></div>
|
|
|
<div class="taskRight">
|
|
|
<div class="taskTitle">{{ $t("user.airwallex") }}</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
|
|
|
<!-- 备用提现账号 -->
|
|
|
- <div v-if="isInland" class="taskListRow flex-col" @click="pushPageList('/joinpayMch')">
|
|
|
+ <!-- <div v-if="isInland" class="taskListRow flex-col" @click="pushPageList('/huifuMch')">
|
|
|
<div class="taskIcon shandeMchIcon"></div>
|
|
|
<div class="taskRight">
|
|
|
<div class="taskTitle">
|
|
|
{{ $t("user.standbyWithdrawalAccountNo") }}
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
-
|
|
|
+ </div> -->
|
|
|
<!-- <div class="taskListRow flex-col" @click="pushPageList('/shandeMch')">
|
|
|
<div class="taskIcon shandeMchIcon"></div>
|
|
|
<div class="taskRight">
|
|
@@ -223,8 +271,8 @@ import {
|
|
|
$M_PhoneTest,
|
|
|
} from "@/common/js/utils";
|
|
|
import { useRouter } from "vue-router";
|
|
|
-import { tAdminGetRelation, tAdminSetRelationAdmin } from "@/service/user";
|
|
|
-import { Toast } from "vant";
|
|
|
+import { tAdminGetRelation, tAdminSetRelationAdmin, updatePayPlatform } from "@/service/user";
|
|
|
+import { Toast, Dialog } from "vant";
|
|
|
import { useI18n } from "vue-i18n";
|
|
|
import { styleUrl } from "../common/js/utils";
|
|
|
|
|
@@ -235,15 +283,26 @@ export default {
|
|
|
const { t } = useI18n();
|
|
|
// 账户信息
|
|
|
const accountDetail = ref({});
|
|
|
- // 控制都去显示隐藏
|
|
|
+ // 控制地区显示隐藏
|
|
|
const areaShow = ref(true);
|
|
|
// 控制手机显示隐藏
|
|
|
const phoneNumberShow = ref(true);
|
|
|
// 控制邮箱显示隐藏
|
|
|
const mailboxShow = ref(true);
|
|
|
+ // 控制货币显示隐藏 货币符号,默认“¥”
|
|
|
+ const symbolShow = ref(true);
|
|
|
+ // 控制切换支付平台按钮显示隐藏
|
|
|
+ const chaSzPayShow = ref(false);
|
|
|
+ const chaScPayShow = ref(false);
|
|
|
+
|
|
|
+
|
|
|
+ const sunzeePay = ref(false);
|
|
|
+ const sevencloudPay = ref(false);
|
|
|
+
|
|
|
const user = getLoginUser();
|
|
|
const router = useRouter();
|
|
|
const relationAdminName = ref("");
|
|
|
+
|
|
|
const relationType = ref(true);
|
|
|
const sys = ref(null);
|
|
|
// 修改的个人信息
|
|
@@ -252,6 +311,12 @@ export default {
|
|
|
mailBox: accountDetail.value.email,
|
|
|
phone: accountDetail.value.phone,
|
|
|
area: "",
|
|
|
+ currencySymbol: accountDetail.value.currencySymbol,
|
|
|
+ });
|
|
|
+ //
|
|
|
+ const params = reactive({
|
|
|
+ id: '', // 用户ID
|
|
|
+ payPlatform: '', //支付平台
|
|
|
});
|
|
|
// 点击修改图标
|
|
|
const editClk = (idx) => {
|
|
@@ -262,6 +327,7 @@ export default {
|
|
|
mailboxShow.value = true;
|
|
|
phoneNumberShow.value = true;
|
|
|
areaShow.value = true;
|
|
|
+ symbolShow.value = true;
|
|
|
break;
|
|
|
case 2:
|
|
|
cofficentForm.mailBox = accountDetail.value.email;
|
|
@@ -269,6 +335,7 @@ export default {
|
|
|
mailboxShow.value = !mailboxShow.value;
|
|
|
phoneNumberShow.value = true;
|
|
|
areaShow.value = true;
|
|
|
+ symbolShow.value = true;
|
|
|
break;
|
|
|
case 3:
|
|
|
cofficentForm.phone = accountDetail.value.phone;
|
|
@@ -276,6 +343,7 @@ export default {
|
|
|
mailboxShow.value = true;
|
|
|
phoneNumberShow.value = !phoneNumberShow.value;
|
|
|
areaShow.value = true;
|
|
|
+ symbolShow.value = true;
|
|
|
break;
|
|
|
case 4:
|
|
|
cofficentForm.area = accountDetail.value.area;
|
|
@@ -283,6 +351,15 @@ export default {
|
|
|
mailboxShow.value = true;
|
|
|
phoneNumberShow.value = true;
|
|
|
areaShow.value = !areaShow.value;
|
|
|
+ symbolShow.value = true;
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ cofficentForm.currencySymbol = accountDetail.value.currencySymbol;
|
|
|
+ relationType.value = true;
|
|
|
+ mailboxShow.value = true;
|
|
|
+ phoneNumberShow.value = true;
|
|
|
+ areaShow.value = true;
|
|
|
+ symbolShow.value = !symbolShow.value;
|
|
|
break;
|
|
|
}
|
|
|
};
|
|
@@ -346,17 +423,57 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
+ case 5:
|
|
|
+ if (!e) {
|
|
|
+ Toast(t("user.currencySymbolPlace"));
|
|
|
+ } else {
|
|
|
+ const params = {
|
|
|
+ id: user.id,
|
|
|
+ currencySymbol: e,
|
|
|
+ };
|
|
|
+ const { data } = await updateAdmin(params);
|
|
|
+ symbolShow.value = true;
|
|
|
+ if (data.code === "00000") {
|
|
|
+ Toast(data.message);
|
|
|
+ // 更新本地存储缓存中的currencySymbol的值
|
|
|
+ user.currencySymbol = e; // 将新的currencySymbol的值赋值给user
|
|
|
+ localStorage.setItem("loginUser", JSON.stringify(user));
|
|
|
+ setTimeout(() => {
|
|
|
+ getAcccountDetail();
|
|
|
+ }, 500);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
}
|
|
|
};
|
|
|
// 获取账户详情
|
|
|
const getAcccountDetail = () => {
|
|
|
getAdmin({ id: user.id }).then((res) => {
|
|
|
accountDetail.value = res.data.data;
|
|
|
-
|
|
|
// 查询地址回显
|
|
|
kCascaderRef.value.init(accountDetail.value.areaId);
|
|
|
});
|
|
|
};
|
|
|
+ // 获取申泽支付平台
|
|
|
+ const getSunzeeDetail = () => {
|
|
|
+ getAdmin({ id: 2738 }).then((res) => {
|
|
|
+ // sunzeePay.value = res.data.data.payPlatform;
|
|
|
+ if (res.data.data.payPlatform == '1') {
|
|
|
+ sunzeePay.value = true;
|
|
|
+ }
|
|
|
+ console.log("sunzeePay", sunzeePay.value)
|
|
|
+ });
|
|
|
+ };
|
|
|
+ // 获取七云支付平台
|
|
|
+ const getSevenCloudDetail = () => {
|
|
|
+ getAdmin({ id: 2739 }).then((res) => {
|
|
|
+ // sevencloudPay.value = res.data.data.payPlatform;
|
|
|
+ if (res.data.data.payPlatform == '1') {
|
|
|
+ sevencloudPay.value = true;
|
|
|
+ }
|
|
|
+ console.log("sevencloudPay", sevencloudPay.value)
|
|
|
+ });
|
|
|
+ };
|
|
|
// 退出登录弹窗
|
|
|
const kDialogRef = ref(null);
|
|
|
// 点击右侧按钮
|
|
@@ -379,6 +496,56 @@ export default {
|
|
|
}, 200);
|
|
|
}
|
|
|
};
|
|
|
+ //切换申泽支付平台
|
|
|
+ const changeSunzeePay = (value) => {
|
|
|
+ Dialog.confirm({
|
|
|
+ title: t('user.tips'),
|
|
|
+ message: t('user.changeTips'),
|
|
|
+ }).then(() => {
|
|
|
+ // checked.value = newValue;
|
|
|
+ console.log(value);
|
|
|
+ params.id = 2738;
|
|
|
+ if (value) {
|
|
|
+ params.payPlatform = '1';
|
|
|
+ } else {
|
|
|
+ params.payPlatform = '0';
|
|
|
+ }
|
|
|
+ const { data } = updatePayPlatform(params);
|
|
|
+ if (data.code) {
|
|
|
+ Toast.success(t('user.changeSuccess'));
|
|
|
+ sunzeePay.value = value;
|
|
|
+ } else {
|
|
|
+ Toast.fail(data.message);
|
|
|
+ }
|
|
|
+ }).catch((error) => {
|
|
|
+ console.error(error);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ //切换七云支付平台
|
|
|
+ const changeSevenCloudPay = (value) => {
|
|
|
+ Dialog.confirm({
|
|
|
+ title: t('user.tips'),
|
|
|
+ message: t('user.changeTips'),
|
|
|
+ }).then(() => {
|
|
|
+ // checked.value = newValue;
|
|
|
+ console.log(value);
|
|
|
+ params.id = 2739;
|
|
|
+ if (value) {
|
|
|
+ params.payPlatform = '1';
|
|
|
+ } else {
|
|
|
+ params.payPlatform = '0';
|
|
|
+ }
|
|
|
+ const { data } = updatePayPlatform(params);
|
|
|
+ if (data.code) {
|
|
|
+ Toast.success(t('user.changeSuccess'));
|
|
|
+ sunzeePay.value = value;
|
|
|
+ } else {
|
|
|
+ Toast.fail(data.message);
|
|
|
+ }
|
|
|
+ }).catch((error) => {
|
|
|
+ console.error(error);
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
// 初始化页面获取列表
|
|
|
onMounted(async () => {
|
|
@@ -392,6 +559,19 @@ export default {
|
|
|
gettAdminGetRelation();
|
|
|
// 获取账户
|
|
|
getAcccountDetail();
|
|
|
+ if (user.id == 1 ) {
|
|
|
+ chaSzPayShow.value = true;
|
|
|
+ chaScPayShow.value = true;
|
|
|
+ getSunzeeDetail();
|
|
|
+ getSevenCloudDetail();
|
|
|
+ } else if (user.id == 2738) {
|
|
|
+ chaSzPayShow.value = true;
|
|
|
+ getSunzeeDetail();
|
|
|
+ } else if (user.id == 2739) {
|
|
|
+ chaScPayShow.value = true;
|
|
|
+ getSevenCloudDetail();
|
|
|
+ }
|
|
|
+
|
|
|
});
|
|
|
const gettAdminGetRelation = async () => {
|
|
|
const { data } = await tAdminGetRelation({
|
|
@@ -507,6 +687,7 @@ export default {
|
|
|
phoneNumberShow,
|
|
|
editClk,
|
|
|
cofficentForm,
|
|
|
+ params,
|
|
|
areaShow,
|
|
|
accountDetail,
|
|
|
fieldValue,
|
|
@@ -517,7 +698,14 @@ export default {
|
|
|
getAreaName,
|
|
|
isAbroad,
|
|
|
checkIsAbroad,
|
|
|
- isInland
|
|
|
+ isInland,
|
|
|
+ symbolShow,
|
|
|
+ chaSzPayShow,
|
|
|
+ chaScPayShow,
|
|
|
+ sunzeePay,
|
|
|
+ sevencloudPay,
|
|
|
+ changeSunzeePay,
|
|
|
+ changeSevenCloudPay,
|
|
|
};
|
|
|
}
|
|
|
};
|