| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <template>
- <view >
- <!-- <web-view :src="webUrl"></web-view> -->
- <view v-html="contText"></view>
- </view>
- </template>
- <script>
- import {getuserAgreement,getprivacyPolicy} from'@/api/common.js'
- export default {
- data() {
- return {
- webUrl:"",
- contText:''
- }
- },
- onLoad(option) {
- this.webUrl=uni.getStorageSync('url');
- console.log(this.webUrl)
- if(option.val==1){
- this.getuserAgreements()
- }else{
- this.getprivacyPolicys()
- }
- },
- methods:{
- getuserAgreements(){
- getuserAgreement().then(res=>{
- console.log(res)
- if(res.code==200){
- this.contText=res.data
- }else{
- uni.showToast({
- title: res.msg,
- icon: 'none'
- });
- }
- })
- },
- getprivacyPolicys(){
- getprivacyPolicy().then(res=>{
- console.log(res)
- if(res.code==200){
- this.contText=res.data
- }else{
- uni.showToast({
- title: res.msg,
- icon: 'none'
- });
- }
- })
- }
- }
- }
-
-
- </script>
- <style scoped lang="scss">
- page{
- height: 100%;
- }
- .content{
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
-
- }
-
- </style>
|