浏览代码

no message

seamwang 2 年之前
父节点
当前提交
6a0a107008
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      src/pages/class/detail.vue

+ 5 - 2
src/pages/class/detail.vue

@@ -251,6 +251,9 @@ export default {
251
       'carts'
251
       'carts'
252
     ])
252
     ])
253
   },
253
   },
254
+  onShow() {
255
+    this.disableBtn = false
256
+  },
254
   onLoad(option) {
257
   onLoad(option) {
255
     this.attend_id = Number(decodeURIComponent(option.attend_id))
258
     this.attend_id = Number(decodeURIComponent(option.attend_id))
256
     if (this.attend_id === 0) {
259
     if (this.attend_id === 0) {
@@ -278,7 +281,7 @@ export default {
278
       if (this.carts.includes(this.attend_id)) {
281
       if (this.carts.includes(this.attend_id)) {
279
         uni.showToast({ title: '课程已存在,请勿重复添加!', icon: 'none' })
282
         uni.showToast({ title: '课程已存在,请勿重复添加!', icon: 'none' })
280
         setTimeout(() => {
283
         setTimeout(() => {
281
-          this.disableBtn = false
284
+          // this.disableBtn = false
282
           this.globalNavigateTo('classCart')
285
           this.globalNavigateTo('classCart')
283
         }, 1000)
286
         }, 1000)
284
         return false
287
         return false
@@ -290,7 +293,7 @@ export default {
290
       }
293
       }
291
       const props = this.goods.props.join(',')
294
       const props = this.goods.props.join(',')
292
       _joinShop({ class_attend_id: this.attend_id, prop: props }).then(res => {
295
       _joinShop({ class_attend_id: this.attend_id, prop: props }).then(res => {
293
-        this.disableBtn = false
296
+        // this.disableBtn = false
294
         this.globalNavigateTo('classCart')
297
         this.globalNavigateTo('classCart')
295
       })
298
       })
296
     },
299
     },