yuantianjiao 6 年之前
父節點
當前提交
296972eff4
共有 3 個檔案被更改,包括 24 行新增10 行删除
  1. 1
    1
      public/index.html
  2. 13
    9
      src/views/supportDetail/supportDetail.vue
  3. 10
    0
      src/views/supportMain/supportMain.vue

+ 1
- 1
public/index.html 查看文件

@@ -3,7 +3,7 @@
3 3
   <head>
4 4
     <meta charset="utf-8">
5 5
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
-    <meta name="viewport" content="width=device-width,initial-scale=1.0">
6
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" charset="utf-8" />
7 7
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8 8
     <link rel="stylesheet" href="//at.alicdn.com/t/font_957047_8k5bffh7y09.css">
9 9
     <title>助力砍价活动</title>

+ 13
- 9
src/views/supportDetail/supportDetail.vue 查看文件

@@ -88,7 +88,7 @@
88 88
     <div class="today-end" v-if="status == 6">
89 89
       <div class="box">
90 90
         <img :src="kulian">
91
-        <p>今日的力活动已结束,</p>
91
+        <p>今日的力活动已结束,</p>
92 92
         <p>明天再来吧!</p>
93 93
       </div>
94 94
     </div>
@@ -180,34 +180,38 @@ export default {
180 180
   methods: {
181 181
     ...mapIndexActions(['getGame', 'getRecord', 'setSupport']),
182 182
     checkStatus () {
183
-      if (this.$route.params.other === 'other') {
183
+      if (this.$route.params.other == 'other' && this.$route.params.recordid != this.game.record.RecordId) {
184 184
         this.status = 2
185 185
         this.btnText = '立即助力TA'
186 186
         if (this.list.length >= this.game.game.UserNum) {
187 187
           this.status = 5
188 188
         }
189
+        if (this.game.note.LeftNum <= 0) {
190
+          this.status = 6
191
+        }
189 192
       } else {
193
+        if (this.game.note.LeftNum <= 0) {
194
+          this.status = 6
195
+        }
190 196
         if (this.list.length >= this.game.game.UserNum) {
191 197
           this.status = 4
192 198
         }
193 199
       }
194 200
       let end = new Date(this.game.game.EndDate).valueOf()
195 201
       let now = new Date().valueOf()
196
-      if (now > end) {
202
+      if (now > end || this.game.game.Status == 2) {
197 203
         this.status = 3
198 204
         this.btnText = '立即助力TA'
199
-      } else if (this.game.note.LeftNum <= 0 && this.$route.params.other != 'other') {
200
-        this.status = 6
201 205
       }
202 206
       this.showPage = true
203 207
     },
204 208
     share (recordid) {
205 209
       let link = `${window.location.origin}${window.location.pathname}#/supportDetail/other/${recordid}`
206 210
       wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
207
-        title: '城的空间',
208
-        desc: '城的空间',
211
+        title: '定格陪伴',
212
+        desc: '我正在参加悦见山助力活动,快来帮我助力吧~',
209 213
         link: link,
210
-        thu_image: `https://spaceofcheng.oss-cn-beijing.aliyuncs.com/indexlogo.jpg?x-oss-process=style/wxicon`
214
+        thu_image: `http://spaceofcheng.oss-cn-beijing.aliyuncs.com/IMG_58371544441587.JPG?x-oss-process=style/wxicon`
211 215
       }).then(() => {
212 216
         setTimeout(() => {
213 217
           this.checkStatus()
@@ -228,7 +232,7 @@ export default {
228 232
       }
229 233
     },
230 234
     toLuckDraw () {
231
-      window.location.href = 'http://dev.jinchengjiaye.com/game/luckdraw/#/?lotteryId=2557197b-3a49-4067-b52c-97fdd2c93edc'
235
+      window.location.href = 'http://dev.jinchengjiaye.com/wechat/user.html#/rush?flashBuyId=ed84ad1f-030e-4f77-9042-9ca6ca87c9c8'
232 236
     }
233 237
   }
234 238
 }

+ 10
- 0
src/views/supportMain/supportMain.vue 查看文件

@@ -75,6 +75,12 @@ export default {
75 75
   },
76 76
   created () {
77 77
     this.getGame().then(() => {
78
+      if (this.game.game.Status == 2) {
79
+        this.btn.text = '活动已结束'
80
+        this.btn.status = 2
81
+        this.showPage = true
82
+        return
83
+      }
78 84
       if (this.game.record.CustomerId) {
79 85
         this.btn.text = '我的助力'
80 86
         this.btn.status = 3
@@ -105,6 +111,10 @@ export default {
105 111
   methods: {
106 112
     ...mapIndexActions(['getGame', 'signUp', 'setRecord']),
107 113
     submit () {
114
+      if (this.game.game.Status == 2) {
115
+        this.$toast('活动已结束')
116
+        return
117
+      }
108 118
       if (this.userInfo.Phone) {
109 119
         this.record()
110 120
       } else {