关注时加入团队

cyl/master-0804
wangxia 3 months ago
parent 8810a1f29e
commit 26f293c79c

@ -7,6 +7,8 @@ let bindInfo = {
bind_recordDetail:"/assistant/circle/agency/apply/info",// 申请记录当前行记录详情
bind_recordSubmit:"/assistant/circle/agency/apply/agree",// 通过申请提交事件
bind_enterpriseDetail:"/assistant/circle/agency/detail",// 企业详情
bind_getAgencyByAdminTel:"/yishoudan/agency/getAgencyByAdminTel",// 根据团队创建人手机号获取团队信息
bind_getWaitNum:"/assistant/circle/agency/countPending",// 获取统计处理中的数量
bind_getApplyNum:"/assistant/circle/agency/countHasNotReadNum",// 获取通过未读的关注数
bind_isSee:"/assistant/circle/agency/himSee",// 让不让他看

@ -74,6 +74,8 @@ export function createApp () {
uni.setStorageSync("SHOW_INVITE", 1);
resolve(res)
});
} else {
resolve(res)
}
},
@ -94,7 +96,7 @@ export function createApp () {
uni.setStorageSync('apply-userinfo-copy', JSON.stringify(res));
uni.setStorageSync("apply-agencyId", res.user.agencyId); // 单独存储 -- 代理id方便获取
uni.setStorageSync("apply-supplierAccount", res.supplierAccount); // 单独存储 -- 是否是发单号,方便获取 0.不是发单号 1.是发单号
if (res.agencyStatus == 1) {
if (res.agencyStatus == 1) {
G.Get(apiInfo.login_agencyInfo, {}, (aRes) => {
uni.setStorageSync("agencyInfo", aRes.agency); // 1是创建者 2是普通成员
uni.setStorageSync("IS_CREATOR", aRes.agency.userId == res.user.id || res.admin == true ? 1 : 2); // 1是创建者 2是普通成员
@ -103,6 +105,8 @@ export function createApp () {
uni.setStorageSync("SHOW_INVITE", 1);
resolve(res)
});
} else {
resolve(res)
}
})
})

@ -330,18 +330,20 @@ export default {
that.isCreator = uni.getStorageSync("IS_CREATOR") == 1 ? true : false;
that.agencyInfo = uni.getStorageSync("agencyInfo");
if (uni.getStorageSync("apply-token")) {
that.setUserInfo();
// that.userInfo = uni.getStorageSync("apply-userinfo");
that.isLogin = uni.getStorageSync("apply-token") ? true : false;
if (that.isLogin) {
that.isLogin = true;
console.log(56456567675);
this.G.checkToken().then(() => {
console.log(123123123123123);
that.setUserInfo();
this.getAuthInfo();
this.getData();
this.getNum();
if(uni.getStorageSync("apply-userinfo").agencyStatus == 1){
this.getCompanyInfo();
if (uni.getStorageSync("apply-userinfo").agencyStatus == 1) {
this.getCompanyInfo();
}
});
}
}
// that.userInfo = uni.getStorageSync("apply-userinfo");
} else {
that.waitNum_ups = 0;
that.pageSpeed = 1;
@ -674,67 +676,67 @@ export default {
console.log("res", res);
if (res) {
that.map = res;
let resdata = res.classify1num;
that.todayDataList = [
{
name: "报名",
num: resdata.signUps || 0,
path: "/root/person/todayData",
},
{
name: "到面",
num: resdata.arrived || 0,
path: "/root/person/todayData",
},
{
name: "通过",
num: resdata.passed || 0,
path: "/root/person/todayData",
},
{
name: "入职",
num: resdata.entry || 0,
path: "/root/person/todayData",
},
{
name: "在职",
num: resdata.obJob || 0,
path: "/root/person/todayData",
},
];
that.billDataList = [
{
name: "审核中",
num: that.map.classify1num.num10 || 0,
type: 1,
path: "/root/person/applyIndex?status=1",
},
{
name: "待接待",
num: that.map.classify1num.num20 || 0,
type: 2,
path: "/root/person/applyIndex?status=2",
},
{
name: "待面试",
num: that.map.classify1num.num25 || 0,
type: 3,
path: "/root/person/applyIndex?status=3",
},
{
name: "待入职",
num: that.map.classify1num.num30 || 0,
type: 4,
path: "/root/person/applyIndex?status=4",
},
{
name: "在职中",
num: that.map.classify1num.num40 || 0,
type: 5,
path: "/root/person/applyIndex?status=5",
},
];
}
let resdata = res.classify1num;
that.todayDataList = [
{
name: "报名",
num: resdata.signUps || 0,
path: "/root/person/todayData",
},
{
name: "到面",
num: resdata.arrived || 0,
path: "/root/person/todayData",
},
{
name: "通过",
num: resdata.passed || 0,
path: "/root/person/todayData",
},
{
name: "入职",
num: resdata.entry || 0,
path: "/root/person/todayData",
},
{
name: "在职",
num: resdata.obJob || 0,
path: "/root/person/todayData",
},
];
that.billDataList = [
{
name: "审核中",
num: that.map.classify1num.num10 || 0,
type: 1,
path: "/root/person/applyIndex?status=1",
},
{
name: "待接待",
num: that.map.classify1num.num20 || 0,
type: 2,
path: "/root/person/applyIndex?status=2",
},
{
name: "待面试",
num: that.map.classify1num.num25 || 0,
type: 3,
path: "/root/person/applyIndex?status=3",
},
{
name: "待入职",
num: that.map.classify1num.num30 || 0,
type: 4,
path: "/root/person/applyIndex?status=4",
},
{
name: "在职中",
num: that.map.classify1num.num40 || 0,
type: 5,
path: "/root/person/applyIndex?status=5",
},
];
}
);
},

@ -1,37 +1,22 @@
<template>
<div class="p-root-detail-user g_w_all g_bg_page g_kuaishou">
<u-navbar backIconColor="#333"
:borderBottom="false"
:immersive="true"
:customBack="goHome"
:background="background"
:backIconName="fromShare ? 'home' : 'arrow-left'"
></u-navbar>
<view
class="scroll-container"
@touchstart="onTouchStart"
@touchmove="onTouchMove"
@touchend="onTouchEnd"
>
<view class="background-container"
style="width: 100%;overflow: hidden;"
>
<view class="u-navbar-fixed"
:style="{
'background-image': 'url(https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/mbg.jpg)',
'background-size': '100% 100%',
'width':'calc(100vw + ' + backgroundScale + 'px)',
'height': 'calc(' + (100/1.78).toFixed(2) + 'vw + ' + backgroundScale + 'px)',
'zoom': (1 + backgroundScale * 0.018)
}"
>
</view>
</view>
<div class="con-obj" style="background-color: #caf1e0 !important"
>
<view class="m-info g_p_20 g_pt_12 g_pb_0 g_bg_f g_position_rela" hover-class="none"
style="margin-top: 0; border-radius: 8px 8px 0 0;width: calc(100% - 40px);"
<u-navbar backIconColor="#333" :borderBottom="false" :immersive="true" :customBack="goHome" :background="background" :backIconName="fromShare ? 'home' : 'arrow-left'"></u-navbar>
<view class="scroll-container" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd">
<view class="background-container" style="width: 100%; overflow: hidden">
<view
class="u-navbar-fixed"
:style="{
'background-image': 'url(https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/mbg.jpg)',
'background-size': '100% 100%',
width: 'calc(100vw + ' + backgroundScale + 'px)',
height: 'calc(' + (100 / 1.78).toFixed(2) + 'vw + ' + backgroundScale + 'px)',
zoom: 1 + backgroundScale * 0.018,
}"
>
</view>
</view>
<div class="con-obj" style="background-color: #caf1e0 !important">
<view class="m-info g_p_20 g_pt_12 g_pb_0 g_bg_f g_position_rela" hover-class="none" style="margin-top: 0; border-radius: 8px 8px 0 0; width: calc(100% - 40px)">
<view class="g_flex_row_start">
<view class="g_w_71">
<view class="g_position_abso g_p_4 g_radius_50 g_bg_f" style="top: -20px">
@ -124,7 +109,7 @@
</div>
</div>
</view>
<!-- 发布职位确认框 -->
<!-- 关注并创建团队确认框 -->
<u-modal v-model="submitConfirm" width="90%" negativeTop="150" confirmText="发布职位" :showTitle="false" :confirmStyle="{ color: '#576b95', 'font-weight': 600 }" :cancelStyle="{ color: '#000', 'font-weight': 600 }" :showConfirmButton="false">
<div class="g_fs_17 g_text_c">
<div class style="padding: 42px 24px 36px">
@ -141,6 +126,40 @@
</div>
</div>
</u-modal>
<!-- 加入别人团队确认框 -->
<u-modal v-model="joinTeamConfirm" width="90%" negativeTop="150" :showTitle="false" :confirmStyle="{ color: '#576b95', 'font-weight': 600 }" :cancelStyle="{ color: '#000', 'font-weight': 600 }" :showConfirmButton="false">
<div class="g_fs_17 g_text_c">
<div class style="padding: 42px 24px 36px">
<div class="g_text_c g_fw_600 g_c_0 g_pb_20">加入团队/企业</div>
<div class="g_flex_row_center">
<div class="g_flex_1 g_bg_f_5 g_radius_6 g_pl_12 g_pr_12">
<u-input v-model="teamInfo.tel" backgroundColor="#ededed" height="80" placeholder="搜索创建人手机号"></u-input>
</div>
<div class="g_w_90 g_ml_16">
<g-button btnText="搜索" size="auto" type="primary" class @clickBtn="searchTeamByTel"></g-button>
</div>
</div>
<div class="g_text_l g_mt_8 g_fs_14" v-if="chooseTeam.fullName">: {{ chooseTeam.fullName || chooseTeam.agencyName }}</div>
<div class="g_bg_f_5 g_radius_6 g_pl_12 g_pr_12 g_mt_12">
<u-input v-model="teamInfo.userName" backgroundColor="#ededed" height="80" placeholder="请输入您的昵称"></u-input>
</div>
</div>
<div class="g_flex_row_center flex_center g_fw_600 g_border_e_t">
<div class="g_flex_1 g_h_50 g_text_c g_c_0 g_border_e_r" hover-class="thover" @click="joinTeamConfirm = false" style="line-height: 50px">取消</div>
<div class="g_flex_1 g_h_50 g_text_c g_c_sub" hover-class="thover" @click="joinTeam" style="line-height: 50px">确定</div>
</div>
</div>
</u-modal>
<u-popup v-model="joinTeamDrawerShow" mode="bottom" z-index="999999" border-radius="12" :closeable="false" :mask-close-able="true" @close="joinTeamDrawerShow = false">
<view class="g_text_c g_bg_f_5 g_fs_17">
<view class="g_bg_f">
<view class="g_c_3">
<view v-for="item in teamList" class="g_p_16 g_border_e_t" @click="clickTeam(item)">{{ item.fullName || item.agencyName }}</view>
</view>
</view>
<view class="g_p_16 g_mt_10 g_bg_f" style="padding-bottom: calc(constant(safe-area-inset-bottom) + 16px); padding-bottom: calc(env(safe-area-inset-bottom) + 16px)" @click="joinTeamDrawerShow = false">取消</view>
</view>
</u-popup>
</div>
</template>
@ -160,14 +179,24 @@ export default {
return {
numSlot: [],
fromShare: false,
background:{
backgroundColor: 'transparent',
background: {
backgroundColor: "transparent",
},
teamInfo: {
tel: "",
userName: "",
},
userInfo: {},
chooseTeam: {},
teamList: [],
navColor: "rgb(255,255,255,0)",
isLogin: null,
isShowMore: true,
isShowJob: true,
submitConfirm: false,
joinTeamConfirm: false,
joinTeamDrawerShow: false,
pageSpeed: 0,
agencyId: 0,
loading: true,
@ -239,11 +268,11 @@ export default {
inviteUserId: 0,
refreshing: false,
mtScroll:0,
backgroundScale: 0, //
startY: 0, //
moveY: 0, //
isTouching: false, //
mtScroll: 0,
backgroundScale: 0, //
startY: 0, //
moveY: 0, //
isTouching: false, //
};
},
onPageScroll(e) {
@ -323,7 +352,7 @@ export default {
}
},
methods: {
//
//
onTouchStart(e) {
this.mtScroll = 0;
this.backgroundScale = 0;
@ -335,28 +364,32 @@ export default {
//
onTouchMove(e) {
if (!this.isTouching) return;
if (e.touches && e.touches.length > 0) {
this.moveY = e.touches[0].pageY;
const moveDistance = this.moveY - this.startY;
// moveDistance > 0
if (moveDistance > 0 && moveDistance < 200) { //
const query = uni.createSelectorQuery().in(this);
query.select('.scroll-container').boundingClientRect(data => {
if (data) {
const scrollTop = data.scrollTop || 0;
//
if (scrollTop <= 0) {
// 使
this.backgroundScale = Math.min(moveDistance * 0.2, 800); //
this.mtScroll = Math.min(moveDistance * 0.2, 800);
}
}
}).exec();
}
if (!this.isTouching) return;
if (e.touches && e.touches.length > 0) {
this.moveY = e.touches[0].pageY;
const moveDistance = this.moveY - this.startY;
// moveDistance > 0
if (moveDistance > 0 && moveDistance < 200) {
//
const query = uni.createSelectorQuery().in(this);
query
.select(".scroll-container")
.boundingClientRect((data) => {
if (data) {
const scrollTop = data.scrollTop || 0;
//
if (scrollTop <= 0) {
// 使
this.backgroundScale = Math.min(moveDistance * 0.2, 800); //
this.mtScroll = Math.min(moveDistance * 0.2, 800);
}
}
})
.exec();
}
}
},
//
@ -385,7 +418,7 @@ export default {
animate();
},
onScrollToLower() {
let that = this;
let that = this;
if (!that.isLogin) {
return false;
}
@ -393,8 +426,8 @@ export default {
that.query.page++;
that.getDefault("concat");
}
},
},
goHome() {
if (this.fromShare) {
uni.switchTab({
@ -741,17 +774,6 @@ export default {
});
},
handleSubmit() {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
//
this.submitConfirm = true;
return;
}
},
getAgencyById() {
let that = this;
return new Promise((reso, reject) => {
@ -795,10 +817,11 @@ export default {
let that = this;
this.isLogin = true;
console.log("successLogin", e);
this.loginInfo = uni.getStorageSync("apply-userinfo");
that.getAgencyInfo().then(() => {
that.getAgencyById().then(() => {
// that.query.page++;
console.log('Boolean(e.agencyId)',Boolean(e.agencyId));
console.log("Boolean(e.agencyId)", Boolean(e.agencyId));
if (Boolean(e.agencyId) == false || that.info.recordStatus == 3 || that.info.recordStatus == 4 || that.info.recordStatus == 6) {
that.handleSubmit();
} else {
@ -816,6 +839,7 @@ export default {
jobLogin() {
let that = this;
this.isLogin = true;
this.loginInfo = uni.getStorageSync("apply-userinfo");
that.getAgencyInfo().then(() => {
that.getAgencyById().then(() => {
// that.query.page++;
@ -823,6 +847,87 @@ export default {
});
});
},
handleSubmit() {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
if (that.loginInfo.agencyId) {
that.submitConfirm = true;
} else {
that.G.handleConfirm({
cancelText: "创建团队",
confirmText: "加入团队",
content: "请确认公司是否已创建团队,如果有可直接加入,如果没有可创建。",
success: (res) => {
if (res.confirm) {
this.joinTeamConfirm = true;
} else {
this.submitConfirm = true;
}
},
});
}
}
},
searchTeamByTel() {
let that = this;
if (!that.teamInfo.tel || !that.G.setReg(that.teamInfo.tel, "tel")) {
uni.showToast({
title: "请输入正确的手机号",
icon: "none",
});
return;
}
that.G.Get(that.api.bind_getAgencyByAdminTel, { tel: that.teamInfo.tel }, (res) => {
that.teamList = res;
that.joinTeamDrawerShow = true;
console.log(res);
});
},
clickTeam(_item) {
let that = this;
that.chooseTeam = _item;
that.joinTeamDrawerShow = false;
},
joinTeam() {
let that = this;
console.log("that.chooseTeam", that.chooseTeam);
if (!that.chooseTeam.agencyId) {
uni.showToast({
title: "请选择一个团队",
icon: "none",
});
return;
}
if (!that.teamInfo.userName) {
uni.showToast({
title: "请输入您的昵称",
icon: "none",
});
return;
}
this.G.Post(this.api.order_addApply, { agencyId: that.chooseTeam.agencyId, username: this.teamInfo.userName }, (res) => {
uni.showToast({
title: "申请成功",
icon: "none",
});
this.joinTeamConfirm = false;
that.G.handleConfirm({
confirmText: "确认",
showCancel: false,
content: "您已发起申请,审核通过即可加入该团队",
success: (res) => {
if (res.confirm) {
uni.switchTab({
url: "/pages/home/index",
});
}
},
});
console.log(res);
});
},
handleUpdateTab() {},
},
};
@ -845,6 +950,6 @@ export default {
}
}
.scroll-area {
height: 100vh;
height: 100vh;
}
</style>

@ -50,14 +50,14 @@
</div>
<div class="g_h_40"></div>
</div>
<g-panel-fixed v-if="false">
<g-panel-fixed >
<div class="g_flex_row_center">
<div class="g_w_200 g_mr_20">
<g-button btnText="手动添加" size="auto" @clickBtn="goPage('/root/person/addOrUpdataMember')"></g-button>
</div>
<!-- <div class="g_w_128">
<div class="g_w_128">
<g-button btnText="微信邀请" size="auto" type="primary" class @clickBtn="goPage('/root/person/memberApplyQRCode')"></g-button>
</div> -->
</div>
</div>
</g-panel-fixed>
<!-- <div class="g_h_24"></div> -->

Loading…
Cancel
Save