policiesAgreement.vue 2.9 KB
<template>
	<view class="account_safe" :style="vuex_theme">
		<view class="cell top">
			<u-cell-group>
				<u-cell title="用户政策" :isLink="true" :url="service" arrow-direction="right"
					:rightIconStyle="{fontSize:'26rpx'}" :title-style="{color:'#909097', fontSize:'28rpx'}">
				</u-cell>
				<u-cell title="隐私协议" :isLink="true" :url="policy"
					arrow-direction="right" :rightIconStyle="{fontSize:'26rpx'}"
					:title-style="{color:'#909097', fontSize:'28rpx'}">
				</u-cell>
			</u-cell-group>
		</view>

	</view>
</template>

<script>
	import {
		mapState,
		mapActions
	} from 'vuex'
	import {
		replaceTextToStar
	} from '@/common/commonUtil.js'

	export default {
		data() {
			return {
				service: "https://hropublic.oss-cn-beijing.aliyuncs.com/agreement/%E6%A0%A1%E8%81%8C%E9%80%9A%E6%9C%8D%E5%8A%A1%E5%8D%8F%E8%AE%AE.html",
				policy: "https://hropublic.oss-cn-beijing.aliyuncs.com/agreement/%E6%A0%A1%E8%81%8C%E9%80%9A%E9%9A%90%E7%A7%81%E5%8D%8F%E8%AE%AE.html",
			}
		},
		
		onLoad() {
			if (this.vuex_appId == 'wxac18386e35824192') {
				// 新华
				const service = "http://hropublic.oss-cn-beijing.aliyuncs.com/APP/xhsx/1-%20%E6%96%B0%E5%8D%8E%E5%AE%9E%E4%B9%A0%E7%94%A8%E6%88%B7%E6%9C%8D%E5%8A%A1%E5%8D%8F%E8%AE%AE(%E6%B8%85%E6%B4%81%E7%89%88).html"
				const policy = "http://hropublic.oss-cn-beijing.aliyuncs.com/APP/xhsx/1.1-%20%E6%96%B0%E5%8D%8E%E5%AE%9E%E4%B9%A0%E9%9A%90%E7%A7%81%E6%94%BF%E7%AD%96(%E6%B8%85%E6%B4%81%E7%89%88).html"

				this.service = `/pages/common/webview/webview?navtitle=服务协议&url=${service}`
				this.policy = `/pages/common/webview/webview?navtitle=隐私政策&url=${policy}`
			} else  {
				this.service = `/pages/common/webview/webview?navtitle=服务协议&url=${this.service}`
				this.policy = `/pages/common/webview/webview?navtitle=隐私政策&url=${this.policy}`
			}
		},

		computed: {
			...mapState({
				accountName: (state) => state.vuex_user.username ? state.vuex_user.username : '',

				getPhone(state) {
					let phone = state.vuex_user.phone;
					return phone ? replaceTextToStar(phone) : '';
				},

			}),
		},

		methods: {
			link(type) {

				switch (type) {
					case 'account':
						this.$u.route('/pages/student/my/edit-account/edit-account');
						break;

					case 'password':
						this.$u.route('/pages/student/my/edit-password/edit-password');
						break;
				}

			},
		}
	}
</script>

<style lang="scss" scoped>
	.account_safe {
		width: 100%;
		height: 100%;
		background-color: #F7F7F7;
		padding: 20rpx 0 0 0;

		.top {
			margin: 0 0 20rpx 0;
		}

		.cell {
			background-color: #FFFFFF;

			.u-slot-value {
				font-size: 28rpx;
				line-height: 40rpx;
				color: #202131;
			}
		}

		.cell /deep/ .u-cell {
			padding: 12rpx 0;

			.u-cell__value {
				font-size: 34rpx;
				color: rgba(0, 0, 0, 0.5);
			}
		}
	}
</style>