From cb6fdc3fba402ce07cc804dea0bcaee71ce2003c Mon Sep 17 00:00:00 2001
From: dragon <3013557874@qq.com>
Date: Thu, 25 Apr 2024 15:14:31 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=9D=99=E6=80=81=E8=B5=84?=
=?UTF-8?q?=E6=BA=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
view/molistar/activity/activemodel/index.html | 46 ++++++
.../molistar/activity/activemodel/js/index.js | 137 ++++++++++++++++++
2 files changed, 183 insertions(+)
create mode 100644 view/molistar/activity/activemodel/index.html
create mode 100644 view/molistar/activity/activemodel/js/index.js
diff --git a/view/molistar/activity/activemodel/index.html b/view/molistar/activity/activemodel/index.html
new file mode 100644
index 00000000..55e7c610
--- /dev/null
+++ b/view/molistar/activity/activemodel/index.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/view/molistar/activity/activemodel/js/index.js b/view/molistar/activity/activemodel/js/index.js
new file mode 100644
index 00000000..9d73d3c0
--- /dev/null
+++ b/view/molistar/activity/activemodel/js/index.js
@@ -0,0 +1,137 @@
+/* jslint esversion: 6 */
+var info = {};
+var betaUrl;
+var realUrl;
+var share;
+var browser = checkVersion();
+var api = getUrlPrefix();
+var queryData = getQueryString();
+var code = queryData.code;
+$(function () {
+ $.ajax({
+ // url: 'http://beta.doudouyue.com./page/static/activity/' + code,
+ url: api + '/page/static/activity/' + code,
+ type: 'GET',
+ success: function (res) {
+ console.log(res);
+ var data = res.data;
+ document.title = data.title;
+ betaUrl = testUrl + '/molistar/activity/activemodel/index.html?code=' + code;
+ realUrl = tranUrl + '/molistar/activity/activemodel/index.html?code=' + code;
+ share = {
+ title: data.title,
+ link: productUrl + '/molistar/activity/activemodel/index.html?code=' + code,
+ // imgUrl: 'https://img.letusmix.com/new_logo.png',
+ // imgUrl: 'https://api.molistarlive.com/molistar/modules/wxPubPay/images/logo.png',
+ imgUrl: '../../../common/images/logo.png',
+ desc: data.secondTitle, // 分享描述
+ };
+ $('#img')[0].src = data.imgUrl;
+ festivalMask("anniversary", "anniversary");
+ initNav(showTitleRightNoticeFuck());
+ _hmt.push(['_trackEvent', 'client', 'click', code]);
+ }
+ })
+
+});
+
+
+
+//分享功能
+$('.footer').on('click', function () {
+ console.log('wwwww');
+ var browser = checkVersion();
+ if (browser.app) {
+ if (browser.android) {
+ window.androidJsObj.openSharePage();
+ } else if (browser.ios) {
+ window.webkit.messageHandlers.openSharePage.postMessage(null);
+ }
+ }
+});
+
+function festivalMask(channel, tags, params) {
+ //此函数用于一般的耳伴底层面罩
+ var browser = checkVersion();
+ var env = EnvCheck();
+ // params = params? params:0;
+ var bol = $.isEmptyObject(params);
+ var jsonStr = '';
+ if (!bol) {
+ jsonStr = JSON.stringify(params);
+ }
+ if (!browser.app) {
+ $('#mask').css('display', 'flex');
+ var linkData = {
+ type: env,
+ channel: channel,
+ tags: tags,
+ // ios_custom_url: "https://itunes.apple.com/cn/app/id1252542069?mt=8",
+ params: jsonStr
+ // '{"uid":"' + params + '"}'
+ };
+
+ linkedme.init("c7e97cea0afe60557d67e7faaa5d5932", { type: env }, null);
+
+ linkedme.link(linkData, function (err, response) {
+ if (err) {
+ // 生成深度链接失败,返回错误对象err
+ console.log('err:', err);
+ } else {
+ console.log(response);
+ $('#download a').attr('href', response.url);
+ }
+ }, false);
+ } else {
+ $('.footer').css('display', 'flex');
+ }
+}
+
+function showTitleRightNoticeFuck() {
+ var _url = (EnvCheck() == 'test') ? betaUrl : realUrl;
+ share.link = _url;
+ var obj = {
+ type: 2,
+ data: {
+ msg: 'wewawa',
+ link: share.link, //分享进去微信语音页面
+ title: share.title,
+ imgUrl: share.imgUrl,
+ desc: share.desc,
+ showUrl: share.link
+ }
+ };
+ return obj;
+}
+wx.ready(function () {
+ //分享到朋友圈
+ wx.onMenuShareTimeline({
+ title: share.title,
+ link: share.link,
+ imgUrl: share.imgUrl,
+ });
+ //分享给朋友
+ wx.onMenuShareAppMessage({
+ title: share.title,
+ desc: share.desc,
+ link: share.link,
+ imgUrl: share.imgUrl,
+ type: 'link',
+ dataUrl: '',
+ });
+ //分享到QQ
+ wx.onMenuShareQQ({
+ title: share.title,
+ desc: share.desc,
+ link: share.link,
+ imgUrl: share.imgUrl,
+ });
+});
+//分享
+
+// wxConfig();
+
+function getMessage(key, value) {
+ // value = parseInt(value);
+ info[key] = value;
+}
\ No newline at end of file