This commit is contained in:
qf
2022-09-08 18:22:18 +08:00
commit 3cf89feaa0
2375 changed files with 193430 additions and 0 deletions

187
.gitignore vendored Normal file
View File

@@ -0,0 +1,187 @@
mengsheng-module/mengsheng-business/mengsheng-business-service/target/
mengsheng-module/mengsheng-business/mengsheng-business-api/target/
mengsheng-common/target/
.idea/
mengsheng-oauth2/target/
mengsheng-scheduler/target/
*.iml
mengsheng-module/mengsheng-user/mengsheng-user-service/target/
mengsheng-module/mengsheng-sms/mengsheng-sms-service/target/
mengsheng-module/mengsheng-sms/mengsheng-sms-api/target/
mengsheng-module/mengsheng-user/mengsheng-user-api/target/
mengsheng-module/mengsheng-payment/mengsheng-payment-service/target/
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
node_modules
dist/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
Pods/
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Build
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode
iOSInjectionProject/
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.war
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
# Built application files
*.apk
*.ap_
# Files for the ART/Dalvik VM
*.dex
# Java class files
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# Intellij
*.iml
*.DS_Store
.classpath
*/target/
log.dir_IS_UNDEFINED/
log.dir_IS_UNDEFINED/*
**/.idea/*
run.sh
out/*
/out
*.ipr
*.iws
.metadata/
.recommenders/
*.springBeans
*.mvn/*
/.mvn
mvnw
mvnw.cmd
*.map
.idea/
# Keystore files
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
iOS/Podfile.lock
iOS/XChat.xcworkspace/contents.xcworkspacedata
xchat-web/src/main/resources/application-context-web-local.xml
#xchat-service/src/main/resources/generatorConfig.xml
#/xchat-service/src/main/resources/generatorConfig.xml
#use eclipse will create this fileignore it
.project
.settings/
Servers/
mengsheng-module/mengsheng-base/mengsheng-base-api/target/
mengsheng-module/mengsheng-base/mengsheng-base-service/target/
mengsheng-admin/target/
.vscode/*

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 940 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -0,0 +1,251 @@
<!DOCTYPE html>
<html lang="en" id="page-root">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>情定七夕</title>
<link rel="stylesheet" href="../../common/css/reset.css">
<link rel="stylesheet" href="./css/index.css?v=1.0">
</head>
<body>
<!-- 顶部返回 -->
<div class="back"><img src="./images/travel/back.png" alt=""></div>
<!-- 头部 -->
<div class="header">
<img src="./images/rule_icon.png" alt="" class="rule_icon">
</div>
<!-- 限时礼物 -->
<div class="giftBg"></div>
<!-- tab切换 -->
<div class="tabBox">
<div class="active">为爱发电</div>
<div>鹊桥情书</div>
<div>七夕热恋榜</div>
</div>
<!-- 为爱发电 -->
<div class="tab1">
<!-- 同心锁 -->
<div class="txs">
<div class="giftName"></div>
<div class="line">
<div></div>
<span>电池:<b></b></span>
<p><b></b></p>
</div>
<div class="leftBut_tab1"></div>
<div class="rightBut_tab1"></div>
<img src="./images/logo.png" class="logosssss" alt="">
<div class="butsss">
<img class="css" src="./images/cdBut3.png" alt="">
</div>
<div class="but11">
<div class="butLeft"></div>
<div class="butRight"></div>
</div>
<div class="svga">
<div class="svga_in svgas"></div>
</div>
</div>
<!-- <div class="butaaa"></div> -->
<!-- 每日任务 -->
<div class="toak">
<div class="div1">
<span>
<p>进入任意房间(<b>0 / 3</b></p>
<strong>奖励:爱心电池*1</strong>
</span>
<span class="but"></span>
</div>
<div class="div2">
<span>
<p>赠送任意礼物</p>
<strong>奖励:爱心电池*1</strong>
</span>
<span class="but"></span>
</div>
<div class="div3">
<span>
<p>停留房间30分钟</p>
<strong>奖励:爱心电池*1</strong>
</span>
<span class="but"></span>
</div>
<div class="div4">
<span>
<p>送出【一箭倾心】1个</p>
<strong>奖励:爱心电池*1</strong>
</span>
<span class="but"></span>
</div>
<div class="div5">
<span>
<p>送出【烟火爱恋】1个</p>
<strong>奖励:爱心电池*8</strong>
</span>
<span class="but"></span>
</div>
<div class="div6">
<span>
<p>送出【情浓七夕】1个</p>
<strong>奖励:爱心电池*33</strong>
</span>
<span class="but"></span>
</div>
<div class="div7">
<span>
<p>送出【花下之约】1个</p>
<strong>奖励:爱心电池*55</strong>
</span>
<span class="but"></span>
</div>
</div>
</div>
<!-- 鹊桥情书 -->
<div class="tab2" style="display: block;">
<div class="queqiao barrage">
<img src="./images/myqs.png" alt="" class="myqs">
<div class="barrage_text" id="my_container"></div>
</div>
<div class="xw">
<div class="d1" id="1"></div>
<div class="d2" id="2"></div>
<div class="d3" id="3"></div>
<div class="d4" id="4"></div>
</div>
</div>
<!-- 榜单 -->
<div class="tab3" style="display: none;">
<div class="listBox">
<div class="tab">
<div class="active1 active">日榜</div>
<div>总榜</div>
</div>
<img src="./images/listRule_icon.png" alt="" class="listRule_icon">
<div class="div1">
<img src="./images/logo.png" alt="" class="imgl">
<img src="./images/logo.png" alt="" class="imgr">
<p>名. <b>&</b> 名字</p>
<b class="b">290W 亲密值</b>
</div>
<div class="div2">
<img src="./images/logo.png" alt="" class="imgl">
<img src="./images/logo.png" alt="" class="imgr">
<img src="./images/love.png" alt="" class="love">
<p>名嗷嗷 <b>&</b> 名字按时</p>
<b class="b">290W 亲密值</b>
</div>
<div class="div3">
<img src="./images/logo.png" alt="" class="imgl">
<img src="./images/logo.png" alt="" class="imgr">
<img src="./images/love.png" alt="" class="love">
<p><b>&</b> 名字按时</p>
<b class="b">290W 亲密值</b>
</div>
<ul>
<li>
<div class="num">4</div>
<img src="./images/logo.png" alt="" class="imgl">
<img src="./images/logo.png" alt="" class="imgr">
<p class="name">迪特 <b>& </b>低价奥特</p>
<b class="right">12313亲密值</b>
</li>
</ul>
</div>
<!-- 自己榜单 myList_active-->
<div class="myList ">
<img src="./images/more.png" alt="" class="more">
<ul>
<li>
<img src="./images/logo.png" alt="" class="left">
<img src="./images/logo.png" alt="" class="right">
<img src="./images/love.png" alt="" class="love">
<p class="name">用户昵称... <b>& </b>用户昵称...</p>
<div class="rightBox">
<p>6666123亲密度</p>
<span>当前排名123名</span>
</div>
</li>
<!-- <li class="active">当前暂未有组合哦~ 快去找你的组合吧!</li> -->
</ul>
</div>
</div>
<!-- 规则弹窗 -->
<div class="rule">
<div class="rule_in">
<img src="./images/close.png" alt="">
</div>
</div>
<!-- 未发送过情书弹窗 -->
<div class="qx_put">
<div class="qx_put_in">
<div class="update"></div>
<div class="li1 li"></div>
<div class="li2 li"></div>
<div class="li3 li"></div>
<input placeholder="请输入你的告白语~" type="text" maxlength="20">
<div class="num"><b>0</b>/20</div>
<div class="clos"></div>
<div class="ok"></div>
</div>
</div>
<!-- 已发送情书 -->
<div class="qx_put_out">
<div class="qx_put_outin">
<img src="./images/close.png" alt="">
<p class="p1">您在8月8日已发送了情书</p>
<p class="p2">和你在一起,总会令我忘记时间存在 </p>
</div>
</div>
<!-- 领取奖励弹窗 -->
<div class="pubBG">
<div class="pubBG_in">
<img src="./images/close.png" alt="" class="close">
<p class="giftName">恭喜获得</p>
<img src="./images/logo.png" alt="" class="giftImg">
<div class="nick2">告白气球</div>
<div class="num">1天</div>
</div>
</div>
<!-- 查看奖励弹窗 -->
<div class="notPubBG">
<div class="pubBG_in">
<img src="./images/close.png" alt="" class="close">
<p class="giftName">迪迦礼物</p>
<img src="./images/logo.png" alt="" class="giftImg">
<div class="nick2">告白气球</div>
<div class="num">1天</div>
<img src="./images/get.png" alt="" class="getGifts">
<img src="./images/notGet.png" alt="" class="notGetGifts">
</div>
</div>
<!-- 榜单奖励 -->
<div class="listRule">
<div class="listRule_in">
<img src="./images/close.png" alt="" class="close">
<div class="box"><img src="./images/listRuleBg.png" alt="" class="listRuleBg"></div>
</div>
</div>
</body>
<script src="./js/danmaku.js"></script>
<script src="../../common/js/flexible.js"></script>
<script src="../../common/js/jquery-3.2.1.min.js"></script>
<script src="../../common/js/common2.js"></script>
<script src="../../common/js/layer.js"></script>
<script src="../../common/js/vconsole.min.js"></script>
<script src="../../common/js/route-constant.js"></script>
<script src="../../common/js/svga.min.js"></script>
<script src="./js/index.js?v=3.5"></script>
<script>
</script>
</html>

View File

@@ -0,0 +1,697 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Danmaku = factory());
}(this, (function () { 'use strict';
var transform = (function() {
var properties = [
'oTransform', // Opera 11.5
'msTransform', // IE 9
'mozTransform',
'webkitTransform',
'transform'
];
var style = document.createElement('div').style;
for (var i = 0; i < properties.length; i++) {
/* istanbul ignore else */
if (properties[i] in style) {
return properties[i];
}
}
/* istanbul ignore next */
return 'transform';
}());
function createCommentNode(cmt) {
var node = document.createElement('div');
node.style.cssText = 'position:absolute;';
if (typeof cmt.render === 'function') {
var $el = cmt.render();
if ($el instanceof HTMLElement) {
node.appendChild($el);
return node;
}
}
node.textContent = cmt.text;
if (cmt.style) {
for (var key in cmt.style) {
node.style[key] = cmt.style[key];
}
}
return node;
}
function init() {
var stage = document.createElement('div');
stage.style.cssText = 'overflow:hidden;white-space:nowrap;transform:translateZ(0);';
return stage;
}
function clear(stage) {
var lc = stage.lastChild;
while (lc) {
stage.removeChild(lc);
lc = stage.lastChild;
}
}
function resize(stage) {
stage.style.width = stage.width + 'px';
stage.style.height = stage.height + 'px';
}
function framing() {
//
}
function setup(stage, comments) {
var df = document.createDocumentFragment();
var i = 0;
var cmt = null;
for (i = 0; i < comments.length; i++) {
cmt = comments[i];
cmt.node = cmt.node || createCommentNode(cmt);
df.appendChild(cmt.node);
}
if (comments.length) {
stage.appendChild(df);
}
for (i = 0; i < comments.length; i++) {
cmt = comments[i];
cmt.width = cmt.width || cmt.node.offsetWidth;
cmt.height = cmt.height || cmt.node.offsetHeight;
}
}
function render(stage, cmt) {
cmt.node.style[transform] = 'translate(' + cmt.x + 'px,' + cmt.y + 'px)';
}
/* eslint no-invalid-this: 0 */
function remove(stage, cmt) {
stage.removeChild(cmt.node);
/* istanbul ignore else */
if (!this.media) {
cmt.node = null;
}
}
var domEngine = {
name: 'dom',
init: init,
clear: clear,
resize: resize,
framing: framing,
setup: setup,
render: render,
remove: remove,
};
var canvasHeightCache = Object.create(null);
function canvasHeight(font, fontSize) {
if (canvasHeightCache[font]) {
return canvasHeightCache[font];
}
var height = 12;
var regex = /(\d+(?:\.\d+)?)(px|%|em|rem)(?:\s*\/\s*(\d+(?:\.\d+)?)(px|%|em|rem)?)?/;
var p = font.match(regex);
if (p) {
var fs = p[1] * 1 || 10;
var fsu = p[2];
var lh = p[3] * 1 || 1.2;
var lhu = p[4];
if (fsu === '%') fs *= fontSize.container / 100;
if (fsu === 'em') fs *= fontSize.container;
if (fsu === 'rem') fs *= fontSize.root;
if (lhu === 'px') height = lh;
if (lhu === '%') height = fs * lh / 100;
if (lhu === 'em') height = fs * lh;
if (lhu === 'rem') height = fontSize.root * lh;
if (lhu === undefined) height = fs * lh;
}
canvasHeightCache[font] = height;
return height;
}
function createCommentCanvas(cmt, fontSize) {
if (typeof cmt.render === 'function') {
var cvs = cmt.render();
if (cvs instanceof HTMLCanvasElement) {
cmt.width = cvs.width;
cmt.height = cvs.height;
return cvs;
}
}
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
var style = cmt.style || {};
style.font = style.font || '10px sans-serif';
style.textBaseline = style.textBaseline || 'bottom';
var strokeWidth = style.lineWidth * 1;
strokeWidth = (strokeWidth > 0 && strokeWidth !== Infinity)
? Math.ceil(strokeWidth)
: !!style.strokeStyle * 1;
ctx.font = style.font;
cmt.width = cmt.width ||
Math.max(1, Math.ceil(ctx.measureText(cmt.text).width) + strokeWidth * 2);
cmt.height = cmt.height ||
Math.ceil(canvasHeight(style.font, fontSize)) + strokeWidth * 2;
canvas.width = cmt.width;
canvas.height = cmt.height;
for (var key in style) {
ctx[key] = style[key];
}
var baseline = 0;
switch (style.textBaseline) {
case 'top':
case 'hanging':
baseline = strokeWidth;
break;
case 'middle':
baseline = cmt.height >> 1;
break;
default:
baseline = cmt.height - strokeWidth;
}
if (style.strokeStyle) {
ctx.strokeText(cmt.text, strokeWidth, baseline);
}
ctx.fillText(cmt.text, strokeWidth, baseline);
return canvas;
}
function computeFontSize(el) {
return window
.getComputedStyle(el, null)
.getPropertyValue('font-size')
.match(/(.+)px/)[1] * 1;
}
function init$1(container) {
var stage = document.createElement('canvas');
stage.context = stage.getContext('2d');
stage._fontSize = {
root: computeFontSize(document.getElementsByTagName('html')[0]),
container: computeFontSize(container)
};
return stage;
}
function clear$1(stage, comments) {
stage.context.clearRect(0, 0, stage.width, stage.height);
// avoid caching canvas to reduce memory usage
for (var i = 0; i < comments.length; i++) {
comments[i].canvas = null;
}
}
function resize$1() {
//
}
function framing$1(stage) {
stage.context.clearRect(0, 0, stage.width, stage.height);
}
function setup$1(stage, comments) {
for (var i = 0; i < comments.length; i++) {
var cmt = comments[i];
cmt.canvas = createCommentCanvas(cmt, stage._fontSize);
}
}
function render$1(stage, cmt) {
stage.context.drawImage(cmt.canvas, cmt.x, cmt.y);
}
function remove$1(stage, cmt) {
// avoid caching canvas to reduce memory usage
cmt.canvas = null;
}
var canvasEngine = {
name: 'canvas',
init: init$1,
clear: clear$1,
resize: resize$1,
framing: framing$1,
setup: setup$1,
render: render$1,
remove: remove$1,
};
/* eslint no-invalid-this: 0 */
function allocate(cmt) {
var that = this;
var ct = this.media ? this.media.currentTime : Date.now() / 1000;
var pbr = this.media ? this.media.playbackRate : 1;
function willCollide(cr, cmt) {
if (cmt.mode === 'top' || cmt.mode === 'bottom') {
return ct - cr.time < that._.duration;
}
var crTotalWidth = that._.stage.width + cr.width;
var crElapsed = crTotalWidth * (ct - cr.time) * pbr / that._.duration;
if (cr.width > crElapsed) {
return true;
}
// (rtl mode) the right end of `cr` move out of left side of stage
var crLeftTime = that._.duration + cr.time - ct;
var cmtTotalWidth = that._.stage.width + cmt.width;
var cmtTime = that.media ? cmt.time : cmt._utc;
var cmtElapsed = cmtTotalWidth * (ct - cmtTime) * pbr / that._.duration;
var cmtArrival = that._.stage.width - cmtElapsed;
// (rtl mode) the left end of `cmt` reach the left side of stage
var cmtArrivalTime = that._.duration * cmtArrival / (that._.stage.width + cmt.width);
return crLeftTime > cmtArrivalTime;
}
var crs = this._.space[cmt.mode];
var last = 0;
var curr = 0;
// START------added by zoe
// 耦合了業務代碼,不要使用!!!!!!!!!!
let find = false;
for (var i = 1; i < crs.length && i <= 5; i++) {
var cr = crs[i];
var crTotalWidth = that._.stage.width + cr.width;
if (ct - cr.time > that._.duration) {
find = true;
last = i - 1;
curr = i;
break;
}
}
if (!find) {
for (var i = 1; i < crs.length; i++) {
var cr = crs[i];
var requiredRange = cmt.height;
if (cmt.mode === 'top' || cmt.mode === 'bottom') {
requiredRange += cr.height;
}
if (cr.range - cr.height - crs[last].range >= requiredRange) {
curr = i;
break;
}
if ((i <= 5 && crs.length <= 6) || willCollide(cr, cmt)) {
last = i;
}
}
}
// 耦合了業務代碼,不要使用!!!!!!!!!!
// END------added by zoe
var channel = crs[last].range;
var crObj = {
range: channel + cmt.height,
time: this.media ? cmt.time : cmt._utc,
width: cmt.width,
height: cmt.height
};
crs.splice(last + 1, curr - last - 1, crObj);
if (cmt.mode === 'bottom') {
return this._.stage.height - cmt.height - channel % this._.stage.height;
}
var cssFontSize = window.getComputedStyle(document.getElementById('page-root')).fontSize;
cssFontSize = cssFontSize.replace('px', '');
return channel % (this._.stage.height - cmt.height) + last % 6 * 10 / 37.5 * Number(cssFontSize);
}
/* eslint no-invalid-this: 0 */
function createEngine(framing, setup, render, remove) {
return function() {
framing(this._.stage);
var dn = Date.now() / 1000;
var ct = this.media ? this.media.currentTime : dn;
var pbr = this.media ? this.media.playbackRate : 1;
var cmt = null;
var cmtt = 0;
var i = 0;
for (i = this._.runningList.length - 1; i >= 0; i--) {
cmt = this._.runningList[i];
cmtt = this.media ? cmt.time : cmt._utc;
if (ct - cmtt > this._.duration) {
remove(this._.stage, cmt);
this._.runningList.splice(i, 1);
}
}
var pendingList = [];
while (this._.position < this.comments.length) {
cmt = this.comments[this._.position];
cmtt = this.media ? cmt.time : cmt._utc;
if (cmtt >= ct) {
break;
}
// when clicking controls to seek, media.currentTime may changed before
// `pause` event is fired, so here skips comments out of duration,
// see https://github.com/weizhenye/Danmaku/pull/30 for details.
if (ct - cmtt > this._.duration) {
++this._.position;
continue;
}
if (this.media) {
cmt._utc = dn - (this.media.currentTime - cmt.time);
}
pendingList.push(cmt);
++this._.position;
}
setup(this._.stage, pendingList);
for (i = 0; i < pendingList.length; i++) {
cmt = pendingList[i];
cmt.y = allocate.call(this, cmt);
if (cmt.mode === 'top' || cmt.mode === 'bottom') {
cmt.x = (this._.stage.width - cmt.width) >> 1;
}
this._.runningList.push(cmt);
}
for (i = 0; i < this._.runningList.length; i++) {
cmt = this._.runningList[i];
var totalWidth = this._.stage.width + cmt.width;
var elapsed = totalWidth * (dn - cmt._utc) * pbr / this._.duration;
if (cmt.mode === 'ltr') cmt.x = (elapsed - cmt.width + .5) | 0;
if (cmt.mode === 'rtl') cmt.x = (this._.stage.width - elapsed + .5) | 0;
render(this._.stage, cmt);
}
};
}
var raf =
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
function(cb) {
return setTimeout(cb, 50 / 3);
};
var caf =
window.cancelAnimationFrame ||
window.mozCancelAnimationFrame ||
window.webkitCancelAnimationFrame ||
clearTimeout;
function binsearch(arr, prop, key) {
var mid = 0;
var left = 0;
var right = arr.length;
while (left < right - 1) {
mid = (left + right) >> 1;
if (key >= arr[mid][prop]) {
left = mid;
} else {
right = mid;
}
}
if (arr[left] && key < arr[left][prop]) {
return left;
}
return right;
}
function formatMode(mode) {
if (!/^(ltr|top|bottom)$/i.test(mode)) {
return 'rtl';
}
return mode.toLowerCase();
}
function collidableRange() {
var max = 9007199254740991;
return [
{ range: 0, time: -max, width: max, height: 0 },
{ range: max, time: max, width: 0, height: 0 }
];
}
function resetSpace(space) {
space.ltr = collidableRange();
space.rtl = collidableRange();
space.top = collidableRange();
space.bottom = collidableRange();
}
/* eslint no-invalid-this: 0 */
function play() {
if (!this._.visible || !this._.paused) {
return this;
}
this._.paused = false;
if (this.media) {
for (var i = 0; i < this._.runningList.length; i++) {
var cmt = this._.runningList[i];
cmt._utc = Date.now() / 1000 - (this.media.currentTime - cmt.time);
}
}
var that = this;
var engine = createEngine(
this._.engine.framing.bind(this),
this._.engine.setup.bind(this),
this._.engine.render.bind(this),
this._.engine.remove.bind(this)
);
function frame() {
engine.call(that);
that._.requestID = raf(frame);
}
this._.requestID = raf(frame);
return this;
}
/* eslint no-invalid-this: 0 */
function pause() {
if (!this._.visible || this._.paused) {
return this;
}
this._.paused = true;
caf(this._.requestID);
this._.requestID = 0;
return this;
}
/* eslint no-invalid-this: 0 */
function seek() {
if (!this.media) {
return this;
}
this.clear();
resetSpace(this._.space);
var position = binsearch(this.comments, 'time', this.media.currentTime);
this._.position = Math.max(0, position - 1);
return this;
}
/* eslint no-invalid-this: 0 */
function bindEvents(_) {
_.play = play.bind(this);
_.pause = pause.bind(this);
_.seeking = seek.bind(this);
this.media.addEventListener('play', _.play);
this.media.addEventListener('pause', _.pause);
this.media.addEventListener('seeking', _.seeking);
}
/* eslint no-invalid-this: 0 */
function unbindEvents(_) {
this.media.removeEventListener('play', _.play);
this.media.removeEventListener('pause', _.pause);
this.media.removeEventListener('seeking', _.seeking);
_.play = null;
_.pause = null;
_.seeking = null;
}
/* eslint-disable no-invalid-this */
function init$2(opt) {
this._ = {};
this.container = opt.container || document.createElement('div');
this.media = opt.media;
this._.visible = true;
/* istanbul ignore else */
{
this.engine = (opt.engine || 'DOM').toLowerCase();
this._.engine = this.engine === 'canvas' ? canvasEngine : domEngine;
}
/* eslint-enable no-undef */
this._.requestID = 0;
this._.speed = Math.max(0, opt.speed) || 144;
this._.duration = 4;
this.comments = opt.comments || [];
this.comments.sort(function(a, b) {
return a.time - b.time;
});
for (var i = 0; i < this.comments.length; i++) {
this.comments[i].mode = formatMode(this.comments[i].mode);
}
this._.runningList = [];
this._.position = 0;
this._.paused = true;
if (this.media) {
this._.listener = {};
bindEvents.call(this, this._.listener);
}
this._.stage = this._.engine.init(this.container);
this._.stage.style.cssText += 'position:relative;pointer-events:none;';
this.resize();
this.container.appendChild(this._.stage);
this._.space = {};
resetSpace(this._.space);
if (!this.media || !this.media.paused) {
seek.call(this);
play.call(this);
}
return this;
}
/* eslint-disable no-invalid-this */
function destroy() {
if (!this.container) {
return this;
}
pause.call(this);
this.clear();
this.container.removeChild(this._.stage);
if (this.media) {
unbindEvents.call(this, this._.listener);
}
for (var key in this) {
/* istanbul ignore else */
if (Object.prototype.hasOwnProperty.call(this, key)) {
this[key] = null;
}
}
return this;
}
var properties = ['mode', 'time', 'text', 'render', 'style'];
/* eslint-disable no-invalid-this */
function emit(obj) {
if (!obj || Object.prototype.toString.call(obj) !== '[object Object]') {
return this;
}
var cmt = {};
for (var i = 0; i < properties.length; i++) {
if (obj[properties[i]] !== undefined) {
cmt[properties[i]] = obj[properties[i]];
}
}
cmt.text = (cmt.text || '').toString();
cmt.mode = formatMode(cmt.mode);
cmt._utc = Date.now() / 1000;
if (this.media) {
var position = 0;
if (cmt.time === undefined) {
cmt.time = this.media.currentTime;
position = this._.position;
} else {
position = binsearch(this.comments, 'time', cmt.time);
if (position < this._.position) {
this._.position += 1;
}
}
this.comments.splice(position, 0, cmt);
} else {
this.comments.push(cmt);
}
return this;
}
/* eslint-disable no-invalid-this */
function show() {
if (this._.visible) {
return this;
}
this._.visible = true;
if (this.media && this.media.paused) {
return this;
}
seek.call(this);
play.call(this);
return this;
}
/* eslint-disable no-invalid-this */
function hide() {
if (!this._.visible) {
return this;
}
pause.call(this);
this.clear();
this._.visible = false;
return this;
}
/* eslint-disable no-invalid-this */
function clear$2() {
this._.engine.clear(this._.stage, this._.runningList);
this._.runningList = [];
return this;
}
/* eslint-disable no-invalid-this */
function resize$2() {
this._.stage.width = this.container.offsetWidth;
this._.stage.height = this.container.offsetHeight;
this._.engine.resize(this._.stage);
this._.duration = this._.stage.width / this._.speed;
return this;
}
var speed = {
get: function() {
return this._.speed;
},
set: function(s) {
if (typeof s !== 'number' ||
isNaN(s) ||
!isFinite(s) ||
s <= 0) {
return this._.speed;
}
this._.speed = s;
if (this._.stage.width) {
this._.duration = this._.stage.width / s;
}
return s;
}
};
function Danmaku(opt) {
opt && init$2.call(this, opt);
}
Danmaku.prototype.destroy = function() {
return destroy.call(this);
};
Danmaku.prototype.emit = function(cmt) {
return emit.call(this, cmt);
};
Danmaku.prototype.show = function() {
return show.call(this);
};
Danmaku.prototype.hide = function() {
return hide.call(this);
};
Danmaku.prototype.clear = function() {
return clear$2.call(this);
};
Danmaku.prototype.resize = function() {
return resize$2.call(this);
};
Object.defineProperty(Danmaku.prototype, 'speed', speed);
return Danmaku;
})));

View File

@@ -0,0 +1,856 @@
let urlPrefix = getUrlPrefix()
let browser = checkVersion()
let env = EnvCheck();
if (env == 'test') {
new VConsole();
}
// 封装layer消息提醒框
let layerIndex
const showLoading = (content = '加载中...') => {
layer.open({
type: 2,
shadeClose: false,
content,
success (e) {
layerIndex = $(e).attr('index')
}
})
}
const hideLoading = (index) => {
layer.close(index)
}
const toastMsg = (content = '操作完成', time = 2) => {
layer.open({
content,
time,
skin: 'msg'
})
}
var myRankings;
let damuPool = []
let danmu = []
let timer2
// 初始化
let danmaku
const initDanmu = () => {
danmaku = new Danmaku({
container: document.getElementById('my_container'),
speed: 50,
})
}
const setDanmuData = () => {
// damuPool = [
// { sendAvatar: './images/logo.png', sendNick: `1asdasdasdasdasdasdasdasdasd`, text: '我把思念写着天空asdasdasdasdasdasdasdasdasdasd', },
// { sendAvatar: './images/logo.png', sendNick: `2`, text: '我想永远陪着你', },
// { sendAvatar: './images/logo.png', sendNick: `3`, text: '我爱你我爱你甜蜜蜜', },
// { sendAvatar: './images/logo.png', sendNick: `4`, text: 'asdawdasdasdas', },
// ]
if (!timer2) {
if (damuPool.length < 5) {
timer2 = setInterval(() => {
if (!danmu.length) {
danmu = [...damuPool]
}
let danmushoot = danmu.shift();
if (danmushoot) {
renderDM(danmushoot);
}
}, 2000);
} else {
timer2 = setInterval(() => {
if (!danmu.length) {
danmu = [...damuPool]
}
let danmushoot = danmu.shift();
if (danmushoot) {
renderDM(danmushoot);
}
}, 1000);
}
}
}
const renderDM = (item) => {
danmaku.emit({
// text: item.text,
render: function () {
var $div = document.createElement('div');
var $img = document.createElement('img');
var $span = document.createElement('span');
var $b = document.createElement('b');
$span.innerHTML = item.text;
$b.innerHTML = item.sendNick + ' :';
$img.src = item.sendAvatar;
$b.style = `color:#C09FF5;margin-right: 0.12rem;`;
$img.style = 'width: 0.4266666667rem;height: 0.3733333333rem;margin-right: 0.12rem;display: inline-block;vertical-align: middle;border: 1px solid #FFF;'
$div.style = `padding:0.1rem 0.2rem;height:auto;box-sizing: border-box;border-radius:1rem;font-size:0.24rem;color:#fff;background:#1A0042;border: 0.5px solid #fffaca;`;
$div.appendChild($img);
$div.appendChild($b);
$div.appendChild($span);
$('.barrage_text div').eq(0).css({ height: '4.5rem', width: "8.3rem", "margin": '0rem auto 0', "top": "0.2rem" })
return $div;
},
})
}
var roomUid;
var arrInfoGiftIndex = 0;
var datas;
var contentType;
var listMyRankFuns = 1;
var myAvatar;
var myNick;
var arrInfoGift = [
{ name: '同心锁', charging: 1000, img: './images/z1.png' },
{ name: '香囊', charging: 1200, img: './images/z2.png' },
{ name: '玉佩', charging: 1500, img: './images/z3.png' },
{ name: '绣球', charging: 1800, img: './images/z4.png' },
]
var rewardGit = [
{ name: '', type: 1, day: "1天", img: '' },//type 1:头饰,2:礼物
{ name: '', type: 1, day: "3天", img: '' },
{ name: '星星瓶', type: 2, day: "99钻石", img: './images/g3.png' },
{ name: '告白情书', type: 2, day: "666钻石", img: './images/g4.png' },
]
$(function () {
setTimeout(function () {
getInfoFromClient()
setTimeout(function () {
// 页面全屏
if (browser.app) {
if (browser.android) {
window.androidJsObj.initShowNav(false)
} else {
window.webkit.messageHandlers.initShowNav.postMessage(0)
}
};
// 顶部返回事件
$('.back').click(() => {
if (browser.android) {
window.androidJsObj.closeWebView()
} else {
window.webkit.messageHandlers.closeWebView.postMessage(null)
}
})
getRecommendRoom();
getPageInfo();
getMyBulletChat();
}, 100)
})
})
// 播放svg
function svgaFun () {
player1 = new SVGA.Player('.svgas');
parser1 = new SVGA.Parser('.svgas');
parser1.load('./images/svga.svga', function (videoItem) {
// player1.loops= 1
// player1.clearsAfterStop = false;
// player1.setVideoItem(videoItem);
// player1.startAnimation();
player1.loops = 1;
player1.clearsAfterStop = false;
player1.setVideoItem(videoItem);
player1.startAnimation();
player1.setContentMode('AspectFill')
player1.onFinished(() => {
$('.svga').hide()
})
})
}
// 处理充能礼物列表
function arrInfoGiftFun (arrInfoGiftIndex, res) {
// 处理信物数据
console.log("arrInfoGiftIndex:" + arrInfoGiftIndex);
console.log("currLevelNo:", res.data.currLevelNo - 1);
console.log(res.data);
$('.txs .logosssss').attr('src', arrInfoGift[arrInfoGiftIndex].img);
$('.txs .giftName').text(arrInfoGift[arrInfoGiftIndex].name);
$('.txs .line p b').text(arrInfoGift[arrInfoGiftIndex].charging);
$('.txs .line span b').text(res.data.batteryNum);
if (res.data.allUnlock == true) {
if (arrInfoGiftIndex == arrInfoGift.length - 1) {
$('.txs .rightBut_tab1').hide();
}
$('.getGifts').show();
$('.txs .line div').css('width', "100%");
$('.txs .line p').html(`${arrInfoGift[arrInfoGiftIndex].charging}/<b>${arrInfoGift[arrInfoGiftIndex].charging}</b>`);
} else {
if (arrInfoGiftIndex == res.data.currLevelNo - 1) {
$('.txs .line div').css('width', (res.data.currLevelScore / (arrInfoGift[res.data.currLevelNo - 1].charging)) * 100 + "%");
$('.txs .line p').html(`${res.data.currLevelScore}/<b>${arrInfoGift[res.data.currLevelNo - 1].charging}</b>`);
$('.getGifts').hide();
$('.notGetGifts').show();
} else {
if (arrInfoGiftIndex < res.data.currLevelNo - 1) {
$('.getGifts').show();
$('.notGetGifts').hide();
$('.txs .line div').css('width', "100%");
$('.txs .line p').html(`${arrInfoGift[arrInfoGiftIndex].charging}/<b>${arrInfoGift[arrInfoGiftIndex].charging}</b>`);
} else if (arrInfoGiftIndex > res.data.currLevelNo - 1) {
$('.txs .line div').css('width', "0%");
$('.txs .line p').html(`${0}/<b>${arrInfoGift[res.data.currLevelNo - 1].charging}</b>`);
$('.getGifts').hide();
$('.notGetGifts').show();
}
}
}
// 处理查看奖励弹窗
$('.notPubBG .pubBG_in .giftImg').attr('src', rewardGit[arrInfoGiftIndex].img);
$('.notPubBG .pubBG_in .giftName').text(`点亮${$('.txs .giftName').text()}可获得`);
$('.notPubBG .pubBG_in .nick2').text(rewardGit[arrInfoGiftIndex].name);
$('.notPubBG .pubBG_in .num').text(rewardGit[arrInfoGiftIndex].day);
// 处理按钮状态
if (res.data.allUnlock == true) {
$('.txs .but11').hide();
$('.tab1 .txs .butsss').show();
// $('.tab1 .txs').addClass('txs_active');
console.log('全部解锁');
} else {
if (arrInfoGiftIndex == res.data.currLevelNo - 1) {
$('.txs .but11').show();
$('.tab1 .txs .butsss').hide();
// $('.tab1 .txs').removeClass('txs_active');
console.log('两个按钮');
} else if (arrInfoGiftIndex < res.data.currLevelNo - 1) {
$('.txs .but11').hide();
$('.tab1 .txs .butsss').show();
// $('.tab1 .txs').addClass('txs_active');
console.log('已解锁按钮');
} else if (arrInfoGiftIndex > res.data.currLevelNo - 1) {
$('.txs .but11').hide();
$('.tab1 .txs .butsss').hide();
// $('.tab1 .txs').removeClass('txs_active');
console.log(('啥都不显示'));
}
}
}
// 查看奖励按钮
$('.txs .logosssss').click(function () {
$('.notPubBG').show();
bodyScroolFun(true);
})
$('.tab1 .txs .butsss img').click(function () {
$('.notPubBG').show();
bodyScroolFun(true);
})
// 充能左切换按钮
$('.txs .leftBut_tab1').click(function () {
arrInfoGiftIndex = arrInfoGiftIndex - 1;
if (arrInfoGiftIndex <= 0) {
arrInfoGiftIndex = 0;
arrInfoGiftFun(arrInfoGiftIndex, datas);
$(this).hide();
} else {
$('.txs .rightBut_tab1').show();
arrInfoGiftFun(arrInfoGiftIndex, datas);
}
})
// 充能右切换按钮
$('.txs .rightBut_tab1').click(function () {
arrInfoGiftIndex = arrInfoGiftIndex + 1;
if (arrInfoGiftIndex == arrInfoGift.length - 1) {
arrInfoGiftIndex = arrInfoGift.length - 1;
arrInfoGiftFun(arrInfoGiftIndex, datas);
$(this).hide();
} else {
$('.txs .leftBut_tab1').show();
arrInfoGiftFun(arrInfoGiftIndex, datas);
}
})
// 获取榜单接口
function listRank (rankType) {
showLoading()
networkRequest({
type: 'GEt',
url: urlPrefix + '/act/cp/2022/listRank',
data: { pub_ticket: pubInfo.ticket, pub_uid: pubInfo.uid, rankType },
success (res) {
if (res.code === 200) {
$('.listBox ul li').remove();
$('.myList ul li').remove();
// 前三
var top3 = res.data.rank.slice(0, 3);
var notTop3 = res.data.rank.slice(3);
if (top3.length < 3) {
let arr = new Array(3 - top3.length).fill({
lavatar: './images/logo.png',
ravatar: './images/logo.png',
lnick: '虚位以待',
rnick: '虚位以待',
score: ""
})
top3.push(...arr)
}
top3.forEach((res, index) => {
$(`.listBox .div${index + 1} .imgl`).attr('src', res.lavatar);
$(`.listBox .div${index + 1} .imgr`).attr('src', res.ravatar);
$(`.listBox .div${index + 1} p`).html(`${res.lnick.length > 4 ? res.lnick.slice(0, 4) + '...' : res.lnick}&nbsp;<b>&amp;</b>&nbsp;${res.rnick.length > 4 ? res.rnick.slice(0, 4) + '...' : res.rnick}`);
$(`.listBox .div${index + 1} .b`).html(`${res.score > 10000 ? (Math.floor(res.score / 1000) / 10).toFixed(1) + 'w' : res.score} 亲密值`);
});
// 非前三
var str = '';
notTop3.forEach((res, index) => {
str += `
<li>
<div class="num">${index + 4}</div>
<img src="${res.lavatar}" alt="" class="imgl">
<img src="${res.ravatar}" alt="" class="imgr">
<p class="name">${res.lnick.length > 4 ? res.lnick.slice(0, 4) + '...' : res.lnick}&nbsp;<b>&amp;</b>&nbsp;${res.rnick.length > 4 ? res.rnick.slice(0, 4) + '...' : res.rnick}</p>
<b class="right">${res.score > 10000 ? (Math.floor(res.score / 1000) / 10).toFixed(1) + 'w' : res.score} 亲密值</b>
</li>
`
})
$('.listBox ul').append(str);
// 处理自己排名
if (res.data.myRank == undefined) {
$('.myList .more').hide();
$('.myList ul').append('<li class="active">当前暂未有组合哦~ 快去找你的组合吧!</li>')
} else {
$('.myList ul').append(`
<li>
<img src="${res.data.myRank.lavatar}" alt="" class="left">
<img src="${res.data.myRank.ravatar}" alt="" class="right">
<img src="./images/love.png" alt="" class="love">
<p class="name">${res.data.myRank.lnick.length > 4 ? res.data.myRank.lnick.slice(0, 4) + '...' : res.data.myRank.lnick}&nbsp;<b>&amp;</b>&nbsp;${res.data.myRank.rnick.length > 4 ? res.data.myRank.rnick.slice(0, 4) + '...' : res.data.myRank.rnick}</p>
<div class="rightBox">
<p>${res.data.myRank.score > 10000 ? (Math.floor(res.data.myRank.score / 1000) / 10).toFixed(1) + 'w' : res.data.myRank.score} 亲密值</p>
<span>当前排名${res.data.myRanking}名</span>
</div>
</li>
`)
myRankings = res.data.myRanking;
$('.myList .more').show();
}
hideLoading(layerIndex)
} else {
hideLoading(layerIndex)
toastMsg(res.message)
}
},
error (err) {
hideLoading(layerIndex)
toastMsg('网络错误,请退出重进')
}
})
}
var myListBut = false;
// 上拉加载更多
$('.myList .more').click(function () {
myListBut = !myListBut;
if (myListBut) {
listMyRankFun(listMyRankFuns);
$('.myList').addClass('myList_active');
$(this).addClass('more_active');
$('.myList ul').css('overflow-y', 'scroll');
$('.myList ul').css('height', '7rem');
bodyScroolFun(true);
} else {
$('.myList').removeClass('myList_active');
$(this).removeClass('more_active');
$('.myList ul').css('overflow-y', 'hidden');
$('.myList ul').css('height', 'auto');
bodyScroolFun(false);
}
})
// 控制body是否可以滑动
function bodyScroolFun (bool) {
if (bool) {
$('body').css('overflow', 'hidden');
} else {
$('body').css('overflow', 'auto');
}
}
// 获取当前用户的组合列表
function listMyRankFun (rankType) {
showLoading();
networkRequest({
type: 'GEt',
url: urlPrefix + '/act/cp/2022/listMyRank',
data: { pub_ticket: pubInfo.ticket, pub_uid: pubInfo.uid, rankType },
success (res) {
if (res.code === 200) {
$('.myList ul li').remove();
var str = ''
res.data.forEach((res, index) => {
str += `
<li>
<img src="${res.lavatar}" alt="" class="left">
<img src="${res.ravatar}" alt="" class="right">
<img src="./images/love.png" alt="" class="love">
<p class="name">${res.lnick.length > 4 ? res.lnick.slice(0, 4) + '...' : res.lnick}&nbsp;<b>&amp;</b>&nbsp;${res.rnick.length > 4 ? res.rnick.slice(0, 4) + '...' : res.rnick}</p>
<div class="rightBox">
<p>${res.score > 10000 ? (Math.floor(res.score / 1000) / 10).toFixed(1) + 'w' : res.score} 亲密值</p>
<span>${index == 0 ? "当前排名" + myRankings + '名' : ''}</span>
</div>
</li>
`
})
$('.myList ul').append(str);
hideLoading(layerIndex)
} else {
hideLoading(layerIndex)
toastMsg(res.message)
}
},
error (err) {
hideLoading(layerIndex)
toastMsg('网络错误,请退出重进')
}
})
}
// 切换总榜日榜
$('.listBox .tab div').click(function () {
var i = $(this).index();
if (i == 0) {
listMyRankFuns = 1
listRank(1);
$(this).addClass('active')
$(this).siblings().removeClass('active2')
} else {
listMyRankFuns = 3
listRank(3)
$(this).addClass('active2')
$(this).siblings().removeClass('active')
}
})
// 获取房间接口
function getRecommendRoom () {
showLoading()
networkRequest({
type: 'GEt',
url: urlPrefix + '/act/cp/2022/getRecommendRoom',
data: { pub_ticket: pubInfo.ticket, pub_uid: pubInfo.uid },
success (res) {
if (res.code === 200) {
roomUid = res.data;
// 获取我的弹幕列表
networkRequest({
type: 'GEt',
url: urlPrefix + '/act/cp/2022/getMyBulletChat',
data: { pub_ticket: pubInfo.ticket, pub_uid: pubInfo.uid },
success (res) {
if (res.code === 200) {
if (res.data != undefined) {
contentType = true;
damuPool.push({
sendAvatar: myAvatar,
text: res.data.text,
sendNick: myNick,
})
console.log(damuPool);
$('.qx_put_out .qx_put_outin .p1').text('您在' + dateFormat(res.data.createTime, "MM月dd日") + '已发送了情书');
$('.qx_put_out .qx_put_outin .p2').text(res.data.text);
}
hideLoading(layerIndex)
} else {
toastMsg(res.message)
}
},
error (err) {
hideLoading(layerIndex)
toastMsg('网络错误,请退出重进')
}
})
hideLoading(layerIndex)
} else {
hideLoading(layerIndex)
toastMsg(res.message)
}
},
error (err) {
hideLoading(layerIndex)
toastMsg('网络错误,请退出重进')
}
})
}
// 发送弹幕确定按钮
$('.qx_put .qx_put_in .ok').click(function () {
var val = $('.qx_put .qx_put_in input').val();
if (val == '') {
toastMsg('告白语不能为空')
} else {
sendBulletChatFun(val);
bodyScroolFun(false);
}
})
// 发送弹幕接口
function sendBulletChatFun (content) {
showLoading()
networkRequest({
type: 'POST',
url: urlPrefix + '/act/cp/2022/sendBulletChat',
data: { pub_ticket: pubInfo.ticket, pub_uid: pubInfo.uid, content },
success (res) {
if (res.code === 200) {
$('.qx_put').hide();
// 获取我的弹幕列表
networkRequest({
type: 'GEt',
url: urlPrefix + '/act/cp/2022/getMyBulletChat',
data: { pub_ticket: pubInfo.ticket, pub_uid: pubInfo.uid },
success (res) {
if (res.code === 200) {
if (res.data != undefined) {
contentType = true;
damuPool.push({
sendAvatar: myAvatar,
text: res.data.text,
sendNick: myNick,
})
console.log(damuPool);
setDanmuData();
$('.qx_put_out .qx_put_outin .p1').text('您在' + dateFormat(res.data.createTime, "MM月dd日") + '已发送了情书');
$('.qx_put_out .qx_put_outin .p2').text(res.data.text);
}
hideLoading(layerIndex)
} else {
toastMsg(res.message)
}
},
error (err) {
hideLoading(layerIndex)
toastMsg('网络错误,请退出重进')
}
})
} else {
hideLoading(layerIndex)
toastMsg(res.message)
}
},
error (err) {
hideLoading(layerIndex)
toastMsg('网络错误,请退出重进')
}
})
}
// 获取弹幕列表
function getMyBulletChat () {
showLoading();
networkRequest({
type: 'GEt',
url: urlPrefix + '/act/cp/2022/listBulletChat',
data: { pub_ticket: pubInfo.ticket, pub_uid: pubInfo.uid },
success (res) {
if (res.code === 200) {
res.data.forEach(res => {
damuPool.push(res);
})
initDanmu();
setDanmuData();
setTimeout(function () {
$('.tab2').hide();
}, 10)
hideLoading(layerIndex)
} else {
hideLoading(layerIndex)
// toastMsg(res.message)
}
},
error (err) {
hideLoading(layerIndex)
toastMsg('网络错误,请退出重进')
}
})
}
$('.queqiao .myqs').click(function () {
bodyScroolFun(true);
if (contentType) {//
$('.qx_put_out').show();
} else {
textFun();
$('.qx_put').show();
}
})
// 获取用户为爱发电活动页面信息
function getPageInfo () {
showLoading()
networkRequest({
type: 'GEt',
url: urlPrefix + '/act/cp/2022/getPageInfo',
data: { pub_ticket: pubInfo.ticket, pub_uid: pubInfo.uid },
success (res) {
if (res.code === 200) {
datas = res;
if (res.data.allUnlock == true) {
res.data.currLevelNo = 4;
arrInfoGiftIndex = res.data.currLevelNo - 1;
} else {
arrInfoGiftIndex = res.data.currLevelNo - 1;
}
if (arrInfoGiftIndex != 0) {
$('.txs .leftBut_tab1').show();
} else if (arrInfoGiftIndex == arrInfoGift.length - 1) {
$('.txs .rightBut_tab1').hide();
}
$('.txs .line p').html(`${res.data.currLevelScore}/<b>${arrInfoGift[res.data.currLevelNo - 1].charging}</b>`);
networkRequest({
type: 'GET',
url: urlPrefix + `/user/get?uid=${pubInfo.uid}`,
success (ress) {
if (ress.code === 200) {
// $('.avatar').find('img').attr('src', res.data.avatar)
var gender = ress.data.gender;
rewardGit[0].img = gender == 1 ? './images/g1.png' : './images/g2.png';
rewardGit[1].img = gender == 1 ? './images/g1.png' : './images/g2.png';
rewardGit[0].name = gender == 1 ? '牛郎' : '织女';
rewardGit[1].name = gender == 1 ? '牛郎' : '织女';
myAvatar = ress.data.avatar;
myNick = ress.data.nick;
arrInfoGiftFun(arrInfoGiftIndex, res);
} else {
toastMsg(ress.message)
}
},
error () {
toastMsg('网络错误')
}
})
res.data.tasks.forEach((res, index) => {
if (res.taskStatus == 2) {
$(`.toak .div${index + 1} .but`).addClass('but_active');
$(`.toak .div${index + 1} .but`).attr('isbut', '1');
}
$(`.toak .div${index + 1} .but`).attr('taskno', res.taskNo);
$(`.toak .div${index + 1} span p b`).text(res.taskProgress == undefined ? "3/3" : res.taskProgress + "/3")
});
$('.toak div .but').click(function () {
var type = $(this).attr('isbut');
if (type != 1) {
if (browser.ios) {
// window.webkit.messageHandlers.openRoom.postMessage(roomUid);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openRoom(roomUid);
}
}
} else {
console.log('已完成');
}
})
// 处理鹊桥情书
if (res.data.allUnlock == true) {
$('.queqiao .myqs').show();
} else {
$('.queqiao .myqs').hide();
}
for (let index = 1; index <= arrInfoGift.length; index++) {
if (res.data.allUnlock == true) {
$(`.xw .d${index}`).hide();
} else {
if (Number($(`.xw .d${index}`).attr('id')) < res.data.currLevelNo) {
$(`.xw .d${index}`).hide();
}
}
}
hideLoading(layerIndex)
} else {
hideLoading(layerIndex)
toastMsg(res.message)
}
},
error (err) {
hideLoading(layerIndex)
toastMsg('网络错误,请退出重进')
}
})
}
// 使用电池充电接口
function chargeFun (batteryNum) {
showLoading()
networkRequest({
type: 'POST',
url: urlPrefix + '/act/cp/2022/charge',
data: { pub_ticket: pubInfo.ticket, pub_uid: pubInfo.uid, batteryNum: batteryNum },
success (res) {
if (res.code === 200) {
if (JSON.stringify(res.data) != "{}") {
$('.pubBG .pubBG_in .giftImg').attr('src', res.data.prizePic);
$('.pubBG .pubBG_in .nick2').text(res.data.prizeName);
$('.pubBG .pubBG_in .num').text(res.data.awardDayDesc);
$('.pubBG').show();
}
getPageInfo();
chargeFunType = !chargeFunType;
// hideLoading(layerIndex)
} else {
chargeFunType = !chargeFunType;
hideLoading(layerIndex)
toastMsg(res.message)
}
},
error (err) {
hideLoading(layerIndex)
toastMsg('网络错误,请退出重进')
chargeFunType = !chargeFunType;
}
})
}
// 充电一次按钮
$('.txs .butLeft').click(function () {
if (chargeFunType) {
chargeFunType = !chargeFunType;
if (Number($('.txs .line span b').text()) <= 0) {
toastMsg('电池不足,快去完成任务获取吧~');
chargeFunType = !chargeFunType;
} else {
$('.svga').show();
svgaFun();
setTimeout(function () {
chargeFun(1);
}, 2000)
}
}
})
// 充电五次按钮
var chargeFunType = true;
$('.txs .butRight').click(function () {
if (chargeFunType) {
chargeFunType = !chargeFunType;
if (Number($('.txs .line span b').text()) <= 0) {
toastMsg('电池不足,快去完成任务获取吧~');
chargeFunType = !chargeFunType;
} else {
$('.svga').show();
svgaFun();
setTimeout(function () {
chargeFun(5);
}, 2000)
}
}
})
// tab切换
$('.tabBox div').click(function () {
var i = $(this).index();
$(this).addClass('active').siblings().removeClass('active');
if (i == 0) {
$(".tab1").show();
$(".tab2").hide();
$(".tab3").hide();
} else if (i == 1) {
$(".tab1").hide();
$(".tab2").show();
$(".tab3").hide();
} else {
$(".tab1").hide();
$(".tab2").hide();
$(".tab3").show();
listRank(1);
}
})
// 打开规则
$('.header .rule_icon').click(function () {
bodyScroolFun(true);
$('.rule').show();
})
// 关闭规则
$('.rule img').click(function () {
bodyScroolFun(false);
$('.rule').hide();
})
// 打开告白输入框弹窗
var textArr = [
'不太相信星座,除了喜欢你的时候',
'我喜欢你,从一而终,认真且怂',
'你的身旁,是我最想驻足的地方',
'你所过之处,便是我的江湖',
'自从遇见了你,一切繁华都成背景',
'我想换个身份,重新认识你一遍',
'不盼星辰盼你,不追星月追你',
'见过那么多猪,就你最可爱',
'我明明跟你在一起,却还是好想你',
'见什么世面,见见你就好啦',
'看尽世间繁华,唯愿将你放在心上',
'心动是我送你的,第一份礼物',
'众生皆苦,只有你是草莓味',
'想和你看星空,谈夜色微风',
'你去哪里,我都尾随其后',
'如果没有你,我想我会断电',
'和你在一起,总会令我忘记时间存在',
'有你的日子,咖啡也是甜的'
]
var textI = 0;
// 换一批按钮
$('.qx_put .qx_put_in .update').click(function () {
textFun();
})
// 自动输入按钮
$('.qx_put .li').click(function () {
$(".qx_put .qx_put_in input").val($(this).text())
var val = $(".qx_put .qx_put_in input").val();
$('.qx_put .qx_put_in .num b').text(val.length)
})
// 替换告白语
function textFun () {
if (textI >= 18) {
textI = 3;
} else {
textI = textI + 3;
}
$('.li1').text(textArr[textI - 3]);
$('.li2').text(textArr[textI - 2]);
$('.li3').text(textArr[textI - 1]);
}
// 监听告白输入框
$(".qx_put .qx_put_in").bind("input propertychange", function (event) {
var val = $(".qx_put .qx_put_in input").val();
$('.qx_put .qx_put_in .num b').text(val.length)
});
// 取消告白输入框弹窗
$('.qx_put .qx_put_in .clos').click(function () {
$('.qx_put').hide();
bodyScroolFun(false);
})
// 关闭已发送弹窗
$('.qx_put_out .qx_put_outin img').click(function () {
$('.qx_put_out').hide();
bodyScroolFun(false);
})
// 关闭奖励弹窗
$('.pubBG .pubBG_in .close').click(function () {
$('.pubBG').hide();
bodyScroolFun(false);
})
// 关闭查看奖励弹窗
$('.notPubBG .pubBG_in .close').click(function () {
$('.notPubBG').hide();
bodyScroolFun(false);
})
// 打开榜单规则
$('.listBox .listRule_icon').click(function () {
bodyScroolFun(true);
$('.listRule').show();
})
// 关闭榜单规则
$('.listRule .listRule_in .close').click(function () {
bodyScroolFun(false);
$('.listRule').hide();
})
//返回页面 重新请求接口
var hiddenProperty = 'hidden' in document ? 'hidden' :
'webkitHidden' in document ? 'webkitHidden' :
'mozHidden' in document ? 'mozHidden' : null;
var visibilityChangeEvent = hiddenProperty.replace(/hidden/i, 'visibilitychange');
var onVisibilityChange = function () {
if (!document[hiddenProperty]) {
location.reload()
}
}
document.addEventListener(visibilityChangeEvent, onVisibilityChange);

View File

@@ -0,0 +1,319 @@
body {
background-color: #FFD6E9;
}
body .wrap .back {
position: fixed;
top: 0.93333rem;
left: 0.45333rem;
z-index: 999;
width: 0.82667rem;
height: 0.82667rem;
}
body .wrap .back img {
width: 100%;
height: 100%;
}
body .wrap .rule_icon, body .wrap .award_icon {
position: fixed;
right: 0;
top: 5.4rem;
z-index: 999;
width: 0.56rem;
height: 1.52rem;
}
body .wrap .award_icon {
top: 7.13333rem;
}
body .wrap .header {
width: 100%;
height: 10.66667rem;
}
body .wrap .header img {
width: 100%;
height: 100%;
}
body .wrap .gift_pic {
width: 9.57333rem;
height: 5.68rem;
margin: -1.65333rem auto 0;
}
body .wrap .gift_pic img {
width: 100%;
height: 100%;
}
body .wrap .tab_wrap {
position: relative;
width: 8.16rem;
height: 1.6rem;
background: url("../images/tab1-active.png") no-repeat 0 0/100% 100%;
margin: 0.22667rem auto 0.33333rem;
}
body .wrap .tab_wrap div {
position: absolute;
top: 0.21333rem;
width: 3.84rem;
height: 1.2rem;
}
body .wrap .tab_wrap div:nth-of-type(1) {
left: 0.21333rem;
}
body .wrap .tab_wrap div:nth-of-type(2) {
right: 0.21333rem;
}
body .wrap .rank_wrap {
width: 9.6rem;
height: 23.49333rem;
background: url("../images/rank-bg.png") no-repeat 0 0/100% 100%;
margin: 0 auto 0.93333rem;
overflow: hidden;
}
body .wrap .rank_wrap .type_wrap {
width: 46%;
display: flex;
justify-content: space-between;
margin: 0.8rem auto 0.29333rem;
}
body .wrap .rank_wrap .type_wrap img {
width: 2.10667rem;
height: 0.98667rem;
}
body .wrap .rank_wrap .topthree_wrap {
position: relative;
height: 4.8rem;
}
body .wrap .rank_wrap .topthree_wrap .topthree_item {
position: absolute;
top: 0rem;
display: flex;
flex-direction: column;
align-items: center;
}
body .wrap .rank_wrap .topthree_wrap .topthree_item:nth-child(1) {
left: 50%;
transform: translateX(-50%);
}
body .wrap .rank_wrap .topthree_wrap .topthree_item:nth-child(2) {
left: 1.2rem;
top: 1.10667rem;
}
body .wrap .rank_wrap .topthree_wrap .topthree_item:nth-child(3) {
right: 1.2rem;
top: 1.10667rem;
}
body .wrap .rank_wrap .topthree_wrap .topthree_item .headwear {
width: 1.78667rem;
height: 2.26667rem;
z-index: 1;
}
body .wrap .rank_wrap .topthree_wrap .topthree_item .avatar {
position: absolute;
top: 0.50667rem;
width: 1.76rem;
height: 1.76rem;
border-radius: 50%;
}
body .wrap .rank_wrap .topthree_wrap .topthree_item .nick {
font-size: 0.32rem;
font-weight: bold;
color: #A17BF4;
margin-top: 0.18667rem;
margin-bottom: 0.13333rem;
}
body .wrap .rank_wrap .topthree_wrap .topthree_item .num {
font-size: 0.32rem;
color: #FF7DA0;
}
body .wrap .rank_wrap .others_wrap li {
display: flex;
align-items: center;
width: 8.26667rem;
height: 1.86667rem;
border-radius: 0.13333rem;
background-color: #FFEDF5;
margin: 0 auto 0.18667rem;
}
body .wrap .rank_wrap .others_wrap li .index {
width: 0.56rem;
height: 0.56rem;
line-height: 0.56rem;
border-radius: 50%;
background-color: #FFB5CA;
text-align: center;
font-size: 0.32rem;
font-weight: bold;
color: #fff;
margin-left: 0.21333rem;
}
body .wrap .rank_wrap .others_wrap li .others_avatar {
display: flex;
align-items: center;
justify-content: center;
width: 1.33333rem;
height: 1.33333rem;
border: 0.05333rem solid #FF769B;
border-radius: 50%;
box-sizing: border-box;
margin-left: 0.48rem;
margin-right: 0.33333rem;
}
body .wrap .rank_wrap .others_wrap li .others_avatar img {
width: 1.28rem;
height: 1.28rem;
border-radius: 50%;
}
body .wrap .rank_wrap .others_wrap li .others_nick {
flex: 1;
font-size: 0.32rem;
color: #8C67EF;
}
body .wrap .rank_wrap .others_wrap li .others_num {
line-height: 1.3;
text-align: right;
font-size: 0.26667rem;
color: #FF7DA0;
margin-right: 0.21333rem;
}
body .wrap .rank_wrap .others_wrap li .others_num span {
font-size: 0.4rem;
font-weight: bold;
}
body .wrap .rank_wrap .mine_wrap {
display: flex;
align-items: center;
width: 8.26667rem;
height: 1.86667rem;
margin: auto;
}
body .wrap .rank_wrap .mine_wrap .mine_index {
width: 0.96rem;
text-align: center;
font-size: 0.26667rem;
font-weight: bold;
color: #FFB6CA;
}
body .wrap .rank_wrap .mine_wrap .mine_avatar {
display: flex;
align-items: center;
justify-content: center;
width: 1.33333rem;
height: 1.33333rem;
border: 0.05333rem solid #FF769B;
border-radius: 50%;
box-sizing: border-box;
margin-left: 0.26667rem;
margin-right: 0.33333rem;
}
body .wrap .rank_wrap .mine_wrap .mine_avatar img {
width: 1.28rem;
height: 1.28rem;
border-radius: 50%;
}
body .wrap .rank_wrap .mine_wrap .mine_nick {
flex: 1;
font-size: 0.32rem;
color: #8C67EF;
}
body .wrap .rank_wrap .mine_wrap .mine_num {
line-height: 1.3;
text-align: right;
font-size: 0.26667rem;
color: #FF7DA0;
margin-right: 0.21333rem;
}
body .wrap .rank_wrap .mine_wrap .mine_num span {
font-size: 0.4rem;
font-weight: bold;
}
body .wrap .rule_popup, body .wrap .award_popup {
display: none;
position: fixed;
top: 0;
left: 0;
z-index: 999;
width: 100vw;
height: 100vh;
background-color: rgba(4, 4, 4, 0.7);
}
body .wrap .rule_popup .rule_content, body .wrap .rule_popup .award_content, body .wrap .award_popup .rule_content, body .wrap .award_popup .award_content {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 8.53333rem;
height: 7.2rem;
}
body .wrap .award_popup .award_content {
width: 8.53333rem;
height: 9.49333rem;
background: url("../images/award-bg.png") no-repeat 0 0/100% 100%;
}
body .wrap .award_popup .award_content .award_wrap {
position: relative;
height: 84%;
overflow: auto;
margin-top: 1.06667rem;
text-align: center;
}
body .wrap .award_popup .award_content .award_wrap .award_tab_wrap {
display: flex;
width: 5.78667rem;
height: 1.17333rem;
background: url("../images/award-tab1.png") no-repeat 0 0/100% 100%;
margin: auto;
}
body .wrap .award_popup .award_content .award_wrap .award_tab_wrap .award_tab_item {
flex: 1;
}
body .wrap .award_popup .award_content .award_wrap .award_pic_wrap .award_pic {
width: 8rem;
height: 31.70667rem;
}
::-webkit-scrollbar {
display: none;
}

View File

@@ -0,0 +1,291 @@
@function px2rem($px, $rem:75) {
@return $px / $rem+rem;
}
body{
background-color: #FFD6E9;
.wrap{
.back{
position: fixed;
top: px2rem(70, );
left: px2rem(34, );
z-index: 999;
width: px2rem(62, );
height: px2rem(62, );
img{
width: 100%;
height: 100%;
}
}
.rule_icon, .award_icon{
position: fixed;
right: 0;
top: px2rem(405, );
z-index: 999;
width: px2rem(42, );
height: px2rem(114, );
}
.award_icon{
top: px2rem(535, );
}
.header{
width: 100%;
height: px2rem(800, );
img{
width: 100%;
height: 100%;
}
}
.gift_pic{
width: px2rem(718, );
height: px2rem(426, );
margin: px2rem(-124, ) auto 0;
img{
width: 100%;
height: 100%;
}
}
.tab_wrap{
position: relative;
width: px2rem(612, );
height: px2rem(120, );
background: url('../images/tab1-active.png') no-repeat 0 0/100% 100%;
margin: px2rem(17, ) auto px2rem(25, );
div{
position: absolute;
top: px2rem(16, );
width: px2rem(288, );
height: px2rem(90, );
&:nth-of-type(1){
left: px2rem(16, );
}
&:nth-of-type(2){
right: px2rem(16, );
}
}
}
.rank_wrap{
width: px2rem(720, );
height: px2rem(1762, );
background: url('../images/rank-bg.png') no-repeat 0 0/100% 100%;
margin: 0 auto px2rem(70, );
overflow: hidden;
.type_wrap{
width: 46%;
display: flex;
justify-content: space-between;
margin: px2rem(60, ) auto px2rem(22, );
img{
width: px2rem(158, );
height: px2rem(74, );
}
}
.topthree_wrap{
position: relative;
height: px2rem(360, );
.topthree_item{
position: absolute;
top: px2rem(0, );
display: flex;
flex-direction: column;
align-items: center;
&:nth-child(1){
left: 50%;
transform: translateX(-50%);
}
&:nth-child(2){
left: px2rem(90, );
top: px2rem(83, );
}
&:nth-child(3){
right: px2rem(90, );
top: px2rem(83, );
}
// p{
// width: px2rem(134, );
// height: px2rem(170, );
// background: url('../images/first.png') no-repeat 0 0/100% 100%;
// }
.headwear{
width: px2rem(134, );
height: px2rem(170, );
z-index: 1;
}
.avatar{
position: absolute;
top: px2rem(38, );
width: px2rem(132, );
height: px2rem(132, );
border-radius: 50%;
}
.nick{
font-size: px2rem(24, );
font-weight: bold;
color: #A17BF4;
margin-top: px2rem(14, );
margin-bottom: px2rem(10, );
}
.num{
font-size: px2rem(24, );
color: #FF7DA0;
}
}
}
.others_wrap{
li{
display: flex;
align-items: center;
width: px2rem(620, );
height: px2rem(140, );
border-radius: px2rem(10, );
background-color: #FFEDF5;
margin: 0 auto px2rem(14, );
.index{
width: px2rem(42, );
height: px2rem(42, );
line-height: px2rem(42, );
border-radius: 50%;
background-color: #FFB5CA;
text-align: center;
font-size: px2rem(24, );
font-weight: bold;
color: #fff;
margin-left: px2rem(16, );
}
.others_avatar{
display: flex;
align-items: center;
justify-content: center;
width: px2rem(100, );
height: px2rem(100, );
border: px2rem(4, ) solid #FF769B;
border-radius: 50%;
box-sizing: border-box;
margin-left: px2rem(36, );
margin-right: px2rem(25, );
img{
width: px2rem(96, );
height: px2rem(96, );
border-radius: 50%;
}
}
.others_nick{
flex: 1;
font-size: px2rem(24, );
color: #8C67EF;
}
.others_num{
line-height: 1.3;
text-align: right;
font-size: px2rem(20, );
color: #FF7DA0;
margin-right: px2rem(16, );
span{
font-size: px2rem(30, );
font-weight: bold;
}
}
}
}
.mine_wrap{
display: flex;
align-items: center;
width: px2rem(620, );
height: px2rem(140, );
margin: auto;
.mine_index{
width: px2rem(72, );
text-align: center;
font-size: px2rem(20, );
font-weight: bold;
color: #FFB6CA;
}
.mine_avatar{
display: flex;
align-items: center;
justify-content: center;
width: px2rem(100, );
height: px2rem(100, );
border: px2rem(4, ) solid #FF769B;
border-radius: 50%;
box-sizing: border-box;
margin-left: px2rem(20, );
margin-right: px2rem(25, );
img{
width: px2rem(96, );
height: px2rem(96, );
border-radius: 50%;
}
}
.mine_nick{
flex: 1;
font-size: px2rem(24, );
color: #8C67EF;
}
.mine_num{
line-height: 1.3;
text-align: right;
font-size: px2rem(20, );
color: #FF7DA0;
margin-right: px2rem(16, );
span{
font-size: px2rem(30, );
font-weight: bold;
}
}
}
}
.rule_popup, .award_popup{
display: none;
position: fixed;
top: 0;
left: 0;
z-index: 999;
width: 100vw;
height: 100vh;
background-color: rgba($color: #040404, $alpha: .7);
.rule_content, .award_content{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: px2rem(640, );
height: px2rem(540, );
}
}
.award_popup{
.award_content{
width: px2rem(640, );
height: px2rem(712, );
background: url('../images/award-bg.png') no-repeat 0 0/100% 100%;
.award_wrap{
position: relative;
height: 84%;
overflow: auto;
margin-top: px2rem(80, );
text-align: center;
.award_tab_wrap{
display: flex;
width: px2rem(434, );
height: px2rem(88, );
background: url('../images/award-tab1.png') no-repeat 0 0/100% 100%;
margin: auto;
.award_tab_item{
flex: 1;
}
}
.award_pic_wrap{
.award_pic{
width: px2rem(600, );
height: px2rem(2378, );
}
}
}
}
}
}
}
::-webkit-scrollbar{
display: none;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@@ -0,0 +1,71 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport"
content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no, viewport-fit=cover" />
<title>520 表白季</title>
<link rel="stylesheet" href="../../common/css/reset.css">
<link rel="stylesheet" href="./css/index.css">
<script src="../../common/js/flexible.js"></script>
</head>
<body>
<div class="wrap">
<div class="back"><img src="./images/back.png" alt=""></div>
<div class="rule_icon"><img src="./images/rule-icon.png" alt=""></div>
<div class="award_icon"><img src="./images/award-icon.png" alt=""></div>
<div class="header"><img src="./images/header.png" alt=""></div>
<div class="gift_pic"><img src="./images/gift-pic.png" alt=""></div>
<div class="tab_wrap">
<div class="tab_item"></div>
<div class="tab_item"></div>
</div>
<div class="rank_wrap">
<div class="type_wrap">
<img src="./images/day-rank-active.png" alt="" class="active">
<img src="./images/total-rank.png" alt="">
</div>
<div class="topthree_wrap"></div>
<ul class="others_wrap"></ul>
<div class="mine_wrap">
<div class="mine_index">未上榜</div>
<div class="mine_avatar"><img src="./images/default.png" alt=""></div>
<div class="mine_nick"></div>
<div class="mine_num">告白值<br><span>0</span></div>
</div>
</div>
<div class="rule_popup">
<div class="rule_content"><img src="./images/rule-pic.png" alt=""></div>
</div>
<div class="award_popup">
<div class="award_content">
<div class="award_wrap">
<div class="award_tab_wrap">
<div class="award_tab_item"></div>
<div class="award_tab_item"></div>
</div>
<p class="award_pic_wrap">
<img src="./images/award-pic1.png" alt="" class="award_pic">
</p>
</div>
</div>
</div>
</div>
<script src="../../common/js/jquery-3.2.1.min.js"></script>
<script src="../../common/js/common2.js"></script>
<script src="../../common/js/layer.js"></script>
<script src="../../common/js/vconsole.min.js"></script>
<script src="./js/index.js?v=1.1"></script>
</body>
</html>

View File

@@ -0,0 +1,238 @@
const urlPrefix = getUrlPrefix()
let browser = checkVersion()
if (EnvCheck() === 'test') new VConsole
// 封装layer消息提醒框
let layerIndex
const showLoading = (content = '加载中...') => {
layer.open({
type: 2,
shadeClose: false,
content,
success(e) {
layerIndex = $(e).attr('index')
}
})
}
const hideLoading = (index) => {
// layer.closeAll()
layer.close(index)
}
const toastMsg = (content = '操作完成', time = 2) => {
layer.open({
content,
time,
skin: 'msg'
})
}
let rankType = 1 //榜单类型(1告白榜 2心动榜)
let rankDataType = 0 //榜单数据类型0日榜 1总榜
let rankList = []
let userRank = {}
const getList = (rankType = 1, rankDataType = 0) => {
networkRequest({
type: 'GET',
url: urlPrefix + '/act/love/listRank',
data: {
rankType,
rankDataType
},
success(res) {
if (res.code === 200) {
rankList = res.data.rankList
userRank = res.data.userRank
renderList(rankType)
renderUser(rankType)
} else {
toastMsg(res.message)
}
},
error(err) {
toastMsg('网络错误')
}
})
}
// 渲染
const renderList = (rankType) => {
let str = ''
let topthree = rankList.slice(0, 3)
if (topthree.length < 3) {
topthree.push(
...new Array(3-topthree.length).fill({
avatar: './images/default.png',
nick: '虚位以待',
rankValue: 0
})
)
}
topthree.forEach((item, index) => {
str += `
<div class="topthree_item">
<img src="./images/headwear${index+1}.png" alt="" class="headwear">
<img src="${item.avatar}" alt="" class="avatar">
<div class="nick">${item.nick.length>5 ? item.nick.slice(0,5)+'...' : item.nick}</div>
<div class="num" style="display: ${item.rankValue ? 'block' : 'none'}">
${rankType === 1 ? '告白值' : '心动值'}
<span>${item.rankValueStr}</span>
</div>
</div>
`
})
$('.topthree_wrap').html(str)
let str1 = ''
let others = rankList.slice(3, 10)
if (others.length < 7) {
others.push(
...new Array(7-others.length).fill({
avatar: './images/default.png',
nick: '虚位以待',
rankValue: 0
})
)
}
others.forEach((item, index) => {
str1 += `
<li>
<div class="index">${index + 4}</div>
<div class="others_avatar"><img src="${item.avatar}" alt=""></div>
<div class="others_nick">${item.nick.length>8 ? item.nick.slice(0,8)+'...' : item.nick}</div>
<div class="others_num" style="display: ${item.rankValue ? 'block' : 'none'}">
${rankType === 1 ? '告白值' : '心动值'}<br>
<span>${item.rankValueStr}</span>
</div>
</li>
`
})
$('.others_wrap').html(str1)
}
const renderUser = (rankType) => {
$('.mine_index').html(userRank.rank ? userRank.rank : '未上榜')
$('.mine_avatar img').attr('src', userRank.avatar)
$('.mine_nick').html(userRank.nick.length > 8 ? userRank.nick.slice(0, 8)+ '...' : userRank.nick)
$('.mine_num').html(`${rankType === 1 ? '告白值' : '心动值'}<br><span>${userRank.rankValueStr}</span>`)
}
$(function () {
getInfoFromClient()
setTimeout(() => {
getList()
}, 50)
// 页面全屏
if (browser.app) {
if (browser.android) {
window.androidJsObj.initShowNav(false)
} else {
window.webkit.messageHandlers.initShowNav.postMessage(0)
}
}
// 返回按钮
$('.back').click(() => {
if (browser.android) {
window.androidJsObj.closeWebView()
} else {
window.webkit.messageHandlers.closeWebView.postMessage(null)
}
})
// 告白榜 心动榜 tab切換
let currentTab = 0
$('.tab_wrap').on('click', 'div', function() {
let index = $(this).index()
if (currentTab === index) return;
currentTab = index
if (index) {
// 心动榜
$('.tab_wrap').css('backgroundImage', "url('./images/tab2-active.png')")
if (currentType_x) {
$('.type_wrap img').eq(1).attr('src', './images/total-rank-active.png').siblings('img').attr('src', './images/day-rank.png')
getList(2, 1)
} else {
$('.type_wrap img').eq(0).attr('src', './images/day-rank-active.png').siblings('img').attr('src', './images/total-rank.png')
getList(2, 0)
}
} else {
// 告白榜
$('.tab_wrap').css('backgroundImage', "url('./images/tab1-active.png')")
if (currentType_g) {
$('.type_wrap img').eq(1).attr('src', './images/total-rank-active.png').siblings('img').attr('src', './images/day-rank.png')
getList(1, 1)
} else {
$('.type_wrap img').eq(0).attr('src', './images/day-rank-active.png').siblings('img').attr('src', './images/total-rank.png')
getList(1, 0)
}
}
})
// 日榜 总榜 tab切换
let currentType_g = 0
let currentType_x = 0
$('.type_wrap').on('click', 'img', function() {
let index = $(this).index()
if (currentTab) {
// 心动榜
if (currentType_x == index) return
currentType_x = index
if (currentType_x) {
$(this).attr('src', './images/total-rank-active.png').siblings('img').attr('src', './images/day-rank.png')
getList(2, 1)
} else {
$(this).attr('src', './images/day-rank-active.png').siblings('img').attr('src', './images/total-rank.png')
getList(2, 0)
}
} else {
// 告白榜
if (currentType_g == index) return
currentType_g = index
if (currentType_g) {
$(this).attr('src', './images/total-rank-active.png').siblings('img').attr('src', './images/day-rank.png')
getList(1, 1)
} else {
$(this).attr('src', './images/day-rank-active.png').siblings('img').attr('src', './images/total-rank.png')
getList(1, 0)
}
}
})
// 规则弹窗
$('.rule_icon').click(() => {
$('.rule_popup').show()
$('body').css('overflow', 'hidden')
})
$('.rule_popup').click(() => {
$('.rule_popup').hide()
$('body').css('overflow', 'auto')
})
$('.rule_content').click((e) => {
e.stopPropagation()
})
// 奖励弹窗
$('.award_icon').click(() => {
$('.award_popup').show()
$('body').css('overflow', 'hidden')
})
$('.award_popup').click(() => {
$('.award_popup').hide()
$('body').css('overflow', 'auto')
})
$('.award_content').click((e) => {
e.stopPropagation()
})
let currentAwardTabIndex = 0
$('.award_tab_wrap').on('click', '.award_tab_item', function() {
let index = $(this).index()
if (currentAwardTabIndex === index) return
currentAwardTabIndex = index
if (index) {
$('.award_tab_wrap').css('backgroundImage', 'url(./images/award-tab2.png)')
$('.award_pic').attr('src', './images/award-pic2.png')
} else {
$('.award_tab_wrap').css('backgroundImage', 'url(./images/award-tab1.png)')
$('.award_pic').attr('src', './images/award-pic1.png')
}
})
})

View File

@@ -0,0 +1,222 @@
@font-face {
font-family: 'pingfang';
src: url("../fonts/PingFangSCRegular.ttf");
src: url("../fonts/PingFangSCRegular.ttf") format("woff"), url("../fonts/PingFangSCRegular.ttf") format("truetype"), url("../fonts/PingFangSCRegular.ttf") format("svg");
}
html,
body {
background: #BAE9FB;
font-family: 'pingfang';
}
.max {
width: 10rem;
margin: 0 auto;
height: 35.76rem;
background: url("../images/bg.png") no-repeat;
background-size: 100% 13.49333rem;
position: relative;
}
.max .canter {
position: absolute;
top: 8.02667rem;
left: 50%;
transform: translateX(-50%);
width: 9.2rem;
height: 24rem;
background: url("../images/game.png") no-repeat;
background-size: 100% 100%;
}
.max .canter .game-button {
width: 100%;
height: 8rem;
display: flex;
flex-direction: column;
align-items: center;
}
.max .canter .game-button .game-tit {
width: 5.48rem;
height: 1.8rem;
margin-top: 1.21333rem;
}
.max .canter .game-button .game-show {
width: 2.68rem;
height: 0.94667rem;
margin-top: 0.45333rem;
}
.max .canter .game-button div {
display: flex;
width: 82%;
justify-content: space-around;
margin-top: 0.48rem;
}
.max .canter .game-button div p {
width: 2.93333rem;
height: 0.85333rem;
}
.max .canter .game-button div p:first-child {
background: url("../images/m2.png") no-repeat;
background-size: 100% 100%;
}
.max .canter .game-button div p:last-child {
background: url("../images/m1.png") no-repeat;
background-size: 100% 100%;
}
.max .bottom {
width: 9.2rem;
height: 13.33333rem;
margin-top: 2.61333rem;
box-sizing: border-box;
padding: 0rem 0.70667rem;
}
.max .bottom .expalin-list {
font-size: 0.4rem;
overflow: hidden;
}
.max .bottom .expalin-list p {
float: left;
}
.max .bottom .expalin-list p:first-child {
width: 0.8rem;
margin-top: 0.05333rem;
}
.max .bottom .expalin-list p:first-child span {
font-weight: bold;
}
.max .bottom .expalin-list p:last-child {
width: 6.66667rem;
line-height: 0.61333rem;
}
.max .bottom .expalin-list p:last-child span {
line-height: 0.61333rem;
font-weight: 900;
color: #042099;
}
.max .bottom .expalin-list p:last-child span span {
color: #35A4FE;
}
.max .bottom .expalin-list .serial {
display: inline-block;
border-radius: 50%;
background: #81D0FF;
width: 0.48rem;
color: #056EC3;
line-height: 0.48rem;
text-align: center;
}
.max .bottom .apple {
text-align: center;
margin-top: 1.2rem;
font-size: 0.32rem;
color: #1D7DFF;
}
.max .bottom .gift {
height: 5.6rem;
display: flex;
flex-direction: column;
align-items: center;
padding-top: 0.94667rem;
box-sizing: border-box;
overflow: hidden;
}
.max .bottom .gift div {
position: relative;
}
.max .bottom .gift div span {
position: absolute;
width: 1.86667rem;
right: -0.93333rem;
top: -0.4rem;
line-height: 0.66667rem;
background: #FFFF00;
border-radius: 0.13333rem;
text-align: center;
font-weight: bold;
}
.max .bottom .gift img {
width: 3.2rem;
height: 3.2rem;
}
.max .bottom .gift p {
font-size: 0.34667rem;
color: #031877;
text-align: center;
font-weight: bold;
margin-top: 0.2rem;
}
.max .bottom .explain {
margin: 0.48rem 0 0.29333rem;
margin-left: -0.22667rem;
display: block;
width: 2.17333rem;
height: 0.8rem;
background: url("../images/explain.png") no-repeat;
background-size: 100% 100%;
}
.max .user {
width: 10rem;
height: 2.4rem;
position: fixed;
background: #81d0ff;
bottom: 0;
left: 0;
display: flex;
align-items: center;
color: #15209e;
border-top: 2px solid #15209e;
}
.max .user img {
width: 1.6rem;
height: 1.6rem;
overflow: hidden;
border-radius: 50%;
margin-left: 0.4rem;
}
.max .user .user-name {
width: 3.2rem;
font-size: 0.4rem;
font-weight: bold;
margin-left: 0.53333rem;
}
.max .user .receive,
.max .user .out {
text-align: center;
width: 2rem;
}
.max .user .receive span,
.max .user .out span {
display: block;
font-weight: bold;
font-size: 0.37333rem;
line-height: 0.53333rem;
}

View File

@@ -0,0 +1,262 @@
@function px2rem($px, $rem:75) {
@return $px / $rem+rem;
}
@import '../../../common/css/flex.scss';
@font-face {
font-family: 'pingfang';
src: url('../fonts/PingFangSCRegular.ttf');
src: url('../fonts/PingFangSCRegular.ttf') format('woff'),
url('../fonts/PingFangSCRegular.ttf') format('truetype'),
url('../fonts/PingFangSCRegular.ttf') format('svg');
}
html,
body {
background: #BAE9FB;
font-family: 'pingfang';
}
.max {
width: px2rem(750);
margin: 0 auto;
height: px2rem(2682);
background: url('../images/bg.png') no-repeat;
background-size: 100% px2rem(1012);
position: relative;
.canter {
position: absolute;
top: px2rem(602);
left: 50%;
transform: translateX(-50%);
width: px2rem(690);
height: px2rem(1800);
background: url('../images/game.png') no-repeat;
background-size: 100% 100%;
.game-button {
width: 100%;
height: px2rem(600);
// background: rgba(0, 0, 0, .6);
display: flex;
flex-direction: column;
align-items: center;
.game-tit {
width: px2rem(411);
height: px2rem(135);
margin-top: px2rem(91);
}
.game-show {
width: px2rem(201);
height: px2rem(71);
margin-top: px2rem(34);
}
div {
display: flex;
width: 82%;
justify-content: space-around;
margin-top: px2rem(36);
p {
width: px2rem(220);
height: px2rem(64);
&:first-child {
background: url('../images/m2.png') no-repeat;
background-size: 100% 100%;
}
&:last-child {
background: url('../images/m1.png') no-repeat;
background-size: 100% 100%;
}
}
}
}
}
.bottom {
width: px2rem(690);
height: px2rem(1000);
// background: rgba(0, 0, 0, .6);
margin-top: px2rem(196);
box-sizing: border-box;
padding: px2rem(0) px2rem(53);
// p {
// width: 98%;
// font-weight: bold;
// color: #031877;
// line-height: px2rem(42);
// text-indent: -10px;
// &.apple {
// color: #1D7DFF;
// font-size: px2rem(24);
// text-align: center;
// margin-top: px2rem(86);
// }
// span {
// color: #35A4FE;
// font-weight: bold;
// }
// }
.expalin-list {
font-size: px2rem(30);
overflow: hidden;
p {
float: left;
&:first-child {
width: px2rem(60);
margin-top: px2rem(4);
span {
font-weight: bold;
}
}
&:last-child {
width: px2rem(500);
line-height: px2rem(46);
span {
line-height: px2rem(46);
font-weight: 900;
color: #042099;
span {
color: #35A4FE;
}
}
}
}
.serial {
display: inline-block;
border-radius: 50%;
background: #81D0FF;
width: px2rem(36);
color: #056EC3;
line-height: px2rem(36);
text-align: center;
}
}
.apple {
text-align: center;
margin-top: px2rem(90);
font-size: px2rem(24);
color: #1D7DFF;
}
.gift {
height: px2rem(420);
display: flex;
flex-direction: column;
align-items: center;
padding-top: px2rem(71);
box-sizing: border-box;
overflow: hidden;
div {
position: relative;
span {
position: absolute;
width: px2rem(140);
right: px2rem(-70);
top: px2rem(-30);
line-height: px2rem(50);
background: #FFFF00;
border-radius: px2rem(10);
text-align: center;
font-weight: bold;
}
}
img {
width: px2rem(240);
height: px2rem(240);
}
p {
font-size: px2rem(26);
color: #031877;
text-align: center;
font-weight: bold;
margin-top: px2rem(15);
}
// background: rgba(134, 38, 38, 0.6);
}
.explain {
margin: px2rem(36) 0 px2rem(22);
margin-left: px2rem(-17);
display: block;
width: px2rem(163);
height: px2rem(60);
background: url('../images/explain.png') no-repeat;
background-size: 100% 100%;
}
}
.user {
width: px2rem(750);
height: px2rem(180);
position: fixed;
background: #81d0ff;
bottom: 0;
left: 0;
display: flex;
align-items: center;
color: #15209e;
border-top: 2px solid #15209e;
img {
width: px2rem(120);
height: px2rem(120);
overflow: hidden;
border-radius: 50%;
margin-left: px2rem(30);
}
.user-name {
width: px2rem(240);
// background: #000;
font-size: px2rem(30);
font-weight: bold;
margin-left: px2rem(40);
}
.receive,
.out {
text-align: center;
width: px2rem(150);
span {
display: block;
font-weight: bold;
font-size: px2rem(28);
line-height: px2rem(40);
}
}
}
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

@@ -0,0 +1,89 @@
<!DOCTYPE html>
<html lang="en">
<script>
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?cfa5923c8195139cef029b2f20be2aba";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>纯真年代,限定铭牌萌趣降临</title>
<link rel="stylesheet" href="../../common/css/reset.css">
<link rel="stylesheet" href="./css/index.css?v=4">
<script src="../../common/js/flexible.js"></script>
</head>
<body>
<div class="max">
<div class="canter">
<div class="game-button">
<img class="game-tit" src="./images/title.png" alt="">
<img class="game-show" src="./images/show.png" alt="">
<div>
<p></p>
<p></p>
</div>
</div>
<div class="bottom">
<div class="expalin-list">
<p><span class="serial">1</span></p>
<p><span> 送出/收到活动限定礼物的小可爱</span></p>
</div>
<div class="gift">
<div>
<img src="./images/kite.png" alt="">
<span>限定礼物</span>
</div>
<p>小风筝</p>
</div>
<div class="expalin-list">
<p><span class="serial">2</span></p>
<p><span class="award">收到6个、10个、15个小风筝可获得 <span>“追逐梦想”</span>铭牌使用权7天、15天、30天。</span></p>
</div>
<div class="expalin-list">
<p><span class="serial">3</span></p>
<p> <span class="award">送出6个、10个、15个小风筝可获得 <span>“放飞梦想”</span>铭牌使用权7天、15天、30天。</span></p>
</div>
<span class="explain"></span>
<div class="expalin-list">
<p><span class="serial">1</span></p>
<p><span>活动时间6月1日-6月3日</span></p>
</div>
<div class="expalin-list">
<p><span class="serial">2</span></p>
<p><span>活动结束后系统自动下发铭牌</span></p>
</div>
<div class="apple">本活动与苹果公司无关</div>
</div>
</div>
<div class="user">
<img src="./images/people.png" alt="">
<p class="user-name"></p>
<p class="receive">
<span>收到</span>
<span class="num">0</span>
</p>
<p class="out">
<span>送出</span>
<span class="num">0</span>
</p>
</div>
</div>
<script src="../../common/js/jquery-3.2.1.min.js"></script>
<script src="../../common/js/common.js"></script>
<script src="../../common/js/template-web.js"></script>
<script src="../../common/js/vconsole.min.js"></script>
<script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="//lkme.cc/js/linkedme.min.js"></script>
<script src="./js/index.js?v=4"></script>
</body>
</html>

View File

@@ -0,0 +1,107 @@
var api = locateJudge();
var browser = checkVersion();
var info = {};
var betaUrl = 'https://yeying.api.shengxuanwangluo.com/peko/activity/act-61/index.html';
var realUrl = tranUrl + '/peko/activity/act-61/index.html';
var share = {
title: '纯真年代',
link: tranUrl + '/peko/activity/act-61/index.html',
// imgUrl: 'https://img.letusmix.com/new_logo.png',
imgUrl: 'https://yeying.api.shengxuanwangluo.com/peko/modules/wxPubPay/images/logo.png',
desc: '限定铭牌萌趣降临',// 分享描述
};
if (EnvCheck() == 'test') {
var vConsole = new VConsole();
}
$(function () {
function getId() {
if (browser.app) {
if (browser.ios) {
var allcookies = document.cookie;
var $uid = allcookies.match(/\d+/);
info.uid = $uid[0]
window.webkit.messageHandlers.getTicket.postMessage(null);
// window.webkit.messageHandlers.getUid.postMessage(null);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
info.uid = parseInt(window.androidJsObj.getUid());
info.ticket = window.androidJsObj.getTicket();
}
}
} else {
info.uid = 901189;
}
}
function getData() {
$.ajax({
type: "GET",
url: "/childrenActivity/user",
headers: {
pub_ticket: info.ticket,
pub_uid: info.uid
},
success(res) {
// console.log(res)
if (res.code === 200) {
// console.log(res)
$('.user').find('img').attr('src', res.data.user.avatar)
$('.user').find('.user-name').html(res.data.user.nick)
$('.user').find('.receive .num').html(res.data.receiveNum)
$('.user').find('.out .num').html(res.data.sendNum)
}
}
})
}
getId();
setTimeout(() => {
getData()
}, 60)
});
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,
});
});
//分享
initNav(showTitleRightNoticeFuck());
function getMessage(key, value) {
info[key] = value;
}

View File

@@ -0,0 +1,100 @@
@font-face {
font-family: 'pingfang';
src: url("../../../common/fonts/PingFang Bold.ttf");
src: url("../../../common/fonts/PingFang Bold.ttf") format("woff"), url("../../../common/fonts/PingFang Bold.ttf") format("truetype"), url("../../../common/fonts/PingFang Bold.ttf") format("svg");
}
html,
body {
background-size: 100%;
font-family: 'pingfang';
}
.max {
width: 10rem;
height: 41.78667rem;
background: url("../images/max.png") no-repeat;
background-size: cover;
}
.my {
position: fixed;
bottom: 0;
left: 0;
width: 10rem;
height: 2.33333rem;
background: url("../images/my.png") no-repeat;
background-size: cover;
display: flex;
align-items: center;
}
.my .user {
display: flex;
flex-direction: column;
justify-content: center;
margin-left: 1.68rem;
align-items: center;
}
.my .user img {
width: 1.33333rem;
height: 1.33333rem;
border-radius: 50%;
}
.my .user p {
font-size: 0.29333rem;
color: #fff;
margin-top: 0.08rem;
}
.my .schedule {
position: relative;
width: 6.66667rem;
}
.my .schedule .schedule-style,
.my .schedule .schedule-style1,
.my .schedule .schedule-style2 {
height: 0.21333rem;
background: #FFF600;
font-size: 1.01333rem;
border-radius: 0.05333rem;
position: absolute;
top: 50%;
transform: translateY(-47%);
left: 1.17333rem;
}
.my .schedule .schedule-style1 {
left: 2.85333rem;
}
.my .schedule .schedule-style2 {
left: 4.53333rem;
}
.my .schedule ul {
display: flex;
position: relative;
justify-content: space-around;
width: 6.66667rem;
}
.my .schedule ul li {
width: 1.13333rem;
height: 1.08rem;
background: url("../images/unbright.png");
background-size: 100% 100%;
line-height: 0.94667rem;
font-size: 0.34667rem;
color: #fff;
text-align: center;
}
.my .schedule ul li.active {
background: url("../images/bright.png");
background-size: 100% 100%;
color: #432ADA;
}

Some files were not shown because too many files have changed in this diff Show More