index.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <view class="main">
  3. <navbar :config="config" backColor="#666"></navbar>
  4. <view class="content ql-editor-box" v-html="content"></view>
  5. </view>
  6. </template>
  7. <script>
  8. export default{
  9. data(){
  10. return {
  11. config: {
  12. back: true,
  13. title: '',
  14. color: '#1a1a1a',
  15. backgroundColor: [1, '#fff'],
  16. statusBarFontColor: 'black'
  17. },
  18. content: ''
  19. }
  20. },
  21. onLoad(option) {
  22. this.getProtocol(option.code);
  23. },
  24. methods:{
  25. getProtocol(code){
  26. if(code == 'privacy-agreement'){
  27. this.config.title = '隐私政策'
  28. }
  29. if(code == 'about-us'){
  30. this.config.title = '关于我们'
  31. }
  32. if(code == 'privacy-agreement'){
  33. this.config.title = '用户隐私协议'
  34. }
  35. if(code == 'earnings-explain'){
  36. this.config.title = '收益说明'
  37. }
  38. if(code == 'income_statement'){
  39. this.config.title = '收益说明'
  40. }
  41. this.$http.get(`/protocolConfig/info/${code}`)
  42. .then(res => {
  43. if(res.code==200){
  44. this.content = res.data.content
  45. }
  46. })
  47. }
  48. }
  49. }
  50. </script>
  51. <style lang="scss" scoped>
  52. .main{
  53. .content{
  54. padding: 0 30rpx;
  55. }
  56. }
  57. </style>