<template>
	<view>
		hahaha
		<view @click="bankClick" v-if="appsPath === '/apps/bankcard/index'">银行卡列表页</view>
	</view>
</template>

<script>
	import ala from '@/service/ala.js'
	const unis = require('./uni.webview.1.5.2.js')
	export default {
		data() {
			return {
				appsPath: '',
				widget: {}
			}
		},
		onLoad(options) {
			this.widget = JSON.parse(decodeURIComponent(options.data))
			ala.userAutoLogin(this.widget['user_token'], this.widget['user_name'])
			if (this.widget['auto_pages'] === 0) {
				this.widget['auto_pages'] = 1
				 let para = encodeURIComponent(JSON.stringify(this.widget))
				uni.reLaunch({
					url: `/apps/index?data=${para}`
				})
				return
			}
			this.appsPath = this.widget.path
			ala.setTitle('银行卡列表')
		},
		methods: {
			bankClick() {
				unis.webView.postMessage({
					data: {
						type: 'unis',
						unis: unis
					}
				})
			}
		},
		onBackPress (res) {
		}
	}
</script>

<style>
</style>
