index.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <view v-if="showAgree">
  3. <view class="agreement">
  4. <view class="title">供应商入驻协议<text class="iconfont icon-guanbi1" @click="onclose"></text></view>
  5. <view class="conter">
  6. <jyf-parser :html="content" ref="article" :tag-style="tagStyle"></jyf-parser>
  7. </view>
  8. </view>
  9. <view class="mask"></view>
  10. </view>
  11. </template>
  12. <script>
  13. import parser from "@/components/jyf-parser/jyf-parser";
  14. import {
  15. getUserAgreement,
  16. } from '@/api/user.js';
  17. export default{
  18. components: {
  19. "jyf-parser": parser
  20. },
  21. props: {
  22. showAgree: {
  23. type: Boolean,
  24. default: true
  25. },
  26. },
  27. data(){
  28. return{
  29. tagStyle: {
  30. img: 'width:100%;display:block;',
  31. table: 'width:100%',
  32. video: 'width:100%'
  33. },
  34. content: '',
  35. }
  36. },
  37. mounted() {},
  38. methods:{
  39. getAgreement(){
  40. getUserAgreement('supplier').then(res => {
  41. this.content = res.data.content
  42. }).catch(err => {
  43. that.$util.Tips({
  44. title: err.msg
  45. });
  46. })
  47. },
  48. onclose(){
  49. this.$emit('close')
  50. }
  51. }
  52. }
  53. </script>
  54. <style lang="scss">
  55. .agreement{
  56. width: 656rpx;
  57. height: 916rpx;
  58. background-color: #fff;
  59. padding: 52rpx 52rpx 58rpx 52rpx;
  60. position: fixed;
  61. top:50%;
  62. left:50%;
  63. margin-left: -328rpx;
  64. margin-top: -458rpx;
  65. z-index: 10;
  66. border-radius: 24rpx;
  67. .title{
  68. color: #282828;
  69. text-align: center;
  70. font-size: 32rpx;
  71. margin-bottom: 42rpx;
  72. position: relative;
  73. .iconfont {
  74. color: #E8E8E8;
  75. position: absolute;
  76. font-size: 45rpx;
  77. top:-40rpx;
  78. right: -40rpx;
  79. }
  80. }
  81. .conter{
  82. width: 100%;
  83. height: 720rpx;
  84. overflow: auto;
  85. }
  86. }
  87. </style>