|
@@ -28,9 +28,12 @@
|
|
|
<body>
|
|
|
<div class="container">
|
|
|
<div class="share-node">
|
|
|
+ <img class="share" onclick="share()" src="../static/img/replacementActivities/share.png" alt="">
|
|
|
+ <div class="line"></div>
|
|
|
<img class="qq" onclick="urlToQQ()" src="../static/img/replacementActivities/qq.png" alt="">
|
|
|
<div class="line"></div>
|
|
|
- <a href="qq://mqqwpa://im/chat?chat_type=wpa&uin=800183764&version=1&src_type=web&web_src=oicqzone.com"><img class="cs" src="../static/img/replacementActivities/cs.png" alt=""></a>
|
|
|
+ <a href="qq://mqqwpa://im/chat?chat_type=wpa&uin=800183764&version=1&src_type=web&web_src=oicqzone.com"><img
|
|
|
+ class="cs" src="../static/img/replacementActivities/cs.png" alt=""></a>
|
|
|
</div>
|
|
|
<div class="date">2022.1.4-2022.2.8</div>
|
|
|
<div class="header">
|
|
@@ -194,6 +197,46 @@
|
|
|
copyUrl();
|
|
|
}
|
|
|
}, false);
|
|
|
+ function share() {
|
|
|
+ if (!id) {
|
|
|
+ copyUrl();
|
|
|
+ } else if (isiOS) {
|
|
|
+ $.ajax({
|
|
|
+ url: baseUrl + '/api/user/v1/promote',
|
|
|
+ type: 'get',
|
|
|
+ headers: {
|
|
|
+ 'Authorization': id //id
|
|
|
+ },
|
|
|
+ contentType: "application/json",
|
|
|
+ dataType: 'json',
|
|
|
+ cache: false,
|
|
|
+ success: function (res) {
|
|
|
+ var jsonStr = JSON.stringify(res.data)
|
|
|
+ var jsonObj = JSON.parse(jsonStr)
|
|
|
+ // WKWebView使用
|
|
|
+ // 使用下方方法,会报错,为使界面执行逻辑通畅,因此使用try-catch
|
|
|
+ try {
|
|
|
+ getMessage(jsonObj);
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error)
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ window.webkit.messageHandlers.getMessage.postMessage(jsonObj)
|
|
|
+ } catch (error) {
|
|
|
+ copyUrl();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if (isAndroid) {
|
|
|
+ if (window.native) {
|
|
|
+ window.native.onClikWebView()
|
|
|
+ } else {
|
|
|
+ copyUrl();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ copyUrl();
|
|
|
+ }
|
|
|
+ }
|
|
|
//复制
|
|
|
function copyUrl() {
|
|
|
stopManyClick(() => {
|
|
@@ -265,57 +308,64 @@
|
|
|
var imgWidth = html.getBoundingClientRect().width / 750 * 400 + 'px';
|
|
|
var imgHeight = html.getBoundingClientRect().width / 750 * 200 + 'px';
|
|
|
var barHeight = html.getBoundingClientRect().width / 750 * 70 + 'px';
|
|
|
- $('#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: function () {
|
|
|
- account = $('#account').val();
|
|
|
- account = account.replace(/\s+/g, "");
|
|
|
- password = $('#password').val();
|
|
|
- password = password.replace(/\s+/g, "");
|
|
|
- if (!account) {
|
|
|
- $('.tip-text1').text('账号格式不正确,请重新输入!');
|
|
|
- $('#account').addClass('br');
|
|
|
- return false
|
|
|
- } else {
|
|
|
- $('.tip-text1').text('');
|
|
|
- $('#account').removeClass('br')
|
|
|
- }
|
|
|
- if (!/^1[3|4|5|6|7|8|9][0-9]\d{8}$/.test(account)) {
|
|
|
- $('.tip-text1').text('账号格式不正确,请重新输入!');
|
|
|
- $('#account').addClass('br');
|
|
|
- return false
|
|
|
- } else {
|
|
|
- $('.tip-text1').text('');
|
|
|
- $('#account').removeClass('br')
|
|
|
- }
|
|
|
- if (!password) {
|
|
|
- $('.tip-text2').text('密码为空,请重新输入!');
|
|
|
- $('#password').addClass('br');
|
|
|
- return false
|
|
|
- } else {
|
|
|
- $('.tip-text2').text('');
|
|
|
- $('#password').removeClass('br');
|
|
|
- return true
|
|
|
+ validate(); // 生成验证码
|
|
|
+ function 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: function () {
|
|
|
+ account = $('#account').val();
|
|
|
+ account = account.replace(/\s+/g, "");
|
|
|
+ password = $('#password').val();
|
|
|
+ password = password.replace(/\s+/g, "");
|
|
|
+ if (!account) {
|
|
|
+ $('.tip-text1').text('账号格式不正确,请重新输入!');
|
|
|
+ $('#account').addClass('br');
|
|
|
+ return false
|
|
|
+ } else {
|
|
|
+ $('.tip-text1').text('');
|
|
|
+ $('#account').removeClass('br')
|
|
|
+ }
|
|
|
+ if (!/^1[3|4|5|6|7|8|9][0-9]\d{8}$/.test(account)) {
|
|
|
+ $('.tip-text1').text('账号格式不正确,请重新输入!');
|
|
|
+ $('#account').addClass('br');
|
|
|
+ return false
|
|
|
+ } else {
|
|
|
+ $('.tip-text1').text('');
|
|
|
+ $('#account').removeClass('br')
|
|
|
+ }
|
|
|
+ if (!password) {
|
|
|
+ $('.tip-text2').text('密码为空,请重新输入!');
|
|
|
+ $('#password').addClass('br');
|
|
|
+ return false
|
|
|
+ } else {
|
|
|
+ $('.tip-text2').text('');
|
|
|
+ $('#password').removeClass('br');
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ready: function () { }, //加载完毕的回调
|
|
|
+ success: function (params) { //成功的回调
|
|
|
+ operate('dt_yhs_点击免费换机按钮', 'click', params.captchaVerification);
|
|
|
+ },
|
|
|
+ error: function (err) {
|
|
|
+ if (err.repCode == "6202") {
|
|
|
+ toastr.error(err.repMsg)
|
|
|
+ $('#mpanel2').empty()
|
|
|
+ validate()
|
|
|
+ }
|
|
|
}
|
|
|
- },
|
|
|
- ready: function () {}, //加载完毕的回调
|
|
|
- success: function (params) { //成功的回调
|
|
|
- operate('dt_yhs_点击免费换机按钮', 'click', params.captchaVerification);
|
|
|
- },
|
|
|
- error: function () {
|
|
|
- console.log('error');
|
|
|
- } //失败的回调
|
|
|
- });
|
|
|
+ });
|
|
|
+ }
|
|
|
//调用免费换机接口
|
|
|
function changePhone(captchaVerification) {
|
|
|
let data = {
|
|
@@ -434,4 +484,5 @@
|
|
|
color: #BBBBBB;
|
|
|
}
|
|
|
</style>
|
|
|
+
|
|
|
</html>
|