This commit is contained in:
zpc 2025-05-22 01:51:53 +08:00
parent cbb6a29e0b
commit 9552588bef
6 changed files with 601 additions and 0 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5502
}

View File

@ -0,0 +1,98 @@
SELECT sum(o.order_zhe_total)
FROM `order` o
LEFT join `user` u ON o.user_id=u.id
where u.status=1 and u.istest=0 and o.status=1
and o.addtime>UNIX_TIMESTAMP(CURDATE());
SELECT o.user_id,u.nickname,u.mobile,
IFNULL(sum(price)+SUM(use_money),0) use_money,
( select sum(goodslist_money) sc_money from order_list where addtime<1746374399 and user_id=21617 and status=2) fh_money,
( select sum(goodslist_money) sc_money from order_list where addtime<1746374399 and user_id=21617 and status=1) bb_money,
u.money2
FROM `order` o LEFT join `user` u ON o.user_id=u.id where u.status=1 and u.istest=0
and o.addtime>1745550000 and o.addtime<1746374399 group by o.user_id;
select c.* from (
select t.*,
(CASE
WHEN t.use_money>0 THEN (t.use_money-t.fh_money-t.bb_money-t.sy_money)
ELSE 0
END) yue_money
from (
SELECT o.user_id, u.uid, u.nickname, u.headimg, u.mobile,
u.money,
u.integral,
count(1) orderCount,
sum(IFNULL(order_zhe_total,0)) order_zhe_total,
IFNULL(sum(price),0) money_1,
IFNULL(sum(use_money),0) money_2,
IFNULL(sum(price)+SUM(use_money),0) use_money,
(select IFNULL(sum(goodslist_money),0) sc_money from order_list where user_id=o.user_id and status=2 and choice_time > 1746201600 and choice_time < 1746374399) fh_money,
(select IFNULL(sum(goodslist_money),0) sc_money from order_list where user_id=o.user_id and status=0 and addtime < 1746374399) bb_money,
(TRUNCATE(u.money2/100, 2)) money2,
(TRUNCATE(IFNULL((SELECT money FROM profit_money2 where user_id=o.user_id and addtime > 1746201600 and addtime < 1746374399 order by id desc LIMIT 1),0)/100, 2)) sy_money
FROM `user` u INNER join `order` o ON o.user_id=u.id where u.status=1 and u.istest=0 and o.status=1 and o.addtime > 1746201600 and o.addtime < 1746374399 group by o.user_id ) t where use_money>0
) c order by yue_money desc;
SELECT change_money,money,content,FROM_UNIXTIME(addtime) addtime FROM profit_money2 where user_id=23824 and addtime > 1746201600 and addtime < 1746374399 order by id asc;
SELECT * from order_list where user_id=24603 and send_num='FH_MONYDMP02025050810052102922' and choice_time<1746979200 ;
select c.* from (
select t.*,
(CASE
WHEN t.use_money>0 THEN (t.use_money-t.fh_money-t.bb_money-t.sy_money)
ELSE 0
END) yue_money
from (
SELECT o.user_id, u.uid, u.nickname, u.headimg, u.mobile,
u.money,
u.integral,
count(1) orderCount,
sum(IFNULL(order_zhe_total,0)) order_zhe_total,
IFNULL(sum(price),0) money_1,
IFNULL(sum(use_money),0) money_2,
IFNULL(sum(price)+SUM(use_money),0) use_money,
(select IFNULL(sum(goodslist_money),0) sc_money from order_list where user_id=o.user_id and status=2 and choice_time > 1746288000 and choice_time < 1746547199) fh_money,
(select IFNULL(sum(goodslist_money),0) sc_money from order_list where user_id=o.user_id and status=0 and addtime < 1746288000 ) bb_money,
(TRUNCATE(u.money2/100, 2)) money2,
(TRUNCATE(IFNULL((SELECT money FROM profit_money2 where user_id=o.user_id and addtime > 1746288000 and addtime < 1746547199 order by id desc LIMIT 1),0)/100, 2)) sy_money
FROM `order` o LEFT join `user` u ON o.user_id=u.id where u.status=1 and u.istest=0 and o.status=1 and o.addtime > 1746288000 and o.addtime < 1746547199 and o.user_id = 24426 group by o.user_id ) t where use_money>0
) c order by yue_money desc;
select * from order_list where user_id=24426 and status=0 and addtime < 1746288000 ;
select o.order_num,o.order_zhe_total from `order` o INNER join `user` u on o.user_id=u.id where o.status=1 and o.addtime>1746979200 and o.addtime<1747497599 and u.istest=0 and u.status=1;
select sum(goodslist_money) sc_money from order_list where addtime<1746374399 and user_id=21617 and status=2;
select sum(goodslist_money) sc_money from order_list where addtime<1746374399 and user_id=21617 and status=1;
# 按天订单数据统计
select DATE(FROM_UNIXTIME(o.addtime)) add_day,count(1) order_count,count(DISTINCT o.user_id) user_count,sum(price) price,sum(use_money) use_money,sum(use_integral) use_integral,sum(use_money2) use_money2 from `order` o LEFT join `user` u ON o.user_id=u.id where u.status=1 and u.istest=0 and o.status=1 group by DATE(FROM_UNIXTIME(o.addtime));
# 今日出货总额
SELECT IFNULL(sum(goodslist_money),0) FROM order_list oll LEFT join `user` us on oll.user_id=us.id where us.status=1 and us.istest=0 and oll.goodslist_type<3 and oll.addtime>UNIX_TIMESTAMP(CURDATE());
# 每日发货总金额
SELECT DATE(FROM_UNIXTIME(oll.choice_time)) choice_time,IFNULL(sum(goodslist_money),0) goodslist_money FROM order_list oll LEFT join `user` us on oll.user_id=us.id where us.status=1 and us.istest=0 and oll.status=2 and oll.goodslist_type<3 GROUP BY DATE(FROM_UNIXTIME(oll.choice_time));
# 每日兑换达达券
SELECT DATE(FROM_UNIXTIME(oll.choice_time)) choice_time,IFNULL(sum(goodslist_money),0) goodslist_money FROM order_list oll LEFT join `user` us on oll.user_id=us.id where us.status=1 and us.istest=0 and oll.status=1 and oll.goodslist_type<3 GROUP BY DATE(FROM_UNIXTIME(oll.choice_time));
# 今日盒柜剩余价值
SELECT IFNULL(sum(goodslist_money),0) FROM order_list oll LEFT join `user` us on oll.user_id=us.id where us.status=1 and us.istest=0 and oll.status=0 and oll.goodslist_type<3 and oll.addtime>UNIX_TIMESTAMP(CURDATE());;
-- 今日达达券货币发放
select IFNULL(sum(change_money),0) from profit_money2 m LEFT join `user` u on m.user_id=u.id where u.status=1 and u.istest=0 and m.change_money>0 and m.addtime>UNIX_TIMESTAMP(CURDATE());
-- 每日达达券货币消费 ·
select DATE(FROM_UNIXTIME(m.addtime)) addtime,IFNULL(sum(ABS(change_money)),0) change_money from profit_money2 m LEFT join `user` u on m.user_id=u.id where u.status=1 and u.istest=0 and m.change_money<0 GROUP BY DATE(FROM_UNIXTIME(m.addtime));
# 今日钻石发放
select DATE(FROM_UNIXTIME(m.addtime)) addtime,IFNULL(sum(change_money),0) from profit_money m LEFT join `user` u on m.user_id=u.id where u.status=1 and u.istest=0 and m.change_money>0 GROUP BY DATE(FROM_UNIXTIME(m.addtime));
# 今日钻石消费
select IFNULL(sum(ABS(change_money)),0) from profit_money m LEFT join `user` u on m.user_id=u.id where u.status=1 and u.istest=0 and m.change_money<0 and m.addtime>UNIX_TIMESTAMP(CURDATE());
# 今日UU币发放
select IFNULL(sum(change_money),0) from profit_integral m LEFT join `user` u on m.user_id=u.id where u.status=1 and u.istest=0 and m.change_money>0 and m.addtime>UNIX_TIMESTAMP(CURDATE());
# 今日UU币消费
select IFNULL(sum(ABS(change_money)),0) from profit_integral m LEFT join `user` u on m.user_id=u.id where u.status=1 and u.istest=0 and m.change_money<0 and m.addtime>UNIX_TIMESTAMP(CURDATE());

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,477 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>友达赏</title>
<link rel="stylesheet" href="animate.min.css" />
<style>
* {
margin: 0;
padding: 0;
}
.content-container {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
background-image: url("https://image.zfunbox.cn/static/web/static/common/slot_bg.webp");
background-size: cover;
background-position: center;
position: fixed;
top: 0;
left: 0;
z-index: 999;
}
.slot-icon {
padding-bottom: 25px;
}
.slot-view {
background-size: 100% 100%;
width: 100%;
padding-top: 40px;
padding-bottom: 40px;
display: flex;
justify-content: center;
align-items: center;
}
.slot-view-1 {
background: url("https://image.zfunbox.cn/static/image/lucky/di_5.png") no-repeat;
background-size: 100% 100%;
}
.slot-view-3 {
background: url("https://image.zfunbox.cn/static/image/lucky/di_3.png") no-repeat;
background-size: 100% 100%;
}
.slot-view-5 {
background: url("https://image.zfunbox.cn/static/image/lucky/di_5.png") no-repeat;
background-size: 100% 100%;
}
.item-lottry {
height: 152.78px;
width: 152.78px;
display: flex;
justify-content: center;
align-items: center;
font-size: 30rpx;
border-radius: 16rpx;
color: black;
box-sizing: border-box;
background-color: rgba(255, 255, 255, 1);
}
.slot-tips {
color: #484848;
font-size: 14px;
text-align: center;
padding: 10px;
}
.skip-animation {
color: #249073;
font-size: 18px;
text-align: center;
padding-bottom: 5px;
display: inline-block;
opacity: 0.7;
}
</style>
</head>
<body onload="pageLoad()">
<div class="content-container">
<div class="slot-icon animate__animated animate__fadeInDown">
<img src="https://image.zfunbox.cn/static/image/lucky/icon.png" style="height: 45px; width: 120px" />
</div>
<div id="slot-view" class="slot-view ">
<div id="my-lucky"></div>
</div>
<view class="slot-tips">
动画结果因设备差异可能会显示异常,获得赏品以(恭喜获得)结果为准</view>
<view class="skip-animation animate__animated animate__fadeIn" style="animation-duration: 2s;"
onClick="skipAnimation()">跳过动画</view>
</view>
</div>
<div style="display: none;">
<img src="https://image.zfunbox.cn/static/image/lucky/di_5.png" style="height: 0px; width: 0px" />
<img src="https://image.zfunbox.cn/static/image/lucky/di_3.png" style="height: 0px; width: 0px" />
<img src="https://image.zfunbox.cn/static/image/lucky/di_1.png" style="height: 0px; width: 0px" />
<div id="prize-list"></div>
</div>
<script type="text/javascript" src="uni.webview.1.5.1.js"></script>
<script src="./index.umd.js"></script>
<script>
function shuffle(array) {
for (let i = array.length - 1; i > 0; i--) {
// 生成一个 0 到 i 之间的随机整数
const j = Math.floor(Math.random() * (i + 1));
// 交换 array[i] 和 array[j]
[array[i], array[j]] = [array[j], array[i]];
}
return array;
}
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
function getImage(image) {
return image + "?imageMogr2/thumbnail/!75x75r";
}
const rowHeight = 80;
var myLucky = null;
var slotModel = 0;
var prize = null;
var lotteryResult = [];
var currentLotteryResult = null;
var stopSleep = 2500;
/**
* 添加奖品图片
* @param {*} _prize
*/
function addPrizeImage(_prize) {
prize = _prize;
let prizes = getDefaultPrizes();
//加载图片缓存
// document.getElementById('prize-list').innerHTML = "";
// for (let i = 0; i < prizes.length; i++) {
// //prize-list img
// let img = document.createElement('img');
// img.src = getImage(prizes[i].imgurl);
// img.style.width = '75px';
// img.style.height = '75px';
// document.getElementById('prize-list').appendChild(img);
// }
message_1("InitPrizeSuccess", "调用成功");
}
/**
* 添加抽奖次数
* @param {*} count
*/
async function addLotteryCount(count) {
if (myLucky) {
document.getElementById('my-lucky').innerHTML = '';
}
let slotColumns = 0;
if (count >= 6) {
slotColumns = 5;
} else {
slotColumns = count;
}
document.getElementById('slot-view').style.backgroundImage = 'url("https://image.zfunbox.cn/static/image/lucky/di_' + slotColumns + '.png")';
slotModel = count;
let prizeList = getDefaultPrizes();
let prizes = [];
for (let i = 0; i < prizeList.length; i++) {
prizes.push({
imgs: [{
src: getImage(prizeList[i].imgurl),
width: "75px",
height: "75px",
},],
background: "#ffffff",
data: prizeList[i], // 将原始数据保存到prize中方便后续使用
});
}
// 根据当前模式创建slots
let arr = Array.from({
length: prizeList.length
}, (_, i) => i);
let slots = [];
for (let i = 0; i < slotColumns; i++) {
slots.push({
order: shuffle([...arr]),
speed: 50
});
}
let height = rowHeight * slotColumns;
myLucky = new LuckyCanvas.SlotMachine('#my-lucky', {
width: '100vw',
height: height + 'px',
slots: slots,
prizes: prizes,
defaultConfig: {
mode: 'horizontal',
rowSpacing: '10px',
colSpacing: '10px'
},
end: async function (prize) {
console.log(prize);
console.log('抽奖结束');
message_1("luckyStop", "抽奖结束", null);
await sleep(1000);
// alert(currentLotteryResult.)length;
if (currentLotteryResult.length == 0) {
message_1("stopLottery", "抽奖结束", null);
}
if (currentLotteryResult.length > 0) {
// slotModel
startLottery(stopSleep);
}
}
});
myLucky.init();
message_1("addLotteryCountSuccess", "初始化结束", null);
}
/**
* 开始抽奖
*/
async function startLottery(data) {
myLucky.init();
await sleep(200);
console.log("datadatadatadata", data, data.stopSleep, data.stopSleep);
let _lotteryResult = data.lotteryResult;
let _stopSleep = data['stopSleep'];
if (_lotteryResult != null) {
lotteryResult = _lotteryResult;
currentLotteryResult = lotteryResult;
}
stopSleep = _stopSleep;
myLucky.play();
message_1("luckyPlay", "开始抽奖", null);
await sleep(stopSleep);
stopLottery();
}
/**
* 停止抽奖
*/
async function stopLottery() {
// if(lotteryResult)
let _current;
if (Array.isArray(currentLotteryResult)) {
if (currentLotteryResult.length > 5) {
_current = currentLotteryResult.splice(0, 5);
} else {
_current = currentLotteryResult.splice(0, currentLotteryResult.length);
}
} else {
_current = currentLotteryResult;
}
myLucky.stop(_current);
}
// 获取默认奖品列表
function getDefaultPrizes() {
if (prize && prize.length > 0) {
return prize;
}
return [{
id: 1128,
title: "兹琪露娜提亚斯",
imgurl: "https://image.zfunbox.cn/topic/20250515/2986e27e673ef675e02771cdebd9b822.jpg",
price: "350.00",
real_pro: "0.02000",
goods_type: 1,
doubling: 1,
is_lingzhu: 0,
},
{
id: 1129,
title: "月岗恋钟",
imgurl: "https://image.zfunbox.cn/topic/20250515/2c5ed2097716db6bef01da718bc3c091.jpg",
price: "132.00",
real_pro: "0.02000",
goods_type: 1,
doubling: 3,
is_lingzhu: 0,
},
{
id: 1130,
title: "BANDAI万代拼装模型 1/100 MG 机动战士高达 倒A 逆A-15岁以上",
imgurl: "https://image.zfunbox.cn/topic/20250515/e35da49b4976f156f2f98dec002274a5.png",
price: "305.00",
real_pro: "0.03000",
goods_type: 1,
doubling: 1,
is_lingzhu: 0,
},
{
id: 1131,
title: "BANDAI 万代拼装模型 MG 主天使-15岁以上",
imgurl: "https://image.zfunbox.cn/topic/20250515/77302c6f1ea9ea6a8516cc1208174aee.png",
price: "289.00",
real_pro: "0.03000",
goods_type: 1,
doubling: 1,
is_lingzhu: 0,
},
{
id: 1132,
title: "BANDAI万代 HG00 09 1/144 座天使高达一型-15岁以上",
imgurl: "https://image.zfunbox.cn/topic/20250515/55e816c93b5e4103a30682c586816b11.jpg",
price: "114.00",
real_pro: "0.50000",
goods_type: 1,
doubling: 3,
is_lingzhu: 0,
},
{
id: 1133,
title: "BANDAI万代拼装模型 HGUC 130 机动战士高达 杰斯塔-15岁以上",
imgurl: "https://image.zfunbox.cn/topic/20250515/aeb6bfb8b4aa8a29796b242e4f5d56d9.png",
price: "113.00",
real_pro: "1.50000",
goods_type: 1,
doubling: 1,
is_lingzhu: 0,
},
{
id: 1134,
title: "BANDAI万代拼装模型HG26 1/144 凯列班高达 异灵高达-15岁以上",
imgurl: "https://image.zfunbox.cn/topic/20250515/329e3a7e21772a63cea03d31f948345d.png",
price: "112.00",
real_pro: "1.00000",
goods_type: 1,
doubling: 2,
is_lingzhu: 0,
},
{
id: 1135,
title: "梦幻",
imgurl: "https://image.zfunbox.cn/topic/20250515/d2c7e48515d393084000595074209042.jpg",
price: "41.00",
real_pro: "2.50000",
goods_type: 1,
doubling: 2,
is_lingzhu: 0,
},
{
id: 1136,
title: "谜拟丘",
imgurl: "https://image.zfunbox.cn/topic/20250515/6031827bc455cbf86ff778d74ddffbd3.jpg",
price: "38.00",
real_pro: "1.50000",
goods_type: 1,
doubling: 1,
is_lingzhu: 0,
},
{
id: 1137,
title: "小提琴模型1个",
imgurl: "https://image.zfunbox.cn/topic/20250515/22846dea5a933ab314998afc51abb7bb.jpg",
price: "13.80",
real_pro: "92.90000",
goods_type: 1,
doubling: 1,
is_lingzhu: 0,
},
];
}
document.addEventListener('UniAppJSBridgeReady', function () {
uni.getEnv(function (res) {
if (res.plus) {
console.log('当前环境为【5+App】');
} else if (res.miniprogram) {
console.log('当前环境为【微信小程序】');
}
});
window.isAppReady = true; // 标记 App 环境已准备好
message_1('load', '初始化成功', null);
console.log('UniAppJSBridgeReady 已触发,可以与 App 通信');
});
function message_1(action, msg, data) {
if (window.isAppReady) {
uni.postMessage({
data: {
action: action,
data: data,
msg: msg
}
});
}
}
function skipAnimation() {
console.log('跳过动画');
message_1("stopLottery", "跳过动画", null);
console.log('执行结束');
}
function OnMessage(action, data) {
console.log('触发触发触发触发触发触发触发触发触发', action);
// console.log(data);
// alert('aaa');
if (action == 'addPrizeImage') {
// alert('aaa');
if (data != null && data != "") {
let _prize = JSON.parse(data);
addPrizeImage(_prize);
}
}
if (action == 'addLotteryCount') {
let _count = parseInt(data);
addLotteryCount(_count);
}
if (action == 'startLottery') {
console.log("startLottery", data);
let _data = JSON.parse(data);
startLottery(_data);
}
}
function parseQueryString(urlOrQueryString) {
// 如果传入的是完整URL如 "/path?name=value"),提取查询部分
let queryString = urlOrQueryString;
const questionMarkIndex = queryString.indexOf('?');
if (questionMarkIndex !== -1) {
queryString = queryString.slice(questionMarkIndex + 1);
}
const params = {};
if (!queryString) return params; // 如果没有查询参数,返回空对象
const pairs = queryString.split('&');
for (const pair of pairs) {
const [key, value] = pair.split('=');
// 解码 URI 组件,并处理无值情况(如 "key" 而不是 "key=value"
params[key] = value ? decodeURIComponent(value) : '';
}
return params;
}
function pageLoad() {
let o = parseQueryString(window.location.search);
if (o.c != null) {
let slotColumns = 0;
if (o.c >= 6) {
slotColumns = 5;
} else {
slotColumns = o.c;
}
document.getElementById('slot-view').style.backgroundImage = 'url("https://image.zfunbox.cn/static/image/lucky/di_' + slotColumns + '.png")';
let height = rowHeight * slotColumns + 80;
document.getElementById('slot-view').style.minHeight = height + 'px';
}
}
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):e.uni=i()}(this,function(){"use strict";var e={},o=[],s=/uni-app/i.test(navigator.userAgent),d="__uniapp__service",w="WEB_INVOKE_APPSERVICE",i=function(e,i){if(0===o.length&&s){var n=plus.webview.currentWebview();if(!n)throw new Error("plus.webview.currentWebview() is undefined");var t=n.parent();if(!t)throw new Error("plus.webview.currentWebview().parent() is undefined");o.push(t.id)}var a={options:{timestamp:+new Date},name:e,arg:i};if(s){var r=JSON.stringify(a);plus.webview.getWebviewById(d)?plus.webview.postMessageToUniNView({type:w,args:{data:a,webviewIds:o}},d):plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'+w+'",'+r+","+JSON.stringify(o)+");")}else window.parent.postMessage({type:w,data:a,pageId:""},"*")};e.navigateTo=function(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).url;i("navigateTo",{url:encodeURI(e)})},e.navigateBack=function(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).delta;i("navigateBack",{delta:parseInt(e)||1})},e.switchTab=function(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).url;i("switchTab",{url:encodeURI(e)})},e.reLaunch=function(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).url;i("reLaunch",{url:encodeURI(e)})},e.redirectTo=function(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).url;i("redirectTo",{url:encodeURI(e)})},e.getEnv=function(e){e(s?{plus:!0}:{h5:!0})},e.postMessage=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};i("postMessage",e.data||{})};var n={};"undefined"!=typeof wx&&wx.miniProgram&&(n.navigateTo=wx.miniProgram.navigateTo,n.navigateBack=wx.miniProgram.navigateBack,n.switchTab=wx.miniProgram.switchTab,n.reLaunch=wx.miniProgram.reLaunch,n.redirectTo=wx.miniProgram.redirectTo,n.postMessage=wx.miniProgram.postMessage,n.getEnv=wx.miniProgram.getEnv);var t={};-1<navigator.userAgent.indexOf("AlipayClient")&&"undefined"!=typeof my&&(t.navigateTo=my.navigateTo,t.navigateBack=my.navigateBack,t.switchTab=my.switchTab,t.reLaunch=my.reLaunch,t.redirectTo=my.redirectTo,t.postMessage=my.postMessage,t.getEnv=my.getEnv);var a={};"undefined"!=typeof swan&&swan.webView&&(a.navigateTo=swan.webView.navigateTo,a.navigateBack=swan.webView.navigateBack,a.switchTab=swan.webView.switchTab,a.reLaunch=swan.webView.reLaunch,a.redirectTo=swan.webView.redirectTo,a.postMessage=swan.webView.postMessage,a.getEnv=swan.webView.getEnv);var r={};"undefined"!=typeof tt&&tt.miniProgram&&(r.navigateTo=tt.miniProgram.navigateTo,r.redirectTo=tt.miniProgram.redirectTo,r.reLaunch=tt.miniProgram.reLaunch,r.switchTab=tt.miniProgram.switchTab,r.navigateBack=tt.miniProgram.navigateBack);var g=navigator.userAgent,c=/uni-app/i.test(g),v=/micromessenger/i.test(g),u=/AlipayClient/.test(g),p=/swan/i.test(g),m=/toutiaomicroapp/i.test(g),l={},b=function(){window.UniAppJSBridge=!0,document.dispatchEvent(new CustomEvent("UniAppJSBridgeReady",{bubbles:!0,cancelable:!0}))};return c?(l=e,window.plus&&/complete|loaded|interactive/.test(document.readyState)?b():document.addEventListener("plusready",b)):v?(l=n,window.WeixinJSBridge&&WeixinJSBridge.invoke?b():document.addEventListener("WeixinJSBridgeReady",b)):(l=u?t:p?a:m?r:e,document.addEventListener("DOMContentLoaded",b)),l});