Commit 59c7bac8 authored by 任建锋's avatar 任建锋

--

parent 0267e5e3
No preview for this file type
/**
* Created by rockyl on 2019-01-02.
*
* Toast
*/
import {Entity, createTween, Tween, ease, engine,} from "scilla/src";
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import TextRenderer from "scilla-components/src/renderer/TextRenderer";
import Transform from "scilla-components/src/base/Transform";
export default class Toast extends ScillaComponent {
Label: Entity;
padding = 20;
offsetY = 0;
showDuration = 300;
hideDuration = 300;
private _bgTransform: Transform;
private _labelRenderer: TextRenderer;
private _labelTransform: Transform;
private _tweenIn: Tween;
private _tweenOut: Tween;
private _timerDuration;
onAwake() {
super.onAwake();
if (!this._bgTransform) {
const {offsetY, hideDuration, showDuration, transform} = this;
this._bgTransform = this.getComponent(Transform);
this._labelRenderer = this.Label.getComponent(TextRenderer);
this._labelTransform = this.Label.getComponent(Transform);
this._tweenIn = createTween(this, transform, false, {autoPlay: false})
.set({position: {x: 350, y: 400}})
.to({position: {x: 350, y: 400}}, showDuration, ease.cubicOut);
this._tweenOut = createTween(this, transform, false, {autoPlay: false})
.to({position: {y: 400}}, hideDuration, ease.cubicIn)
.call(this.onHidden);
this.transform.position.y = this.outPos;
}
}
private get outPos(){
return engine.renderContext.stageCenter.y + this._bgTransform.height;
}
show({content, duration = 1000}) {
this.entity.enabled = true;
const {_bgTransform, _labelRenderer, _labelTransform, padding} = this;
_labelRenderer.text = content;
_labelRenderer.measureBounds();
_bgTransform.width = _labelTransform.width + padding * 2;
_bgTransform.height = _labelTransform.height + padding * 2;
this._tweenOut.queue[0].props.position.y = 400;
this._tweenOut.queue[0].props.position.x = 350;
this._tweenIn.play(true);
if (this._timerDuration) {
clearTimeout(this._timerDuration);
this._timerDuration = null;
}
this._timerDuration = setTimeout(() => {
this.hide();
}, duration);
}
hide() {
this._tweenOut.play(true);
}
private onHidden() {
this.entity.enabled = false;
}
}
/**
* Created by rockyl on 2019-01-02.
*
* Toast
*/
import {Entity, createTween, Tween, ease, engine,} from "scilla/src";
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import TextRenderer from "scilla-components/src/renderer/TextRenderer";
import Transform from "scilla-components/src/base/Transform";
export default class Toast extends ScillaComponent {
Label: Entity;
padding = 20;
offsetY = 0;
showDuration = 300;
hideDuration = 300;
private _bgTransform: Transform;
private _labelRenderer: TextRenderer;
private _labelTransform: Transform;
private _tweenIn: Tween;
private _tweenOut: Tween;
private _timerDuration;
onAwake() {
super.onAwake();
if (!this._bgTransform) {
const {offsetY, hideDuration, showDuration, transform} = this;
this._bgTransform = this.getComponent(Transform);
this._labelRenderer = this.Label.getComponent(TextRenderer);
this._labelTransform = this.Label.getComponent(Transform);
this._tweenIn = createTween(this, transform, false, {autoPlay: false})
.set({position: {x: 375, y: 500}})
.to({position: {x: 375, y: 500}}, showDuration, ease.cubicOut);
this._tweenOut = createTween(this, transform, false, {autoPlay: false})
.to({position: {y: 400}}, hideDuration, ease.cubicIn)
.call(this.onHidden);
this.transform.position.y = this.outPos;
}
}
private get outPos(){
return engine.renderContext.stageCenter.y + this._bgTransform.height;
}
show({content, duration = 1000}) {
this.entity.enabled = true;
const {_bgTransform, _labelRenderer, _labelTransform, padding} = this;
_labelRenderer.text = content;
_labelRenderer.measureBounds();
_bgTransform.width = _labelTransform.width + padding * 20;
_bgTransform.height = _labelTransform.height + padding * 20;
this._tweenOut.queue[0].props.position.y = 400;
this._tweenOut.queue[0].props.position.x = 350;
this._tweenIn.play(true);
if (this._timerDuration) {
clearTimeout(this._timerDuration);
this._timerDuration = null;
}
this._timerDuration = setTimeout(() => {
this.hide();
}, duration);
}
hide() {
this._tweenOut.play(true);
}
private onHidden() {
this.entity.enabled = false;
}
}
/**
* Created by rockyl on 2019-01-02.
*
* Toast
*/
import {Entity, createTween, Tween, ease, engine,} from "scilla/src";
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import TextRenderer from "scilla-components/src/renderer/TextRenderer";
import Transform from "scilla-components/src/base/Transform";
export default class Toast extends ScillaComponent {
Label: Entity;
padding = 20;
offsetY = 0;
showDuration = 300;
hideDuration = 300;
private _bgTransform: Transform;
private _labelRenderer: TextRenderer;
private _labelTransform: Transform;
private _tweenIn: Tween;
private _tweenOut: Tween;
private _timerDuration;
onAwake() {
super.onAwake();
if (!this._bgTransform) {
const {offsetY, hideDuration, showDuration, transform} = this;
this._bgTransform = this.getComponent(Transform);
this._labelRenderer = this.Label.getComponent(TextRenderer);
this._labelTransform = this.Label.getComponent(Transform);
this._tweenIn = createTween(this, transform, false, {autoPlay: false})
.set({position: {x: 375, y: 500}})
.to({position: {x: 375, y: 500}}, showDuration, ease.cubicOut);
this._tweenOut = createTween(this, transform, false, {autoPlay: false})
.to({position: {y: 400}}, hideDuration, ease.cubicIn)
.call(this.onHidden);
this.transform.position.y = this.outPos;
}
}
private get outPos(){
return engine.renderContext.stageCenter.y + this._bgTransform.height;
}
show({content, duration = 1000}) {
this.entity.enabled = true;
const {_bgTransform, _labelRenderer, _labelTransform, padding} = this;
_labelRenderer.text = content;
_labelRenderer.measureBounds();
_bgTransform.width = _labelTransform.width + padding * 20;
_bgTransform.height = _labelTransform.height + padding * 20;
this._tweenOut.queue[0].props.position.y = 500;
this._tweenOut.queue[0].props.position.x = 375;
this._tweenIn.play(true);
if (this._timerDuration) {
clearTimeout(this._timerDuration);
this._timerDuration = null;
}
this._timerDuration = setTimeout(() => {
this.hide();
}, duration);
}
hide() {
this._tweenOut.play(true);
}
private onHidden() {
this.entity.enabled = false;
}
}
/**
* Created by rockyl on 2019-01-02.
*
* Toast
*/
import {Entity, createTween, Tween, ease, engine,} from "scilla/src";
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import TextRenderer from "scilla-components/src/renderer/TextRenderer";
import Transform from "scilla-components/src/base/Transform";
export default class Toast extends ScillaComponent {
Label: Entity;
padding = 20;
offsetY = 0;
showDuration = 300;
hideDuration = 300;
private _bgTransform: Transform;
private _labelRenderer: TextRenderer;
private _labelTransform: Transform;
private _tweenIn: Tween;
private _tweenOut: Tween;
private _timerDuration;
onAwake() {
super.onAwake();
if (!this._bgTransform) {
const {offsetY, hideDuration, showDuration, transform} = this;
this._bgTransform = this.getComponent(Transform);
this._labelRenderer = this.Label.getComponent(TextRenderer);
this._labelTransform = this.Label.getComponent(Transform);
this._tweenIn = createTween(this, transform, false, {autoPlay: false})
.set({position: {x: 375, y: 500}})
.to({position: {x: 375, y: 500}}, showDuration, ease.cubicOut);
this._tweenOut = createTween(this, transform, false, {autoPlay: false})
.to({position: {y: 400}}, hideDuration, ease.cubicIn)
.call(this.onHidden);
this.transform.position.y = this.outPos;
}
}
private get outPos(){
return engine.renderContext.stageCenter.y + this._bgTransform.height;
}
show({content, duration = 1000}) {
this.entity.enabled = true;
const {_bgTransform, _labelRenderer, _labelTransform, padding} = this;
_labelRenderer.text = content;
_labelRenderer.measureBounds();
_bgTransform.width = _labelTransform.width + padding * 3;
_bgTransform.height = _labelTransform.height + padding * 3;
this._tweenOut.queue[0].props.position.y = 500;
this._tweenOut.queue[0].props.position.x = 375;
this._tweenIn.play(true);
if (this._timerDuration) {
clearTimeout(this._timerDuration);
this._timerDuration = null;
}
this._timerDuration = setTimeout(() => {
this.hide();
}, duration);
}
hide() {
this._tweenOut.play(true);
}
private onHidden() {
this.entity.enabled = false;
}
}
import DialogContent from '../popup/DialogContent';
import BuriedPoint, { addBuriedPoints,addBuriedPointConfig,logExposure} from '../common/BuriedPoint';
import { Entity, Texture } from 'scilla/src';
import { TextureRenderer, Transform, TextRenderer, Button } from 'scilla-components/src';
import { callApi } from '../net/webService';
export default class GameOverPanel extends DialogContent {
onAwake() {
super.onAwake();
}
data
//BuriedPoint
img:Entity
title:Entity;
level:Entity;
localText:Entity;
imgTextureRenderer
imgTransform
titleTextRenderer
levelTextRenderer
BuriedPoint
localTextTransform
setup(data: any = {}) {
console.log(data)
this.data=data
this.imgTextureRenderer=this.img.getComponent(TextureRenderer)
this.imgTransform=this.img.getComponent(Transform)
this.localTextTransform=this.localText.getComponent(Transform)
this.titleTextRenderer=this.title.getComponent(TextRenderer)
this.levelTextRenderer=this.level.getComponent(TextRenderer)
if(data.prizeType==0){
if(data){
if(data.exposure){
console.log(data.exposure)
const exposure = data.exposure;
this.spmshow(exposure)
}
}
}
var img = new Image();
if(data.prizeType==0){
if(data.lottery){
img.src = data.lottery.imgurl;
}
}else{
img.src = data.imgurl;
}
img.onload = ()=>{
this.imgTextureRenderer.texture.setImg(img)
this.imgTextureRenderer.texture.bounds.height=img.height;
this.imgTextureRenderer.texture.bounds.width=img.width;
this.imgTransform.width=img.width;
this.imgTransform.height=img.height;
};
if(data.title){
if(data.title.length>20){
this.titleTextRenderer.text=data.title.substring(0,18)+"..."
}else{
this.titleTextRenderer.text=data.title
}
}
this.localTextTransform.alpha=1;
switch(data.prizeType){
case 0:
this.levelTextRenderer.text="获得幸运奖";
this.localTextTransform.alpha=0;
break;
case 1:
this.levelTextRenderer.text="获得一等奖";
break;
case 2:
this.levelTextRenderer.text="获得二等奖";
break;
case 3:
this.levelTextRenderer.text="获得三等奖";
break;
case 4:
this.levelTextRenderer.text="获得四等奖";
break;
}
}
spmshow(exposure){
const domain = (exposure.domain ? exposure.domain : '') + '/engine/';
callApi(
domain + 'spmshow',
exposure,
'get', 'jsonp'
).catch(e => {
console.log(e);
});
}
spmclick(exposure){
const domain = (exposure.domain ? exposure.domain : '') + '/engine/';
callApi(
domain + 'spmclick',
exposure,
'get', 'jsonp'
).catch(e => {
console.log(e);
});
}
onclick_useBtn() {
/* if(this.data.exposure){
this.BuriedPoint.onTouchTap()
} */
if(this.data.prizeType==0){
if(this.data){
if(this.data.exposure){
const exposure = this.data.exposure;
this.spmclick(exposure)
}
if(this.data.lottery){
window["downloadAppConfig"] =
{
openUrl: this.data.lottery.openUrl,
iosDownloadUrl: this.data.lottery.iosDownloadUrl,
androidDownloadUrl: this.data.lottery.androidDownloadUrl,
confirm: this.data.lottery.confirm ? this.data.lottery.confirm : false
};
window["downloadApp"]();
//window.location.href=this.data.lottery.link;
}
}
}else{
window.location.href=`/customActivity/sjf/activity/recordIndex?weddingId=${window['CFG'].weddingId}&activityId=3&brickType=6`
}
this.bubbling('fuckNavigator', 'start')
}
onclick_closeBtn() {
this.bubbling('fuckNavigator', 'start')
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="full-screen" content="true" />
<meta name="screen-orientation" content="portrait" />
<meta name="x5-fullscreen" content="true" />
<meta name="360-fullscreen" content="true" />
<style>
html,
body,
p {
padding: 0;
margin: 0;
border: 0;
}
html,
body {
height: 100%;
background-color: #282C34;
}
#loading {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
display: -webkit-flex;
justify-content: center;
-webkit-justify-content: center;
align-items: center;
-webkit-align-items: center;
color:#fff;
}
#floatLayer::-webkit-scrollbar {
display: none
}
</style>
</head>
<script src="//yun.duiba.com.cn/db_games/activity/public_js/fetch-jsonp.min.js"></script>
<!-- <script src="//yun.duiba.com.cn/db_games/activity/public_js/fetch.min.js"></script>
-->
<div id="gameContainer" style="width: 100%;height: 100%;overflow: hidden;"></div>
<audio id="bgmusic" src="//yun.duiba.com.cn/db_games/activity/wwjsjf-20190619/wawaji.mp3" autoplay preload loop></audio>
<div id="loading">
加载中...
</div>
<script src="//yun.duiba.com.cn/db_games/activity/wx_test/zepto.min.js"></script>
<script src="//yun.duiba.com.cn/db_games/activity/wwjsjf-20190619/downloadApp.js"></script>
<script src="//yun.duiba.com.cn/db_games/activity/wx_test/security.js"></script>
<script src="//yun.duiba.com.cn/db_games/activity/wwjsjf-20190619/1562665162/bundle.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
function requirelogin() {
console.log('requirelogin');
}
var rule="1、点击开始即可开始抓奖品;<br><br>2、奖品为随机抓取,抓到实物奖品的获奖用户请于获奖当日在宴会现场工作人员处领取奖品,否则视为放弃领奖;<br><br>3、若未在游戏开放时间内或剩余参与次数为0时开始游戏,将无法参与游戏;<br><br>4、点击【我的奖品】可查看获奖情况;<br><br>5、在本次活动期间,如用户存在任何违反法律、法规、水井坊活动规则的行为,包括但不限于作弊得奖等行为,水井坊有权取消用户的中奖资格,有权撤销违规交易;<br><br>6、在法律规定的范围内,水井坊对本次活动拥有最终解释权。";
setTimeout(function () {
var loadingEl = document.getElementById('loading');
function onProcess(p) {
if (p >= 1) {
loadingEl.style.display = 'none';
}
}
var options = {
resPath:"//yun.duiba.com.cn/db_games/activity/wwjsjf-20190619/1562665162/"
};
window['new-kickball'].startup(document.getElementById('gameContainer'), options, onProcess);
}, 100);
function autoPlayAudio() {
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i)) {
wx.config({
debug: false,
appId: '',
timestamp: 1,
nonceStr: '',
signature: '',
jsApiList: []
});
wx.ready(function() {
try {
document.getElementById('bgmusic').play();
} catch (error) {
}
});
} else {
window.onload=function(){
try {
document.getElementById('bgmusic').play();
} catch (error) {
}
}
}
}
document.addEventListener("WeixinJSBridgeReady", function () {//微信
try {
document.getElementById('bgmusic').play();
} catch (error) {
}
}, false);
autoPlayAudio();
// 推荐使用方法1
</script>
{
"code": null,
"data": {
"imgurl": "//yun.duiba.com.cn/h5/custom_project/skins/shuijingfang/image/luckynewn.png",
"exposure": {
"dpm": "1.4.1.0",
"os": "iPhone",
"isEmbed": true,
"orderId": "282",
"consumerId": 1561639316728,
"ip": "221.12.7.235",
"materialId": 20553,
"advertId": 4366,
"dcm": "104.4366.0.0",
"activityId": 19,
"activityUseType": "0",
"appId": 1,
"domain": "//activity.tuiatest.cn",
"slotId": 2053
},
"orderId": 282,
"freeLimit": 51,
"prizeType": 1,
"link": null,
"orderStatus": 2,
"lottery": null,
"title": "新媒体测试数据优化新媒体测试数据优化优化化",
"prizeId": 60
},
"success": true,
"desc": null,
"timestamp": 1561639317309
}
\ No newline at end of file
{
"code": null,
"data": {
"imgurl": "//yun.duiba.com.cn/h5/custom_project/skins/shuijingfang/image/luckynewn.png",
"exposure": {
"dpm": "1.4.1.0",
"os": "iPhone",
"isEmbed": true,
"orderId": "282",
"consumerId": 1561639316728,
"ip": "221.12.7.235",
"materialId": 20553,
"advertId": 4366,
"dcm": "104.4366.0.0",
"activityId": 19,
"activityUseType": "0",
"appId": 1,
"domain": "//activity.tuiatest.cn",
"slotId": 2053
},
"orderId": 282,
"freeLimit": 51,
"prizeType": 1,
"link": null,
"orderStatus": 2,
"lottery": {
"androidDownloadUrl": "//activity.tuiatest.cn/activity/redirect?orderId=282&activityId=19&appId=1&consumerId=1561639316728&materialId=20553&os=iPhone&advertId=4366&ip=221.12.7.235&activityUseType=0&dpm=1.4.1.0&dcm=104.4366.0.0&device_type=directad&url=https%3A%2F%2Factivity.tuibat.com%2Fland%2FlandPage%3Fid%3DMzkzNA",
"link": null,
"useBtnText": "马上使用",
"title": "新媒体测试数据优化-7",
"imgurl": "//////yun.duiba.com.cn/babi/img/d74274be-dy0pknqziu.gif",
"showUse": true,
"linkTo": null,
"iosDownloadUrl": "//activity.tuiatest.cn/activity/redirect?orderId=282&activityId=19&appId=1&consumerId=1561639316728&materialId=20553&os=iPhone&advertId=4366&ip=221.12.7.235&activityUseType=0&dpm=1.4.1.0&dcm=104.4366.0.0&device_type=directad&url=https%3A%2F%2Factivity.tuibat.com%2Fland%2FlandPage%3Fid%3DMzkzNA",
"couponKey": null,
"tip": "一句话描述",
"couponCode": null,
"isDownloadUrl": null,
"validate": "2019-07-03"
},
"title": "新媒体测试数据优化新媒体测试数据优化优化化",
"prizeId": 60
},
"success": true,
"desc": null,
"timestamp": 1561639317309
}
\ No newline at end of file
{
"code": null,
"data": {
/* "imgurl": "//yun.duiba.com.cn/h5/custom_project/skins/shuijingfang/image/luckynewn.png",
"exposure": {
"dpm": "1.4.1.0",
"os": "iPhone",
"isEmbed": true,
"orderId": "282",
"consumerId": 1561639316728,
"ip": "221.12.7.235",
"materialId": 20553,
"advertId": 4366,
"dcm": "104.4366.0.0",
"activityId": 19,
"activityUseType": "0",
"appId": 1,
"domain": "//activity.tuiatest.cn",
"slotId": 2053
},
"orderId": 282,
"freeLimit": 51,
"prizeType": 1,
"link": null,
"orderStatus": 2,
"lottery": {
"androidDownloadUrl": "//activity.tuiatest.cn/activity/redirect?orderId=282&activityId=19&appId=1&consumerId=1561639316728&materialId=20553&os=iPhone&advertId=4366&ip=221.12.7.235&activityUseType=0&dpm=1.4.1.0&dcm=104.4366.0.0&device_type=directad&url=https%3A%2F%2Factivity.tuibat.com%2Fland%2FlandPage%3Fid%3DMzkzNA",
"link": null,
"useBtnText": "马上使用",
"title": "新媒体测试数据优化-7",
"imgurl": "//////yun.duiba.com.cn/babi/img/d74274be-dy0pknqziu.gif",
"showUse": true,
"linkTo": null,
"iosDownloadUrl": "//activity.tuiatest.cn/activity/redirect?orderId=282&activityId=19&appId=1&consumerId=1561639316728&materialId=20553&os=iPhone&advertId=4366&ip=221.12.7.235&activityUseType=0&dpm=1.4.1.0&dcm=104.4366.0.0&device_type=directad&url=https%3A%2F%2Factivity.tuibat.com%2Fland%2FlandPage%3Fid%3DMzkzNA",
"couponKey": null,
"tip": "一句话描述",
"couponCode": null,
"isDownloadUrl": null,
"validate": "2019-07-03"
},
"title": "新媒体测试数据优化新媒体测试数据优化优化化",
"prizeId": 60 */
},
"success": true,
"desc": null,
"timestamp": 1561639317309
}
\ No newline at end of file
{
"code": null,
"data": null,
"success": true,
"desc": null,
"timestamp": 1561639317309
}
\ No newline at end of file
{
"code": null,
"data": {
"imgurl": "//yun.duiba.com.cn/h5/custom_project/skins/shuijingfang/image/luckynewn.png",
"exposure": {
"dpm": "1.4.1.0",
"os": "iPhone",
"isEmbed": true,
"orderId": "282",
"consumerId": 1561639316728,
"ip": "221.12.7.235",
"materialId": 20553,
"advertId": 4366,
"dcm": "104.4366.0.0",
"activityId": 19,
"activityUseType": "0",
"appId": 1,
"domain": "//activity.tuiatest.cn",
"slotId": 2053
},
"orderId": 282,
"freeLimit": 51,
"prizeType": 1,
"link": null,
"orderStatus": 2,
"lottery": {
"androidDownloadUrl": "//activity.tuiatest.cn/activity/redirect?orderId=282&activityId=19&appId=1&consumerId=1561639316728&materialId=20553&os=iPhone&advertId=4366&ip=221.12.7.235&activityUseType=0&dpm=1.4.1.0&dcm=104.4366.0.0&device_type=directad&url=https%3A%2F%2Factivity.tuibat.com%2Fland%2FlandPage%3Fid%3DMzkzNA",
"link": null,
"useBtnText": "马上使用",
"title": "新媒体测试数据优化-7",
"imgurl": "//////yun.duiba.com.cn/babi/img/d74274be-dy0pknqziu.gif",
"showUse": true,
"linkTo": null,
"iosDownloadUrl": "//activity.tuiatest.cn/activity/redirect?orderId=282&activityId=19&appId=1&consumerId=1561639316728&materialId=20553&os=iPhone&advertId=4366&ip=221.12.7.235&activityUseType=0&dpm=1.4.1.0&dcm=104.4366.0.0&device_type=directad&url=https%3A%2F%2Factivity.tuibat.com%2Fland%2FlandPage%3Fid%3DMzkzNA",
"couponKey": null,
"tip": "一句话描述",
"couponCode": null,
"isDownloadUrl": null,
"validate": "2019-07-03"
},
"title": "新媒体测试数据优化新媒体测试数据优化优化化",
"prizeId": 60
},
"success": true,
"desc": null,
"timestamp": 1561639317309
}
\ No newline at end of file
{
"code": null,
"data": {
"imgurl": "//yun.duiba.com.cn/h5/custom_project/skins/shuijingfang/image/luckynewn.png",
"exposure": {
"dpm": "1.4.1.0",
"os": "iPhone",
"isEmbed": true,
"orderId": "282",
"consumerId": 1561639316728,
"ip": "221.12.7.235",
"materialId": 20553,
"advertId": 4366,
"dcm": "104.4366.0.0",
"activityId": 19,
"activityUseType": "0",
"appId": 1,
"domain": "//activity.tuiatest.cn",
"slotId": 2053
},
"orderId": 282,
"freeLimit": 51,
"prizeType": 5,
"link": null,
"orderStatus": 2,
"lottery": {
"androidDownloadUrl": "//activity.tuiatest.cn/activity/redirect?orderId=282&activityId=19&appId=1&consumerId=1561639316728&materialId=20553&os=iPhone&advertId=4366&ip=221.12.7.235&activityUseType=0&dpm=1.4.1.0&dcm=104.4366.0.0&device_type=directad&url=https%3A%2F%2Factivity.tuibat.com%2Fland%2FlandPage%3Fid%3DMzkzNA",
"link": null,
"useBtnText": "马上使用",
"title": "新媒体测试数据优化-7",
"imgurl": "//////yun.duiba.com.cn/babi/img/d74274be-dy0pknqziu.gif",
"showUse": true,
"linkTo": null,
"iosDownloadUrl": "//activity.tuiatest.cn/activity/redirect?orderId=282&activityId=19&appId=1&consumerId=1561639316728&materialId=20553&os=iPhone&advertId=4366&ip=221.12.7.235&activityUseType=0&dpm=1.4.1.0&dcm=104.4366.0.0&device_type=directad&url=https%3A%2F%2Factivity.tuibat.com%2Fland%2FlandPage%3Fid%3DMzkzNA",
"couponKey": null,
"tip": "一句话描述",
"couponCode": null,
"isDownloadUrl": null,
"validate": "2019-07-03"
},
"title": "新媒体测试数据优化新媒体测试数据优化优化化",
"prizeId": 60
},
"success": true,
"desc": null,
"timestamp": 1561639317309
}
\ No newline at end of file
{
"success":true,
"code":"400005",
"desc":null,
"timestamp":1561445946866,
"data":{
"orderId":1,
"prizeId":null,
"title":"5搜豆",
"prizeType":5,
"orderStatus":1,
"imgurl":"//yun.duiba.com.cn/images/201806/y7jhibke16.png",
"link":"//activity.m.duiba.com.cn/activity/takePrizeNew?recordId=4552894285&dbnewopen",
"freeLimit":0
}
}
\ No newline at end of file
{
"success":false,
"code":"400005",
"desc":null,
"timestamp":1561445946866,
"data":{
"orderId":1,
"prizeId":null,
"title":"5搜豆",
"prizeType":5,
"orderStatus":1,
"imgurl":"//yun.duiba.com.cn/images/201806/y7jhibke16.png",
"link":"//activity.m.duiba.com.cn/activity/takePrizeNew?recordId=4552894285&dbnewopen",
"freeLimit":0
}
}
\ No newline at end of file
{
"success":false,
"code":"400006",
"desc":null,
"timestamp":1561445946866,
"data":{
"orderId":1,
"prizeId":null,
"title":"5搜豆",
"prizeType":5,
"orderStatus":1,
"imgurl":"//yun.duiba.com.cn/images/201806/y7jhibke16.png",
"link":"//activity.m.duiba.com.cn/activity/takePrizeNew?recordId=4552894285&dbnewopen",
"freeLimit":0
}
}
\ No newline at end of file
{
"code": null,
"data": {
"imgurl": "//yun.duiba.com.cn/h5/custom_project/skins/shuijingfang/image/luckynewn.png",
"exposure": {
"dpm": "1.4.1.0",
"os": "iPhone",
"isEmbed": true,
"orderId": "282",
"consumerId": 1561639316728,
"ip": "221.12.7.235",
"materialId": 20553,
"advertId": 4366,
"dcm": "104.4366.0.0",
"activityId": 19,
"activityUseType": "0",
"appId": 1,
"domain": "//activity.tuiatest.cn",
"slotId": 2053
},
"orderId": 282,
"freeLimit": 51,
"prizeType": 5,
"link": null,
"orderStatus": 2,
"lottery": {
"androidDownloadUrl": "//activity.tuiatest.cn/activity/redirect?orderId=282&activityId=19&appId=1&consumerId=1561639316728&materialId=20553&os=iPhone&advertId=4366&ip=221.12.7.235&activityUseType=0&dpm=1.4.1.0&dcm=104.4366.0.0&device_type=directad&url=https%3A%2F%2Factivity.tuibat.com%2Fland%2FlandPage%3Fid%3DMzkzNA",
"link": null,
"useBtnText": "马上使用",
"title": "新媒体测试数据优化-7",
"imgurl": "//////yun.duiba.com.cn/babi/img/d74274be-dy0pknqziu.gif",
"showUse": true,
"linkTo": null,
"iosDownloadUrl": "//activity.tuiatest.cn/activity/redirect?orderId=282&activityId=19&appId=1&consumerId=1561639316728&materialId=20553&os=iPhone&advertId=4366&ip=221.12.7.235&activityUseType=0&dpm=1.4.1.0&dcm=104.4366.0.0&device_type=directad&url=https%3A%2F%2Factivity.tuibat.com%2Fland%2FlandPage%3Fid%3DMzkzNA",
"couponKey": null,
"tip": "一句话描述",
"couponCode": null,
"isDownloadUrl": null,
"validate": "2019-07-03"
},
"title": "新媒体测试数据优化新媒体测试数据优化优化化",
"prizeId": 60
},
"success": true,
"desc": null,
"timestamp": 1561639317309
}
\ No newline at end of file
{
"code": null,
"data": {
"imgurl": "//yun.duiba.com.cn/h5/custom_project/skins/shuijingfang/image/luckynewn.png",
"exposure": {
"dpm": "1.4.1.0",
"os": "iPhone",
"isEmbed": true,
"orderId": "282",
"consumerId": 1561639316728,
"ip": "221.12.7.235",
"materialId": 20553,
"advertId": 4366,
"dcm": "104.4366.0.0",
"activityId": 19,
"activityUseType": "0",
"appId": 1,
"domain": "//activity.tuiatest.cn",
"slotId": 2053
},
"orderId": 282,
"freeLimit": 51,
"prizeType": 1,
"link": null,
"orderStatus": 2,
"lottery": {
"androidDownloadUrl": "//activity.tuiatest.cn/activity/redirect?orderId=282&activityId=19&appId=1&consumerId=1561639316728&materialId=20553&os=iPhone&advertId=4366&ip=221.12.7.235&activityUseType=0&dpm=1.4.1.0&dcm=104.4366.0.0&device_type=directad&url=https%3A%2F%2Factivity.tuibat.com%2Fland%2FlandPage%3Fid%3DMzkzNA",
"link": null,
"useBtnText": "马上使用",
"title": "新媒体测试数据优化-7",
"imgurl": "//////yun.duiba.com.cn/babi/img/d74274be-dy0pknqziu.gif",
"showUse": true,
"linkTo": null,
"iosDownloadUrl": "//activity.tuiatest.cn/activity/redirect?orderId=282&activityId=19&appId=1&consumerId=1561639316728&materialId=20553&os=iPhone&advertId=4366&ip=221.12.7.235&activityUseType=0&dpm=1.4.1.0&dcm=104.4366.0.0&device_type=directad&url=https%3A%2F%2Factivity.tuibat.com%2Fland%2FlandPage%3Fid%3DMzkzNA",
"couponKey": null,
"tip": "一句话描述",
"couponCode": null,
"isDownloadUrl": null,
"validate": "2019-07-03"
},
"title": "新媒体测试数据优化新媒体测试数据优化优化化",
"prizeId": 60
},
"success": true,
"desc": null,
"timestamp": 1561639317309
}
\ No newline at end of file
No preview for this file type
This diff is collapsed.
......@@ -34,7 +34,8 @@ export default class Toast extends ScillaComponent {
this._labelTransform = this.Label.getComponent(Transform);
this._tweenIn = createTween(this, transform, false, {autoPlay: false})
.to({position: {x: 350, y: 400}}, showDuration, ease.cubicOut);
.set({position: {x: 375, y: 500}})
.to({position: {x: 375, y: 500}}, showDuration, ease.cubicOut);
this._tweenOut = createTween(this, transform, false, {autoPlay: false})
.to({position: {y: 400}}, hideDuration, ease.cubicIn)
.call(this.onHidden);
......@@ -55,11 +56,11 @@ export default class Toast extends ScillaComponent {
_labelRenderer.text = content;
_labelRenderer.measureBounds();
_bgTransform.width = _labelTransform.width + padding * 2;
_bgTransform.height = _labelTransform.height + padding * 2;
_bgTransform.width = _labelTransform.width + padding * 3;
_bgTransform.height = _labelTransform.height + padding * 3;
this._tweenOut.queue[0].props.position.y = 400;
this._tweenOut.queue[0].props.position.x = 350;
this._tweenOut.queue[0].props.position.y = 500;
this._tweenOut.queue[0].props.position.x = 375;
this._tweenIn.play(true);
......
......@@ -71,20 +71,20 @@ export default class GameOverPanel extends DialogContent {
this.localTextTransform.alpha=1;
switch(data.prizeType){
case 0:
this.levelTextRenderer.text="幸运奖";
this.levelTextRenderer.text="获得幸运奖";
this.localTextTransform.alpha=0;
break;
case 1:
this.levelTextRenderer.text="一等奖";
this.levelTextRenderer.text="获得一等奖";
break;
case 2:
this.levelTextRenderer.text="二等奖";
this.levelTextRenderer.text="获得二等奖";
break;
case 3:
this.levelTextRenderer.text="三等奖";
this.levelTextRenderer.text="获得三等奖";
break;
case 4:
this.levelTextRenderer.text="四等奖";
this.levelTextRenderer.text="获得四等奖";
break;
}
}
......
......@@ -77,6 +77,8 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
this.musicOffTransform.alpha=0;
this.musicOnTransform.alpha=1;
}
musicAn
......@@ -359,7 +361,8 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
if(data){
switch(data){
case "400001":
this.bubbling('showDialog', 'Alert',"活动不存在");
//this.bubbling('showDialog', 'Alert',"活动不存在");
this.bubbling('showToast', '活动不存在',2000)
break;
case "400002":
this.bubbling('showDialog', 'AlertLose',"您已经没有抽奖次数了");
......@@ -371,10 +374,12 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
this.bubbling('showDialog', 'AlertLose',"排行榜订单状态不正确");
break;
case "400005":
this.bubbling('showDialog', 'Alert',"活动未开始\n敬请期待");
this.bubbling('showToast', '活动未开始\n敬请期待',2000)
//this.bubbling('showDialog', 'Alert',"活动未开始\n敬请期待");
break;
case "400006":
this.bubbling('showDialog', 'Alert',"活动已结束\n下次早点来哦");
this.bubbling('showToast', '活动已结束\n下次早点来哦',2000)
//this.bubbling('showDialog', 'Alert',"活动已结束\n下次早点来哦");
break;
default:
this.bubbling('showDialog', 'AlertLose',"网络异常,请稍后再试");
......
assets/singles/alert/sure_btn.png

20.3 KB | W: | H:

assets/singles/alert/sure_btn.png

9.46 KB | W: | H:

assets/singles/alert/sure_btn.png
assets/singles/alert/sure_btn.png
assets/singles/alert/sure_btn.png
assets/singles/alert/sure_btn.png
  • 2-up
  • Swipe
  • Onion skin
assets/singles/start_scene/jiazi.png

10.5 KB | W: | H:

assets/singles/start_scene/jiazi.png

16.1 KB | W: | H:

assets/singles/start_scene/jiazi.png
assets/singles/start_scene/jiazi.png
assets/singles/start_scene/jiazi.png
assets/singles/start_scene/jiazi.png
  • 2-up
  • Swipe
  • Onion skin
assets/singles/start_scene/ruleBtn.png

1.34 KB | W: | H:

assets/singles/start_scene/ruleBtn.png

4.83 KB | W: | H:

assets/singles/start_scene/ruleBtn.png
assets/singles/start_scene/ruleBtn.png
assets/singles/start_scene/ruleBtn.png
assets/singles/start_scene/ruleBtn.png
  • 2-up
  • Swipe
  • Onion skin
assets/singles/start_scene/startBtn.png

30.6 KB | W: | H:

assets/singles/start_scene/startBtn.png

22.9 KB | W: | H:

assets/singles/start_scene/startBtn.png
assets/singles/start_scene/startBtn.png
assets/singles/start_scene/startBtn.png
assets/singles/start_scene/startBtn.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
{
"file": "gameover.png",
"frames": {
"得分-拷贝.png": {
"x": 1,
"y": 1,
"w": 571,
"h": 672,
"offX": 0,
"offY": 0,
"sourceW": 571,
"sourceH": 752
},
"按钮2-拷贝.png": {
"x": 574,
"y": 1,
"w": 338,
"h": 110,
"offX": 0,
"offY": 0,
"sourceW": 338,
"sourceH": 110
},
"再来一次.png": {
"x": 574,
"y": 113,
"w": 259,
"h": 85,
"offX": 0,
"offY": 0,
"sourceW": 259,
"sourceH": 85
},
"Bitmap-4-1.png": {
"x": 835,
"y": 113,
"w": 48,
"h": 48,
"offX": 0,
"offY": 0,
"sourceW": 48,
"sourceH": 48
},
"得分.png": {
"x": 1,
"y": 675,
"w": 571,
"h": 652,
"offX": 0,
"offY": 0,
"sourceW": 571,
"sourceH": 652
}
}
}
\ No newline at end of file
{
"file": "play.png",
"frames": {
"淡蓝-1.png": {
"x": 1,
"y": 1,
"w": 223,
"h": 214,
"offX": 0,
"offY": 0,
"sourceW": 223,
"sourceH": 214
},
"绿-1.png": {
"x": 226,
"y": 1,
"w": 223,
"h": 213,
"offX": 0,
"offY": 0,
"sourceW": 223,
"sourceH": 213
},
"大炮板子-1.png": {
"x": 451,
"y": 1,
"w": 93,
"h": 23,
"offX": 0,
"offY": 0,
"sourceW": 93,
"sourceH": 23
},
"发弹雾气-1.png": {
"x": 451,
"y": 26,
"w": 87,
"h": 34,
"offX": 0,
"offY": 0,
"sourceW": 87,
"sourceH": 34
},
"子弹-1.png": {
"x": 540,
"y": 26,
"w": 10,
"h": 32,
"offX": 0,
"offY": 0,
"sourceW": 10,
"sourceH": 32
},
"大炮的头-1.png": {
"x": 451,
"y": 62,
"w": 70,
"h": 88,
"offX": 0,
"offY": 0,
"sourceW": 70,
"sourceH": 88
},
"淡蓝火箭-1.png": {
"x": 523,
"y": 62,
"w": 25,
"h": 27,
"offX": 0,
"offY": 0,
"sourceW": 25,
"sourceH": 27
},
"red20.png": {
"x": 523,
"y": 91,
"w": 25,
"h": 26,
"offX": 0,
"offY": 0,
"sourceW": 25,
"sourceH": 26
},
"1-1-1.png": {
"x": 451,
"y": 152,
"w": 45,
"h": 45,
"offX": 0,
"offY": 0,
"sourceW": 45,
"sourceH": 45
},
"紫-1.png": {
"x": 226,
"y": 216,
"w": 223,
"h": 213,
"offX": 0,
"offY": 0,
"sourceW": 223,
"sourceH": 213
},
"黄-1.png": {
"x": 1,
"y": 217,
"w": 222,
"h": 214,
"offX": 0,
"offY": 0,
"sourceW": 222,
"sourceH": 214
},
"蓝-1.png": {
"x": 225,
"y": 431,
"w": 222,
"h": 213,
"offX": 0,
"offY": 0,
"sourceW": 222,
"sourceH": 213
},
"红-1.png": {
"x": 1,
"y": 433,
"w": 222,
"h": 212,
"offX": 0,
"offY": 0,
"sourceW": 222,
"sourceH": 212
},
"火-1.png": {
"x": 225,
"y": 646,
"w": 128,
"h": 40,
"offX": 0,
"offY": 0,
"sourceW": 128,
"sourceH": 40
},
"火箭-1.png": {
"x": 355,
"y": 646,
"w": 128,
"h": 40,
"offX": 0,
"offY": 0,
"sourceW": 128,
"sourceH": 40
}
}
}
\ No newline at end of file
{
"file": "rule.png",
"frames": {
"游戏说明-1.png": {
"x": 1,
"y": 1,
"w": 571,
"h": 641,
"offX": 0,
"offY": 0,
"sourceW": 571,
"sourceH": 641
},
"closeBtn-1.png": {
"x": 1,
"y": 644,
"w": 56,
"h": 56,
"offX": 0,
"offY": 0,
"sourceW": 56,
"sourceH": 56
}
}
}
\ No newline at end of file
{
"file": "start.png",
"frames": {
"按钮-2.png": {
"x": 1,
"y": 1,
"w": 305,
"h": 99,
"offX": 0,
"offY": 0,
"sourceW": 305,
"sourceH": 99
},
"排行榜.png": {
"x": 1,
"y": 102,
"w": 88,
"h": 122,
"offX": 0,
"offY": 0,
"sourceW": 88,
"sourceH": 122
},
"规则-1.png": {
"x": 91,
"y": 102,
"w": 88,
"h": 122,
"offX": 0,
"offY": 0,
"sourceW": 88,
"sourceH": 122
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>new-kickball</title>
<meta name="viewport"
content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="full-screen" content="true" />
<meta name="screen-orientation" content="portrait" />
<meta name="x5-fullscreen" content="true" />
<meta name="360-fullscreen" content="true" />
<style>
html,
body,
p {
padding: 0;
margin: 0;
border: 0;
}
html,
body {
height: 100%;
background-color: #282C34;
}
#loading {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
display: -webkit-flex;
justify-content: center;
-webkit-justify-content: center;
align-items: center;
-webkit-align-items: center;
}
#floatLayer::-webkit-scrollbar {
display: none
}
</style>
</head>
<body>
<script src="https://cdn.bootcss.com/fetch-jsonp/1.1.3/fetch-jsonp.min.js"></script>
<div id="gameContainer" style="width: 100%;height: 100%;overflow: hidden;"></div>
<audio id="bgmusic" src="//yun.duiba.com.cn/db_games/activity/wwjsjf-20190619/wawaji.mp3" autoplay preload loop></audio>
<div id="loading">
<img src="loading.gif" />
</div>
<script src="./zepto.min.js"></script>
<script src="./security.js"></script>
<script src="./downloadApp.js"></script>
<script src="bundle.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
function autoPlayAudio() {
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i)) {
wx.config({
debug: false,
appId: '',
timestamp: 1,
nonceStr: '',
signature: '',
jsApiList: []
});
wx.ready(function() {
document.getElementById('bgmusic').play();
});
} else {
window.onload=function(){
document.getElementById('bgmusic').play();
}
}
}
autoPlayAudio(); // 推荐使用方法1
var CFG = {
activityId: 3561555,//活动id
freeLimit: 3,//剩余次数
weixinUid:'1',//微信uid
nickname:'nickname',//昵称
avatar: 'avatar',
startTime:1561447512324,
endTime:1562887512324,
weddingId:"1"
};
function requirelogin() {
console.log('requirelogin');
}
var rule="1、点击开始即可开始抓奖品;<br><br>2、奖品为随机抓取,抓到实物奖品的获奖用户请于获奖当日在宴会现场工作人员处领取奖品,否则视为放弃领奖;<br><br>3、若未在游戏开放时间内或剩余参与次数为0时开始游戏,将无法参与游戏;<br><br>4、点击【我的奖品】可查看获奖情况;<br><br>5、在本次活动期间,如用户存在任何违反法律、法规、水井坊活动规则的行为,包括但不限于作弊得奖等行为,水井坊有权取消用户的中奖资格,有权撤销违规交易;";
setTimeout(function () {
var loadingEl = document.getElementById('loading');
function onProcess(p) {
if (p >= 1) {
loadingEl.style.display = 'none';
}
}
var options = {};//window['inputOptions'] ||
window['new-kickball'].startup(document.getElementById('gameContainer'), options, onProcess);
}, 100);
</script>
<script>
document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] +
':35729/livereload.js?snipver=1"></' + 'script>')
</script>
</body>
</html>
\ No newline at end of file
{
"name": "new-kickball",
"engineConfig": {
"fps": 60,
"designWidth": 750,
"designHeight": 1624,
"scaleMode": "fixedWidth",
"modifyCanvasSize": false,
"resPath": ""
},
"customConfig": {
"scene": {
"scenes": {
"main": "scenes/main.scene"
},
"entryScene": "main"
},
"webServiceUrl-": "http://10.10.93.204:7555 http://localhost:3010",
"webServiceUrl": ""
},
"dataCenterConfig": {
"dataCenterRoot": [
"API",
"CFG"
]
}
}
......@@ -56,7 +56,7 @@
<script src="//yun.duiba.com.cn/db_games/activity/wx_test/zepto.min.js"></script>
<script src="//yun.duiba.com.cn/db_games/activity/wwjsjf-20190619/downloadApp.js"></script>
<script src="//yun.duiba.com.cn/db_games/activity/wx_test/security.js"></script>
<script src="//yun.duiba.com.cn/db_games/activity/wwjsjf-20190619/1562058643/bundle.js"></script>
<script src="//yun.duiba.com.cn/db_games/activity/wwjsjf-20190619/1562665162/bundle.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
......@@ -76,7 +76,7 @@
}
var options = {
resPath:"//yun.duiba.com.cn/db_games/activity/wwjsjf-20190619/1562058643/"
resPath:"//yun.duiba.com.cn/db_games/activity/wwjsjf-20190619/1562665162/"
};
window['new-kickball'].startup(document.getElementById('gameContainer'), options, onProcess);
}, 100);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment