zhangwei
2024-09-05 0c9b00f333f9baaffa9140fd1808a26e0af8416b
src/pages/detail/detail.vue
@@ -97,7 +97,7 @@
         </view>
      </view>
      <view class="tabbtns">
         <up-button color='#fece01' class="text-69" text="报名" @click="enroll"></up-button>
         <up-button color='#fece01' :loading='isLoading' loadingText="报名中" class="text-69" text="报名" @click="enroll"></up-button>
      </view>
   </view>
</template>
@@ -112,8 +112,9 @@
      },
      data() {
         return {
            orderObj: null,
            tags: ['4小时', '可无经验', '手脚麻利', '计时']
            orderObj: {},
            tags: ['4小时', '可无经验', '手脚麻利', '计时'],
            isLoading:false
         }
      },
      methods: {
@@ -125,6 +126,7 @@
            })
         },
         enroll() {
            this.isLoading = true
            this.$api.saveBaoMing({
               orderId: this.orderObj.id
            }).then(res => {
@@ -133,11 +135,13 @@
                     title: "报名成功!",
                     icon: "success"
                  })
                  uni.navigateBack()
               } else {
                  this.$util.showToast({
                     title: res.error
                  })
               }
               this.isLoading = false
            })
         }
      }