univerify-privacy-page.uvue 1.2 KB
Newer Older
DCloud_iOS_WZT's avatar
DCloud_iOS_WZT 已提交
1 2 3 4
<template>
	<view class="background">

		<view class="container">
5 6 7 8
      <view class="close_container">
        <text class="close_icon" @click="onBack()">{{closeIcon}}</text>
      </view>
			<web-view class="web_container" :src="url"></web-view>
DCloud_iOS_WZT's avatar
DCloud_iOS_WZT 已提交
9 10 11 12 13 14 15 16 17
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url: '',
18
        closeIcon: '\uE650'
DCloud_iOS_WZT's avatar
DCloud_iOS_WZT 已提交
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
			}
		},
		onLoad(options : OnLoadOptions) {
			this.url = options["url"] as string;
		},
		methods: {
			onBack(){
				uni.closeDialogPage({
				  dialogPage: this.$page,
				  animationType:'slide-out-bottom',
				  success(res) {
				    console.log('closeThisDialog success', res)
				  },
				  fail(err) {
				    console.log('closeThisDialog fail', err)
				  }
				})
			}
		}
	}
</script>

<style>
	.background {
43
    background-color: #f1f1f1;
DCloud_iOS_WZT's avatar
DCloud_iOS_WZT 已提交
44 45
		width: 100%;
		height: 100%;
46
	}
DCloud_iOS_WZT's avatar
DCloud_iOS_WZT 已提交
47
	.container{
48
    padding-top: var(--status-bar-height);
DCloud_iOS_WZT's avatar
DCloud_iOS_WZT 已提交
49 50 51
    color: white;
    width: 100%;
    position: absolute;
52
    height: 100%;
DCloud_iOS_WZT's avatar
DCloud_iOS_WZT 已提交
53
	}
54 55 56 57 58 59 60 61 62 63 64 65 66
  .close_container{
    height: 45px;
    width: 100%;
  }
  .close_icon {
    left: 90%;
    top: 15px;
    font-family: uni-icon;
    font-size: 24px;
  }
	.web_container{
    padding-top: 10px;
		flex: 1;
DCloud_iOS_WZT's avatar
DCloud_iOS_WZT 已提交
67 68 69 70
		width: 100%;
	}

</style>