Browse Source

裂变活动

heyang 4 years ago
parent
commit
0185643b4b

+ 377 - 0
microserviceUserH5/static/js/vender/uuid.js

@@ -0,0 +1,377 @@
+/**
+ * UUID.js - RFC-compliant UUID Generator for JavaScript
+ *
+ * @file
+ * @author  LiosK
+ * @version v4.2.9
+ * @license Apache License 2.0: Copyright (c) 2010-2021 LiosK
+ */
+
+/**
+ * @class
+ * @classdesc {@link UUID} object.
+ * @hideconstructor
+ */
+ var UUID;
+
+ UUID = (function(overwrittenUUID) {
+ "use strict";
+ 
+ // Core Component {{{
+ 
+ /**
+  * Generates a version 4 UUID as a hexadecimal string.
+  * @returns {string} Hexadecimal UUID string.
+  */
+ UUID.generate = function() {
+   var rand = UUID._getRandomInt, hex = UUID._hexAligner;
+   return  hex(rand(32), 8)          // time_low
+         + "-"
+         + hex(rand(16), 4)          // time_mid
+         + "-"
+         + hex(0x4000 | rand(12), 4) // time_hi_and_version
+         + "-"
+         + hex(0x8000 | rand(14), 4) // clock_seq_hi_and_reserved clock_seq_low
+         + "-"
+         + hex(rand(48), 12);        // node
+ };
+ 
+ /**
+  * Returns an unsigned x-bit random integer.
+  * @private
+  * @param {number} x Unsigned integer ranging from 0 to 53, inclusive.
+  * @returns {number} Unsigned x-bit random integer (0 <= f(x) < 2^x).
+  */
+ UUID._getRandomInt = function(x) {
+   if (x < 0 || x > 53) { return NaN; }
+   var n = 0 | Math.random() * 0x40000000; // 1 << 30
+   return x > 30 ? n + (0 | Math.random() * (1 << x - 30)) * 0x40000000 : n >>> 30 - x;
+ };
+ 
+ /**
+  * Converts an integer to a zero-filled hexadecimal string.
+  * @private
+  * @param {number} num
+  * @param {number} length
+  * @returns {string}
+  */
+ UUID._hexAligner = function(num, length) {
+   var str = num.toString(16), i = length - str.length, z = "0";
+   for (; i > 0; i >>>= 1, z += z) { if (i & 1) { str = z + str; } }
+   return str;
+ };
+ 
+ /**
+  * Retains the value of 'UUID' global variable assigned before loading UUID.js.
+  * @since 3.2
+  * @type {any}
+  */
+ UUID.overwrittenUUID = overwrittenUUID;
+ 
+ // }}}
+ 
+ // Advanced Random Number Generator Component {{{
+ 
+ (function() {
+ 
+   var mathPRNG = UUID._getRandomInt;
+ 
+   /**
+    * Enables Math.random()-based pseudorandom number generator instead of cryptographically safer options.
+    * @since v3.5.0
+    * @deprecated This method is provided only to work around performance drawbacks of the safer algorithms.
+    */
+   UUID.useMathRandom = function() {
+     UUID._getRandomInt = mathPRNG;
+   };
+ 
+   var crypto = null, cryptoPRNG = mathPRNG;
+   if (typeof window !== "undefined" && (crypto = window.crypto || window.msCrypto)) {
+     if (crypto.getRandomValues && typeof Uint32Array !== "undefined") {
+       // Web Cryptography API
+       cryptoPRNG = function(x) {
+         if (x < 0 || x > 53) { return NaN; }
+         var ns = new Uint32Array(x > 32 ? 2 : 1);
+         ns = crypto.getRandomValues(ns) || ns;
+         return x > 32 ? ns[0] + (ns[1] >>> 64 - x) * 0x100000000 : ns[0] >>> 32 - x;
+       };
+     }
+   } else if (typeof require !== "undefined" && (crypto = require("crypto"))) {
+     if (crypto.randomBytes) {
+       // nodejs
+       cryptoPRNG = function(x) {
+         if (x < 0 || x > 53) { return NaN; }
+         var buf = crypto.randomBytes(x > 32 ? 8 : 4), n = buf.readUInt32BE(0);
+         return x > 32 ? n + (buf.readUInt32BE(4) >>> 64 - x) * 0x100000000 : n >>> 32 - x;
+       };
+     }
+   }
+   UUID._getRandomInt = cryptoPRNG;
+ 
+ })();
+ 
+ // }}}
+ 
+ // UUID Object Component {{{
+ 
+ /**
+  * Names of UUID internal fields.
+  * @type {string[]}
+  * @constant
+  * @since 3.0
+  */
+ UUID.FIELD_NAMES = ["timeLow", "timeMid", "timeHiAndVersion",
+                     "clockSeqHiAndReserved", "clockSeqLow", "node"];
+ 
+ /**
+  * Sizes of UUID internal fields.
+  * @type {number[]}
+  * @constant
+  * @since 3.0
+  */
+ UUID.FIELD_SIZES = [32, 16, 16, 8, 8, 48];
+ 
+ /**
+  * Creates a version 4 {@link UUID} object.
+  * @returns {UUID} Version 4 {@link UUID} object.
+  * @since 3.0
+  */
+ UUID.genV4 = function() {
+   var rand = UUID._getRandomInt;
+   return new UUID()._init(rand(32), rand(16), // time_low time_mid
+                           0x4000 | rand(12),  // time_hi_and_version
+                           0x80   | rand(6),   // clock_seq_hi_and_reserved
+                           rand(8), rand(48)); // clock_seq_low node
+ };
+ 
+ /**
+  * Converts a hexadecimal UUID string to a {@link UUID} object.
+  * @param {string} strId Hexadecimal UUID string ("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx").
+  * @returns {UUID} {@link UUID} object or null.
+  * @since 3.0
+  */
+ UUID.parse = function(strId) {
+   var r, p = /^\s*(urn:uuid:|\{)?([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{2})([0-9a-f]{2})-([0-9a-f]{12})(\})?\s*$/i;
+   if (r = p.exec(strId)) {
+     var l = r[1] || "", t = r[8] || "";
+     if (((l + t) === "") ||
+         (l === "{" && t === "}") ||
+         (l.toLowerCase() === "urn:uuid:" && t === "")) {
+       return new UUID()._init(parseInt(r[2], 16), parseInt(r[3], 16),
+                               parseInt(r[4], 16), parseInt(r[5], 16),
+                               parseInt(r[6], 16), parseInt(r[7], 16));
+     }
+   }
+   return null;
+ };
+ 
+ /**
+  * Initializes a {@link UUID} object.
+  * @private
+  * @constructs UUID
+  * @param {number} [timeLow=0] time_low field (octet 0-3, uint32).
+  * @param {number} [timeMid=0] time_mid field (octet 4-5, uint16).
+  * @param {number} [timeHiAndVersion=0] time_hi_and_version field (octet 6-7, uint16).
+  * @param {number} [clockSeqHiAndReserved=0] clock_seq_hi_and_reserved field (octet 8, uint8).
+  * @param {number} [clockSeqLow=0] clock_seq_low field (octet 9, uint8).
+  * @param {number} [node=0] node field (octet 10-15, uint48).
+  * @returns {UUID} this.
+  */
+ UUID.prototype._init = function() {
+   var names = UUID.FIELD_NAMES, sizes = UUID.FIELD_SIZES;
+   var bin = UUID._binAligner, hex = UUID._hexAligner;
+ 
+   /**
+    * UUID internal field values as an array of integers.
+    * @type {number[]}
+    */
+   this.intFields = new Array(6);
+ 
+   /**
+    * UUID internal field values as an array of binary strings.
+    * @type {string[]}
+    */
+   this.bitFields = new Array(6);
+ 
+   /**
+    * UUID internal field values as an array of hexadecimal strings.
+    * @type {string[]}
+    */
+   this.hexFields = new Array(6);
+ 
+   for (var i = 0; i < 6; i++) {
+     var intValue = parseInt(arguments[i] || 0);
+     this.intFields[i] = this.intFields[names[i]] = intValue;
+     this.bitFields[i] = this.bitFields[names[i]] = bin(intValue, sizes[i]);
+     this.hexFields[i] = this.hexFields[names[i]] = hex(intValue, sizes[i] >>> 2);
+   }
+ 
+   /**
+    * UUID version number.
+    * @type {number}
+    */
+   this.version = (this.intFields.timeHiAndVersion >>> 12) & 0xF;
+ 
+   /**
+    * 128-bit binary string representation.
+    * @type {string}
+    */
+   this.bitString = this.bitFields.join("");
+ 
+   /**
+    * Non-delimited hexadecimal string representation ("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx").
+    * @type {string}
+    * @since v3.3.0
+    */
+   this.hexNoDelim = this.hexFields.join("");
+ 
+   /**
+    * Hexadecimal string representation ("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx").
+    * @type {string}
+    */
+   this.hexString = this.hexFields[0] + "-" + this.hexFields[1] + "-" + this.hexFields[2]
+                  + "-" + this.hexFields[3] + this.hexFields[4] + "-" + this.hexFields[5];
+ 
+   /**
+    * URN string representation ("urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx").
+    * @type {string}
+    */
+   this.urn = "urn:uuid:" + this.hexString;
+ 
+   return this;
+ };
+ 
+ /**
+  * Converts an integer to a zero-filled binary string.
+  * @private
+  * @param {number} num
+  * @param {number} length
+  * @returns {string}
+  */
+ UUID._binAligner = function(num, length) {
+   var str = num.toString(2), i = length - str.length, z = "0";
+   for (; i > 0; i >>>= 1, z += z) { if (i & 1) { str = z + str; } }
+   return str;
+ };
+ 
+ /**
+  * Returns the hexadecimal string representation.
+  * @returns {string} {@link UUID#hexString}.
+  */
+ UUID.prototype.toString = function() { return this.hexString; };
+ 
+ /**
+  * Tests if two {@link UUID} objects are equal.
+  * @param {UUID} uuid
+  * @returns {boolean} True if two {@link UUID} objects are equal.
+  */
+ UUID.prototype.equals = function(uuid) {
+   if (!(uuid instanceof UUID)) { return false; }
+   for (var i = 0; i < 6; i++) {
+     if (this.intFields[i] !== uuid.intFields[i]) { return false; }
+   }
+   return true;
+ };
+ 
+ /**
+  * Nil UUID object.
+  * @type {UUID}
+  * @constant
+  * @since v3.4.0
+  */
+ UUID.NIL = new UUID()._init(0, 0, 0, 0, 0, 0);
+ 
+ // }}}
+ 
+ // UUID Version 1 Component {{{
+ 
+ /**
+  * Creates a version 1 {@link UUID} object.
+  * @returns {UUID} Version 1 {@link UUID} object.
+  * @since 3.0
+  */
+ UUID.genV1 = function() {
+   if (UUID._state == null) { UUID.resetState(); }
+   var now = new Date().getTime(), st = UUID._state;
+   if (now != st.timestamp) {
+     if (now < st.timestamp) { st.sequence++; }
+     st.timestamp = now;
+     st.tick = UUID._getRandomInt(4);
+   } else if (Math.random() < UUID._tsRatio && st.tick < 9984) {
+     // advance the timestamp fraction at a probability
+     // to compensate for the low timestamp resolution
+     st.tick += 1 + UUID._getRandomInt(4);
+   } else {
+     st.sequence++;
+   }
+ 
+   // format time fields
+   var tf = UUID._getTimeFieldValues(st.timestamp);
+   var tl = tf.low + st.tick;
+   var thav = (tf.hi & 0xFFF) | 0x1000;  // set version '0001'
+ 
+   // format clock sequence
+   st.sequence &= 0x3FFF;
+   var cshar = (st.sequence >>> 8) | 0x80; // set variant '10'
+   var csl = st.sequence & 0xFF;
+ 
+   return new UUID()._init(tl, tf.mid, thav, cshar, csl, st.node);
+ };
+ 
+ /**
+  * Re-initializes the internal state for version 1 UUID creation.
+  * @since 3.0
+  */
+ UUID.resetState = function() {
+   UUID._state = new UUIDState();
+ };
+ 
+ function UUIDState() {
+   var rand = UUID._getRandomInt;
+   this.timestamp = 0;
+   this.sequence = rand(14);
+   this.node = (rand(8) | 1) * 0x10000000000 + rand(40); // set multicast bit '1'
+   this.tick = rand(4);  // timestamp fraction smaller than a millisecond
+ }
+ 
+ /**
+  * Probability to advance the timestamp fraction: the ratio of tick movements to sequence increments.
+  * @private
+  * @type {number}
+  */
+ UUID._tsRatio = 1 / 4;
+ 
+ /**
+  * Persistent internal state for version 1 UUID creation.
+  * @private
+  * @type {UUIDState}
+  */
+ UUID._state = null;
+ 
+ /**
+  * @private
+  * @param {Date|number} time ECMAScript Date Object or milliseconds from 1970-01-01.
+  * @returns {any}
+  */
+ UUID._getTimeFieldValues = function(time) {
+   var ts = time - Date.UTC(1582, 9, 15);
+   var hm = ((ts / 0x100000000) * 10000) & 0xFFFFFFF;
+   return  { low: ((ts & 0xFFFFFFF) * 10000) % 0x100000000,
+             mid: hm & 0xFFFF, hi: hm >>> 16, timestamp: ts };
+ };
+ 
+ // }}}
+ 
+ // create local namespace
+ function UUID() {}
+ 
+ // for nodejs
+ if (typeof module === "object" && typeof module.exports === "object") {
+   module.exports = UUID;
+ }
+ 
+ return UUID;
+ 
+ })(UUID);
+ 
+ // vim: fdm=marker fmr&

+ 725 - 0
microserviceUserH5/static/js/vender/verify.js

@@ -0,0 +1,725 @@
+/*! Verify&admin MIT License by anji-plus*/
+/*! J2eeFAST 优化兼容IE浏览器*/
+
+;(function($, window, document,undefined) {
+
+	  // 初始话 uuid 
+		uuid()
+		function uuid() {
+			var s = [];
+			var hexDigits = "0123456789abcdef";
+			for (var i = 0; i < 36; i++) {
+					s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
+			}
+			s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
+			s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
+			s[8] = s[13] = s[18] = s[23] = "-";
+	
+			var slider = 'slider'+ '-'+s.join("");
+			var point = 'point'+ '-'+s.join("");
+			// 判断下是否存在 slider
+			if(!localStorage.getItem('slider')) {
+				localStorage.setItem('slider', slider)
+			}
+			if(!localStorage.getItem('point')) {
+				localStorage.setItem("point",point);
+			}
+		}
+
+	var startX,startY;
+ 
+		document.addEventListener("touchstart",function(e){
+		
+				startX = e.targetTouches[0].pageX;
+				startY = e.targetTouches[0].pageY;
+		});
+		
+		document.addEventListener("touchmove",function(e){
+		
+				var moveX = e.targetTouches[0].pageX;
+				var moveY = e.targetTouches[0].pageY;
+				
+				if(Math.abs(moveX-startX)>Math.abs(moveY-startY)){
+						e.preventDefault();
+				}
+		},{passive:false});
+		
+    //请求图片get事件
+    function getPictrue(data,baseUrl,resolve,reject){
+		$.ajax({
+			type : "post",
+			contentType: "application/json;charset=UTF-8",
+			url : baseUrl + "/captcha/get",
+			data :JSON.stringify(data),
+			cache: false,
+      crossDomain: true == !(document.all),
+			success:function(res){
+				resolve(res)
+			},
+			fail: function(err) {
+				reject(err)
+			}
+		})
+	}
+	//验证图片check事件
+	function checkPictrue(data,baseUrl,resolve,reject){
+		$.ajax({
+			type : "post",
+			contentType: "application/json;charset=UTF-8",
+			url : baseUrl + "/captcha/check",
+			data :JSON.stringify(data),
+			cache: false,
+      crossDomain: true == !(document.all),
+			success:function(res){
+				resolve(res)
+			},
+			fail: function(err) {
+				reject(err)
+			}
+		})
+	}
+   
+    //定义Slide的构造函数
+    var Slide = function(ele, opt) {
+		this.$element = ele,
+		this.backToken = null,
+		this.moveLeftDistance = 0,
+		this.secretKey = '',
+        this.defaults = {
+			baseUrl:"https://captcha.anji-plus.com/captcha-api",
+			containerId:'',
+        	captchaType:"blockPuzzle",
+        	mode : 'fixed',	//弹出式pop,固定fixed
+        	vOffset: 5,
+            vSpace : 5,
+            explain : '向右滑动完成验证',
+            imgSize : {
+	        	width: '310px',
+	        	height: '155px',
+			},
+			blockSize : {
+	        	width: '50px',
+	        	height: '50px',
+	        },
+            circleRadius: '10px',
+	        barSize : {
+	        	width : '310px',
+	        	height : '50px',
+			},
+			beforeCheck:function(){ return true},
+            ready : function(){},
+        	success : function(){},
+            error : function(){}
+            
+        },
+        this.options = $.extend({}, this.defaults, opt)
+    };
+    
+    
+    //定义Slide的方法
+    Slide.prototype = {
+        init: function() {
+			var _this = this;
+        	//加载页面
+        	this.loadDom();
+			_this.refresh();
+        	this.options.ready();
+        	
+        	this.$element[0].onselectstart = document.body.ondrag = function(){ 
+				return false; 
+			};
+        	
+        	if(this.options.mode == 'pop')	{
+
+				_this.$element.find('.verifybox-close').on('click', function() {
+					_this.$element.find(".mask").css("display","none");
+					_this.refresh();
+				});
+				
+				var clickBtn = document.getElementById(this.options.containerId);
+				clickBtn && (clickBtn.onclick = function(){
+					if (_this.options.beforeCheck()) {
+						_this.$element.find(".mask").css("display","block");
+					}
+				})
+        	}
+        	
+					//按下
+        	this.htmlDoms.move_block.on('touchstart', function(e) {
+        		_this.start(e);
+        	});
+        	
+        	this.htmlDoms.move_block.on('mousedown', function(e) {
+        		_this.start(e);
+        	});
+
+            this.htmlDoms.sub_block.on('mousedown', function(e) {
+                e.stopPropagation()
+            });
+
+        	//拖动
+            window.addEventListener("touchmove", function(e) {
+            	_this.move(e);
+            });
+
+            window.addEventListener("mousemove", function(e) {
+            	_this.move(e);
+            });
+            
+            //鼠标松开
+            window.addEventListener("touchend", function() {
+            	_this.end();
+            });
+            window.addEventListener("mouseup", function() {
+            	_this.end();
+            });
+            
+            //刷新
+            _this.$element.find('.verify-refresh').on('click', function() {
+				_this.refresh();
+            });
+        },
+        
+        //初始化加载
+        loadDom : function() {
+			this.status = false;	//鼠标状态
+        	this.isEnd = false;		//是够验证完成
+			this.setSize = this.resetSize(this);	//重新设置宽度高度
+			this.plusWidth = 0;
+			this.plusHeight = 0;
+            this.x = 0;
+            this.y = 0;
+        	var panelHtml = '';
+        	var wrapHtml = '';
+			this.lengthPercent = (parseInt(this.setSize.img_width)-parseInt(this.setSize.block_width)- parseInt(this.setSize.circle_radius) - parseInt(this.setSize.circle_radius) * 0.8)/(parseInt(this.setSize.img_width)-parseInt(this.setSize.bar_height));
+			if(!/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){
+				this.setSize.img_width = '220px'
+				this.setSize.img_height = '100px'
+				this.setSize.bar_height = '38px'
+			}
+			wrapStartHtml = '<div class="mask">'+
+								'<div class="verifybox" style="width:'+(parseInt(this.setSize.img_width)+30)+'px">'+
+									'<div class="verifybox-top">'+
+										'请完成安全验证'+
+										'<span class="verifybox-close">'+
+											'<i class="iconfont icon-close"></i>'+
+										'</span>'+
+									'</div>'+
+									'<div class="verifybox-bottom" style="padding:15px">'+
+										'<div style="position: relative;">';
+
+			if (this.options.mode == 'pop') {
+				panelHtml = wrapStartHtml
+			}
+			panelHtml += '<div class="verify-img-out">'+
+							'<div class="verify-img-panel">'+
+								'<div class="verify-refresh" style="z-index:3">'+
+									'<i class="iconfont icon-refresh"></i>'+
+								'</div>'+
+								'<span class="verify-tips"  class="suc-bg"></span>'+
+								'<img src="" class="backImg" style="width:100%;height:100%;display:block">'+
+							'</div>'+
+						'</div>';
+
+			this.plusWidth = parseInt(this.setSize.block_width) + parseInt(this.setSize.circle_radius) * 2 - parseInt(this.setSize.circle_radius) * 0.2;
+			this.plusHeight = parseInt(this.setSize.block_height) + parseInt(this.setSize.circle_radius) * 2 - parseInt(this.setSize.circle_radius) * 0.2;
+			
+			panelHtml +='<div class="verify-bar-area" style="width:'+this.setSize.img_width+',height:'+this.setSize.bar_height+',line-height:'+this.setSize.bar_height+'">'+
+									'<span  class="verify-msg">'+this.options.explain+'</span>'+
+									'<div class="verify-left-bar">'+
+										'<span class="verify-msg"></span>'+
+										'<div  class="verify-move-block">'+
+											'<i  class="verify-icon iconfont icon-right"></i>'+
+											'<div class="verify-sub-block">'+
+												'<img src="" class="bock-backImg" alt=""  style="width:100%;height:100%;display:block">'+
+											'</div>'+
+										'</div>'+
+									'</div>'+
+								'</div>';
+			wrapEndHtml = '</div></div></div></div>';
+			if (this.options.mode == 'pop') {
+				panelHtml += wrapEndHtml
+			}
+
+        	this.$element.append(panelHtml);
+        	this.htmlDoms = {
+        		tips: this.$element.find('.verify-tips'),
+        		sub_block : this.$element.find('.verify-sub-block'),
+        		out_panel : this.$element.find('.verify-img-out'),
+        		img_panel : this.$element.find('.verify-img-panel'),
+				img_canvas : this.$element.find('.verify-img-canvas'),
+        		bar_area : this.$element.find('.verify-bar-area'),
+        		move_block : this.$element.find('.verify-move-block'),
+        		left_bar : this.$element.find('.verify-left-bar'),
+        		msg : this.$element.find('.verify-msg'),
+        		icon : this.$element.find('.verify-icon'),
+        		refresh :this.$element.find('.verify-refresh')
+        	};
+        	
+        	this.$element.css('position', 'relative');
+
+			this.htmlDoms.sub_block.css({'height':this.setSize.img_height,'width':Math.floor(parseInt(this.setSize.img_width)*47/310)+ 'px',
+									'top':-(parseInt(this.setSize.img_height) + this.options.vSpace) + 'px'})
+			this.htmlDoms.out_panel.css('height', parseInt(this.setSize.img_height) + this.options.vSpace + 'px');
+			this.htmlDoms.img_panel.css({'width': this.setSize.img_width, 'height': this.setSize.img_height});
+			this.htmlDoms.bar_area.css({'width': this.setSize.img_width, 'height': this.setSize.bar_height, 'line-height':this.setSize.bar_height});
+        	this.htmlDoms.move_block.css({'width': this.setSize.bar_height, 'height': this.setSize.bar_height});
+        	this.htmlDoms.left_bar.css({'width': this.setSize.bar_height, 'height': this.setSize.bar_height});
+        },
+        
+
+        //鼠标按下
+        start: function(e) {
+					if(!e.originalEvent.targetTouches) {    //兼容移动端
+						var x = e.clientX;
+					}else {     //兼容PC端
+							var x = e.originalEvent.targetTouches[0].pageX;
+					}
+					// if(!e.touches) {    //兼容移动端
+					// 	var x = e.clientX;
+					// }else {     //兼容PC端
+					// 		var x = e.touches[0].pageX;
+					// }
+			this.startLeft = Math.floor(x - this.htmlDoms.bar_area[0].getBoundingClientRect().left);
+			this.startMoveTime = new Date().getTime();
+        	if(this.isEnd == false) {
+	        	this.htmlDoms.msg.text('');
+	        	this.htmlDoms.move_block.css('background-color', '#337ab7');
+	        	this.htmlDoms.left_bar.css('border-color', '#337AB7');
+	        	this.htmlDoms.icon.css('color', '#fff');
+	        	e.stopPropagation();
+	        	this.status = true;
+        	}
+        },
+        
+        //鼠标移动
+        move: function(e) {
+        	if(this.status && this.isEnd == false) {
+	            if(!e.touches) {    //兼容移动端
+	                var x = e.clientX;
+	            }else {     //兼容PC端
+	                var x = e.touches[0].pageX;
+	            }
+				var bar_area_left = this.htmlDoms.bar_area[0].getBoundingClientRect().left;
+				var move_block_left = x - bar_area_left; //小方块相对于父元素的left值
+				if(move_block_left >= (this.htmlDoms.bar_area[0].offsetWidth - parseInt(this.setSize.bar_height) + parseInt(parseInt(this.setSize.block_width)/2) - 2) ) {
+					move_block_left = (this.htmlDoms.bar_area[0].offsetWidth - parseInt(this.setSize.bar_height) + parseInt(parseInt(this.setSize.block_width)/2)- 2);
+				}
+	            if(move_block_left <= parseInt(parseInt(this.setSize.block_width)/2)) {
+            		move_block_left = parseInt(parseInt(this.setSize.block_width)/2);
+            	}
+				//拖动后小方块的left值
+	            this.htmlDoms.move_block.css('left', move_block_left-this.startLeft + "px");
+	            this.htmlDoms.left_bar.css('width', move_block_left-this.startLeft + "px");
+				this.htmlDoms.sub_block.css('left', "0px");
+				this.moveLeftDistance = move_block_left - this.startLeft
+	        }
+        },
+        
+        //鼠标松开
+        end: function() {
+			this.endMovetime = new Date().getTime();
+        	var _this = this;
+			// $vm = this.options.vm;
+			// $vm.code = '6565';
+			// $vm.copyUrl();
+			// return
+        	//判断是否重合
+        	if(this.status  && this.isEnd == false) {
+				// $vm = this.options.vm;
+				// $vm.code = '6565';
+				// $vm.copyUrl();
+				// return
+				//图片滑动
+				var vOffset = parseInt(this.options.vOffset);
+				this.moveLeftDistance = this.moveLeftDistance * 310/ parseInt(this.setSize.img_width)
+				var data = {
+					captchaType:this.options.captchaType,
+					"pointJson": this.secretKey ? aesEncrypt(JSON.stringify({x:this.moveLeftDistance,y:5.0}),this.secretKey):JSON.stringify({x:this.moveLeftDistance,y:5.0}),
+					"token":this.backToken,
+					clientUid: localStorage.getItem('slider'), 
+					ts: Date.now()
+				}
+				var captchaVerification = this.secretKey ? aesEncrypt(this.backToken+'---'+JSON.stringify({x:this.moveLeftDistance,y:5.0}),this.secretKey):this.backToken+'---'+JSON.stringify({x:this.moveLeftDistance,y:5.0})
+				checkPictrue(data,this.options.baseUrl,function(res){
+					// 请求反正成功的判断
+					if (res.repCode=="0000") {
+						_this.htmlDoms.move_block.css('background-color', '#5cb85c');
+						_this.htmlDoms.left_bar.css({'border-color': '#5cb85c', 'background-color': '#fff'});
+						_this.htmlDoms.icon.css('color', '#fff');
+						_this.htmlDoms.icon.removeClass('icon-right');
+						_this.htmlDoms.icon.addClass('icon-check');
+						//提示框
+						_this.htmlDoms.tips.addClass('suc-bg').removeClass('err-bg')
+						// _this.htmlDoms.tips.css({"display":"block",animation:"move 1s cubic-bezier(0, 0, 0.39, 1.01)"});
+						_this.htmlDoms.tips.animate({"bottom":"0px"});
+						_this.htmlDoms.tips.text(((_this.endMovetime-_this.startMoveTime)/1000).toFixed(2) + 's验证成功');
+						_this.isEnd = true;
+						setTimeout(function(){
+							_this.$element.find(".mask").css("display","none");
+							// _this.htmlDoms.tips.css({"display":"none",animation:"none"});
+							_this.htmlDoms.tips.animate({"bottom":"-35px"});
+							_this.refresh();
+						},1000)
+						_this.options.success({'captchaVerification':captchaVerification});
+					}else{
+						_this.htmlDoms.move_block.css('background-color', '#d9534f');
+						_this.htmlDoms.left_bar.css('border-color', '#d9534f');
+						_this.htmlDoms.icon.css('color', '#fff');
+						_this.htmlDoms.icon.removeClass('icon-right');
+						_this.htmlDoms.icon.addClass('icon-close');
+
+						_this.htmlDoms.tips.addClass('err-bg').removeClass('suc-bg')
+						// _this.htmlDoms.tips.css({"display":"block",animation:"move 1.3s cubic-bezier(0, 0, 0.39, 1.01)"});
+						_this.htmlDoms.tips.animate({"bottom":"0px"});
+						_this.htmlDoms.tips.text(res.repMsg)
+						setTimeout(function () { 
+							_this.refresh();
+							_this.htmlDoms.tips.animate({"bottom":"-35px"});
+						}, 1000);
+
+						// setTimeout(function () {
+						// 	// _this.htmlDoms.tips.css({"display":"none",animation:"none"});
+						// },1300)
+						_this.options.error(this);
+					}
+				})
+	            this.status = false;
+        	}
+		},
+		
+        resetSize : function(obj) {
+        	var img_width,img_height,bar_width,bar_height,block_width,block_height,circle_radius;	//图片的宽度、高度,移动条的宽度、高度
+        	var parentWidth = obj.$element.parent().width() || $(window).width();
+        	var parentHeight = obj.$element.parent().height() || $(window).height();
+        	
+       		if(obj.options.imgSize.width.indexOf('%')!= -1){
+        		img_width = parseInt(obj.options.imgSize.width)/100 * parentWidth + 'px';
+		  }else {
+				img_width = obj.options.imgSize.width;
+			}
+		
+			if(obj.options.imgSize.height.indexOf('%')!= -1){
+        		img_height = parseInt(obj.options.imgSize.height)/100 * parentHeight + 'px';
+		  }else {
+				img_height = obj.options.imgSize.height;
+			}
+		
+			if(obj.options.barSize.width.indexOf('%')!= -1){
+        		bar_width = parseInt(obj.options.barSize.width)/100 * parentWidth + 'px';
+		  }else {
+				bar_width = obj.options.barSize.width;
+			}
+		
+			if(obj.options.barSize.height.indexOf('%')!= -1){
+        		bar_height = parseInt(obj.options.barSize.height)/100 * parentHeight + 'px';
+		  }else {
+				bar_height = obj.options.barSize.height;
+			}
+			
+			if(obj.options.blockSize) {
+				if(obj.options.blockSize.width.indexOf('%')!= -1){
+					block_width = parseInt(obj.options.blockSize.width)/100 * parentWidth + 'px';
+			  }else {
+					block_width = obj.options.blockSize.width;
+				}
+				
+			
+				if(obj.options.blockSize.height.indexOf('%')!= -1){
+					block_height = parseInt(obj.options.blockSize.height)/100 * parentHeight + 'px';
+			  }else {
+					block_height = obj.options.blockSize.height;
+				}
+			}
+
+			if(obj.options.circleRadius) {
+				if(obj.options.circleRadius.indexOf('%')!= -1){
+					circle_radius = parseInt(obj.options.circleRadius)/100 * parentHeight + 'px';
+			  }else {
+					circle_radius = obj.options.circleRadius;
+				}
+			}
+		
+			return {img_width : img_width, img_height : img_height, bar_width : bar_width, bar_height : bar_height, block_width : block_width, block_height : block_height, circle_radius : circle_radius};
+       	},
+
+        //刷新
+        refresh: function() {
+			var _this = this;
+        	this.htmlDoms.refresh.show();
+        	this.$element.find('.verify-msg:eq(1)').text('');
+        	this.$element.find('.verify-msg:eq(1)').css('color', '#000');
+        	this.htmlDoms.move_block.animate({'left':'0px'}, 'fast');
+			this.htmlDoms.left_bar.animate({'width': parseInt(this.setSize.bar_height)}, 'fast');
+			this.htmlDoms.left_bar.css({'border-color': '#ddd'});
+			
+			this.htmlDoms.move_block.css('background-color', '#fff');
+			this.htmlDoms.icon.css('color', '#000');
+			this.htmlDoms.icon.removeClass('icon-close');
+			this.htmlDoms.icon.addClass('icon-right');
+			this.$element.find('.verify-msg:eq(0)').text(this.options.explain);
+			this.isEnd = false;
+			getPictrue({captchaType:"blockPuzzle", clientUid: localStorage.getItem('slider'), ts: Date.now()},this.options.baseUrl,function (res) {
+				if (res.repCode=="0000") {
+					_this.$element.find(".backImg")[0].src = 'data:image/png;base64,'+res.repData.originalImageBase64
+					_this.$element.find(".bock-backImg")[0].src = 'data:image/png;base64,'+res.repData.jigsawImageBase64
+					_this.secretKey = res.repData.secretKey
+					_this.backToken = res.repData.token
+				} else {
+					_this.$element.find(".backImg")[0].src = 'img/default.png'
+					_this.$element.find(".bock-backImg")[0].src = 'img/itemLeft.png'
+					_this.htmlDoms.tips.addClass('err-bg').removeClass('suc-bg')
+					_this.htmlDoms.tips.animate({"bottom":"0px"});
+					_this.htmlDoms.tips.text(res.repMsg)
+					setTimeout(function () { 
+							_this.htmlDoms.tips.animate({"bottom":"-35px"});
+						}, 1000);
+					}
+			});
+			this.htmlDoms.sub_block.css('left', "0px");
+        },
+    };
+
+
+    //定义Points的构造函数
+    var Points = function(ele, opt) {
+		this.$element = ele,
+		this.backToken = null,
+		this.secretKey = '',
+        this.defaults = {
+			baseUrl:"https://captcha.anji-plus.com/captcha-api",
+			captchaType:"clickWord",
+			containerId:'',
+        	mode : 'fixed',	//弹出式pop,固定fixed
+		    checkNum : 3,	//校对的文字数量
+		    vSpace : 5,	//间隔
+        	imgSize : {
+	        	width: '310px',
+	        	height: '155px',
+	        },
+	        barSize : {
+	        	width : '310px',
+	        	height : '50px',
+			},
+			beforeCheck: function(){ return true},
+	        ready : function(){},
+        	success : function(){},
+            error : function(){}
+        },
+        this.options = $.extend({}, this.defaults, opt)
+    };
+    
+    //定义Points的方法
+    Points.prototype = {
+    	init : function() {
+			var _this = this;
+			//加载页面
+        	_this.loadDom();
+        	 
+        	_this.refresh();
+        	_this.options.ready();
+        	
+        	this.$element[0].onselectstart = document.body.ondrag = function(){ 
+				return false; 
+			};
+			
+			if(this.options.mode == 'pop')	{
+				
+				_this.$element.find('.verifybox-close').on('click', function() {
+					_this.$element.find(".mask").css("display","none");
+				});
+				
+				var clickBtn = document.getElementById(this.options.containerId);
+				clickBtn && (clickBtn.onclick = function(){
+					if (_this.options.beforeCheck()) {
+						_this.$element.find(".mask").css("display","block");
+					}
+				})
+				
+        	}
+		 	// 注册点击验证事件
+        	_this.$element.find('.back-img').on('click', function(e) {
+        		
+				_this.checkPosArr.push(_this.getMousePos(this, e));
+				
+				if(_this.num == _this.options.checkNum) {
+					_this.num = _this.createPoint(_this.getMousePos(this, e));
+					 //按比例转换坐标值
+					 _this.checkPosArr = _this.pointTransfrom(_this.checkPosArr,_this.setSize);
+					setTimeout(function(){
+						var data = {
+							captchaType:_this.options.captchaType,
+							"pointJson":_this.secretKey ? aesEncrypt(JSON.stringify(_this.checkPosArr),_this.secretKey):JSON.stringify(_this.checkPosArr),
+							"token":_this.backToken,
+							clientUid: localStorage.getItem('point'), 
+							ts: Date.now()
+						}
+						var captchaVerification = _this.secretKey ? aesEncrypt(_this.backToken+'---'+JSON.stringify(_this.checkPosArr),_this.secretKey):_this.backToken+'---'+JSON.stringify(_this.checkPosArr)
+						checkPictrue(data, _this.options.baseUrl,function(res){
+							if (res.repCode=="0000") {
+								_this.$element.find('.verify-bar-area').css({'color': '#4cae4c', 'border-color': '#5cb85c'});
+								_this.$element.find('.verify-msg').text('验证成功');
+								// _this.$element.find('.verify-refresh').hide();
+								_this.$element.find('.verify-img-panel').unbind('click');
+								setTimeout(function(){
+									_this.$element.find(".mask").css("display","none");
+									_this.refresh();
+								},1000)
+								_this.options.success({'captchaVerification':captchaVerification});
+							}else{
+								_this.options.error(_this);
+								_this.$element.find('.verify-bar-area').css({'color': '#d9534f', 'border-color': '#d9534f'});
+								_this.$element.find('.verify-msg').text('验证失败');
+								setTimeout(function () { 
+									_this.$element.find('.verify-bar-area').css({'color': '#000','border-color': '#ddd'});
+									_this.refresh();
+								}, 400);
+							}
+						})
+					}, 400);
+					
+				}
+				if(_this.num < _this.options.checkNum) {
+					_this.num = _this.createPoint(_this.getMousePos(this, e));
+				}
+        	});
+        	
+        	 //刷新
+            _this.$element.find('.verify-refresh').on('click', function() {
+            	_this.refresh();
+            });
+        	
+    	},
+    	
+    	//加载页面
+    	loadDom : function() {
+    		
+    		this.fontPos = [];	//选中的坐标信息
+    		this.checkPosArr = [];	//用户点击的坐标
+    		this.num = 1;	//点击的记数
+    		
+			var panelHtml = '';
+			var wrapStartHtml = '';
+        	
+			this.setSize = Slide.prototype.resetSize(this);	//重新设置宽度高度
+			
+			wrapStartHtml = '<div class="mask">'+
+								'<div class="verifybox" style="width:'+(parseInt(this.setSize.img_width)+30)+'px">'+
+									'<div class="verifybox-top">'+
+										'请完成安全验证'+
+										'<span class="verifybox-close">'+
+											'<i class="iconfont icon-close"></i>'+
+										'</span>'+
+									'</div>'+
+									'<div class="verifybox-bottom" style="padding:15px">'+
+										'<div style="position: relative;">';
+
+			if (this.options.mode == 'pop') {
+				panelHtml = wrapStartHtml
+			}
+        	
+			panelHtml += '<div class="verify-img-out">'+
+							'<div class="verify-img-panel">'+
+								'<div class="verify-refresh" style="z-index:3">'+
+									'<i class="iconfont icon-refresh"></i>'+
+								'</div>'+
+								'<img src="" class="back-img" width="'+this.setSize.img_width+'" height="'+this.setSize.img_height+'">'+
+							'</div>'+
+						'</div>'+
+						'<div class="verify-bar-area" style="width:'+this.setSize.img_width+',height:'+this.setSize.bar_height+',line-height:'+this.setSize.bar_height+'">'+
+							'<span  class="verify-msg"></span>'+
+						'</div>';
+			
+			wrapEndHtml = '</div></div></div></div>';
+
+			if (this.options.mode == 'pop') {
+				panelHtml += wrapEndHtml
+			}
+        	
+        	this.$element.append(panelHtml);
+        	
+        	this.htmlDoms = {
+				back_img : this.$element.find('.back-img'),
+        		out_panel : this.$element.find('.verify-img-out'),
+        		img_panel : this.$element.find('.verify-img-panel'),
+        		bar_area : this.$element.find('.verify-bar-area'),
+        		msg : this.$element.find('.verify-msg'),
+        	};
+        	
+        	this.$element.css('position', 'relative');
+
+        	this.htmlDoms.out_panel.css('height', parseInt(this.setSize.img_height) + this.options.vSpace + 'px');
+    		this.htmlDoms.img_panel.css({'width': this.setSize.img_width, 'height': this.setSize.img_height, 'background-size' : this.setSize.img_width + ' '+ this.setSize.img_height, 'margin-bottom': this.options.vSpace + 'px'});
+    		this.htmlDoms.bar_area.css({'width': this.setSize.img_width, 'height': this.setSize.bar_height, 'line-height':this.setSize.bar_height});
+    		
+    	},
+    	
+    	//获取坐标
+    	getMousePos :function(obj, event) {
+            var e = event || window.event;
+            var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
+            var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
+            var x = e.clientX - ($(obj).offset().left - $(window).scrollLeft());
+    		var y = e.clientY - ($(obj).offset().top - $(window).scrollTop());
+    		
+            return {'x': x, 'y': y};
+     	},
+     	
+       	//创建坐标点
+       	createPoint : function (pos) {
+			   this.htmlDoms.img_panel.append('<div class="point-area" style="background-color:#1abd6c;color:#fff;z-index:9999;width:20px;height:20px;text-align:center;line-height:20px;border-radius: 50%;position:absolute;'
+			   										+'top:'+parseInt(pos.y-10)+'px;left:'+parseInt(pos.x-10)+'px;">'+this.num+'</div>');
+       		return ++this.num;
+       	},
+ 
+       	//刷新
+        refresh: function() {
+        	var _this = this;
+        	this.$element.find('.point-area').remove();
+        	this.fontPos = [];
+        	this.checkPosArr = [];
+        	this.num = 1;
+			getPictrue({captchaType:"clickWord", clientUid: localStorage.getItem('point'), ts: Date.now()},_this.options.baseUrl,function(res){
+				if (res.repCode=="0000") {
+					_this.htmlDoms.back_img[0].src ='data:image/png;base64,'+ res.repData.originalImageBase64;
+					_this.backToken = res.repData.token;
+					_this.secretKey = res.repData.secretKey;
+					var text = '请依次点击【' + res.repData.wordList.join(",") + '】';
+					_this.$element.find('.verify-msg').text(text);
+				} else {
+					_this.htmlDoms.back_img[0].src = 'img/default.png';
+					_this.$element.find('.verify-msg').text(res.repMsg);
+				}
+			})
+        
+		},
+		pointTransfrom:function(pointArr,imgSize){
+			var newPointArr = pointArr.map(function(p){
+				var x = Math.round(310 * p.x/parseInt(imgSize.img_width))
+				var y =Math.round(155 * p.y/parseInt(imgSize.img_height))
+				return {'x':x,'y':y}
+			})
+			return newPointArr
+		}
+    };
+    //在插件中使用slideVerify对象  初始化与是否弹出无关 ,不应该耦合
+    $.fn.slideVerify = function(options, callbacks) {
+		var slide = new Slide(this, options);
+		if (slide.options.mode=="pop") {
+			slide.init();
+		}else if (slide.options.mode=="fixed") {
+			slide.init();
+		}
+    };
+    
+    //在插件中使用clickVerify对象
+    $.fn.pointsVerify = function(options, callbacks) {
+        var points = new Points(this, options);
+		if (points.options.mode=="pop") {
+			points.init();
+		}else if (points.options.mode=="fixed") {
+			points.init();
+		}
+    };
+   
+})(jQuery, window, document);

+ 559 - 0
microserviceUserH5/vcloud/actFission.html

@@ -0,0 +1,559 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+<head>
+	<meta charset="UTF-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
+	<meta name="description" content="活动">
+	<title>免费领机</title>
+	<link rel="icon" href="../static/img/favicon2.ico" type="img/x-ico">
+	<link rel="stylesheet" href="../static/css/index.css?v=1.0.0.6">
+	<link rel="stylesheet" href="../static/css/vant.css" />
+	<script src="../static/js/vender/vue/vue.min.js"></script>
+	<script src="../static/js/vender/vue/vant.min.js"></script>
+	<script src="../static/js/vender/config.js"></script>
+
+	<style>
+		.container {
+			background: #0671F1;
+		}
+
+		.top-banner {
+			background: url("../static/offImg/bg.png") no-repeat;
+			width: 100%;
+			height: 11.6rem;
+			background-size: 100% 100%;
+			position: relative;
+
+		}
+
+		.top-banner .hongbao {
+			width: 1.46rem;
+			height: 1.42rem;
+			position: absolute;
+			bottom: 1.4rem;
+			left: 0.7rem;
+		}
+
+		.bottom-btn {
+			position: absolute;
+			width: 100%;
+			bottom: 0.32rem;
+			display: flex;
+			justify-content: center;
+			left: 0;
+		}
+
+		.bottom-btn .time-box {
+			width: 5.34rem;
+			height: 1.44rem;
+			background: url("../static/offImg/time.png") no-repeat;
+			background-size: 100% 100%;
+		}
+
+		.no-start {
+			width: 5.34rem !important;
+			height: 1.44rem !important;
+			background: url("../static/offImg/time-end.png") no-repeat !important;
+			background-size: 100% 100% !important;
+		}
+
+		.list {
+			width: 100%;
+			height: 14.42rem;
+			background: #0671F1;
+			padding: 0 0.3rem;
+
+		}
+
+		.nav-box,
+		.rule-box {
+			margin-top: 0.44rem;
+			width: 100%;
+			height: 5.7rem;
+			background: #C3E5FF;
+			border-radius: 0.2rem;
+			border: 0.02rem solid #F5FAFF;
+			position: relative;
+
+		}
+
+		.rule-box .title-box,
+		.nav-box .title-box {
+			width: 100%;
+			position: absolute;
+			left: 0;
+			top: -0.17rem;
+			display: flex;
+			justify-content: center;
+		}
+
+		.rule-box .title-box .img-box,
+		.nav-box .title-box .img-box {
+			background: url("../static/offImg/title-bg.png") no-repeat;
+			background-size: 100% 100%;
+			width: 3.96rem;
+			height: 0.64rem;
+			text-align: center;
+			line-height: 0.64rem;
+			font-size: 0.32rem;
+			font-family: PingFangSC-Medium, PingFang SC;
+			color: #FFFFFF;
+
+		}
+
+		.outer-box {
+			margin-top: 0.48rem;
+			padding: 0.3rem 0.4rem;
+			overflow-y: scroll;
+			height: 5.1rem;
+		}
+
+		.list-nav {
+			display: flex;
+			margin-bottom: 0.2rem;
+			justify-content: space-between;
+		}
+
+		.list-nav .user {
+			display: flex;
+		}
+
+		.list-nav .user .tou {
+			width: 0.6rem;
+			height: 0.6rem;
+			border-radius: 50%;
+			margin-right: 0.12rem;
+		}
+
+		.list-nav .user .text p:first-of-type {
+			font-size: 0.24rem;
+			margin-bottom: 0.08rem;
+			font-family: PingFangSC-Regular, PingFang SC;
+			color: #272624;
+			width: 2.6rem;
+			display: block;
+			overflow: hidden;
+			word-break: keep-all;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+
+		}
+
+		.list-nav .user .text p+p {
+			font-size: 0.24rem;
+			font-family: PingFangSC-Regular, PingFang SC;
+			color: #999999;
+		}
+
+		.right-nav {
+			display: flex;
+			align-items: center;
+		}
+
+		.right-nav P:first-of-type {
+			font-size: 0.24rem;
+			font-family: PingFangSC-Medium, PingFang SC;
+			font-weight: 500;
+			color: #FF8E00;
+			margin-right: 0.3rem;
+		}
+
+		.right-nav .btn {
+			width: 1.14rem;
+			height: 0.52rem;
+			line-height: 0.52rem;
+			background: #3B7FFF;
+			border-radius: 0.08rem;
+			text-align: center;
+			font-size: 0.24rem;
+			font-family: PingFangSC-Regular, PingFang SC;
+			color: #FFFFFF;
+		}
+
+		.rule-box {
+			margin-top: 0.62rem;
+			width: 100%;
+			height: 7.6rem;
+			padding: 0.3rem 0.4rem;
+		}
+
+		.rule-box .rule {
+			margin-top: 0.48rem;
+			font-size: 0.28rem;
+			font-family: PingFangSC-Regular, PingFang SC;
+			color: #333333;
+			line-height: 0.46rem;
+			letter-spacing: 0.013rem;
+		}
+
+		.rule-box .rule p {
+			margin-bottom: 0.12rem;
+		}
+
+		.isdisabled {
+			background: #E3E7EE !important;
+			color: #AAADB3 !important;
+		}
+
+		.notice-swipe {
+			height: 40px;
+			line-height: 40px;
+		}
+
+		.top-notice {
+			width: 100%;
+			padding: 2rem 0.3rem 0 0.3rem;
+			height: 0.82rem;
+		}
+
+		.van-notice-bar {
+			width: 100%;
+			height: 0.82rem;
+			background: url("../static/offImg/lunbo.png") no-repeat;
+			background-size: 100% 100%;
+		}
+
+		.van-swipe-item {
+			display: flex;
+			align-items: center;
+		}
+
+		.van-swipe-item p:first-of-type {
+			font-size: 0.28rem;
+			width: 1.8rem;
+			color: #00FFFF;
+			display: block;
+			overflow: hidden;
+			word-break: keep-all;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+		}
+
+		.van-swipe-item p+p {
+			font-size: 0.28rem;
+			color: #FFFFFF;
+		}
+
+		.van-swipe-item img {
+			width: 0.6rem;
+			margin-left: 0.4rem;
+			margin-right: 0.1rem;
+			border-radius: 50%;
+			height: 0.6rem;
+		}
+
+		.no-user {
+			width: 100%;
+			height: 100%;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			font-size: 0.3rem;
+			font-family: PingFangSC-Regular, PingFang SC;
+			color: #666666;
+		}
+	</style>
+</head>
+
+<body>
+	<div id="app" v-cloak class="app container">
+		<div class="top-banner">
+			<img src="../static//offImg/hongbao.png" class="hongbao" alt="">
+			<div class="top-notice">
+				<van-notice-bar :scrollable="false">
+					<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=""> -->
+							<img src="" :onerror="defaultImg" alt="">
+							<p>{{item.sharerSurfaceName}}</p>
+							<p>已领取分享奖励</p>
+						</van-swipe-item>
+
+					</van-swipe>
+				</van-notice-bar>
+			</div>
+			<div class="bottom-btn">
+				<div class="time-box" @click='goReward()' :class="{'no-start':actStatus==0}"></div>
+
+			</div>
+		</div>
+		<div class="list">
+			<div class="nav-box">
+				<!-- <img src="../static/offImg/title-bg.png" alt=""></img> -->
+				<div class="title-box">
+					<div class="img-box">活动奖励</div>
+				</div>
+				<div class="outer-box" v-if='rewardList&&rewardList.length>0'>
+					<van-list v-model="loading" :finished-text="finishedText" :finished="finished"
+						:immediate-check=false @load="onLoad">
+						<div class="list-nav" v-for="(item,index) in rewardList" :key="index">
+							<div class="user">
+								<img :src="standarImg(item.headImgUrl)" class="tou" :onerror="defaultImg" alt="">
+								<div class="text">
+									<p>{{item.surfaceName}}</p>
+									<p>{{item.registerTime}}</p>
+								</div>
+							</div>
+							<div class="right-nav">
+								<p>{{item.phoneType === 'VIP'?'星动':item.phoneType === 'SVIP'?'星曜':'唔即'}}天卡</p>
+								<p class="btn" @click='goGetReward(item.id, item.phoneType)' v-if='item.receiveStatus==0'>领取</p>
+								<p class="btn isdisabled" v-if='item.receiveStatus==1'>已领取</p>
+
+							</div>
+						</div>
+					</van-list>
+
+				</div>
+				<div class="no-user" v-if='rewardList.length==0'>
+					<p>
+						暂无用户注册
+					</p>
+				</div>
+			</div>
+
+			<div class="rule-box">
+				<!-- <img src="../static/offImg/title-bg.png" alt=""></img> -->
+				<div class="title-box">
+					<div class="img-box">活动规则</div>
+				</div>
+				<div class="rule">
+					<p>1.分享双子星攻略文章至微信好友/微信朋友圈/QQ,好友注册成功后,分享者即可获得3天{{phoneType === 'VIP'?'星动':phoneType === 'SVIP'?'星曜':'唔即'}}套餐时长,被分享者可获得{{phoneType === 'VIP'?'星动':phoneType === 'SVIP'?'星曜':'唔即'}}7天卡激活码。</p>
+					<p>2.用户通过该分享链接获取的激活码,只针对新注册用户有效领取并兑换一次。</p>
+					<p>3.分享者每日最多分享给10位好友领取激活码并获得注册奖励,且奖励为当日有效,奖励过期不补发。</p>
+					<p>4.分享者若没有云机,需要先创建{{phoneType === 'VIP'?'星动':phoneType === 'SVIP'?'星曜':'唔即'}}云机才可继续领取奖励。</p>
+					<p>5.新用户领取的激活码需在有效期内使用,若超过有效期则激活码失效。</p>
+				</div>
+			</div>
+
+		</div>
+	</div>
+	<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
+	<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 type="text/javascript">
+		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终端
+		new Vue({
+			el: '#app',
+			data: {
+				isshow: false,
+				token: GetRequest().token ? GetRequest().token :
+					'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyYW5kb20iOiI3MDY1NSIsImNsaWVudCI6IjUiLCJleHAiOjE2NDExOTA0MzMsInVzZXJuYW1lX2FwcGxldCI6Im5naEN0MTYzMTYwNDY4OSJ9.cXj7Ks5XYCnGFANZ0uHAkDn8MJtWrMm4I3qqvikewGg',
+				rewardList: [],
+				queryParams: {
+					pageNum: 1,
+					pageSize: 10
+				},
+				isDisable: false,
+				finished: false,
+				flag: true,
+				loading: false,
+				finishedText: '',
+				offset: 100,
+				total: 0,
+				shareInfo: {},
+				defaultImg: 'this.src="' + "../static/offImg/tou.png" + '"',
+				actStatus: 0, //0活动状态 1开始
+				phoneType: '',
+				marqueeList: [],
+				timer: null,
+			},
+			created() {
+				this.getAwardPage(); //获取奖励列表
+			},
+			mounted() {
+				this.getActDetailList(); //获取活动上下架
+				this.getMarquee(); //跑马灯
+				this.goReward('look');
+			},
+			methods: {
+				goReward(type) {
+
+					this.$toast.loading({
+						duration: 0,
+						message: '加载中...',
+						forbidClick: true,
+						loadingType: 'spinner',
+					});
+					getActDetailList(this.token).then(res => {
+						this.$toast.clear();
+						if (res.status === 0) {
+							if(type === 'look'){
+							    this.phoneType = res.data.phoneType;
+								return
+							}
+							this.actStatus = res.data.actStatus;
+							this.shareInfo = res.data;
+							if (this.actStatus != 1) {
+								this.$toast('活动已下架');
+								return
+							}
+							// this.stopManyClick(() => {
+							this.getShare();
+							// })
+
+						} else {
+							this.$toast(res.msg);
+						}
+					})
+
+
+
+
+				},
+				standarImg(id) {
+					return `${fileCenterApi}/file-center/fileOperate/getImage?id=${id}`;
+				},
+				getShare() {
+
+					systemBuriedPoint({
+						pointName: 'dt_裂变_h5_分享攻略'
+					}).then(res => {
+
+					})
+					const {
+						title,
+						content,
+						gotoUrl,
+						shareImg
+					} = this.shareInfo;
+					console.log({
+						title: title,
+						content: content,
+						gotoUrl: gotoUrl,
+						shareImg: shareImg
+					});
+					if (isAndroid) {
+						window.native.share(title, content, gotoUrl, shareImg)
+					} else if (isIOS) {
+						window.webkit.messageHandlers.share.postMessage({
+							title: title,
+							content: content,
+							gotoUrl: gotoUrl,
+							shareImg: shareImg
+						});
+					}
+				},
+				getActDetailList() { //获取活动状态
+					this.$toast.loading({
+						duration: 0,
+						message: '加载中...',
+						forbidClick: true,
+						loadingType: 'spinner',
+					});
+					getActDetailList(this.token).then(res => {
+						this.$toast.clear();
+						if (res.status === 0) {
+							this.actStatus = res.data.actStatus;
+							this.shareInfo = res.data;
+						} else {
+							this.$toast(res.msg);
+						}
+					})
+				},
+				getAwardPage() { //获取活动列表
+					getAwardPage(this.token, this.queryParams).then(res => {
+						if (res.status == 0) {
+							this.loading = false //取消正在加载状态
+							let infolist = res.data.list;
+							this.total = res.data.total;
+							if (infolist) {
+								this.rewardList = this.rewardList.concat(infolist);
+								console.log(this.rewardList)
+								if (this.rewardList.length >= this.queryParams.pageSize) {
+									this.finishedText = '没有更多了'
+								}
+								if (this.rewardList.length >= this.total) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
+									this.finished = true;
+								}
+							} else {
+								this.finished = true;
+							}
+						} else {
+							this.$toast(res.msg);
+							this.loading = false
+							if (this.queryParams.pageNum > 1) {
+								this.queryParams.pageNum -= 1
+							}
+						}
+					}).catch((error) => {
+						console.log(error)
+						this.$toast('网络异常');
+					});
+
+				},
+				//滚动加载时触发,list组件定义的方法
+				onLoad() {
+					let times = setTimeout(() => {
+						this.queryParams.pageNum += 1 //每请求一次,页面数+1
+						this.getAwardPage();
+						clearTimeout(times)
+					}, 500)
+				},
+				getMarquee() {
+					getMarquee().then(res => {
+						if (res.status === 0) {
+							this.marqueeList = res.data;
+							
+						} else {
+							this.$toast(res.msg);
+						}
+					})
+				},
+				goGetReward(id, phoneType) {
+					this.stopManyClick(() => {
+						getCheck(this.token).then(res => {
+							if (res.status === 0) {
+								if (isAndroid) {
+									window.native.activatePhones(1, id, phoneType)
+								} else if (isIOS) {
+									window.webkit.messageHandlers.receive.postMessage({
+										"awardId": id,
+										"phoneType": phoneType
+									});
+								}
+							} else if (res.status == 1) {
+								this.$toast(res.msg);
+								return;
+
+							} else {
+								this.$toast(res.msg);
+								return
+
+							}
+						}).catch((error) => {
+							console.log(error)
+							this.$toast('网络异常');
+						});
+					})
+
+				},
+				stopManyClick(fn) { //防抖
+					if (this.flag) {
+						fn();
+					}
+					this.flag = false;
+					if (this.timer) {
+						clearTimeout(this.timer);
+					}
+					this.timer = setTimeout(() => {
+						this.flag = true
+					}, 1500);
+				},
+				download() {
+
+				},
+
+
+
+			}
+		})
+	</script>
+</body>
+
+</html>

+ 853 - 0
microserviceUserH5/vcloud/actFissionShare.html

@@ -0,0 +1,853 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <meta name="description" content="双子星邀请你免费领取云手机">
+    <link rel="icon" href="../static/img/favicon2.ico" type="img/x-ico">
+    <link rel="stylesheet" href="../static/css/index.css">
+    <link rel="stylesheet" href="../static/css/vant.css" />
+    <script src="../static/js/vender/jquery-3.4.1.min.js"></script>
+    <link rel="stylesheet" href="../static/css/verify.css">
+	<link rel="stylesheet" href="../static/js/vender/toastr/toastr.min.css">
+	<script>
+		(function () {
+			if (!window.Promise) {
+				document.writeln('<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-promise/4.1.1/es6-promise.min.js"><' + '/' + 'script>');
+			}
+		})();
+	</script>
+	<script src="../static/js/vender/toastr/toastr.min.js"></script>
+	<script src="../static/js/vender/config.js"></script>
+	<script src="../static/js/vender/crypto-js.js"></script>
+	<script src="../static/js/vender/ase.js"></script>
+    <!-- <script src="../static/js/vender/vue/vue.min.js"></script>
+    <script src="../static/js/vender/vue/vant.min.js"></script>
+    <script src="../static/js/vender/config.js"></script>
+    <script src="../static/js/vender/uuid.js"></script>
+    <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> -->
+    <title>分享攻略</title>
+    <style>
+        [v-cloak] {
+            display: none !important;
+        }
+
+        .container {
+            display: flex;
+            height: 100vh;
+            padding-top: 0.2rem;
+            /* align-items: center;
+			justify-content: center; */
+        }
+
+        .top-banner {
+            width: 6.9rem;
+            height: 0.82rem;
+            background: url("../static/offImg/share-top.png") no-repeat;
+            background-size: 100% 100%;
+        }
+
+        .footer {
+            position: fixed;
+            bottom: 0.5rem;
+            padding: 0 0.3rem;
+            width: 100%;
+            left: 0;
+            display: flex;
+            justify-content: center;
+        }
+
+        .download-btn {
+            width: 7.2rem;
+            height: 1.3rem;
+            background: url('../static/offImg/btn-down.png') no-repeat scroll top center #3B7FFF;
+            background-size: 100% 100%;
+            box-shadow: 0rem 0.06rem 0.4rem 0rem rgba(59, 127, 255, 0.6);
+            border-radius: 0.2rem;
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            padding: 0 0.4rem;
+
+        }
+
+        .button-download {
+            width: 2.5rem;
+            height: 0.8rem;
+            line-height: 0.8rem;
+            background: linear-gradient(360deg, #FF8300 0%, #FEC000 100%);
+            border-radius: 0.2rem;
+            text-align: center;
+            font-size: 0.3rem;
+            font-family: PingFangSC-Medium, PingFang SC;
+            color: #FFFFFF;
+        }
+
+        .download-btn .left-nav p:first-of-type {
+            font-size: 0.24rem;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: rgba(255, 255, 255, 0.7);
+            margin-bottom: 0.02rem;
+        }
+
+        .download-btn .left-nav p+p {
+            font-size: 0.28rem;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: rgba(255, 255, 255, 0.9);
+        }
+
+        .hideContainer {
+            width: 100%;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            height: calc(100vh - 1.36rem);
+            text-align: center;
+
+        }
+
+        .hideContainer img {
+            width: 2.8rem;
+            height: 2.8rem;
+        }
+
+        .hideContainer p {
+            margin-top: 0.3rem;
+            font-family: PingFangSC-Regular, PingFang SC;
+            color: #999999;
+            font-size: 0.28rem;
+        }
+
+        .top-content {
+            width: 6.9rem;
+            padding-bottom: 0.3rem;
+
+        }
+
+        .top-content .title {
+            font-size: 0.44rem;
+            font-family: PingFangSC-Medium, PingFang SC;
+            color: #000000;
+            letter-spacing: 0.01rem;
+            margin-bottom: 0.2rem;
+        }
+
+        .topic-info {
+            padding-bottom: 1.6rem;
+        }
+
+        .topic-info img {
+            max-width: 100%;
+            width: auto;
+            height: auto;
+            border-radius: 0.2rem;
+            margin-bottom: 0.2rem;
+            margin-top: 0.2rem;
+        }
+
+        .topic-info {
+            font-size: 0.3rem;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #333333;
+            letter-spacing: 0.02rem;
+
+        }
+
+        .topic-info p {
+            font-size: 0.36rem;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #333333;
+            letter-spacing: 0.02rem;
+
+        }
+
+        .van-notice-bar {
+            height: 100%;
+            background: none;
+            width: 100%;
+        }
+
+        .notice-swipe {
+            height: 0.8rem;
+            line-height: 0.8rem;
+        }
+
+        .van-swipe-item {
+            display: flex;
+            align-items: center;
+        }
+
+        .van-swipe-item img {
+            width: 0.6rem;
+            margin-left: 0.3rem;
+            border-radius: 50%;
+            margin-right: 0.1rem;
+            height: 0.6rem;
+        }
+
+        .van-swipe-item p {
+            font-size: 0.28rem;
+            font-family: PingFangSC-Regular, PingFang SC;
+            color: #FFFFFF;
+        }
+
+        .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;
+        }
+
+        .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;
+
+        }
+
+        .van-dialog__footer {
+            display: none;
+        }
+
+        .top-banner {
+            margin: 0 auto;
+            margin-bottom: 0.1rem;
+        }
+
+        .hide {
+            display: none !important;
+        }
+
+        .van-overlay {
+            background-color: rgba(0, 0, 0, 0.5);
+        }
+
+        .van-dialog__content {
+            /* padding: 0.3rem 0.6rem; */
+            min-height: unset !important;
+        }
+
+        .van-dialog {
+            border-radius: 0.2rem;
+            width: unset !important;
+        }
+
+        .van-dialog__message {
+            padding: 0.3rem 0.6rem;
+            font-size: 0.3rem;
+            white-space: nowrap;
+            font-family: PingFangSC-Regular, PingFang SC;
+        }
+
+        .van-dialog__content {
+            border-radius: 0.2rem;
+        }
+        .mask {
+            width: 7.5rem;
+            height: 100vh;
+            position: absolute;
+            top: 0;
+            left: 0;
+            background: rgba(0, 0, 0, 0.24);
+            display: none;
+        }
+
+        .dialog {
+            width: 6.22rem;
+            height: 8.56rem;
+            background: #FFFFFF;
+            border-radius: 0.2rem;
+            position: absolute;
+            left:50%;
+            transform: translateX(-50%);
+            padding: 0 0.4rem;
+            top: -6.96rem;
+            /* overflow: hidden; */
+        }
+
+        .imgs-block{
+            width: 100%;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            position: relative;
+            margin-top: 0.5rem;
+        }
+
+        .copy-tip{
+            display: flex;
+            justify-content: center;
+            font-size: 0.28rem;
+            margin-top: 0.32rem;
+            color: #333333;
+        }
+        
+        .my{
+            color: #000000;
+            font-weight: 600;
+        }
+
+        .point1{
+            font-size: 0.26rem;
+            margin-top: 0.16rem;
+            color: #666666;
+        }
+
+        .point-img{
+            width: 5.42rem;
+            height: 1.7rem;
+            margin: auto;
+            margin-top: 0.2rem;
+        }
+
+        .point2{
+            margin-top: 0.32rem;
+        }
+
+        .imgs{
+            width: 0.38rem;
+            height: 0.38rem;
+        }
+
+        .imgs-text{
+            font-size: 0.36rem;
+            color: #3B7FFF;
+        }
+
+        .get-success-block{
+            display: flex;
+            justify-content: center;
+            margin-top: 0.3rem;
+        }
+
+        .get-success{
+            width: 4.6rem;
+            height: 0.9rem;
+            line-height: 0.9rem;
+            text-align: center;
+            color: #FFFFFF;
+            font-size: 0.25rem;
+            background: linear-gradient(180deg, #6DB6FF 0%, #3B7FFF 100%);
+            border-radius: 0.2rem;
+        }
+        .close{
+            width: 0.48rem;
+            height: 0.48rem;
+            position: absolute;
+            bottom: -0.8rem;
+            left: 50%;
+            margin-left: -0.24rem;
+            z-index: 999;
+        }
+        #toast-container>.toast-error {
+            background-image: none!important;
+        }
+
+        .toast-error {
+            background-color: rgba(0, 0, 0, 0.7);
+        }
+
+        .toast-message {
+            font-size: 0.24rem;
+            padding: 0 0.1rem;
+            line-height: 0.9rem;
+            text-align: center;
+            font-weight: 400;
+            color: #FFFFFF;
+        }
+
+        #toast-container>div {
+            width: 4rem;
+            height: 0.9rem;
+            opacity: 1;
+            padding: 0 !important;
+            border-radius: 0.2rem;
+            box-shadow: none;
+        }
+
+        .toast-center-center {
+            position: fixed;
+            top: 50%;
+            left: 50%;
+            z-index: 99;
+            margin-top: -0.45rem;
+            transform: translate(-50%,-50%);
+        }
+
+        .mask{
+            position: fixed;
+            width: 100vw;
+        }
+
+        @media (max-width: 480px) and (min-width: 241px) {
+            #toast-container>div {
+                min-width: 80px !important;
+                width: auto;
+            }
+        }
+    </style>
+</head>
+
+<body>
+    <div id="mpanel2"></div>
+    <div id="form-btn"></div>
+    <div id="app" v-cloak class="container ">
+
+        <div v-if='isshow&&topic!=null' style="margin: 0 auto;">
+            <div class="footer">
+                <div class="download-btn">
+                    <div class="left-nav">
+                        <p>激活码:</p>
+                        <p>AS4*********SD3</p>
+                    </div>
+                    <!-- @click='createCopy()' -->
+                    <div class="button-download " @click='copyHandle()'>点击复制并下载</div>
+                </div>
+            </div>
+            <div class="top-banner">
+                <van-notice-bar :scrollable="false">
+                    <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="">
+                            <div class="hide">双子星邀请你免费领取云手机</div>
+                            <p>{{item.surfaceName}}</p>
+                            <p>已获得星曜云手机套餐</p>
+                        </van-swipe-item>
+
+                    </van-swipe>
+                </van-notice-bar>
+            </div>
+            <div class="top-content">
+                <div v-html="topic" class="topic-info"></div>
+
+            </div>
+
+        </div>
+        <div v-if='!isshow' class="hideContainer">
+            <div>
+                <img src="../static/offImg/no-data.png" alt="" />
+                <p>{{msg}},敬请期待</p>
+            </div>
+        </div>
+    </div>
+    <div class="mask">
+        <div class="dialog">
+            <div class="imgs-block">
+                <img class="imgs" src="../static/img/icon-copy.png" />
+                <div class="imgs-text">复制成功</div>
+                <img class="imgs" src="../static/img/icon-copy.png" />
+            </div>
+            <div class="copy-tip">温馨提示:激活码使用教程</div>
+            <div class="point1">1、在双子星APP的工具栏,点击 <span class="my">[我的]</span></div>
+            <img class="point-img" src="../static/img/point1.png" />
+            <div class="point1 point2">2、找到 我的工具 -  <span class="my">[激活码] </span>,点击激活码
+                即可兑换使用激活码啦。</div>
+            <img class="point-img" src="../static/img/point2.png" />
+            <div class="get-success-block">
+                <div class="get-success">下载APP</div>
+            </div>
+            <img class="close" src="img/close.png" />
+        </div>
+    </div>
+	<script src="../static/js/vender/verify.js"></script>
+    <script src="../static/js/vender/vue/vue.min.js"></script>
+    <script src="../static/js/vender/vue/vue-clipboard.min.js"></script>
+    <script src="../static/js/vender/vue/vant.min.js"></script>
+    <script src="../static/js/vender/config.js"></script>
+    <script src="../static/js/vender/uuid.js"></script>
+    <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>
+		toastr.options.positionClass = 'toast-center-center';
+		toastr.options.timeOut = '1500';
+	</script>
+    <script type="text/javascript">
+        // var meta_description = document.getElementsByTagName('meta')['description']
+        // document.title = '更新标题'
+        // meta_description.content = '更新描述'; // Android iOS
+        // var oInput = document.createElement('input'); //创建一个input
+        // oInput.setAttribute("readonly", "readonly"); //设置只读,否则移动端使用复制功能时可能会造成软件盘弹出
+        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终端
+        var clipboard = new ClipboardJS('.copybtn') //此处为点击的dom的类名
+        var html = document.documentElement;
+		var imgWidth = html.getBoundingClientRect().width / 750 * 400 + 'px';
+		var imgHeight = html.getBoundingClientRect().width / 750 * 200 + 'px';
+		var barHeight = html.getBoundingClientRect().width / 750 * 70 + 'px';
+        var code = '';
+        $('.close')[0].addEventListener('click', (e) => {
+            $('.dialog').animate({top: '-6.96rem'},"fast");
+            $('.mask').hide();
+            document.documentElement.style.overflow='auto';
+		});
+        $('.get-success-block')[0].addEventListener('click', (e) => {
+            if(isIOS){
+                copyUrl();
+            }else{
+                download();
+            }
+		});
+        function download() {
+            if (isAndroid) {
+                if (baseUrl == 'https://per.cs.se.androidscloud.com') {
+                    window.location.href = 'http://per.cs.se.androidscloud.com:8888/suanchou'
+                } else {
+                    window.location.href = 'http://www.androidscloud.com/suanchou?timestamp=' + Math.random();
+                }
+
+            } else if (isIOS) {
+                document.location.href = 'https://www.pgyer.com/gemini6?timestamp=' + Math.random();
+            } else {
+                document.location.href = 'https://www.androidscloud.com?timestamp=' + Math.random();
+            }
+        }
+        function copyUrl() {
+            var oInput = document.createElement('input'); //创建一个input
+            oInput.setAttribute("readonly", "readonly"); //设置只读,否则移动端使用复制功能时可能会造成软件盘弹出
+            setTimeout(() => {
+                oInput.value = code;
+                // $('.ipt')[0].appendChild(oInput); //将input插入到body
+                // oInput.select(); // 选择对象 ios不支持
+                document.body.appendChild(oInput)
+                selectText(oInput, 0, oInput.value.length);
+                document.execCommand("Copy"); // 执行浏览器复制命令
+                toastr.error(`复制成功`);
+                $('.dialog').animate({top: '-6.96rem'},"fast");
+                $('.mask').hide();
+                document.documentElement.style.overflow='auto';
+                oInput.style.display = 'none'; // 将input隐藏
+                oInput.blur();
+                oInput.remove(); // 将input销毁
+                setTimeout(() => {
+                    document.location.href = 'https://www.pgyer.com/gemini6?timestamp=' + Math.random();
+                }, 1000)
+            }, 400)
+
+        };
+        function selectText(textbox, startIndex, stopIndex) {
+            if (textbox.createTextRange) { //ie
+                const range = textbox.createTextRange();
+                range.collapse(true);
+                range.moveStart('character', startIndex); //起始光标
+                range.moveEnd('character', stopIndex - startIndex); //结束光标
+                range.select(); //不兼容苹果
+            } else { //firefox/chrome
+                textbox.setSelectionRange(startIndex, stopIndex);
+                textbox.focus();
+            }
+        };
+        new Vue({
+            el: '#app',
+            data: {
+                isshow: true,
+                id: GetRequest().id ? GetRequest().id : 404,
+                username: GetRequest().username ? GetRequest().username : '',
+                topic: null,
+                defaultImg: 'this.src="' + "../static/offImg/tou.png" + '"',
+                marqueeList: [],
+                code: '',
+                msg: '活动已下架',
+                strategyId: GetRequest().strategyId ? GetRequest().strategyId : '',
+                tagId: GetRequest().tagId ? GetRequest().tagId : '',
+                uuid: '',
+                flag: true,
+                timer: null,
+
+            },
+            created() {
+                // window.location.href = 'investigate.html'
+            },
+            mounted() {
+                // this.$dialog.alert({
+                //     message: '激活码总数已上限,谢谢参与'
+                // })
+                //  document.querySelector('#app').classList.remove('hide');
+                // this.validate(); // 生成验证码
+                this.getActDetail();
+                this.getMarquee(); //跑马灯
+                if (localStorage.getItem("uuid")) {
+                    this.uuid = localStorage.getItem("uuid");
+                } else {
+                    this.uuid = UUID.generate();
+                    localStorage.setItem("uuid", this.uuid);
+                }
+            },
+            methods: {
+                copyHandle(){
+                    getActivationCode(this.username, this.tagId, this.uuid).then(res => {
+                        this.$toast.clear();
+                        if (res.status === 2 || res.status === 11) {
+                            $('#mpanel2').eq(0).text('');
+                            this.validate(); // 生成验证码
+                            setTimeout(() => {
+                                document.getElementById('form-btn').click();
+                            },500)
+                        } else {
+                            systemBuriedPoint({
+                                pointName: 'dt_裂变_h5_复制激活码'
+                            }).then(res => {})
+                            this.code = res.data;
+                            this.copyUrl();
+                        }
+                    }).catch((error) => {
+                        alert(error)
+                        this.$toast('复制失败');
+                        this.download()
+
+                    });
+                },
+                //查看活动是否下架
+                getActDetail() { //获取活动状态
+                    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.$toast(res.msg);
+                        }
+                    }).catch((error) => {
+                        console.log(error)
+                        this.$toast('网络异常');
+                    });
+                },
+                getCheck() {
+                    getEvantCheck(this.id).then(res => {
+                        console.log(res)
+                    })
+                },
+                createCopy(captchaVerification) {
+                    // this.$toast.loading({
+                    //     duration: 0,
+                    //     message: '加载中...',
+                    //     forbidClick: true,
+                    //     loadingType: 'spinner',
+                    this.stopManyClick(() => {
+                        systemBuriedPoint({
+                            pointName: 'dt_裂变_h5_复制激活码'
+                        }).then(res => {
+
+                        })
+                        getActivationCode(this.username, this.tagId, this.uuid, captchaVerification).then(res => {
+                            this.$toast.clear();
+                            if (res.status === 0) {
+                                this.code = res.data;
+                                this.copyUrl();
+                                if(isIOS){
+                                    code = res.data;
+                                }
+                                // if(isAndroid){
+                                //     this.code = res.data;
+                                //     this.copyUrl();
+                                // }else if(isIOS){
+                                //     $('.dialog').animate({top: '3.36rem'},"fast");
+                                //     $('.mask').show();
+                                //     document.documentElement.style.overflow='hidden';
+                                //     code = res.data;
+                                // } else {
+                                //     this.code = res.data;
+                                //     this.copyUrl();
+                                // }
+                            } else {
+                                this.$dialog.alert({
+                                    message: res.msg
+                                });
+                                setTimeout(() => {
+                                    this.$dialog.close();
+                                    this.download();
+                                }, 2000)
+                            }
+
+                        }).catch((error) => {
+                            alert(error)
+                            this.$toast('复制失败');
+                            this.download()
+
+                        });
+                    })
+
+
+                },
+                download() {
+                    if (isAndroid) {
+                        if (baseUrl == 'https://per.cs.se.androidscloud.com') {
+                            window.location.href = 'http://per.cs.se.androidscloud.com:8888/suanchou'
+                        } else {
+                            window.location.href = 'http://www.androidscloud.com/suanchou?timestamp=' + Math.random();
+                        }
+
+                    } else if (isIOS) {
+                        document.location.href = 'https://www.pgyer.com/gemini6?timestamp=' + Math.random();
+                    } else {
+                        document.location.href = 'https://www.androidscloud.com?timestamp=' + Math.random();
+                    }
+                },
+                standarImg(id) {
+                    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',
+                    });
+                    getStrategy(this.strategyId).then(res => {
+                        this.$toast.clear();
+                        if (res.status === 0) {
+                            if (res.data) {
+                                this.isshow = true;
+                                this.topic = res.data.content;
+                                // this.tagId = res.data.tagId;
+                                console.log(this.topic)
+                            } else {
+                                this.msg = res.msg;
+                                this.isshow = false;
+                            }
+                        }else {
+                            this.$toast(res.msg);
+                        }
+                        console.log(res)
+                    }).catch((error) => {
+                        console.log(error)
+                        this.$toast('网络异常');
+                    });
+                },
+                validate() {
+                    $('#mpanel2').slideVerify({
+                        baseUrl: baseUrl + '/api/user',  //服务器请求地址, 默认地址为安吉服务器;
+                        mode: 'pop',     //展示模式
+                        containerId: 'form-btn', //pop模式 必填 被点击之后出现行为验证码的元素id
+                        imgSize: { //图片的大小对象,有默认值{ width: '310px',height: '155px'},可省略
+                            width: imgWidth,
+                            height: imgHeight
+                        },
+                        barSize: {//下方滑块的大小对象,有默认值{ width: '310px',height: '50px'},可省略
+                            width: imgWidth,
+                            height: barHeight
+                        },
+                        beforeCheck: () => {
+                            return true
+                        },
+                        ready:  () => { 
+                        },  //加载完毕的回调
+                        success: (params) => { //成功的回调
+                            this.createCopy(params.captchaVerification);
+                        },
+                        error: function () {}
+                    });
+                },
+                handTouch(e){
+                    e.preventDefault();
+                },
+                //下载指引弹窗
+                downloadTip(){
+                    if(isIOS){
+				        $('.copy-tip').eq(0).css('marginTop', '44px');
+				        $('.imgs-block').eq(0).css('display', 'none');
+			            $('.get-success').eq(0).text('下载APP并复制激活码');
+                    }
+                    $('.dialog').animate({top: '1.8rem'},"fast");
+                    $('.mask').show();
+                    document.documentElement.style.overflow='hidden';
+                },
+                copyUrl() {
+                    var oInput = document.createElement('input'); //创建一个input
+                    oInput.setAttribute("readonly", "readonly"); //设置只读,否则移动端使用复制功能时可能会造成软件盘弹出
+                    setTimeout(() => {
+                        oInput.value = this.code;
+                        // $('.ipt')[0].appendChild(oInput); //将input插入到body
+                        // oInput.select(); // 选择对象 ios不支持
+                        document.body.appendChild(oInput)
+                        this.selectText(oInput, 0, oInput.value.length);
+                        document.execCommand("Copy"); // 执行浏览器复制命令
+                        // this.$dialog.alert({
+                        //     message: `复制成功`
+                        // })
+                        oInput.style.display = 'none'; // 将input隐藏
+                        oInput.blur();
+                        oInput.remove(); // 将input销毁
+                        setTimeout(() => {
+                            this.$dialog.close();
+                            this.downloadTip();
+                            // this.download();
+                        }, 100)
+                    }, 400)
+
+                },
+                selectText(textbox, startIndex, stopIndex) {
+                    if (textbox.createTextRange) { //ie
+                        const range = textbox.createTextRange();
+                        range.collapse(true);
+                        range.moveStart('character', startIndex); //起始光标
+                        range.moveEnd('character', stopIndex - startIndex); //结束光标
+                        range.select(); //不兼容苹果
+                    } else { //firefox/chrome
+                        textbox.setSelectionRange(startIndex, stopIndex);
+                        textbox.focus();
+                    }
+                },
+                stopManyClick(fn) { //防抖
+                    if (this.flag) {
+                        fn();
+                    }
+                    this.flag = false;
+                    if (this.timer) {
+                        clearTimeout(this.timer);
+                    }
+                    this.timer = setTimeout(() => {
+                        this.flag = true
+                    }, 1500);
+                },
+                onCopy() {
+                    console.log(2323);
+                    this.$toast('复制成功');
+                },
+                onError() {
+                    this.$toast('复制失败');
+
+                },
+            }
+
+        })
+    </script>
+</body>
+
+</html>