reghao 1 yıl önce
ebeveyn
işleme
53c0a36d73
2 değiştirilmiş dosya ile 21 ekleme ve 9 silme
  1. 2 2
      src/components/layout/NavBar.vue
  2. 19 7
      src/views/my/MyWallet.vue

+ 2 - 2
src/components/layout/NavBar.vue

@@ -339,11 +339,11 @@ export default {
       this.$router.push('/my/message')
     },
     goToPublish() {
-      if (this.$route.path === '/post/publish/video') {
+      if (this.$route.path === '/post/video/publish') {
         this.$router.go(0)
         return
       }
-      this.$router.push('/post/publish/video')
+      this.$router.push('/post/video/publish')
     },
     // ************************************************************************
     // 我的考试

+ 19 - 7
src/views/my/MyWallet.vue

@@ -59,12 +59,7 @@
     >
       <el-form ref="form" :model="chargeForm">
         <el-form-item label="充值金额">
-          <el-input
-            v-model="chargeForm.quantity"
-            placeholder="0.00"
-            style="width: 70%; padding-right: 2px"
-            clearable
-          />
+          <el-input-number v-model="chargeForm.quantity" :min="1" :max="100" style="margin-left: 5px" />
         </el-form-item>
         <el-form-item>
           <el-button
@@ -117,8 +112,25 @@ export default {
       this.chargeDialog = false
       chargeWallet(this.chargeForm).then(resp => {
         if (resp.code === 0) {
-          this.$message('充值请求已提交')
+          this.$notify.info({
+            title: '充值请求已提交',
+            duration: 3000
+          })
+        } else {
+          this.$notify({
+            title: '充值失败',
+            message: resp.msg,
+            type: 'error',
+            duration: 3000
+          })
         }
+      }).catch(error => {
+        this.$notify({
+          title: '充值失败',
+          message: error.message,
+          type: 'error',
+          duration: 3000
+        })
       })
     },
     getBillRecord() {