cyl/master-im
wangxia 5 months ago
parent 75e91a9dde
commit cd4b0c7a9c

@ -106,20 +106,6 @@ export default {
uni.$emit("isGlogin", { uni.$emit("isGlogin", {
uid: $data.user.id, uid: $data.user.id,
}); });
that.G.Get(
that.api.user_checkPermission,
{},
(res) => {
console.log(res);
uni.setStorageSync("HAS_PERMISSION", 1); // 1. 2.
},
(err) => {
console.log(err);
if (err) {
uni.setStorageSync("HAS_PERMISSION", 2);
}
}
);
uni.removeStorageSync("TEMPORARY_CODE"); uni.removeStorageSync("TEMPORARY_CODE");
that.$emit("successLogin", $data); that.$emit("successLogin", $data);
}, },

@ -124,7 +124,8 @@
{ {
"path": "pwdForget", "path": "pwdForget",
"style": { "style": {
"navigationBarTitleText": "找回密码" "navigationBarTitleText": "邀请关注"
// "navigationBarTitleText": "找回密码"
} }
}, },
{ {
@ -172,6 +173,15 @@
"backgroundColorBottom": "#000000" "backgroundColorBottom": "#000000"
} }
}, },
{
"path": "agencyAvatar",
"style": {
"navigationBarTitleText": " ",
"backgroundColor": "#000000",
"backgroundColorTop": "#000000",
"backgroundColorBottom": "#000000"
}
},
{ {
"path": "message", "path": "message",
"style": { "style": {

@ -93,9 +93,7 @@
@clickItem="handleClickItem" @clickItem="handleClickItem"
/> />
</view> </view>
<view class="g_mt_10">
<g-panel-form-item :list="[{ icon: 'icon-fankuiyujianyi', label: '反馈与建议', result: '', path: '/root/person/feedback', tip: 'message', pRow: 12 }]" @clickItem="handleClickItem" />
</view>
<view class="g_mt_24"> <view class="g_mt_24">
<g-panel-form-item <g-panel-form-item

@ -1,132 +1,132 @@
<template> <template>
<view class="p-person-avatar g_flex_column_center g_w_all g_h_all g_bg_0 g_kuaishou"> <view class="p-person-avatar g_flex_column_center g_w_all g_h_all g_bg_0 g_kuaishou">
<view> <view>
<view <view
:style="{ :style="{
width: size.width + 'px', width: size.width + 'px',
height: size.width + 'px', height: size.width + 'px',
}" }"
style="overflow: hidden" style="overflow: hidden"
class="g_flex_c" class="g_flex_c"
> >
<img <img
:src="avatar" :src="avatar"
:style="{ :style="{
width: size.width + 'px', width: size.width + 'px',
height: size.width + 'px', height: size.width + 'px',
}" }"
/> />
</view> </view>
<view class="g_flex_row_center g_mt_30"> <view class="g_flex_row_center g_mt_30">
<view v-if="!isEdit" class="g_flex_row_center"> <view v-if="!isEdit" class="g_flex_row_center">
<!-- || MP-WEIXIN --> <!-- || MP-WEIXIN -->
<!-- #ifdef APP-PLUS || H5 || MP-TOUTIAO || MP-KUAISHOU --> <!-- #ifdef APP-PLUS || H5 || MP-TOUTIAO || MP-KUAISHOU -->
<button aria-role="button" class="g_w_110 g_h_32 g_flex_c g_radius_17 g_c_f" style="border: 1px solid #fff; background-color: transparent; font-size: 14px" @click="handleOpenAvatar"></button> <button aria-role="button" class="g_w_110 g_h_32 g_flex_c g_radius_17 g_c_f" style="border: 1px solid #fff; background-color: transparent; font-size: 14px" @click="handleOpenAvatar"></button>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<!-- <button open-type="chooseAvatar" @chooseavatar="handleStartChangeAvatar" aria-role="button" class="g_w_110 g_h_32 g_flex_c g_radius_17 g_c_f" style="border: 1px solid #fff; background-color: transparent; font-size: 14px">更换图片</button> --> <!-- <button open-type="chooseAvatar" @chooseavatar="handleStartChangeAvatar" aria-role="button" class="g_w_110 g_h_32 g_flex_c g_radius_17 g_c_f" style="border: 1px solid #fff; background-color: transparent; font-size: 14px">更换图片</button> -->
<button @click="handleOpenAvatar" aria-role="button" class="g_w_110 g_h_32 g_flex_c g_radius_17 g_c_f" style="border: 1px solid #fff; background-color: transparent; font-size: 14px">更换图片</button> <button @click="handleOpenAvatar" aria-role="button" class="g_w_110 g_h_32 g_flex_c g_radius_17 g_c_f" style="border: 1px solid #fff; background-color: transparent; font-size: 14px">更换图片</button>
<!-- #endif --> <!-- #endif -->
</view> </view>
<view v-if="isEdit" class="g_flex_row_center"> <view v-if="isEdit" class="g_flex_row_center">
<view class="g_w_110 g_h_32 g_flex_c g_radius_17 g_c_f g_mr_16" style="border: 1px solid #fff" @click="handleCancel"></view> <view class="g_w_110 g_h_32 g_flex_c g_radius_17 g_c_f g_mr_16" style="border: 1px solid #fff" @click="handleCancel"></view>
<view class="g_w_112 g_h_34 g_flex_c g_radius_17 g_c_f g_bg_f40" style="border: 2px solid #ff4400" @click="handleConfirm"></view> <view class="g_w_112 g_h_34 g_flex_c g_radius_17 g_c_f g_bg_f40" style="border: 2px solid #ff4400" @click="handleConfirm"></view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
onReady() { onReady() {
uni.setNavigationBarColor({ uni.setNavigationBarColor({
backgroundColor: "#000000", backgroundColor: "#000000",
frontColor: "#ffffff", frontColor: "#ffffff",
}); });
}, },
onLoad(options) { onLoad(options) {
let that = this; let that = this;
console.log("options", options); console.log("options", options);
this.info = options; this.info = options;
this.avatar = options.value; this.avatar = options.value;
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: `修改${options.label}`, title: `修改${options.label}`,
}); });
}, },
onShareAppMessage() { onShareAppMessage() {
return this.G.shareFun(); return this.G.shareFun();
}, },
data() { data() {
return { return {
avatar: '', avatar: "",
isEdit: false, isEdit: false,
size: { size: {
width: uni.getSystemInfoSync().windowWidth, width: uni.getSystemInfoSync().windowWidth,
height: uni.getSystemInfoSync().windowHeight, height: uni.getSystemInfoSync().windowHeight,
}, },
}; };
}, },
methods: { methods: {
handleOpenAvatar() { handleOpenAvatar() {
let that = this; let that = this;
uni.showActionSheet({ uni.showActionSheet({
itemList: ["从相册选择", "使用相机"], itemList: ["从相册选择", "使用相机"],
success: function (res) { success: function (res) {
if (res.tapIndex == 0) { if (res.tapIndex == 0) {
console.log("点击相册"); console.log("点击相册");
// //
that.setAvatar(["album"]); that.setAvatar(["album"]);
} else { } else {
console.log("点击拍照"); console.log("点击拍照");
// //
that.setAvatar(["camera"]); that.setAvatar(["camera"]);
} }
}, },
fail: function (res) {}, fail: function (res) {},
}); });
}, },
setAvatar($type) { setAvatar($type) {
let that = this; let that = this;
that.G.uploadImg( that.G.uploadImg(
(res) => { (res) => {
console.log("获取数据", res); console.log("获取数据", res);
that.avatar = res.image; that.avatar = res.image;
that.isEdit = true; that.isEdit = true;
}, },
"default", "default",
1, 1,
$type $type
); );
}, },
handleCancel() { handleCancel() {
let that = this; let that = this;
that.isEdit = false; that.isEdit = false;
// that.avatar = this.avatar; // that.avatar = this.avatar;
}, },
handleConfirm() { handleConfirm() {
let that = this; let that = this;
that.G.Put( that.G.Put(
"/yishoudan/agency/updateField", "/yishoudan/agency/updateField",
{ {
fieldName: this.info.fieldName, fieldName: this.info.fieldName,
fieldValue: that.avatar, fieldValue: that.avatar,
}, },
(res) => { (res) => {
that.isEdit = false; that.isEdit = false;
uni.showToast({ uni.showToast({
title: "修改成功", title: "修改成功",
icon: "success", icon: "success",
}); });
that.G.checkToken(); that.G.checkToken();
setTimeout(() => { setTimeout(() => {
uni.navigateBack(); uni.navigateBack();
}, 1500); }, 1500);
} }
); );
}, },
}, },
}; };
</script> </script>
<style></style> <style></style>

@ -1,15 +1,15 @@
<template> <template>
<div class="g_bg_page g_pl_10 g_pr_10"> <div class="g_bg_page g_pl_10 g_pr_10">
<div class="g_h_20"></div> <div class="g_h_20"></div>
<div class="g_mb_10 g_fs_18 g_pl_10">{{ agencyInfo.inviteUserName || "-" }}邀请您加入他的团队</div> <div class="g_mb_10 g_fs_18 g_pl_10">{{ beFllowAgencyInfo.inviteUserName || "-" }}邀请你关注他的发单号</div>
<div class="r_box g_pt_24 g_text_c g_pl_20 g_pr_20"> <div class="r_box g_pt_24 g_text_c g_pl_20 g_pr_20">
<div class="g_pb_16"> <div class="g_pb_16">
<img class="g_h_80 g_w_80 g_radius_50" :src="agencyInfo.logo || 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/APP/default.svg'" alt="" /> <img class="g_h_80 g_w_80 g_radius_50" :src="beFllowAgencyInfo.logo || 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/APP/default.svg'" alt="" />
<div class="g_fs_20 g_mt_12 g_mb_12 g_fw_600"> <div class="g_fs_20 g_mt_12 g_mb_12 g_fw_600">
{{ agencyInfo.agencyName || "-" }} {{ beFllowAgencyInfo.agencyName || "-" }}
</div> </div>
<div class="g_c_9 g_fs_14"> <div class="g_c_9 g_fs_14">
{{ agencyInfo.desp || "-" }} {{ beFllowAgencyInfo.desp || "-" }}
</div> </div>
</div> </div>
<div class="g_flex_row_between g_pb_12 g_pt_12" style="border-top: 1rpx dotted #eee"> <div class="g_flex_row_between g_pb_12 g_pt_12" style="border-top: 1rpx dotted #eee">
@ -22,79 +22,96 @@
<div class="g_mt_30"> <div class="g_mt_30">
<div class="g_fs_18 g_mb_8 g_pl_12">填写企业简称:</div> <div class="g_fs_18 g_mb_8 g_pl_12">填写企业简称:</div>
<div class="r_box g_pl_10"> <div class="r_box g_pl_10">
<u-input v-model="userInfo.userName" height="88" placeholder="区域+名称,如:上海发财劳务"></u-input> <u-input v-model="agencyInfo.fullName" :disabled="disabled" height="88" placeholder="区域+名称,如:上海发财劳务"></u-input>
</div> </div>
<div class="g_fs_12 g_c_9 g_mt_6 g_pl_12">设置后系统将自动创建团队并关注该发单号您作为创建人可在我的页面管理团队</div> <div class="g_fs_12 g_c_9 g_mt_6 g_pl_12">设置后系统将自动创建团队并关注该发单号您作为创建人可在我的页面管理团队</div>
</div> </div>
<div class="g_mt_84"> <div class="g_mt_84">
<g-button v-if="!applying && agencyInfo.agencyName" btnText="申请加入团队" type="primary" class="" @clickBtn="applyAdd"></g-button> <quickLogin @successLogin="successLogin" v-if="!agencyInfo.id">
<g-button v-else btnText="已申请" type="disabled" class=""></g-button> <g-button btnText="申请关注" type="primary" class=""></g-button>
</quickLogin>
<g-button v-else-if="isSelf" btnText="不能关注自己" type="disabled"></g-button>
<div v-else>
<g-button v-if="beFllowAgencyInfo.recordStatus == 1" btnText="已关注" type="disabled" class=""></g-button>
<g-button v-else-if="beFllowAgencyInfo.recordStatus == 2" btnText="互相关注" type="disabled" class=""></g-button>
<g-button v-else-if="(beFllowAgencyInfo.recordStatus == 3 || beFllowAgencyInfo.recordStatus == 4) && !isSelf" btnText="申请关注" type="primary" class="" @clickBtn="applyAdd"></g-button>
<g-button v-else-if="beFllowAgencyInfo.recordStatus == 5" btnText="等待通过" type="disabled" class=""></g-button>
<g-button v-else-if="beFllowAgencyInfo.recordStatus == 6 && !isSelf" btnText="申请关注" type="primary" class="" @clickBtn="applyAdd"></g-button>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import quickLogin from "../../components/quickLogin.vue";
export default { export default {
components: {
quickLogin,
},
data() { data() {
return { return {
agencyInfo: { beFllowAgencyInfo: {
agencyName: "", agencyName: "",
fullName: "", fullName: "",
}, },
info: {},
agencyInfo: {
fullName: "",
}, //
userInfo: { userInfo: {
userName: "", userName: "",
userId: "", userId: "",
}, },
numList: [ numList: [
{ label: "总职位", num: 0 }, { label: "总职位", num: "-" },
{ label: "最近更新", num: 0 }, { label: "最近更新", num: "-" },
{ label: "粉丝", num: 0 }, { label: "粉丝", num: "-" },
], ],
applying: false,
inviteUserId: "", inviteUserId: "",
uid: "", uid: "",
ing: false, ing: false,
scene: "",
isSelf: false,
disabled: false,
}; };
}, },
onLoad(options) { onLoad(options) {
let that = this;
console.log(options); console.log(options);
// options.scene = "id=3087_101125"; // options.scene = "id=3087_101125";
if (uni.getStorageSync("scene") || options.scene) { if (options.scene) {
console.log("XXXXXXXXXXXX"); console.log("XXXXXXXXXXXX");
// //
var sceneStr = uni.getStorageSync("scene") ? decodeURIComponent(uni.getStorageSync("scene")) : decodeURIComponent(options.scene); this.scene = options.scene;
var sceneStr = decodeURIComponent(options.scene);
var sceneJson = this.G.sceneToJson(sceneStr); var sceneJson = this.G.sceneToJson(sceneStr);
console.log("sceneJson===", sceneJson); console.log("sceneJson===", sceneJson);
this.inviteUserId = sceneJson.id.split("_")[1]; this.inviteUserId = sceneJson.id.split("_")[1]; //id
this.uid = sceneJson.id.split("_")[0]; this.uid = sceneJson.id.split("_")[0]; // id
// this.G.checkToken().then((info) => {
console.log("info11", info);
if (!info.msg) {
this.userInfo = uni.getStorageSync("apply-userinfo");
this.getAgencyById();
this.checkHasApply();
uni.removeStorageSync("scene");
} else {
// uni.reLaunch({
// url: `/pages/login/index?path='/root1/person/memberApplyAdd'&scene=${options.scene}`,
// });
uni.setStorageSync("scene", options.scene);
}
// });
// uni.setStorageSync("AGENCY_USER_ID", this.userId);
} }
}, },
onShow() {
that.G.Get("/checkUserLogin", {}, (res) => {
console.log("checkUserLogin", res);
if (res) {
that.getAgencyInfo().then(() => {
that.getAgencyById();
});
} else {
that.getAgencyById();
}
});
},
created() {}, created() {},
methods: { methods: {
applyAdd() { applyAdd() {
let that = this; let that = this;
if (!this.userInfo.userName) { if (!this.agencyInfo.fullName) {
uni.showToast({ uni.showToast({
title: "请输入你的姓名", title: "请输入企业简称",
icon: "none", icon: "none",
}); });
return; return;
@ -103,37 +120,67 @@ export default {
return; return;
} }
that.ing = true; that.ing = true;
this.G.Post(this.api.bind_subscribeSubmit, { agencyId: that.uid, username: this.userInfo.userName, inviteUserId: this.inviteUserId }, (res) => { let _code = 1; //
uni.showToast({ // if (this.from == "friend") {
title: "申请成功", // _code = 2; //
icon: "none", // } else {
if (this.scene) {
_code = 3; //
} else {
_code = 1; //
}
// }
return new Promise((reso) => {
this.G.Get(this.api.bind_subscribeSubmit + "/" + that.uid, { agencyId: that.agencyInfo.id, agencyName: that.agencyInfo.fullName, source: _code, remark: " " }, (res) => {
uni.showToast({
title: "申请成功",
icon: "none",
});
uni.navigateTo({
url: "/root/person/inviteFollowSuccess",
});
reso();
// that.checkHasApply();
console.log(res);
}); });
that.checkHasApply();
console.log(res);
}); });
}, },
getAgencyById() { getAgencyById() {
let that = this; let that = this;
this.G.Get(this.api.order_getAgencyByIdForApply, { agencyId: that.uid, inviteUserId: this.inviteUserId }, (res) => { this.G.Get(this.api.order_getAgencyByIdForApply, { agencyId: that.uid, inviteUserId: this.inviteUserId }, (res) => {
console.log(res); console.log("resresresresresres++++++++++++++", res);
that.agencyInfo = res; that.beFllowAgencyInfo = res;
if (res.id == that.agencyInfo.id) {
that.isSelf = true;
}
that.numList = [ that.numList = [
{ label: "总职位", num: res.jobNum }, { label: "总职位", num: res.jobNum },
{ label: "最近更新", num: res.jobUpdateNum }, { label: "最近更新", num: res.recruitmentJobNum },
{ label: "粉丝", num: res.downNum }, { label: "粉丝", num: res.downNum },
]; ];
}); });
}, },
checkHasApply() { successLogin(e) {
let that = this; let that = this;
this.G.Post(this.api.order_checkHasApply, { agencyId: that.uid, userId: this.userInfo.id }, (res) => { console.log("successLogin", e);
if (res.length > 0) { this.getAgencyInfo().then(() => {
that.applying = true; that.getAgencyById();
} else { that.applyAdd();
that.applying = false; });
} },
that.ing = false; getAgencyInfo() {
console.log(res); let that = this;
return new Promise((reso, reject) => {
that.G.Get(that.api.login_agencyInfo, {}, (aRes) => {
console.log("获取团队信息:", aRes);
that.disabled = aRes.agency.fullName ? true : false;
that.agencyInfo = { ...aRes.agency, fullName: aRes.agency.fullName ? aRes.agency.fullName : that.agencyInfo.fullName };
uni.setStorageSync("agencyInfo", aRes.agency);
setTimeout(() => {
reso();
}, 200);
});
}); });
}, },
}, },

@ -1,7 +1,7 @@
<template> <template>
<div class="g_bg_page g_pl_10 g_pr_10"> <div class="g_bg_page g_pl_10 g_pr_10">
<div class="g_h_20"></div> <div class="g_h_20"></div>
<div class="g_mb_10 g_fs_18 g_pl_10">{{ agencyInfo.userName || "-" }}邀请您加入他的团队</div> <div class="g_mb_10 g_fs_18 g_pl_10">{{ agencyInfo.inviteUserName || "-" }}邀请您加入他的团队</div>
<div class="r_box g_pt_24 g_pb_16 g_text_c"> <div class="r_box g_pt_24 g_pb_16 g_text_c">
<img class="g_h_80 g_w_80 g_radius_50" :src="agencyInfo.logo || 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/APP/default.svg'" alt="" /> <img class="g_h_80 g_w_80 g_radius_50" :src="agencyInfo.logo || 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/APP/default.svg'" alt="" />
<div class="g_fs_20 g_mt_12 g_mb_12 g_fw_600"> <div class="g_fs_20 g_mt_12 g_mb_12 g_fw_600">
@ -100,7 +100,7 @@ export default {
}, },
getAgencyById() { getAgencyById() {
let that = this; let that = this;
this.G.Get(this.api.order_getAgencyById, { agencyId: that.uid, inviteUserId: this.inviteUserId }, (res) => { this.G.Get(this.api.order_getAgencyByIdForApply, { agencyId: that.uid, inviteUserId: this.inviteUserId }, (res) => {
console.log(res); console.log(res);
that.agencyInfo = res; that.agencyInfo = res;
}); });

@ -198,7 +198,7 @@ export default {
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
console.log("canvasRes1"); console.log("canvasRes1");
that.getWXCanvas("https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/canvasBg.png").then((canvasRes) => { that.getWXCanvas("https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/joinTeam.png").then((canvasRes) => {
console.log("canvasRes", canvasRes); console.log("canvasRes", canvasRes);
that.shareJobImg = canvasRes.tempFilePath; that.shareJobImg = canvasRes.tempFilePath;
that.allowClick = true; that.allowClick = true;
@ -227,7 +227,7 @@ export default {
// #ifdef APP-PLUS || MP-KUAISHOU // #ifdef APP-PLUS || MP-KUAISHOU
uni.hideLoading(); uni.hideLoading();
that.allowClick = true; that.allowClick = true;
that.getAppCanvas("https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/canvasBg.png"); that.getAppCanvas("https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/joinTeam.png");
console.log("canvasRes12"); console.log("canvasRes12");
// #endif // #endif
} }

@ -70,7 +70,7 @@
label: '联系人二维码', label: '联系人二维码',
fontColor: !info.contactWechatQrcode ? 'g_c_9' : 'g_c_3', fontColor: !info.contactWechatQrcode ? 'g_c_9' : 'g_c_3',
value: info.contactWechatQrcode, value: info.contactWechatQrcode,
path: '/root/agency/agencyAvatar?label=联系人二维码&fieldName=contactWechatQrcode&value=' + info.contactWechatQrcode, path: '/root/person/agencyAvatar?label=联系人二维码&fieldName=contactWechatQrcode&value=' + info.contactWechatQrcode,
tip: 'avatar', tip: 'avatar',
radius: 2, radius: 2,
type: 'text', type: 'text',
@ -200,7 +200,7 @@ export default {
icon: "", icon: "",
label: "企业头像", label: "企业头像",
value: that.info.logo, value: that.info.logo,
path: "/root/agency/agencyAvatar?label=企业头像&fieldName=logo&value=" + that.info.logo, path: "/root/person/agencyAvatar?label=企业头像&fieldName=logo&value=" + that.info.logo,
tip: "avatar", tip: "avatar",
type: "text", type: "text",
fontSize: "16px", fontSize: "16px",
@ -305,6 +305,7 @@ export default {
handleItemClick(e) { handleItemClick(e) {
let that = this; let that = this;
console.log("e", e);
uni.navigateTo({ uni.navigateTo({
url: e.item.path, url: e.item.path,
}); });

@ -1,7 +1,7 @@
<template> <template>
<div class="g_bg_page g_pl_10 g_pr_10"> <div class="g_bg_page g_pl_10 g_pr_10">
<div class="g_h_20"></div> <div class="g_h_20"></div>
<div class="g_mb_10 g_fs_18 g_pl_10">{{ beFllowAgencyInfo.inviteUserName || "-" }}邀请您加入他的团队</div> <div class="g_mb_10 g_fs_18 g_pl_10">{{ beFllowAgencyInfo.inviteUserName || "-" }}邀请你关注他的发单号</div>
<div class="r_box g_pt_24 g_text_c g_pl_20 g_pr_20"> <div class="r_box g_pt_24 g_text_c g_pl_20 g_pr_20">
<div class="g_pb_16"> <div class="g_pb_16">
<img class="g_h_80 g_w_80 g_radius_50" :src="beFllowAgencyInfo.logo || 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/APP/default.svg'" alt="" /> <img class="g_h_80 g_w_80 g_radius_50" :src="beFllowAgencyInfo.logo || 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/APP/default.svg'" alt="" />
@ -22,7 +22,7 @@
<div class="g_mt_30"> <div class="g_mt_30">
<div class="g_fs_18 g_mb_8 g_pl_12">填写企业简称:</div> <div class="g_fs_18 g_mb_8 g_pl_12">填写企业简称:</div>
<div class="r_box g_pl_10"> <div class="r_box g_pl_10">
<u-input v-model="agencyInfo.fullName" height="88" placeholder="区域+名称,如:上海发财劳务"></u-input> <u-input v-model="agencyInfo.fullName" :customStyle="{ color: disabled ? '#999' : '#333' }" :disabled="disabled" height="88" placeholder="区域+名称,如:上海发财劳务"></u-input>
</div> </div>
<div class="g_fs_12 g_c_9 g_mt_6 g_pl_12">设置后系统将自动创建团队并关注该发单号您作为创建人可在我的页面管理团队</div> <div class="g_fs_12 g_c_9 g_mt_6 g_pl_12">设置后系统将自动创建团队并关注该发单号您作为创建人可在我的页面管理团队</div>
</div> </div>
@ -31,6 +31,7 @@
<quickLogin @successLogin="successLogin" v-if="!agencyInfo.id"> <quickLogin @successLogin="successLogin" v-if="!agencyInfo.id">
<g-button btnText="申请关注" type="primary" class=""></g-button> <g-button btnText="申请关注" type="primary" class=""></g-button>
</quickLogin> </quickLogin>
<g-button v-else-if="isSelf" btnText="不能关注自己" type="disabled"></g-button>
<div v-else> <div v-else>
<g-button v-if="beFllowAgencyInfo.recordStatus == 1" btnText="已关注" type="disabled" class=""></g-button> <g-button v-if="beFllowAgencyInfo.recordStatus == 1" btnText="已关注" type="disabled" class=""></g-button>
<g-button v-else-if="beFllowAgencyInfo.recordStatus == 2" btnText="互相关注" type="disabled" class=""></g-button> <g-button v-else-if="beFllowAgencyInfo.recordStatus == 2" btnText="互相关注" type="disabled" class=""></g-button>
@ -72,12 +73,13 @@ export default {
ing: false, ing: false,
scene: "", scene: "",
isSelf: false, isSelf: false,
disabled: false,
}; };
}, },
onLoad(options) { onLoad(options) {
let that = this; let that = this;
console.log(options); console.log(options);
options.scene = "id=3087_101125"; // options.scene = "id=3087_101125";
if (options.scene) { if (options.scene) {
console.log("XXXXXXXXXXXX"); console.log("XXXXXXXXXXXX");
// //
@ -87,18 +89,21 @@ export default {
console.log("sceneJson===", sceneJson); console.log("sceneJson===", sceneJson);
this.inviteUserId = sceneJson.id.split("_")[1]; //id this.inviteUserId = sceneJson.id.split("_")[1]; //id
this.uid = sceneJson.id.split("_")[0]; // id this.uid = sceneJson.id.split("_")[0]; // id
that.G.Get("/checkUserLogin", {}, (res) => {
console.log("checkUserLogin", res);
if (res) {
that.getAgencyInfo().then(() => {
that.getAgencyById();
});
} else {
that.getAgencyById();
}
});
} }
}, },
onShow() {
let that = this;
that.G.Get("/checkUserLogin", {}, (res) => {
console.log("checkUserLogin", res);
if (res) {
that.getAgencyInfo().then(() => {
that.getAgencyById();
});
} else {
that.getAgencyById();
}
});
},
created() {}, created() {},
methods: { methods: {
@ -126,48 +131,69 @@ export default {
_code = 1; // _code = 1; //
} }
// } // }
this.G.Get(this.api.bind_subscribeSubmit + "/" + that.uid, { agencyId: that.agencyInfo.id, agencyName: that.agencyInfo.fullName, source: _code, remark: " " }, (res) => { return new Promise((reso) => {
uni.showToast({ this.G.Get(this.api.bind_subscribeSubmit + "/" + that.uid, { agencyId: that.agencyInfo.id, agencyName: that.agencyInfo.fullName, source: _code, remark: " " }, (res) => {
title: "申请成功", uni.showToast({
icon: "none", title: "申请成功",
}); icon: "none",
uni.navigateTo({ });
url: "/root/person/inviteFollowSuccess", uni.navigateTo({
url: "/root/person/inviteFollowSuccess",
});
reso();
// that.checkHasApply();
console.log(res);
}); });
// that.checkHasApply();
console.log(res);
}); });
}, },
getAgencyById() { getAgencyById() {
let that = this; let that = this;
this.G.Get(this.api.order_getAgencyByIdForApply, { agencyId: that.uid, inviteUserId: this.inviteUserId }, (res) => { return new Promise((reso, reject) => {
console.log("resresresresresres", res); this.G.Get(this.api.order_getAgencyByIdForApply, { agencyId: that.uid, inviteUserId: this.inviteUserId }, (res) => {
that.beFllowAgencyInfo = res; console.log("resresresresresres++++++++++++++", res);
if (res.id == that.agencyInfo.id) { that.beFllowAgencyInfo = res;
that.isSelf = true; if (res.id == that.agencyInfo.id) {
} that.isSelf = true;
that.numList = [ }
{ label: "总职位", num: res.jobNum }, that.numList = [
{ label: "最近更新", num: res.recruitmentJobNum }, { label: "总职位", num: res.jobNum },
{ label: "粉丝", num: res.downNum }, { label: "最近更新", num: res.recruitmentJobNum },
]; { label: "粉丝", num: res.downNum },
];
reso();
});
}); });
}, },
successLogin(e) { successLogin(e) {
let that = this;
console.log("successLogin", e); console.log("successLogin", e);
this.getAgencyInfo(); this.getAgencyInfo().then(() => {
this.getAgencyById(); that.getAgencyById().then(() => {
this.applyAdd(); if (that.beFllowAgencyInfo.recordStatus == 3 || that.beFllowAgencyInfo.recordStatus == 4 || that.beFllowAgencyInfo.recordStatus == 6) {
that.applyAdd();
} else {
if (that.beFllowAgencyInfo.recordStatus == 5) {
uni.showToast({
title: "已发起关注申请, 正在等待通过",
icon: "none",
});
}
}
});
});
}, },
getAgencyInfo() { getAgencyInfo() {
let that = this; let that = this;
return new Promise((reso, reject) => { return new Promise((reso, reject) => {
that.G.Get(that.api.login_agencyInfo, {}, (aRes) => { that.G.Get(that.api.login_agencyInfo, {}, (aRes) => {
console.log("获取团队信息:", aRes); console.log("获取团队信息:", aRes);
that.disabled = aRes.agency.fullName ? true : false;
that.agencyInfo = { ...aRes.agency, fullName: aRes.agency.fullName ? aRes.agency.fullName : that.agencyInfo.fullName }; that.agencyInfo = { ...aRes.agency, fullName: aRes.agency.fullName ? aRes.agency.fullName : that.agencyInfo.fullName };
uni.setStorageSync("agencyInfo", aRes.agency); uni.setStorageSync("agencyInfo", aRes.agency);
reso(); setTimeout(() => {
reso();
}, 200);
}); });
}); });
}, },

@ -1,7 +1,10 @@
<template> <template>
<view class="p-root-person-userinfo g_w_all g_h_all g_bg_f_5 g_kuaishou"> <view class="p-root-person-userinfo g_w_all g_h_all g_bg_f_5 g_kuaishou">
<view class="g_h_16"></view> <view class="g_h_16"></view>
<view class="g_pl_10 g_pr_10 g_pb_16" v-if="isCreator"> <view class="">
<g-panel-form-item :list="[{ icon: '', label: '反馈与建议', result: '', path: '/root/person/feedback', tip: 'message', pRow: 12 }]" @clickItem="handleClickItem" />
</view>
<view class="g_pl_10 g_pr_10 g_pb_16 g_mt_10" v-if="isCreator">
<view class="g_bg_f g_pl_16 g_pr_16 g_radius_8"> <view class="g_bg_f g_pl_16 g_pr_16 g_radius_8">
<view class="g_flex_row_between g_h_56"> <view class="g_flex_row_between g_h_56">
<view class="g_flex_column_center g_fs_16 g_c_3">关注邀请</view> <view class="g_flex_column_center g_fs_16 g_c_3">关注邀请</view>

Loading…
Cancel
Save