张延森 3 年之前
父節點
當前提交
ecbe79d1fd
共有 1 個文件被更改,包括 16 次插入0 次删除
  1. 16
    0
      src/pages/Honghe.vue

+ 16
- 0
src/pages/Honghe.vue 查看文件

@@ -35,6 +35,7 @@ import { useModel } from '@/store'
35 35
 import { drawLottery, getPrizeList } from '@/services/person'
36 36
 import { rand, shuffle } from '@/utils/math'
37 37
 import { hideLoading } from '@/utils'
38
+import { share } from 'src/utils/wx'
38 39
 
39 40
 /**
40 41
  * 月份信息
@@ -198,6 +199,21 @@ export default {
198 199
   },
199 200
   created() {
200 201
     this.getPrizes()
202
+
203
+    // 设置微信分享
204
+    share({ title: '抽取幸运签,解锁隐藏福利', desc: '每月都有欢乐发生' })
205
+  },
206
+  watch: {
207
+    showMyWinning(newValue, oldValue) {
208
+      // 微信分享
209
+      // 1、正常情况下, 分享主题是 抽取幸运签,解锁隐藏福利
210
+      // 2、中奖弹出情况下, 分享主题是 我中奖啦! 来试试你的运气吧
211
+      if (newValue && !oldValue) {
212
+        share({ title: '我中奖啦! 来试试你的运气吧', desc: '抽取幸运签,解锁隐藏福利' })
213
+      } else if (newValue !== oldValue) {
214
+        share({ title: '抽取幸运签,解锁隐藏福利', desc: '每月都有欢乐发生' })
215
+      }
216
+    }
201 217
   },
202 218
   methods: {
203 219
     //关闭