监听用户

cyl/master-0819
wangxia 3 months ago
parent 96bbee1bc4
commit 847ece53b3

@ -143,7 +143,7 @@ export default {
appkey: opts.appkey, appkey: opts.appkey,
needReconnect: true, needReconnect: true,
// "reconnectionAttempts": 5, // "reconnectionAttempts": 5,
debugLevel: "debug", debugLevel: "error",
apiVersion: "v2", apiVersion: "v2",
enableV2CloudConversation: true, enableV2CloudConversation: true,
}, },
@ -304,10 +304,11 @@ export default {
if (uni.getStorageSync("apply-token")) { if (uni.getStorageSync("apply-token")) {
that.G.Get(that.api.bind_getApplyNum, {}, (res) => { that.G.Get(that.api.bind_getApplyNum, {}, (res) => {
console.log("获取待处理数量:", res); console.log("获取待处理数量:", res);
if (res.approvePassHasNotRed > 0) { that.G.Get(that.api.person_applyNum, {}, (applyNum) => {
if (res.approvePassHasNotRed + applyNum > 0) {
uni.setTabBarBadge({ uni.setTabBarBadge({
index: 2, index: 2,
text: String(res.approvePassHasNotRed), text: String(res.approvePassHasNotRed+ applyNum),
fail(err) { fail(err) {
console.log("err", err); console.log("err", err);
}, },
@ -321,6 +322,7 @@ export default {
}); });
} }
}); });
});
} }
}, },
}, },

@ -21,7 +21,7 @@
<view v-if="speed > 0" class="link"> <view v-if="speed > 0" class="link">
<block class="" v-for="(item, index) in jobArray" :key="index"> <block class="" v-for="(item, index) in jobArray" :key="index">
<view class="item g_position_rela g_mb_10 g_ml_12 g_mr_12 g_bg_f g_radius_8 g_border_e_b" :class="from == 'share' ? 'g_pl_32' : ''"> <view class="item g_position_rela g_mb_10 g_ml_12 g_mr_12 g_bg_f g_radius_8 g_border_e_b" :class="from == 'share' ? 'g_pl_32' : ''">
<view class="g_p_10" style="" @click="handleCard(item, index)"> <view class="g_p_10 g_position_rela" style="" @click="handleCard(item, index)">
<i class="iconfont icon-yitingzhao" v-if="item.recruitment == 2 && from != 'mine'" style="position: absolute; right: 30px; top: 50%; transform: translateY(-50%); color: #ff4d4f; font-size: 80px; z-index: 1"></i> <i class="iconfont icon-yitingzhao" v-if="item.recruitment == 2 && from != 'mine'" style="position: absolute; right: 30px; top: 50%; transform: translateY(-50%); color: #ff4d4f; font-size: 80px; z-index: 1"></i>
<view class="m-top g_flex_row_between"> <view class="m-top g_flex_row_between">
<view class="g_flex_1 g_flex_column_between"> <view class="g_flex_1 g_flex_column_between">

@ -15,10 +15,11 @@
left: 0; left: 0;
background-color: #fff; background-color: #fff;
padding-top: 12px; padding-top: 12px;
padding-bottom: constant(safe-area-inset-bottom); /*兼容 IOS<11.2*/ padding-bottom: calc(constant(safe-area-inset-bottom)); /*兼容 IOS<11.2*/
padding-bottom: env(safe-area-inset-bottom); /*兼容 IOS>11.2*/ padding-bottom: calc(env(safe-area-inset-bottom)); /*兼容 IOS>11.2*/
min-height:72px; min-height:72px;
border-top: 1rpx solid #eee; border-top: 1rpx solid #eee;
z-index: 999; z-index: 999;
box-sizing: border-box;
} }
</style> </style>

@ -176,7 +176,6 @@ export default {
scrollTop: 0, scrollTop: 0,
defaultTop: 0, defaultTop: 0,
pageSpeed: -1, pageSpeed: -1,
isLogin: null,
localBaseImg: this.G.store().localBaseImg, localBaseImg: this.G.store().localBaseImg,
cdnBaseImg: this.G.store().cdnBaseImg, cdnBaseImg: this.G.store().cdnBaseImg,
showDot: true, // showDot: true, //
@ -781,22 +780,29 @@ export default {
that.G.Get(that.api.bind_getApplyNum, {}, (res) => { that.G.Get(that.api.bind_getApplyNum, {}, (res) => {
console.log("获取待处理数量:", res); console.log("获取待处理数量:", res);
if (res.approvePassHasNotRed > 0) { if (res.approvePassHasNotRed > 0) {
that.readed = false;
} else {
that.readed = true;
}
that.G.Get(that.api.person_applyNum, {}, (applyNum) => {
if (res.approvePassHasNotRed + applyNum > 0) {
uni.setTabBarBadge({ uni.setTabBarBadge({
index: 2, index: 2,
text: String(res.approvePassHasNotRed), text: String(res.approvePassHasNotRed + applyNum),
fail(err) {
console.log("err", err);
},
}); });
that.readed = false;
} else { } else {
try {
uni.removeTabBarBadge({ uni.removeTabBarBadge({
index: 2, index: 2,
fail(err) {
console.log("err", err);
},
}); });
} catch (error) {
console.log("当前页面不是 TabBar 页面,无法移除 badge");
}
that.readed = true;
} }
}); });
});
}, },
goOrder(e) { goOrder(e) {
console.log("e", e); console.log("e", e);

@ -371,25 +371,25 @@ export default {
// //
that.G.roundRect1(ctx, (mycenter - 600) / 2 + 470, 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 + 40, canvas.height - 515, "扫一扫关注我的发单号".length * 54, 58, "#333", 54, 600); // 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 - 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.drawCenteredText(ctx, mycenter, canvas.height - 200, [{ content: "关注后能直接看到单子的代理费/佣金", color: "#333", fontWeight: 500, fontSize: 48 }]);
// //
that.G.roundRect_yuan(ctx, (mycenter - 360) / 2, 110, 360, "#ffffff"); that.G.roundRect_yuan(ctx, (mycenter - 360) / 2, 110, 360, "#ffffff");
uni.getImageInfo({ // uni.getImageInfo({
src: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/phone.png", // // src: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/phone.png", //
success(res) { // success(res) {
const img = canvas.createImage(); // const img = canvas.createImage();
console.log("res333", res); // console.log("res333", res);
img.src = res.path; // img.src = res.path;
img.onload = () => { // img.onload = () => {
that.G.roundRect(ctx, img, (mycenter - 800) / 2 + 100, canvas.height - 565, 70, 70, 0); // that.G.roundRect(ctx, img, (mycenter - 800) / 2 + 100, canvas.height - 565, 70, 70, 0);
resolve(true); resolve(true);
}; // };
}, // },
}); // });
}; };
}, },
fail(err) { fail(err) {
@ -469,6 +469,22 @@ export default {
}, },
}); });
}, },
//
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;
},
// //
setShareJobImg(ctx, canvas, mycenter, funObj) { setShareJobImg(ctx, canvas, mycenter, funObj) {
let that = this; let that = this;

@ -23,7 +23,7 @@
<div class style="padding: 24px 24px"> <div class style="padding: 24px 24px">
<div class="g_text_c g_fw_600 g_c_0 g_position_rela"> <div class="g_text_c g_fw_600 g_c_0 g_position_rela">
报名助手温馨提示 报名助手温馨提示
<div class="g_position_abso" style="right: -4px; top: -10px; font-size: 12px;width:32px;height:32px" @click="confirmWithoutAgency = false"> <div class="g_position_abso" style="right: -4px; top: -10px; font-size: 12px; width: 32px; height: 32px" @click="confirmWithoutAgency = false">
<i class="iconfont icon-guanbi"></i> <i class="iconfont icon-guanbi"></i>
</div> </div>
</div> </div>
@ -154,7 +154,19 @@ export default {
// //
computed: {}, computed: {},
// //
watch: {}, watch: {
joinTeamConfirm(newVal) {
if (newVal) {
this.teamInfo = {};
this.chooseTeam = {};
}
},
submitConfirm(newVal) {
if (newVal) {
this.agencyInfo.fullName = "";
}
},
},
created() { created() {
console.log("alsdfjlasdjfl;askdfjo"); console.log("alsdfjlasdjfl;askdfjo");
}, },
@ -211,10 +223,12 @@ export default {
content: "您已发起申请,审核通过即可加入该团队", content: "您已发起申请,审核通过即可加入该团队",
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
if (that.navNewPage) {
uni.switchTab({ uni.switchTab({
url: "/pages/home/index", url: "/pages/home/index",
}); });
} }
}
}, },
}); });
console.log(res); console.log(res);

@ -248,6 +248,7 @@ export default {
this.inviteUserId = sceneJson.id.split("_")[1]; //id this.inviteUserId = sceneJson.id.split("_")[1]; //id
this.uid = sceneJson.id.split("_")[0]; // id this.uid = sceneJson.id.split("_")[0]; // id
this.fromQRCode = true; // id this.fromQRCode = true; // id
that.G.watchUserPage('/root/detail/userShare');
} else { } else {
this.uid = options.id; this.uid = options.id;
this.isShowMore = options.isShowMore ? true : false; this.isShowMore = options.isShowMore ? true : false;

@ -1,7 +1,19 @@
<template> <template>
<view class="p-person-change g_w_all g_h_all g_bg_f_5 g_kuaishou"> <view class="p-person-change g_w_all g_h_all g_bg_f_5 g_kuaishou">
<view class="g_h_10"></view> <view class="g_h_10"></view>
<g-panel-form-slot <view class="" v-if="info.fieldName != 'address'">
<view class="g_mb_8 g_pl_12">{{ info.label }}</view>
<view class="g_bg_f g_radius_8 g_p_6" style="width: calc(100% - 60rpx); margin: 0 auto">
<!-- #ifdef APP-PLUS || H5 || MP-TOUTIAO || MP-KUAISHOU -->
<u-input type="text" :clearable="false" :password-icon="false" :customStyle="{ fontSize: '17px' }" :placeholder="info.placeholder" input-align="left" class="g_text_r g_w_all" placeholder-style="color:#999999;font-size:17px;line-height:1" v-model="info.value" style="width: calc(100vw - (106px)); flex: none; font-size: 17px" />
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<u-input type="text" :clearable="false" v-if="info.fieldName != 'desp'" :customStyle="{ fontSize: '17px' }" :password-icon="false" :placeholder="info.placeholder" input-align="left" class="g_text_r g_w_all" placeholder-style="color:#999999;font-size:17px;line-height:1" v-model="info.value" />
<u-input type="textarea" :clearable="false" v-else :customStyle="{ fontSize: '17px' }" :password-icon="false" :placeholder="info.placeholder" input-align="left" class="g_text_r g_w_all" placeholder-style="color:#999999;font-size:17px;line-height:1" v-model="info.value" />
<!-- #endif -->
</view>
</view>
<!-- <g-panel-form-slot
:list="[ :list="[
{ {
icon: '', icon: '',
@ -15,15 +27,8 @@
]" ]"
v-if="info.fieldName != 'address'" v-if="info.fieldName != 'address'"
> >
<slot> <slot> </slot>
<!-- #ifdef APP-PLUS || H5 || MP-TOUTIAO || MP-KUAISHOU --> </g-panel-form-slot> -->
<u-input type="text" :clearable="false" :password-icon="false" :customStyle="{ fontSize: '17px' }" :placeholder="info.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999999;font-size:17px;line-height:1" v-model="info.value" style="width: calc(100vw - (106px)); flex: none; font-size: 17px" />
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<u-input type="text" :clearable="false" :customStyle="{ fontSize: '17px' }" :password-icon="false" :placeholder="info.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999999;font-size:17px;line-height:1" v-model="info.value" />
<!-- #endif -->
</slot>
</g-panel-form-slot>
<g-panel-form-slot <g-panel-form-slot
v-else v-else
:list="[ :list="[
@ -61,8 +66,7 @@ export default {
onShareAppMessage() { onShareAppMessage() {
return this.G.shareFun(); return this.G.shareFun();
}, },
components: { components: {},
},
data() { data() {
return { return {
info: {}, info: {},
@ -147,7 +151,7 @@ export default {
this.info.value.address = e.address; this.info.value.address = e.address;
this.info.value.lat = e.lat; this.info.value.lat = e.lat;
this.info.value.lng = e.lng; this.info.value.lng = e.lng;
uni.$emit('getBossAddress',that.avatar) uni.$emit("getBossAddress", that.avatar);
}, },
}, },
}; };

Loading…
Cancel
Save