Files
yusheng-h5/pages/union/agreement.vue
2025-12-03 18:59:18 +08:00

70 lines
1.5 KiB
Vue

<template>
<view class="view-page" :style="{backgroundImage: `url('${ThemeData?.app_bg || baseBgUrl}')`}">
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}"
:navTitle="'公会协议'">
</navBar>
<view class="dec-view" v-if="detailData">
<web-view :src="detailData.agreement"></web-view>
</view>
</view>
</template>
<script>
import http from '@/until/http.js';
import navBar from '@/component/nav.vue';
import config from '@/until/config.js';
export default {
components: {
navBar
},
data() {
return {
baseBgUrl: config.new_unionUrl || '',
unionBgUrl: config.unicon_url || '',
statusBarHeight: 0,
ThemeData: null,
detailData:null
}
},
onLoad(options) {
const {
h
} = options
this.statusBarHeight = h
uni.setStorageSync('BarHeight', h)
if(uni.getStorageSync('token'))this.getInfo()
},
methods:{
async getInfo() {
http.get('/api/Guild/my_guild', {
token: uni.getStorageSync('token') || ''
}).then(response => {
const {
data,
code
} = response
// console.log(data)
this.detailData = code ? data : false
})
}
}
}
</script>
<style lang="scss" scoped>
.view-page {
min-height: 100vh;
font-family: Source Han Sans CN, Source Han Sans CN;
background-repeat: no-repeat;
background-size: 100% 100%;
.dec-view {
min-height: calc(99vh - 160rpx);
position: relative;
border-radius: 16rpx;
margin: 24rpx;
// background-color: white;
}
}
</style>