zhangwei %!s(int64=3) %!d(string=hai) anos
pai
achega
a191a66b02
Modificáronse 1 ficheiros con 5 adicións e 3 borrados
  1. 5 3
      src/view/red-packet.vue

+ 5 - 3
src/view/red-packet.vue

@@ -293,10 +293,12 @@ function init() {
   }).then((res) => {
     switch (res.code.toString()) {
       case "0":
+        data.srcContentId = res.data.srcContentId
         // 未开始
         if (res.data.postType == 0) {
           data.status = 'not-open'
         }
+
         // 进行中
         if (res.data.postType == 1) {
           data.status = 'opened'
@@ -325,7 +327,6 @@ function init() {
         if (res.data.postType == 2) {
           data.status = 'close'
         }
-        data.srcContentId = res.data.srcContentId
         break
 
     }
@@ -346,6 +347,7 @@ function clickOpenRedPacket() {
       case "0":
         data.status = 'opened'
         data.money = res.data.receiveAmount
+        init()
         break
       case "2008":
         data.status = 'close'
@@ -630,8 +632,8 @@ body {
       }
     }
   }
-  .success{
-    .luck-list-title{
+  .success {
+    .luck-list-title {
       margin-top: 47px;
     }
   }