|
@@ -162,12 +162,20 @@
|
|
</div>
|
|
</div>
|
|
<span class="o-pl-50">{{ $t("user.currentChoose") }}: {{ sevencloudPay ? "汇付" : "汇聚" }}</span>
|
|
<span class="o-pl-50">{{ $t("user.currentChoose") }}: {{ sevencloudPay ? "汇付" : "汇聚" }}</span>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
|
|
+ <!-- 订单通知 -->
|
|
<div v-if="isInWeChat && user.type == '2'" class="userInfo l-flex-RC">
|
|
<div v-if="isInWeChat && user.type == '2'" class="userInfo l-flex-RC">
|
|
<span class="userInfoLeft l-flex-RC">{{ $t("user.orderNotice") }}: </span>
|
|
<span class="userInfoLeft l-flex-RC">{{ $t("user.orderNotice") }}: </span>
|
|
<div class="cust_vantBorder">
|
|
<div class="cust_vantBorder">
|
|
- <van-switch :model-value="orderNotice" active-color="#0090fa"
|
|
|
|
- style="font-size: 19px;" @update:model-value="changeOrderNotice" />
|
|
|
|
|
|
+ <van-switch :model-value="orderNotice" active-color="#0090fa" style="font-size: 19px;"
|
|
|
|
+ @update:model-value="changeOrderNotice" />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 设备上下线提醒 -->
|
|
|
|
+ <div v-if="isInWeChat && user.type == '2'" class="userInfo l-flex-RC">
|
|
|
|
+ <span class="userInfoLeft l-flex-RC">{{ $t("user.onOffNotice") }}: </span>
|
|
|
|
+ <div class="cust_vantBorder">
|
|
|
|
+ <van-switch :model-value="onOffNotice" active-color="#0090fa" style="font-size: 18px;"
|
|
|
|
+ @update:model-value="changeOnOffNotice" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -195,15 +203,6 @@
|
|
<div class="taskTitle">{{ $t("user.settlementAccount") }}</div>
|
|
<div class="taskTitle">{{ $t("user.settlementAccount") }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <!-- 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 v-if="isInWeChat" class="taskListRow flex-col" @click="pushPageList('/bindWechat')">
|
|
<div v-if="isInWeChat" class="taskListRow flex-col" @click="pushPageList('/bindWechat')">
|
|
<div class="taskIcon bindWechatIcon"></div>
|
|
<div class="taskIcon bindWechatIcon"></div>
|
|
@@ -274,7 +273,7 @@ import {
|
|
$M_PhoneTest,
|
|
$M_PhoneTest,
|
|
} from "@/common/js/utils";
|
|
} from "@/common/js/utils";
|
|
import { useRouter } from "vue-router";
|
|
import { useRouter } from "vue-router";
|
|
-import { tAdminGetRelation, updatePayPlatform, updateOrderNotice } from "@/service/user";
|
|
|
|
|
|
+import { tAdminGetRelation, updatePayPlatform, updateOrderNotice, updateOnOffNotice } from "@/service/user";
|
|
import { showFailToast, showToast, showSuccessToast, showConfirmDialog } from 'vant';
|
|
import { showFailToast, showToast, showSuccessToast, showConfirmDialog } from 'vant';
|
|
import { useI18n } from "vue-i18n";
|
|
import { useI18n } from "vue-i18n";
|
|
import { styleUrl } from "../common/js/utils";
|
|
import { styleUrl } from "../common/js/utils";
|
|
@@ -300,6 +299,8 @@ export default {
|
|
|
|
|
|
// 订单通知开关状态
|
|
// 订单通知开关状态
|
|
const orderNotice = ref(false);
|
|
const orderNotice = ref(false);
|
|
|
|
+ // 设备上/离线通知开关状态
|
|
|
|
+ const onOffNotice = ref(false);
|
|
|
|
|
|
const sunzeePay = ref(false);
|
|
const sunzeePay = ref(false);
|
|
const sevencloudPay = ref(false);
|
|
const sevencloudPay = ref(false);
|
|
@@ -459,6 +460,9 @@ export default {
|
|
if (accountDetail.value.orderNotice == "1") {
|
|
if (accountDetail.value.orderNotice == "1") {
|
|
orderNotice.value = true;
|
|
orderNotice.value = true;
|
|
}
|
|
}
|
|
|
|
+ if (accountDetail.value.onOffNotice == "1") {
|
|
|
|
+ onOffNotice.value = true;
|
|
|
|
+ }
|
|
kCascaderRef.value.init(accountDetail.value.areaId);
|
|
kCascaderRef.value.init(accountDetail.value.areaId);
|
|
});
|
|
});
|
|
};
|
|
};
|
|
@@ -558,7 +562,7 @@ export default {
|
|
console.error(error);
|
|
console.error(error);
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ // 切换订单通知开关
|
|
const changeOrderNotice = (value) => {
|
|
const changeOrderNotice = (value) => {
|
|
showConfirmDialog({
|
|
showConfirmDialog({
|
|
title: t('user.tips'),
|
|
title: t('user.tips'),
|
|
@@ -573,7 +577,32 @@ export default {
|
|
if (data.code == "00000") {
|
|
if (data.code == "00000") {
|
|
showSuccessToast(value ? t('user.openSuccess') : t('user.closeSuccess'));
|
|
showSuccessToast(value ? t('user.openSuccess') : t('user.closeSuccess'));
|
|
orderNotice.value = value;
|
|
orderNotice.value = value;
|
|
- } else if(data.code == "A0001") {
|
|
|
|
|
|
+ } else if (data.code == "A0001") {
|
|
|
|
+ showToast(t('user.pleaseBindWechat'));
|
|
|
|
+ } else {
|
|
|
|
+ showFailToast(data.message);
|
|
|
|
+ }
|
|
|
|
+ }).catch((error) => {
|
|
|
|
+ console.error(error);
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 切换设备通知开关
|
|
|
|
+ const changeOnOffNotice = (value) => {
|
|
|
|
+ showConfirmDialog({
|
|
|
|
+ title: t('user.tips'),
|
|
|
|
+ message: onOffNotice.value ? t('user.closeOnOffNotice') : t('user.openOnOffNotice'),
|
|
|
|
+ }).then(async () => {
|
|
|
|
+ const params = reactive({
|
|
|
|
+ adminId: user.id,
|
|
|
|
+ onOffNotice: value ? '1' : '0',
|
|
|
|
+ });
|
|
|
|
+ const { data } = await updateOnOffNotice(params);
|
|
|
|
+ console.log("data", data)
|
|
|
|
+ if (data.code == "00000") {
|
|
|
|
+ showSuccessToast(value ? t('user.openSuccess') : t('user.closeSuccess'));
|
|
|
|
+ onOffNotice.value = value;
|
|
|
|
+ } else if (data.code == "A0001") {
|
|
showToast(t('user.pleaseBindWechat'));
|
|
showToast(t('user.pleaseBindWechat'));
|
|
} else {
|
|
} else {
|
|
showFailToast(data.message);
|
|
showFailToast(data.message);
|
|
@@ -601,13 +630,6 @@ export default {
|
|
getSunzeeDetail();
|
|
getSunzeeDetail();
|
|
getSevenCloudDetail();
|
|
getSevenCloudDetail();
|
|
}
|
|
}
|
|
- // else if (user.id == 2738) {
|
|
|
|
- // chaSzPayShow.value = true;
|
|
|
|
- // getSunzeeDetail();
|
|
|
|
- // } else if (user.id == 2739) {
|
|
|
|
- // chaScPayShow.value = true;
|
|
|
|
- // getSevenCloudDetail();
|
|
|
|
- // }
|
|
|
|
});
|
|
});
|
|
const gettAdminGetRelation = async () => {
|
|
const gettAdminGetRelation = async () => {
|
|
const { data } = await tAdminGetRelation({
|
|
const { data } = await tAdminGetRelation({
|
|
@@ -705,26 +727,10 @@ export default {
|
|
haveRelation.value = true;
|
|
haveRelation.value = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // const checkIsAbroad = async () => {
|
|
|
|
- // try {
|
|
|
|
- // const { data } = await getIfForeign(user.id);
|
|
|
|
- // console.log("isAbroad >>> ", data);
|
|
|
|
-
|
|
|
|
- // if (data.data === '1') {
|
|
|
|
- // // TODO: 这里先把isAbroad设置为fasle,等开发完成再改成true;
|
|
|
|
- // isAbroad.value = false;
|
|
|
|
- // isInland.value = false;
|
|
|
|
- // }
|
|
|
|
- // } catch (error) {
|
|
|
|
- // console.error(error);
|
|
|
|
- // }
|
|
|
|
- // };
|
|
|
|
const checkIsAbroad = async () => {
|
|
const checkIsAbroad = async () => {
|
|
try {
|
|
try {
|
|
const userInfo = localStorage.getItem("loginUser");
|
|
const userInfo = localStorage.getItem("loginUser");
|
|
const userIfForeign = JSON.parse(userInfo);
|
|
const userIfForeign = JSON.parse(userInfo);
|
|
- // console.log("用户的海内外信息" + userIfForeign.ifForeign);
|
|
|
|
- // console.log("看下user是什么***" + user.menuCodeList);
|
|
|
|
if (userIfForeign.ifForeign === '1') {
|
|
if (userIfForeign.ifForeign === '1') {
|
|
isAbroad.value = true;
|
|
isAbroad.value = true;
|
|
isInland.value = false;
|
|
isInland.value = false;
|
|
@@ -781,6 +787,8 @@ export default {
|
|
changeSevenCloudPay,
|
|
changeSevenCloudPay,
|
|
orderNotice,
|
|
orderNotice,
|
|
changeOrderNotice,
|
|
changeOrderNotice,
|
|
|
|
+ onOffNotice,
|
|
|
|
+ changeOnOffNotice,
|
|
};
|
|
};
|
|
}
|
|
}
|
|
};
|
|
};
|