Commit f73904b0 authored by 韦燕's avatar 韦燕

feat:merge

parent f37186f1
......@@ -29,6 +29,6 @@ if (location.href.indexOf("duibatest") > -1) {
CFG.loginMidId = "Did1NTk5OTk"; // 线上测试
}
// 免登中间页
CFG.loginMidUrl = "/customShare/share?id=" + CFG.loginMidId + "&source=duiba&projectId=" + CFG.projectId + "&redirectUrl=";</script><link href="//yun.duiba.com.cn/spark/v2/temp_base/1745203008268/styles/main.d65479aa4fe86b607240.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>"use strict";
CFG.loginMidUrl = "/customShare/share?id=" + CFG.loginMidId + "&source=duiba&projectId=" + CFG.projectId + "&redirectUrl=";</script><link href="//yun.duiba.com.cn/spark/v2/temp_base/1745222500677/styles/main.0f7766448b3ab6aa8e07.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>"use strict";
CFG.___G___ = 'weiyan%3Borigin%09git%40gitlab2.dui88.com%3Asparkprojects%2FKWW-520NumberGuessingGame-20250409.git%20(fetch)%3Borigin%09git%40gitlab2.dui88.com%3Asparkprojects%2FKWW-520NumberGuessingGame-20250409.git%20(push)%3Bdaily_20250418%3B';</script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1745203008268/js/runtime-main.0cdfc6d8.js" crossorigin="anonymous"></script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1745203008268/js/vendors.a83fc370.js" crossorigin="anonymous"></script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1745203008268/js/main.3d2bcd37.js" crossorigin="anonymous"></script></body></html>
\ No newline at end of file
CFG.___G___ = 'daily_20250418%3Bweiyan%3Borigin%09git%40gitlab2.dui88.com%3Asparkprojects%2FKWW-520NumberGuessingGame-20250409.git%20(fetch)%3Borigin%09git%40gitlab2.dui88.com%3Asparkprojects%2FKWW-520NumberGuessingGame-20250409.git%20(push)%3B';</script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1745222500677/js/runtime-main.f61b7894.js" crossorigin="anonymous"></script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1745222500677/js/vendors.a83fc370.js" crossorigin="anonymous"></script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1745222500677/js/main.85796ec3.js" crossorigin="anonymous"></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){function r(r){for(var n,a,l=r[0],i=r[1],p=r[2],c=0,s=[];c<l.length;c++)a=l[c],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var i=t[l];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={1:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,function(r){return e[r]}.bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="//yun.duiba.com.cn/spark/v2/temp_base/1745203008268/";var l=window.webpackJsonp=window.webpackJsonp||[],i=l.push.bind(l);l.push=r,l=l.slice();for(var p=0;p<l.length;p++)r(l[p]);var f=i;t()}([]);
//# sourceMappingURL=runtime-main.0cdfc6d8.js.map
\ No newline at end of file
!function(e){function r(r){for(var n,a,l=r[0],i=r[1],p=r[2],c=0,s=[];c<l.length;c++)a=l[c],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var i=t[l];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={1:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,function(r){return e[r]}.bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="//yun.duiba.com.cn/spark/v2/temp_base/1745222500677/";var l=window.webpackJsonp=window.webpackJsonp||[],i=l.push.bind(l);l.push=r,l=l.slice();for(var p=0;p<l.length;p++)r(l[p]);var f=i;t()}([]);
//# sourceMappingURL=runtime-main.f61b7894.js.map
\ No newline at end of file
{"numOfComponents":5048,"numOfProject":2368}
\ No newline at end of file
{"numOfComponents":5048,"numOfProject":2361}
\ No newline at end of file
......@@ -9,6 +9,6 @@ module.exports ={
"IMAGE_Q1": 0.6,
"IMAGE_Q2": 0.8,
"RES_PATH": "/src/assets/",
"RES_PATH_PROD": "//yun.duiba.com.cn/spark/v2/temp_base/1744884311687",
"JS_PATH_PROD": "https://yun.duiba.com.cn/spark/v2/temp_base/1745203008268/js"
"RES_PATH_PROD": "//yun.duiba.com.cn/spark/v2/temp_base/1745222489489",
"JS_PATH_PROD": "https://yun.duiba.com.cn/spark/v2/temp_base/1745222500677/js"
}
\ No newline at end of file
......@@ -105,7 +105,7 @@ class GamePage extends Component {
this.leftSymbol = ''
// 随机生成加减
let addition = this.plusNum > 7 ? (Math.random() > 0.5 ? 'minus' : 'plus') : 'plus';
let addition = this.plusNum > 10 ? (Math.random() > 0.7 ? 'minus' : 'plus') : 'plus';
if (this.firstInFlag) {
this.firstInFlag = false;
addition = 'plus';
......@@ -194,13 +194,13 @@ class GamePage extends Component {
probabilityList = probabilityList.filter(item => item.name != 'multiplyFen')
}
if(this.currentOpt == 'plus' && (newNum1 - this.currentNumber - 10) > this.currentNumber * 2) {
probabilityList = probabilityList.filter(item => item.name != 'percent')
}
// if(this.currentOpt == 'plus' && (newNum1 - this.currentNumber - 10) > this.currentNumber * 2) {
// probabilityList = probabilityList.filter(item => item.name != 'percent')
// }
if(this.currentOpt == 'minus' && (this.currentNumber - newNum1 + 10) < Math.ceil(this.currentNumber * 0.01)) {
probabilityList = probabilityList.filter(item => item.name != 'percent')
}
// if(this.currentOpt == 'minus' && (this.currentNumber - newNum1 + 10) < Math.ceil(this.currentNumber * 0.01)) {
// probabilityList = probabilityList.filter(item => item.name != 'percent')
// }
if(Math.abs(newNum1 - this.currentNumber / 2) > 10) {
probabilityList = probabilityList.filter(item => item.name != 'division')
......@@ -262,7 +262,7 @@ class GamePage extends Component {
const randomIndex = Math.random > 0.5 ? -1 : 1
const newNum1 = this.leftNumber;
console.error("newNum1", this.leftSymbol, newNum1)
// console.error("newNum1", this.leftSymbol, newNum1)
// console.error("left", newNum1)
......@@ -278,7 +278,7 @@ class GamePage extends Component {
const minDiff = -Math.min(10, newNum1 - this.currentNumber);
let targetDiff = this.createSpecialNum(minDiff, maxDiff);
// const newNum1 = this.calcNum(this.leftSymbol, -1);
console.error("target", targetDiff, newNum1)
// console.error("target", targetDiff, newNum1)
if (targetDiff === 0) {
targetDiff = 1;
}
......@@ -299,12 +299,13 @@ class GamePage extends Component {
}
} else {
if(this.currentNumber <= 20) {
p1 = this.createSpecialNum(1, 10)
} else if(this.currentNumber > 20 && this.currentNumber <= 50) {
p1 = this.createSpecialNum(21, 50)
p1 = this.createSpecialNum(1, 50)
} else {
p1 = this.createSpecialNum(51, 99)
}
// else if(this.currentNumber > 20 && this.currentNumber <= 50) {
// p1 = this.createSpecialNum(21, 50)
// }
number = p1
}
break;
......@@ -314,7 +315,7 @@ class GamePage extends Component {
const minDiff = -Math.min(10, newNum1); // 最小差值不能让结果小于0
const maxDiff = 10;
let targetDiff = this.createSpecialNum(minDiff, maxDiff);
console.error("target", targetDiff, newNum1)
// console.error("target", targetDiff, newNum1)
if (targetDiff === 0) {
targetDiff = Math.random() > 0.5 ? 1 : -1;
}
......@@ -327,18 +328,20 @@ class GamePage extends Component {
}
} else {
if(this.currentNumber <= 20) {
dP1 = this.createSpecialNum(1, 10)
} else if(this.currentNumber > 20 && this.currentNumber <= 50) {
dP1 = this.createSpecialNum(11, 25)
dP1 = this.createSpecialNum(1, 25)
} else {
dP1 = this.createSpecialNum(26, 49)
}
// else if(this.currentNumber > 20 && this.currentNumber <= 50) {
// dP1 = this.createSpecialNum(11, 25)
// }
number = dP1;
}
break;
case 'minus':
const changeNum = this.createSpecialNum(this.min, Math.min(99, this.currentNumber));
const changeNum = this.createSpecialNum(this.min, Math.min(50, this.currentNumber));
if (pos == 1) {
// const mMin = Math.min(10, this.currentNumber - newNum1)
// let m1 = this.createSpecialNum(1, mMin)
......@@ -478,16 +481,24 @@ class GamePage extends Component {
const targetResult = newNum1 + targetDiff;
// 反推百分比:(1 - targetResult / this.currentNumber) * 100
number = Math.max(1, Math.ceil((1 - targetResult / this.currentNumber) * 100));
if(number > 25) {
number = this.createSpecialNum(1, 25)
}
}
} else {
if(this.currentNumber < 100) {
number = this.createSpecialNum(1, 100);
} else if(this.currentNumber < 200) {
number = this.createSpecialNum(1, 50);
if(this.currentOpt == 'plus') {
if(this.currentNumber < 100) {
number = this.createSpecialNum(1, 100);
} else if(this.currentNumber < 200) {
number = this.createSpecialNum(1, 50);
} else {
number = this.createSpecialNum(1, 25);
}
} else {
number = this.createSpecialNum(1, 25);
}
}
break;
case 'division':
......@@ -509,7 +520,7 @@ class GamePage extends Component {
}
// number = Math.ceil((this.currentNumber - targetResult) / 2);
} else {
number = this.createSpecialNum(0, Math.min(99, Math.floor(this.currentNumber / 2)));
number = this.createSpecialNum(0, Math.min(30, Math.floor(this.currentNumber / 2)));
}
break;
}
......@@ -590,7 +601,7 @@ class GamePage extends Component {
// const newNumber1 = this.newNumber1;
// const newNumber2 = this.newNumber2;
console.error("左边", newNumber1, "右边", newNumber2)
// console.error("左边", newNumber1, "右边", newNumber2)
this.leftSymbol = ''
// 如果是加法 先判断选择的是不是比另一个大 如果不是那就不用计算了
......
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