Commit b3249a9d authored by shunx 马's avatar shunx 马

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

parents 55819f6c 3635b2fe
# 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,
"data": 123,
"message": null,
"success": true
"message": 123,
"success": 1
}
\ No newline at end of file
......@@ -32,5 +32,5 @@
]
},
"message": "12312312",
"success": 1
"success": 0
}
\ No newline at end of file
......@@ -120,11 +120,11 @@
"sendCount": 1
}
],
"surplusCount": 1,
"surplusCount": 11,
"credits": 111111,
"needCredits": 110,
"type": 2,
"isMember":1
"type": 1,
"vip":1
},
"message": null,
"success": true
......
......@@ -12,18 +12,18 @@
"mock-webpack-plugin": "^2.0.0",
"path": "^0.12.7",
"progress": "^2.0.0",
"readline": "^1.3.0",
"ts-loader": "^4.0.0",
"tslint": "^5.9.1",
"typescript": "^3.5.1",
"webpack": "^4.1.0",
"webpack-cli": "^3.1.1",
"webpack-dev-server": "^3.1.0",
"webpack-merge": "^4.1.2",
"readline": "^1.3.0"
"webpack-merge": "^4.1.2"
},
"dependencies": {
"@spark/share": "^2.0.90",
"duiba-utils": "^1.0.9"
"duiba-utils": "^1.0.11"
},
"scripts": {
"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 { 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 { startShare } from "./share";
import { SkinJson } from "./SkinJson";
import { LoadingScene } from "./template/LoadingScene";
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 {accessLog} from 'duiba-utils'
/**
......@@ -50,15 +52,25 @@ export class Main {
private async onAddToStage() {
if(getQueryParams().iscustom) {
console.log('fuck');
sendWebNet(WebNetName.login,{
appId:getUrlParams("appID"),
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;
}
if(getQueryParams().issharepage == 1) {
console.log('分享进入')
}else{
console.log('主动进入')
}
startShare();
//初始化层级
layers.init(this.stage);
console.log("初始化层级完成")
......@@ -71,7 +83,7 @@ export class Main {
//加载通用资源
await RES.loadGroup("common");
await RES.loadGroup("svga");
await sendWebNet(WebNetName.index);
await sendWebNet(WebNetName.index,{isShare:getQueryParams().issharepage=='1' ? 1:0});
console.log("通用资源加载完成")
//h5环境时,隐藏加载中
if (FYGE.getEnv() == "web" && document.getElementById("__loading__")) document.getElementById("__loading__").style.display = "none";
......
......@@ -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() {
var url = location.href;
......@@ -22,6 +21,6 @@ function getParams() {
}
export const getUnionid = () => {
console.log('getUnionid',getQueryParams().uid);
return getQueryParams().uid;
console.log('getParams',getParams());
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 { layers } from "../../module/views/layers";
import { Panel } from "../../module/views/Panel";
......@@ -11,6 +11,7 @@ import { WebNetName } from "../WebNetName";
import { NoPrizePanel } from "./noprize";
import { notEnoughMoneyPanel } from "./notEnoughMoney";
import { PrizePanel } from "./prize";
import { waitAPI } from "./wait2";
let section;
export class CostPanel extends Panel {
......@@ -39,6 +40,7 @@ export class CostPanel extends Panel {
if (indexResult.data.type == 1) {
params.credits = indexResult.data.needCredits;
result = await sendWebNet(WebNetName.getCreditCost, params);
await waitAPI(500);
if(!result.success) {
btn.mouseEnable=true;
return;
......
import { showPanel } from "../../module/ctrls";
import { RES } from "../../module/RES";
import { layers } from "../../module/views/layers";
import { Panel } from "../../module/views/Panel";
import centerTextField from "../common/centerTextField";
import getObject from "../common/getObject";
import { hideShareMask, showShareMask } from "../common/ShareMask";
import { sendLog } from "../WebNet";
import { sendLog, sendWebNet } from "../WebNet";
import { WebNetName } from "../WebNetName";
import { SharePanel } from "./share";
let section;
......@@ -14,14 +16,23 @@ export class getTimesPanel extends Panel {
this.stage.dispatchEvent("restartEnterFrame",{});
super.hidePanel();
}
click_getTimes_go() {
sendLog("click",7);
async click_getTimes_go() {
this.hidePanel();
showShareMask();
await sendWebNet(WebNetName.getFreeCount,{},null,true);
sendWebNet(WebNetName.index).then(res => {
layers.stage.dispatchEvent('updateIndexData')
});
sendLog("click",7);
setTimeout(() => {
hideShareMask();
showPanel(SharePanel);
},2000)
},4000)
}
get groupNames() { return ["getTimes"] }
......
......@@ -15,7 +15,11 @@ export class memberGuidePanel extends Panel {
}
click_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);
}
......
......@@ -14,7 +14,10 @@ export class notEnoughMoneyPanel extends Panel {
click_notEnoughMoney_btn(){
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"] }
......
......@@ -27,7 +27,7 @@ export class SharePanel extends Panel {
centerTextField(getObject(this,'share_tips'),496);
getObject(this,'share_tips').text=`获得${1231233123}次拆盲盒机会`
getObject(this,'share_tips').text=`获得一次拆盲盒机会`;
}
......
......@@ -8,6 +8,7 @@ let section;
export class timesNotEnoughPanel extends Panel {
hidePanel(){
sendLog("click",8);
this.stage.dispatchEvent("restartEnterFrame",{});
super.hidePanel();
}
......@@ -17,7 +18,7 @@ export class timesNotEnoughPanel extends Panel {
initUi() {
super.initUi();
sendLog("click",8);
sendLog("exposure",8);
var skin = RES.getSkinDataByName(this.skinName);
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";
import { RES } from "../../module/RES";
import { Scene } from "../../module/views/Scene";
import getObject from "../common/getObject";
import { getUnionid } from "../getUnionid";
import { isMember } from "../isMember";
import { getTimesPanel } from "../panels/getTimes";
import { RulePanel } from "../panels/RulePanel";
import { timesNotEnoughPanel } from "../panels/timesNotEnough";
import { getWebData, sendLog, sendWebNet } from "../WebNet";
import { getWebData, sendLog } from "../WebNet";
import { WebNetName } from "../WebNetName";
import { BoxGroup } from "./BoxGroup";
import { createPrizeTxt } from "./createPrizeTxt";
......@@ -31,7 +31,7 @@ export class IndexScene extends Scene {
initUi(){
super.initUi();
if( !getUnionid()){
if( !isMember()){
initNonmemberMask();
}
......@@ -103,6 +103,9 @@ export class IndexScene extends Scene {
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("restartEnterFrame", this.onRestartFrame, this);
const rulePop = getObject(this,'index_rule');
......@@ -133,14 +136,14 @@ export class IndexScene extends Scene {
showPanel(timesNotEnoughPanel);
} else {
showPanel(getTimesPanel);
await sendWebNet(WebNetName.getFreeCount);
await sendWebNet(WebNetName.index);
this.getIndex();
// await sendWebNet(WebNetName.index);
// this.getIndex();
}
}
getIndex = async () => {
if( !getUnionid()){
if( !isMember()){
getObject(this,'index_sharetips').visible=false;
getObject(this,'index_sharehand').visible=false;
scrollList.visible=false;
......@@ -181,7 +184,8 @@ export class IndexScene extends Scene {
hand.visible = false;
} else {
reDegree.text = '0';
needCredits.text = `${result.data.needCredits}` + "积分/次";
needCredits.text = '今日次数已用完';needCredits.size=24;
// needCredits.text = `${result.data.needCredits}` + "积分/次";
getBoxButton.visible = true;
shareButton.visible = false;
}
......
import { start, WeixinMini, updateShare } from '@spark/share'
start([WeixinMini], (way, success, payload) => {
export const startShare=()=>{
console.log('start WeixinMini')
start([WeixinMini], (way, success, payload) => {
console.log('分享' + success ? '成功' : '失败');
updateShare({
......@@ -9,4 +13,6 @@ start([WeixinMini], (way, success, payload) => {
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:
resolved "http://npm.dui88.com:80/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda"
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"
resolved "http://npm.dui88.com:80/duiba-utils/-/duiba-utils-1.0.11.tgz#deead33f0c86bbe0063131b70ff0592da7bcb9dd"
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