Commit b3249a9d authored by shunx 马's avatar shunx 马

Merge branch 'disu0811' of gitlab2.dui88.com:wildfirecode13/wfc13 into disu0811

parents 55819f6c 3635b2fe
# wfc13 # wfc13
&wxaParam=%7B%22appid%22%3A%22wxcd3b2d888927936b%22%2C%22memberId%22%3A%22ff8080817b11bbd1017b4dfe576946b2%22%2C%22enterpriseId%22%3A%22ff80808179f157e60179f8d95b2d6e1a%22%2C%22phoneNumber%22%3A%22%22%2C%22unionid%22%3A%22oIbvOtwEjwRpl-FKu_ahaUp_TJ0Q%22%2C%22openid%22%3A%22omJSN5Os3FIrdIwoHYopAQbR0SqI%22%2C%22wxOpenid%22%3A%22ofavQjk1vUSRbd8dcw-eLLXPUHgE%22%2C%22cliqueId%22%3A%22-1%22%2C%22cliqueMemberId%22%3A%22-1%22%2C%22useClique%22%3A%22%22%2C%22appkey%22%3A%22wxb499d8c7548a9ab0%22%7D
\ No newline at end of file
{ {
"code": null, "code": null,
"data": 123, "data": 123,
"message": null, "message": 123,
"success": true "success": 1
} }
\ No newline at end of file
...@@ -32,5 +32,5 @@ ...@@ -32,5 +32,5 @@
] ]
}, },
"message": "12312312", "message": "12312312",
"success": 1 "success": 0
} }
\ No newline at end of file
...@@ -120,11 +120,11 @@ ...@@ -120,11 +120,11 @@
"sendCount": 1 "sendCount": 1
} }
], ],
"surplusCount": 1, "surplusCount": 11,
"credits": 111111, "credits": 111111,
"needCredits": 110, "needCredits": 110,
"type": 2, "type": 1,
"isMember":1 "vip":1
}, },
"message": null, "message": null,
"success": true "success": true
......
...@@ -12,18 +12,18 @@ ...@@ -12,18 +12,18 @@
"mock-webpack-plugin": "^2.0.0", "mock-webpack-plugin": "^2.0.0",
"path": "^0.12.7", "path": "^0.12.7",
"progress": "^2.0.0", "progress": "^2.0.0",
"readline": "^1.3.0",
"ts-loader": "^4.0.0", "ts-loader": "^4.0.0",
"tslint": "^5.9.1", "tslint": "^5.9.1",
"typescript": "^3.5.1", "typescript": "^3.5.1",
"webpack": "^4.1.0", "webpack": "^4.1.0",
"webpack-cli": "^3.1.1", "webpack-cli": "^3.1.1",
"webpack-dev-server": "^3.1.0", "webpack-dev-server": "^3.1.0",
"webpack-merge": "^4.1.2", "webpack-merge": "^4.1.2"
"readline": "^1.3.0"
}, },
"dependencies": { "dependencies": {
"@spark/share": "^2.0.90", "@spark/share": "^2.0.90",
"duiba-utils": "^1.0.9" "duiba-utils": "^1.0.11"
}, },
"scripts": { "scripts": {
"clearSameImg": "node scripts/clearSameImg && node scripts/flushRes", "clearSameImg": "node scripts/clearSameImg && node scripts/flushRes",
......
import { layers, destroyLayers } from "../module/views/layers"; import { changeScene, destroyAllCtrls } from "../module/ctrls";
import { RES } from "../module/RES"; import { RES } from "../module/RES";
import { changeScene, showWaiting, destroyAllCtrls, showPanel, hideWaiting } from "../module/ctrls"; import { getUrlParams } from "../module/tools/WebTool";
import { destroyLayers, layers } from "../module/views/layers";
import { IndexScene } from "../src/scenes/IndexScene";
import getQueryParams from "./common/getQueryParams";
import { getSearch } from "./getSearch";
import { ResJson } from "./ResJson"; import { ResJson } from "./ResJson";
import { startShare } from "./share";
import { SkinJson } from "./SkinJson"; import { SkinJson } from "./SkinJson";
import { LoadingScene } from "./template/LoadingScene";
import { destroyWebNetData, sendWebNet } from "./WebNet"; import { destroyWebNetData, sendWebNet } from "./WebNet";
import { IndexScene } from "../src/scenes/IndexScene";
import { getUrlParams } from "../module/tools/WebTool";
import getQueryParams from "./common/getQueryParams";
import { WebNetName } from "./WebNetName"; import { WebNetName } from "./WebNetName";
import {accessLog} from 'duiba-utils'
/** /**
...@@ -50,15 +52,25 @@ export class Main { ...@@ -50,15 +52,25 @@ export class Main {
private async onAddToStage() { private async onAddToStage() {
if(getQueryParams().iscustom) { if(getQueryParams().iscustom) {
console.log('fuck');
sendWebNet(WebNetName.login,{ sendWebNet(WebNetName.login,{
appId:getUrlParams("appID"), appId:getUrlParams("appID"),
unionid:'oIbvOt3D_z7AfHz9lI6VmDEeYDIk', unionid:'oIbvOt3D_z7AfHz9lI6VmDEeYDIk',
redirectUrl:'https://www.baidu.com/' redirectUrl:`http://activity.m.duibatest.com.cn/projectx/pe4f11ce9/index.html?appID=19493&issharepage=${getQueryParams().issharepage}`
}).then(res=>{
location.href=res.data;
}); });
return; return;
} }
if(getQueryParams().issharepage == 1) {
console.log('分享进入')
}else{
console.log('主动进入')
}
startShare();
//初始化层级 //初始化层级
layers.init(this.stage); layers.init(this.stage);
console.log("初始化层级完成") console.log("初始化层级完成")
...@@ -71,7 +83,7 @@ export class Main { ...@@ -71,7 +83,7 @@ export class Main {
//加载通用资源 //加载通用资源
await RES.loadGroup("common"); await RES.loadGroup("common");
await RES.loadGroup("svga"); await RES.loadGroup("svga");
await sendWebNet(WebNetName.index); await sendWebNet(WebNetName.index,{isShare:getQueryParams().issharepage=='1' ? 1:0});
console.log("通用资源加载完成") console.log("通用资源加载完成")
//h5环境时,隐藏加载中 //h5环境时,隐藏加载中
if (FYGE.getEnv() == "web" && document.getElementById("__loading__")) document.getElementById("__loading__").style.display = "none"; if (FYGE.getEnv() == "web" && document.getElementById("__loading__")) document.getElementById("__loading__").style.display = "none";
......
...@@ -720,5 +720,5 @@ export const ResJson = { ...@@ -720,5 +720,5 @@ export const ResJson = {
} }
} }
], ],
"path": "https://yun.duiba.com.cn/db_games/activity/template/1629096619/resource/" "path": "https://yun.duiba.com.cn/db_games/activity/template/1629104340/resource/"
} }
\ No newline at end of file
export const getSearch =(str)=>{
const arr = str.split('&');
const res:any = {};
for (const item of arr) {
if(!item)continue;
const[k,v] = item.split('=');
res[k]=v;
}
return res
}
\ No newline at end of file
import getQueryParams from "./common/getQueryParams";
function getParams() { function getParams() {
var url = location.href; var url = location.href;
...@@ -22,6 +21,6 @@ function getParams() { ...@@ -22,6 +21,6 @@ function getParams() {
} }
export const getUnionid = () => { export const getUnionid = () => {
console.log('getUnionid',getQueryParams().uid); console.log('getParams',getParams());
return getQueryParams().uid; return getParams().unionid;
} }
\ No newline at end of file
import getQueryParams from "./common/getQueryParams";
import { getWebData } from "./WebNet";
import { WebNetName } from "./WebNetName";
export const isMember=()=>{
const indexResult = getWebData(WebNetName.index);
return indexResult.data.vip || (localStorage&&localStorage.getItem('vip'))
}
\ No newline at end of file
import { showPanel } from "../../module/ctrls"; import { showPanel, wait } from "../../module/ctrls";
import { RES } from "../../module/RES"; import { RES } from "../../module/RES";
import { layers } from "../../module/views/layers"; import { layers } from "../../module/views/layers";
import { Panel } from "../../module/views/Panel"; import { Panel } from "../../module/views/Panel";
...@@ -11,6 +11,7 @@ import { WebNetName } from "../WebNetName"; ...@@ -11,6 +11,7 @@ import { WebNetName } from "../WebNetName";
import { NoPrizePanel } from "./noprize"; import { NoPrizePanel } from "./noprize";
import { notEnoughMoneyPanel } from "./notEnoughMoney"; import { notEnoughMoneyPanel } from "./notEnoughMoney";
import { PrizePanel } from "./prize"; import { PrizePanel } from "./prize";
import { waitAPI } from "./wait2";
let section; let section;
export class CostPanel extends Panel { export class CostPanel extends Panel {
...@@ -39,6 +40,7 @@ export class CostPanel extends Panel { ...@@ -39,6 +40,7 @@ export class CostPanel extends Panel {
if (indexResult.data.type == 1) { if (indexResult.data.type == 1) {
params.credits = indexResult.data.needCredits; params.credits = indexResult.data.needCredits;
result = await sendWebNet(WebNetName.getCreditCost, params); result = await sendWebNet(WebNetName.getCreditCost, params);
await waitAPI(500);
if(!result.success) { if(!result.success) {
btn.mouseEnable=true; btn.mouseEnable=true;
return; return;
......
import { showPanel } from "../../module/ctrls"; import { showPanel } from "../../module/ctrls";
import { RES } from "../../module/RES"; import { RES } from "../../module/RES";
import { layers } from "../../module/views/layers";
import { Panel } from "../../module/views/Panel"; import { Panel } from "../../module/views/Panel";
import centerTextField from "../common/centerTextField"; import centerTextField from "../common/centerTextField";
import getObject from "../common/getObject"; import getObject from "../common/getObject";
import { hideShareMask, showShareMask } from "../common/ShareMask"; import { hideShareMask, showShareMask } from "../common/ShareMask";
import { sendLog } from "../WebNet"; import { sendLog, sendWebNet } from "../WebNet";
import { WebNetName } from "../WebNetName";
import { SharePanel } from "./share"; import { SharePanel } from "./share";
let section; let section;
...@@ -14,14 +16,23 @@ export class getTimesPanel extends Panel { ...@@ -14,14 +16,23 @@ export class getTimesPanel extends Panel {
this.stage.dispatchEvent("restartEnterFrame",{}); this.stage.dispatchEvent("restartEnterFrame",{});
super.hidePanel(); super.hidePanel();
} }
click_getTimes_go() { async click_getTimes_go() {
sendLog("click",7);
this.hidePanel(); this.hidePanel();
showShareMask(); showShareMask();
await sendWebNet(WebNetName.getFreeCount,{},null,true);
sendWebNet(WebNetName.index).then(res => {
layers.stage.dispatchEvent('updateIndexData')
});
sendLog("click",7);
setTimeout(() => { setTimeout(() => {
hideShareMask(); hideShareMask();
showPanel(SharePanel); showPanel(SharePanel);
},2000) },4000)
} }
get groupNames() { return ["getTimes"] } get groupNames() { return ["getTimes"] }
......
...@@ -15,7 +15,11 @@ export class memberGuidePanel extends Panel { ...@@ -15,7 +15,11 @@ export class memberGuidePanel extends Panel {
} }
click_memberGuide_btn(){ click_memberGuide_btn(){
console.log('memberGuide_btn'); console.log('memberGuide_btn');
location.href='pages/customView/customView1';
window['wx'].miniProgram.redirectTo({
url:'/pages/member-center/member-center/member-center-index'
});
sendLog("click",6); sendLog("click",6);
} }
......
...@@ -14,7 +14,10 @@ export class notEnoughMoneyPanel extends Panel { ...@@ -14,7 +14,10 @@ export class notEnoughMoneyPanel extends Panel {
click_notEnoughMoney_btn(){ click_notEnoughMoney_btn(){
sendLog("click",5); sendLog("click",5);
location.href = 'pages/pointsmall-index/pointsmall-index?pageId=ff8080816deed7ce016df398f7662325';
window['wx'].miniProgram.redirectTo({
url:'/pages/pointsmall-index/pointsmall-index'
});
} }
get groupNames() { return ["notEnoughMoney"] } get groupNames() { return ["notEnoughMoney"] }
......
...@@ -27,7 +27,7 @@ export class SharePanel extends Panel { ...@@ -27,7 +27,7 @@ export class SharePanel extends Panel {
centerTextField(getObject(this,'share_tips'),496); centerTextField(getObject(this,'share_tips'),496);
getObject(this,'share_tips').text=`获得${1231233123}次拆盲盒机会` getObject(this,'share_tips').text=`获得一次拆盲盒机会`;
} }
......
...@@ -8,6 +8,7 @@ let section; ...@@ -8,6 +8,7 @@ let section;
export class timesNotEnoughPanel extends Panel { export class timesNotEnoughPanel extends Panel {
hidePanel(){ hidePanel(){
sendLog("click",8);
this.stage.dispatchEvent("restartEnterFrame",{}); this.stage.dispatchEvent("restartEnterFrame",{});
super.hidePanel(); super.hidePanel();
} }
...@@ -17,7 +18,7 @@ export class timesNotEnoughPanel extends Panel { ...@@ -17,7 +18,7 @@ export class timesNotEnoughPanel extends Panel {
initUi() { initUi() {
super.initUi(); super.initUi();
sendLog("click",8); sendLog("exposure",8);
var skin = RES.getSkinDataByName(this.skinName); var skin = RES.getSkinDataByName(this.skinName);
this.position.set(skin.x, skin.y); this.position.set(skin.x, skin.y);
} }
......
export const waitAPI = (seconds)=>{
return new Promise(r=>{
setTimeout(() => {
r(null)
}, seconds);
})
}
\ No newline at end of file
...@@ -2,11 +2,11 @@ import { showPanel } from "../../module/ctrls"; ...@@ -2,11 +2,11 @@ import { showPanel } from "../../module/ctrls";
import { RES } from "../../module/RES"; import { RES } from "../../module/RES";
import { Scene } from "../../module/views/Scene"; import { Scene } from "../../module/views/Scene";
import getObject from "../common/getObject"; import getObject from "../common/getObject";
import { getUnionid } from "../getUnionid"; import { isMember } from "../isMember";
import { getTimesPanel } from "../panels/getTimes"; import { getTimesPanel } from "../panels/getTimes";
import { RulePanel } from "../panels/RulePanel"; import { RulePanel } from "../panels/RulePanel";
import { timesNotEnoughPanel } from "../panels/timesNotEnough"; import { timesNotEnoughPanel } from "../panels/timesNotEnough";
import { getWebData, sendLog, sendWebNet } from "../WebNet"; import { getWebData, sendLog } from "../WebNet";
import { WebNetName } from "../WebNetName"; import { WebNetName } from "../WebNetName";
import { BoxGroup } from "./BoxGroup"; import { BoxGroup } from "./BoxGroup";
import { createPrizeTxt } from "./createPrizeTxt"; import { createPrizeTxt } from "./createPrizeTxt";
...@@ -31,7 +31,7 @@ export class IndexScene extends Scene { ...@@ -31,7 +31,7 @@ export class IndexScene extends Scene {
initUi(){ initUi(){
super.initUi(); super.initUi();
if( !getUnionid()){ if( !isMember()){
initNonmemberMask(); initNonmemberMask();
} }
...@@ -103,6 +103,9 @@ export class IndexScene extends Scene { ...@@ -103,6 +103,9 @@ export class IndexScene extends Scene {
initEvents() { initEvents() {
super.initEvents(); super.initEvents();
getObject(this,'index_record').addEventListener(FYGE.MouseEvent.CLICK, ()=>{
location.href='f34481928.html'
}, this);
this.addEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this); this.addEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this);
this.addEventListener("restartEnterFrame", this.onRestartFrame, this); this.addEventListener("restartEnterFrame", this.onRestartFrame, this);
const rulePop = getObject(this,'index_rule'); const rulePop = getObject(this,'index_rule');
...@@ -133,14 +136,14 @@ export class IndexScene extends Scene { ...@@ -133,14 +136,14 @@ export class IndexScene extends Scene {
showPanel(timesNotEnoughPanel); showPanel(timesNotEnoughPanel);
} else { } else {
showPanel(getTimesPanel); showPanel(getTimesPanel);
await sendWebNet(WebNetName.getFreeCount);
await sendWebNet(WebNetName.index); // await sendWebNet(WebNetName.index);
this.getIndex(); // this.getIndex();
} }
} }
getIndex = async () => { getIndex = async () => {
if( !getUnionid()){ if( !isMember()){
getObject(this,'index_sharetips').visible=false; getObject(this,'index_sharetips').visible=false;
getObject(this,'index_sharehand').visible=false; getObject(this,'index_sharehand').visible=false;
scrollList.visible=false; scrollList.visible=false;
...@@ -181,7 +184,8 @@ export class IndexScene extends Scene { ...@@ -181,7 +184,8 @@ export class IndexScene extends Scene {
hand.visible = false; hand.visible = false;
} else { } else {
reDegree.text = '0'; reDegree.text = '0';
needCredits.text = `${result.data.needCredits}` + "积分/次"; needCredits.text = '今日次数已用完';needCredits.size=24;
// needCredits.text = `${result.data.needCredits}` + "积分/次";
getBoxButton.visible = true; getBoxButton.visible = true;
shareButton.visible = false; shareButton.visible = false;
} }
......
import { start, WeixinMini, updateShare } from '@spark/share' import { start, WeixinMini, updateShare } from '@spark/share'
start([WeixinMini], (way, success, payload) => {
console.log('分享' + success ? '成功' : '失败'); export const startShare=()=>{
updateShare({ console.log('start WeixinMini')
title: '百万体验金等你来拿', //分享标题 start([WeixinMini], (way, success, payload) => {
content: '三湘银行体验金活动', //分享内容 console.log('分享' + success ? '成功' : '失败');
url: 'http://www.baidu.com', //分享链接
thumbnail: 'https://yun.duiba.com.cn/db_games/sxbank.png', //分享缩略图 updateShare({
title: '百万体验金等你来拿', //分享标题
content: '三湘银行体验金活动', //分享内容
url: 'http://www.baidu.com', //分享链接
thumbnail: 'https://yun.duiba.com.cn/db_games/sxbank.png', //分享缩略图
});
}); });
}); }
\ No newline at end of file
...@@ -1317,7 +1317,7 @@ domain-browser@^1.1.1: ...@@ -1317,7 +1317,7 @@ domain-browser@^1.1.1:
resolved "http://npm.dui88.com:80/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" resolved "http://npm.dui88.com:80/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda"
integrity sha1-PTH1AZGmdJ3RN1p/Ui6CPULlTto= integrity sha1-PTH1AZGmdJ3RN1p/Ui6CPULlTto=
duiba-utils@^1.0.6, duiba-utils@^1.0.9: duiba-utils@^1.0.11, duiba-utils@^1.0.6:
version "1.0.11" version "1.0.11"
resolved "http://npm.dui88.com:80/duiba-utils/-/duiba-utils-1.0.11.tgz#deead33f0c86bbe0063131b70ff0592da7bcb9dd" resolved "http://npm.dui88.com:80/duiba-utils/-/duiba-utils-1.0.11.tgz#deead33f0c86bbe0063131b70ff0592da7bcb9dd"
integrity sha512-mEKFgn+ZpaIwMFmZHiCZXJpPTPkoCZSEKKfubjJ+8edti0GbGnfrbZKvHveLu5HbvwpXCNA6xXPQDJcE12VqbA== integrity sha512-mEKFgn+ZpaIwMFmZHiCZXJpPTPkoCZSEKKfubjJ+8edti0GbGnfrbZKvHveLu5HbvwpXCNA6xXPQDJcE12VqbA==
......
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