1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-21 11:18:10 +08:00
2021-09-22 21:48:49 +08:00

27 lines
885 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

layui.use(['jquery', 'helper'], function () {
var $ = layui.jquery;
var helper = layui.helper;
var myShare = {
title: $('input[name="share.title"]').val(),
pic: $('input[name="share.pic"]').val(),
url: $('input[name="share.url"]').val(),
qrcode: $('input[name="share.qrcode"]').val()
};
$('.share-wechat').on('click', function () {
helper.wechatShare(myShare.qrcode);
});
$('.share-qq').on('click', function () {
var title = '推荐一个有趣的朋友:' + myShare.title + '快来和Ta一起学习吧';
helper.qqShare(title, myShare.url, myShare.pic);
});
$('.share-weibo').on('click', function () {
var title = '推荐一个有趣的朋友:' + myShare.title + '快来和Ta一起学习吧';
helper.weiboShare(title, myShare.url, myShare.pic);
});
});