Commit 264623b2 authored by haiyoucuv's avatar haiyoucuv

整理一下代码

parent 23a1dd7c
......@@ -7,7 +7,7 @@ export function isIos() {
return navigator.userAgent.match(/iphone|ipod|ipad/gi)
}
export function popPage(){
export function popPage() {
window["MarsJSBridge"].invoke("popPage", {
index: -1,
data: {},
......@@ -63,10 +63,10 @@ export function resetBackCookie(duibaTempCookieId) {
data: {duibaTempCookieId}, //请求参数
dataType: "json", // 返回值类型的设定,暂时只有json
async: true, //是否异步
success: ()=>{
success: () => {
resolve('success');
},
error: (e)=>{
error: (e) => {
resolve(e);
},
});
......@@ -255,12 +255,12 @@ export function getLoginStatus() {
export const appShare = (shareParams) => {
return new Promise((r) => {
window["MarsJSBridge"].invoke("jsToWeChatShare", {
window['MarsJSBridge'].invoke("jsToWeChatShare", {
saveAlbum: '0', // 保存相册 1 打开保存相册入口 0 关闭入口
weChatMoments: '1', // 分享到朋友圈 1 打开分享到朋友圈入口 0 关闭入口
friendList: '1', // 分享给好友 1 打开分享给好友入口 0 关闭入口
url: shareParams.url, // 链接地址
image: '', // 保存分享图片
// image: '', // 保存分享图片
simpleImage: shareParams.thumbnail, // 分享链接缩略图 备:缩略图大小不超过64K
title: shareParams.title, // 标题
description: shareParams.content, // 内容简介
......@@ -282,5 +282,5 @@ export const appShare = (shareParams) => {
// result: '没有相册权限'
// }
});
})
});
}
......@@ -15,6 +15,7 @@ import ToolBuyPanel from '../Panels/ToolBuyPanel';
import store from "../../store/store";
import { observer, render } from "../../store/decorators";
import { PrizeScene } from "./PrizeScene/PrizeScene";
import { appShare } from "../../AppTool";
const {ccclass, property} = _decorator;
......@@ -211,6 +212,9 @@ export class HomeScene extends Scene {
if (!this.checkActStatus()) return false;
ShareCenter.ins.getInviteCode();
await appShare(store.frontVariable.shareInfo);
}
}
......
This diff is collapsed.
......@@ -39,7 +39,7 @@
<script src="//yun.duiba.com.cn/polaris/SVGA.Lite.v2.1.1.d3a67cbc13c591c53c6f87ab34c57ce387010374.js" crossorigin="anonymous"></script>
<script src="//yun.duiba.com.cn/aurora/assets/2403d1edf2acd15b179306b6ddaa5f0967d78a8f.js"></script>
<link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215987595/style.css"/>
<link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719231805381/style.css"/>
<style>
.sui-captcha {
......@@ -94,17 +94,17 @@
</div>
<!-- Polyfills bundle. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215987595/src/polyfills.bundle.js" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719231805381/src/polyfills.bundle.js" charset="utf-8"></script>
<!-- SystemJS support. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215987595/src/system.bundle.js" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719231805381/src/system.bundle.js" charset="utf-8"></script>
<!-- Import map -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215987595/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719231805381/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>
<script>
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1719215987595/index.js').catch(function (err) {
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1719231805381/index.js').catch(function (err) {
console.error(err);
})
</script>
......
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