about.vue 3.5 KB
Newer Older
芊里 已提交
1
<template>
L
123  
linju 已提交
2
	<view class="about">
L
linju 已提交
3 4
		<view class="box">
			<image class="logoImg" :src="about.logo"></image>
L
123  
linju 已提交
5
			<text class="tip appName">{{about.appName}}</text>
DCloud_JSON's avatar
DCloud_JSON 已提交
6
			<text class="tip">Version {{version}}</text>
L
linju 已提交
7 8
			<!--Sansnn-uQRCode组件来源,插件市场:https://ext.dcloud.net.cn/plugin?id=1287 微调后-->
			<Sansnn-uQRCode :text="about.download" :makeOnLoad="true" class="qrcode"></Sansnn-uQRCode>
DCloud_JSON's avatar
DCloud_JSON 已提交
9
			<text class="tip">扫描二维码,您的朋友也可以下载{{about.appName}}客户端</text>
芊里 已提交
10
		</view>
L
123  
linju 已提交
11
		<view class="copyright">
L
123  
linju 已提交
12 13 14 15
			<template v-for="(agreement,index) in about.agreements">
				<text class="agreement" @click="navigateTo(agreement)">{{agreement.title}}</text>
				<text class="hint" v-if="about.agreements.length-1>index"></text>
			</template>
L
123  
linju 已提交
16
			<text class="hint">Copyright © {{year}}</text>
L
123  
linju 已提交
17
			<text class="hint">{{about.company}}</text>
芊里 已提交
18 19 20 21
		</view>
	</view>
</template>
<script>
L
23  
linju 已提交
22
import baseappConfig from '@/baseapp.config.js';
L
linju 已提交
23
import uniShare from 'uni_modules/uni-share/js_sdk/uni-share.js';
芊里 已提交
24 25 26
	export default {
		onLoad() {
			// #ifdef APP-PLUS
L
123  
linju 已提交
27
			this.version = plus.runtime.version
芊里 已提交
28 29
			// #endif
		},
L
123  
linju 已提交
30 31 32 33
		data() {
			return {
				version:"V1.0.0",
				year:"2020",
L
123  
linju 已提交
34
				about:{}
L
123  
linju 已提交
35 36 37
			};
		},
		created() {
L
123  
linju 已提交
38
			this.about = baseappConfig.about
DCloud_JSON's avatar
DCloud_JSON 已提交
39 40 41
			uni.setNavigationBarTitle({
				title:'关于'+this.about.appName
			})
L
123  
linju 已提交
42 43
			this.year = (new Date).getFullYear()
		},
L
linju 已提交
44 45 46 47 48 49 50 51 52 53 54 55 56 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 91 92 93 94 95 96 97 98 99
		onNavigationBarButtonTap() {
			let {download,appName,slogan,logo} = this.about
			uniShare({
				content: { //公共的分享类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图)
					type: 0,
					href: download,
					title: appName,
					summary: slogan,
					imageUrl: logo
				},
				menus: [{
						"img": "/static/sharemenu/wechatfriend.png",
						"text": "微信好友",
						"share": {
							"provider": "weixin",
							"scene": "WXSceneSession"
						}
					},
					{
						"img": "/static/sharemenu/wechatmoments.png",
						"text": "微信朋友圈",
						"share": {
							"provider": "weixin",
							"scene": "WXSenceTimeline"
						}
					},
					{
						"img": "/static/sharemenu/weibo.png",
						"text": "微博",
						"share": {
							"provider": "sinaweibo"
						}
					},
					{
						"img": "/static/sharemenu/qq.png",
						"text": "QQ",
						"share": {
							"provider": "qq"
						}
					},
					{
						"img": "/static/sharemenu/copyurl.png",
						"text": "复制",
						"share": "copyurl"
					},
					{
						"img": "/static/sharemenu/more.png",
						"text": "更多",
						"share": "shareSystem"
					}
				],
				cancelText: "取消分享",
			}, e => { //callback
				console.log(e);
			})
		},
L
123  
linju 已提交
100
		methods:{
L
123  
linju 已提交
101
			navigateTo({url,title}){
L
123  
linju 已提交
102 103 104 105 106
				uni.navigateTo({
					url: '/pages/common/webview/webview?url='+url+'&title='+title,
					success: res => {},
					fail: () => {},
					complete: () => {}
芊里 已提交
107 108 109 110 111
				});
			}
		}
	}
</script>
L
123  
linju 已提交
112
<style lang="scss" scoped>
L
123  
linju 已提交
113
.about {
L
123  
linju 已提交
114 115 116
	width: 750upx;
	flex-direction: column;
}
L
linju 已提交
117 118
.box {
	margin-top: 100px;
L
123  
linju 已提交
119 120 121 122 123 124 125 126 127 128
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
.logoImg{
	margin-bottom: 10upx;
	width:160upx;
	height:160upx;
	border-radius: 15px;
}
DCloud_JSON's avatar
DCloud_JSON 已提交
129 130 131 132
.tip{
	font-size:24rpx;
	margin-top: 10px;
}
L
123  
linju 已提交
133 134 135 136 137
.appName{
	margin-top: 20px;
	font-size:42rpx;
	font-weight: 500;
}
L
linju 已提交
138 139 140
.qrcode{
	margin-top: 50px;
}
L
123  
linju 已提交
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
.copyright {
	width: 750upx;
	font-size:32rpx;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	bottom:20px;
	left: 0;
	position: fixed;
}
.agreement {
	color:#2285ff;
	font-size:26rpx;
}
.hint {
	color:#999999;
	font-size:26rpx;
}
</style>