Browse Source

feat: no login tips

jiangzixin 1 year ago
parent
commit
5e08b69de1

+ 1 - 1
server/web/mobile/index.html

@@ -1,2 +1,2 @@
 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>加载中</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>加载中</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
-            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/mobile/static/index.63b34199.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/mobile/static/js/chunk-vendors.a5b9e456.js></script><script src=/mobile/static/js/index.f017ff4a.js></script></body></html>
+            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/mobile/static/index.63b34199.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/mobile/static/js/chunk-vendors.a5b9e456.js></script><script src=/mobile/static/js/index.fe0f60de.js></script></body></html>

BIN
server/web/mobile/static/images/permission.png


File diff suppressed because it is too large
+ 0 - 0
server/web/mobile/static/js/index.fe0f60de.js


File diff suppressed because it is too large
+ 0 - 0
server/web/mobile/static/js/pages-index-index.d35739d8.js


File diff suppressed because it is too large
+ 0 - 0
server/web/mobile/static/js/pages-index-index~pages-kanban-kanban~pages-policy-index~pages-policy-list~pages-policy-score~pages-~0157968a.15405bd3.js


File diff suppressed because it is too large
+ 0 - 0
server/web/mobile/static/js/pages-kanban-kanban.a60e36e2.js


File diff suppressed because it is too large
+ 0 - 0
server/web/mobile/static/js/pages-user-user.111402ff.js


+ 15 - 0
uniapp/pages/index/index.vue

@@ -16,6 +16,14 @@
         <view class="content bg-body" v-if="userInfo.nickname">
         <view class="content bg-body" v-if="userInfo.nickname">
             <cate-two></cate-two>
             <cate-two></cate-two>
         </view>
         </view>
+        <view v-else>
+            <u-empty mode="permission" margin-top="180" icon-size="600" text="请使用企业身份登录"
+                src="/static/images/permission.png">
+                <router-link to="/pages/login/login" slot="bottom" class="flex row-center user-login white m-t-16 p-t-16 p-b-16 p-l-50 p-r-50">
+                    点击登录
+                </router-link>
+            </u-empty>
+        </view>
 
 
         <!-- 意见反馈按钮 -->
         <!-- 意见反馈按钮 -->
         <router-link :to="'/pages/feedback/feedback'"
         <router-link :to="'/pages/feedback/feedback'"
@@ -134,4 +142,11 @@
     .count {
     .count {
         border-bottom: $-solid-border;
         border-bottom: $-solid-border;
     }
     }
+
+    .user-login {
+        background: #DD4250;
+        box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(243, 113, 113, 0.39);
+        border-radius: 12rpx 12rpx 12rpx 12rpx;
+        border: 2rpx solid #DD4250;
+    }
 </style>
 </style>

+ 176 - 158
uniapp/pages/kanban/kanban.vue

@@ -1,172 +1,190 @@
 <template>
 <template>
-	<view class="chart-panel">
-		<view class="charts-item">
-			<view class="flex">
-				<text
-					style="width: 12rpx;height: 40rpx;background: #DD4250;border-radius: 12rpx; margin-right: 20rpx;"></text>
-				<view class="bold font-size-30">占比饼状图</view>
-			</view>
-			<view class="charts-box">
-				<qiun-data-charts type="pie" :opts="opts" :chartData="chartData" />
-			</view>
-		</view>
-		<view class="charts-item">
-			<view class="flex">
-				<text
-					style="width: 12rpx;height: 40rpx;background: #DD4250;border-radius: 12rpx; margin-right: 20rpx;"></text>
-				<view class="bold font-size-30">金字塔漏斗图</view>
-			</view>
-			<view class="charts-box" style="height: 500px;">
-				<qiun-data-charts type="funnel" :opts="optsFunel" :chartData="chartData" />
-			</view>
-		</view>
-		<view class="charts-item">
-			<view class="flex">
-				<text
-					style="width: 12rpx;height: 40rpx;background: #DD4250;border-radius: 12rpx; margin-right: 20rpx;"></text>
-				<view class="bold font-size-30">城市词云图</view>
-			</view>
-			<view class="charts-box" style="height: 500px;">
-				<qiun-data-charts type="word" :opts="opts" :chartData="chartDataWord" />
-			</view>
-		</view>
-	</view>
+    <view >
+        <view class="chart-panel" v-if="userInfo.nickname">
+            <view class="charts-item">
+                <view class="flex">
+                    <text
+                        style="width: 12rpx;height: 40rpx;background: #DD4250;border-radius: 12rpx; margin-right: 20rpx;"></text>
+                    <view class="bold font-size-30">占比饼状图</view>
+                </view>
+                <view class="charts-box">
+                    <qiun-data-charts type="pie" :opts="opts" :chartData="chartData" />
+                </view>
+            </view>
+            <view class="charts-item">
+                <view class="flex">
+                    <text
+                        style="width: 12rpx;height: 40rpx;background: #DD4250;border-radius: 12rpx; margin-right: 20rpx;"></text>
+                    <view class="bold font-size-30">金字塔漏斗图</view>
+                </view>
+                <view class="charts-box" style="height: 500px;">
+                    <qiun-data-charts type="funnel" :opts="optsFunel" :chartData="chartData" />
+                </view>
+            </view>
+            <view class="charts-item">
+                <view class="flex">
+                    <text
+                        style="width: 12rpx;height: 40rpx;background: #DD4250;border-radius: 12rpx; margin-right: 20rpx;"></text>
+                    <view class="bold font-size-30">城市词云图</view>
+                </view>
+                <view class="charts-box" style="height: 500px;">
+                    <qiun-data-charts type="word" :opts="opts" :chartData="chartDataWord" />
+                </view>
+            </view>
+        </view>
+        <view v-else>
+            <u-empty mode="permission" margin-top="180" icon-size="600" text="请使用企业身份登录"
+                src="/static/images/permission.png">
+                <router-link to="/pages/login/login" slot="bottom" class="flex row-center user-login white m-t-16 p-t-16 p-b-16 p-l-50 p-r-50">
+                    点击登录
+                </router-link>
+            </u-empty>
+        </view>
+    </view>
+
 
 
 </template>
 </template>
 
 
 <script>
 <script>
-	import {
-		getTalentsCount
-	} from '@/api/app';
-	import {
-		mapActions,
-		mapGetters
-	} from 'vuex'
+    import {
+        getTalentsCount
+    } from '@/api/app';
+    import {
+        mapActions,
+        mapGetters
+    } from 'vuex'
 
 
-	export default {
-		data() {
-			return {
-				chartData: {},
-				chartDataWord: {},
-				opts: {
-					// dataLabel: false,
-					color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
-						"#ea7ccc"
-					],
-					// padding: [5, 5, 5, 5],
-					xAxis: {
-						disableGrid: true
-					},
-					yAxis: {
-						data: [{
-							min: 0
-						}]
-					},
-					enableScroll: false,
-					legend: {
-						padding: 5,
-						margin: 5,
-						float: 'left'
-					},
-					extra: {
-						pie: {
-							activeOpacity: 0.5,
-							activeRadius: 10,
-							offsetAngle: 0,
-							labelWidth: 10,
-							border: true,
-							borderWidth: 1,
-							borderColor: "#FFFFFF",
-							// linearType: "custom"
-						},
-						funnel: {
-							activeOpacity: 0.3,
-							activeWidth: 10,
-							border: true,
-							borderWidth: 2,
-							borderColor: "#FFFFFF",
-							fillOpacity: 1,
-							labelAlign: "right",
-							type: "pyramid"
-						},
-						word: {
-							type: "normal",
-							autoColors: true
-						}
-					}
-				},
-				optsFunel: {
-					dataLabel: false,
-				},
-			}
-		},
-		onLoad(options) {
-			Object.assign(this.optsFunel, this.opts);
-		},
-		onReady() {
+    export default {
+        data() {
+            return {
+                chartData: {},
+                chartDataWord: {},
+                opts: {
+                    // dataLabel: false,
+                    color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
+                        "#ea7ccc"
+                    ],
+                    // padding: [5, 5, 5, 5],
+                    xAxis: {
+                        disableGrid: true
+                    },
+                    yAxis: {
+                        data: [{
+                            min: 0
+                        }]
+                    },
+                    enableScroll: false,
+                    legend: {
+                        padding: 5,
+                        margin: 5,
+                        float: 'left'
+                    },
+                    extra: {
+                        pie: {
+                            activeOpacity: 0.5,
+                            activeRadius: 10,
+                            offsetAngle: 0,
+                            labelWidth: 10,
+                            border: true,
+                            borderWidth: 1,
+                            borderColor: "#FFFFFF",
+                            // linearType: "custom"
+                        },
+                        funnel: {
+                            activeOpacity: 0.3,
+                            activeWidth: 10,
+                            border: true,
+                            borderWidth: 2,
+                            borderColor: "#FFFFFF",
+                            fillOpacity: 1,
+                            labelAlign: "right",
+                            type: "pyramid"
+                        },
+                        word: {
+                            type: "normal",
+                            autoColors: true
+                        }
+                    }
+                },
+                optsFunel: {
+                    dataLabel: false,
+                },
+            }
+        },
+        onLoad(options) {
+            Object.assign(this.optsFunel, this.opts);
+        },
+        onReady() {
 
 
-		},
-		onUnload() {},
-		onShow() {
-			this.getCountFun();
-			this.getUser();
-		},
-		onPullDownRefresh() {
-			this.getCountFun();
-			this.getUser().then(() => {
-				uni.stopPullDownRefresh();
-			})
-		},
-		onHide() {},
-		methods: {
-			...mapActions(['getUser']),
-			async getCountFun() {
-				const {
-					status,
-					data
-				} = await getTalentsCount({});
-				if (status == 1) {
-					let res = {
-						series: [{
-							data: data.normal,
-						}]
-					};
-					this.chartData = JSON.parse(JSON.stringify(res));
-					res = {
-						series: data.word
-					};
-					this.chartDataWord = JSON.parse(JSON.stringify(res));
-				}
-				uni.stopPullDownRefresh();
-			},
-		},
-		computed: {
-			...mapGetters(['sysInfo', 'appConfig']),
-		}
-	}
+        },
+        onUnload() {},
+        onShow() {
+            this.getCountFun();
+            this.getUser();
+        },
+        onPullDownRefresh() {
+            this.getCountFun();
+            this.getUser().then(() => {
+                uni.stopPullDownRefresh();
+            })
+        },
+        onHide() {},
+        methods: {
+            ...mapActions(['getUser']),
+            async getCountFun() {
+                const {
+                    status,
+                    data
+                } = await getTalentsCount({});
+                if (status == 1) {
+                    let res = {
+                        series: [{
+                            data: data.normal,
+                        }]
+                    };
+                    this.chartData = JSON.parse(JSON.stringify(res));
+                    res = {
+                        series: data.word
+                    };
+                    this.chartDataWord = JSON.parse(JSON.stringify(res));
+                }
+                uni.stopPullDownRefresh();
+            },
+        },
+        computed: {
+            ...mapGetters(['userInfo', 'sysInfo', 'appConfig']),
+        }
+    }
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
-	page {
-		padding: 0;
-		height: 100%;
-	}
+    page {
+        padding: 0;
+        height: 100%;
+    }
+
+    .chart-panel {
+        padding-bottom: calc(50px + env(safe-area-inset-bottom));
+    }
 
 
-	.chart-panel {
-		padding-bottom: calc(50px + env(safe-area-inset-bottom));
-	}
+    .charts-item {
+        background: #FFFFFF;
+        box-shadow: 0px 4px 8px 1px rgba(0, 0, 0, 0.03);
+        border-radius: 6px 6px 6px 6px;
+        padding: 20rpx;
+        margin: 30rpx;
+    }
 
 
-	.charts-item {
-		background: #FFFFFF;
-		box-shadow: 0px 4px 8px 1px rgba(0, 0, 0, 0.03);
-		border-radius: 6px 6px 6px 6px;
-		padding: 20rpx;
-		margin: 30rpx;
-	}
+    /* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
+    .charts-box {
+        width: 100%;
+        height: 350px;
+    }
 
 
-	/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
-	.charts-box {
-		width: 100%;
-		height: 350px;
-	}
+    .user-login {
+        background: #DD4250;
+        box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(243, 113, 113, 0.39);
+        border-radius: 12rpx 12rpx 12rpx 12rpx;
+        border: 2rpx solid #DD4250;
+    }
 </style>
 </style>

+ 14 - 0
uniapp/pages/user/user.vue

@@ -63,6 +63,14 @@
                 <view class="m-l-24">退出登录</view>
                 <view class="m-l-24">退出登录</view>
             </view>
             </view>
         </view>
         </view>
+        <view v-else>
+            <u-empty mode="permission" margin-top="180" icon-size="600" text="请使用企业身份登录"
+                src="/static/images/permission.png">
+                <router-link to="/pages/login/login" slot="bottom" class="flex row-center user-login white m-t-16 p-t-16 p-b-16 p-l-50 p-r-50">
+                    点击登录
+                </router-link>
+            </u-empty>
+        </view>
 
 
     </view>
     </view>
 </template>
 </template>
@@ -221,4 +229,10 @@
             border: 2rpx solid #DD4250;
             border: 2rpx solid #DD4250;
         }
         }
     }
     }
+    .user-login {
+        background: #DD4250;
+        box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(243, 113, 113, 0.39);
+        border-radius: 12rpx 12rpx 12rpx 12rpx;
+        border: 2rpx solid #DD4250;
+    }
 </style>
 </style>

BIN
uniapp/static/images/permission.png


+ 12 - 12
uniapp/store/modules/app.js

@@ -66,18 +66,18 @@ const actions = {
             getInfoByToken().then(res => {
             getInfoByToken().then(res => {
                 //token 过期,重新登录
                 //token 过期,重新登录
                 if (res.code == 2) {
                 if (res.code == 2) {
-                    uni.showModal({
-                        title: '提示',
-                        content: '请使用企业身份登录',
-                        mask: false,
-                        success: function(res) {
-                            if (res.confirm) {
-                                uni.navigateTo({
-                                    url: '/pages/login/login'
-                                })
-                            }
-                        }
-                    })
+                    // uni.showModal({
+                    //     title: '提示',
+                    //     content: '请使用企业身份登录',
+                    //     mask: false,
+                    //     success: function(res) {
+                    //         if (res.confirm) {
+                    //             uni.navigateTo({
+                    //                 url: '/pages/login/login'
+                    //             })
+                    //         }
+                    //     }
+                    // })
                     return false;
                     return false;
                 }
                 }
                 if (res.code == 1) {
                 if (res.code == 1) {

Some files were not shown because too many files changed in this diff