|
|
|
|
@ -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 (!this.isTouching) return;
|
|
|
|
|
|
|
|
|
|
if (e.touches && e.touches.length > 0) {
|
|
|
|
|
this.moveY = e.touches[0].pageY;
|
|
|
|
|
const moveDistance = this.moveY - this.startY;
|
|
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
// 只有向下移动(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,7 +426,7 @@ export default {
|
|
|
|
|
that.query.page++;
|
|
|
|
|
that.getDefault("concat");
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
goHome() {
|
|
|
|
|
if (this.fromShare) {
|
|
|
|
|
@ -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>
|
|
|
|
|
|