Apply.vue 886 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <view>
  3. <block v-if="!is_apply"><ApplyForm @applySuccess="applySuccess" :merchantInfo="merchant_info"/></block>
  4. <block v-else><AuditApplay :merchantInfo="merchant_info" @cancelApply='cancelApply'/></block>
  5. </view>
  6. </template>
  7. <script>
  8. import ApplyForm from './components/ApplyForm.vue';
  9. import AuditApplay from './components/AuditApplay.vue';
  10. export default {
  11. components: { ApplyForm, AuditApplay },
  12. data() {
  13. return {
  14. is_apply: false,
  15. merchant_info: {}
  16. };
  17. },
  18. onLoad() {
  19. this.getInfoMerchant();
  20. },
  21. methods: {
  22. // 提交申请成功
  23. applySuccess() {
  24. this.is_apply = true;
  25. },
  26. cancelApply(){
  27. this.is_apply = false;
  28. },
  29. // 商户详情
  30. getInfoMerchant() {
  31. this.$u.api.getInfoMerchant().then(res => {
  32. this.merchant_info = res.data;
  33. this.is_apply = JSON.stringify(res.data) !== '{}';
  34. });
  35. }
  36. }
  37. };
  38. </script>
  39. <style></style>