布局更改

cyl/master-0804
wangxia 11 months ago
parent 706346f877
commit 2d32ba508b

@ -13,7 +13,7 @@ export default {
themeColor: "#00b666",
themeBackgroundColor: "#00b66621",
},
onLaunch() {
onLaunch() {
let that = this;
uni.removeStorageSync("selectedCity");
//

@ -1,8 +1,6 @@
<template>
<div class="g_position_rela">
<u-tabbar :list="tabbarInfo" :showDrawer="isShow" :mid-button="false" activeColor="#00b666"
:before-switch="beforeSwitch" @change="uploadPage"
:iconSize="48"></u-tabbar>
<u-tabbar :list="tabbarInfo" :showDrawer="isShow" imgType="custom" :mid-button="false" :activeColor="globalData.themeColor" :before-switch="beforeSwitch" @change="uploadPage" :iconSize="48"></u-tabbar>
</div>
</template>
@ -49,45 +47,163 @@ export default {
onShow() {
console.log(123123123123);
},
created() {
if (this.userInfo.agencyId) {
this.tabbarInfo = [
{
iconPath: "icon-home g_c_9",
selectedIconPath: "icon-home g_c_main",
pagePath: "/pages/home/index",
text: "首页",
iconSize: 48,
},
{
iconPath: "icon-fadanhao-31 g_c_9",
selectedIconPath: "icon-fadanhao-31 g_c_main",
pagePath: "/pages/home/order",
text: "发单号",
iconSize: 48,
},
{
iconPath: "icon-message g_c_9",
selectedIconPath: "icon-message g_c_main",
pagePath: "/pages/message/index",
text: "消息",
iconSize: 78,
iconType: "custom",
},
{
iconPath: "icon-order_active g_c_9",
selectedIconPath: "icon-order_active g_c_main",
pagePath: "/pages/workBench/index",
text: "工单",
iconSize: 48,
count: 0,
},
{
iconPath: "icon-user g_c_9",
selectedIconPath: "icon-user g_c_main",
pagePath: "/pages/person/index",
text: "我的",
iconSize: 48,
},
];
} else {
this.tabbarInfo = [
{
iconPath: "icon-home g_c_9",
selectedIconPath: "icon-home g_c_main",
pagePath: "/pages/home/index",
text: "首页",
iconSize: 48,
},
{
iconPath: "icon-message g_c_9",
selectedIconPath: "icon-message g_c_main",
pagePath: "/pages/message/index",
text: "消息",
iconSize: 78,
iconType: "custom",
},
{
iconPath: "icon-order_active g_c_9",
selectedIconPath: "icon-order_active g_c_main",
pagePath: "/pages/workBench/index",
text: "工单",
iconSize: 48,
count: 0,
},
{
iconPath: "icon-user g_c_9",
selectedIconPath: "icon-user g_c_main",
pagePath: "/pages/person/index",
text: "我的",
iconSize: 48,
},
];
}
},
data() {
return {
isShow: false,
isLogin: false,
corpUserFlag: uni.getStorageSync("apply-userinfo").corpUserFlag,
userInfo: uni.getStorageSync("apply-userinfo"),
globalData: getApp().globalData,
// tabbarInfo: [
// {
// iconPath: "/static/image/home.png",
// selectedIconPath: "/static/image/home-active.png",
// pagePath: "/pages/home/index",
// text: "",
// iconSize: 48,
// },
// {
// iconPath: "/static/image/apply.png",
// selectedIconPath: "/static/image/apply-active.png",
// pagePath: "/pages/workBench/index",
// text: "",
// iconSize: 48,
// },
// {
// iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/add.svg",
// selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/add.svg",
// pagePath: "/pages/addJob/index",
// text: "",
// iconSize: 78,
// iconType: "custom",
// },
// {
// iconPath: "/static/image/message.png",
// selectedIconPath: "/static/image/message_active.png",
// pagePath: "/pages/message/index",
// text: "",
// iconSize: 48,
// count: 0,
// },
// {
// iconPath: "/static/image/person.png",
// selectedIconPath: "/static/image/person-active.png",
// pagePath: "/pages/person/index",
// text: "",
// iconSize: 48,
// },
// ],
tabbarInfo: [
{
iconPath: "/static/image/home.png",
selectedIconPath: "/static/image/home-active.png",
iconPath: "icon-home g_c_9",
selectedIconPath: "icon-home g_c_main",
pagePath: "/pages/home/index",
text: "首页",
iconSize: 48,
},
{
iconPath: "/static/image/apply.png",
selectedIconPath: "/static/image/apply-active.png",
pagePath: "/pages/workBench/index",
text: "工单",
iconPath: "icon-fadanhao-31 g_c_9",
selectedIconPath: "icon-fadanhao-31 g_c_main",
pagePath: "/pages/home/order",
text: "发单号",
iconSize: 48,
},
{
iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/add.svg",
selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/add.svg",
pagePath: "/pages/addJob/index",
text: "",
iconPath: "icon-message g_c_9",
selectedIconPath: "icon-message g_c_main",
pagePath: "/pages/message/index",
text: "消息",
iconSize: 78,
iconType: "custom",
},
{
iconPath: "/static/image/message.png",
selectedIconPath: "/static/image/message_active.png",
pagePath: "/pages/message/index",
text: "消息",
iconPath: "icon-order_active g_c_9",
selectedIconPath: "icon-order_active g_c_main",
pagePath: "/pages/workBench/index",
text: "工单",
iconSize: 48,
count: 0,
},
{
iconPath: "/static/image/person.png",
selectedIconPath: "/static/image/person-active.png",
iconPath: "icon-user g_c_9",
selectedIconPath: "icon-user g_c_main",
pagePath: "/pages/person/index",
text: "我的",
iconSize: 48,
@ -108,84 +224,83 @@ export default {
uploadPage() {
uni.vibrateShort();
},
// setBadge(data) {
// let that = this;
// // console.log("datadatadatadatadatadata", data);
// for (var k in that.tabbarInfo) {
// if (that.tabbarInfo[k].pagePath == "/pages/message/indexcopy") {
// if (data) {
// // console.log(that.messageCount + "+++++++++++++++++" + that.noticeCount);
// if (data.type == "message") {
// that.messageCount = data.count || 0;
// } else if (data.type == "notice") {
// that.noticeCount = data.count || 0;
// }
// // console.log(that.messageCount + "-------------------------" + that.noticeCount);
// } else {
// that.messageCount = uni.getStorageSync("chat_info").count || 0;
// that.noticeCount = uni.getStorageSync("notice_info").count || 0;
// }
// setBadge(data) {
// let that = this;
// // console.log("datadatadatadatadatadata", data);
// for (var k in that.tabbarInfo) {
// if (that.tabbarInfo[k].pagePath == "/pages/message/indexcopy") {
// if (data) {
// // console.log(that.messageCount + "+++++++++++++++++" + that.noticeCount);
// if (data.type == "message") {
// that.messageCount = data.count || 0;
// } else if (data.type == "notice") {
// that.noticeCount = data.count || 0;
// }
// // console.log(that.messageCount + "-------------------------" + that.noticeCount);
// } else {
// that.messageCount = uni.getStorageSync("chat_info").count || 0;
// that.noticeCount = uni.getStorageSync("notice_info").count || 0;
// }
// that.tabbarInfo[k].count = that.messageCount + that.noticeCount;
// // console.log("that.tabbarInfo[k].count", that.tabbarInfo[k].count);
// // that.tabbarInfo[k].type = data.type;
// } else if (that.tabbarInfo[k].pagePath == "/pages/workBench/index") {
// if (data) {
// // console.log(that.messageCount + "+++++++++++++++++" + that.noticeCount);
// if (data.type == "follow") {
// that.followCount = data.count || 0;
// }
// that.tabbarInfo[k].count = that.messageCount + that.noticeCount;
// // console.log("that.tabbarInfo[k].count", that.tabbarInfo[k].count);
// // that.tabbarInfo[k].type = data.type;
// } else if (that.tabbarInfo[k].pagePath == "/pages/workBench/index") {
// if (data) {
// // console.log(that.messageCount + "+++++++++++++++++" + that.noticeCount);
// if (data.type == "follow") {
// that.followCount = data.count || 0;
// }
// // console.log(that.messageCount + "-------------------------" + that.noticeCount);
// } else {
// that.followCount = uni.getStorageSync("follow_info").count || 0;
// }
// that.tabbarInfo[k].count = that.followCount;
// }
// }
// },
// checkUserAuth() {
// this.tabbarInfo = [
// {
// iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/home.png",
// selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/home_active.png",
// pagePath: "/pages/home/index",
// text: "",
// iconSize: 48,
// },
// {
// iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/unit.png",
// selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/unit_active.png",
// pagePath: "/pages/workBench/index",
// text: "",
// iconSize: 48,
// },
// {
// iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/add.svg",
// selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/add.svg",
// pagePath: "/pages/addJob/index",
// text: "",
// iconSize: 78,
// iconType: "custom",
// },
// {
// iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/message.png",
// selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/message_active.png",
// pagePath: "/pages/message/index",
// text: "",
// iconSize: 48,
// count: 0,
// },
// {
// iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/user.png",
// selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/user_active.png",
// pagePath: "/pages/person/index",
// text: "",
// iconSize: 48,
// },
// ]
// },
// // console.log(that.messageCount + "-------------------------" + that.noticeCount);
// } else {
// that.followCount = uni.getStorageSync("follow_info").count || 0;
// }
// that.tabbarInfo[k].count = that.followCount;
// }
// }
// },
// checkUserAuth() {
// this.tabbarInfo = [
// {
// iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/home.png",
// selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/home_active.png",
// pagePath: "/pages/home/index",
// text: "",
// iconSize: 48,
// },
// {
// iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/unit.png",
// selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/unit_active.png",
// pagePath: "/pages/workBench/index",
// text: "",
// iconSize: 48,
// },
// {
// iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/add.svg",
// selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/add.svg",
// pagePath: "/pages/addJob/index",
// text: "",
// iconSize: 78,
// iconType: "custom",
// },
// {
// iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/message.png",
// selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/message_active.png",
// pagePath: "/pages/message/index",
// text: "",
// iconSize: 48,
// count: 0,
// },
// {
// iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/user.png",
// selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/user_active.png",
// pagePath: "/pages/person/index",
// text: "",
// iconSize: 48,
// },
// ]
// },
},
};
</script>

@ -17,7 +17,7 @@
<g-button btnText="去登录" size="small" class="g_mt_32" @clickBtn="goLogin" />
</view>
</view>
<scroll-view v-if="speed > 0" :style="{ height: `calc(100vh - ${navInfo.statusBarHeight + 52}px)` }" :scroll-y="true" @scrolltolower="reachBottom" :lower-threshold="100">
<scroll-view v-if="speed > 0" :style="{ height: `calc(100vh - ${99 + tabbarHeight}px)` }" :scroll-y="true" @scrolltolower="reachBottom" :lower-threshold="100">
<view class="" style="min-height: calc(100% - 90px)">
<view class="item g_pt_18 g_pl_10 g_pr_10 g_bg_f" hover-class="g_bg_f_5" v-for="(item, index) in query.list" :key="index" @click="goDetail(item, index)">
<view class="g_border_e_b g_flex_row_start g_pb_18">
@ -114,13 +114,17 @@ export default {
data() {
return {
cdnBaseImg: this.G.store().cdnBaseImg,
tabbarHeight: 0,
};
},
//
computed: {},
//
watch: {},
created() {},
created() {
this.tabbarHeight = uni.getStorageSync("TABBAR_HEIGHT");
console.log('this.tabbarHeight',this.tabbarHeight);
},
mounted() {},
//
methods: {

@ -8,6 +8,15 @@
"backgroundColorTop": "#fff"
}
},
{
"path": "pages/home/order",
"style": {
"navigationBarTitleText": "关注的发单号",
"backgroundColor": "#ededed",
"backgroundColorTop": "#ededed",
"backgroundColorBottom": "#ededed"
}
},
{
"path": "pages/message/index",
"style": {
@ -32,32 +41,32 @@
"navigationBarTitleText": "我的"
}
},
{
"path": "pages/addJob/index",
"style": {
"navigationBarTitleText": "大鹏Beta",
"backgroundColor": "#ffffff",
"backgroundColorTop": "#ffffff",
"backgroundColorBottom": "#ffffff",
"navigationBarTextStyle": "black"
}
}
{
"path": "pages/addJob/index",
"style": {
"navigationBarTitleText": "大鹏Beta",
"backgroundColor": "#ffffff",
"backgroundColorTop": "#ffffff",
"backgroundColorBottom": "#ffffff",
"navigationBarTextStyle": "black"
}
}
],
"subPackages": [
{
"root": "root/chat",
"pages": [
{
"path": "index",
"style": {
"backgroundColor": "#ededed",
"backgroundColorTop": "#ededed",
"backgroundColorBottom": "#ededed",
"navigationBarTitleText": "大鹏Beta"
}
}
]
},
{
"root": "root/chat",
"pages": [
{
"path": "index",
"style": {
"backgroundColor": "#ededed",
"backgroundColorTop": "#ededed",
"backgroundColorBottom": "#ededed",
"navigationBarTitleText": "大鹏Beta"
}
}
]
},
{ //
"root": "root/home",
"pages": [
@ -121,15 +130,15 @@
{ //
"root": "root/person",
"pages": [
{
"path": "marge",
"style": {
"navigationBarTitleText": "合并团队",
"backgroundColor": "#ededed",
"backgroundColorTop": "#ededed",
"backgroundColorBottom": "#ededed"
}
},
{
"path": "marge",
"style": {
"navigationBarTitleText": "合并团队",
"backgroundColor": "#ededed",
"backgroundColorTop": "#ededed",
"backgroundColorBottom": "#ededed"
}
},
{
"path": "todayData",
"style": {
@ -656,23 +665,29 @@
"text": "首页"
},
{
"pagePath": "pages/workBench/index",
"pagePath": "pages/home/order",
"iconPath": "static/image/apply.png",
"selectedIconPath": "static/image/apply-active.png",
"text": "工单"
"text": "发单号"
},
{
"iconPath": "static/image/home.png",
"selectedIconPath": "static/image/home.png",
"pagePath": "pages/addJob/index",
"text": ""
},
{
"iconPath": "static/image/message.png",
"selectedIconPath": "static/image/message_active.png",
"pagePath": "pages/message/index",
"text": "消息"
},
{
"pagePath": "pages/workBench/index",
"iconPath": "static/image/apply.png",
"selectedIconPath": "static/image/apply-active.png",
"text": "工单"
},
// { ai
// "iconPath": "static/image/home.png",
// "selectedIconPath": "static/image/home.png",
// "pagePath": "pages/addJob/index",
// "text": ""
// },
{
"pagePath": "pages/person/index",
"iconPath": "static/image/person.png",

@ -29,7 +29,7 @@
<div class="" style="line-height: 1">职位</div>
</div>
</div>
<div :style="{ minHeight: `calc(100vh - ${tabbarHeight}px)`}">
<div :style="{ minHeight: `100%` }">
<div class="sticky" v-if="isLogin">
<div class="g_flex_row_between flex_center" :class="toTop ? 'g_bg_f' : 'g_bg_f_5'" :style="{ 'box-shadow': toTop ? '0px 2px 3px 0px rgba(214, 214, 214, 0.3)' : '' }" id="tttop">
<div class="g_flex_1">
@ -132,8 +132,7 @@
</div>
</u-popup>
</div>
<g-tabbar class="tabbar"></g-tabbar>
<g-tabbar class="tabbar"></g-tabbar>
</div>
</template>

@ -0,0 +1,511 @@
<template>
<view class="p-bind-inedx g_w_all g_h_all g_bg_f_5 g_kuaishou">
<!-- 搜索栏 -->
<view class="m-top">
<view class="m-search g_p_10 g_pb_0 g_position_rela g_p_12 g_bg_f_5">
<u-search height="80" v-model="keyword" :placeholder="tabInfo.active == 0 ? '搜索已关注的发单号' : '搜索我的粉丝'" @btnSearch="getSearch" bg-color="#fff" :show-action="false" @change="getSearch" @clear="getSearch" @custom="getSearch" @search="getSearch" search-icon-color="#999999" :maxlength="20"></u-search>
</view>
</view>
<view class="m-panel">
<view class="center">
<!-- 列表区 -->
<view class="m-list">
<view class="link" :class="isShow ? '' : ''">
<view class="item g_flex_row_between g_pt_12 g_pb_12 g_pl_16 g_pr_16 g_bg_f" @click="goApply" style="border-bottom: 1rpx solid #eee" v-if="tabInfo.active == 1">
<view class="g_flex_1 g_flex_row_start">
<view class="g_flex_column_center g_pr_16 g_flex_none">
<view class="g_w_48 g_h_48 g_radius_8 g_flex_c" style="background-color: #ffeceb">
<i class="iconfont icon-xindeshenqing g_fs_22" style="color: #ff7b7b; font-size: 22px"></i>
</view>
</view>
<view class="g_flex_column_center g_flex_1">
<view class="g_ell_1 g_fs_18 g_c_3">{{ tabInfo.active == 0 ? "新的关注" : "新的粉丝" }}</view>
<view
class="g_ell_1 g_fs_14 g_c_9 g_mt_4"
v-if="tabInfo.active == 0"
:style="{
color: Number(waitNum_downs) == 0 ? '#fff' : '#999',
}"
>您有{{ waitNum_downs }}条信息等待对方通过</view
>
<view
class="g_ell_1 g_fs_14 g_c_9 g_mt_4"
v-else
:style="{
color: Number(waitNum_downs) == 0 ? '#fff' : '#999',
}"
>您有{{ waitNum_downs }}条新的粉丝申请</view
>
</view>
</view>
<view class="g_flex_none g_h_all g_flex_column_center g_pl_20 g_h_48" v-if="Number(waitNum_ups) > 0">
<view class="tip g_w_16 g_h_16 g_bg_f0a g_c_f g_flex_c g_fs_14 g_radius_50">{{ waitNum_ups }}</view>
</view>
</view>
<g-loading :loading="loading" v-if="loading && speed == -1" />
<view v-if="!loading && speed == 0 && inviteNum <= 0" class="g_pt_130" style="padding-top: 130px">
<g-empty :text="isLogin ? '暂无数据' : '请登录'" />
</view>
<view v-if="speed > 0 || inviteNum > 0">
<view v-if="inviteNum > 0" class="item g_flex_row_between flex_center g_pl_16 g_pr_16 g_pb_12 g_pt_12 g_bg_f g_border_e_b" @click="goInviteList">
<view class="g_flex_row_start flex_center">
<g-panel-image size="96" radius="6" />
<view class="g_ml_16">
<view class="g_ell_1 g_fs_18 g_c_0 g_flex_none" style="max-width: 460rpx">关注邀请</view>
<view class="g_mt_4 g_text_c">{{ inviteNum }}个发单号向你发出邀请</view>
</view>
</view>
<view class="g_dot_18 g_bg_f40 g_c_f g_text_c" v-if="showDot">{{ inviteNum }}</view>
</view>
<div class="g_h_10"></div>
<div class="r_box g_ml_10 g_mr_10" style="overflow: hidden">
<view class="item g_flex_row_between g_pl_16 g_pr_16 g_pb_6 g_pt_6 g_bg_f" hover-class="g_bg_e" v-for="(item, index) in query.list" :key="index" @click="goMain(item)" :class="index == 0 ? 'g_pt_12' : ''" :style="{ 'border-bottom': index == query.list.length - 1 ? '1rpx solid #fff' : '1rpx solid #eee' }">
<view class="g_flex_none g_flex_row_start">
<view class="g_flex_column_center g_pr_16 g_flex_none" style="position: relative">
<g-panel-image :url="item.logo || 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/qiyelogo0610.svg'" size="96" radius="50" />
<!-- <view v-if="item.supplierAccount == 1" style="position: absolute; left: 0; width: 48px; height: 48px" class="g_flex_row_end">
<view class="g_flex_c" style="position: absolute; overflow: hidden; width: 20px; height: 10px; right: -2px; top: 0px">
<image :src="cdnBaseImg + 'fadanhao.svg'" mode="widthFix" style="width: 16px; height: 13px"></image>
</view>
</view>-->
</view>
</view>
<view class="g_flex_1 g_h_all g_flex_column_center g_h_60 _right">
<view class="g_flex_row_between">
<view class="g_flex_column_center g_flex_1 g_mr_12">
<view class="g_flex_row_start flex_center">
<view class="g_ell_1 g_fs_18 g_c_0 g_flex_none" style="max-width: 100%">{{ item.fullName || item.agencyName || "-" }}</view>
<!-- <view class="g_ml_6 g_text_c g_flex_1">
<view class="g_w_36 g_h_18 g_fs_12 g_redius_4" style="background-color: #f2f7ff; color: #1677ff" v-if="item.teamType == 2"></view>
<view class="g_w_36 g_h_18 g_fs_12 g_redius_4" style="background-color: #fff5f5; color: #ff4d4f" v-if="item.teamType == 1"></view>
</view>-->
</view>
<view class="g_fs_14 g_c_9 g_mt_4">
<view class="g_flex_row_start">
<view class="g_flex_row_start">
<view>总职位</view>
<view class="g_mr_8">{{ item.jobNum ? item.jobNum : "0" }}</view>
</view>
<view class="g_flex_row_start">
<view>在招</view>
<view class="g_mr_8">{{ item.recruitmentJobNum ? item.recruitmentJobNum : "0" }}</view>
</view>
<view class="g_flex_row_start">
<view>粉丝</view>
<view class="g_mr_8">{{ item.downNum ? item.downNum : "0" }}</view>
</view>
</view>
</view>
</view>
<view class="g_flex_column_center g_mb_12" v-if="tabInfo.active == 1">
<view v-if="item.recordStatus == 1 && item.supplierAccount == 1 && item.recordStatus == 5">
<view class="g_radius_14 g_h_28 g_border_e g_fs_14 g_c_main g_pr_8 g_pl_8 g_flex_row_center flex_center" @click.stop="goApplyForm(item, index)" hover-class="g_bg_f_5" hover-stop-propagation>
<i class="iconfont icon-tianjia g_fsi_12 g_mr_6"></i>
等待通过
</view>
</view>
<view v-if="item.recordStatus == 1 && item.supplierAccount == 1 && item.recordStatus == 6">
<view class="g_radius_14 g_h_28 g_border_e g_fs_14 g_c_main g_pr_8 g_pl_8 g_flex_row_center flex_center" @click.stop="goApplyForm(item, index)" hover-class="g_bg_f_5" hover-stop-propagation>
<i class="iconfont icon-tianjia g_fsi_12 g_mr_6"></i>
已过期
</view>
</view>
<view v-if="item.recordStatus == 1 && item.supplierAccount == 1">
<view class="g_radius_14 g_h_28 g_border_e g_fs_14 g_c_main g_pr_8 g_pl_8 g_flex_row_center flex_center" @click.stop="goApplyForm(item, index)" hover-class="g_bg_f_5" hover-stop-propagation>
<i class="iconfont icon-tianjia g_fsi_12 g_mr_6"></i>
关注
</view>
</view>
<view v-if="item.recordStatus == 2">
<view class="g_radius_14 g_h_28 g_border_e g_fs_14 g_c_6 g_pr_8 g_pl_8 g_flex_row_center flex_center">
<i class="iconfont icon-a-bianzu11beifen2 g_fsi_12 g_mr_6"></i>
互相关注
</view>
</view>
</view>
</view>
</view>
</view>
</div>
</view>
</view>
</view>
<view v-if="isShow && speed > 0" class="g_bg_f_5">
<g-panel-hr :str="query.isFinish >= 0 && query.isFinish < query.size ? speed + '个发单号' : '加载中'" />
</view>
<!-- #ifdef H5 -->
<view style="height: 50px"></view>
<!-- #endif -->
</view>
</view>
<g-tabbar class="tabbar"></g-tabbar>
</view>
</template>
<script>
export default {
onReady() {
this.G.setNavStyle();
},
onShareAppMessage() {
return this.G.shareFun();
},
data() {
return {
cdnBaseImg: this.G.store().cdnBaseImg,
isLogin: null,
isShow: false,
loading: true,
showDot: true,
speed: -1,
query: {
page: 1,
size: 50,
list: [],
isFinish: -1,
},
keyword: "",
scrollTop: 0,
domHeight: 0,
waitNum_downs: 0,
waitNum_ups: 0,
cardTab: [
{
icon: "t-icon-xunzhaoshangyou",
title: "搜索发单号",
remark: "关注更多单子的更新",
},
{
icon: "t-icon-fazhanxiayou",
title: "发展代理",
remark: "让更多代理关注我",
},
],
tabInfo: {
list: [
{
name: "关注(0)",
num: 0,
tip: 0,
cate_count: 0,
},
{
name: "粉丝(0)",
num: 0,
tip: 1,
cate_count: 0,
},
],
active: 0,
},
tabFansInfo: {
list: [
{
name: "新的代理",
},
{
name: "全部粉丝",
},
],
active: 0,
},
inviteNum: 0, //
};
},
onLoad(options) {
let that = this;
// that.tabInfo.active = options.active
// if (that.tabInfo.active == 0) {
// uni.setNavigationBarTitle({
// title: "",
// });
// } else {
// if (that.tabInfo.active == 1) {
// uni.setNavigationBarTitle({
// title: "",
// });
// }
// }
const query = uni.createSelectorQuery().in(this);
query
.select(".m-top")
.boundingClientRect((data) => {
that.domHeight = data.height + 34;
})
.exec();
},
onShow() {
let that = this;
that.isLogin = uni.getStorageSync("apply-token");
if (uni.getStorageSync("watch_invite")) {
if (uni.getStorageSync("watch_invite") == 1) {
that.showDot = false; //
}
}
if (!that.isLogin) {
that.waitNum_downs = 0;
that.waitNum_ups = 0;
that.tabInfo.list[0].name = "关注(0)";
that.tabInfo.list[1].name = "粉丝(0)";
that.isShow = true;
that.speed = 0;
that.loading = false;
that.query.list = [];
} else {
that.query.page = 1;
that.getWaitNum();
that.getNum();
that.getList();
that.getInviteNum();
that.getPoint();
}
},
onReachBottom() {
let that = this;
if (that.query.isFinish == -1 || that.query.isFinish == that.query.size) {
that.query.page++;
that.getList("concat");
}
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
},
methods: {
handleUpdateFensTab(e) {},
getPoint() {
let that = this;
that.G.Get(
that.api.bind_getWaitNum + "/2",
{
type: 2,
},
(res) => {
that.tabInfo.list[1].cate_count = res.unread;
}
);
},
getWaitNum() {
let that = this;
that.G.Get(
that.api.bind_getWaitNum + "/" + (that.tabInfo.active * 1 + 1),
{
type: that.tabInfo.active * 1 + 1,
},
(res) => {
that.waitNum_downs = res.total;
that.waitNum_ups = res.unread;
console.log("获取指定数量:", res);
that.$forceUpdate();
}
);
},
getNum() {
let that = this;
that.G.Post(
that.api.bind_getListNum,
{
keys: that.keyword,
},
(res) => {
that.tabInfo.list[0].name = "关注(" + res.ups + ")";
that.tabInfo.list[1].name = "粉丝(" + res.downs + ")";
}
);
},
getInviteNum() {
let that = this;
that.G.Get(that.api.user_getInviteNum, {}, (res) => {
console.log(res);
that.inviteNum = res;
});
},
getList($type = "init") {
let that = this;
that.isShow = false;
that.G.Post(
that.api.bind_list,
{
pageNum: that.query.page,
pageSize: that.query.size,
keys: that.keyword,
platform: "pc",
type: that.tabInfo.active * 1 + 1,
formdata: true,
},
(res) => {
that.isShow = true;
that.speed = res.recordCount;
if (that.speed == 0) {
that.loading = false;
} else {
that.loading = true;
}
that.query.isFinish = res.recordList.length;
if ($type == "init") {
that.query.list = [];
that.query.list = res.recordList;
} else {
that.query.list = that.query.list.concat(res.recordList);
}
}
);
},
getSearch(e) {
if (e == "string") {
this.keyword = e;
}
this.G.isLogin();
if (this.G.isLogin()) {
this.speed = -1;
this.query.page = 1;
this.getList();
}
},
handleUpdateTab(e) {
this.G.isLogin();
if (this.G.isLogin()) {
this.tabInfo.active = e;
this.speed = -1;
this.query.page = 1;
this.getList();
this.getWaitNum();
this.getNum();
this.getPoint();
}
},
goMain($item) {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
if ($item.supplierAccount == 1) {
let params = {
id: $item.agencyId,
type: that.tabInfo.active * 1 + 1,
bindid: $item.id,
isShowMore: false,
isShowJob: false,
shareForm: "apply",
};
if (that.tabInfo.active == 0) {
//
params.isShowMore = true;
params.isShowJob = true;
} else {
//
if ($item.recordStatus == 1) {
//
params.isShowMore = true;
params.isShowJob = false;
} else {
//
params.isShowMore = true;
params.isShowJob = true;
}
}
uni.navigateTo({
url: "/root/detail/userShare?" + that.G.objToStr(params),
});
} else {
//
uni.navigateTo({
url: "/root/bind/more?delta=1&id=" + $item.agencyId + "&himSee=" + $item.himSee + "&lookHim=" + $item.lookHim + "&type=" + 2 + "&hid=" + $item.id,
});
}
}
},
goApply() {
let that = this,
str = "";
this.G.isLogin();
if (this.G.isLogin()) {
uni.navigateTo({
url: "/root/bind/applyList?active=2",
});
}
},
goSearch($item, $index) {
let that = this;
that.G.isLogin();
if (that.G.isLogin()) {
uni.navigateTo({
url: "/root/bind/search?active=" + $index,
});
}
},
goApplyForm($item, $index) {
let that = this;
if ($item.recordStatus == 5 || $item.recordStatus == 6) {
} else {
uni.navigateTo({
url: "/root/bind/applyForm?code=" + $item.agencyId + "&form=1",
});
}
},
goInviteList() {
uni.navigateTo({
url: "/root/bind/inviteList?active=0",
});
},
},
};
</script>
<style lang="scss">
.p-bind-inedx {
.m-card {
padding-left: 10px;
padding-right: 10px;
.item {
width: calc(50% - 5px);
}
}
.showdoc {
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 0 6px rgba(0, 0, 0, 0.02);
}
.suffix {
position: absolute;
right: 20rpx;
top: 50%;
transform: translateY(-50%);
z-index: 1;
border-top-right-radius: 110rpx;
border-bottom-right-radius: 110rpx;
}
.tab-fixed {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 44px;
background-color: #fff;
z-index: 1;
}
.m-search {
// .u-icon-wrap{
// position: absolute;
// left: 190rpx;
// }
}
.m-search-active {
.u-icon-wrap {
position: inherit;
left: 0rpx;
}
}
}
</style>

@ -4,12 +4,7 @@
<view class="m-tabs" v-if="isLogin" style="position: fixed; width: 100%; z-index: 999">
<u-tabs :list="typeGroup" :is-scroll="false" v-model="current" @change="updateType" item-width="126" :active-color="globalData.themeColor" bar-width="60" bar-height="6" font-size="32" :gutter="22" duration="0.1" itemWidth="auto" height="84"></u-tabs>
</view>
<scroll-view @scroll="getScrollInfo"
:scroll-top="resetScroll"
:style="{ height: `calc(100vh - ${isLogin ? tabbarHeight + 43 : 0}px)`, 'padding-top': isLogin ? '43px' : '' }"
:scroll-y="true"
v-if="isLogin"
>
<scroll-view @scroll="getScrollInfo" :scroll-top="resetScroll" :style="{ height: `calc(100vh - ${isLogin ? tabbarHeight + 43 : 0}px)`, 'padding-top': isLogin ? '43px' : '' }" :scroll-y="true" v-if="isLogin">
<view class="" v-show="current == 0">
<view class="g_bg_f">
<ConversationList ref="contactList" />
@ -20,14 +15,12 @@
</view>
</scroll-view>
<view class="g_h_all" v-if="!isLogin">
<view class="" hover-class="none" hover-stop-propagation="false" style="height: 108px;">
</view>
<view class="" hover-class="none" hover-stop-propagation="false" style="height: 108px"> </view>
<view class="">
<g-empty text="您还有没有登录,请登录后查看消息" />
<view class="g_h_32"></view>
<g-button btnText="去登录" size="small" class="g_mt_32" @clickBtn="goLogin" />
</view>
<g-empty text="您还有没有登录,请登录后查看消息" />
<view class="g_h_32"></view>
<g-button btnText="去登录" size="small" class="g_mt_32" @clickBtn="goLogin" />
</view>
</view>
</view>
<servicePopup
@ -101,8 +94,7 @@ const typeGroup = ref([
const current = ref(0);
const count = ref(0); //
const userInfo = ref({});
onShow(() => {
onLoad(() => {
isLogin.value = uni.getStorageSync("apply-token") ? true : false;
console.log("count.value", count.value);
corpUserFlag.value = uni.getStorageSync("apply-userinfo").corpUserFlag;
@ -150,6 +142,7 @@ onShow(() => {
current.value = 0;
}
});
onShow(() => {});
const goLogin = () => {
uni.reLaunch({
url: "/root/person/loginIndex",
@ -210,7 +203,6 @@ const updateType = (e) => {
</script>
<style lang="scss">
.i-items {
// border-bottom: 1px solid #eee;
position: relative;
@ -228,4 +220,4 @@ const updateType = (e) => {
// border-bottom: none;
// }
}
</style>
</style>

@ -4,15 +4,15 @@
<view class="m-info g_p_16 g_bg_f g_m_10 g_radius_8 g_position_rela u-skeleton" v-if="isLogin" hover-class="none" style="margin-top: 0">
<view class="g_flex_row_start">
<view class="g_w_71">
<view class="u-skeleton-fillet g_w_71 g_h_71" v-if="loading"></view>
<view class="g_position_abso g_p_4 g_radius_13 g_bg_f " v-else style="top: -20px">
<view class="u-skeleton-fillet g_w_71 g_h_71" v-if="loading"></view>
<view class="g_position_abso g_p_4 g_radius_13 g_bg_f" v-else style="top: -20px">
<g-panel-image :radius="13" :size="134" :url="userInfo.avatar" />
</view>
</view>
<view class="g_flex_1 g_ml_11">
<view class="g_flex_row_between flex_center">
<view class="g_flex_row_start flex_center" style="line-height: 22px">
<view class="g_flex_none g_ell_1 g_fs_20 g_fw_bold g_c_3 " style="max-width: 240rpx">
<view class="g_flex_none g_ell_1 g_fs_20 g_fw_bold g_c_3" style="max-width: 240rpx">
{{ userInfo.name ? userInfo.name : "-" }}
</view>
</view>
@ -54,7 +54,7 @@
</view>
<view class="g_mt_10">
<!-- v-if="userInfo.admin" -->
<view class="g_mt_10 g_position_rela" v-if="userInfo.agencyId">
<!-- <view class="g_mt_10 g_position_rela" v-if="userInfo.agencyId">
<div class="g_w_8 g_h_8 g_radius_50 g_bg_f0a g_position_abso" style="right: 18px; top: 10px" v-if="!readed"></div>
<g-panel-form-item
:list="[
@ -69,7 +69,7 @@
]"
@clickItem="goPage('/root/bind/order?active=0')"
/>
</view>
</view> -->
<view class="g_mt_10" v-if="userInfo.agencyId">
<g-panel-card-num :list="billDataList" titleNav="/root/person/applyIndex" :border="true" :speed="1" :marginBottom="16" cusType="num" :height="26" :num="5" cusTitle="报名工单(我报的)" @clickItem="goOrder" />
<!-- <g-panel-card-num :list="todayDataList"

@ -10,7 +10,7 @@
</view>
<!-- #endif -->
<view class="g_h_all">
<view class="">
<!-- #ifdef APP-PLUS || H5 || MP-KUAISHOU || MP-WEIXIN -->
<view class="" style="height: calc(58px + 40px)"></view>
<!-- #endif -->

@ -1,5 +1,6 @@
$filter_bg_color: #e3ecfd;
$main_bg_color: #1890ff;
$page_bg_color: #ededed;
$main_color: #1890ff;
image {
vertical-align: top;
@ -359,7 +360,7 @@ scroll-view::-webkit-scrollbar {
&_09f {
color: #0091ff;
}
&_027 {
&_027 {
color: #027aff;
}
&_sub {
@ -429,6 +430,10 @@ scroll-view::-webkit-scrollbar {
&_trans_main {
background-color: $filter_bg_color;
}
&_page {
background-color: $page_bg_color;
min-height: 100vh;
}
}
&text {
//

@ -1,291 +1,265 @@
<template>
<div class="wrapper g_bg_f_5">
<!-- <NavBar :title="t('FriendPageText')" /> -->
<UserCard
:account="userInfo && userInfo.accountId"
:nick="userInfo && userInfo.name"
></UserCard>
<template v-if="relation === 'stranger'">
<div class="userInfo-item-wrapper">
<div class="userInfo-item">
<div class="item-left">{{ t('addBlacklist') }}</div>
<switch
:checked="isInBlacklist"
@change="(checked) => handleSwitchChange(checked)"
/>
</div>
</div>
<div class="wrapper bg_page">
<!-- <NavBar :title="t('FriendPageText')" /> -->
<UserCard :account="userInfo && userInfo.accountId" :nick="userInfo && userInfo.name"></UserCard>
<template v-if="relation === 'stranger'">
<div class="userInfo-item-wrapper">
<div class="userInfo-item">
<div class="item-left">{{ t("addBlacklist") }}</div>
<switch :checked="isInBlacklist" @change="(checked) => handleSwitchChange(checked)" />
</div>
</div>
<div class="button" :style="{ marginTop: '10px' }" @click="addFriend">
{{ t('addFriendText') }}
</div>
</template>
<template v-else>
<div class="userInfo-item-wrapper">
<div class="userInfo-item" @tap="handleAliasClick">
<div class="item-left">{{ t('remarkText') }}</div>
<div class="item-right">
<Icon iconClassName="more-icon" color="#999" type="icon-jiantou" />
</div>
</div>
<div class="userInfo-item">
<div class="item-left">{{ t('genderText') }}</div>
<div class="item-right">
{{
userInfo && userInfo.gender === 0
? t('unknow')
: userInfo && userInfo.gender === 1
? t('man')
: t('woman')
}}
</div>
</div>
<div class="box-shadow"></div>
<div class="userInfo-item">
<div class="item-left">{{ t('birthText') }}</div>
<div class="item-right">
{{ (userInfo && userInfo.birthday) || t('unknow') }}
</div>
</div>
<div class="box-shadow"></div>
<div class="userInfo-item">
<div class="item-left">{{ t('mobile') }}</div>
<div class="item-right">
{{ (userInfo && userInfo.mobile) || t('unknow') }}
</div>
</div>
<div class="box-shadow"></div>
<div class="userInfo-item">
<div class="item-left">{{ t('email') }}</div>
<div class="item-right">
{{ (userInfo && userInfo.email) || t('unknow') }}
</div>
</div>
<div class="userInfo-item">
<div class="item-left">{{ t('sign') }}</div>
<div class="item-right">
{{ (userInfo && userInfo.sign) || t('unknow') }}
</div>
</div>
</div>
<div class="userInfo-item-wrapper">
<div class="userInfo-item">
<div class="item-left">{{ t('addBlacklist') }}</div>
<switch :checked="isInBlacklist" @change="handleSwitchChange" />
</div>
</div>
<div class="button" @click="gotoChat">{{ t('chatWithFriendText') }}</div>
<div class="box-shadow"></div>
<div class="button button-red" @click="deleteFriend">
{{ t('deleteFriendText') }}
</div>
</template>
</div>
<div class="button" :style="{ marginTop: '10px' }" @click="addFriend">
{{ t("addFriendText") }}
</div>
</template>
<template v-else>
<div class="userInfo-item-wrapper">
<div class="userInfo-item" @tap="handleAliasClick">
<div class="item-left">{{ t("remarkText") }}</div>
<div class="item-right">
<Icon iconClassName="more-icon" color="#999" type="icon-jiantou" />
</div>
</div>
<div class="userInfo-item">
<div class="item-left">{{ t("genderText") }}</div>
<div class="item-right">
{{ userInfo && userInfo.gender === 0 ? t("unknow") : userInfo && userInfo.gender === 1 ? t("man") : t("woman") }}
</div>
</div>
<div class="box-shadow"></div>
<div class="userInfo-item">
<div class="item-left">{{ t("birthText") }}</div>
<div class="item-right">
{{ (userInfo && userInfo.birthday) || t("unknow") }}
</div>
</div>
<div class="box-shadow"></div>
<div class="userInfo-item">
<div class="item-left">{{ t("mobile") }}</div>
<div class="item-right">
{{ (userInfo && userInfo.mobile) || t("unknow") }}
</div>
</div>
<div class="box-shadow"></div>
<div class="userInfo-item">
<div class="item-left">{{ t("email") }}</div>
<div class="item-right">
{{ (userInfo && userInfo.email) || t("unknow") }}
</div>
</div>
<div class="userInfo-item">
<div class="item-left">{{ t("sign") }}</div>
<div class="item-right">
{{ (userInfo && userInfo.sign) || t("unknow") }}
</div>
</div>
</div>
<div class="userInfo-item-wrapper">
<div class="userInfo-item">
<div class="item-left">{{ t("addBlacklist") }}</div>
<switch :checked="isInBlacklist" @change="handleSwitchChange" />
</div>
</div>
<div class="button" @click="gotoChat">{{ t("chatWithFriendText") }}</div>
<div class="box-shadow"></div>
<div class="button button-red" @click="deleteFriend">
{{ t("deleteFriendText") }}
</div>
</template>
</div>
</template>
<script lang="ts" setup>
import { onLoad } from '@dcloudio/uni-app'
import UserCard from '../../../components/UserCard.vue'
import { onUnmounted, ref } from '../../../utils/transformVue'
import { t } from '../../../utils/i18n'
import NavBar from '../../../components/NavBar.vue'
import { autorun } from 'mobx'
import {
customRedirectTo,
customNavigateTo,
} from '../../../utils/customNavigate'
import { deepClone } from '../../../utils'
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 { onLoad } from "@dcloudio/uni-app";
import UserCard from "../../../components/UserCard.vue";
import { onUnmounted, ref } from "../../../utils/transformVue";
import { t } from "../../../utils/i18n";
import NavBar from "../../../components/NavBar.vue";
import { autorun } from "mobx";
import { customRedirectTo, customNavigateTo } from "../../../utils/customNavigate";
import { deepClone } from "../../../utils";
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";
const userInfo = ref<V2NIMUser>()
const relation = ref<Relation>('stranger')
const isInBlacklist = ref(false)
const userInfo = ref<V2NIMUser>();
const relation = ref<Relation>("stranger");
const isInBlacklist = ref(false);
let account = ''
let account = "";
const handleAliasClick = () => {
customNavigateTo({
url: `/pages/Friend/friend-info-edit?id=${account}`,
})
}
let uninstallFriendWatch = () => {}
let uninstallRelationWatch = () => {}
customNavigateTo({
url: `/pages/Friend/friend-info-edit?id=${account}`,
});
};
let uninstallFriendWatch = () => {};
let uninstallRelationWatch = () => {};
onLoad((props) => {
account = props ? props.account : ''
uni.$UIKitStore.userStore.getUserForceActive(account)
uninstallFriendWatch = autorun(() => {
userInfo.value = deepClone(
uni.$UIKitStore.uiStore.getFriendWithUserNameCard(account)
)
})
account = props ? props.account : "";
uni.$UIKitStore.userStore.getUserForceActive(account);
uninstallFriendWatch = autorun(() => {
userInfo.value = deepClone(uni.$UIKitStore.uiStore.getFriendWithUserNameCard(account));
});
uninstallRelationWatch = autorun(() => {
const { relation: _relation, isInBlacklist: _isInBlacklist } =
uni.$UIKitStore.uiStore.getRelation(account)
relation.value = _relation
isInBlacklist.value = _isInBlacklist
})
})
uninstallRelationWatch = autorun(() => {
const { relation: _relation, isInBlacklist: _isInBlacklist } = uni.$UIKitStore.uiStore.getRelation(account);
relation.value = _relation;
isInBlacklist.value = _isInBlacklist;
});
});
const handleSwitchChange = async (e: any) => {
const isAdd = e.detail.value
try {
if (isAdd) {
await uni.$UIKitStore.relationStore.addUserToBlockListActive(account)
} else {
await uni.$UIKitStore.relationStore.removeUserFromBlockListActive(account)
}
} catch (error) {
uni.showToast({
title: isAdd ? t('setBlackFailText') : t('removeBlackFailText'),
icon: 'error',
})
}
}
const isAdd = e.detail.value;
try {
if (isAdd) {
await uni.$UIKitStore.relationStore.addUserToBlockListActive(account);
} else {
await uni.$UIKitStore.relationStore.removeUserFromBlockListActive(account);
}
} catch (error) {
uni.showToast({
title: isAdd ? t("setBlackFailText") : t("removeBlackFailText"),
icon: "error",
});
}
};
const deleteFriend = () => {
uni.showModal({
title: t('deleteFriendText'),
content:
t('deleteFriendConfirmText') +
'“' +
uni.$UIKitStore.uiStore.getAppellation({ account }) +
'”?',
success: (res) => {
if (res.confirm) {
uni.$UIKitStore.friendStore
.deleteFriendActive(account)
.then(() => {
uni.showToast({
title: t('deleteFriendSuccessText'),
icon: 'success',
})
})
.then(() => {
const conversationId =
uni.$UIKitNIM.V2NIMConversationIdUtil.p2pConversationId(account)
return uni.$UIKitStore.conversationStore.deleteConversationActive(
conversationId
)
})
.catch(() => {
uni.showToast({
title: t('deleteFriendFailText'),
icon: 'error',
})
})
} else if (res.cancel) {
console.log('用户点击取消')
}
},
})
}
uni.showModal({
title: t("deleteFriendText"),
content: t("deleteFriendConfirmText") + "“" + uni.$UIKitStore.uiStore.getAppellation({ account }) + "”?",
success: (res) => {
if (res.confirm) {
uni.$UIKitStore.friendStore
.deleteFriendActive(account)
.then(() => {
uni.showToast({
title: t("deleteFriendSuccessText"),
icon: "success",
});
})
.then(() => {
const conversationId = uni.$UIKitNIM.V2NIMConversationIdUtil.p2pConversationId(account);
return uni.$UIKitStore.conversationStore.deleteConversationActive(conversationId);
})
.catch(() => {
uni.showToast({
title: t("deleteFriendFailText"),
icon: "error",
});
});
} else if (res.cancel) {
console.log("用户点击取消");
}
},
});
};
const addFriend = async () => {
try {
await uni.$UIKitStore.friendStore.addFriendActive(account, {
addMode: V2NIMConst.V2NIMFriendAddMode.V2NIM_FRIEND_MODE_TYPE_APPLY,
postscript: '',
})
try {
await uni.$UIKitStore.friendStore.addFriendActive(account, {
addMode: V2NIMConst.V2NIMFriendAddMode.V2NIM_FRIEND_MODE_TYPE_APPLY,
postscript: "",
});
//
await uni.$UIKitStore.relationStore.removeUserFromBlockListActive(account)
uni.showToast({
title: t('applyFriendSuccessText'),
icon: 'success',
})
} catch (error) {
uni.showToast({
title: t('applyFriendFailText'),
icon: 'error',
})
}
}
//
await uni.$UIKitStore.relationStore.removeUserFromBlockListActive(account);
uni.showToast({
title: t("applyFriendSuccessText"),
icon: "success",
});
} catch (error) {
uni.showToast({
title: t("applyFriendFailText"),
icon: "error",
});
}
};
const gotoChat = async () => {
const conversationId =
uni.$UIKitNIM.V2NIMConversationIdUtil.p2pConversationId(
userInfo.value?.accountId || ''
)
await uni.$UIKitStore.uiStore.selectConversation(conversationId)
customRedirectTo({
url: '/pages/Chat/index',
})
}
const conversationId = uni.$UIKitNIM.V2NIMConversationIdUtil.p2pConversationId(userInfo.value?.accountId || "");
await uni.$UIKitStore.uiStore.selectConversation(conversationId);
customRedirectTo({
url: "/pages/Chat/index",
});
};
onUnmounted(() => {
uninstallFriendWatch()
uninstallRelationWatch()
})
uninstallFriendWatch();
uninstallRelationWatch();
});
</script>
<style lang="scss" scoped>
.bg_page {
background-color: #ededed;
min-height: 100vh;
}
page {
padding-top: var(--status-bar-height);
height: 100vh;
overflow: hidden;
padding-top: var(--status-bar-height);
height: 100vh;
overflow: hidden;
}
.wrapper {
// background-color: rgb(245, 246, 247);
height: 100vh;
box-sizing: border-box;
padding-bottom: 50px;
// background-color: rgb(245, 246, 247);
height: 100vh;
box-sizing: border-box;
padding-bottom: 50px;
.userInfo-item-wrapper {
background-color: #fff;
margin: 10px 0;
.userInfo-item-wrapper {
background-color: #fff;
margin: 10px 0;
.userInfo-item {
display: flex;
height: 50px;
align-items: center;
justify-content: space-between;
padding: 0 16px;
.userInfo-item {
display: flex;
height: 50px;
align-items: center;
justify-content: space-between;
padding: 0 16px;
.item-left {
font-size: 16px;
}
.item-left {
font-size: 16px;
}
.item-right {
font-size: 15px;
width: 200px;
text-align: right;
color: #a6adb6;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
.item-right {
font-size: 15px;
width: 200px;
text-align: right;
color: #a6adb6;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
.button {
// margin-top: 150px;
display: block;
width: 100%;
background-color: #fff;
color: #1890ff;
text-align: center;
height: 50px;
font-size: 16px;
line-height: 50px;
}
.button {
// margin-top: 150px;
display: block;
width: 100%;
background-color: #fff;
color: #1890ff;
text-align: center;
height: 50px;
font-size: 16px;
line-height: 50px;
}
.button-red {
color: #e6605c;
}
.button-red {
color: #e6605c;
}
.box-shadow {
height: 1px;
background: none;
padding: 0 25px;
box-shadow: 0 0.5px 0 rgb(247, 244, 244);
}
.box-shadow {
height: 1px;
background: none;
padding: 0 25px;
box-shadow: 0 0.5px 0 rgb(247, 244, 244);
}
}
</style>

@ -1,22 +1,13 @@
<template>
<view :style="[customStyle]" class="u-icon" @tap="click" :class="['u-icon--' + labelPos]">
<image class="u-icon__img" v-if="isImg" :src="name" :mode="imgMode" :style="[imgStyle]"
></image>
<view
v-else
class="u-icon__icon"
:class="customClass"
:style="[iconStyle]"
:hover-class="hoverClass"
@touchstart="touchstart"
>
<text
v-if="showDecimalIcon"
:style="[decimalIconStyle]"
:class="decimalIconClass"
:hover-class="hoverClass"
class="u-icon__decimal"
></text>
<view class="" v-if="imgType == 'custom'">
<i class="tabImg iconfont" :class="name" />
</view>
<view class="" v-else>
<image class="u-icon__img" v-if="isImg" :src="name" :mode="imgMode" :style="[imgStyle]"></image>
<view v-else class="u-icon__icon" :class="customClass" :style="[iconStyle]" :hover-class="hoverClass" @touchstart="touchstart">
<text v-if="showDecimalIcon" :style="[decimalIconStyle]" :class="decimalIconClass" :hover-class="hoverClass" class="u-icon__decimal"></text>
</view>
</view>
<!-- 这里进行空字符串判断如果仅仅是v-if="label"可能会出现传递0的时候结果也无法显示微信小程序不传值默认为null故需要增加null的判断 -->
<text
@ -28,7 +19,7 @@
marginLeft: labelPos == 'right' ? $u.addUnit(marginLeft) : 0,
marginTop: labelPos == 'bottom' ? $u.addUnit(marginTop) : 0,
marginRight: labelPos == 'left' ? $u.addUnit(marginRight) : 0,
marginBottom: labelPos == 'top' ? $u.addUnit(marginBottom) : 0
marginBottom: labelPos == 'top' ? $u.addUnit(marginBottom) : 0,
}"
>
{{ label }}
@ -72,126 +63,129 @@ export default {
name: "u-icon",
emits: ["click", "touchstart"],
props: {
imgradius:{
default: '0'
imgradius: {
default: "0",
},
imgType: {
default: "",
},
//
name: {
type: String,
default: ""
default: "",
},
//
color: {
type: [String, null],
default: ""
default: "",
},
// rpx
size: {
type: [Number, String],
default: "inherit"
default: "inherit",
},
//
bold: {
type: Boolean,
default: false
default: false,
},
// index
index: {
type: [Number, String],
default: ""
default: "",
},
//
hoverClass: {
type: String,
default: ""
default: "",
},
// 便
customPrefix: {
type: String,
default: "uicon"
default: "uicon",
},
//
label: {
type: [String, Number],
default: ""
default: "",
},
// label
labelPos: {
type: String,
default: "right"
default: "right",
},
// label
labelSize: {
type: [String, Number],
default: "28"
default: "28",
},
// label
labelColor: {
type: String,
default: "#606266"
default: "#606266",
},
// label()
marginLeft: {
type: [String, Number],
default: "6"
default: "6",
},
// label()
marginTop: {
type: [String, Number],
default: "6"
default: "6",
},
// label()
marginRight: {
type: [String, Number],
default: "6"
default: "6",
},
// label()
marginBottom: {
type: [String, Number],
default: "6"
default: "6",
},
// mode
imgMode: {
type: String,
default: "widthFix"
default: "widthFix",
},
//
customStyle: {
type: Object,
default() {
return {};
}
},
},
//
width: {
type: [String, Number],
default: ""
default: "",
},
//
height: {
type: [String, Number],
default: ""
default: "",
},
//
top: {
type: [String, Number],
default: 0
default: 0,
},
// DecimalIcon
showDecimalIcon: {
type: Boolean,
default: false
default: false,
},
// Decimal
inactiveColor: {
type: String,
default: "#ececec"
default: "#ececec",
},
// Decimal
percent: {
type: [Number, String],
default: "50"
}
default: "50",
},
},
computed: {
customClass() {
@ -211,14 +205,9 @@ export default {
classes.push(customPrefix);
}
//
if (
this.showDecimalIcon &&
this.inactiveColor &&
this.$u.config.type.includes(this.inactiveColor)
) {
if (this.showDecimalIcon && this.inactiveColor && this.$u.config.type.includes(this.inactiveColor)) {
classes.push("u-icon__icon--" + this.inactiveColor);
} else if (this.color && this.$u.config.type.includes(this.color))
classes.push("u-icon__icon--" + this.color);
} else if (this.color && this.$u.config.type.includes(this.color)) classes.push("u-icon__icon--" + this.color);
// 使[a, b, c]
//
//#ifdef MP-ALIPAY || MP-TOUTIAO || MP-BAIDU
@ -232,14 +221,10 @@ export default {
fontSize: this.size == "inherit" ? "inherit" : this.$u.addUnit(this.size),
fontWeight: this.bold ? "bold" : "normal",
//
top: this.$u.addUnit(this.top)
top: this.$u.addUnit(this.top),
};
//
if (
this.showDecimalIcon &&
this.inactiveColor &&
!this.$u.config.type.includes(this.inactiveColor)
) {
if (this.showDecimalIcon && this.inactiveColor && !this.$u.config.type.includes(this.inactiveColor)) {
style.color = this.inactiveColor;
} else if (this.color && !this.$u.config.type.includes(this.color)) style.color = this.color;
@ -264,7 +249,7 @@ export default {
fontWeight: this.bold ? "bold" : "normal",
//
top: this.$u.addUnit(this.top),
width: this.percent + "%"
width: this.percent + "%",
};
//
if (this.color && !this.$u.config.type.includes(this.color)) style.color = this.color;
@ -280,8 +265,7 @@ export default {
classes.push(this.customPrefix);
}
//
if (this.color && this.$u.config.type.includes(this.color))
classes.push("u-icon__icon--" + this.color);
if (this.color && this.$u.config.type.includes(this.color)) classes.push("u-icon__icon--" + this.color);
else classes.push("u-icon__icon--primary");
// 使[a, b, c]
//
@ -289,7 +273,7 @@ export default {
classes = classes.join(" ");
//#endif
return classes;
}
},
},
methods: {
click() {
@ -297,15 +281,45 @@ export default {
},
touchstart() {
this.$emit("touchstart", this.index);
}
}
},
},
};
</script>
<style scoped lang="scss">
@import "../../libs/css/style.components.scss";
@import "../../iconfont.css";
@font-face {
font-family: "iconfont"; /* Project id 4374774 */
src: url("//at.alicdn.com/t/c/font_4374774_pt88dt6fxcj.woff2?t=1741923897019") format("woff2"), url("//at.alicdn.com/t/c/font_4374774_pt88dt6fxcj.woff?t=1741923897019") format("woff"), url("//at.alicdn.com/t/c/font_4374774_pt88dt6fxcj.ttf?t=1741923897019") format("truetype");
}
.iconfont {
font-family: "iconfont" !important;
font-size: 24px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
//
.icon-home:before {
content: "\e7e1";
}
//
.icon-order_active:before {
content: "\e617";
}
//
.icon-message:before {
content: "\e78a";
}
//
.icon-user:before {
content: "\e7ae";
}
//
.icon-fadanhao-31:before {
content: "\e65c";
}
.u-icon {
display: inline-flex;
align-items: center;

@ -22,23 +22,14 @@
backgroundColor: bgColor,
}"
>
<view :class="[midButton && item.midButton ? 'u-tabbar__content__circle__button' : 'u-tabbar__content__item__button']"
:style="{
top: item.text ? '7px' : '7px' ,
}">
<u-icon
:size="midButton && item.midButton ? midButtonSize : (item.iconSize ? item.iconSize : 24)"
:name="elIconPath(index)"
img-mode="scaleToFill"
:color="elColor(index)"
:custom-prefix="item.customIcon ? 'custom-icon' : 'uicon'"
:imgradius="item.iconType == 'custom' ? '50%' : '0'"
></u-icon>
<u-badge :count="item.count"
:is-dot="item.isDot"
v-if="item.count"
:offset="[-2, getOffsetRight(item.count, item.isDot)]"
></u-badge>
<view
:class="[midButton && item.midButton ? 'u-tabbar__content__circle__button' : 'u-tabbar__content__item__button']"
:style="{
top: item.text ? '7px' : '7px',
}"
>
<u-icon :size="midButton && item.midButton ? midButtonSize : item.iconSize ? item.iconSize : 24" :name="elIconPath(index)" img-mode="scaleToFill" :color="elColor(index)" :imgType="imgType" :custom-prefix="item.customIcon ? 'custom-icon' : 'uicon'" :imgradius="item.iconType == 'custom' ? '50%' : '0'"></u-icon>
<u-badge :count="item.count" :is-dot="item.isDot" v-if="item.count" :offset="[-2, getOffsetRight(item.count, item.isDot)]"></u-badge>
</view>
<view
class="u-tabbar__content__item__text"
@ -83,6 +74,10 @@ export default {
type: [String, Number],
default: 0,
},
imgType: {
type: [String],
default: '',
},
modelValue: {
type: [String, Number],
default: 0,
@ -357,7 +352,7 @@ export default {
flex: 1;
justify-content: center;
height: 100%;
padding: 0 0 6px 0;
padding: 0;
@include vue-flex;
flex-direction: column;
align-items: center;
@ -411,8 +406,9 @@ export default {
}
}
}
.mround{
image,img{
.mround {
image,
img {
border-radius: 50%;
}
}

Loading…
Cancel
Save