瀏覽代碼

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

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

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

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

@@ -120,61 +120,61 @@ export default {
120 120
       showPopupCalendarPoster: false,
121 121
       stater: null,
122 122
       MyWinningShow: false
123
-    }
123
+    };
124 124
   },
125 125
   watch: {
126 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 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 135
   created() {
136
-    this.showSelf = this.show
136
+    this.showSelf = this.show;
137 137
   },
138 138
   mounted() {
139
-    this.forbidScroll()
139
+    this.forbidScroll();
140 140
     if (this.show === true) {
141
-      this.transform()
141
+      this.transform();
142 142
     }
143 143
   },
144 144
   methods: {
145 145
     canclMyWinning() {
146
-      this.MyWinningShow = false
146
+      this.MyWinningShow = false;
147 147
     },
148 148
     canckle() {
149
-      this.showPopupCalendarPoster = false
149
+      this.showPopupCalendarPoster = false;
150 150
     },
151 151
     shareClick() {
152 152
       this.$router.replace({
153 153
         path: 'SaveShare',
154 154
         query: { states: 0 }
155
-      })
155
+      });
156 156
     },
157 157
     transform() {
158 158
       setTimeout(() => {
159
-        this.classDivAA = this.show
160
-      }, 0)
159
+        this.classDivAA = this.show;
160
+      }, 0);
161 161
     },
162 162
     /** 禁止页面滚动 */
163 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 168
     /**  每次获取之后 zindex 自动增加 */
169 169
     getZIndex() {
170
-      let zIndexInit = 2022112
171
-      return zIndexInit++
170
+      let zIndexInit = 2022112;
171
+      return zIndexInit++;
172 172
     },
173 173
 
174 174
     /** 取消按钮操作 */
175 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,10 +184,10 @@ export default {
184 184
 
185 185
     /** 恢复页面的滚动 */
186 186
     sloveBodyOverflow() {
187
-      document.body.style.overflow = this.bodyOverflow
187
+      document.body.style.overflow = this.bodyOverflow;
188 188
     }
189 189
   }
190
-}
190
+};
191 191
 </script>
192 192
 
193 193
 <style lang="less" scoped>

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

@@ -54,31 +54,31 @@ export default {
54 54
       popuSave: require('../assets/buttonImg/pressSave.png'),
55 55
 
56 56
       myShareShow: true
57
-    }
57
+    };
58 58
   },
59 59
   watch: {
60 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 65
   created() {
66
-    this.showSelf = this.show
66
+    this.showSelf = this.show;
67 67
   },
68 68
   mounted() {
69
-    this.forbidScroll()
69
+    this.forbidScroll();
70 70
   },
71 71
   methods: {
72 72
     /** 禁止页面滚动 */
73 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 78
     /**  每次获取之后 zindex 自动增加 */
79 79
     getZIndex() {
80
-      let zIndexInit = 2022112
81
-      return zIndexInit++
80
+      let zIndexInit = 2022112;
81
+      return zIndexInit++;
82 82
     },
83 83
 
84 84
     /** 取消按钮操作 */
@@ -88,23 +88,23 @@ export default {
88 88
 
89 89
     /** 确认按钮操作 */
90 90
     confirm() {
91
-      this.$emit('confirm', true)
91
+      this.$emit('confirm', true);
92 92
     },
93 93
 
94 94
     /** 点击遮罩关闭弹窗 */
95 95
     closeMyself(event) {
96 96
       // this.sloveBodyOverflow()
97
-      this.$emit('closeMyself', true)
97
+      this.$emit('closeMyself', true);
98 98
     },
99 99
 
100 100
     /** 恢复页面的滚动 */
101 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 108
 </script>
109 109
 
110 110
 <style lang="less" scoped>