SiderBarBottom.vue 3.5 KB
Newer Older
D
DCloud_LXH 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
<template>
	<div class="contact-box">
		<template v-if="currentConfig.contactItems && currentConfig.contactItems.length">
			<template v-for="item in currentConfig.contactItems">
				<a :key="item.name" :href="item.url" target="_blank" class="contact-item">
					<img :src="item.imageUrl" width="20" height="20" />
					<div class="contact-smg">
						<div>{{ item.name }}</div>
					</div>
				</a>
			</template>
		</template>
		<div class="contact-item" v-if="currentConfig.codeHosting && currentConfig.codeHosting.length">
			<img
				src="https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/74cda950-4f2d-11eb-a16f-5b3e54966275.png"
				width="20"
				height="20"
			/>
			<div class="contact-smg">
				<div>
					代码仓库:
					<template v-for="(item, index) in currentConfig.codeHosting">
						<a :key="item.url" :href="item.url" target="_blank">{{ item.name }}</a>
						{{ currentConfig.codeHosting.length - index > 1 ? '' : '' }}
					</template>
				</div>
			</div>
		</div>
		<div class="contact-item" v-if="currentQQGroup.length">
			<img
				src="https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/759713d0-4f2d-11eb-a16f-5b3e54966275.png"
				width="20"
				height="20"
			/>
			<div class="contact-smg">
				<div>官方QQ交流群</div>
D
DCloud_LXH 已提交
37
				<template v-for="item in currentQQGroup">
D
DCloud_LXH 已提交
38
					<div v-if="!item.state" :key="item.number">
D
DCloud_LXH 已提交
39
						{{ item.prefix }}{{ item.number }} &nbsp;
study夏羽's avatar
study夏羽 已提交
40 41 42 43 44 45 46 47
						<a v-if="QQOfUnicloud"
							target="_blank"
							style="text-decoration: underline"
							href="https://qm.qq.com/cgi-bin/qm/qr?k=ez84UYIZgPKpTvrXD8GINUr62u8CF96x&jump_from=webapi"
						>
							点此加入
						</a>
						<a v-else
D
DCloud_LXH 已提交
48 49
							target="_blank"
							style="text-decoration: underline"
study夏羽's avatar
study夏羽 已提交
50
							href="https://qm.qq.com/cgi-bin/qm/qr?k=yqWNieAR2_nPtIBs_U-sH5H-RbWZ7HQk&jump_from=webapi"
D
DCloud_LXH 已提交
51 52 53 54 55
						>
							点此加入
						</a>
					</div>
					<div v-else :key="item.number">
D
DCloud_LXH 已提交
56
						{{ item.prefix }}{{ item.number }}{{ item.attendance || 2000 }}人已满)
D
DCloud_LXH 已提交
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
					</div>
				</template>
			</div>
		</div>
		<div class="contact-item">
			<img
				src="https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/77df7d30-4f2d-11eb-bd01-97bc1429a9ff.png"
				width="20"
				height="20"
			/>
			<div class="contact-smg">
				<div>关注微信公众号</div>
				<img
					src="https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/78a8e7b0-4f2d-11eb-8ff1-d5dcf8779628.jpg"
					width="90"
					height="90"
				/>
			</div>
		</div>
	</div>
</template>

<script>
	import navInject from '../mixin/navInject';
	import siderbarConfig from '../config/siderbar';
	export default {
		mixins: [navInject],

		data: () => ({
			siderbarConfig,
		}),

		computed: {
			currentConfig() {
91
				return this.siderbarConfig[this.customNavBarKeys[this.navConfig.userNavIndex]] || {};
D
DCloud_LXH 已提交
92 93 94 95
			},
			currentQQGroup() {
				return [...(this.currentConfig.qq_group || [])].reverse();
			},
study夏羽's avatar
study夏羽 已提交
96 97 98
			QQOfUnicloud(){
				return this.mainNavBarText == 'uniCloud'? true : false
			}
D
DCloud_LXH 已提交
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
		},
	};
</script>

<style>
	.contact-box {
		border-top: 1px solid #eee;
		margin-top: 20px;
		margin-bottom: 20px;
		padding: 0 10px;
	}

	.contact-box a {
		color: #42b983;
	}

	.contact-item {
		padding-top: 30px;
		padding-left: 0;
		display: flex;
		flex-direction: row;
	}

	a.contact-item {
		display: flex;
		padding: 0;
		margin-top: 20px;
		padding-left: 0;
		text-decoration: none;
	}

	.contact-item > img {
		margin: 3px 10px 0 10px;
	}

	.contact-smg {
		display: flex;
		flex-direction: column;
	}

	.contact-smg div {
		font-size: 15px;
		color: #000000;
		line-height: 24px;
	}
</style>