|
|
|
|
@ -8,11 +8,17 @@
|
|
|
|
|
<div class="item-left">{{ t("addBlacklist") }}</div>
|
|
|
|
|
<switch :checked="isInBlacklist" @change="(checked) => handleSwitchChange(checked)" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="userInfo-item">
|
|
|
|
|
<div class="item-left">{{ "客服手机号" }}</div>
|
|
|
|
|
<div class="g_flex_row_end" @click="takeTel">
|
|
|
|
|
<div class="">{{ userInfo.tel || '-' }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="button" :style="{ marginTop: '10px' }" @click="addFriend">
|
|
|
|
|
<!-- <div class="button" :style="{ marginTop: '10px' }" @click="addFriend">
|
|
|
|
|
{{ t("addFriendText") }}
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
|
|
|
|
<div class="userInfo-item-wrapper">
|
|
|
|
|
@ -84,6 +90,7 @@ import type { Relation } from "@xkit-yx/im-store-v2";
|
|
|
|
|
import { V2NIMUser } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK/V2NIMUserService";
|
|
|
|
|
import { V2NIMConst } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK";
|
|
|
|
|
import Icon from "../../../components/Icon.vue";
|
|
|
|
|
import G from "../../../../../utils/ajax.js";
|
|
|
|
|
|
|
|
|
|
const userInfo = ref<V2NIMUser>();
|
|
|
|
|
const relation = ref<Relation>("stranger");
|
|
|
|
|
@ -111,8 +118,18 @@ onLoad((props) => {
|
|
|
|
|
relation.value = _relation;
|
|
|
|
|
isInBlacklist.value = _isInBlacklist;
|
|
|
|
|
});
|
|
|
|
|
console.log("userInfo.valueuserInfo.valueuserInfo.valueuserInfo.value", userInfo.value);
|
|
|
|
|
console.log(G, "123131231231232");
|
|
|
|
|
G.Post("/wyyx/user/findUser", { accid: userInfo.value.accountId }, (res) => {
|
|
|
|
|
console.log("resresresresresres", res);
|
|
|
|
|
userInfo.value.tel = res.data.tel;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function takeTel() {
|
|
|
|
|
uni.makePhoneCall({
|
|
|
|
|
phoneNumber: userInfo.value.tel,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
const handleSwitchChange = async (e: any) => {
|
|
|
|
|
const isAdd = e.detail.value;
|
|
|
|
|
try {
|
|
|
|
|
|