info.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <view>
  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="../static/promote/images/info_1.png" mode="widthFix"></image>
  7. <image src="../static/promote/images/info_2.png" mode="widthFix"></image>
  8. <image src="../static/promote/images/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. isDistriUser: '',
  29. distribution: {},
  30. config: {}
  31. };
  32. },
  33. onShow() {
  34. this.getConfig();
  35. this.getmyinfo();
  36. },
  37. methods: {
  38. jump(url){
  39. uni.navigateTo({
  40. url: url
  41. })
  42. },
  43. jumpUrl(){
  44. if(this.isDistriUser == 1){
  45. this.jump('/promote/status/status')
  46. }else{
  47. if(this.distribution.distributionIsExamine == 1){
  48. this.jump('/promote/apply/apply')
  49. }else{
  50. uni.redirectTo({
  51. url: '/promote/apply/apply'
  52. })
  53. }
  54. }
  55. },
  56. getConfig(){
  57. req.g('/api/config', res => {
  58. this.config = res;
  59. })
  60. },
  61. getmyinfo: function() {
  62. let that = this;
  63. req.getRequest('/api/user/info', {}, data => {
  64. this.isDistriUser = data.isDistriUser;
  65. this.getdistri();
  66. });
  67. },
  68. getdistri() {
  69. req.postRequest('/api/distribution/config', {}, data => {
  70. this.distribution = data;
  71. })
  72. }
  73. }
  74. };
  75. </script>
  76. <style>
  77. @import "./info.css";
  78. </style>