|
@@ -173,7 +173,7 @@
|
|
|
<!-- 切换支付平台 -->
|
|
|
<div v-if="chaSzPayShow" class="userInfo l-flex-between">
|
|
|
<span class="userInfoLeft">{{ $t("user.szPayType") }}: </span>
|
|
|
- <div class="cust_vantBorder o-pl-5">
|
|
|
+ <div class="cust_vantBorder">
|
|
|
<van-switch :model-value="sunzeePay" active-color="#0090fa" inactive-color="#30c25c"
|
|
|
style="font-size: 0.5rem;" @update:model-value="changeSunzeePay" />
|
|
|
</div>
|
|
@@ -182,12 +182,20 @@
|
|
|
|
|
|
<div v-if="chaScPayShow" class="userInfo l-flex-between">
|
|
|
<span class="userInfoLeft">{{ $t("user.scPayType") }}: </span>
|
|
|
- <div class="cust_vantBorder o-pl-5">
|
|
|
+ <div class="cust_vantBorder">
|
|
|
<van-switch :model-value="sevencloudPay" active-color="#0090fa" inactive-color="#30c25c"
|
|
|
style="font-size: 0.5rem;" @update:model-value="changeSevenCloudPay" />
|
|
|
</div>
|
|
|
<span class="o-pl-10">{{ $t("user.currentChoose") }}: {{ sevencloudPay ? "汇付" : "汇聚" }}</span>
|
|
|
</div>
|
|
|
+
|
|
|
+ <div v-if="isInWeChat" class="userInfo l-flex-RC">
|
|
|
+ <span class="userInfoLeft l-flex-RC">{{ $t("user.orderNotice") }}: </span>
|
|
|
+ <div class="cust_vantBorder">
|
|
|
+ <van-switch :model-value="orderNotice" active-color="#0090fa"
|
|
|
+ style="font-size: 19px;" @update:model-value="changeOrderNotice" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="lineBox"></div>
|
|
@@ -344,7 +352,7 @@ import {
|
|
|
$M_PhoneTest,
|
|
|
} from "@/common/js/utils";
|
|
|
import { useRouter } from "vue-router";
|
|
|
-import { tAdminGetRelation, updatePayPlatform, updateDIYPassword } from "@/service/user";
|
|
|
+import { tAdminGetRelation, updatePayPlatform, updateDIYPassword, updateOrderNotice } from "@/service/user";
|
|
|
// import { tAdminGetRelation, tAdminSetRelationAdmin, updatePayPlatform } from "@/service/user";
|
|
|
import { showFailToast, showToast, showSuccessToast, showConfirmDialog } from 'vant';
|
|
|
import { useI18n } from "vue-i18n";
|
|
@@ -376,6 +384,9 @@ export default {
|
|
|
const sunzeePay = ref(false);
|
|
|
const sevencloudPay = ref(false);
|
|
|
|
|
|
+ // 订单通知开关状态
|
|
|
+ const orderNotice = ref(false);
|
|
|
+
|
|
|
const user = getLoginUser();
|
|
|
const router = useRouter();
|
|
|
const relationAdminName = ref("");
|
|
@@ -393,7 +404,7 @@ export default {
|
|
|
//
|
|
|
const params = reactive({
|
|
|
id: '', // 用户ID
|
|
|
- payPlatform: '', //支付平台
|
|
|
+ payPlatform: '', //支付平台
|
|
|
});
|
|
|
// 点击修改图标
|
|
|
const editClk = (idx) => {
|
|
@@ -558,6 +569,10 @@ export default {
|
|
|
const getAcccountDetail = () => {
|
|
|
getAdmin({ id: user.id }).then((res) => {
|
|
|
accountDetail.value = res.data.data;
|
|
|
+ console.log("accountDetail", accountDetail.value)
|
|
|
+ if (accountDetail.value.orderNotice == "1") {
|
|
|
+ orderNotice.value = true;
|
|
|
+ }
|
|
|
// 查询地址回显
|
|
|
kCascaderRef.value.init(accountDetail.value.areaId);
|
|
|
});
|
|
@@ -659,6 +674,30 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ const changeOrderNotice = (value) => {
|
|
|
+ showConfirmDialog({
|
|
|
+ title: t('user.tips'),
|
|
|
+ message: orderNotice.value ? t('user.closeOrderNotice') : t('user.openOrderNotice'),
|
|
|
+ }).then(async () => {
|
|
|
+ const params = reactive({
|
|
|
+ adminId: user.id,
|
|
|
+ orderNotice: value ? '1' : '0',
|
|
|
+ });
|
|
|
+ const { data } = await updateOrderNotice(params);
|
|
|
+ console.log("data", data)
|
|
|
+ if (data.code == "00000") {
|
|
|
+ showSuccessToast(value ? t('user.openSuccess') : t('user.closeSuccess'));
|
|
|
+ orderNotice.value = value;
|
|
|
+ } else if(data.code == "A0001") {
|
|
|
+ showToast(t('user.pleaseBindWechat'));
|
|
|
+ } else {
|
|
|
+ showFailToast(data.message);
|
|
|
+ }
|
|
|
+ }).catch((error) => {
|
|
|
+ console.error(error);
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
// 初始化页面获取列表
|
|
|
onMounted(async () => {
|
|
|
// 加载样式
|
|
@@ -858,6 +897,8 @@ export default {
|
|
|
sevencloudPay,
|
|
|
changeSunzeePay,
|
|
|
changeSevenCloudPay,
|
|
|
+ orderNotice,
|
|
|
+ changeOrderNotice
|
|
|
};
|
|
|
}
|
|
|
};
|