Files
yusheng-h5/pages/union/agreement.vue
2025-12-31 14:44:40 +08:00

77 lines
1.8 KiB
Vue

<template>
<view class="view-page" :style="{backgroundImage: `url('${ThemeData ? ThemeData.app_bg : baseBgUrl }')`}">
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}"
:navTitle="'公会协议'">
</navBar>
<view class="dec-view" v-if="detailData">
<view class="" v-for="(item,index) in agreemenrList" :key="index">
<img :src="item" alt="" />
</view>
</view>
</view>
</template>
<script>
// import PdfCanvasViewer from '@/component/pdf-canvas-viewer.vue';
import http from '@/until/http.js';
import navBar from '@/component/nav.vue';
import config from '@/until/config.js';
export default {
components: {
navBar
// PdfCanvasViewer
},
data() {
return {
baseBgUrl: config.new_unionUrl || '',
unionBgUrl: config.unicon_url || '',
statusBarHeight: 0,
ThemeData: null,
detailData: null,
isAndroid: false,
agreemenrList: []
}
},
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
this.detailData = code ? data : false
this.agreemenrList = this.detailData.agreement.split(',')
})
}
}
}
</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>