no message

cyl/master
jscyl13849007907 1 month ago
parent 9f27eb2bee
commit 9b5c83e0ef

@ -0,0 +1,24 @@
let bindInfo = {
bind_getCode:"/assistant/circle/agency/apply/inviteCode",// 获取邀请码
bind_getOrderCode:"/yishoudan/user/apply/order/orderDetailsQrCodeImage",// 获取邀请码
bind_getSubscribeDetail :"/assistant/circle/agency/search/code",// 根据搜索code获取对应关注详情
bind_subscribeSubmit:"/assistant/circle/agency/apply/subscribe",// 提交关注
bind_recordList:"/assistant/circle/agency/apply/list",// 申请记录
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",// 让不让他看
bind_getGroupDetail:"/assistant/circle/agency/info",// 团队详情
bind_list:"/assistant/circle/agency/list",// 上下游列表
bind_getListNum:"/assistant/circle/agency/listCount",// 统计上粉丝数量
bind_setPeolple:"/assistant/circle/agency/lookHim",// 看不看他
bind_cancelApply:"/assistant/circle/agency/unsubscribe",// 取消关注
bind_delApply:"/assistant/circle/agency/removeFans",// 删除粉丝
bind_getAgencyCorpUsersNum:"/yishoudan/agency/getAgencyCorpUsersNum",// 获取团队成员数
}
export default bindInfo;

@ -9,6 +9,7 @@ import company from './company.js';
import chatInfo from './chat.js';
import appConfig from './appConfig.js';
import merchantManagement from './merchantManagement.js';
import bindInfo from './bind.js';
let testInfo = {// 测试接口
testUrl: "/overall/store/job/list",// 来源:稻田 小程序首页列表
}
@ -20,4 +21,4 @@ let baseInfo = {// 公共接口
uploadImage: "/imgs/uploadImage",// 图片上传
}
export default Object.assign(baseInfo, loginInfo, jobInfo, personInfo, wyyxInfo, order, messageInfo, user, company,merchantManagement,chatInfo,appConfig);
export default Object.assign(baseInfo, loginInfo, jobInfo, personInfo, wyyxInfo, order, messageInfo, user, company,merchantManagement,chatInfo,appConfig,bindInfo);

@ -0,0 +1,583 @@
<template>
<view class="p-root-bind-my-main g_flex_column_center flex_center g_w_all g_h_all g_bg_f_5 g_kuaishou" :style="{ 'background-image': showBg ? 'url(' + cdnBaseImg + 'share_bg.svg)' : '' }" :class="showBg ? 'g_pt_32' : ''">
<view class="g_flex_row_center g_fs_22 g_c_3 g_fw_600 g_mb_24" v-if="showBg"></view>
<!-- #ifdef APP-PLUS || MP-WEIXIN -->
<image :src="shareJobImg" show-menu-by-longpress style="width: 343px; height: 635px; margin: 0 auto; display: block" mode=""></image>
<view class="g_text_c g_fs_16 g_mt_12 g_mb_32 g_fw_600">长按图片转发给微信好友</view>
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<canvas
:style="{
width: canvasWidth + 'px',
height: canvasHeight + 'px',
position: 'absolute',
left: '-2000px',
background: '#fff',
}"
canvas-id="text"
></canvas>
<!-- #endif -->
<!-- #ifdef H5 -->
<view class="canvas-card g_position_rela" id="canvas-card" style="background-image: url('https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/v3/bg.png')">
<view class="m-card g_position_abso" style="left: 50%; transform: translateX(-50%)">
<view class="g_w_all g_h_all g_position_rela">
<view class="g_pl_20 g_pt_18 g_pr_24">
<view class="">
<view class="g_fs_20 g_c_3 g_fw_600">{{ agencyName }}</view>
<view class="g_fs_14 g_c_9 g_mt_6">今日更新职位{{ appInfo.jobUpdateNum }}</view>
</view>
<view>
<image
:src="appInfo.logo"
style="border-radius: 50%; position: absolute; border: 2px solid #fff"
:style="{
width: appLogoSize / 2 + 'px',
height: appLogoSize / 2 + 'px',
top: appLogoTop,
right: appLogoLeft,
}"
></image>
</view>
</view>
<view class="g_flex_row_start g_pl_20" style="margin-top: 28px">
<view class="g_mr_12">
<view class="g_fs_22 g_c_3 g_flex_row_center g_fw_600">{{ appInfo.jobNum }}</view>
<view class="g_fs_14 g_c_9 g_mt_4 g_flex_row_center">总职位</view>
</view>
<view class="g_mr_12">
<view class="g_fs_22 g_c_3 g_flex_row_center g_fw_600">{{ appInfo.recruitmentJobNum.toString() }}</view>
<view class="g_fs_14 g_c_9 g_mt_4 g_flex_row_center">在招数</view>
</view>
<view class="">
<view class="g_fs_22 g_c_3 g_flex_row_center g_fw_600">{{ appInfo.downNum }}</view>
<view class="g_fs_14 g_c_9 g_mt_4 g_flex_row_center">粉丝数</view>
</view>
</view>
</view>
</view>
<view class="m-logo g_flex_c">
<image
:src="wxCode"
style="position: absolute; left: 50%; transform: translateX(-50%)"
:style="{
width: appCodeSize / 2 + 'px',
height: appCodeSize / 2 + 'px',
top: appCodeTop,
}"
></image>
</view>
</view>
<!-- #endif -->
<view v-if="allowClick && false">
<view class="g_h_100"></view>
<rh-fixed>
<slot>
<view class="g_flex_row_center">
<!-- #ifdef APP-PLUS -->
<rh-button primaryColor="#00b666" btnText="扫一扫" size="small" type="default" @clickBtn="handleOpenCamera"></rh-button>
<rh-button primaryColor="#00b666" btnText="保存图片" class="g_ml_16" size="small" type="primary" @clickBtn="saveAppImageCanvas"></rh-button>
<!-- #endif -->
<!-- #ifdef H5 -->
<rh-button primaryColor="#00b666" btnText="保存图片" size="small" type="primary" @clickBtn="saveH5ImageCanvas"></rh-button>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<rh-button primaryColor="#00b666" btnText="保存图片" size="small" type="default" @clickBtn="saveWXImageToAlbum"></rh-button>
<rh-button primaryColor="#00b666" btnText="直接转发" class="g_ml_16" size="small" openType="share" type="primary"></rh-button>
<!-- #endif -->
</view>
</slot>
</rh-fixed>
</view>
<!-- #ifdef MP-WEIXIN -->
<canvas type="2d" style="position: absolute; left: -2000px; width: 425px; height: 350px; background: #fff" id="canvasId" ref="canvasId"></canvas>
<!-- #endif -->
</view>
</template>
<script>
// #ifdef H5
import { saveAs } from "file-saver";
// #endif
export default {
onReady() {
this.G.setNavStyle();
},
onShareAppMessage() {
return this.G.shareFun();
},
data() {
return {
localBaseImg: this.G.store().localBaseImg,
agencyInfo: uni.getStorageSync("agencyInfo"),
cdnBaseImg: this.G.store().cdnBaseImg,
wxCode: "",
appCodeSize: 0,
appLogoSize: 0,
appCodeTop: 0,
appLogoTop: 0,
appLogoLeft: 0,
agencyName: "",
shareJobImg: "",
allowClick: false,
appInfo: {},
appfile: null,
canvasWidth: 0,
canvasHeight: 0,
};
},
props: {
showBg: {
type: Boolean,
default: () => {
return true;
},
},
active: {
default: 0,
},
},
created() {
let that = this;
uni.getImageInfo({
src: "https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/canvasBg.png", //
success(res) {
that.canvasWidth = res.width;
that.canvasHeight = res.height;
},
});
// #ifdef MP-WEIXIN || H5
if (uni.getStorageSync("poster_img")) {
this.shareJobImg = uni.getStorageSync("poster_img");
} else {
if (this.active == 1) {
uni.showLoading({
title: "生成中...",
});
}
this.getDetail().then(() => {
this.init();
});
}
// #endif
},
lifetimes: {
//
// detached() {
// // console.log("detacheddetacheddetacheddetacheddetached");
// uni.removeStorageSync("poster_img");
// },
},
watch: {
shareJobImg(newValue, oldValue) {
console.log("shareJobImg123", newValue);
if (newValue) {
// console.log("shareJobImg345", newValue);
setTimeout(() => {
uni.hideLoading();
}, 500);
}
},
// $route: "init",
},
methods: {
getDetail() {
let that = this;
return new Promise((reso) => {
that.G.Get(
that.api.bind_enterpriseDetail + "/" + uni.getStorageSync("apply-agencyId"),
{
agencyId: uni.getStorageSync("apply-agencyId"),
type: 1,
},
(res) => {
// console.log("recommendList", res);
that.appInfo = res;
reso();
}
);
});
},
init() {
let that = this;
// console.log("that.appInfo", that.appInfo);
// #ifdef APP-PLUS || MP-KUAISHOU
let _env = "app";
// #endif
// #ifdef H5
let _env = "app";
// #endif
// #ifdef MP-WEIXIN
let _env = uni.getAccountInfoSync().miniProgram.envVersion;
// #endif
that.G.Get(
that.api.bind_getCode,
{
env: _env,
},
(res) => {
// console.log("", res);
that.wxCode = "https://daotian.matripe.com.cn" + res.qrcode;
that.agencyName = res.agencyName;
// #ifdef MP-WEIXIN
// console.log("canvasRes1");
that.getWXCanvas("https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/canvasBg.png").then((canvasRes) => {
// console.log("canvasRes", canvasRes);
that.shareJobImg = canvasRes.tempFilePath;
that.allowClick = true;
that.$emit("setImg", that.shareJobImg);
uni.setStorageSync("poster_img", that.shareJobImg);
});
that.$emit("exportCode", {
code: res.code,
agencyName: res.agencyName,
});
console.log("canvasRes12");
// #endif
}
);
},
// App
getAppCanvas(sharelImg, type) {
let that = this,
ctx = uni.createCanvasContext("text");
let info = that.appInfo;
new Promise(function (resolve) {
//
uni.downloadFile({
url: sharelImg,
success: function (bgRes) {
uni.getImageInfo({
src: bgRes.tempFilePath, //
success(res) {
let _width = res.width;
let _height = res.height;
ctx.drawImage(bgRes.tempFilePath, 0, 0, _width, _height);
uni.downloadFile({
url: info.logo,
success: function (bgRes) {
that.G.roundRect(ctx, bgRes.tempFilePath, 915, 218, 272, 272, 136); // logo
uni.downloadFile({
url: that.wxCode,
success: function (QRres) {
that.G.roundRect(ctx, QRres.tempFilePath, (_width - 488) / 2, 1160, 488, 488, 0);
that.G.fillTextLineBreak(ctx, info.agencyName, 140, 300, info.agencyName.length * 80, 80, "#333", 80, 600, "left"); //
that.G.fillTextLineBreak(ctx, "今日更新职位" + info.jobUpdateNum, 140, 400, ("今日更新职位" + info.jobUpdateNum).length * 56, 56, "#999", 56, 500, "left"); //
that.G.fillTextLineBreak(ctx, info.jobNum.toString(), 230, 620, info.jobNum.toString().length * 88, 88, "#333", 88, 600); //
that.G.fillTextLineBreak(ctx, info.recruitmentJobNum.toString(), 480, 620, info.recruitmentJobNum.toString().length * 88, 88, "#333", 88, 600); //
that.G.fillTextLineBreak(ctx, info.downNum.toString(), 730, 620, info.downNum.toString().length * 88, 88, "#333", 88, 600); //
that.G.fillTextLineBreak(ctx, "总职位", 230, 700, "总职位".length * 56, 56, "#999", 56, 500); //
that.G.fillTextLineBreak(ctx, "在招数", 480, 700, "在招数".length * 56, 56, "#999", 56, 500); //
that.G.fillTextLineBreak(ctx, "粉丝数", 730, 700, "粉丝数".length * 56, 56, "#999", 56, 500); //
ctx.restore();
ctx.draw(false, () => {
setTimeout(function () {
that.endAppCanvas(ctx, _width, _height);
}, 50);
});
},
});
},
});
},
fail(err) {},
});
},
});
}).then(() => {});
},
endAppCanvas(ctx, _width, _height) {
let that = this;
uni.canvasToTempFilePath({
x: 0,
y: 0,
width: _width,
height: _height,
canvasId: "text",
success: function (pathRres) {
const savedFilePath = pathRres.tempFilePath; //
const path = plus.io.convertLocalFileSystemURL(savedFilePath); //
const fileReader = new plus.io.FileReader();
fileReader.readAsDataURL(path);
fileReader.onloadend = (res) => {
that.shareJobImg = res.target.result;
that.appfile = savedFilePath;
};
},
});
},
//
getWXCanvas(sharelImg, type) {
const that = this;
return new Promise((resolve) => {
var mycenter = 0; //
var myheight = 0; //
var baseColor = this.agencyInfo.themeColor || "#52cd8d"; //
const query = uni.createSelectorQuery().in(this);
query
.select("#canvasId")
.fields({
node: true,
size: true,
})
.exec((res) => {
// console.log("uni ", res);
// // console.log("sharelImg", sharelImg);
const canvas = res[0].node;
const ctx = canvas.getContext("2d");
new Promise(function (resolve) {
//
uni.getImageInfo({
src: sharelImg, //
success(res) {
// console.log("res111", res);
canvas.width = res.width;
canvas.height = res.height + 250;
mycenter = canvas.width;
myheight = canvas.height;
const img = canvas.createImage();
img.src = res.path;
// console.log("img111", img);
img.onload = (info) => {
//
that.G.roundRect1(ctx, 0, 0, canvas.width, canvas.height + 250, 0, baseColor);
//
that.G.roundRect1(ctx, (mycenter - canvas.width + 120) / 2, 280, canvas.width - 120, canvas.height - 360, 180, "#fff");
//
that.G.roundRect1(ctx, (mycenter - 800) / 2, canvas.height - 600, 800, 136, 135, baseColor);
let qrTop = 1145;
//
that.G.roundRect1(ctx, (mycenter - 600) / 2 - 5, qrTop, 136, 136, 80, baseColor);
//
that.G.roundRect1(ctx, (mycenter - 600) / 2 + 470, qrTop, 136, 136, 80, baseColor);
//
that.G.roundRect1(ctx, (mycenter - 600) / 2 - 5, qrTop + 475, 136, 136, 80, baseColor);
//
that.G.roundRect1(ctx, (mycenter - 600) / 2 + 470, qrTop + 475, 136, 136, 80, baseColor);
//
that.G.fillTextLineBreak(ctx, "扫一扫关注我的发单号", (mycenter - "扫一扫关注我的发单号".length * 54) / 2, canvas.height - 515, "扫一扫关注我的发单号".length * 54, 58, that.isLightColor(baseColor) ? "#333" : "#fff", 54, 600); //
that.G.drawCenteredText(ctx, mycenter, canvas.height - 300, [{ content: "该图片请不要发给工友", color: "#d30000", fontWeight: 500, fontSize: 72 }]);
that.G.drawCenteredText(ctx, mycenter, canvas.height - 200, [{ content: "关注后能直接看到单子的代理费/佣金", color: "#333", fontWeight: 500, fontSize: 48 }]);
//
that.G.roundRect_yuan(ctx, (mycenter - 360) / 2, 110, 360, "#ffffff");
// uni.getImageInfo({
// src: "https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/phone.png", //
// success(res) {
// const img = canvas.createImage();
// // console.log("res333", res);
// img.src = res.path;
// img.onload = () => {
// that.G.roundRect(ctx, img, (mycenter - 800) / 2 + 100, canvas.height - 565, 70, 70, 0);
resolve(true);
// };
// },
// });
};
},
fail(err) {
// console.log("errerrerrerrerrerrerr", err);
},
});
}).then(() => {
//使
this.setShareJobImg(ctx, canvas, mycenter)
.then(function (canvas1) {
// console.log("canvas1", canvas1);
uni.canvasToTempFilePath({
canvas: canvas1,
success(res) {
// console.log("res222", res);
resolve(res);
},
fail(res) {
uni.hideLoading();
uni.showToast({
title: res.errMsg,
icon: "error",
});
},
});
})
.catch((err) => {
uni.hideLoading();
uni.showToast({
title: "生成失败,请重试",
});
});
});
});
});
},
//
saveWXImageToAlbum() {
let that = this;
uni.saveImageToPhotosAlbum({
filePath: that.shareJobImg,
success() {
uni.showToast({
title: "保存成功",
});
},
fail(err) {
uni.showToast({
title: "保存失败, 请重试",
});
},
});
},
// H5
saveH5ImageCanvas() {
let that = this;
// #ifdef H5
// #endif
},
// APP
saveAppImageCanvas() {
let that = this;
uni.saveImageToPhotosAlbum({
filePath: that.appfile,
success() {
uni.showToast({
title: "保存成功",
icon: "success",
});
},
fail() {
uni.showToast({
title: "保存失败",
icon: "none",
});
},
});
},
//
isLightColor(hexColor, threshold = 180) {
hexColor = hexColor.replace("#", "");
if (hexColor.length === 3) {
hexColor = hexColor[0] + hexColor[0] + hexColor[1] + hexColor[1] + hexColor[2] + hexColor[2];
}
const r = parseInt(hexColor.substring(0, 2), 16);
const g = parseInt(hexColor.substring(2, 4), 16);
const b = parseInt(hexColor.substring(4, 6), 16);
const brightness = (r * 299 + g * 587 + b * 114) / 1000;
return brightness > threshold;
},
formatNumberAdvanced(num, fixed = 1) {
if (typeof num !== "number" || isNaN(num)) {
return "0";
}
// 1000
if (num < 10000) {
return num.toString();
}
// 10000
// if (num < 10000) {
// return (num / 1000).toFixed(fixed) + "K";
// }
// 10000
return (num / 10000).toFixed(fixed);
},
//
setShareJobImg(ctx, canvas, mycenter, funObj) {
let that = this;
return new Promise((imgres) => {
uni.getImageInfo({
src: that.wxCode,
success(res) {
const img = canvas.createImage();
// console.log("res333", res);
img.src = res.path;
img.onload = () => {
that.G.roundRect(ctx, img, (mycenter - 600) / 2, 1150, 600, 600, 35);
let info = that.appInfo;
// console.log("info", info);
if (!info.logo) {
info.logo = "https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/ibocai/defaultAvatar.png";
}
uni.getImageInfo({
src: info.logo,
success(res) {
// console.log("res444", res);
const img = canvas.createImage();
img.src = res.path;
img.onload = () => {
// info.jobNum = 10000
// info.recruitmentJobNum = 1000
// info.downNum = 32
let numBase = 150;
that.G.roundRect(ctx, img, (mycenter - 300) / 2, 140, 300, 300, 150); // logo
that.G.fillTextLineBreak(ctx, info.fullName, (mycenter - info.fullName.length * 80) / 2, 600, info.fullName.length * 80, 200, "#333", 80, 600, "left"); //
that.G.fillTextLineBreak(ctx, `${info.fullName}】新一代发单号(小程序),海量职位每日更新,线上报名方便快捷,工单状态实时查看。`, numBase - 25, 800, mycenter - 260, 86, "#666", 56, 500, "center"); // slogan
// that.G.fillTextLineBreak(ctx, info.agencyDesp, numBase - 35, 870, mycenter - 260, 86, "#666", 56, 500, "center"); // slogan
// that.G.fillTextLineBreak(ctx, "" + info.jobUpdateNum, 140, 400, ("" + info.jobUpdateNum).length * 56, 56, "#999", 56, 500, "left"); //
// console.log("that.formatNumberAdvanced(info.jobNum)", that.formatNumberAdvanced(info.jobNum));
const textSegments = [
// { content: that.formatNumberAdvanced(info.jobNum).toString(), color: "#000", fontWeight: 500, fontSize: 80, space: info.jobNum < 10000 ? 10 : 0 },
// info.jobNum < 10000 ? null : { content: "", color: "#000", fontWeight: 500, fontSize: 64, space: 10 },
// { content: "", color: "#666", fontWeight: 500, fontSize: 56, space: 70 },
{ content: that.formatNumberAdvanced(info.recruitmentJobNum).toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 10 },
{ content: "在招", color: "#666", fontWeight: 500, fontSize: 56, space: 70 },
{ content: that.formatNumberAdvanced(info.downNum).toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 10 },
{ content: "粉丝", color: "#666", fontWeight: 500, fontSize: 56, space: 40 },
];
// that.G.drawCenteredText(ctx, mycenter + 20, 745, textSegments);
imgres(canvas);
};
},
fail(err) {},
});
};
},
fail(err) {},
});
});
},
//
handleOpenCamera() {
let that = this;
that.G.handleScanCode();
},
},
};
</script>
<style lang="scss">
.p-root-bind-my-main {
background-size: 100% 100%;
background-repeat: no-repeat;
.canvas-card {
background-size: 100% 100%;
background-repeat: no-repeat;
width: calc(100vw - 32px);
height: calc(calc(100vw - 32px) * 2248 / 1372);
}
.m-card {
top: calc(calc(calc(100vw - 32px) * 2248 / 1372) * (36 / 562));
border-radius: 15px;
width: calc(100vw - 74px);
height: calc(calc(calc(100vw - 32px) * 2248 / 1372) * (198 / 562));
}
}
</style>

@ -653,6 +653,71 @@
}
]
},
{ //
"root": "root/bind",
"pages": [
{
"path": "fensi",
"style": {
"navigationBarTitleText": "" //
}
},
{
"path": "order",
"style": {
"navigationBarTitleText": "我的关注" //
}
},
{
"path": "inviteList",
"style": {
"navigationBarTitleText": "" //
}
},
{
"path": "applyList",
"style": {
"navigationBarTitleText": " ", //
"backgroundColor": "#ededed",
"backgroundColorTop": "#ededed",
"backgroundColorBottom": "#ededed"
}
},
{
"path": "applyForm",
"style": {
"navigationBarTitleText": "申请关注"
}
},
{
"path": "search",
"style": {
// #ifdef H5 || APP-PLUS
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": ""
}
},
{
"path": "view",
"style": {
"navigationBarTitleText": "通过粉丝验证"
}
},
// {
// "path": "myMain",
// "style": {
// "navigationBarTitleText": "我的名片"
// }
// },
{
"path": "more",
"style": {
"navigationBarTitleText": "更多操作"
}
}
]
},
{
"root": "root/vip",
"pages": [

@ -31,10 +31,12 @@
<!-- <view class="g_mt_10" v-if="hasPermission">
<g-panel-poster-card :list="poastList" subhead="更多" cardType="img" titleNav="/root/merchantManagement/posterShare" :speed="1" :marginBottom="16" :num="4" cusTitle="分享海报" @clickImg="clickImg" @clickItem="handleClickNum" />
</view> -->
<view class="g_mt_10" v-if="agencyInfo.supplierAccount == 1 && false">
<view class="g_mt_10" v-if="agencyInfo.supplierAccount == 1">
<view class="g_p_16 g_bg_f g_radius_8 g_flex_row_between flex_center g_ml_10 g_mr_10" hover-class="thover" @click="goPage('/root/bind/search?active=1')">
<view class="g_flex_row_start flex_center">
<img src="https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/fazhandaili0610.svg" class="g_w_48 g_h_48 g_radius_50" alt="" />
<div class="g_w_48 g_h_48 g_radius_50 g_flex_c g_bg_main">
<i class="iconfont icon-index" style="color: #fff;font-size: 26px;"></i>
</div>
<view class="g_flex_column_between g_ml_10">
<view class="g_fs_16 g_c_0 g_fw_600 g_mb_6">发展代理</view>
<view class="g_c_9">邀请更多代理粉丝关注我</view>

@ -0,0 +1,140 @@
<template>
<view class="p-root-bind-applyForm g_w_all g_h_all g_bg_f_5 g_kuaishou">
<view class="g_h_10"></view>
<g-panel-card-info
:info="{
avatar: info.logo,
title: info.agencyName,
num: '已发布职位' + info.jobNum,
}"
:isShowMore="0"
/>
<view class="g_mt_10 g_bg_f g_p_16 g_ml_10 g_mr_10 g_radius_8">
<view class="g_fs_16 g_c_6">发送关注申请</view>
<view class="g_mt_10 g_bg_f_7 g_pl_16 g_pr_16 g_radius_8 g_pt_14 g_pb_14">
<u-input v-model="remark" type="textarea" class="g_bg_f_7 g_fs_16" style="font-size: 16px" placeholder-style="font-size:16px" />
</view>
</view>
<view class="g_flex_row_center g_mt_32">
<view class="g_w_184 g_h_40 g_flex_c g_radius_20 g_c_f g_fs_16" :class="info.recordStatus == 1 || info.recordStatus == 2 ? 'g_bg_e g_c_9' : 'g_bg_main'" :style="info.recordStatus == 1 || info.recordStatus == 2 ? 'pointer-events: none;' : ''" hover-class="thover" @click="handleSubmit">
{{ info.recordStatus == 1 ? "申请中" : info.recordStatus == 2 ? "已关注" : "发送" }}
</view>
</view>
</view>
</template>
<script>
export default {
onReady() {
this.G.setNavStyle();
},
onShareAppMessage() {
return this.G.shareFun();
},
data() {
return {
wxCode: "",
info: {
logo: "",
agencyName: "",
jobNum: 0,
agencyId: 0,
},
remark: "",
form: 1,
customButton: {
width: "184px",
height: "40px",
borderRadius: "20px",
backgroundColor: "#00B666",
color: "#fff",
fontSize: "16px",
},
btnSpeed: -1, // -1 0 1 2
};
},
onLoad(options) {
console.log("申请关注页面:", options);
if (options.scene) {
var sceneStr = decodeURIComponent(options.scene);
var sceneJson = this.G.sceneToJson(sceneStr);
this.wxCode = sceneJson.inviteCode;
} else {
this.wxCode = options.code;
this.form = options.form;
}
},
onShow() {
this.init();
},
methods: {
init() {
let that = this;
that.G.Get(
that.api.bind_getSubscribeDetail,
{
inviteCode: that.wxCode,
},
(res) => {
console.log("企业基本信息:", res);
that.info = res;
// that.info.recordStatus = 2;
}
);
},
handleSubmit() {
let that = this;
if (that.info.recordStatus == 1 || that.info.recordStatus == 2) {
return false;
}
//
that.btnSpeed = 0;
//
that.btnSpeed = 1;
uni.showLoading({
title: "正在发送",
});
setTimeout(() => {
uni.hideLoading();
that.G.Get(
that.api.bind_subscribeSubmit + "/" + that.info.agencyId,
{
agencyId: that.info.agencyId,
source: that.form,
remark: that.remark,
},
(res) => {
//
that.btnSpeed = 2;
uni.showToast({
title: "提交成功",
});
setTimeout(() => {
uni.navigateBack();
}, 1500);
}
);
}, 500);
},
goPage($path) {
uni.navigateTo({
url: $path,
});
},
},
};
</script>
<style lang="scss">
.custom-button {
width: 184px;
height: 40px;
border-radius: 20px;
background-color: #00b666;
color: #fff;
font-size: 16px;
}
</style>

@ -0,0 +1,229 @@
<template>
<view class="p-root-bind-apply g_w_all g_h_all g_bg_f_5 g_kuaishou">
<rh-loading :loading='loading' v-if="loading && speed == -1"/>
<view class="g_pt_130" v-if="!loading && speed == 0">
<rh-empty />
</view>
<view class="" v-if="speed > 0">
<view v-for="(item,index) in list" :key="index">
<u-sticky @fixed="handleFixed(item,index)"
@unfixed="handleUnFixed(item,index)"
:index='index'
offset-top='96'
>
<view class="">
<view class="g_c_9 g_fs_14 g_pt_12 g_pb_12 g_pl_16 g_pr_16 true g_bg_f_5"
v-if="item.isShowTime"
>{{item.time}}</view>
<view class="g_c_3 g_fs_14 g_pt_12 g_pb_12 g_pl_16 g_pr_16 g_bg_f_5 false"
v-if="!item.isShowTime"
>
{{stickyText}}
</view>
</view>
</u-sticky>
<view class="g_flex_row_start g_pt_12 g_pl_16 g_pr_16 g_bg_f"
v-for="(itm,inx) in item.children" :key="inx"
@click="goPage(itm,item)"
hover-class="thover"
>
<view class="g_flex_none g_mr_11 m-avatar" style="position: relative;">
<rh-image :url="itm.logo" size='96' radius="6" v-if="itm.logo" />
<rh-image size='96' radius="6" v-if="!itm.logo" />
<view class="g_flex_c"
v-if="itm.supplierAccount == 1"
style="position:absolute; overflow:hidden;width: 20px;height: 10px;right: -2px;top: 0;"
>
<image :src="cdnBaseImg + 'fadanhao.svg'"
mode="widthFix"
style="width: 16px;height: 13px;"
></image>
</view>
</view>
<view class="g_flex_1 g_border_e_b">
<view class="g_flex_row_between g_pb_12">
<view class="g_flex_1 g_flex_column_between g_h_48">
<view class="g_fs_18 g_c_3">{{itm.agencyName}}</view>
<view class="g_fs_14 g_c_9">{{itm.remark ? itm.remark : '-'}}</view>
</view>
<view class="g_flex_none g_flex_column_center">
<!-- 三天前未通过的为已过期已通过的不动 -->
<view v-if="type == 1">
<view v-if="itm.recordStatus == 1" class="g_fs_14 g_c_9">
{{item.time == '三天前' ? '已过期' : '等待通过'}}
</view>
<view v-if="itm.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-duihao g_fsi_12 g_mr_6 "></i>
已通过
</view>
</view>
</view>
<view v-if="type == 2">
<view v-if="itm.recordStatus == 1 && item.time == ''"
class="g_fs_14 g_c_6 g_bg_f_5 g_pt_8 g_pb_8 g_pl_11 g_pr_11 g_radius_8"
>查看</view>
<view v-if="itm.recordStatus == 1 && item.time == '三天前'" class="g_fs_14 g_c_9"></view>
<view v-if="itm.recordStatus == 2" class="g_fs_14 g_c_9"></view>
</view>
</view>
</view>
</view>
</view>
</view>
<view>
<g-panel-hr str="没有更多了" />
</view>
<view class="g_h_50 g_w_all"></view>
</view>
</view>
</template>
<script>
export default{
onReady() {
this.G.setNavStyle();
},
onShareAppMessage(){
return this.G.shareFun();
},
data(){
return{
cdnBaseImg:this.G.store().cdnBaseImg,
loading:true,
speed:-1,
title:'',
list:[],
stickyText:"近三天",
type:1,
keys:''
}
},
props:{
keyword:{
default:()=>{
return ''
}
}
},
created() {
this.type = 2;
this.keys = this.keyword;
this.getList();
},
watch:{
'keyword'(val){
this.keys = val;
this.loading = true;
this.speed = -1;
this.getList();
},
},
methods:{
getList(){
let that = this;
that.G.Get(that.api.bind_recordList + '/' + that.type,{
pageNum: 1,
pageSize: 50,
type:that.type,
keys:that.keys
},(res)=>{
if(res.length == 0){
that.loading = false;
}else{
that.loading = true;
}
console.log("申请列表:",res)
that.speed = res.length;
if(that.speed == 0){
that.list = [];
}else{
const now = new Date().getTime();
const threeDaysAgo = now - 3 * 24 * 60 * 60 * 1000;
const resultArray = res.reduce((acc, item) => {
const timeCategory = item.createTime >= threeDaysAgo ? '近三天' : '三天前';
const existingCategory = acc.find(category => category.time === timeCategory);
if (existingCategory) {
existingCategory.children.push(item);
} else {
acc.push({
time: item.createTime >= threeDaysAgo ? '近三天' : '三天前',
children: [item]
});
}
return acc;
}, []);
console.log('申请列表:',resultArray)
resultArray.forEach((item,index) => {
item.isShowTime = true;
})
that.list = resultArray;
that.$forceUpdate();
}
},()=>{
that.loading = false;
})
},
goPage($itm,$item){
let that = this;
console.log('当前行点击事件:',$itm)
if($itm.recordStatus == 1){
//
uni.navigateTo({
url:'/root/bind/view?id=' + $itm.id + '&type=2&status=' + $itm.recordStatus + '&time=' + $item.time
})
}else{
let params = {
id:$itm.agencyId,
type:that.type,
isShowMore:false,
isShowJob:false
}
if(that.type == 1){//
if($itm.recordStatus == 2){//
params.isShowMore = true;
params.isShowJob = true;
}
}else{//
if($itm.recordStatus == 2){//
// if(){//
// params.isShowMore = true;
// params.isShowJob = true;
// }else{//
params.isShowMore = true;
params.isShowJob = false;
// }
}
}
uni.navigateTo({
url:'/root/detail/userShare?' + that.G.objToStr(params)
})
}
},
handleFixed($item,$index){
this.stickyText = $item.time;
this.$forceUpdate();
$item.isShowTime = false;
},
handleUnFixed($item,$index){
this.stickyText = $item.time;
this.$forceUpdate();
$item.isShowTime = true;
}
}
}
</script>
<style lang="scss">
.p-root-bind-apply{
overflow-y: auto;
.m-avatar{
.u-avatar__img,image{
border-radius: 6px !important;
}
}
}
</style>

@ -0,0 +1,645 @@
<template>
<view class="p-bind-inedx g_w_all g_h_all g_bg_f_5 g_kuaishou">
<view style="position: fixed; left: 0; top: 0; background-color: #fff; width: 100vw; height: 80rpx; z-index: 99">
<!-- tab -->
<view class="g_border_e_t">
<u-tabs :list="tabFansInfo.list" :is-scroll="false" :current="tabFansInfo.active" active-color="#00b666" bar-width="72" bar-height="6" font-size="32" @change="handleUpdateFensTab" duration="0.1" height="84"></u-tabs>
</view>
</view>
<view class="" style="height: 80rpx; width: 100vw"></view>
<!-- 搜索栏 -->
<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="tabFansInfo.active == 0 ? '搜索新的粉丝' : '搜索我的粉丝'" bg-color="#fff" :show-action="false" @btnSearch="getSearch" @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 ? '' : ''">
<rh-loading :loading="loading" v-if="loading && speed == -1" />
<view v-if="!loading && speed == 0" class="g_pt_130">
<rh-empty :text="isLogin ? '暂无数据' : '请登录'" />
</view>
<view v-if="speed > 0 && tabFansInfo.active == 0">
<view v-for="(item, index) in applyList" :key="index">
<u-sticky :index="index" offset-top="80">
<view class="">
<view class="g_c_9 g_fs_14 g_pt_8 g_pb_8 g_pl_16 g_pr_16 true g_bg_f_5" v-if="item.isShowTime">{{ item.time }}</view>
<view class="g_c_3 g_fs_14 g_pt_8 g_pb_8 g_pl_16 g_pr_16 g_bg_f_5 false" v-if="!item.isShowTime">
{{ stickyText }}
</view>
</view>
</u-sticky>
<view class="g_flex_row_start g_pt_12 g_pl_16 g_pr_16 g_bg_f" v-for="(itm, inx) in item.children" :key="inx" @click="goPage(itm, item)" hover-class="thover" :style="{ 'border-bottom': inx == item.children.length - 1 ? '1rpx solid #eee' : '1rpx solid #eee' }">
<view class="g_flex_none g_mr_11 m-avatar" style="position: relative">
<rh-image :url="itm.logo" size="96" radius="6" v-if="itm.logo" />
<rh-image size="96" radius="6" v-if="!itm.logo" />
<view class="g_flex_c" v-if="itm.supplierAccount == 1" style="position: absolute; overflow: hidden; width: 20px; height: 10px; right: -2px; top: 0">
<image :src="cdnBaseImg + 'fadanhao.svg'" mode="widthFix" style="width: 16px; height: 13px"></image>
</view>
</view>
<view class="g_flex_1">
<view class="g_flex_row_between g_pb_12">
<view class="g_flex_1 g_flex_column_between g_h_48">
<view class="g_fs_18 g_c_3 g_fw_600">{{ itm.agencyName }}</view>
<view class="g_fs_14 g_c_9">{{ itm.remark ? itm.remark : "-" }}</view>
</view>
<view class="g_flex_none g_flex_column_center">
<!-- 三天前未通过的为已过期已通过的不动 -->
<view>
<view v-if="itm.recordStatus == 1 && item.time == '近三天'" @click.stop="quickSuccess(itm, inx)">
<view hover-stop-propagation hover-class="thover" class="g_radius_14 g_h_28 g_fs_14 g_c_6 g_pr_8 g_pl_8 g_flex_row_center flex_center g_bg_main g_c_f"> 通过 </view>
<!-- <rh-button primaryColor='#00b666' type='infro' size='mini' btnText='通过' /> -->
<!-- <view hover-stop-propagation hover-class="g_bg_e" class="g_radius_14 g_h_28 g_fs_14 g_c_6 g_pr_8 g_pl_8 g_flex_row_center flex_center g_bg_f_5 g_c_6">通过</view> -->
</view>
<view v-if="itm.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"
style="border: 1px solid #ccc;"
>
<i class="iconfont icon-duihao g_fsi_12 g_mr_2 g_c_6"></i>
已通过
</view> -->
<rh-button primaryColor='#00b666' type="none" size="mini" btnText="已通过" />
</view>
<view v-if="itm.recordStatus == 1 && item.time == '三天前'"></view>
</view>
</view>
</view>
</view>
</view>
</view>
<view style="background-color: #ededed">
<g-panel-hr :str="speed + '个新粉丝申请'" />
</view>
<view class="g_h_50 g_w_all" style="background-color: #ededed"></view>
</view>
<view v-if="speed > 0 && tabFansInfo.active == 1">
<view class="item g_flex_row_between g_pl_16 g_pr_16 g_pb_6 g_pt_6 g_bg_f" hover-class="thover" 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 #eee' : '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">
<rh-image :url="item.logo" size="96" radius="6" v-if="item.logo" />
<rh-image size="96" radius="6" v-if="!item.logo" />
<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_fw_600" style="max-width: 280rpx">{{ item.agencyName }} </view>
<view class="g_ml_6 g_text_c">
<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_ell_1 g_fs_14 g_c_9 g_mt_4">{{ item.remark ? item.remark : "-" }}</view>
</view>
<view class="g_flex_column_center g_mb_12" v-if="tabInfo.active == 1">
<view v-if="item.supplierAccount == 1 && item.recordStatus == 1">
<view class="g_radius_14 g_h_28 g_border_main g_fs_14 g_c_main g_pr_8 g_pl_8 g_flex_row_center flex_center" hover-stop-propagation hover-class="thover" @click.stop="goApplyForm(item, index)">
<i class="iconfont icon-tianjia g_fsi_12 g_mr_2"></i>
关注
</view>
</view>
<view v-if="item.supplierAccount == 1 && item.recordStatus == 2">
<view @click.stop="goMain(item)" hover-class="thover" hover-stop-propagation class="g_radius_14 g_h_28 g_border_c 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_2"></i>
互相关注
</view>
</view>
<view v-if="item.supplierAccount == 1 && item.recordStatus == 5">
<view hover-stop-propagation hover-class="thover" class="g_radius_14 g_h_28 g_border_c g_fs_14 g_c_6 g_pr_8 g_pl_8 g_flex_row_center flex_center">
<i class="iconfont icon-shenqingzhong g_fsi_12 g_mr_2"></i>
申请中
</view>
</view>
<view v-if="item.recordStatus === 0">
<view hover-stop-propagation hover-class="thover" class="g_radius_14 g_h_28 g_border_c g_fs_14 g_c_6 g_pr_8 g_pl_8 g_flex_row_center flex_center">
<i class="iconfont icon-shenqingzhong g_fsi_12 g_mr_4"></i>
邀请中
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view v-if="isShow && speed > 0 && tabFansInfo.active == 1" style="padding-bottom: 100rpx; background-color: #ededed">
<g-panel-hr :str="all + '个粉丝'" v-show="all" />
</view>
<!-- #ifdef H5 -->
<view style="height: 50px"></view>
<!-- #endif -->
</view>
</view>
</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,
speed: -1,
query: {
page: 1,
size: 50,
list: [],
isFinish: -1,
},
keyword: "",
fkey: "",
searchText: "",
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: 1,
},
all: 0,
applyList: [],
stickyText: "近三天",
};
},
onLoad(options) {
let that = this;
if (options.tab == 0) {
that.tabFansInfo.active = 0;
} else {
that.tabFansInfo.active = 1;
}
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 (!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();
if (this.tabFansInfo.active == 1) {
this.getList();
} else {
this.getapplyList();
}
that.getPoint();
}
},
onReachBottom() {
let that = this;
if (that.query.isFinish == -1 || that.query.isFinish == that.query.size) {
that.query.page++;
if (this.tabFansInfo.active == 1) {
this.getList("concat");
} else {
this.getapplyList("concat");
}
}
},
onPageScroll(e) {
console.log(e.scrollTop);
this.scrollTop = e.scrollTop;
},
methods: {
handleUpdateFensTab(e) {
this.tabFansInfo.active = e;
this.keyword = "";
this.loading = true;
this.speed = -1;
this.query.page = 1;
if (this.tabFansInfo.active == 1) {
this.getList();
} else {
this.getapplyList();
}
},
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),
{
type: Number(that.tabInfo.active) + 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 + ")";
}
);
},
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: Number(that.tabInfo.active) + 1,
formdata: true,
},
(res) => {
that.isShow = true;
that.all = res.recordCount;
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) {
let that = this;
this.keyword = e ? e : "";
this.G.isLogin();
if (this.G.isLogin()) {
this.speed = -1;
this.query.page = 1;
if (this.tabFansInfo.active == 1) {
this.getList();
} else {
this.getapplyList();
}
}
},
goMain($item) {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
// if($item.supplierAccount == 1){
let params = {
id: $item.agencyId,
type: Number(that.tabInfo.active) + 1,
bindid: $item.id,
isShowMore: false,
isShowJob: false,
};
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/user?" + 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'
// })
that.G.handleConfirm({
content: "关注发单号后,您可以查看该账号职位的更新,确定要关注吗?",
success: (res) => {
if (res.confirm) {
that.G.Get(
that.api.bind_subscribeSubmit + "/" + $item.agencyId,
{
agencyId: $item.agencyId,
source: 4,
remark: "",
},
(res) => {
//
uni.showToast({
title: "提交成功",
});
setTimeout(() => {
that.getList();
}, 500);
}
);
}
},
});
}
},
getapplyList() {
let that = this;
that.G.Get(
that.api.bind_recordList + "/" + 2,
{
pageNum: 1,
pageSize: 50,
type: 2,
keys: that.keyword,
},
(res) => {
if (res.length == 0) {
that.loading = false;
} else {
that.loading = true;
}
console.log("申请列表:", res);
that.speed = res.length;
if (that.speed == 0) {
that.applyList = [];
} else {
const now = new Date().getTime();
const threeDaysAgo = now - 3 * 24 * 60 * 60 * 1000;
const resultArray = res.reduce((acc, item) => {
const timeCategory = item.createTime >= threeDaysAgo ? "近三天" : "三天前";
const existingCategory = acc.find((category) => category.time === timeCategory);
if (existingCategory) {
existingCategory.children.push(item);
} else {
acc.push({
time: item.createTime >= threeDaysAgo ? "近三天" : "三天前",
children: [item],
});
}
return acc;
}, []);
console.log("申请列表:", resultArray);
resultArray.forEach((item, index) => {
item.isShowTime = true;
});
that.applyList = resultArray;
that.$forceUpdate();
}
},
() => {
that.loading = false;
}
);
},
goPage($itm, $item) {
let that = this;
console.log("当前行点击事件:", $itm);
if ($itm.recordStatus == 1) {
//
uni.navigateTo({
url: "/root/bind/view?id=" + $itm.id + "&type=2&status=" + $itm.recordStatus + "&time=" + $item.time,
});
} else {
let params = {
id: $itm.agencyId,
type: 2,
isShowMore: false,
isShowJob: false,
};
if (that.type == 1) {
//
if ($itm.recordStatus == 2) {
//
params.isShowMore = true;
params.isShowJob = true;
}
} else {
//
if ($itm.recordStatus == 2) {
//
// if(){//
// params.isShowMore = true;
// params.isShowJob = true;
// }else{//
params.isShowMore = true;
params.isShowJob = false;
// }
}
}
uni.navigateTo({
url: "/root/detail/user?" + that.G.objToStr(params),
});
}
},
quickSuccess($itm, $inx) {
let that = this;
that.G.Get(
that.api.bind_recordSubmit + "/" + $itm.id,
{
id: $itm.id,
},
(res) => {
$itm.recordStatus = 2;
that.$forceUpdate();
}
);
},
},
};
</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>

@ -0,0 +1,508 @@
<template>
<view class="p-bind-inedx g_w_all g_h_all g_bg_f_5 g_kuaishou">
<!-- 搜索栏 -->
<view class="g-components-panel-hr g_flex_row_center" style="padding-bottom: 6px">
<view class="g_flex_column_center">
<view class="doc-left"></view>
</view>
<view class="g_flex_column_center g_fs_14 g_c_9 g_mr_10 g_ml_10 g_pt_10 g_pb_10">{{ "以下发单号向您发出关注邀请" }}</view>
<view class="g_flex_column_center">
<view class="doc-right"></view>
</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>
<rh-loading :loading="loading" v-if="loading && speed == -1" />
<view v-if="!loading && speed == 0" class="g_pt_130">
<rh-empty :text="isLogin ? '暂无数据' : '请登录'" />
</view>
<scroll-view v-if="speed > 0" :scroll-y="true" @scrolltolower="reachBottom">
<view class="item g_flex_row_between g_pl_16 g_pr_16 g_pb_6 g_pt_6 g_bg_f" hover-class="thover" 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">
<rh-image :url="item.logo" size="96" radius="6" v-if="item.logo" />
<rh-image size="96" radius="6" v-if="!item.logo" />
<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_fw_600 g_flex_none" style="max-width: 460rpx">{{ 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_ell_1 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 g_ml_5 g_c_3">
{{ item.jobNum ? item.jobNum : "0" }}
</view>
</view>
<view class="g_flex_row_start">
<view> 今日更新 </view>
<view class="g_mr_8 g_ml_5 g_c_3">
{{ item.jobUpdateNum ? item.jobUpdateNum : "0" }}
</view>
</view>
<view class="g_flex_row_start">
<view> 粉丝 </view>
<view class="g_mr_8 g_ml_5 g_c_3">
{{ item.downNum ? item.downNum : "0" }}
</view>
</view>
</view>
</view>
</view>
<view class="g_flex_column_center g_mb_12">
<view>
<view class="g_radius_14 g_h_28 g_border_main 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="thover" hover-stop-propagation>
<i class="iconfont icon-tianjia g_fsi_12 g_mr_6"></i>
关注
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-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>
</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,
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,
},
};
},
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");
uni.setStorageSync("watch_invite", 1);
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.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) {},
reachBottom() {
console.log('123123123123');
let that = this;
if (that.query.isFinish == -1 || that.query.isFinish == that.query.size) {
that.query.page++;
that.getList("concat");
}
},
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 + ")";
}
);
},
getList($type = "init") {
let that = this;
that.isShow = false;
that.G.Get(
that.api.user_getInviteList,
{
pageSize: 15,
pageNum: that.query.page,
},
(res) => {
that.isShow = true;
that.speed = res.length;
if (that.speed == 0) {
that.loading = false;
} else {
that.loading = true;
}
if ($type == "init") {
that.query.list = [];
that.query.list = res;
} else {
that.query.list = that.query.list.concat(res);
}
}
);
},
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();
console.log("$item", $item);
// return
if (this.G.isLogin()) {
if ($item.supplierAccount == 1) {
let params = {
id: $item.id,
type: 1,
bindid: $item.id,
isShowMore: false,
isShowJob: false,
};
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;
console.log("$item", $item);
// return
that.G.Post(
that.api.user_updateInviteId,
{
agencyIds: $item.id,
},
(res) => {
console.log(res);
uni.showToast({
title: "关注成功",
icon: "success",
});
that.getList();
}
);
// if ($item.recordStatus == 5 || $item.recordStatus == 6) {
// } else {
// uni.navigateTo({
// url: "/root/bind/applyForm?code=" + $item.agencyId + "&form=1",
// });
// }
},
},
};
</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;
}
}
}
.g-components-panel-hr {
padding-bottom: 16px;
.doc-left {
width: 43px;
height: 2px;
border-top: 1px solid;
border-image: linear-gradient(270deg, rgba(255, 255, 255, 0.2), #cccccc) 1 1;
transform: rotate(180deg);
}
.doc-right {
width: 43px;
height: 2px;
border-top: 1px solid;
border-image: linear-gradient(270deg, rgba(255, 255, 255, 0.2), #cccccc) 1 1;
}
}
</style>

@ -0,0 +1,144 @@
<template>
<view class="p-root-other-more g_w_all g_h_all g_bg_f_5 g_pl_10 g_pr_10 g_kuaishou" style="box-sizing:border-box">
<view class="g_h_10 g_w_pull"></view>
<view class="g_bg_f g_pl_16 g_pr_16 g_radius_8 g_mb_24">
<view class="g_flex_row_between g_h_56" v-if="type == 1 || type == 3" :class="type == 3 ? 'g_border_e_b' : ''">
<view class="g_flex_column_center g_fs_16 g_c_3">不看他的职位</view>
<view class="g_flex_column_center">
<u-switch v-model="pLook" activeColor="#00B666" @change="handlePeople"></u-switch>
</view>
</view>
<view class="g_flex_row_between g_h_56" v-if="type == 2 || type == 3">
<view class="g_flex_column_center g_fs_16 g_c_3">不让他看我的职位</view>
<view class="g_flex_column_center">
<u-switch v-model="mLook" activeColor="#00B666" @change="handleSee"></u-switch>
</view>
</view>
</view>
<rh-button primaryColor='#00b666' mode="square" class="" type="delete" size="medium" :btnText="type == 1 || (type == 3 && from == 1) ? '取消关注' : '删除粉丝'" @clickBtn="goReturn"></rh-button>
</view>
</template>
<script>
export default {
onReady() {
this.G.setNavStyle();
},
onShareAppMessage() {
return this.G.shareFun();
},
data() {
return {
id: 0,
mLook: true,
pLook: false,
type: 0,
delta: 2,
lid: 0,
hid: 0,
from: 0,
};
},
onLoad(options) {
console.log("options", options);
this.delta = options.delta;
this.id = options.id;
this.mLook = options.himSee == 1 ? false : true;
this.pLook = options.lookHim == 1 ? false : true;
this.type = options.type;
this.lid = options.lid;
this.hid = options.hid;
this.from = options.from;
},
methods: {
handleSee(e) {
let that = this;
that.G.Get(
that.api.bind_isSee + "/" + that.hid,
{
id: that.hid,
himSee: e ? 0 : 1,
},
() => {
uni.showToast({
icon: "success",
title: "更新成功",
});
}
);
},
handlePeople(e) {
let that = this;
that.G.Get(
that.api.bind_setPeolple + "/" + that.lid,
{
id: that.lid,
lookHim: e ? 0 : 1,
},
() => {
uni.showToast({
icon: "success",
title: "更新成功",
});
}
);
},
goReturn() {
let that = this;
if (that.type == 1 || (that.type == 3 && that.from == 1)) {
that.G.handleConfirm({
content: "确认取消关注吗?",
success: (res) => {
if (res.confirm) {
that.G.Get(
that.api.bind_cancelApply + "/" + that.id,
{
agencyId: that.id,
},
() => {
uni.showToast({
icon: "success",
title: "取消关注成功",
});
setTimeout(() => {
uni.navigateBack({
delta: that.delta,
});
}, 1500);
}
);
}
},
});
} else {
that.G.handleConfirm({
content: "确认删除粉丝吗?",
success: (res) => {
if (res.confirm) {
that.G.Get(
that.api.bind_delApply + "/" + that.id,
{
agencyId: that.id,
},
() => {
uni.showToast({
icon: "success",
title: "删除粉丝成功",
});
setTimeout(() => {
uni.navigateBack({
delta: that.delta,
});
}, 1500);
}
);
}
},
});
}
},
},
};
</script>
<style></style>

@ -0,0 +1,511 @@
<template>
<view class="p-root-bind-my-main g_flex_column_center flex_center g_w_all g_h_all g_bg_f_5 g_kuaishou" :style="{ 'background-image': showBg ? 'url(' + cdnBaseImg + 'share_bg.svg)' : '' }" :class="showBg ? 'g_pt_32' : ''">
<view class="g_flex_row_center g_fs_22 g_c_3 g_fw_600 g_mb_24" v-if="showBg"></view>
<!-- #ifdef APP-PLUS || MP-WEIXIN -->
<image :src="shareJobImg" show-menu-by-longpress style="width: 343px; height: 555px; margin: 0 auto; display: block" mode=""></image>
<view class="g_text_c g_fs_16 g_mt_12 g_mb_12 g_fw_600">长按图片转发给微信好友</view>
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<canvas
:style="{
width: canvasWidth + 'px',
height: canvasHeight + 'px',
position: 'absolute',
left: '-2000px',
background: '#fff',
}"
canvas-id="text"
></canvas>
<!-- #endif -->
<!-- #ifdef H5 -->
<view class="canvas-card g_position_rela" id="canvas-card" style="background-image: url('https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/v3/bg.png')">
<view class="m-card g_position_abso" style="left: 50%; transform: translateX(-50%)">
<view class="g_w_all g_h_all g_position_rela">
<view class="g_pl_20 g_pt_18 g_pr_24">
<view class="">
<view class="g_fs_20 g_c_3 g_fw_600">{{ agencyName }}</view>
<view class="g_fs_14 g_c_9 g_mt_6">今日更新职位{{ recommendList.jobUpdateNum }}</view>
</view>
<view>
<image
:src="recommendList.logo"
style="border-radius: 50%; position: absolute; border: 2px solid #fff"
:style="{
width: appLogoSize / 2 + 'px',
height: appLogoSize / 2 + 'px',
top: appLogoTop,
right: appLogoLeft,
}"
></image>
</view>
</view>
<view class="g_flex_row_start g_pl_20" style="margin-top: 28px">
<view class="g_mr_12">
<view class="g_fs_22 g_c_3 g_flex_row_center g_fw_600">{{ recommendList.jobNum }}</view>
<view class="g_fs_14 g_c_9 g_mt_4 g_flex_row_center">总职位</view>
</view>
<view class="g_mr_12">
<view class="g_fs_22 g_c_3 g_flex_row_center g_fw_600">{{ recommendList.recruitmentJobNum.toString() }}</view>
<view class="g_fs_14 g_c_9 g_mt_4 g_flex_row_center">在招数</view>
</view>
<view class="">
<view class="g_fs_22 g_c_3 g_flex_row_center g_fw_600">{{ recommendList.downNum }}</view>
<view class="g_fs_14 g_c_9 g_mt_4 g_flex_row_center">粉丝数</view>
</view>
</view>
</view>
</view>
<view class="m-logo g_flex_c">
<image
:src="wxCode"
style="position: absolute; left: 50%; transform: translateX(-50%)"
:style="{
width: appCodeSize / 2 + 'px',
height: appCodeSize / 2 + 'px',
top: appCodeTop,
}"
></image>
</view>
</view>
<!-- #endif -->
<view v-if="allowClick">
<view class="g_h_100"></view>
<rh-fixed>
<slot>
<view class="g_flex_row_center">
<!-- #ifdef APP-PLUS -->
<rh-button primaryColor='#00b666' btnText="扫一扫" size="small" type="default" @clickBtn="handleOpenCamera"></rh-button>
<rh-button primaryColor='#00b666' btnText="保存图片" class="g_ml_16" size="small" type="primary" @clickBtn="saveAppImageCanvas"></rh-button>
<!-- #endif -->
<!-- #ifdef H5 -->
<rh-button primaryColor='#00b666' btnText="保存图片" size="small" type="primary" @clickBtn="saveH5ImageCanvas"></rh-button>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<rh-button primaryColor='#00b666' btnText="保存图片" size="small" type="default" @clickBtn="saveWXImageToAlbum"></rh-button>
<rh-button primaryColor='#00b666' btnText="直接转发" class="g_ml_16" size="small" openType="share" type="primary"></rh-button>
<!-- #endif -->
</view>
</slot>
</rh-fixed>
</view>
<!-- #ifdef MP-WEIXIN -->
<canvas type="2d" style="position: absolute; left: -2000px; width: 425px; height: 350px; background: #fff" id="canvasId" ref="canvasId"></canvas>
<!-- #endif -->
</view>
</template>
<script>
// #ifdef H5
import { saveAs } from "file-saver";
// #endif
export default {
onReady() {
this.G.setNavStyle();
},
onShareAppMessage() {
return this.G.shareFun();
},
data() {
return {
localBaseImg: this.G.store().localBaseImg,
cdnBaseImg: this.G.store().cdnBaseImg,
wxCode: "",
appCodeSize: 0,
appLogoSize: 0,
appCodeTop: 0,
appLogoTop: 0,
appLogoLeft: 0,
agencyName: "",
shareJobImg: "",
allowClick: false,
appInfo: {},
appfile: null,
canvasWidth: 0,
canvasHeight: 0,
};
},
props: {
showBg: {
type: Boolean,
default: () => {
return true;
},
},
active: {
default: 0,
},
recommendList: {
type: Object,
default: () => {
return {
logo: "",
jobNum: 0,
jobUpdateNum: 0,
recruitmentJobNum: 0,
downNum: 0,
};
},
},
},
created() {
let that = this;
uni.getImageInfo({
src: "https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/canvasBg.png", //
success(res) {
that.canvasWidth = res.width;
that.canvasHeight = res.height;
},
});
// #ifdef MP-WEIXIN || H5
this.init();
uni.showLoading({
title: "生成中...",
});
// #endif
},
watch: {
shareJobImg(newValue, oldValue) {
if (newValue) {
uni.hideLoading();
}
},
recommendList(val) {
let that = this;
// #ifdef APP-PLUS || MP-KUAISHOU || MP-TOUTIAO
console.log("watch:", val);
uni.showLoading({
title: "生成中...",
});
that.appInfo = val;
this.init();
// #endif
},
// $route: "init",
},
methods: {
init() {
let that = this;
that.appInfo = that.recommendList;
console.log("that.appInfo", that.appInfo);
// #ifdef APP-PLUS || MP-KUAISHOU
let _env = "app";
// #endif
// #ifdef H5
let _env = "app";
// #endif
// #ifdef MP-WEIXIN
let _env = uni.getAccountInfoSync().miniProgram.envVersion;
// #endif
that.G.Get(
that.api.bind_getCode,
{
env: _env,
},
(res) => {
console.log("获取邀请码:", res);
that.wxCode = "https://daotian.matripe.com.cn" + res.qrcode;
that.agencyName = res.agencyName;
// #ifdef MP-WEIXIN
console.log("canvasRes1");
that.getWXCanvas("https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/canvasBg.png").then((canvasRes) => {
console.log("canvasRes", canvasRes);
that.shareJobImg = canvasRes.tempFilePath;
that.allowClick = true;
that.$emit("setImg", that.shareJobImg);
});
that.$emit("exportCode", {
code: res.code,
agencyName: res.agencyName,
});
// #endif
// #ifdef H5
that.appCodeSize = uni.getSystemInfoSync().windowWidth * (122 / 375) * 2;
that.appCodeTop = (((uni.getSystemInfoSync().windowWidth - 32) * 2248) / 1372) * (290 / 562) + "px";
that.appLogoSize = uni.getSystemInfoSync().windowWidth * (68 / 375) * 2;
that.appLogoTop = (((uni.getSystemInfoSync().windowWidth - 32) * 2248) / 1372) * (36 / 562) - uni.getSystemInfoSync().windowWidth * 0.046 + "px";
that.appLogoLeft = (uni.getSystemInfoSync().windowWidth - 74) * (24 / 303) + uni.getSystemInfoSync().windowWidth * 0.00065 + "px";
uni.hideLoading();
that.allowClick = true;
that.$emit("exportCode", {
code: res.code,
agencyName: res.agencyName,
});
// #endif
// #ifdef APP-PLUS || MP-KUAISHOU
uni.hideLoading();
that.allowClick = true;
that.getAppCanvas("https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/canvasBg.png");
console.log("canvasRes12");
// #endif
}
);
},
// App
getAppCanvas(sharelImg, type) {
let that = this,
ctx = uni.createCanvasContext("text");
let info = that.appInfo;
new Promise(function (resolve) {
//
uni.downloadFile({
url: sharelImg,
success: function (bgRes) {
uni.getImageInfo({
src: bgRes.tempFilePath, //
success(res) {
let _width = res.width;
let _height = res.height;
ctx.drawImage(bgRes.tempFilePath, 0, 0, _width, _height);
uni.downloadFile({
url: info.logo,
success: function (bgRes) {
that.G.roundRect(ctx, bgRes.tempFilePath, 915, 218, 272, 272, 136); // logo
uni.downloadFile({
url: that.wxCode,
success: function (QRres) {
that.G.roundRect(ctx, QRres.tempFilePath, (_width - 488) / 2, 1160, 488, 488, 0);
that.G.fillTextLineBreak(ctx, info.agencyName, 140, 300, info.agencyName.length * 80, 80, "#333", 80, 600, "left"); //
that.G.fillTextLineBreak(ctx, "今日更新职位" + info.jobUpdateNum, 140, 400, ("今日更新职位" + info.jobUpdateNum).length * 56, 56, "#999", 56, 500, "left"); //
that.G.fillTextLineBreak(ctx, info.jobNum.toString(), 230, 620, info.jobNum.toString().length * 88, 88, "#333", 88, 600); //
that.G.fillTextLineBreak(ctx, info.recruitmentJobNum.toString(), 480, 620, info.recruitmentJobNum.toString().length * 88, 88, "#333", 88, 600); //
that.G.fillTextLineBreak(ctx, info.downNum.toString(), 730, 620, info.downNum.toString().length * 88, 88, "#333", 88, 600); //
that.G.fillTextLineBreak(ctx, "总职位", 230, 700, "总职位".length * 56, 56, "#999", 56, 500); //
that.G.fillTextLineBreak(ctx, "在招数", 480, 700, "在招数".length * 56, 56, "#999", 56, 500); //
that.G.fillTextLineBreak(ctx, "粉丝数", 730, 700, "粉丝数".length * 56, 56, "#999", 56, 500); //
ctx.restore();
ctx.draw(false, () => {
setTimeout(function () {
that.endAppCanvas(ctx, _width, _height);
}, 50);
});
},
});
},
});
},
fail(err) {},
});
},
});
}).then(() => {});
},
endAppCanvas(ctx, _width, _height) {
let that = this;
uni.canvasToTempFilePath({
x: 0,
y: 0,
width: _width,
height: _height,
canvasId: "text",
success: function (pathRres) {
const savedFilePath = pathRres.tempFilePath; //
const path = plus.io.convertLocalFileSystemURL(savedFilePath); //
const fileReader = new plus.io.FileReader();
fileReader.readAsDataURL(path);
fileReader.onloadend = (res) => {
that.shareJobImg = res.target.result;
that.appfile = savedFilePath;
};
},
});
},
//
getWXCanvas(sharelImg, type) {
const that = this;
return new Promise((resolve) => {
var mycenter = 0; //
var myheight = 0; //
const query = uni.createSelectorQuery().in(this);
query
.select("#canvasId")
.fields({
node: true,
size: true,
})
.exec((res) => {
console.log("uni 获取节点信息:", res);
// console.log("sharelImg", sharelImg);
const canvas = res[0].node;
const ctx = canvas.getContext("2d");
new Promise(function (resolve) {
//
uni.getImageInfo({
src: sharelImg, //
success(res) {
console.log("res111", res);
canvas.width = res.width;
canvas.height = res.height;
mycenter = canvas.width;
myheight = canvas.height;
const img = canvas.createImage();
img.src = res.path;
console.log("img111", img);
img.onload = (info) => {
//
ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
console.log("info111", info);
resolve(true);
};
},
fail(err) {},
});
}).then(() => {
//使
this.setShareJobImg(ctx, canvas, mycenter)
.then(function (canvas1) {
console.log("canvas1", canvas1);
uni.canvasToTempFilePath({
canvas: canvas1,
success(res) {
console.log("res222", res);
resolve(res);
},
fail(res) {
uni.hideLoading();
uni.showToast({
title: res.errMsg,
icon: "error",
});
},
});
})
.catch((err) => {
uni.hideLoading();
uni.showToast({
title: "生成失败,请重试",
});
});
});
});
});
},
//
saveWXImageToAlbum() {
let that = this;
uni.saveImageToPhotosAlbum({
filePath: that.shareJobImg,
success() {
uni.showToast({
title: "保存成功",
});
},
fail(err) {
uni.showToast({
title: "保存失败, 请重试",
});
},
});
},
// H5
saveH5ImageCanvas() {
let that = this;
// #ifdef H5
// #endif
},
// APP
saveAppImageCanvas() {
let that = this;
uni.saveImageToPhotosAlbum({
filePath: that.appfile,
success() {
uni.showToast({
title: "保存成功",
icon: "success",
});
},
fail() {
uni.showToast({
title: "保存失败",
icon: "none",
});
},
});
},
//
setShareJobImg(ctx, canvas, mycenter, funObj) {
let that = this;
return new Promise((imgres) => {
uni.getImageInfo({
src: that.wxCode,
success(res) {
const img = canvas.createImage();
console.log("res333", res);
img.src = res.path;
img.onload = () => {
that.G.roundRect(ctx, img, (mycenter - 488) / 2, 1160, 488, 488, 0);
let info = that.recommendList;
console.log("info", info);
if (!info.logo) {
info.logo = "https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/ibocai/defaultAvatar.png";
}
console.log("that.recommendList333", that.recommendList);
uni.getImageInfo({
src: info.logo,
success(res) {
console.log("res444", res);
const img = canvas.createImage();
img.src = res.path;
img.onload = () => {
that.G.roundRect(ctx, img, 915, 218, 272, 272, 136); // logo
that.G.fillTextLineBreak(ctx, info.fullName, 140, 300, info.fullName.length * 80, 80, "#333", 80, 600, "left"); //
that.G.fillTextLineBreak(ctx, "今日更新职位" + info.jobUpdateNum, 140, 400, ("今日更新职位" + info.jobUpdateNum).length * 56, 56, "#999", 56, 500, "left"); //
that.G.fillTextLineBreak(ctx, info.jobNum.toString(), 230, 620, info.jobNum.toString().length * 88, 88, "#333", 88, 600); //
that.G.fillTextLineBreak(ctx, info.recruitmentJobNum.toString(), 480, 620, info.recruitmentJobNum.toString().length * 88, 88, "#333", 88, 600); //
that.G.fillTextLineBreak(ctx, info.downNum.toString(), 730, 620, info.downNum.toString().length * 88, 88, "#333", 88, 600); //
that.G.fillTextLineBreak(ctx, "总职位", 230, 700, "总职位".length * 56, 56, "#999", 56, 500); //
that.G.fillTextLineBreak(ctx, "在招数", 480, 700, "在招数".length * 56, 56, "#999", 56, 500); //
that.G.fillTextLineBreak(ctx, "粉丝数", 730, 700, "粉丝数".length * 56, 56, "#999", 56, 500); //
imgres(canvas);
};
},
fail(err) {},
});
};
},
fail(err) {},
});
});
},
//
handleOpenCamera() {
let that = this;
that.G.handleScanCode();
},
},
};
</script>
<style lang="scss">
.p-root-bind-my-main {
background-size: 100% 100%;
background-repeat: no-repeat;
.canvas-card {
background-size: 100% 100%;
background-repeat: no-repeat;
width: calc(100vw - 32px);
height: calc(calc(100vw - 32px) * 2248 / 1372);
}
.m-card {
top: calc(calc(calc(100vw - 32px) * 2248 / 1372) * (36 / 562));
border-radius: 15px;
width: calc(100vw - 74px);
height: calc(calc(calc(100vw - 32px) * 2248 / 1372) * (198 / 562));
}
}
</style>

@ -0,0 +1,500 @@
<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>
<rh-loading :loading="loading" v-if="loading && speed == -1" />
<view v-if="!loading && speed == 0 && inviteNum <= 0" class="g_pt_130" style="padding-top:130px">
<rh-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">
<rh-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="thover" 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">
<rh-image :url="item.logo || 'https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/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="thover" 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="thover" 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="thover" 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>
</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>

@ -0,0 +1,179 @@
<template>
<div class="p-root-bind-search g_w_all g_bg_f_5 g_kuaishou" style="min-height: 100%">
<!-- #ifdef APP-PLUS || H5 -->
<u-navbar back-icon-color="#333333" back-icon-size="40" title="发展代理" title-size="36" title-color="#111111" :title-bold="false">
<!-- <div class="g_pr_16" slot='right' @click="handleOpenSharePop">
<i class="iconfont icon-zhuanfa1 g_c_3" style="font-size: 36rpx;"></i>
</div> -->
</u-navbar>
<!-- #endif -->
<div class="g_flex_row_center g_fs_20 g_c_3 g_fw_600 g_mb_16 g_pt_24">邀请代理/供应商关注我的发单号</div>
<div>
<mainPanel :showBg="false" :active="active" @exportCode="getCode" @setImg="setShareImg" />
</div>
<u-popup v-model="sharePop.isShow" mode="bottom" border-radius="16">
<div class="g_fs_14 g_flex_row_center g_pt_20 g_pb_20" style="color: #323233">立即分享给好友</div>
<div class="g_flex_row_center">
<div v-for="(item, index) in sharePop.type" :key="index" style="width: 25%" class="g_flex_row_center" @click="handleOpenApp(item, index)">
<div class="">
<div class="g_flex_row_center">
<image :src="localBaseImg + 'share/' + item.icon + '.svg'" style="width: 48px; height: 48px"></image>
</div>
<div class="g_pt_8 g_pb_16 g_fs_12 g_flex_row_center" style="color: #646566">{{ item.name }}</div>
</div>
</div>
</div>
<div class="g_h_8 g_bg_f_5"></div>
<div class="g_h_48 g_flex_c g_fs_16" style="color: #646566" @click="sharePop.isShow = false">取消</div>
</u-popup>
</div>
</template>
<script>
import mainPanel from "../../components/myMain.vue";
export default {
components: {
mainPanel,
},
data() {
return {
localBaseImg: this.G.store().localBaseImg,
agencyInfo: uni.getStorageSync("agencyInfo"),
userInfo: uni.getStorageSync("apply-userinfo"),
active: 0,
placeholder: "",
wxCode: "",
keyword: "",
agencyName: "报名助手",
recommendList: [],
shareImg: "",
sharePop: {
isShow: false,
type: [
{
icon: "wechat",
name: "微信好友",
tip: "wechat",
},
{
icon: "friends",
name: "朋友圈",
tip: "friends",
},
{
icon: "tiktok",
name: "抖音好友",
tip: "douyin",
},
{
icon: "kwai",
name: "快手好友",
tip: "kwai",
},
],
},
};
},
onReady() {
this.G.setNavStyle();
},
onShareAppMessage1() {
let that = this;
let params = {
id: uni.getStorageSync("apply-agencyId"),
type: that.active + 1,
isShowMore: false,
isShowJob: false,
shareForm: "friend",
};
console.log("代理id", that.recommendList);
return this.G.shareFun("/root/person/inviteFollowMe?scene=" + `id=${that.agencyInfo.id}_${that.userInfo.id}`, this.shareImg, that.agencyInfo.fullName + "邀请您关注他的发单号,快来关注吧!");
},
onLoad(options) {
console.log(options);
this.active = options.active;
console.log('uni.getStorageSync("poster_img")', uni.getStorageSync("poster_img"));
if (!uni.getStorageSync("poster_img")) {
console.log('uni.getStorageSync("poster_img")1', uni.getStorageSync("poster_img"));
// uni.showLoading({
// title: "...",
// });
} else {
console.log('uni.getStorageSync("poster_img")2', uni.getStorageSync("poster_img"));
uni.showLoading({
title: "加载中...",
});
}
this.placeholder = "请输入粉丝ID账号";
uni.setNavigationBarTitle({
title: "发展代理",
});
uni.onAfterPageUnload(() => {
console.log("onAfterPageUnload");
// setTimeout(() => {
uni.removeStorageSync("poster_img");
// }, 3000);
});
},
onShow() {
this.getDetail();
},
methods: {
setShareImg(e) {
console.log(e);
this.shareImg = e;
},
getDetail() {
let that = this;
that.G.Get(
that.api.bind_enterpriseDetail + "/" + uni.getStorageSync("apply-agencyId"),
{
agencyId: uni.getStorageSync("apply-agencyId"),
type: 1,
},
(res) => {
console.log("recommendList", res);
that.recommendList = [res];
console.log("--", that.recommendList);
}
);
},
getCode(e) {
console.log("获取返回数据:", e);
this.wxCode = e.code;
this.agencyName = e.agencyName;
uni.hideLoading();
},
goMain() {
let that = this;
uni.navigateTo({
url: "/root/bind/applyForm?code=" + that.keyword + "&form=1",
});
},
handleCopyText() {
this.G.copyText(this.wxCode);
},
//
handleOpenSharePop() {
let that = this;
that.sharePop.isShow = true;
},
// app
handleOpenApp($item, $index) {
let that = this;
that.G.handleConfirm({
content: "功能开发中",
success: (res) => {
if (res.confirm) {
that.sharePop.isShow = false;
}
},
});
},
},
};
</script>
<style></style>

@ -0,0 +1,131 @@
<template>
<view class="p-root-bind-view g_w_all g_h_all g_bg_f_5 g_kuaishou">
<view class="g_h_10"></view>
<g-panel-card-info
:info="{
avatar: info.logo,
title: info.agencyName,
num: '已发布职位' + info.jobNum,
}"
:isShowMore="type == 2 && title != '三天前' && status != 1 ? 1 : 0"
/>
<!-- <view class="g_mt_10 g_bg_f g_p_16 g_ml_10 g_mr_10 g_radius_8">
<view class="g_mt_10 g_fs_16 g_bg_f_7 g_pl_16 g_pr_16 g_radius_8 g_pt_14 g_pb_14">
<view>{{info.agencyName}}{{info.remark ? info.remark : '-'}}</view>
</view>
</view> -->
<view class="g_mt_10 g_bg_f g_p_16 g_ml_10 g_mr_10 g_radius_8 g_flex_row_start" v-if="type == 2 && title != '三天前'">
<view class="g_fs_16 g_c_3">来源</view>
<view class="g_fs_16 g_c_9 g_ml_28">{{ info.messageSource }}</view>
</view>
<view class="g_flex_row_center g_mt_32" v-if="type == 2 && title != '三天前'">
<rh-button primaryColor='#00b666' btnText="通过" type="primary" @clickBtn="handleSubmit" />
</view>
</view>
</template>
<script>
export default {
onReady() {
this.G.setNavStyle();
},
onShareAppMessage() {
return this.G.shareFun();
},
data() {
return {
id: 0,
type: 0,
info: {
logo: "",
agencyName: "",
jobNum: 0,
agencyId: 0,
form: "-",
remark: "-",
},
status: 0,
title: "",
};
},
onLoad(option) {
this.id = option.id;
this.type = option.type;
this.status = option.status;
this.title = option.time;
this.getList();
},
methods: {
getList() {
let that = this;
that.G.Get(
that.api.bind_recordDetail + "/" + that.id,
{
id: that.id,
},
(res) => {
console.log("获取详情:", res);
that.info = res;
}
);
},
goPage($path) {
if (this.type == 2 && this.title != "三天前") {
uni.navigateTo({
url: $path,
});
}
},
handleSubmit() {
let that = this;
uni.showLoading({
title: "正在处理",
});
setTimeout(() => {
uni.showLoading({
title: "已发送",
});
uni.hideToast();
setTimeout(() => {
that.G.Get(
that.api.bind_recordSubmit + "/" + that.id,
{
id: that.id,
},
(res) => {
uni.showToast({
title: "已通过验证",
success() {},
});
let params = {
id: that.info.agencyId,
type: that.type,
isShowMore: false,
isShowJob: false,
};
if (res == 1) {
//
params.isShowMore = true;
params.isShowJob = true;
} else {
//
params.isShowMore = true;
params.isShowJob = false;
}
const pages = getCurrentPages();
let _path = pages[pages.length - 1].route;
setTimeout(() => {
uni.navigateBack({
delta: 1,
});
}, 1500);
}
);
}, 300);
}, 500);
},
},
};
</script>
<style lang="scss"></style>

@ -1,8 +1,8 @@
@font-face {
font-family: 'iconfont'; /* Project id 4374774 */
src: url('//at.alicdn.com/t/c/font_4374774_yuyedly37t.woff2?t=1778143633935') format('woff2'),
url('//at.alicdn.com/t/c/font_4374774_yuyedly37t.woff?t=1778143633935') format('woff'),
url('//at.alicdn.com/t/c/font_4374774_yuyedly37t.ttf?t=1778143633935') format('truetype');
src: url('//at.alicdn.com/t/c/font_4374774_663j8f9o04i.woff2?t=1778226227404') format('woff2'),
url('//at.alicdn.com/t/c/font_4374774_663j8f9o04i.woff?t=1778226227404') format('woff'),
url('//at.alicdn.com/t/c/font_4374774_663j8f9o04i.ttf?t=1778226227404') format('truetype');
}
.iconfont {
@ -13,6 +13,22 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-collapse:before {
content: "\e900";
}
.icon-expand:before {
content: "\e902";
}
.icon-sisternode:before {
content: "\e903";
}
.icon-index:before {
content: "\e90f";
}
.icon-folder-add:before {
content: "\e7d1";
}

@ -1010,6 +1010,122 @@ let data = {
return str;
},
drawCenteredText (ctx, x, y, textSegments) {
// 计算总宽度
const totalWidth = this.calculateTotalWidth(ctx, textSegments);
// console.log('totalWidth', totalWidth, textSegments);
// 计算起始X坐标居中位置
const centerX = x;
const startX = (centerX - totalWidth) / 2;
const centerY = y;
// 绘制拼接文本
let currentX = startX;
textSegments.forEach((segment) => {
if (segment) {
ctx.font = `${segment.fontWeight} ${segment.fontSize}px Arial`;
ctx.fillStyle = segment.color;
// 文本基线设为中间,使垂直方向也居中
// ctx.textBaseline = "middle";
// 绘制当前文本片段
ctx.fillText(segment.content, currentX, centerY);
// 更新X坐标为下一段文本做准备, 文本长度为1的时候使用字体大小
currentX += ((ctx.measureText(segment.content).width) + (segment.space || 0));
}
});
},
calculateTotalWidth (ctx, segments) {
let totalWidth = 0;
segments.forEach((segment) => {
// console.log('segment', segment);
if (segment) {
ctx.font = `${segment.fontWeight} ${segment.fontSize}px Arial`;
totalWidth += ((ctx.measureText(segment.content).width) + (segment.space || 0));
}
});
return totalWidth;
},
// 绘制折线
setZigzag (ctx) {
// 定义折线的点坐标 (形成90度角)
const points = [
{ x: 100, y: 100 }, // 起点
{ x: 200, y: 100 }, // 转折点
{ x: 200, y: 200 } // 终点
];
let cornerRadius = -10
// 设置线条样式
ctx.lineWidth = lineWidth;
ctx.strokeStyle = strokeColor;
ctx.lineCap = 'round';
// 开始绘制路径
ctx.beginPath();
// 从第一个点开始
ctx.moveTo(points[0].x, points[0].y);
// 遍历所有点,处理转折点
for (let i = 1; i < points.length - 1; i++) {
const prev = points[i - 1];
const curr = points[i];
const next = points[i + 1];
// 计算进入和离开转折点的方向向量
const inVector = { x: curr.x - prev.x, y: curr.y - prev.y };
const outVector = { x: next.x - curr.x, y: next.y - curr.y };
// 归一化向量
const inLength = Math.sqrt(inVector.x ** 2 + inVector.y ** 2);
const outLength = Math.sqrt(outVector.x ** 2 + outVector.y ** 2);
const normalizedIn = {
x: inVector.x / inLength,
y: inVector.y / inLength,
};
const normalizedOut = {
x: outVector.x / outLength,
y: outVector.y / outLength,
};
// 计算拐角的起点和终点距离转折点cornerRadius的位置
const start = {
x: curr.x - normalizedIn.x * cornerRadius,
y: curr.y - normalizedIn.y * cornerRadius,
};
const end = {
x: curr.x + normalizedOut.x * cornerRadius,
y: curr.y + normalizedOut.y * cornerRadius,
};
// 绘制到拐角起点
ctx.lineTo(start.x, start.y);
// 计算切线方向,绘制贝塞尔曲线作为圆角
const control1 = {
x: start.x + normalizedOut.x * cornerRadius,
y: start.y + normalizedOut.y * cornerRadius,
};
const control2 = {
x: end.x - normalizedIn.x * cornerRadius,
y: end.y - normalizedIn.y * cornerRadius,
};
ctx.bezierCurveTo(control1.x, control1.y, control2.x, control2.y, end.x, end.y);
}
// 绘制到最后一个点
ctx.lineTo(points[points.length - 1].x, points[points.length - 1].y);
// 描边路径
ctx.stroke();
},
}
export default data;
Loading…
Cancel
Save