浏览代码

Merge branch 'master' of http://git.ycjcjy.com/honghe/h5-draw-lots into master

张延森 3 年前
父节点
当前提交
e371ee43a1
共有 4 个文件被更改,包括 66 次插入64 次删除
  1. 14
    12
      src/components/Modal.vue
  2. 17
    17
      src/components/MyWinning.vue
  3. 21
    21
      src/components/Popup.vue
  4. 14
    14
      src/components/ShaerPopup.vue

+ 14
- 12
src/components/Modal.vue 查看文件

3
     <div class="modal" :style="modalStyle" @click.stop="handleMaskClick">
3
     <div class="modal" :style="modalStyle" @click.stop="handleMaskClick">
4
       <fire-flies v-if="showFireflies"></fire-flies>
4
       <fire-flies v-if="showFireflies"></fire-flies>
5
       <div class="modal-action back-btn" v-if="showBack" @click.stop="$emit('close')">
5
       <div class="modal-action back-btn" v-if="showBack" @click.stop="$emit('close')">
6
-        <img src="~@/assets/buttonImg/backImg.png" alt="">
6
+        <img src="~@/assets/buttonImg/backImg.png" alt />
7
       </div>
7
       </div>
8
       <div class="modal-action share-guide" v-if="showShare">
8
       <div class="modal-action share-guide" v-if="showShare">
9
-        <img src="~@/assets/buttonImg/shareText.png" alt="">
9
+        <img src="~@/assets/buttonImg/shareText.png" alt />
10
+      </div>
11
+      <div class="modal-action">
12
+        <slot name="action"></slot>
13
+      </div>
14
+      <div class="modal-body">
15
+        <slot></slot>
10
       </div>
16
       </div>
11
-      <div class="modal-action"><slot name="action"></slot></div>
12
-      <div class="modal-body"><slot></slot></div>
13
-
14
     </div>
17
     </div>
15
-
16
   </div>
18
   </div>
17
 </template>
19
 </template>
18
 
20
 
26
     show: Boolean,
28
     show: Boolean,
27
     mask: {
29
     mask: {
28
       type: Boolean,
30
       type: Boolean,
29
-      default: true,
31
+      default: true
30
     },
32
     },
31
     maskClickCloseable: {
33
     maskClickCloseable: {
32
       type: Boolean,
34
       type: Boolean,
33
-      default: true,
35
+      default: true
34
     },
36
     },
35
     showBack: Boolean,
37
     showBack: Boolean,
36
     showFireflies: {
38
     showFireflies: {
43
     modalStyle() {
45
     modalStyle() {
44
       return {
46
       return {
45
         background: 'rgba(0, 0, 0, 0.6)'
47
         background: 'rgba(0, 0, 0, 0.6)'
46
-      }
48
+      };
47
     }
49
     }
48
   },
50
   },
49
   methods: {
51
   methods: {
50
     handleMaskClick() {
52
     handleMaskClick() {
51
       if (this.maskClickCloseable) {
53
       if (this.maskClickCloseable) {
52
-        this.$emit('close')
54
+        this.$emit('close');
53
       }
55
       }
54
     }
56
     }
55
   }
57
   }
56
-}
58
+};
57
 </script>
59
 </script>
58
 
60
 
59
 <style lang="less" scoped>
61
 <style lang="less" scoped>
92
       top: 0.5em;
94
       top: 0.5em;
93
       right: 0em;
95
       right: 0em;
94
       width: 3em;
96
       width: 3em;
95
-      
97
+
96
       & > img {
98
       & > img {
97
         width: 100%;
99
         width: 100%;
98
       }
100
       }

+ 17
- 17
src/components/MyWinning.vue 查看文件

49
 </template>
49
 </template>
50
 
50
 
51
 <script>
51
 <script>
52
-import { hideLoading } from '@/utils'
52
+import { hideLoading } from '@/utils';
53
 
53
 
54
 export default {
54
 export default {
55
   name: 'MyWinning',
55
   name: 'MyWinning',
81
       shaerButRed: require('../assets/buttonImg/sayFriend.png'),
81
       shaerButRed: require('../assets/buttonImg/sayFriend.png'),
82
       pressLucky: require('../assets/buttonImg/happyAccept.png'),
82
       pressLucky: require('../assets/buttonImg/happyAccept.png'),
83
       PrizeShow: null
83
       PrizeShow: null
84
-    }
84
+    };
85
   },
85
   },
86
 
86
 
87
   watch: {
87
   watch: {
89
       // this.showSelf = this.show
89
       // this.showSelf = this.show
90
     },
90
     },
91
     mounted() {
91
     mounted() {
92
-      hideLoading() //loading
92
+      hideLoading(); //loading
93
 
93
 
94
-      this.forbidScroll()
94
+      this.forbidScroll();
95
       if (this.show === true) {
95
       if (this.show === true) {
96
-        this.transform()
96
+        this.transform();
97
       }
97
       }
98
     }
98
     }
99
   },
99
   },
101
     /** 取消按钮操作 */
101
     /** 取消按钮操作 */
102
     cancelPopupts() {
102
     cancelPopupts() {
103
       // this.shaerShow = false
103
       // this.shaerShow = false
104
-      this.$emit('cancelPopus', true)
104
+      this.$emit('cancelPopus', true);
105
     },
105
     },
106
 
106
 
107
     cancelPopup() {
107
     cancelPopup() {
108
-      this.shaerShow = false
108
+      this.shaerShow = false;
109
     },
109
     },
110
     // shareClick() {
110
     // shareClick() {
111
     //   this.$router.replace({
111
     //   this.$router.replace({
121
     // },
121
     // },
122
     transform() {
122
     transform() {
123
       setTimeout(() => {
123
       setTimeout(() => {
124
-        this.classDivAA = this.show
125
-      }, 0)
124
+        this.classDivAA = this.show;
125
+      }, 0);
126
     },
126
     },
127
     /** 禁止页面滚动 */
127
     /** 禁止页面滚动 */
128
     forbidScroll() {
128
     forbidScroll() {
129
-      this.bodyOverflow = document.body.style.overflow
130
-      document.body.style.overflow = 'hidden'
129
+      this.bodyOverflow = document.body.style.overflow;
130
+      document.body.style.overflow = 'hidden';
131
     },
131
     },
132
 
132
 
133
     /**  每次获取之后 zindex 自动增加 */
133
     /**  每次获取之后 zindex 自动增加 */
134
     getZIndex() {
134
     getZIndex() {
135
-      let zIndexInit = 2022112
136
-      return zIndexInit++
135
+      let zIndexInit = 2022112;
136
+      return zIndexInit++;
137
     },
137
     },
138
 
138
 
139
     /** 确认按钮操作 */
139
     /** 确认按钮操作 */
140
     confirm() {
140
     confirm() {
141
-      this.$emit('confirm', true)
141
+      this.$emit('confirm', true);
142
     },
142
     },
143
 
143
 
144
     /** 点击遮罩关闭弹窗 */
144
     /** 点击遮罩关闭弹窗 */
145
     closeMyself(event) {
145
     closeMyself(event) {
146
       // this.sloveBodyOverflow()
146
       // this.sloveBodyOverflow()
147
-      this.$emit('closeMyself', true)
147
+      this.$emit('closeMyself', true);
148
     },
148
     },
149
 
149
 
150
     /** 恢复页面的滚动 */
150
     /** 恢复页面的滚动 */
151
     sloveBodyOverflow() {
151
     sloveBodyOverflow() {
152
       // this.showSelf = false
152
       // this.showSelf = false
153
-      document.body.style.overflow = this.bodyOverflow
153
+      document.body.style.overflow = this.bodyOverflow;
154
     }
154
     }
155
   }
155
   }
156
-}
156
+};
157
 </script>
157
 </script>
158
 
158
 
159
 <style lang="less" scoped>
159
 <style lang="less" scoped>

+ 21
- 21
src/components/Popup.vue 查看文件

120
       showPopupCalendarPoster: false,
120
       showPopupCalendarPoster: false,
121
       stater: null,
121
       stater: null,
122
       MyWinningShow: false
122
       MyWinningShow: false
123
-    }
123
+    };
124
   },
124
   },
125
   watch: {
125
   watch: {
126
     show(val) {
126
     show(val) {
127
-      console.log('🚀 ~ file: Popup.vue ~ line 78 ~ show ~ val', this.isPrize)
128
-      this.showSelf = val
127
+      console.log('🚀 ~ file: Popup.vue ~ line 78 ~ show ~ val', this.isPrize);
128
+      this.showSelf = val;
129
       if (this.show === false) {
129
       if (this.show === false) {
130
-        this.myShareShow = false
130
+        this.myShareShow = false;
131
       }
131
       }
132
-      this.transform()
132
+      this.transform();
133
     }
133
     }
134
   },
134
   },
135
   created() {
135
   created() {
136
-    this.showSelf = this.show
136
+    this.showSelf = this.show;
137
   },
137
   },
138
   mounted() {
138
   mounted() {
139
-    this.forbidScroll()
139
+    this.forbidScroll();
140
     if (this.show === true) {
140
     if (this.show === true) {
141
-      this.transform()
141
+      this.transform();
142
     }
142
     }
143
   },
143
   },
144
   methods: {
144
   methods: {
145
     canclMyWinning() {
145
     canclMyWinning() {
146
-      this.MyWinningShow = false
146
+      this.MyWinningShow = false;
147
     },
147
     },
148
     canckle() {
148
     canckle() {
149
-      this.showPopupCalendarPoster = false
149
+      this.showPopupCalendarPoster = false;
150
     },
150
     },
151
     shareClick() {
151
     shareClick() {
152
       this.$router.replace({
152
       this.$router.replace({
153
         path: 'SaveShare',
153
         path: 'SaveShare',
154
         query: { states: 0 }
154
         query: { states: 0 }
155
-      })
155
+      });
156
     },
156
     },
157
     transform() {
157
     transform() {
158
       setTimeout(() => {
158
       setTimeout(() => {
159
-        this.classDivAA = this.show
160
-      }, 0)
159
+        this.classDivAA = this.show;
160
+      }, 0);
161
     },
161
     },
162
     /** 禁止页面滚动 */
162
     /** 禁止页面滚动 */
163
     forbidScroll() {
163
     forbidScroll() {
164
-      this.bodyOverflow = document.body.style.overflow
165
-      document.body.style.overflow = 'hidden'
164
+      this.bodyOverflow = document.body.style.overflow;
165
+      document.body.style.overflow = 'hidden';
166
     },
166
     },
167
 
167
 
168
     /**  每次获取之后 zindex 自动增加 */
168
     /**  每次获取之后 zindex 自动增加 */
169
     getZIndex() {
169
     getZIndex() {
170
-      let zIndexInit = 2022112
171
-      return zIndexInit++
170
+      let zIndexInit = 2022112;
171
+      return zIndexInit++;
172
     },
172
     },
173
 
173
 
174
     /** 取消按钮操作 */
174
     /** 取消按钮操作 */
175
     cancel() {
175
     cancel() {
176
-      event.stopPropagation()
177
-      this.$emit('cancel', true)
176
+      event.stopPropagation();
177
+      this.$emit('cancel', true);
178
     },
178
     },
179
 
179
 
180
     /** 点击遮罩关闭弹窗 */
180
     /** 点击遮罩关闭弹窗 */
184
 
184
 
185
     /** 恢复页面的滚动 */
185
     /** 恢复页面的滚动 */
186
     sloveBodyOverflow() {
186
     sloveBodyOverflow() {
187
-      document.body.style.overflow = this.bodyOverflow
187
+      document.body.style.overflow = this.bodyOverflow;
188
     }
188
     }
189
   }
189
   }
190
-}
190
+};
191
 </script>
191
 </script>
192
 
192
 
193
 <style lang="less" scoped>
193
 <style lang="less" scoped>

+ 14
- 14
src/components/ShaerPopup.vue 查看文件

54
       popuSave: require('../assets/buttonImg/pressSave.png'),
54
       popuSave: require('../assets/buttonImg/pressSave.png'),
55
 
55
 
56
       myShareShow: true
56
       myShareShow: true
57
-    }
57
+    };
58
   },
58
   },
59
   watch: {
59
   watch: {
60
     show(val) {
60
     show(val) {
61
-      console.log('🚀 ~ file: Popup.vue ~ line 78 ~ show ~ val', val)
62
-      this.showSelf = val
61
+      console.log('🚀 ~ file: Popup.vue ~ line 78 ~ show ~ val', val);
62
+      this.showSelf = val;
63
     }
63
     }
64
   },
64
   },
65
   created() {
65
   created() {
66
-    this.showSelf = this.show
66
+    this.showSelf = this.show;
67
   },
67
   },
68
   mounted() {
68
   mounted() {
69
-    this.forbidScroll()
69
+    this.forbidScroll();
70
   },
70
   },
71
   methods: {
71
   methods: {
72
     /** 禁止页面滚动 */
72
     /** 禁止页面滚动 */
73
     forbidScroll() {
73
     forbidScroll() {
74
-      this.bodyOverflow = document.body.style.overflow
75
-      document.body.style.overflow = 'hidden'
74
+      this.bodyOverflow = document.body.style.overflow;
75
+      document.body.style.overflow = 'hidden';
76
     },
76
     },
77
 
77
 
78
     /**  每次获取之后 zindex 自动增加 */
78
     /**  每次获取之后 zindex 自动增加 */
79
     getZIndex() {
79
     getZIndex() {
80
-      let zIndexInit = 2022112
81
-      return zIndexInit++
80
+      let zIndexInit = 2022112;
81
+      return zIndexInit++;
82
     },
82
     },
83
 
83
 
84
     /** 取消按钮操作 */
84
     /** 取消按钮操作 */
88
 
88
 
89
     /** 确认按钮操作 */
89
     /** 确认按钮操作 */
90
     confirm() {
90
     confirm() {
91
-      this.$emit('confirm', true)
91
+      this.$emit('confirm', true);
92
     },
92
     },
93
 
93
 
94
     /** 点击遮罩关闭弹窗 */
94
     /** 点击遮罩关闭弹窗 */
95
     closeMyself(event) {
95
     closeMyself(event) {
96
       // this.sloveBodyOverflow()
96
       // this.sloveBodyOverflow()
97
-      this.$emit('closeMyself', true)
97
+      this.$emit('closeMyself', true);
98
     },
98
     },
99
 
99
 
100
     /** 恢复页面的滚动 */
100
     /** 恢复页面的滚动 */
101
     sloveBodyOverflow() {
101
     sloveBodyOverflow() {
102
-      this.showSelf = false
102
+      this.showSelf = false;
103
 
103
 
104
-      document.body.style.overflow = this.bodyOverflow
104
+      document.body.style.overflow = this.bodyOverflow;
105
     }
105
     }
106
   }
106
   }
107
-}
107
+};
108
 </script>
108
 </script>
109
 
109
 
110
 <style lang="less" scoped>
110
 <style lang="less" scoped>