未登录样式

cyl/master-apply
wangxia 3 months ago
parent 3b0010429a
commit 0ecf68ae78

@ -37,6 +37,13 @@ export default {
that.G.watchUserPage(args.url); that.G.watchUserPage(args.url);
}, },
}); });
uni.$on("isGlogin", function (data) {
// console.log("app.vue ", data);
if (uni.getStorageSync("apply-token")) {
that.initWyyx();
}
});
}, },
onShow: function (options) { onShow: function (options) {
let that = this; let that = this;
@ -84,13 +91,6 @@ export default {
}, 15 * 1000); }, 15 * 1000);
} }
uni.$on("isGlogin", function (data) {
// console.log("app.vue ", data);
if (uni.getStorageSync("apply-uid")) {
that.initWyyx();
}
});
// //
if (uni.getStorageSync("apply-token")) { if (uni.getStorageSync("apply-token")) {
// console.log("app.vue IM"); // console.log("app.vue IM");

@ -11,6 +11,7 @@
</view> </view>
</view> </view>
<view v-if="!isLogin" style="background-color: #ededed" class="m-log g_flex_column_start"> <view v-if="!isLogin" style="background-color: #ededed" class="m-log g_flex_column_start">
<view class="g_h_100"></view>
<view> <view>
<g-empty text="您还有没有登录,请登录后查看工单" /> <g-empty text="您还有没有登录,请登录后查看工单" />
<view class="g_h_32"></view> <view class="g_h_32"></view>

@ -54,6 +54,7 @@ export function createApp () {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
G.Get('/checkToken', '', (res) => { G.Get('/checkToken', '', (res) => {
uni.setStorageSync("apply-userinfo", res) uni.setStorageSync("apply-userinfo", res)
uni.setStorageSync("apply-uid", res.id)
uni.setStorageSync('apply-userinfo-copy', JSON.stringify(res)); uni.setStorageSync('apply-userinfo-copy', JSON.stringify(res));
uni.setStorageSync("apply-agencyId", res.user.agencyId); // 单独存储 -- 代理id方便获取 uni.setStorageSync("apply-agencyId", res.user.agencyId); // 单独存储 -- 代理id方便获取
uni.setStorageSync("apply-supplierAccount", res.supplierAccount); // 单独存储 -- 是否是发单号,方便获取 0.不是发单号 1.是发单号 uni.setStorageSync("apply-supplierAccount", res.supplierAccount); // 单独存储 -- 是否是发单号,方便获取 0.不是发单号 1.是发单号

@ -76,16 +76,16 @@ export const setTabUnread = (val): void => {
// console.log('store?.conversationStore.totalUnreadCount', store?.conversationStore.totalUnreadCount); // console.log('store?.conversationStore.totalUnreadCount', store?.conversationStore.totalUnreadCount);
uni.$emit('newMessage', { count: store?.conversationStore.totalUnreadCount, type: 'message' }) uni.$emit('newMessage', { count: store?.conversationStore.totalUnreadCount, type: 'message' })
uni.setStorageSync("chat_info", { count: store?.conversationStore.totalUnreadCount, type: 'message' }); uni.setStorageSync("chat_info", { count: store?.conversationStore.totalUnreadCount, type: 'message' });
// if (unread === 0) { if (unread === 0) {
// uni.hideTabBarRedDot({ uni.hideTabBarRedDot({
// //隐藏数字 //隐藏数字
// index: 3, //tabbar下标 index: 1, //tabbar下标
// }) })
// } else { } else {
// uni.showTabBarRedDot({ uni.showTabBarRedDot({
// index: 3, //tabbar下标 index: 1, //tabbar下标
// }) })
// } }
} }
export const setContactTabUnread = (): void => { export const setContactTabUnread = (): void => {
@ -103,7 +103,7 @@ export const setContactTabUnread = (): void => {
// 不是首页和聊天页不需要设置tabbar的badge // 不是首页和聊天页不需要设置tabbar的badge
return return
} }
const unread = uni.$UIKitStore?.sysMsgStore?.getTotalUnreadMsgsCount() // const unread = uni.$UIKitStore?.sysMsgStore?.getTotalUnreadMsgsCount()
// if (unread === 0) { // if (unread === 0) {
// uni.hideTabBarRedDot({ // uni.hideTabBarRedDot({
// //隐藏数字 // //隐藏数字

@ -1,5 +1,13 @@
<template> <template>
<view class="p-root-home-quick g_w_all g_bg_f_5 g_kuaishou"> <view v-if="!isLogin" class="m-log g_flex_column_start g_bg_page">
<view class="g_h_100"></view>
<view>
<g-empty text="您还有没有登录,请登录后查看" />
<view class="g_h_32"></view>
<g-button btnText="去登录" size="small" class="g_mt_32" @clickBtn="goLogin" />
</view>
</view>
<view class="p-root-home-quick g_w_all g_bg_f_5 g_kuaishou" v-else>
<AiApply class="" @outputInfo="getTownsManInfo" ref="AiApplyRef" /> <AiApply class="" @outputInfo="getTownsManInfo" ref="AiApplyRef" />
<view class=""> <view class="">
@ -205,6 +213,7 @@ export default {
}, },
data() { data() {
return { return {
isLogin: uni.getStorageSync("apply-token") ? true : false,
detailRes: {}, detailRes: {},
IS_CREATOR: false, IS_CREATOR: false,
jobType: 2, jobType: 2,
@ -607,6 +616,11 @@ export default {
// }); // });
// }, 500); // }, 500);
}, },
goLogin() {
uni.reLaunch({
url: "/root/person/loginIndex",
});
},
}, },
}; };
</script> </script>

@ -19,7 +19,7 @@
<div style="height: 48px; background-color: #ededed"></div> <div style="height: 48px; background-color: #ededed"></div>
</scroll-view> </scroll-view>
<view class="g_h_all" v-if="!isLogin"> <view class="g_h_all" v-if="!isLogin">
<view class="" hover-class="none" hover-stop-propagation="false" style="height: 108px"> </view> <view class="" hover-class="none" hover-stop-propagation="false" style="height: 100px"> </view>
<view class=""> <view class="">
<g-empty text="您还有没有登录,请登录后查看消息" /> <g-empty text="您还有没有登录,请登录后查看消息" />
<view class="g_h_32"></view> <view class="g_h_32"></view>

Loading…
Cancel
Save