<template> <view class="xieyi"> <u-parse :html="content"></u-parse> </view> </template> <script> import StoreApi from '@/api/store' export default{ data(){ return{ content:'' } }, methods:{ }, onLoad(option) { StoreApi.data().then(result => { console.log(result,"lkjh") if(option.id==1){ uni.setNavigationBarTitle({ title: '用户协议' // 页面标题文本 }); this.content = result.data.storeInfo.YHXY }else if(option.id==2){ uni.setNavigationBarTitle({ title: '隐私政策' // 页面标题文本 }); this.content = result.data.storeInfo.YSZC } }) } } </script> <style lang="scss" scoped> </style>