71 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Vue
		
	
	
	
			
		
		
	
	
			71 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Vue
		
	
	
	
| <template>
 | |
| 	<view class="pb60">
 | |
| 		<view class="set-group" style="padding-top: 18rpx;">
 | |
| 			<view class="d-b-c set-group-item " @click.stop="xieyi('service')">
 | |
| 				<view>{{$t('w_0402')}}</view>
 | |
| 				<view class="d-e-c gray9">
 | |
| 					<text class="icon iconfont icon-jiantou"></text>
 | |
| 				</view>
 | |
| 			</view>
 | |
| 			<view class="d-b-c set-group-item " @click.stop="xieyi('privacy')">
 | |
| 				<view>{{$t('w_0404')}}</view>
 | |
| 				<view class="d-e-c gray9">
 | |
| 					<text class="icon iconfont icon-jiantou"></text>
 | |
| 				</view>
 | |
| 			</view>
 | |
| 		</view>
 | |
| 	</view>
 | |
| </template>
 | |
| 
 | |
| <script>
 | |
| 	export default {
 | |
| 		data() {
 | |
| 			return {
 | |
| 				service: '',
 | |
| 				privacy: ''
 | |
| 			}
 | |
| 		},
 | |
| 		onLoad() {
 | |
| 			this.getPrivacy();
 | |
| 		},
 | |
| 		methods: {
 | |
| 			getPrivacy() {
 | |
| 				let self = this;
 | |
| 				let url = this.config.yxyapi;
 | |
| 				uni.request({
 | |
| 					url: url+'/yiti.php',
 | |
| 					data: {
 | |
| 						type: 3
 | |
| 					},
 | |
| 					success: result => {
 | |
| 						console.log(result);
 | |
| 						var data = result.data;
 | |
| 						self.service = data.service;
 | |
| 						self.privacy = data.privacy;
 | |
| 					},
 | |
| 					error: error => {
 | |
| 						console.log('----------------error');
 | |
| 						console.log(error);
 | |
| 					}
 | |
| 				});
 | |
| 			},
 | |
| 			xieyi(type) {
 | |
| 				let url = '';
 | |
| 				if (type == 'service') {
 | |
| 					url = this.service;
 | |
| 				} else {
 | |
| 					url = this.privacy;
 | |
| 				}
 | |
| 				console.log(url)
 | |
| 				uni.navigateTo({
 | |
| 					url: '/pages/webview/webview?url=' + url
 | |
| 				});
 | |
| 			},
 | |
| 		}
 | |
| 	}
 | |
| </script>
 | |
| 
 | |
| <style>
 | |
| 
 | |
| </style>
 |