12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <template>
- <view>
- <web-view :webview-styles="webviewStyles" :src="url"></web-view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- url: "",
- webviewStyles: {
- progress: {
- color: '#F07423'
- }
- },
- type: "",
- };
- },
- onLoad(param) {
- this.type = param.type;
- let title = ""
- if (this.type == 1) {
- title = "用户使用协议"
- } else if (this.type == 2) {
- title = "隐私协议"
- } else if (this.type == 3) {
- title = "入驻协议"
- }
- uni.setNavigationBarTitle({
- title: title
- })
- this.webviewStyles.progress.color = getApp().globalData.color1;
- this.queryProtocolConfigView();
- },
- methods: {
- async queryProtocolConfigView() {
- let res = await this.$myRequest({
- url: "/project/queryProtocolConfigView",
- data: {},
- })
- if (res.data.success) {
- if (this.type == '1') { //使用协议
- this.url = "/hybrid/html/web/viewer.html?file="+res.data.single.userUseProtocol;
- } else if (this.type == '2') { //隐私协议
- this.url = "/hybrid/html/web/viewer.html?file="+res.data.single.userPrivacyProtocol;
- } else if (this.type == '3') { //业主注册协议
- this.url = "/hybrid/html/web/viewer.html?file="+res.data.single.ownerRegistProtocol;
- }
- }
- },
- }
- }
- </script>
- <style lang="scss">
- </style>
|