Commit 32d764cf authored by spc's avatar spc

fixed privacy

parent 3470fca2
......@@ -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/1761038908863/styles/main.efbfbdfd3ef8da29c48c.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/1764223427737/styles/main.c0182a7e86dfe09dc42b.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___ = 'origin%09http%3A%2F%2Fgitlab2.dui88.com%2Fsparkprojects%2FKWW-520NumberGuessingGame-20250409.git%20(fetch)%3Borigin%09http%3A%2F%2Fgitlab2.dui88.com%2Fsparkprojects%2FKWW-520NumberGuessingGame-20250409.git%20(push)%3Bdaily_20251013_%E7%99%BB%E5%BD%95%E5%90%8E%E7%BD%AE%3B';</script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1761038908863/js/runtime-main.eb82de75.js" crossorigin="anonymous"></script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1761038908863/js/vendors.4a95563e.js" crossorigin="anonymous"></script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1761038908863/js/main.aa3a81ef.js" crossorigin="anonymous"></script></body></html>
\ No newline at end of file
CFG.___G___ = 'daily_20251013_%E7%99%BB%E5%BD%95%E5%90%8E%E7%BD%AE%3Borigin%09http%3A%2F%2Fgitlab2.dui88.com%2Fsparkprojects%2FKWW-520NumberGuessingGame-20250409%20(fetch)%3Borigin%09http%3A%2F%2Fgitlab2.dui88.com%2Fsparkprojects%2FKWW-520NumberGuessingGame-20250409%20(push)%3B';</script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1764223427737/js/runtime-main.e4461512.js" crossorigin="anonymous"></script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1764223427737/js/vendors.7a8b10d9.js" crossorigin="anonymous"></script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1764223427737/js/main.cf1f0656.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/1761038908863/";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.eb82de75.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/1764223427737/";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.e4461512.js.map
\ No newline at end of file
......@@ -187,4 +187,4 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
function o(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function a(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function s(e,t,n,o,a,s,u){return void 0===t&&(t={}),void 0===n&&(n="get"),void 0===o&&(o={}),void 0===a&&(a="form"),void 0===s&&(s=!1),new Promise((function(c,l){var f;if(window.XMLHttpRequest?f=new XMLHttpRequest:window.ActiveXObject?f=new window.ActiveXObject(void 0):alert("no xhr"),null!=f){t&&(t=JSON.parse(JSON.stringify(t)));var d="GET"===n.toUpperCase(),h=void 0,p=Date.now();switch(a){case"form":o["Content-Type"]="application/x-www-form-urlencoded",t._t=p,h=function(e,t,n){e&&Object.keys(e).length>0&&("function"==typeof t?e.sign=t(e,n):t&&(e.sign=function(e,t){var n=Object.keys(e);n.sort();for(var i=[],o=0,a=n;o<a.length;o++){var s=a[o];i.push(s+"="+e[s])}i.push("key="+t);var u=i.join("&");return Object(r.i)(u)}(e,n)));return Object(r.j)(e)}(t,s,u);break;case"json":o["Content-Type"]="application/json",h=JSON.stringify(t);break;case"plain":o["Content-Type"]="text/plain",h=t}var m=e,v=window.url_process;for(var _ in v&&(m=v(m)),m=d?Object(r.m)(m,h):Object(r.m)(m,"_t="+p),f.timeout=1e4,f.open(n,m,!0),o)f.setRequestHeader(_,o[_]);f.responseType="text",f.onreadystatechange=function(){4==f.readyState&&200==f.status&&c(f.response)},f.onerror=function(){l(new i.a({code:i.b.NET_ERROR,message:"网络错误,请检查网络是否通畅"}))},f.onloadend=function(){var t=f.status;if(200!==t){var n=i.b.NET_ERROR,r="网络错误,请检查网络是否通畅";switch(t){case 404:r=e+" 404 (Not Found)";break;case 429:r="活动太火爆了,请稍后再试~";try{r=JSON.parse(f.response).message}catch(e){}n=i.b.CALL_LIMITING}l(new i.a({code:n,message:r,payload:{code:t,response:f.response}}))}},f.ontimeout=function(){l(new i.a(i.b.REQUEST_TIMEOUT,"请求超时"))},d?f.send():f.send(h)}}))}function u(e,t){void 0===t&&(t={}),t._t=Date.now();var n=Object(r.m)(e,Object(r.j)(t));return Object(r.a)(n)}function c(e,t,n,r,u,c,l,f){return void 0===n&&(n="get"),void 0===u&&(u=!0),void 0===c&&(c=!1),o(this,void 0,void 0,(function(){var o,d;return a(this,(function(a){switch(a.label){case 0:return[4,s(e,t,n,r,f,c,l)];case 1:o=a.sent();try{d=JSON.parse(o)}catch(e){throw new i.a(i.b.INVALID_RESPONSE)}if(u){if(d.success)return[2,d.data];throw new i.a(d)}return[2,d]}}))}))}function l(e,t,n,r,o,a,s,u){void 0===r&&(r=10),void 0===o&&(o=500),void 0===a&&(a="get"),void 0===u&&(u=!0);for(var l,f=Promise.resolve(),d=0;d<r;d++)f=(f=f.then(h)).then((function(){return new Promise((function(e){return setTimeout(e,o)}))}));return f.then((function(){throw new i.a(i.b.POLLING_TIMEOUT,"轮询超时")}),(function(e){if("success"===e){if(u){if(l.success)return l.data;throw new i.a(l)}return l}throw e}));function h(){return c(t,n,a,s,!1).then((function(t){if(e(t))return l=t,Promise.reject("success")}),(function(e){return Promise.reject(e)}))}}function f(e){var t=e.uri,n=e.params,r=e.method,i=e.headers,o=e.justData,a=e.secret,s=e.secretKey,u=e.requestContentType;return c.apply(null,[t,n,r,i,o,a,s,u])}}}]);
//# sourceMappingURL=vendors.4a95563e.js.map
\ No newline at end of file
//# sourceMappingURL=vendors.7a8b10d9.js.map
\ No newline at end of file
{"numOfComponents":5048,"numOfProject":2435}
\ No newline at end of file
{"numOfComponents":5048,"numOfProject":2560}
\ No newline at end of file
......@@ -10,5 +10,5 @@ module.exports ={
"IMAGE_Q2": 0.8,
"RES_PATH": "/src/assets/",
"RES_PATH_PROD": "//yun.duiba.com.cn/spark/v2/temp_base/1761038902426",
"JS_PATH_PROD": "https://yun.duiba.com.cn/spark/v2/temp_base/1761038908863/js"
"JS_PATH_PROD": "https://yun.duiba.com.cn/spark/v2/temp_base/1764223427737/js"
}
\ No newline at end of file
This diff is collapsed.
@import "../../res.less";
.privacymodal {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
position: relative;
animation: fadeIn 0.3s ease-out;
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.privacymodal-container {
width: 640px;
max-height: 80vh;
background: #ffffff;
border-radius: 20px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
overflow: hidden;
position: relative;
padding-bottom: 20px;
animation: slideIn 0.3s ease-out;
@keyframes slideIn {
from {
transform: translateY(30px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.privacymodal-closebtn {
width: 30px;
height: 30px;
position: absolute;
top: 15px;
right: 15px;
cursor: pointer;
z-index: 10;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
&::before,
&::after {
content: '';
position: absolute;
width: 2px;
height: 20px;
background-color: #999999;
border-radius: 1px;
}
&::before {
transform: rotate(45deg);
}
&::after {
transform: rotate(-45deg);
}
&:hover {
&::before,
&::after {
background-color: #333333;
}
}
&:active {
transform: scale(0.9);
}
}
.privacymodal-title {
font-size: 24px;
font-weight: bold;
color: #333333;
text-align: center;
margin: 30px 0 10px;
position: relative;
padding-top: 10px;
}
.privacymodal-content {
max-height: 300px; /* 增加内容区域高度以容纳更多文本 */
overflow-y: auto;
padding: 0 20px;
margin-bottom: 30px;
-webkit-overflow-scrolling: touch; /* 为iOS设备提供更流畅的滚动体验 */
.privacymodal-section {
.privacymodal-intro {
font-size: 14px;
line-height: 1.8;
color: #333333;
margin-bottom: 25px;
padding: 15px;
background-color: #fff8f0;
border-left: 4px solid #ff7a45;
border-radius: 4px;
text-align: justify;
}
.privacymodal-chapter-title {
font-size: 20px;
font-weight: bold;
color: #ff4d4f;
margin: 25px 0 15px;
padding-bottom: 10px;
border-bottom: 2px solid #ff4d4f;
text-align: center;
background: linear-gradient(90deg, transparent, rgba(255, 77, 79, 0.1), transparent);
padding-top: 10px;
}
.privacymodal-paragraph {
font-size: 14px;
line-height: 1.8;
color: #333333;
margin-bottom: 15px;
text-align: justify;
position: relative;
padding-left: 30px; /* 为段落编号留出空间 */
}
.privacymodal-paragraph-number {
display: inline-block;
font-weight: bold;
color: #ff4d4f;
margin-right: 8px;
position: absolute;
left: 0;
}
/* 为条款标题添加特殊样式 */
p strong {
color: #ff4d4f;
font-size: 15px;
display: block;
margin-bottom: 10px;
text-indent: 0;
}
p:last-child {
margin-bottom: 0;
}
}
// 自定义滚动条样式
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 3px;
}
&::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 3px;
}
&::-webkit-scrollbar-thumb:hover {
background: #a8a8a8;
}
}
.privacymodal-buttons {
display: flex;
justify-content: space-between;
padding: 0 180px;
gap: 20px;
.privacymodal-button-cancel,
.privacymodal-button-confirm {
flex: 1;
height: 50px;
border-radius: 5px;
font-size: 18px;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
border: none;
outline: none;
}
.privacymodal-button-cancel {
background: #f0f0f0;
color: #666666;
&:hover {
background: #e0e0e0;
transform: translateY(-2px);
}
&:active {
transform: translateY(0);
}
}
.privacymodal-button-confirm {
background: #0e5ce9;
color: #ffffff;
height: 65px;
&:hover:not(:disabled) {
background: #0e5ce9;
transform: translateY(-2px);
}
&:active:not(:disabled) {
transform: translateY(0);
}
&:disabled {
background: #cccccc;
cursor: not-allowed;
opacity: 0.6;
}
}
}
}
// 响应式设计
// @media (max-width: 768px) {
// .privacymodal-container {
// width: 95%; // 增加宽度以充分利用屏幕空间
// max-width: 500px;
// max-height: 90vh; // 增加弹窗最大高度
// .privacymodal-title {
// font-size: 18px;
// margin: 20px 0 15px; // 调整标题边距
// }
// .privacymodal-content {
// max-height: 60vh; // 移动端增加内容区域高度
// padding: 0 15px;
// .privacymodal-section {
// .privacymodal-intro {
// padding: 12px;
// margin-bottom: 20px;
// font-size: 13px;
// }
// .privacymodal-chapter-title {
// font-size: 18px;
// margin: 20px 0 12px;
// padding: 8px 0;
// }
// .privacymodal-paragraph {
// font-size: 13px;
// margin-bottom: 12px;
// padding-left: 25px;
// }
// .privacymodal-paragraph-number {
// font-size: 13px;
// left: -5px;
// }
// p strong {
// font-size: 14px;
// }
// }
// }
// .privacymodal-buttons {
// padding: 0 15px;
// margin-top: 15px;
// gap: 15px;
// .privacymodal-button-cancel,
// .privacymodal-button-confirm {
// height: 40px;
// font-size: 15px;
// }
// }
// }
// }
// // 小屏幕设备的进一步优化
// @media (max-width: 480px) {
// .privacymodal {
// align-items: flex-start;
// padding-top: 20px;
// }
// .privacymodal-container {
// width: 98%;
// max-height: 95vh;
// border-radius: 15px;
// }
// .privacymodal-content {
// max-height: 65vh;
// padding: 0 12px;
// .privacymodal-section {
// .privacymodal-intro {
// padding: 10px;
// margin-bottom: 15px;
// font-size: 12px;
// }
// .privacymodal-chapter-title {
// font-size: 16px;
// margin: 15px 0 10px;
// padding: 6px 0;
// }
// .privacymodal-paragraph {
// font-size: 12px;
// line-height: 1.6;
// padding-left: 20px;
// }
// .privacymodal-paragraph-number {
// font-size: 12px;
// left: -8px;
// }
// p strong {
// font-size: 13px;
// }
// }
// }
// }
}
\ No newline at end of file
......@@ -9,6 +9,7 @@ import './modal.less';
import { observer } from 'mobx-react';
import modalStore from '../store/modal';
import { toJS } from 'mobx';
import PrivacyModal from "@src/components/privacymodal/privacymodal";
/**
* 弹窗配置
*/
......@@ -21,6 +22,7 @@ export const cfg = {
Failpop: Failpop,
// 新手引导
GuideModal,
PrivacyModal
};
@observer
......
......@@ -68,6 +68,9 @@ const store = makeAutoObservable({
const { data, success } = await API.getLoginInfo();
if (success) {
this.loginInfo = data;
if (data.boolLogin === false) {
modalStore.pushPop("PrivacyModal")
}
}
},
/**
......@@ -105,7 +108,7 @@ const store = makeAutoObservable({
this.submitFlag = false
const { success, data } = await API.startGame()
if (success) {
if(location.href.indexOf('localhost') > -1 || location.href.indexOf('172') > -1) {
if (location.href.indexOf('localhost') > -1 || location.href.indexOf('172') > -1) {
this.startInfo = data
} else {
this.startInfo = JSON.parse(AESDecrypt(data, '3C8C48E792E9241B', 'cDOiBC1n2QrkAY2P'));
......@@ -117,7 +120,7 @@ const store = makeAutoObservable({
submitFlag: false,
async submitScore(score) {
if(this.submitFlag) return;
if (this.submitFlag) return;
this.submitFlag = true;
const obj = {
......@@ -127,17 +130,17 @@ const store = makeAutoObservable({
}
const param = AESEncrypt(JSON.stringify(obj), '3C8C48E792E9241B', 'cDOiBC1n2QrkAY2P');
const res = await API.submitGame({
const res = await API.submitGame({
score,
param: encodeURIComponent(param),
})
if(!res || !res.success || !res.data) {
if (!res || !res.success || !res.data) {
store.changePage(PAGE_MAP.HOME_PAGE)
return
};
if(res.data?.sendCount > 0) {
if (res.data?.sendCount > 0) {
modalStore.pushPop("Successpop", res.data)
} else {
modalStore.pushPop("Failpop", res.data)
......@@ -145,8 +148,8 @@ const store = makeAutoObservable({
// modalStore.pushPop("Successpop", data)
// modalStore.pushPop("Failpop", data)
},
/** 分享 */
async doShare() {
/** 分享 */
async doShare() {
const { shareInfo } = store.frontVariable;
const domain = await getDomain(); //获取域名
let _url = `${domain}/projectx/${CFG.projectId}/index.html?appID=${CFG.appID}`;
......@@ -165,20 +168,20 @@ const store = makeAutoObservable({
isPlay: true,
async playRightSound() {
// if (this.isPlay) {
const aniSound = await getMusic(MUSIC_URL.RIGHT_EFFECT)
console.error("zhengque", aniSound)
aniSound.play()
aniSound.loop = false
const aniSound = await getMusic(MUSIC_URL.RIGHT_EFFECT)
console.error("zhengque", aniSound)
aniSound.play()
aniSound.loop = false
// }
},
async playWrongSound() {
// if (this.isPlay) {
const aniSound = await getMusic(MUSIC_URL.WRONG_EFFECT)
console.error("cuowu", aniSound)
const aniSound = await getMusic(MUSIC_URL.WRONG_EFFECT)
console.error("cuowu", aniSound)
aniSound.play()
aniSound.loop = false
aniSound.play()
aniSound.loop = false
// }
},
......
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