master
wangxia 3 months ago
parent 5485c1c56e
commit 404fcd697e

@ -29,6 +29,7 @@ let jobInfo = {
get_city_list: '/city/getAllCityLevel2', // 获取城市列表
new_job_list: '/yishoudan/custom/job/listV2', // 新职位列表
dao_job_list: '/yishoudan/store/job/platform/list', // 稻田职位列表
get_userViewJobList: "/assistant/custom/job/v2/userViewJobList",// 获取用户浏览的职位列表
}
export default jobInfo;

@ -68,7 +68,15 @@ import { V2NIMMessage } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK/V2NIMMessage
import { V2NIMConst } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK";
const G = getCurrentInstance().appContext.app.config.globalProperties.G;
const F = getCurrentInstance().appContext.app.config.globalProperties.F;
const api = getCurrentInstance().appContext.app.config.globalProperties.api;
import api from "../../utils/api.js";
console.log("apiapiapi", api);
const requestComeFrom = computed(() => {
let val = "isToC";
if (G.globalConstantData.requestComeFrom && (G.globalConstantData.requestComeFrom == "assistant_miniapp" || G.globalConstantData.requestComeFrom == "supply_chain_miniapp")) {
val = "isToB";
}
return val; //
}); //
export interface YxReplyMsg {
messageClientId: string;
scene: V2NIMConst.V2NIMConversationType;
@ -80,23 +88,7 @@ export interface YxReplyMsg {
}
trackInit("ChatUIKit");
const tabInfo = ref({
list: [
{
name: "我的",
classify: 1,
},
{
name: "浏览",
classify: 2,
},
{
name: "收藏",
classify: 3,
},
],
active: 0,
});
const tabInfo = ref();
const title = ref("");
const jobListShow = ref(false);
const toDetail = () => {
@ -424,9 +416,57 @@ onLoad((options) => {
});
const msgHeight = ref(0);
const beCollectedAgencyId = ref(0);
onMounted(() => {
setNavTitle();
console.log('uni.getStorageSync("apply-userinfo")', requestComeFrom.value);
let userInfo = uni.getStorageSync("apply-userinfo");
//
if (requestComeFrom.value == "isToB") {
tabInfo.value = {
list: [
{
name: "浏览",
classify: 2,
},
{
name: "收藏",
classify: 3,
},
{
name: "对方",
classify: 1,
},
{
name: "我的",
classify: 99,
},
],
active: 0,
};
//
if (userInfo.supplierAccount == 1) {
tabInfo.value.active = 3;
}
} else {
//
tabInfo.value = {
list: [
{
name: "浏览",
classify: 2,
},
{
name: "想去",
classify: 3,
},
{
name: "商家",
classify: 1,
},
],
active: 0,
};
}
agencyIdByAccId().then((res) => {
beCollectedAgencyId.value = res.agencyId;
getList();
@ -480,17 +520,13 @@ const checkLength = (e) => {
};
const handleUpdateTab = (e) => {
console.log(e);
query.value.page = 1;
tabInfo.value.active = e;
uni.showLoading({
title: "加载中...",
});
if (e == 0 || e == 2) {
getList();
} else {
getSeenList();
}
};
const getSeenList = () => {};
const agencyIdByAccId = () => {
let accid = conversationId.split("|")[2];
return new Promise((reso) => {
@ -502,6 +538,9 @@ const agencyIdByAccId = () => {
const searchJob = () => {
query.value.list = [];
query.value.page = 1;
uni.showLoading({
title: "加载中...",
});
getList();
};
const getList = ($type = "init") => {
@ -512,17 +551,41 @@ const getList = ($type = "init") => {
pageSize: query.value.size,
keys: keyword.value,
cityName: "全国",
sortTag: 2,
};
if (tabInfo.value.active === 0) {
let url = "job_list";
console.log("G.globalConstantData.requestComeFrom", requestComeFrom.value);
let classify = tabInfo.value.list[tabInfo.value.active].classify;
if (requestComeFrom.value == "isToC") {
url = "yi_job_list";
parmas.classify = 1;
// classify: 3: 2: 1:()
if (classify == 3) {
parmas.ujc = 1;
} else if (classify == 2) {
parmas.beCollectedAgencyId = uni.getStorageSync("AGENCY_ID");
url = "get_userViewJobList";
} else if (classify == 1) {
parmas.agencyId = uni.getStorageSync("AGENCY_ID");
}
} else {
// classify 99: 3: 2: 1:
if (classify === 99) {
parmas.agencyId = uni.getStorageSync("apply-agencyId");
parmas.classify = 99;
} else if (tabInfo.value.active == 2) {
parmas.classify = 3;
parmas.classify = classify;
} else if (classify == 3) {
parmas.beCollectedAgencyId = beCollectedAgencyId.value;
parmas.classify = classify;
} else if (classify == 2) {
parmas.beCollectedAgencyId = beCollectedAgencyId.value;
url = "get_userViewJobList";
} else if (classify == 1) {
parmas.agencyId = beCollectedAgencyId.value;
parmas.classify = classify;
}
}
console.log("parmas", parmas);
G.Post(api.job_list, parmas, (res) => {
G.Post(api[url], parmas, (res) => {
console.log("res", res);
loading.value = false;
uni.hideLoading();

@ -75,12 +75,12 @@
<!-- <div class="msg-input-button" v-if="false">
<Icon @tap="handleEmojiVisible" class="g_p_6" style="padding-right: 5px" :size="28" type="icon-biaoqing" />
</div> -->
<!-- <div class="msg-input-button" @tap="(event) => handleSendJob()">
<div class="msg-input-button" @tap="(event) => handleSendJob()">
<div class="iconfont icon-5gongdanguanli g_c_6 g_fs_24"></div>
</div>
<div class="msg-input-button" v-if="true">
<Icon @tap="handleSendMoreVisible" class="g_p_6" style="padding-left: 5px; padding-right: 8px" type="send-more" :size="28" />
</div> -->
</div>
</div>
<!-- 表情面板 -->
<div v-if="emojiVisible" class="msg-emoji-panel" @click.stop="() => {}">

@ -0,0 +1,8 @@
let jobInfo = {
get_userViewJobList: "/assistant/custom/job/v2/userViewJobList", // 获取用户浏览的职位列表
yi_job_list: '/yishoudan/custom/job/listApp', // 一才职位列表(招工宝发送商家职位用)
job_list: "/assistant/custom/job/v2/list",// 职位列表()
get_AgencyIdByAccId: "/wyyx/systemuser/getAgencyIdByAccid",// 通过accid获取代理id
}
export default jobInfo;

@ -1,4 +1,7 @@
let data = {
globalConstantData: {
requestComeFrom: 'assistant_miniapp',
},
/*
*/
store () {
@ -10,8 +13,8 @@ let data = {
fadanBaseImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/",
loginText: '请登录',
coziID: '7537572244600471579',
baseUrl:"https://daotian.matripe.com.cn",// 网络请求的基础路径
// baseUrl: "http://192.168.3.83:8001", // 网络请求的基础路径
// baseUrl:"https://daotian.matripe.com.cn",// 网络请求的基础路径
baseUrl: "http://192.168.3.83:8001", // 网络请求的基础路径
// #ifdef MP-WEIXIN
version: uni.getAccountInfoSync().miniProgram.version || "1.0.16",
// #endif

Loading…
Cancel
Save