info.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view v-if="isShowPage">
  3. <view class="con">
  4. <mp-html :content="config.promote_info" :lazy-load="true" @imgtap="choose" v-if="config.promote_info"></mp-html>
  5. <block v-else>
  6. <image :src="picUrlss + 'promote_info_1.png'" mode="widthFix"></image>
  7. <image :src="picUrlss + 'promote_info_2.png'" mode="widthFix"></image>
  8. <image :src="picUrlss + 'promote_info_3.png'" mode="widthFix"></image>
  9. </block>
  10. </view>
  11. <view class="bot">
  12. <view class="btn" @click="jumpUrl('')">马上申请</view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. // promote/apply/apply.js
  18. // promote/team/team.js
  19. const app = getApp();
  20. const req = require("../../utils/request.js");
  21. import mpHtml from "../../components/mp-html/components/mp-html/mp-html";
  22. export default {
  23. components: {
  24. mpHtml
  25. },
  26. data() {
  27. return {
  28. picUrlss: req.public.picUrls,
  29. isShowPage: false,
  30. isDistriUser: '',
  31. distribution: {},
  32. config: {}
  33. };
  34. },
  35. onShow() {
  36. this.getConfig();
  37. this.getmyinfo();
  38. },
  39. methods: {
  40. jump(url){
  41. uni.navigateTo({
  42. url: url
  43. })
  44. },
  45. jumpUrl(){
  46. if(this.isDistriUser == 1){
  47. this.jump('/promote/status/status')
  48. }else{
  49. if(this.distribution.distributionIsExamine == 1){
  50. this.jump('/promote/apply/apply')
  51. }else{
  52. uni.redirectTo({
  53. url: '/promote/apply/apply'
  54. })
  55. }
  56. }
  57. },
  58. getConfig(){
  59. req.g('/api/config', res => {
  60. this.config = res;
  61. this.isShowPage = true;
  62. })
  63. },
  64. getmyinfo: function() {
  65. let that = this;
  66. req.getRequest('/api/user/info', {}, data => {
  67. this.isDistriUser = data.isDistriUser;
  68. this.getdistri();
  69. });
  70. },
  71. getdistri() {
  72. req.postRequest('/api/distribution/config', {}, data => {
  73. this.distribution = data;
  74. })
  75. }
  76. }
  77. };
  78. </script>
  79. <style>
  80. @import "./info.css";
  81. </style>