Commit b76f2a4d authored by chenqikuai's avatar chenqikuai

save

parents
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1640339616063" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2968" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M615.878882 177.494507l42.303478-61.521169c1.811252-2.619664 1.146103-6.252401-1.473561-8.063653l-1.054005-0.726547c-2.619664-1.821485-6.231935-1.146103-8.043187 1.473561l-43.521213 63.291488c-28.427446-12.361539-60.139705-19.268856-93.601818-19.268856-31.753191 0-61.950957 6.221702-89.232301 17.426905l-41.587164-60.477396c-1.801019-2.619664-5.423523-3.284813-8.043187-1.473561l-1.054005 0.726547c-2.619664 1.811252-3.284813 5.443989-1.483794 8.073886l40.215934 58.461483c-63.23009 30.300097-108.664885 88.075964-117.915573 156.299789l438.20018 0C720.552873 265.017886 676.919097 208.296023 615.878882 177.494507zM418.217057 265.621637c-12.054547 0-21.837354-9.813506-21.837354-21.908986 0-12.095479 9.782807-21.898753 21.837354-21.898753 12.06478 0 21.837354 9.803273 21.837354 21.898753C440.054411 255.80813 430.281837 265.621637 418.217057 265.621637zM606.710059 265.621637c-12.054547 0-21.837354-9.813506-21.837354-21.908986 0-12.095479 9.782807-21.898753 21.837354-21.898753 12.06478 0 21.837354 9.803273 21.837354 21.898753C628.547413 255.80813 618.774839 265.621637 606.710059 265.621637z" p-id="2969"></path><path d="M260.904195 419.506423l0 179.446975c0 30.760584-19.596314 55.933917-43.562145 55.933917l-9.680477 0c-23.955598 0-43.562145-25.173332-43.562145-55.933917l0-179.446975c0-30.760584 19.606547-55.923684 43.562145-55.923684l9.680477 0C241.307881 363.582739 260.904195 388.745838 260.904195 419.506423z" p-id="2970"></path><path d="M859.896478 420.570661l0 179.446975c0 30.770817-19.596314 55.933917-43.562145 55.933917l-9.680477 0c-23.955598 0-43.562145-25.163099-43.562145-55.933917l0-179.446975c0-30.760584 19.606547-55.923684 43.562145-55.923684l9.680477 0C840.300164 364.646977 859.896478 389.810077 859.896478 420.570661z" p-id="2971"></path><path d="M732.934878 360.830045l0 354.074178c0 24.579815-20.046568 44.687782-44.554752 44.687782l-36.746926 0 0 102.320387c0 30.760584-19.606547 55.923684-43.562145 55.923684l-9.680477 0c-23.955598 0-43.562145-25.163099-43.562145-55.923684l0-102.320387-81.864496 0 0 101.143585c0 30.760584-19.596314 55.933917-43.562145 55.933917l-9.680477 0c-23.955598 0-43.562145-25.173332-43.562145-55.933917l0-101.143585-40.062438 0c-24.508183 0-44.554752-20.107967-44.554752-44.687782l0-354.074178L732.934878 360.830045z" p-id="2972"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1640339592051" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2070" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M856.5 671.5q-19.5 62.5-61.5 125-64.5 98-128.5 98-24.5 0-70-16-43-16-75.5-16-30.5 0-71 16.5-40.5 17-66 17-76 0-150.5-129.5-73.5-130.5-73.5-251.5 0-114 56.5-187 56-72 142-72 36 0 88.5 15 52 15 69 15 22.5 0 71.5-17 51-17 86.5-17 59.5 0 106.5 32.5 26 18 52 50-39.5 33.5-57 59-32.5 47-32.5 103.5 0 62 34.5 111.5t79 63zm-188-586.5q0 30.5-14.5 68-15 37.5-46.5 69-27 27-54 36-18.5 5.5-52 8.5 1.5-74.5 39-128.5 37-53.5 125-74 0.5 1.5 1.25 5.5t1.25 5.5q0 2 2.5 5t2.5 5z" p-id="2071"></path></svg>
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<img class="bgImg" src="./background.png" alt="">
<div class="boxContainer">
<div class="box">
<h3 class="title">STAR</h3>
<div id="qrcode" style="height: 120px;"></div>
<div class="title" style="margin-top: 10px;">点击或长按复制下载链接</div>
<div style="color: rgb(238,101,104);margin-top: 10px;" class=" title">已下载直接打开 ></div>
</div>
</div>
<a href="/proxyUrl/ios">
<div class="btnContainer" style="margin-top: 30px;">
<img src="./apple.svg" style="width: 20px;">
<div class="text1">Testflight版</div>
<div class="text2" style="margin-left: 4px;">稳定不掉签</div>
</div>
</a>
<a href="/proxyUrl/android">
<div class="btnContainer" style="margin-top: 10px;">
<img src="./android.svg" style="width: 20px;">
<div class="text1">交易所Android下载</div>
</div>
</a>
</div>
<div style="position: absolute; top: -300px;">
<button class="clipboard" data-clipboard-text="sdf">
fuzhi
</button>
</div>
<div class="ig-wechat-tip" style="display: none;">
<div class="ig-wechat-tip_img"></div>
</div>
<div class="toast" style="display: none;">复制成功</div>
<script src="./mtouchjs.js"></script>
<script src="./qrcode.js"></script>
<script src="./clipboard.js"></script>
</script>
<script src="index.js"></script>
</body>
</html>
\ No newline at end of file
function checkEnv() {
var ua = navigator.userAgent.toLowerCase()
if (/micromessenger/i.test(ua)) {
const ele = document.querySelector('.ig-wechat-tip')
ele.classList.add('show')
}
}
window.onload = () => {
checkEnv();
document.querySelector('.clipboard').setAttribute('data-clipboard-text', location.href)
const clipboard = new ClipboardJS('.clipboard');
let timeoutId = null;
clipboard.on('success', function (e) {
const toast = document.querySelector('.toast')
toast.innerHTML = '复制成功'
clearTimeout(timeoutId)
toast.classList.add('show')
timeoutId = setTimeout(() => {
toast.classList.remove('show')
}, 2000);
e.clearSelection();
});
clipboard.on('error', function (e) {
console.log(e, 'show error');
const toast = document.querySelector('.toast')
toast.innerHTML = '复制失败'
clearTimeout(timeoutId)
toast.classList.add('show')
timeoutId = setTimeout(() => {
toast.classList.remove('show')
}, 2000);
});
new QRCode(document.getElementById("qrcode"), {
text: location.href,
width: 120,
height: 120,
colorDark: "#000000",
colorLight: "#ffffff",
correctLevel: QRCode.CorrectLevel.H
});
mTouch.config({
tapMaxDistance: 10, // 单击事件允许的滑动距离
doubleTapDelay: 200, // 双击事件的延时时长(两次单击的最大时间间隔)
longTapDelay: 700, // 长按事件的最小时长
swipeMinDistance: 20, // 触发方向滑动的最小距离
swipeTime: 300, // 触发方向滑动允许的最长时长
lockDirection: true, // 是否锁定方向,一旦触发横向/竖向滑动后,就一直锁定这个方向,如需不锁定方向,配置成false
})
// document.querySelector('#qrcode').addEventListener('touchend', () => {
// console.log('start');
// document.querySelector('.clipboard').click();
// })
mTouch('#qrcode').on('longtap', (e) => {
document.querySelector('.clipboard').click();
})
// mTouch('#qrcode').on('tap', (e) => {
// document.querySelector('.clipboard').click();
// })
}
\ No newline at end of file
!function (t, e) { "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = t || self).mTouch = e() }(this, function () { "use strict"; function i(t, e) { for (var n = 0; n < e.length; n++) { var i = e[n]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i) } } function f() { } var t = navigator.userAgent, D = { tapMaxDistance: 5, doubleTapDelay: 200, longTapDelay: 700, swipeMinDistance: 5, swipeTime: 300, lockDirection: !0 }, E = { hasTouch: !!("ontouchstart" in window && { ios: function () { return t.match(/\((i[^;]+);.+OS\s([\d_.]+)/) }, android: function () { return t.match(/(Android)[\s/]+([\d.]+)/) }, wp: function () { return t.match(/(Windows\s+Phone)\s([\d.]+)/) }, getMobile: function () { return this.ios || this.android || this.wp } }.getMobile()), isProxyTarget: function (t, e) { return 0 === e.indexOf(".") ? new RegExp("(\\s|^)".concat(e.substring(1), "(\\s|$)")).test(t.className) : 0 === e.indexOf("#") ? t.id === e.substring(1) : t.tagName.toLocaleLowerCase() === e }, swipeDirection: function (t, e, n, i, o) { return D.lockDirection && "horizontal" === o || !D.lockDirection && Math.abs(t - n) >= Math.abs(e - i) ? n < t ? "LEFT" : "RIGHT" : i < e ? "UP" : "DOWN" }, _trigger: function (t, e, n) { var i = n.target, o = e || n.currentTarget || n.target; if (i && o._m_touch_events[t]) for (var a = o._m_touch_events[t]; ;) { if (!i) return; if (i === o) return void this._execHandler(a, t, i, n, !0); var r = a; if (!1 === (a = this._execHandler(r, t, i, n, !1))) return; i = i.parentNode } }, _execHandler: function (t, e, n, i, o) { var a, r, c, u, s, h = [], _ = []; for (a = 0, r = t.length; a < r; a++)u = (c = t[a]).proxyStr || "", o ? u || h.push(c) : u && this.isProxyTarget(n, u) ? h.push(c) : _.push(c); if (h.length) for (a = 0, r = h.length; a < r; a++)if (s = h[a].handler || f, !1 === this._callback(e, s, n, i)) return !1; return _ }, _callback: function (t, e, n, i) { var o = this.hasTouch ? i.touches.length ? i.touches[0] : i.changedTouches[0] : i, a = i._m_touch_data || {}, r = a.startX || 0, c = a.startY || 0, u = o.pageX || 0, s = o.pageY || 0, h = { type: t, target: i.target, startX: r, startY: c, pageX: u, pageY: s, moveX: u - r, moveY: s - c, startTime: a.touchStartTime || 0, direction: i._m_touch_data ? i._m_touch_data.directionLocked : "" }; i.mTouchEvent = h; var _ = e.call(n, i); return !1 === _ && (i.preventDefault(), i.stopPropagation()), _ }, stopFilter: function (e) { return function (t) { return t.stopPropagation(), e.call(this, t) } }, preventFilter: function (e) { return function (t) { return t.preventDefault(), e.call(this, t) } } }, w = { TOUCH_START: E.hasTouch ? "touchstart" : "mousedown", TOUCH_MOVE: E.hasTouch ? "touchmove" : "mousemove", TOUCH_END: E.hasTouch ? "touchend" : "mouseup", TOUCH_CANCEL: "touchcancel", TAP: "tap", DOUBLE_TAP: "doubletap", LONG_TAP: "longtap", SWIPE_START: "swipestart", SWIPING: "swiping", SWIPE_END: "swipeend", SWIPE_LEFT: "swipeleft", SWIPE_RIGHT: "swiperight", SWIPE_UP: "swipeup", SWIPE_DOWN: "swipedown", CANCEL: "cancel" }; var n = function () { function e(t) { var n = this; !function (t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, e), [].forEach.call(t, function (t, e) { t._m_touch_events = t._m_touch_events || {}, function (c) { if (!c._m_touch_is_bind) { var r, n, u, s = 0, h = 0, t = [], _ = t[0], f = t[1], l = t[2], p = t[3], d = !1, g = "", T = function () { clearTimeout(r), clearTimeout(n) }, m = function (t) { d = !1, T(), E._trigger(w.TAP, c, t) }, v = function (t) { T(), t._m_touch_data = { startX: _, startY: l, touchStartTime: s, directionLocked: u }, E._trigger(w.CANCEL, c, t) }; c.addEventListener(w.TOUCH_START, function (t) { var e = E.hasTouch ? t.touches[0] : t; _ = e.pageX, l = e.pageY, d = !(p = f = 0), s = Date.now(), g = u = "", t._m_touch_data = { startX: _, startY: l, touchStartTime: s, directionLocked: "" }, E._trigger(w.SWIPE_START, c, t), clearTimeout(n), n = setTimeout(function () { d = !1, T(), E._trigger(w.LONG_TAP, c, t) }, D.longTapDelay) }), c.addEventListener(w.TOUCH_MOVE, function (t) { if (d) { var e = Date.now(), n = E.hasTouch ? t.touches[0] : t, i = f || n.pageX, o = p || n.pageY; t._m_touch_data = { startX: _, startY: l, touchStartTime: s, directionLocked: "" }, f = n.pageX, p = n.pageY; var a = Math.abs(_ - f), r = Math.abs(l - p); a < D.tapMaxDistance && r < D.tapMaxDistance || (D.lockDirection && !u && (u = r < a ? "horizontal" : "vertical"), g = E.swipeDirection(i, o, f, p, u), t._m_touch_data.directionLocked = u, T(), E._trigger(w.SWIPING, c, t), 300 < e - s && (s = e, t._m_touch_data.touchStartTime = s)) } }), c.addEventListener(w.TOUCH_END, function (t) { if (d) { var e = Date.now(), n = E.hasTouch ? t.changedTouches[0] : t; f = n.pageX, p = n.pageY, t._m_touch_data = { startX: _, startY: l, touchStartTime: s, directionLocked: u }, E._trigger(w.SWIPE_END, c, t); var i = Math.abs(_ - f), o = Math.abs(l - p); if (i <= D.tapMaxDistance && o <= D.tapMaxDistance) h = c._m_touch_events[w.DOUBLE_TAP] && c._m_touch_events[w.DOUBLE_TAP].length ? e - h > D.doubleTapDelay ? (r = setTimeout(function () { m(t) }, D.doubleTapDelay), e) : (T(), E._trigger(w.DOUBLE_TAP, c, t), 0) : (m(t), e); else if (e - s <= D.swipeTime && (i > D.swipeMinDistance || o > D.swipeMinDistance)) { var a = E.swipeDirection(_, l, f, p, u); T(), a === g ? E._trigger(w["SWIPE_".concat(g)], c, t) : v(t) } else v(t); d = !1 } }), c.addEventListener(w.TOUCH_CANCEL, v), c._m_touch_is_bind = !0 } }(t), n[e] = t }), this.length = t.length } return function (t, e, n) { e && i(t.prototype, e), n && i(t, n) }(e, [{ key: "each", value: function (t) { for (var e = 0, n = this.length; e < n; e++)t.call(this[e], e); return this } }, { key: "on", value: function (t, n, i) { if ("function" == typeof n && (i = n, n = null), "function" != typeof i || !t || !t.length) return this; var o = t.split(/\s+/); return this.each(function () { var e = this._m_touch_events; o.forEach(function (t) { e[t] || (e[t] = []), e[t].push({ handler: i, proxyStr: n }) }) }), this } }, { key: "off", value: function (o, a, r) { return "function" == typeof a && (r = a, a = null), this.each(function () { var t = this._m_touch_events; if (o) { if (t[o] && t[o].length) if (a || r) for (var e, n = t[o], i = n.length - 1; 0 <= i;)e = n[i], a && "function" == typeof r ? e.proxyStr === a && e.handler === r && n.splice(i, 1) : a && e.proxyStr === a ? n.splice(i, 1) : "function" == typeof r && e.handler === r && n.splice(i, 1), i -= 1; else t[o] = [] } else this._m_touch_events = {} }), this } }], [{ key: "config", value: function (t) { Object.assign(D, t) } }]), e }(); function e(t) { var e; return e = t === document || 1 === t.nodeType ? [t] : document.querySelectorAll(t), new n(e) } return e.config = n.config, e });
\ No newline at end of file
This diff is collapsed.
html,
body {
margin: 0;
padding: 0;
background-color: rgb(254, 246, 229);
}
.container {
position: absolute;
overflow: hidden;
width: 100vw;
height: 100vh;
}
.bgImg {
z-index: -1;
position: absolute;
top: -70px;
width: 100%;
}
.boxContainer {
margin: 0 auto;
width: 260px;
}
.boxContainer .box {
display: flow-root;
position: relative;
z-index: 5;
width: 100%;
height: 0;
margin: 0 auto;
background: white;
padding-bottom: 100%;
margin-top: 100px;
border-radius: 10px;
text-align: center;
}
.box .title {
text-align: center;
}
#qrcode {
/* -webkit-user-select: all;
-moz-user-select: all;
-o-user-select: all;
user-select: all; */
}
#qrcode img {
margin: 0 auto;
}
.btnContainer {
width: 260px;
margin: 0 auto;
border: 1px solid rgb(145, 165, 173);
padding: 10px 0;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
background: white;
}
.text1 {
font-weight: 600;
}
.text2 {
font-size: 13px;
}
.toast {
z-index: 20;
position: fixed;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
padding: 10px 30px;
background: rgb(128, 128, 128);
border-radius: 6px;
color: white;
}
.show {
display: block !important;
}
a {
text-decoration: none;
color: black;
}
.ig-wechat-tip {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: black;
opacity: 0.6;
text-align: center;
z-index: 100;
}
.ig-wechat-tip_img {
margin: 5px auto 0;
width: 80%;
height: 70px;
background: url('./switch.png') no-repeat;
background-size: 100%;
}
switch.png

10.5 KB

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment