Commit 39d41fbc authored by wjf's avatar wjf

l

parent 1c61b270
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"sharecodepanel","version":5,"files":["..\\assets\\shareCodePanel\\lijiqianwang.png","..\\assets\\shareCodePanel\\copyCodeBg.png","..\\assets\\shareCodePanel\\shareWxpyqIcon.png","..\\assets\\shareCodePanel\\shareWxIcon.png","..\\assets\\shareCodePanel\\shareQqIcon.png","..\\assets\\shareCodePanel\\shareWeiboIcon.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"sharecodepanel","version":5,"files":["..\\assets\\shareCodePanel\\lijiqianwang.png","..\\assets\\shareCodePanel\\copyCodeBg.png","..\\assets\\shareCodePanel\\shareWxpyqIcon.png","..\\assets\\shareCodePanel\\shareWxIcon.png","..\\assets\\shareCodePanel\\shareQqIcon.png","..\\assets\\shareCodePanel\\shareWeiboIcon.png","..\\assets\\shareCodePanel\\zhantiegeihaoyou.png"]}
\ No newline at end of file
......@@ -54,14 +54,14 @@ interface ShareData {
const jumpFun = [
function () {//跳转微信
var locatUrl = "weixin://";
if (/ipad|iphone|mac/i.test(navigator.userAgent)) {
var ifr = document.createElement("iframe");
ifr.src = locatUrl;
ifr.style.display = "none";
document.body.appendChild(ifr);
} else {
window.location.href = locatUrl;
}
// if (/ipad|iphone|mac/i.test(navigator.userAgent)) {
// var ifr = document.createElement("iframe");
// ifr.src = locatUrl;
// ifr.style.display = "none";
// document.body.appendChild(ifr);
// } else {
window.location.href = locatUrl;
// }
},
function () {//跳转微信朋友圈,暂时用跳转微信代替
var locatUrl = "weixin://";
......@@ -75,10 +75,10 @@ const jumpFun = [
}
},
function () {//跳转微博
showToast("快打开微博,粘贴给好友吧")
},
function () {//跳转qq
showToast("快打开QQ,粘贴给好友吧")
},
]
......@@ -107,11 +107,25 @@ class ShareCodePanel extends ComponentBase {
this.data = data;
//显示提示文案
this.msg.text = panelMsg[this.data.channel];
//获取code先
generateCode((s, res) => {
if (!s || !res.data || !res.data.result || !res.data.result.content) {
return
}
this.code = res.data.result.content;
}, this.data.channel, this.data.shareCode)
}
start() {
super.start();
this.height = this.stage.stageHeight;
//
// if (!document.getElementById("kouling")){
// var a='<div id="kouling" style="display:none" data-clipboard-text=""></div>';
// document.body.insertAdjacentHTML("afterbegin",a)
// }
}
......@@ -128,19 +142,22 @@ class ShareCodePanel extends ComponentBase {
onTouchWxBtn() {
this.mark = 0;
this.codeOpr()
this.codeOpr();
NetManager.ins.showLog(getlogItem(84));
}
onTouchWxpyqBtn() {
this.mark = 1;
this.codeOpr()
this.codeOpr();
}
onTouchWeiboBtn() {
this.mark = 2;
this.codeOpr()
this.codeOpr();
NetManager.ins.showLog(getlogItem(85));
}
onTouchQqBtn() {
this.mark = 3;
this.codeOpr()
this.codeOpr();
NetManager.ins.showLog(getlogItem(86));
}
onTouchGoBtn() {
......@@ -203,7 +220,7 @@ class ShareCodePanel extends ComponentBase {
//曝光埋点
NetManager.ins.showLog(getlogItem(buridNums[this.data.channel]))
} else {
showToast("口令生成失败,请重试")
showToast("口令复制失败,请重试")
}
},
(window["shareCodeHead"] || "复制口令") +
......@@ -247,6 +264,10 @@ export const showShareCodePanel = (channel: CodeChannels, shareCode?: string, ad
initShare();
inited = true;
}
//三个渠道点击埋点
NetManager.ins.showLog(getlogItem(84));
NetManager.ins.showLog(getlogItem(85));
NetManager.ins.showLog(getlogItem(86));
_share.setData({ channel, shareCode, addFun });
layers.shareCodeLayer.visible = true;
}
......@@ -302,9 +323,27 @@ function copyPassword(callback: Function, code: string) {
error: function (e) {
callback(false, e);
// console.log(e)
// alert(JSON.stringify(e))
// alert('复制失败')
}
})
// var a='<div id="btn" style="display:none" data-clipboard-text=""></div>';document.body.insertAdjacentHTML("afterbegin",a)
// console.log(window["ClipboardJS"])
// var clipboard = new window["ClipboardJS"]("#kouling", {
// // text: code+""
// });
// clipboard.on("success", e => {
// clipboard.destroy();
// callback(true, e);
// });
// clipboard.on("error", e => {
// callback(false, e);
// alert(JSON.stringify(e))
// e.clearSelection();
// clipboard.destroy();
// });
// document.querySelector("#kouling")["click"]()
}
/**
......
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