index.vue 966 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <view class="app-container">
  3. <view v-if="content" class="ql-container">
  4. <rich-text class="ql-editor" :nodes="content" />
  5. </view>
  6. <noData v-else>
  7. 暂无引导内容
  8. </noData>
  9. <button type="submit" circle @click="close">知道了</button>
  10. </view>
  11. </template>
  12. <script>
  13. import { getGuidePageContent } from '@/api/guide'
  14. export default {
  15. data() {
  16. return {
  17. content: ''
  18. }
  19. },
  20. onLoad(e) {
  21. getGuidePageContent({
  22. clientType: e.deviceModel
  23. }).then(res => {
  24. if (res.data.code === 0) {
  25. this.content = res.data.data.guidePageContent
  26. }
  27. })
  28. },
  29. methods: {
  30. close() {
  31. closePage.postMessage('关闭页面')
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang="scss" scoped>
  37. .app-container {
  38. height: 100%;
  39. }
  40. .ql-container {
  41. height: calc(100% - 106rpx);
  42. overflow-y: scroll;
  43. }
  44. button {
  45. position: absolute;
  46. bottom: 32rpx;
  47. left: 32rpx;
  48. width: calc(100% - 64rpx);
  49. }
  50. </style>