<template>
  <view>
    <web-view :update-title="false" :src="textUrl" />
  </view>
</template>

<script>
import { allData } from './data.js'
export default {
    data() {
        return {
            ...allData.data()
        }
    },

    onLoad(options) {
        if(options.type == '用户协议') {
            this.textUrl = 'https://pweb.jxc4.com/printer/userAgreement.html'
        }
        if(options.type == '隐私协议') {
            this.textUrl = 'https://pweb.jxc4.com/printer/privacyAgreement.html'
        }
        if(options.type == '关于京西') {
            this.textUrl = 'https://pweb.jxc4.com/printer/about.html'
        }
        uni.setNavigationBarTitle({
            title: options.type
        })
    }
}
</script>
<style lang="scss">
@import "./JXTEXT.scss"
</style>