ymm лет назад: 3
Родитель
Сommit
fb8217e73c

Разница между файлами не показана из-за своего большого размера
+ 7 - 0
microserviceUserH5/static/js/vender/vue/vue-clipboard.min.js


+ 9 - 9
microserviceUserH5/vcloud/actFission.html

@@ -340,9 +340,9 @@
 			el: '#app',
 			data: {
 				isshow: false,
-				token: GetRequest().token ? GetRequest().token:'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyYW5kb20iOiI1MTc5OSIsImNsaWVudCI6IjAiLCJleHAiOjE2NDAyMzY0NjQsInVzZXJuYW1lIjoiYWRtaW4ifQ.M8qTMKfMQjKjQ1uAu1M-ty8HRRmWJgq7ED1Kbhu4p4Q',
+				token: GetRequest().token ? GetRequest().token :'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyYW5kb20iOiI3MTI4MSIsImNsaWVudCI6IjAiLCJleHAiOjE2NDAyOTkzNjksInVzZXJuYW1lIjoiYWRtaW4ifQ.RFjJ1f-TlgSWmF5M94n2AxHhGUZWrul244hIxr6jyOQ',
 				topic: {},
-				rewardList: [{surfaceName:'1221',receiveStatus:0,id:1},{surfaceName:'1221',receiveStatus:1,id:12}],
+				rewardList: [],
 				queryParams: {
 					pageNum: 1,
 					pageSize: 10
@@ -355,16 +355,15 @@
 				total: 0,
 				shareInfo: {},
 				defaultImg: 'this.src="' + "../static/offImg/tou.png" + '"',
-				actStatus: 1, //0活动状态 1开始
+				actStatus: 0, //0活动状态 1开始
 				marqueeList: [],
-			
 			},
 			created() {
-				// this.getAwardPage(); //获取奖励列表
+				this.getAwardPage(); //获取奖励列表
 			},
 			mounted() {
-				// this.getActDetail();
-				// this.getMarquee(); //跑马灯
+				this.getActDetail();
+				this.getMarquee(); //跑马灯
 
 				//this.getList();
 
@@ -454,7 +453,9 @@
 							if (isAndroid) {
 								window.native.activatePhone(1, id)
 							} else if (isIOS) {
-								window.webkit.messageHandlers.receive.postMessage({"awardId":id});
+								window.webkit.messageHandlers.receive.postMessage({
+									"awardId": id
+								});
 							}
 						} else if (res.status == 1) {
 							return;
@@ -466,7 +467,6 @@
 					})
 
 				},
-
 				download() {
 
 				},

+ 103 - 93
microserviceUserH5/vcloud/actFissionShare.html

@@ -168,31 +168,33 @@
             font-family: PingFangSC-Regular, PingFang SC;
             color: #FFFFFF;
         }
-        .van-swipe-item p:first-of-type{
+
+        .van-swipe-item p:first-of-type {
             max-width: 2.4rem;
             display: block;
-			overflow: hidden;
-			word-break: keep-all;
-			white-space: nowrap;
-			text-overflow: ellipsis;
+            overflow: hidden;
+            word-break: keep-all;
+            white-space: nowrap;
+            text-overflow: ellipsis;
         }
+
         .topic-info img {
-			max-width: 100%;
-			width: auto;
-			height: auto;
-			border-radius: 0.2rem;
-			margin-bottom: 0.2rem;
-			margin-top: 0.2rem;
-		}
-
-		.topic-info p {
-			font-size: 0.3rem;
-			font-family: PingFangSC-Regular, PingFang SC;
-			font-weight: 400;
-			color: #333333;
-			letter-spacing: 0.02rem;
-
-		}
+            max-width: 100%;
+            width: auto;
+            height: auto;
+            border-radius: 0.2rem;
+            margin-bottom: 0.2rem;
+            margin-top: 0.2rem;
+        }
+
+        .topic-info p {
+            font-size: 0.3rem;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #333333;
+            letter-spacing: 0.02rem;
+
+        }
     </style>
 </head>
 
@@ -205,14 +207,14 @@
                     <van-swipe vertical class="notice-swipe" :autoplay="2000" :show-indicators="false">
                         <van-swipe-item v-for="(item,index) in marqueeList">
                             <img :src="standarImg(item.headImgUrl)" :onerror="defaultImg" alt="">
-							<p>{{item.surfaceName}}</p>
-							<p>已获得星动云手机套餐</p>
+                            <p>{{item.surfaceName}}</p>
+                            <p>已获得星动云手机套餐</p>
                         </van-swipe-item>
-                      
+
                     </van-swipe>
                 </van-notice-bar>
             </div>
-            <div class="top-content" >
+            <div class="top-content">
                 <div v-html="topic" class="topic-info"></div>
 
             </div>
@@ -222,7 +224,8 @@
                         <p>激活码:</p>
                         <p>AS4*********SD3</p>
                     </div>
-                    <div class="button-download">点击复制并下载</div>
+                    <div class="button-download copybtn" :data-clipboard-text="key"
+                         @click='createCopy()'>点击复制并下载</div>
                 </div>
             </div>
         </div>
@@ -237,6 +240,7 @@
     <script src="../static/js/vender/vue/axios.min.js"></script>
     <script src="../static/js/vender/vue/config.js"></script>
     <script src="../static/js/vender/vue/api.js"></script>
+    <script src="../static/js/vender/vue/vue-clipboard.min.js"></script>
 
     <script type="text/javascript">
         new Vue({
@@ -244,9 +248,10 @@
             data: {
                 isshow: true,
                 id: GetRequest().id ? GetRequest().id : 404,
-                topic:null,
+                topic: null,
                 defaultImg: 'this.src="' + "../static/offImg/tou.png" + '"',
-                marqueeList:[],
+                marqueeList: [],
+                key: '3333',
 
             },
             created() {
@@ -254,111 +259,116 @@
             },
             mounted() {
                 this.getActDetail();
-             
+
                 this.getMarquee(); //跑马灯
-                
-               
+
+
 
             },
             methods: {
                 //查看活动是否下架
                 getActDetail() { //获取活动状态
-					getActDetail().then(res => {
-						this.$toast.clear();
-						if (res.status === 0) {
-                            if( res.data.actStatus==1){
-                                this.isshow=true;
+                    getActDetail().then(res => {
+                        this.$toast.clear();
+                        if (res.status === 0) {
+                            if (res.data.actStatus == 1) {
+                                this.isshow = true;
                                 this.getStrategy();
-                            }else{
-                                this.isshow=false;
+                            } else {
+                                this.isshow = false;
                             }
-							
-						} else {
-							this.$toast(res.msg);
-						}
-					})
-				},
+
+                        } else {
+                            this.$toast(res.msg);
+                        }
+                    })
+                },
                 getCheck() {
                     getEvantCheck(this.id).then(res => {
                         console.log(res)
                     })
                 },
+                createCopy(){
+                    this.$toast.loading({
+                        duration: 2000,
+                        message: '加载中...',
+                        forbidClick: true,
+                        loadingType: 'spinner',
+                    });
+						var clipboard = new ClipboardJS('.copybtn') //此处为点击的dom的类名
+                       
+						console.log(232);
+						clipboard.on('success', (e)=>{
+                            this.$toast('复制成功');
+						    
+							clipboard.destroy()
+						})
+						clipboard.on('error', (e)=>{
+                            this.$toast('复制失败');
+							clipboard.destroy()
+						})
+					},
                 download() {
+
                     var u = navigator.userAgent,
                         app = navigator.appVersion;
                     var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
                     var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
                     if (isAndroid) {
                         window.location.href =
-                            'http://www.androidscloud.com/admin/attachment/download/2117e9b7f3734b16b81b9d7bb1c5a601';
+                            'http://www.androidscloud.com//suanchou';
                     } else if (isIOS) {
                         window.location.href = 'https://www.pgyer.com/gemini6';
-                    } else {
-
                     }
                 },
                 standarImg(id) {
-					return `${fileCenterApi}/file-center/fileOperate/getImage?id=${id}`;
-				},
-                getList() {
+                    return `${fileCenterApi}/file-center/fileOperate/getImage?id=${id}`;
+                },
+                getMarquee() {
+                    getMarquee().then(res => {
+                        if (res.status === 0) {
+                            this.marqueeList = res.data;
+                        } else {
+                            this.$toast(res.msg);
+                        }
+                    })
+                },
+                getStrategy() {
                     this.$toast.loading({
                         duration: 0,
                         message: '加载中...',
                         forbidClick: true,
                         loadingType: 'spinner',
                     });
-                    // getEvantDetails(this.id).then(res => {
-                    //     this.$toast.clear();
-                    //     if (res.status == 0) {
-                    //         if (res.data) {
-                    //             this.isshow = false;
-                    //             this.topic = res.data;
-                    //         } else {
-                    //             this.isshow = true;
-
-                    //         }
-
-
-                    //     } else {
-
-                    //     }
-                    // })
-                },
-                getMarquee() {
-					getMarquee().then(res => {
-						if (res.status === 0) {
-							this.marqueeList = res.data;
-						} else {
-							this.$toast(res.msg);
-						}
-					})
-				},
-                getStrategy(){
-                    this.$toast.loading({
-						duration: 0,
-						message: '加载中...',
-						forbidClick: true,
-						loadingType: 'spinner',
-					});
-                    getStrategy().then(res=>{
-                       this.$toast.clear();
-                        if(res.status==0){
+                    getStrategy().then(res => {
+                        this.$toast.clear();
+                        if (res.status == 0) {
                             if (res.data) {
-								this.isshow = true;
-                                this.topic=  res.data.content;
+                                this.isshow = true;
+                                this.topic = res.data.content;
                                 console.log(this.topic)
-							} else {
-								this.isshow = false;
+                            } else {
+                                this.isshow = false;
+
+                            }
 
-							}
-                         
                         }
                         console.log(res)
 
                     })
-                }
+                },
+                onCopy() {
+                    console.log(2323);
+                    this.$toast('复制成功');
+
+
+                },
+                onError() {
+                    this.$toast('复制失败');
 
+                },
             }
+
         })
     </script>
 </body>