Merge branch 'cyl/master-0804'
commit
5c53ec1f9f
@ -0,0 +1,17 @@
|
||||
let bindInfo = {
|
||||
chat_create:"/yishoudan/common/user/job/match/getTalk",// 创建会话
|
||||
chat_send:"/yishoudan/common/user/job/match/doTalk",// 处理会话
|
||||
chat_ai_job:"/yishoudan/store/job/getShareJobs",// gpt返回的职位列表
|
||||
chat_daotian_job:"/yishoudan/store/job/platform/list",// 稻田职位列表
|
||||
job_detail_daotian:"/yishoudan/store/job/platform/detail",// 稻田职位详情
|
||||
chat_config:'/yishoudan/common/user/job/match/getBotInfo',// 获取机器人配置
|
||||
ai_config:'/robot/config/getRobotList',// 获取机器人列表
|
||||
|
||||
|
||||
chat_getConversationld:'/chat/message/getConversationId',// 获取会话id
|
||||
chat_getHistory:'/chat/message/getPageList',// 获取历史记录
|
||||
chat_addHistory:'/chat/message/addChatMessage',// 新增聊天记录
|
||||
chat_delMsg:'/chat/message/deleteMessage',// 删除聊天记录
|
||||
}
|
||||
|
||||
export default bindInfo;
|
||||
File diff suppressed because it is too large
Load Diff
@ -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>
|
||||
@ -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>
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,205 @@
|
||||
<template>
|
||||
<view class="g-components-chat-markdown g_fs_17">
|
||||
<div class="g-tip-title g_flex_row_between"
|
||||
style="background-color: #d6e9ff;
|
||||
padding: 10px 10px 22px 10px;
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius: 8px;
|
||||
position: relative;
|
||||
bottom: -16px;
|
||||
margin-top: -16px;
|
||||
"
|
||||
@click="handleMore"
|
||||
>
|
||||
<div class="g_flex_row_between g_w_all">
|
||||
<div class="g_flex_1 g_ell_1" style="font-size: 18px;color: #576b95;font-weight: 600;">
|
||||
智能匹配方案推荐
|
||||
</div>
|
||||
<div class="g_flex_none g_ml_12 g_flex_column_center">
|
||||
<i class="iconfont icon-gengduo11" style="color: #666666;"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="g_mt_2" style="font-size: 14px;color: #888888;">
|
||||
更多信息可点击卡片查看详情。
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="cusList && cusList.length > 0">
|
||||
<div class="item" v-for="(item,index) in cusList" :key="index">
|
||||
<view class="itema g_position_rela g_bg_f"
|
||||
@click="handleCard(item, index)"
|
||||
:class="isbor == 1 ? '' : 'bor8'"
|
||||
>
|
||||
<view class="g_pt_10 g_pb_10 g_border_e_b issa" style="width: calc(100% - 20px);margin: 0 auto;position: relative;">
|
||||
<i class="iconfont icon-yitingzhao" v-if="item.recruitment == 2"
|
||||
style="position: absolute; right: 30px; top: 50%; transform: translateY(-50%);color: #ff4d4f;font-size: 80px;z-index: 1;"
|
||||
></i>
|
||||
<!-- 基础信息 -->
|
||||
<view class="m-top g_flex_row_between">
|
||||
<view class="g_flex_1 g_flex_column_between">
|
||||
<view class="g_flex_1 g_flex_row_between g_lh_1">
|
||||
<view class="g_flex_none g_flex_row_start flex_center">
|
||||
<img class="g_w_32 g_h_16 g_mr_4" v-if="item.picked == 1" src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/bocaigongyinglian/zhen.svg" alt="" />
|
||||
<view class="g_ell_1 g_fs_18 g_fw_600" style="color: rgba(0, 0, 0, 0.85); max-width: 500rpx; line-height: 1.3">{{ item.jobName }}</view>
|
||||
</view>
|
||||
<view class="g_fs_14 g_flex_row_end" style="color: rgba(0, 0, 0, 0.45)">
|
||||
<view>{{ timeShowXXX(item.updateTime) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="g_flex_none g_flex_row_between g_mt_2">
|
||||
<view class="g_flex_none g_flex_row_start g_fs_14" style="color: rgba(0, 0, 0, 0.45)">
|
||||
<view class="g_ell_1" style="max-width: 136px; margin-right: 2px"> {{ item.district }}{{ item.district ? "丨" : "" }} </view>
|
||||
{{ item.gender + "丨" + item.age }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 标签 -->
|
||||
<view class="m-bottom g_flex_row_between g_mt_2">
|
||||
<view class="g_flex_1 g_flex_row_between flex_center">
|
||||
<view class="g_flex_1 g_flex_row_between">
|
||||
<view class="g_flex_row_start_none g_flex_1" style="max-width: 75%; flex-wrap: wrap; height: 22px; overflow: hidden"
|
||||
v-if="item.jobSpecialLabelNames"
|
||||
>
|
||||
<view class="label_btn" v-for="(itm, inx) in item.jobSpecialLabelNames.split(',')" :key="inx">{{ itm }}</view>
|
||||
<view class="label_btn" v-if="item.jobSpecialLabelNameArray && item.jobSpecialLabelNameArray.length == 0"> 暂无特色 </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 费用 -->
|
||||
<view class="g_mt_2">
|
||||
<view class="g_flex_row_between flex_center g_fs_22 g_c_f40 g_fw_600">
|
||||
<rich-text class="g_lh_1" :nodes="item.cus_price" v-if="item.cus_price != '月薪'"></rich-text>
|
||||
<view v-else>{{ (item.minMonthlyPay / 100) + '-' + (item.maxMonthlyPay / 100) }}<span class="g_fs_14"> 元/月 </span> </view>
|
||||
<view class="g_flex_row_start g_fs_12 g_pr_4 g_h_20 g_fw_400" style="background: linear-gradient(138deg, #fde0ad 22%, #fac474); border-radius: 2px; color: #754300; line-height: 20px">
|
||||
<view class>
|
||||
<image class="g_mr_4" style="width: 20px; height: 20px; display: block" src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/fee.svg" mode="aspecFill" lazy-load="false"></image>
|
||||
</view>
|
||||
<view class="g_fs_13" v-if="userinfo.agencyStatus == 1">{{ item.fuWuFei || "详询客服" }}</view>
|
||||
<view class="biggerSize2 g_fs_13" v-else>{{ "仅代理可见" }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="g_border_e_t g_p_8 g_flex_row_between flex_center" v-if="userinfo.corpUserFlag && false">
|
||||
<view class="g_c_6 g_fs_12 g_pr_4 g_radius_4 g_flex_row_start flex_center" style="background: #f1faff">
|
||||
<img class="g_w_33 g_h_22 g_mr_4" src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/bocaigongyinglian/xmf.svg" alt="" />
|
||||
{{ item.supplierName || "-" }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="g_p_10 g_bg_f g_flex_c g_mt_12"
|
||||
style="border-radius: 12px;padding: 24px 10px;"
|
||||
:style="{
|
||||
'border-radius': isbor == 1 ? '0' : '12px'
|
||||
}"
|
||||
>
|
||||
<u-empty
|
||||
text="暂无更多职位"
|
||||
:src="cdnBaseImg + 'noData.svg'"
|
||||
>
|
||||
</u-empty>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
cdnBaseImg:this.G.store().cdnBaseImg,
|
||||
userinfo: uni.getStorageSync("apply-userinfo"),
|
||||
}
|
||||
},
|
||||
props: {
|
||||
cusList: {
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
isbor: {
|
||||
default: () => {
|
||||
return 0;
|
||||
},
|
||||
},
|
||||
},
|
||||
onHide(){
|
||||
uni.removeStorageSync('test_file')
|
||||
},
|
||||
onUnload() {
|
||||
uni.removeStorageSync('test_file')
|
||||
},
|
||||
methods:{
|
||||
handleMore(){
|
||||
this.$emit('exportMore')
|
||||
},
|
||||
handleCard($item) {
|
||||
uni.navigateTo({
|
||||
url: "/root/detail/work?id=" + $item.id,
|
||||
});
|
||||
},
|
||||
timeShowXXX(updateTime) {
|
||||
const now = Date.now();
|
||||
const diff = now - updateTime;
|
||||
|
||||
const seconds = Math.floor(diff / 1000);
|
||||
const minutes = Math.floor(seconds / 60);
|
||||
const hours = Math.floor(minutes / 60);
|
||||
const days = Math.floor(hours / 24);
|
||||
|
||||
if (days < 2) {
|
||||
if (hours > 0) {
|
||||
return `${hours}小时前`;
|
||||
} else if (minutes > 0) {
|
||||
return `${minutes}分钟前`;
|
||||
} else {
|
||||
return `刚刚`;
|
||||
}
|
||||
} else {
|
||||
return `${days}天前`;
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.g-components-chat-markdown{
|
||||
.label_btn {
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
box-sizing: border-box;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #666;
|
||||
background: #f1faff;
|
||||
border-radius: 2px;
|
||||
padding: 0 4px 0px;
|
||||
line-height: 20px;
|
||||
margin-right: 6px;
|
||||
margin-bottom: 0px;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
.item{
|
||||
&:nth-child(1){
|
||||
.itema{
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius: 8px;
|
||||
}
|
||||
}
|
||||
&:last-child{
|
||||
.issa{
|
||||
border-bottom: none;
|
||||
}
|
||||
.bor8{
|
||||
border-bottom-left-radius: 8px !important;
|
||||
border-bottom-right-radius: 8px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<view class="g-components-chat-message g_fs_17 g_flex_row_start" >
|
||||
<div class="g_flex_column_center">
|
||||
{{displayedMessage}}
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
cusMessage: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return '';
|
||||
},
|
||||
},
|
||||
isRender:{
|
||||
default: () => {
|
||||
return 0;
|
||||
},
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
isShow:0,
|
||||
displayedMessage: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cusMessage: {
|
||||
handler(newVal) {
|
||||
console.log('newVal',newVal)
|
||||
const hasDot = newVal.endsWith('。');
|
||||
const messageWithoutDot = hasDot ? newVal.slice(0, -1) : newVal;
|
||||
this.displayedMessage = messageWithoutDot;
|
||||
if (this.isShow) {
|
||||
this.displayedMessage = messageWithoutDot + '...';
|
||||
} else {
|
||||
this.displayedMessage = hasDot ? messageWithoutDot + '。' : messageWithoutDot;
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
'isRender': {
|
||||
handler(newVal) {
|
||||
this.isShow = newVal;
|
||||
const hasDot = this.cusMessage.endsWith('。');
|
||||
const messageWithoutDot = hasDot ? this.cusMessage.slice(0, -1) : this.cusMessage;
|
||||
this.displayedMessage = this.isShow ? messageWithoutDot + '...' : (hasDot ? messageWithoutDot + '。' : messageWithoutDot);
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.isShow = this.isRender;
|
||||
},
|
||||
methods:{
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@ -0,0 +1,95 @@
|
||||
let ajaxUrl = "https://api.coze.cn/";
|
||||
|
||||
let requestTask;
|
||||
let data = {
|
||||
ajaxUrl: ajaxUrl,
|
||||
startAbort ($bool = 0) {
|
||||
if ($bool == 1) {
|
||||
requestTask.abort();
|
||||
}
|
||||
},
|
||||
coziGet ($url = '', $parmas = {}, callback = () => { }, failback = () => { }) {
|
||||
let that = this,
|
||||
params = {};
|
||||
let promise = new Promise((resolve, reject) => {
|
||||
params = $parmas;
|
||||
resolve();
|
||||
});
|
||||
promise.then(() => {
|
||||
that.postData($url, params, callback, failback, 'GET');
|
||||
}).catch();
|
||||
},
|
||||
coziPost ($url = '', $parmas = {}, callback = () => { }, failback = () => { }) {
|
||||
let that = this,
|
||||
params = {};
|
||||
let promise = new Promise((resolve, reject) => {
|
||||
params = $parmas;
|
||||
resolve();
|
||||
});
|
||||
promise.then(() => {
|
||||
that.postData($url, params, callback, failback, 'POST');
|
||||
}).catch();
|
||||
},
|
||||
|
||||
// 发送请求
|
||||
postData ($url = '', $parmas = {}, callback = () => { }, failback = () => { }, $method) {
|
||||
let that = this,
|
||||
$header = {};
|
||||
if ($parmas == '') {
|
||||
$parmas = {};
|
||||
}
|
||||
if(uni.getStorageSync("cozi_token")){
|
||||
$header['Authorization'] = 'Bearer ' + uni.getStorageSync("cozi_token");
|
||||
}
|
||||
|
||||
// 检查网络信息, 避免网络引起的错误码
|
||||
uni.getNetworkType({
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.networkType != 'none') {
|
||||
requestTask = uni.request({
|
||||
url: ajaxUrl + $url,
|
||||
data: $parmas,
|
||||
header: $header,
|
||||
method: $method,
|
||||
success: (res) => {
|
||||
console.log('res before', res);
|
||||
let resData = res.data;
|
||||
console.log('res after', resData);
|
||||
if($parmas.stream){
|
||||
callback(resData);
|
||||
}else{
|
||||
if (resData.code == 0) {// 正常
|
||||
callback(resData.data, resData.msg);
|
||||
} else {// 其他异常
|
||||
failback(resData.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail (error) {
|
||||
console.log('请求失败', error);
|
||||
if (error.errMsg == 'request:fail abort' || error.errMsg == 'request:fail timeout') {
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: error.errMsg,
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
failback(error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '网络异常,请检查网络',
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
export default data;
|
||||
File diff suppressed because one or more lines are too long
@ -1,22 +1,14 @@
|
||||
// 引入公共基础类
|
||||
@import "./libs/css/color.scss";
|
||||
|
||||
|
||||
// 非nvue的样式
|
||||
/* #ifndef APP-NVUE */
|
||||
@import "./libs/css/style.vue.scss";
|
||||
/* #endif */
|
||||
|
||||
// nvue的特有样式
|
||||
/* #ifdef APP-NVUE */
|
||||
@import "./libs/css/style.nvue.scss";
|
||||
/* #endif */
|
||||
|
||||
|
||||
// 小程序特有的样式
|
||||
/* #ifdef MP */
|
||||
@import "./libs/css/style.mp.scss";
|
||||
/* #endif */
|
||||
|
||||
// H5特有的样式
|
||||
/* #ifdef H5 */
|
||||
@import "./libs/css/style.h5.scss";
|
||||
/* #endif */
|
||||
@ -1 +0,0 @@
|
||||
[]
|
||||
@ -1 +0,0 @@
|
||||
[]
|
||||
@ -1 +0,0 @@
|
||||
[]
|
||||
@ -1,155 +0,0 @@
|
||||
.u-type-primary-light {
|
||||
color: $u-type-primary-light;
|
||||
}
|
||||
|
||||
.u-type-warning-light {
|
||||
color: $u-type-warning-light;
|
||||
}
|
||||
|
||||
.u-type-success-light {
|
||||
color: $u-type-success-light;
|
||||
}
|
||||
|
||||
.u-type-error-light {
|
||||
color: $u-type-error-light;
|
||||
}
|
||||
|
||||
.u-type-info-light {
|
||||
color: $u-type-info-light;
|
||||
}
|
||||
|
||||
.u-type-primary-light-bg {
|
||||
background-color: $u-type-primary-light;
|
||||
}
|
||||
|
||||
.u-type-warning-light-bg {
|
||||
background-color: $u-type-warning-light;
|
||||
}
|
||||
|
||||
.u-type-success-light-bg {
|
||||
background-color: $u-type-success-light;
|
||||
}
|
||||
|
||||
.u-type-error-light-bg {
|
||||
background-color: $u-type-error-light;
|
||||
}
|
||||
|
||||
.u-type-info-light-bg {
|
||||
background-color: $u-type-info-light;
|
||||
}
|
||||
|
||||
.u-type-primary-dark {
|
||||
color: $u-type-primary-dark;
|
||||
}
|
||||
|
||||
.u-type-warning-dark {
|
||||
color: $u-type-warning-dark;
|
||||
}
|
||||
|
||||
.u-type-success-dark {
|
||||
color: $u-type-success-dark;
|
||||
}
|
||||
|
||||
.u-type-error-dark {
|
||||
color: $u-type-error-dark;
|
||||
}
|
||||
|
||||
.u-type-info-dark {
|
||||
color: $u-type-info-dark;
|
||||
}
|
||||
|
||||
.u-type-primary-dark-bg {
|
||||
background-color: $u-type-primary-dark;
|
||||
}
|
||||
|
||||
.u-type-warning-dark-bg {
|
||||
background-color: $u-type-warning-dark;
|
||||
}
|
||||
|
||||
.u-type-success-dark-bg {
|
||||
background-color: $u-type-success-dark;
|
||||
}
|
||||
|
||||
.u-type-error-dark-bg {
|
||||
background-color: $u-type-error-dark;
|
||||
}
|
||||
|
||||
.u-type-info-dark-bg {
|
||||
background-color: $u-type-info-dark;
|
||||
}
|
||||
|
||||
.u-type-primary-disabled {
|
||||
color: $u-type-primary-disabled;
|
||||
}
|
||||
|
||||
.u-type-warning-disabled {
|
||||
color: $u-type-warning-disabled;
|
||||
}
|
||||
|
||||
.u-type-success-disabled {
|
||||
color: $u-type-success-disabled;
|
||||
}
|
||||
|
||||
.u-type-error-disabled {
|
||||
color: $u-type-error-disabled;
|
||||
}
|
||||
|
||||
.u-type-info-disabled {
|
||||
color: $u-type-info-disabled;
|
||||
}
|
||||
|
||||
.u-type-primary {
|
||||
color: $u-type-primary;
|
||||
}
|
||||
|
||||
.u-type-warning {
|
||||
color: $u-type-warning;
|
||||
}
|
||||
|
||||
.u-type-success {
|
||||
color: $u-type-success;
|
||||
}
|
||||
|
||||
.u-type-error {
|
||||
color: $u-type-error;
|
||||
}
|
||||
|
||||
.u-type-info {
|
||||
color: $u-type-info;
|
||||
}
|
||||
|
||||
.u-type-primary-bg {
|
||||
background-color: $u-type-primary;
|
||||
}
|
||||
|
||||
.u-type-warning-bg {
|
||||
background-color: $u-type-warning;
|
||||
}
|
||||
|
||||
.u-type-success-bg {
|
||||
background-color: $u-type-success;
|
||||
}
|
||||
|
||||
.u-type-error-bg {
|
||||
background-color: $u-type-error;
|
||||
}
|
||||
|
||||
.u-type-info-bg {
|
||||
background-color: $u-type-info;
|
||||
}
|
||||
|
||||
.u-main-color {
|
||||
color: $u-main-color;
|
||||
}
|
||||
|
||||
.u-content-color {
|
||||
color: $u-content-color;
|
||||
}
|
||||
|
||||
.u-tips-color {
|
||||
color: $u-tips-color;
|
||||
}
|
||||
|
||||
.u-light-color {
|
||||
color: $u-light-color;
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
import {
|
||||
defineConfig
|
||||
} from 'vite';
|
||||
import uni from '@dcloudio/vite-plugin-uni';
|
||||
import {
|
||||
visualizer
|
||||
} from "rollup-plugin-visualizer";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
uni(),
|
||||
|
||||
visualizer({
|
||||
emitFile: true,
|
||||
filename: "111stats.html",
|
||||
})
|
||||
],
|
||||
});
|
||||
Loading…
Reference in New Issue