about.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <view>
  3. <view class="about">
  4. <view class="logo">
  5. <image :src="about.logo"></image>
  6. <view>{{about.name?about.name:''}}
  7. <text v-if="about.version">当前版本:{{about.version}}</text>
  8. </view>
  9. </view>
  10. <view class="cellphone" @tap="callPhone" v-if="about.hotLine">服务热线:{{about.hotLine}}</view>
  11. <view class="info">
  12. <rich-text :nodes="about.aboutAs" @tap="richImg"></rich-text>
  13. </view>
  14. </view>
  15. <view class="copy">{{about.recordNumber?about.recordNumber:''}}</view>
  16. </view>
  17. </template>
  18. <script>
  19. const req = require("../../utils/request.js");
  20. export default {
  21. data() {
  22. return {
  23. about: {aboutAs:''}
  24. };
  25. },
  26. components: {},
  27. props: {},
  28. onLoad: function (options) {
  29. this.getAbout();
  30. },
  31. methods: {
  32. callPhone() {
  33. uni.makePhoneCall({
  34. phoneNumber: this.about.hotLine
  35. });
  36. },
  37. getAbout() {
  38. var _this = this;
  39. req.getRequest('/api/other/config', {}, (res)=> {
  40. _this.about.aboutAs = res.ABOUT_US
  41. _this.about.hotLine = res.CONFIG_SERVICE_HOT_MOBILE
  42. _this.about.logo = res.CONFIG_PROJECT_LOGO
  43. }, true);
  44. }
  45. }
  46. };
  47. </script>
  48. <style>
  49. @import "./about.css";
  50. </style>