protocol.vue 789 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <view>
  3. <view id="text">
  4. <rich-text :nodes="item.dictDescribe"></rich-text>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. const NET = require('../../utils/request')
  10. const API = require('../../config/api')
  11. export default {
  12. data() {
  13. return {
  14. type: 'app_privacy_agreement',
  15. item: {}
  16. }
  17. },
  18. onLoad(item) {
  19. this.type = item.type
  20. let title = '《shop》商城用户协议'
  21. if (this.type === 'app_privacy_agreement') {
  22. title = '《shop》商城隐私协议'
  23. }
  24. uni.setNavigationBarTitle({
  25. title
  26. })
  27. this.getquery()
  28. },
  29. methods: {
  30. getquery() {
  31. NET.request(API.Query, {
  32. name: this.type
  33. }, 'GET').then((res) => {
  34. this.item = res.data
  35. })
  36. .catch((res) => {
  37. })
  38. }
  39. }
  40. }
  41. </script>
  42. <style scoped>
  43. #text {
  44. padding: 40rpx;
  45. }
  46. </style>